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

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 (71) hide show
  1. package/LICENSE +201 -0
  2. package/dist/index.cjs +2083 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +1468 -0
  5. package/dist/index.d.ts +1468 -0
  6. package/dist/index.js +2063 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +60 -0
  9. package/plugin.schema.json +1123 -0
  10. package/src/agent/KmsRestClient.ts +468 -0
  11. package/src/index.ts +7 -0
  12. package/src/models/AwsAssumeRoleCredentials.ts +98 -0
  13. package/src/models/AwsClientConfiguration.ts +72 -0
  14. package/src/models/AwsKmsSetting.ts +126 -0
  15. package/src/models/AwsStaticCredentials.ts +98 -0
  16. package/src/models/AwsWebIdentityTokenCredentials.ts +99 -0
  17. package/src/models/AzureClientSecretCredentialOpts.ts +90 -0
  18. package/src/models/AzureCredentialOpts.ts +70 -0
  19. package/src/models/AzureKeyVaultSetting.ts +112 -0
  20. package/src/models/CoseKey.ts +145 -0
  21. package/src/models/CoseKeyPair.ts +79 -0
  22. package/src/models/CoseKeyType.ts +55 -0
  23. package/src/models/CreateKeyProvider.ts +115 -0
  24. package/src/models/CreateRawSignature.ts +80 -0
  25. package/src/models/CreateRawSignatureResponse.ts +65 -0
  26. package/src/models/CreateSimpleSignature.ts +100 -0
  27. package/src/models/CryptoAlg.ts +55 -0
  28. package/src/models/Curve.ts +59 -0
  29. package/src/models/DigestAlg.ts +58 -0
  30. package/src/models/ErrorResponse.ts +82 -0
  31. package/src/models/GenerateKey.ts +106 -0
  32. package/src/models/GenerateKeyGlobal.ts +114 -0
  33. package/src/models/GenerateKeyResponse.ts +71 -0
  34. package/src/models/GetKeyResponse.ts +71 -0
  35. package/src/models/IdentifierMethod.ts +56 -0
  36. package/src/models/JoseKeyPair.ts +79 -0
  37. package/src/models/Jwk.ts +248 -0
  38. package/src/models/JwkKeyType.ts +55 -0
  39. package/src/models/JwkUse.ts +53 -0
  40. package/src/models/KeyEncoding.ts +53 -0
  41. package/src/models/KeyInfo.ts +164 -0
  42. package/src/models/KeyOperations.ts +59 -0
  43. package/src/models/KeyProvider.ts +82 -0
  44. package/src/models/KeyProviderResponse.ts +82 -0
  45. package/src/models/KeyProviderType.ts +54 -0
  46. package/src/models/KeyResolver.ts +92 -0
  47. package/src/models/KeyType.ts +54 -0
  48. package/src/models/KeyVisibility.ts +53 -0
  49. package/src/models/ListKeyProvidersResponse.ts +71 -0
  50. package/src/models/ListKeysResponse.ts +71 -0
  51. package/src/models/ListResolversResponse.ts +71 -0
  52. package/src/models/LookupMode.ts +54 -0
  53. package/src/models/ManagedKeyInfo.ts +167 -0
  54. package/src/models/ManagedKeyPair.ts +111 -0
  55. package/src/models/MaskGenFunction.ts +52 -0
  56. package/src/models/ProviderCapabilities.ts +122 -0
  57. package/src/models/ResolvePublicKey.ts +102 -0
  58. package/src/models/ResolvedKeyInfo.ts +165 -0
  59. package/src/models/Resolver.ts +92 -0
  60. package/src/models/SignInput.ts +92 -0
  61. package/src/models/SignOutput.ts +79 -0
  62. package/src/models/Signature.ts +103 -0
  63. package/src/models/SignatureAlgorithm.ts +63 -0
  64. package/src/models/StoreKey.ts +79 -0
  65. package/src/models/StoreKeyResponse.ts +71 -0
  66. package/src/models/UpdateKeyProvider.ts +99 -0
  67. package/src/models/VerifyRawSignature.ts +89 -0
  68. package/src/models/VerifyRawSignatureResponse.ts +65 -0
  69. package/src/models/VerifySimpleSignature.ts +85 -0
  70. package/src/models/index.ts +60 -0
  71. package/src/types/IKmsRestClient.ts +133 -0
@@ -0,0 +1,126 @@
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 { AwsAssumeRoleCredentials } from './AwsAssumeRoleCredentials';
16
+ import {
17
+ AwsAssumeRoleCredentialsFromJSON,
18
+ AwsAssumeRoleCredentialsToJSON,
19
+ } from './AwsAssumeRoleCredentials';
20
+ import type { AwsStaticCredentials } from './AwsStaticCredentials';
21
+ import {
22
+ AwsStaticCredentialsFromJSON,
23
+ AwsStaticCredentialsToJSON,
24
+ } from './AwsStaticCredentials';
25
+ import type { AwsWebIdentityTokenCredentials } from './AwsWebIdentityTokenCredentials';
26
+ import {
27
+ AwsWebIdentityTokenCredentialsFromJSON,
28
+ AwsWebIdentityTokenCredentialsToJSON,
29
+ } from './AwsWebIdentityTokenCredentials';
30
+ import type { AwsClientConfiguration } from './AwsClientConfiguration';
31
+ import {
32
+ AwsClientConfigurationFromJSON,
33
+ AwsClientConfigurationToJSON,
34
+ } from './AwsClientConfiguration';
35
+
36
+ /**
37
+ * Configuration settings specific to the AWS_KMS provider type. Defines how to connect and authenticate to AWS KMS. If no specific credential provider is specified, the implementation should rely on the default AWS SDK credential provider chain.
38
+ * @export
39
+ * @interface AwsKmsSetting
40
+ */
41
+ export interface AwsKmsSetting {
42
+ /**
43
+ * The AWS region where the KMS keys reside (e.g., 'us-east-1', 'eu-west-1').
44
+ * @type {string}
45
+ * @memberof AwsKmsSetting
46
+ */
47
+ region: string;
48
+ /**
49
+ *
50
+ * @type {AwsStaticCredentials}
51
+ * @memberof AwsKmsSetting
52
+ */
53
+ staticCredentials?: AwsStaticCredentials;
54
+ /**
55
+ *
56
+ * @type {AwsAssumeRoleCredentials}
57
+ * @memberof AwsKmsSetting
58
+ */
59
+ assumeRoleCredentials?: AwsAssumeRoleCredentials;
60
+ /**
61
+ *
62
+ * @type {AwsWebIdentityTokenCredentials}
63
+ * @memberof AwsKmsSetting
64
+ */
65
+ webIdentityTokenCredentials?: AwsWebIdentityTokenCredentials;
66
+ /**
67
+ * Optional custom endpoint URL for AWS KMS (e.g., for VPC endpoints or local testing).
68
+ * @type {string}
69
+ * @memberof AwsKmsSetting
70
+ */
71
+ endpointUrl?: string;
72
+ /**
73
+ *
74
+ * @type {AwsClientConfiguration}
75
+ * @memberof AwsKmsSetting
76
+ */
77
+ clientConfiguration?: AwsClientConfiguration;
78
+ }
79
+
80
+ /**
81
+ * Check if a given object implements the AwsKmsSetting interface.
82
+ */
83
+ export function instanceOfAwsKmsSetting(value: object): value is AwsKmsSetting {
84
+ if (!('region' in value) || value['region'] === undefined) return false;
85
+ return true;
86
+ }
87
+
88
+ export function AwsKmsSettingFromJSON(json: any): AwsKmsSetting {
89
+ return AwsKmsSettingFromJSONTyped(json, false);
90
+ }
91
+
92
+ export function AwsKmsSettingFromJSONTyped(json: any, ignoreDiscriminator: boolean): AwsKmsSetting {
93
+ if (json == null) {
94
+ return json;
95
+ }
96
+ return {
97
+
98
+ 'region': json['region'],
99
+ 'staticCredentials': json['staticCredentials'] == null ? undefined : AwsStaticCredentialsFromJSON(json['staticCredentials']),
100
+ 'assumeRoleCredentials': json['assumeRoleCredentials'] == null ? undefined : AwsAssumeRoleCredentialsFromJSON(json['assumeRoleCredentials']),
101
+ 'webIdentityTokenCredentials': json['webIdentityTokenCredentials'] == null ? undefined : AwsWebIdentityTokenCredentialsFromJSON(json['webIdentityTokenCredentials']),
102
+ 'endpointUrl': json['endpointUrl'] == null ? undefined : json['endpointUrl'],
103
+ 'clientConfiguration': json['clientConfiguration'] == null ? undefined : AwsClientConfigurationFromJSON(json['clientConfiguration']),
104
+ };
105
+ }
106
+
107
+ export function AwsKmsSettingToJSON(json: any): AwsKmsSetting {
108
+ return AwsKmsSettingToJSONTyped(json, false);
109
+ }
110
+
111
+ export function AwsKmsSettingToJSONTyped(value?: AwsKmsSetting | null, ignoreDiscriminator: boolean = false): any {
112
+ if (value == null) {
113
+ return value;
114
+ }
115
+
116
+ return {
117
+
118
+ 'region': value['region'],
119
+ 'staticCredentials': AwsStaticCredentialsToJSON(value['staticCredentials']),
120
+ 'assumeRoleCredentials': AwsAssumeRoleCredentialsToJSON(value['assumeRoleCredentials']),
121
+ 'webIdentityTokenCredentials': AwsWebIdentityTokenCredentialsToJSON(value['webIdentityTokenCredentials']),
122
+ 'endpointUrl': value['endpointUrl'],
123
+ 'clientConfiguration': AwsClientConfigurationToJSON(value['clientConfiguration']),
124
+ };
125
+ }
126
+
@@ -0,0 +1,98 @@
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 { LookupMode } from './LookupMode';
16
+ import {
17
+ LookupModeFromJSON,
18
+ LookupModeToJSON,
19
+ } from './LookupMode';
20
+
21
+ /**
22
+ * Explicit AWS access key ID and secret access key. Use with caution; prefer IAM roles or other mechanisms where possible.
23
+ * @export
24
+ * @interface AwsStaticCredentials
25
+ */
26
+ export interface AwsStaticCredentials {
27
+ /**
28
+ * AWS Access Key ID.
29
+ * @type {string}
30
+ * @memberof AwsStaticCredentials
31
+ */
32
+ accesskid: string;
33
+ /**
34
+ * AWS Secret Access Key.
35
+ * @type {string}
36
+ * @memberof AwsStaticCredentials
37
+ */
38
+ secretAccessKey: string;
39
+ /**
40
+ * Optional AWS session token, typically used with temporary credentials.
41
+ * @type {string}
42
+ * @memberof AwsStaticCredentials
43
+ */
44
+ sessionToken?: string;
45
+ /**
46
+ *
47
+ * @type {LookupMode}
48
+ * @memberof AwsStaticCredentials
49
+ */
50
+ lookupMode?: LookupMode;
51
+ }
52
+
53
+
54
+
55
+ /**
56
+ * Check if a given object implements the AwsStaticCredentials interface.
57
+ */
58
+ export function instanceOfAwsStaticCredentials(value: object): value is AwsStaticCredentials {
59
+ if (!('accesskid' in value) || value['accesskid'] === undefined) return false;
60
+ if (!('secretAccessKey' in value) || value['secretAccessKey'] === undefined) return false;
61
+ return true;
62
+ }
63
+
64
+ export function AwsStaticCredentialsFromJSON(json: any): AwsStaticCredentials {
65
+ return AwsStaticCredentialsFromJSONTyped(json, false);
66
+ }
67
+
68
+ export function AwsStaticCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AwsStaticCredentials {
69
+ if (json == null) {
70
+ return json;
71
+ }
72
+ return {
73
+
74
+ 'accesskid': json['accesskid'],
75
+ 'secretAccessKey': json['secretAccessKey'],
76
+ 'sessionToken': json['sessionToken'] == null ? undefined : json['sessionToken'],
77
+ 'lookupMode': json['lookupMode'] == null ? undefined : LookupModeFromJSON(json['lookupMode']),
78
+ };
79
+ }
80
+
81
+ export function AwsStaticCredentialsToJSON(json: any): AwsStaticCredentials {
82
+ return AwsStaticCredentialsToJSONTyped(json, false);
83
+ }
84
+
85
+ export function AwsStaticCredentialsToJSONTyped(value?: AwsStaticCredentials | null, ignoreDiscriminator: boolean = false): any {
86
+ if (value == null) {
87
+ return value;
88
+ }
89
+
90
+ return {
91
+
92
+ 'accesskid': value['accesskid'],
93
+ 'secretAccessKey': value['secretAccessKey'],
94
+ 'sessionToken': value['sessionToken'],
95
+ 'lookupMode': LookupModeToJSON(value['lookupMode']),
96
+ };
97
+ }
98
+
@@ -0,0 +1,99 @@
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 { LookupMode } from './LookupMode';
16
+ import {
17
+ LookupModeFromJSON,
18
+ LookupModeToJSON,
19
+ } from './LookupMode';
20
+
21
+ /**
22
+ * Credentials obtained using a web identity token (e.g., from Cognito, OIDC provider).
23
+ * @export
24
+ * @interface AwsWebIdentityTokenCredentials
25
+ */
26
+ export interface AwsWebIdentityTokenCredentials {
27
+ /**
28
+ * The Amazon Resource Name (ARN) of the role to assume.
29
+ * @type {string}
30
+ * @memberof AwsWebIdentityTokenCredentials
31
+ */
32
+ roleArn: string;
33
+ /**
34
+ * An identifier for the assumed role session.
35
+ * @type {string}
36
+ * @memberof AwsWebIdentityTokenCredentials
37
+ */
38
+ roleSessionName: string;
39
+ /**
40
+ * The web identity token (e.g., OIDC token, Cognito token) itself.
41
+ * @type {string}
42
+ * @memberof AwsWebIdentityTokenCredentials
43
+ */
44
+ webIdentityToken: string;
45
+ /**
46
+ *
47
+ * @type {LookupMode}
48
+ * @memberof AwsWebIdentityTokenCredentials
49
+ */
50
+ lookupMode?: LookupMode;
51
+ }
52
+
53
+
54
+
55
+ /**
56
+ * Check if a given object implements the AwsWebIdentityTokenCredentials interface.
57
+ */
58
+ export function instanceOfAwsWebIdentityTokenCredentials(value: object): value is AwsWebIdentityTokenCredentials {
59
+ if (!('roleArn' in value) || value['roleArn'] === undefined) return false;
60
+ if (!('roleSessionName' in value) || value['roleSessionName'] === undefined) return false;
61
+ if (!('webIdentityToken' in value) || value['webIdentityToken'] === undefined) return false;
62
+ return true;
63
+ }
64
+
65
+ export function AwsWebIdentityTokenCredentialsFromJSON(json: any): AwsWebIdentityTokenCredentials {
66
+ return AwsWebIdentityTokenCredentialsFromJSONTyped(json, false);
67
+ }
68
+
69
+ export function AwsWebIdentityTokenCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AwsWebIdentityTokenCredentials {
70
+ if (json == null) {
71
+ return json;
72
+ }
73
+ return {
74
+
75
+ 'roleArn': json['roleArn'],
76
+ 'roleSessionName': json['roleSessionName'],
77
+ 'webIdentityToken': json['webIdentityToken'],
78
+ 'lookupMode': json['lookupMode'] == null ? undefined : LookupModeFromJSON(json['lookupMode']),
79
+ };
80
+ }
81
+
82
+ export function AwsWebIdentityTokenCredentialsToJSON(json: any): AwsWebIdentityTokenCredentials {
83
+ return AwsWebIdentityTokenCredentialsToJSONTyped(json, false);
84
+ }
85
+
86
+ export function AwsWebIdentityTokenCredentialsToJSONTyped(value?: AwsWebIdentityTokenCredentials | null, ignoreDiscriminator: boolean = false): any {
87
+ if (value == null) {
88
+ return value;
89
+ }
90
+
91
+ return {
92
+
93
+ 'roleArn': value['roleArn'],
94
+ 'roleSessionName': value['roleSessionName'],
95
+ 'webIdentityToken': value['webIdentityToken'],
96
+ 'lookupMode': LookupModeToJSON(value['lookupMode']),
97
+ };
98
+ }
99
+
@@ -0,0 +1,90 @@
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 { LookupMode } from './LookupMode';
16
+ import {
17
+ LookupModeFromJSON,
18
+ LookupModeToJSON,
19
+ } from './LookupMode';
20
+
21
+ /**
22
+ * Azure Service Principal credentials using a client secret.
23
+ * @export
24
+ * @interface AzureClientSecretCredentialOpts
25
+ */
26
+ export interface AzureClientSecretCredentialOpts {
27
+ /**
28
+ * The Application (client) ID of the Azure service principal.
29
+ * @type {string}
30
+ * @memberof AzureClientSecretCredentialOpts
31
+ */
32
+ clientId: string;
33
+ /**
34
+ * The client secret for the service principal.
35
+ * @type {string}
36
+ * @memberof AzureClientSecretCredentialOpts
37
+ */
38
+ clientSecret: string;
39
+ /**
40
+ *
41
+ * @type {LookupMode}
42
+ * @memberof AzureClientSecretCredentialOpts
43
+ */
44
+ lookupMode?: LookupMode;
45
+ }
46
+
47
+
48
+
49
+ /**
50
+ * Check if a given object implements the AzureClientSecretCredentialOpts interface.
51
+ */
52
+ export function instanceOfAzureClientSecretCredentialOpts(value: object): value is AzureClientSecretCredentialOpts {
53
+ if (!('clientId' in value) || value['clientId'] === undefined) return false;
54
+ if (!('clientSecret' in value) || value['clientSecret'] === undefined) return false;
55
+ return true;
56
+ }
57
+
58
+ export function AzureClientSecretCredentialOptsFromJSON(json: any): AzureClientSecretCredentialOpts {
59
+ return AzureClientSecretCredentialOptsFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function AzureClientSecretCredentialOptsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AzureClientSecretCredentialOpts {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'clientId': json['clientId'],
69
+ 'clientSecret': json['clientSecret'],
70
+ 'lookupMode': json['lookupMode'] == null ? undefined : LookupModeFromJSON(json['lookupMode']),
71
+ };
72
+ }
73
+
74
+ export function AzureClientSecretCredentialOptsToJSON(json: any): AzureClientSecretCredentialOpts {
75
+ return AzureClientSecretCredentialOptsToJSONTyped(json, false);
76
+ }
77
+
78
+ export function AzureClientSecretCredentialOptsToJSONTyped(value?: AzureClientSecretCredentialOpts | null, ignoreDiscriminator: boolean = false): any {
79
+ if (value == null) {
80
+ return value;
81
+ }
82
+
83
+ return {
84
+
85
+ 'clientId': value['clientId'],
86
+ 'clientSecret': value['clientSecret'],
87
+ 'lookupMode': LookupModeToJSON(value['lookupMode']),
88
+ };
89
+ }
90
+
@@ -0,0 +1,70 @@
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 { AzureClientSecretCredentialOpts } from './AzureClientSecretCredentialOpts';
16
+ import {
17
+ AzureClientSecretCredentialOptsFromJSON,
18
+ AzureClientSecretCredentialOptsToJSON,
19
+ } from './AzureClientSecretCredentialOpts';
20
+
21
+ /**
22
+ * Azure credential options for authenticating to Key Vault. Currently assumes Service Principal with Client Secret.
23
+ * @export
24
+ * @interface AzureCredentialOpts
25
+ */
26
+ export interface AzureCredentialOpts {
27
+ /**
28
+ *
29
+ * @type {AzureClientSecretCredentialOpts}
30
+ * @memberof AzureCredentialOpts
31
+ */
32
+ clientSecretCredentialOpts?: AzureClientSecretCredentialOpts;
33
+ }
34
+
35
+ /**
36
+ * Check if a given object implements the AzureCredentialOpts interface.
37
+ */
38
+ export function instanceOfAzureCredentialOpts(value: object): value is AzureCredentialOpts {
39
+ return true;
40
+ }
41
+
42
+ export function AzureCredentialOptsFromJSON(json: any): AzureCredentialOpts {
43
+ return AzureCredentialOptsFromJSONTyped(json, false);
44
+ }
45
+
46
+ export function AzureCredentialOptsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AzureCredentialOpts {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+
52
+ 'clientSecretCredentialOpts': json['clientSecretCredentialOpts'] == null ? undefined : AzureClientSecretCredentialOptsFromJSON(json['clientSecretCredentialOpts']),
53
+ };
54
+ }
55
+
56
+ export function AzureCredentialOptsToJSON(json: any): AzureCredentialOpts {
57
+ return AzureCredentialOptsToJSONTyped(json, false);
58
+ }
59
+
60
+ export function AzureCredentialOptsToJSONTyped(value?: AzureCredentialOpts | null, ignoreDiscriminator: boolean = false): any {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+
65
+ return {
66
+
67
+ 'clientSecretCredentialOpts': AzureClientSecretCredentialOptsToJSON(value['clientSecretCredentialOpts']),
68
+ };
69
+ }
70
+
@@ -0,0 +1,112 @@
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 { AzureCredentialOpts } from './AzureCredentialOpts';
16
+ import {
17
+ AzureCredentialOptsFromJSON,
18
+ AzureCredentialOptsToJSON,
19
+ } from './AzureCredentialOpts';
20
+ import type { LookupMode } from './LookupMode';
21
+ import {
22
+ LookupModeFromJSON,
23
+ LookupModeToJSON,
24
+ } from './LookupMode';
25
+
26
+ /**
27
+ * Configuration settings specific to the Azure KeyVault provider type.
28
+ * @export
29
+ * @interface AzureKeyVaultSetting
30
+ */
31
+ export interface AzureKeyVaultSetting {
32
+ /**
33
+ * The URL of the Azure Key Vault or Managed HSM instance.
34
+ * @type {string}
35
+ * @memberof AzureKeyVaultSetting
36
+ */
37
+ keyvaultUrl: string;
38
+ /**
39
+ * The Azure Active Directory tenant (directory) ID.
40
+ * @type {string}
41
+ * @memberof AzureKeyVaultSetting
42
+ */
43
+ tenantId: string;
44
+ /**
45
+ *
46
+ * @type {AzureCredentialOpts}
47
+ * @memberof AzureKeyVaultSetting
48
+ */
49
+ credentialOpts: AzureCredentialOpts;
50
+ /**
51
+ * An optional identifier for your application using the Key Vault.
52
+ * @type {string}
53
+ * @memberof AzureKeyVaultSetting
54
+ */
55
+ applicationId?: string;
56
+ /**
57
+ *
58
+ * @type {LookupMode}
59
+ * @memberof AzureKeyVaultSetting
60
+ */
61
+ lookupMode?: LookupMode;
62
+ }
63
+
64
+
65
+
66
+ /**
67
+ * Check if a given object implements the AzureKeyVaultSetting interface.
68
+ */
69
+ export function instanceOfAzureKeyVaultSetting(value: object): value is AzureKeyVaultSetting {
70
+ if (!('keyvaultUrl' in value) || value['keyvaultUrl'] === undefined) return false;
71
+ if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
72
+ if (!('credentialOpts' in value) || value['credentialOpts'] === undefined) return false;
73
+ return true;
74
+ }
75
+
76
+ export function AzureKeyVaultSettingFromJSON(json: any): AzureKeyVaultSetting {
77
+ return AzureKeyVaultSettingFromJSONTyped(json, false);
78
+ }
79
+
80
+ export function AzureKeyVaultSettingFromJSONTyped(json: any, ignoreDiscriminator: boolean): AzureKeyVaultSetting {
81
+ if (json == null) {
82
+ return json;
83
+ }
84
+ return {
85
+
86
+ 'keyvaultUrl': json['keyvaultUrl'],
87
+ 'tenantId': json['tenantId'],
88
+ 'credentialOpts': AzureCredentialOptsFromJSON(json['credentialOpts']),
89
+ 'applicationId': json['applicationId'] == null ? undefined : json['applicationId'],
90
+ 'lookupMode': json['lookupMode'] == null ? undefined : LookupModeFromJSON(json['lookupMode']),
91
+ };
92
+ }
93
+
94
+ export function AzureKeyVaultSettingToJSON(json: any): AzureKeyVaultSetting {
95
+ return AzureKeyVaultSettingToJSONTyped(json, false);
96
+ }
97
+
98
+ export function AzureKeyVaultSettingToJSONTyped(value?: AzureKeyVaultSetting | null, ignoreDiscriminator: boolean = false): any {
99
+ if (value == null) {
100
+ return value;
101
+ }
102
+
103
+ return {
104
+
105
+ 'keyvaultUrl': value['keyvaultUrl'],
106
+ 'tenantId': value['tenantId'],
107
+ 'credentialOpts': AzureCredentialOptsToJSON(value['credentialOpts']),
108
+ 'applicationId': value['applicationId'],
109
+ 'lookupMode': LookupModeToJSON(value['lookupMode']),
110
+ };
111
+ }
112
+