@meeco/svx-api-sdk 1.0.0-stage.20231211153548.58a6d84 → 1.0.0-stage.20231218095603.d71b65e
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/.openapi-generator/FILES +4 -1
- package/lib/esm/apis/SharesApi.js +4 -4
- package/lib/esm/apis/VerifiableCredentialsApi.js +2 -2
- package/lib/esm/models/{VCGenerateCredentialDtoCnf.js → VCClaimsDto.js} +12 -9
- package/lib/esm/models/VCCredentialVerificationResultResponseDto.js +2 -1
- package/lib/esm/models/VCFieldsDto.js +3 -2
- package/lib/esm/models/VCFieldsDtoFilter.js +48 -0
- package/lib/esm/models/VCFilterDto.js +48 -0
- package/lib/esm/models/VCGenerateCredentialDto.js +5 -5
- package/lib/esm/models/VCGenerateCredentialDtoClaims.js +40 -0
- package/lib/esm/models/VCIdTokenVerificationResultResponseDto.js +2 -1
- package/lib/esm/models/VCOldPresentationRequestResponseVerificationResultResponseDto.js +2 -1
- package/lib/esm/models/VCPresentationRequestResponseVerificationOptionsDto.js +2 -1
- package/lib/esm/models/VCPresentationRequestResponseVerificationResultResponseDto.js +2 -1
- package/lib/esm/models/VCPresentationRequestUpdateVerificationResultRequestDto.js +2 -1
- package/lib/esm/models/VCPresentationRequestVerificationResultResponseDto.js +2 -1
- package/lib/esm/models/VCPresentationVerificationOptionsDto.js +2 -1
- package/lib/esm/models/VCPresentationVerificationResultResponseDto.js +2 -1
- package/lib/esm/models/index.js +4 -1
- package/lib/types/apis/SharesApi.d.ts +4 -4
- package/lib/types/apis/VerifiableCredentialsApi.d.ts +2 -2
- package/lib/types/models/VCClaimsDto.d.ts +38 -0
- package/lib/types/models/VCCredentialVerificationResultResponseDto.d.ts +1 -0
- package/lib/types/models/VCFieldsDto.d.ts +3 -2
- package/lib/types/models/VCFieldsDtoFilter.d.ts +43 -0
- package/lib/types/models/VCFilterDto.d.ts +43 -0
- package/lib/types/models/VCGenerateCredentialDto.d.ts +6 -6
- package/lib/types/models/VCGenerateCredentialDtoClaims.d.ts +39 -0
- package/lib/types/models/VCIdTokenVerificationResultResponseDto.d.ts +1 -0
- package/lib/types/models/VCOldPresentationRequestResponseVerificationResultResponseDto.d.ts +1 -0
- package/lib/types/models/VCPresentationRequestResponseVerificationOptionsDto.d.ts +2 -1
- package/lib/types/models/VCPresentationRequestResponseVerificationResultResponseDto.d.ts +1 -0
- package/lib/types/models/VCPresentationRequestUpdateVerificationResultRequestDto.d.ts +1 -0
- package/lib/types/models/VCPresentationRequestVerificationResultResponseDto.d.ts +1 -0
- package/lib/types/models/VCPresentationVerificationOptionsDto.d.ts +1 -0
- package/lib/types/models/VCPresentationVerificationResultResponseDto.d.ts +1 -0
- package/lib/types/models/index.d.ts +4 -1
- package/lib/umd/apis/SharesApi.js +4 -4
- package/lib/umd/apis/VerifiableCredentialsApi.js +2 -2
- package/lib/umd/models/VCClaimsDto.js +53 -0
- package/lib/umd/models/VCCredentialVerificationResultResponseDto.js +2 -1
- package/lib/umd/models/VCFieldsDto.js +3 -2
- package/lib/umd/models/VCFieldsDtoFilter.js +55 -0
- package/lib/umd/models/VCFilterDto.js +55 -0
- package/lib/umd/models/VCGenerateCredentialDto.js +5 -5
- package/lib/umd/models/VCGenerateCredentialDtoClaims.js +47 -0
- package/lib/umd/models/VCIdTokenVerificationResultResponseDto.js +2 -1
- package/lib/umd/models/VCOldPresentationRequestResponseVerificationResultResponseDto.js +2 -1
- package/lib/umd/models/VCPresentationRequestResponseVerificationOptionsDto.js +2 -1
- package/lib/umd/models/VCPresentationRequestResponseVerificationResultResponseDto.js +2 -1
- package/lib/umd/models/VCPresentationRequestUpdateVerificationResultRequestDto.js +2 -1
- package/lib/umd/models/VCPresentationRequestVerificationResultResponseDto.js +2 -1
- package/lib/umd/models/VCPresentationVerificationOptionsDto.js +2 -1
- package/lib/umd/models/VCPresentationVerificationResultResponseDto.js +2 -1
- package/lib/umd/models/index.js +4 -1
- package/package.json +1 -1
- package/lib/types/models/VCGenerateCredentialDtoCnf.d.ts +0 -31
- package/lib/umd/models/VCGenerateCredentialDtoCnf.js +0 -50
package/.openapi-generator/FILES
CHANGED
|
@@ -265,6 +265,7 @@ models/ShreIntentListResponse.ts
|
|
|
265
265
|
models/UpdateDelegationsRequest.ts
|
|
266
266
|
models/VCApp.ts
|
|
267
267
|
models/VCAppSignal.ts
|
|
268
|
+
models/VCClaimsDto.ts
|
|
268
269
|
models/VCCnfDto.ts
|
|
269
270
|
models/VCComponent.ts
|
|
270
271
|
models/VCConstraintsDto.ts
|
|
@@ -297,9 +298,11 @@ models/VCDatabase.ts
|
|
|
297
298
|
models/VCErrorResponseDto.ts
|
|
298
299
|
models/VCErrorsResponseDto.ts
|
|
299
300
|
models/VCFieldsDto.ts
|
|
301
|
+
models/VCFieldsDtoFilter.ts
|
|
302
|
+
models/VCFilterDto.ts
|
|
300
303
|
models/VCFormatDto.ts
|
|
301
304
|
models/VCGenerateCredentialDto.ts
|
|
302
|
-
models/
|
|
305
|
+
models/VCGenerateCredentialDtoClaims.ts
|
|
303
306
|
models/VCGenerateCredentialPayloadDto.ts
|
|
304
307
|
models/VCGeneratePresentationDto.ts
|
|
305
308
|
models/VCGeneratePresentationPayloadDto.ts
|
|
@@ -347,7 +347,7 @@ export class SharesApi extends runtime.BaseAPI {
|
|
|
347
347
|
});
|
|
348
348
|
}
|
|
349
349
|
/**
|
|
350
|
-
* Share your item with connected users. Each share can be a share of all slots of the item, in that case `slot_id` is `NULL`, or it can be a share of just one slot. In this case `slot_id` references one of the slots of the item. There are 3 users involved in each share: * owner - the owner of the shared item * sender - the user who shares data. Can be the owner or one of the recipients * recipient - the user who recieves the shared data. Whether a non-owner may on-share a shared slot is defined in field `onsharing_permitted`. Only the owner of the item can set `onsharing_permitted` to `true`. If `onsharing_permitted` is `false`, the recipient may on-share the item, but when that recipient creates an on-share, `onsharing_permitted` in that on-share is forced to be `false`. In other words, the depth of on-sharing in limited to 3: OWNER ==> RECIPIENT AND SENDER ==> RECIPIENT Some shares require that the recipient accepts the terms of the share. Until the terms are not accepted the share DEK is hidden. Data in slots is initially encrypted with the DEK in field `encrypted_dek`. The DEK in `encrypted_dek` is encrypted with the public key of the share recipient. When processing a share the client application is expected to decrypt the slot data and re-encrypt with the private DEK. A public key of the recipient is needed to encrypt the share DEK. Updating all shares of the same item is performed by the owner in one go. In a situation when a share has been created by a recipient, not the owner, and there is no connection between the owner and the recipient, the owner has no access to a public key of the recipient. In order to address this problem when a share is created we also add fields `public_key` and `keypair_external_id` from the connection record between the recipient and the sender. `keypair_external_id` identifies the keypair that the public key belongs to. When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `
|
|
350
|
+
* Share your item with connected users. Each share can be a share of all slots of the item, in that case `slot_id` is `NULL`, or it can be a share of just one slot. In this case `slot_id` references one of the slots of the item. There are 3 users involved in each share: * owner - the owner of the shared item * sender - the user who shares data. Can be the owner or one of the recipients * recipient - the user who recieves the shared data. Whether a non-owner may on-share a shared slot is defined in field `onsharing_permitted`. Only the owner of the item can set `onsharing_permitted` to `true`. If `onsharing_permitted` is `false`, the recipient may on-share the item, but when that recipient creates an on-share, `onsharing_permitted` in that on-share is forced to be `false`. In other words, the depth of on-sharing in limited to 3: OWNER ==> RECIPIENT AND SENDER ==> RECIPIENT Some shares require that the recipient accepts the terms of the share. Until the terms are not accepted the share DEK is hidden. Data in slots is initially encrypted with the DEK in field `encrypted_dek`. The DEK in `encrypted_dek` is encrypted with the public key of the share recipient. When processing a share the client application is expected to decrypt the slot data and re-encrypt with the private DEK. A public key of the recipient is needed to encrypt the share DEK. Updating all shares of the same item is performed by the owner in one go. In a situation when a share has been created by a recipient, not the owner, and there is no connection between the owner and the recipient, the owner has no access to a public key of the recipient. In order to address this problem when a share is created we also add fields `public_key` and `keypair_external_id` from the connection record between the recipient and the sender. `keypair_external_id` identifies the keypair that the public key belongs to. When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `value_verification_hash` when creating or updating the share. When other senders create a share, `value_verification_hash` must be `NULL`. `encrypted_value_verification_key` may and should be sent by every sender, owner or not, because `encrypted_value_verification_key` must be re-encrypted with the share DEK for each share. If the sender replaces `encrypted_value_verification_key` and/or the slot value, this will break the client-side verification against `encrypted_value_verification_key`. Field `encrypted_value` may be `NULL`. If `encrypted_value` is `NULL`, then `encrypted_value_verification_key` and `value_verification_hash` may also be `NULL`. If `encrypted_value` is present, then `encrypted_value_verification_key` and `value_verification_hash` are mandatory.
|
|
351
351
|
* Share your item with connected users
|
|
352
352
|
*/
|
|
353
353
|
itemsIdSharesPostRaw(requestParameters, initOverrides) {
|
|
@@ -382,7 +382,7 @@ export class SharesApi extends runtime.BaseAPI {
|
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
/**
|
|
385
|
-
* Share your item with connected users. Each share can be a share of all slots of the item, in that case `slot_id` is `NULL`, or it can be a share of just one slot. In this case `slot_id` references one of the slots of the item. There are 3 users involved in each share: * owner - the owner of the shared item * sender - the user who shares data. Can be the owner or one of the recipients * recipient - the user who recieves the shared data. Whether a non-owner may on-share a shared slot is defined in field `onsharing_permitted`. Only the owner of the item can set `onsharing_permitted` to `true`. If `onsharing_permitted` is `false`, the recipient may on-share the item, but when that recipient creates an on-share, `onsharing_permitted` in that on-share is forced to be `false`. In other words, the depth of on-sharing in limited to 3: OWNER ==> RECIPIENT AND SENDER ==> RECIPIENT Some shares require that the recipient accepts the terms of the share. Until the terms are not accepted the share DEK is hidden. Data in slots is initially encrypted with the DEK in field `encrypted_dek`. The DEK in `encrypted_dek` is encrypted with the public key of the share recipient. When processing a share the client application is expected to decrypt the slot data and re-encrypt with the private DEK. A public key of the recipient is needed to encrypt the share DEK. Updating all shares of the same item is performed by the owner in one go. In a situation when a share has been created by a recipient, not the owner, and there is no connection between the owner and the recipient, the owner has no access to a public key of the recipient. In order to address this problem when a share is created we also add fields `public_key` and `keypair_external_id` from the connection record between the recipient and the sender. `keypair_external_id` identifies the keypair that the public key belongs to. When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `
|
|
385
|
+
* Share your item with connected users. Each share can be a share of all slots of the item, in that case `slot_id` is `NULL`, or it can be a share of just one slot. In this case `slot_id` references one of the slots of the item. There are 3 users involved in each share: * owner - the owner of the shared item * sender - the user who shares data. Can be the owner or one of the recipients * recipient - the user who recieves the shared data. Whether a non-owner may on-share a shared slot is defined in field `onsharing_permitted`. Only the owner of the item can set `onsharing_permitted` to `true`. If `onsharing_permitted` is `false`, the recipient may on-share the item, but when that recipient creates an on-share, `onsharing_permitted` in that on-share is forced to be `false`. In other words, the depth of on-sharing in limited to 3: OWNER ==> RECIPIENT AND SENDER ==> RECIPIENT Some shares require that the recipient accepts the terms of the share. Until the terms are not accepted the share DEK is hidden. Data in slots is initially encrypted with the DEK in field `encrypted_dek`. The DEK in `encrypted_dek` is encrypted with the public key of the share recipient. When processing a share the client application is expected to decrypt the slot data and re-encrypt with the private DEK. A public key of the recipient is needed to encrypt the share DEK. Updating all shares of the same item is performed by the owner in one go. In a situation when a share has been created by a recipient, not the owner, and there is no connection between the owner and the recipient, the owner has no access to a public key of the recipient. In order to address this problem when a share is created we also add fields `public_key` and `keypair_external_id` from the connection record between the recipient and the sender. `keypair_external_id` identifies the keypair that the public key belongs to. When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `value_verification_hash` when creating or updating the share. When other senders create a share, `value_verification_hash` must be `NULL`. `encrypted_value_verification_key` may and should be sent by every sender, owner or not, because `encrypted_value_verification_key` must be re-encrypted with the share DEK for each share. If the sender replaces `encrypted_value_verification_key` and/or the slot value, this will break the client-side verification against `encrypted_value_verification_key`. Field `encrypted_value` may be `NULL`. If `encrypted_value` is `NULL`, then `encrypted_value_verification_key` and `value_verification_hash` may also be `NULL`. If `encrypted_value` is present, then `encrypted_value_verification_key` and `value_verification_hash` are mandatory.
|
|
386
386
|
* Share your item with connected users
|
|
387
387
|
*/
|
|
388
388
|
itemsIdSharesPost(id, meecoDelegationId, meecoOrganisationId, postItemSharesRequest, initOverrides) {
|
|
@@ -392,7 +392,7 @@ export class SharesApi extends runtime.BaseAPI {
|
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
394
|
/**
|
|
395
|
-
* Updating all shares of one item is done by the item owner in one go. Before calling this endpoint the client application is expected to retrieve the list of shares IDs and public keys via `GET /items/{id}/shares`. The POST body of this endpoint contains * a list of share DEKs encrypted with public keys of share recipients * a list of slot values for each slot and each share, each encrypted with the DEK of the share that the slot belongs to * Optionally: a list of completed `ClientTask` tasks When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `
|
|
395
|
+
* Updating all shares of one item is done by the item owner in one go. Before calling this endpoint the client application is expected to retrieve the list of shares IDs and public keys via `GET /items/{id}/shares`. The POST body of this endpoint contains * a list of share DEKs encrypted with public keys of share recipients * a list of slot values for each slot and each share, each encrypted with the DEK of the share that the slot belongs to * Optionally: a list of completed `ClientTask` tasks When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `value_verification_hash` when creating or updating the share. When other senders create a share, `value_verification_hash` must be `NULL`. `encrypted_value_verification_key` may and should be sent by every sender, owner or not, because `encrypted_value_verification_key` must be re-encrypted with the share DEK for each share. If the sender replaces `encrypted_value_verification_key` and/or the slot value, this will break the client-side verification against `encrypted_value_verification_key`. Field `encrypted_value` may be `NULL`. If `encrypted_value` is `NULL`, then `encrypted_value_verification_key` and `value_verification_hash` may also be `NULL`. If `encrypted_value` is present, then `encrypted_value_verification_key` and `value_verification_hash` are mandatory.
|
|
396
396
|
* Update all shares of one item
|
|
397
397
|
*/
|
|
398
398
|
itemsIdSharesPutRaw(requestParameters, initOverrides) {
|
|
@@ -427,7 +427,7 @@ export class SharesApi extends runtime.BaseAPI {
|
|
|
427
427
|
});
|
|
428
428
|
}
|
|
429
429
|
/**
|
|
430
|
-
* Updating all shares of one item is done by the item owner in one go. Before calling this endpoint the client application is expected to retrieve the list of shares IDs and public keys via `GET /items/{id}/shares`. The POST body of this endpoint contains * a list of share DEKs encrypted with public keys of share recipients * a list of slot values for each slot and each share, each encrypted with the DEK of the share that the slot belongs to * Optionally: a list of completed `ClientTask` tasks When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `
|
|
430
|
+
* Updating all shares of one item is done by the item owner in one go. Before calling this endpoint the client application is expected to retrieve the list of shares IDs and public keys via `GET /items/{id}/shares`. The POST body of this endpoint contains * a list of share DEKs encrypted with public keys of share recipients * a list of slot values for each slot and each share, each encrypted with the DEK of the share that the slot belongs to * Optionally: a list of completed `ClientTask` tasks When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `value_verification_hash` when creating or updating the share. When other senders create a share, `value_verification_hash` must be `NULL`. `encrypted_value_verification_key` may and should be sent by every sender, owner or not, because `encrypted_value_verification_key` must be re-encrypted with the share DEK for each share. If the sender replaces `encrypted_value_verification_key` and/or the slot value, this will break the client-side verification against `encrypted_value_verification_key`. Field `encrypted_value` may be `NULL`. If `encrypted_value` is `NULL`, then `encrypted_value_verification_key` and `value_verification_hash` may also be `NULL`. If `encrypted_value` is present, then `encrypted_value_verification_key` and `value_verification_hash` are mandatory.
|
|
431
431
|
* Update all shares of one item
|
|
432
432
|
*/
|
|
433
433
|
itemsIdSharesPut(id, meecoDelegationId, meecoOrganisationId, putItemSharesRequest, initOverrides) {
|
|
@@ -304,7 +304,7 @@ export class VerifiableCredentialsApi extends runtime.BaseAPI {
|
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
306
|
/**
|
|
307
|
-
* <h4>Requires the following security rights:</h4><ul><li><code>vc:org:manage</code></li></ul><br /><hr /><p>Generates unsigned verifiable credential token in JWT format. Client is expected to sign it with a private key.</p><hr /><p>An example of how credential signing in Javascript:</p><pre><code>import { generateKeyPairFromSeed } from \'@stablelib/ed25519\'; <br />import { EdDSASigner, hexToBytes } from \'did-jwt\'; <br /><br />const key = generateKeyPairFromSeed(hexToBytes(SECRET_HEX)); <br />const signerFn = EdDSASigner(key.secretKey); <br /><br />const signature = await signerFn(unsignedJwt); <br />const vcJwt = [unsignedJwt, signature].join(\'.\');</code></pre><hr /><br /><h4>Issuer property caveat</h4><p>We use <b>openapi-generator</b> to generate Typescript SDK for the given API swagger definition. However, <b>openapi-generator</b> does not support <b>oneOf</b> configuration properly and generates an invalid Typescript SDK. To avoid the problem, swagger defines <b>issuer</b> property only as string for the moment. While in fact, endpoint accepts issuer as an object in format of <code>{id: string; name: string;}</code> as well.</p>
|
|
307
|
+
* <h4>Requires the following security rights:</h4><ul><li><code>vc:org:manage</code></li></ul><br /><hr /><p>Generates unsigned verifiable credential token in JWT format. Client is expected to sign it with a private key.</p><hr /><p>An example of how credential signing in Javascript:</p><pre><code>import { generateKeyPairFromSeed } from \'@stablelib/ed25519\'; <br />import { EdDSASigner, hexToBytes } from \'did-jwt\'; <br /><br />const key = generateKeyPairFromSeed(hexToBytes(SECRET_HEX)); <br />const signerFn = EdDSASigner(key.secretKey); <br /><br />const signature = await signerFn(unsignedJwt); <br />const vcJwt = [unsignedJwt, signature].join(\'.\');</code></pre><hr /><br /><h4>Issuer property caveat</h4><p>We use <b>openapi-generator</b> to generate Typescript SDK for the given API swagger definition. However, <b>openapi-generator</b> does not support <b>oneOf</b> configuration properly and generates an invalid Typescript SDK. To avoid the problem, swagger defines <b>issuer</b> property only as string for the moment. While in fact, endpoint accepts issuer as an object in format of <code>{id: string; name: string;}</code> as well.</p><br /><h4>Type property caveat</h4><p> <code>Type</code> is required for <code>vc+sd-jwt</code> format and must be a string <br /> however, endpoint accepts <code>Type</code> as an Array of string for <code>JWT VC</code> in format of <code>[\"VerifiableCredential\", \"AlumniCredential\"]</code> as well. <br /></p>
|
|
308
308
|
* Generate credential based on type and claims provided
|
|
309
309
|
*/
|
|
310
310
|
credentialsGeneratePostRaw(requestParameters, initOverrides) {
|
|
@@ -342,7 +342,7 @@ export class VerifiableCredentialsApi extends runtime.BaseAPI {
|
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
344
|
/**
|
|
345
|
-
* <h4>Requires the following security rights:</h4><ul><li><code>vc:org:manage</code></li></ul><br /><hr /><p>Generates unsigned verifiable credential token in JWT format. Client is expected to sign it with a private key.</p><hr /><p>An example of how credential signing in Javascript:</p><pre><code>import { generateKeyPairFromSeed } from \'@stablelib/ed25519\'; <br />import { EdDSASigner, hexToBytes } from \'did-jwt\'; <br /><br />const key = generateKeyPairFromSeed(hexToBytes(SECRET_HEX)); <br />const signerFn = EdDSASigner(key.secretKey); <br /><br />const signature = await signerFn(unsignedJwt); <br />const vcJwt = [unsignedJwt, signature].join(\'.\');</code></pre><hr /><br /><h4>Issuer property caveat</h4><p>We use <b>openapi-generator</b> to generate Typescript SDK for the given API swagger definition. However, <b>openapi-generator</b> does not support <b>oneOf</b> configuration properly and generates an invalid Typescript SDK. To avoid the problem, swagger defines <b>issuer</b> property only as string for the moment. While in fact, endpoint accepts issuer as an object in format of <code>{id: string; name: string;}</code> as well.</p>
|
|
345
|
+
* <h4>Requires the following security rights:</h4><ul><li><code>vc:org:manage</code></li></ul><br /><hr /><p>Generates unsigned verifiable credential token in JWT format. Client is expected to sign it with a private key.</p><hr /><p>An example of how credential signing in Javascript:</p><pre><code>import { generateKeyPairFromSeed } from \'@stablelib/ed25519\'; <br />import { EdDSASigner, hexToBytes } from \'did-jwt\'; <br /><br />const key = generateKeyPairFromSeed(hexToBytes(SECRET_HEX)); <br />const signerFn = EdDSASigner(key.secretKey); <br /><br />const signature = await signerFn(unsignedJwt); <br />const vcJwt = [unsignedJwt, signature].join(\'.\');</code></pre><hr /><br /><h4>Issuer property caveat</h4><p>We use <b>openapi-generator</b> to generate Typescript SDK for the given API swagger definition. However, <b>openapi-generator</b> does not support <b>oneOf</b> configuration properly and generates an invalid Typescript SDK. To avoid the problem, swagger defines <b>issuer</b> property only as string for the moment. While in fact, endpoint accepts issuer as an object in format of <code>{id: string; name: string;}</code> as well.</p><br /><h4>Type property caveat</h4><p> <code>Type</code> is required for <code>vc+sd-jwt</code> format and must be a string <br /> however, endpoint accepts <code>Type</code> as an Array of string for <code>JWT VC</code> in format of <code>[\"VerifiableCredential\", \"AlumniCredential\"]</code> as well. <br /></p>
|
|
346
346
|
* Generate credential based on type and claims provided
|
|
347
347
|
*/
|
|
348
348
|
credentialsGeneratePost(meecoOrganisationID, vCGenerateCredentialPayloadDto, accept, initOverrides) {
|
|
@@ -11,26 +11,28 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { exists } from '../runtime';
|
|
15
|
+
import { VCCnfDtoFromJSON, VCCnfDtoToJSON, } from './VCCnfDto';
|
|
14
16
|
/**
|
|
15
|
-
* Check if a given object implements the
|
|
17
|
+
* Check if a given object implements the VCClaimsDto interface.
|
|
16
18
|
*/
|
|
17
|
-
export function
|
|
19
|
+
export function instanceOfVCClaimsDto(value) {
|
|
18
20
|
let isInstance = true;
|
|
19
|
-
isInstance = isInstance && "jwk" in value;
|
|
20
21
|
return isInstance;
|
|
21
22
|
}
|
|
22
|
-
export function
|
|
23
|
-
return
|
|
23
|
+
export function VCClaimsDtoFromJSON(json) {
|
|
24
|
+
return VCClaimsDtoFromJSONTyped(json, false);
|
|
24
25
|
}
|
|
25
|
-
export function
|
|
26
|
+
export function VCClaimsDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
27
|
if ((json === undefined) || (json === null)) {
|
|
27
28
|
return json;
|
|
28
29
|
}
|
|
29
30
|
return {
|
|
30
|
-
'
|
|
31
|
+
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
32
|
+
'cnf': !exists(json, 'cnf') ? undefined : VCCnfDtoFromJSON(json['cnf']),
|
|
31
33
|
};
|
|
32
34
|
}
|
|
33
|
-
export function
|
|
35
|
+
export function VCClaimsDtoToJSON(value) {
|
|
34
36
|
if (value === undefined) {
|
|
35
37
|
return undefined;
|
|
36
38
|
}
|
|
@@ -38,6 +40,7 @@ export function VCGenerateCredentialDtoCnfToJSON(value) {
|
|
|
38
40
|
return null;
|
|
39
41
|
}
|
|
40
42
|
return {
|
|
41
|
-
'
|
|
43
|
+
'id': value.id,
|
|
44
|
+
'cnf': VCCnfDtoToJSON(value.cnf),
|
|
42
45
|
};
|
|
43
46
|
}
|
|
@@ -21,7 +21,8 @@ export const VCCredentialVerificationResultResponseDtoChecksEnum = {
|
|
|
21
21
|
Expiration: 'expiration',
|
|
22
22
|
Nonce: 'nonce',
|
|
23
23
|
Schema: 'schema',
|
|
24
|
-
RevocationStatus: 'revocation_status'
|
|
24
|
+
RevocationStatus: 'revocation_status',
|
|
25
|
+
Constraints: 'constraints'
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
27
28
|
* Check if a given object implements the VCCredentialVerificationResultResponseDto interface.
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { exists } from '../runtime';
|
|
15
|
+
import { VCFieldsDtoFilterFromJSON, VCFieldsDtoFilterToJSON, } from './VCFieldsDtoFilter';
|
|
15
16
|
/**
|
|
16
17
|
* Check if a given object implements the VCFieldsDto interface.
|
|
17
18
|
*/
|
|
@@ -30,7 +31,7 @@ export function VCFieldsDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
30
31
|
return {
|
|
31
32
|
'path': json['path'],
|
|
32
33
|
'purpose': !exists(json, 'purpose') ? undefined : json['purpose'],
|
|
33
|
-
'filter': !exists(json, 'filter') ? undefined : json['filter'],
|
|
34
|
+
'filter': !exists(json, 'filter') ? undefined : VCFieldsDtoFilterFromJSON(json['filter']),
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
37
|
export function VCFieldsDtoToJSON(value) {
|
|
@@ -43,6 +44,6 @@ export function VCFieldsDtoToJSON(value) {
|
|
|
43
44
|
return {
|
|
44
45
|
'path': value.path,
|
|
45
46
|
'purpose': value.purpose,
|
|
46
|
-
'filter': value.filter,
|
|
47
|
+
'filter': VCFieldsDtoFilterToJSON(value.filter),
|
|
47
48
|
};
|
|
48
49
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* SVX API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.3.1
|
|
8
|
+
*
|
|
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
|
+
import { exists } from '../runtime';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the VCFieldsDtoFilter interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfVCFieldsDtoFilter(value) {
|
|
19
|
+
let isInstance = true;
|
|
20
|
+
isInstance = isInstance && "type" in value;
|
|
21
|
+
return isInstance;
|
|
22
|
+
}
|
|
23
|
+
export function VCFieldsDtoFilterFromJSON(json) {
|
|
24
|
+
return VCFieldsDtoFilterFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function VCFieldsDtoFilterFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if ((json === undefined) || (json === null)) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'type': json['type'],
|
|
32
|
+
'_const': !exists(json, 'const') ? undefined : json['const'],
|
|
33
|
+
'pattern': !exists(json, 'pattern') ? undefined : json['pattern'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function VCFieldsDtoFilterToJSON(value) {
|
|
37
|
+
if (value === undefined) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
if (value === null) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'type': value.type,
|
|
45
|
+
'const': value._const,
|
|
46
|
+
'pattern': value.pattern,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* SVX API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.3.1
|
|
8
|
+
*
|
|
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
|
+
import { exists } from '../runtime';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the VCFilterDto interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfVCFilterDto(value) {
|
|
19
|
+
let isInstance = true;
|
|
20
|
+
isInstance = isInstance && "type" in value;
|
|
21
|
+
return isInstance;
|
|
22
|
+
}
|
|
23
|
+
export function VCFilterDtoFromJSON(json) {
|
|
24
|
+
return VCFilterDtoFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function VCFilterDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if ((json === undefined) || (json === null)) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'type': json['type'],
|
|
32
|
+
'_const': !exists(json, 'const') ? undefined : json['const'],
|
|
33
|
+
'pattern': !exists(json, 'pattern') ? undefined : json['pattern'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function VCFilterDtoToJSON(value) {
|
|
37
|
+
if (value === undefined) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
if (value === null) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'type': value.type,
|
|
45
|
+
'const': value._const,
|
|
46
|
+
'pattern': value.pattern,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { exists } from '../runtime';
|
|
15
|
-
import {
|
|
15
|
+
import { VCGenerateCredentialDtoClaimsFromJSON, VCGenerateCredentialDtoClaimsToJSON, } from './VCGenerateCredentialDtoClaims';
|
|
16
16
|
/**
|
|
17
17
|
* Check if a given object implements the VCGenerateCredentialDto interface.
|
|
18
18
|
*/
|
|
@@ -33,10 +33,10 @@ export function VCGenerateCredentialDtoFromJSONTyped(json, ignoreDiscriminator)
|
|
|
33
33
|
return {
|
|
34
34
|
'credential_type_id': json['credential_type_id'],
|
|
35
35
|
'issuer': json['issuer'],
|
|
36
|
-
'claims': json['claims'],
|
|
36
|
+
'claims': VCGenerateCredentialDtoClaimsFromJSON(json['claims']),
|
|
37
37
|
'revocable': !exists(json, 'revocable') ? undefined : json['revocable'],
|
|
38
38
|
'expires_at': !exists(json, 'expires_at') ? undefined : (new Date(json['expires_at'])),
|
|
39
|
-
'
|
|
39
|
+
'type': !exists(json, 'type') ? undefined : json['type'],
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
export function VCGenerateCredentialDtoToJSON(value) {
|
|
@@ -49,9 +49,9 @@ export function VCGenerateCredentialDtoToJSON(value) {
|
|
|
49
49
|
return {
|
|
50
50
|
'credential_type_id': value.credential_type_id,
|
|
51
51
|
'issuer': value.issuer,
|
|
52
|
-
'claims': value.claims,
|
|
52
|
+
'claims': VCGenerateCredentialDtoClaimsToJSON(value.claims),
|
|
53
53
|
'revocable': value.revocable,
|
|
54
54
|
'expires_at': value.expires_at === undefined ? undefined : (value.expires_at.toISOString()),
|
|
55
|
-
'
|
|
55
|
+
'type': value.type,
|
|
56
56
|
};
|
|
57
57
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* SVX API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.3.1
|
|
8
|
+
*
|
|
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
|
+
import { exists } from '../runtime';
|
|
15
|
+
import { VCCnfDtoFromJSON, VCCnfDtoToJSON, } from './VCCnfDto';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the VCGenerateCredentialDtoClaims interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfVCGenerateCredentialDtoClaims(value) {
|
|
20
|
+
let isInstance = true;
|
|
21
|
+
return isInstance;
|
|
22
|
+
}
|
|
23
|
+
export function VCGenerateCredentialDtoClaimsFromJSON(json) {
|
|
24
|
+
return VCGenerateCredentialDtoClaimsFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function VCGenerateCredentialDtoClaimsFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if ((json === undefined) || (json === null)) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return Object.assign(Object.assign({}, json), { 'id': !exists(json, 'id') ? undefined : json['id'], 'cnf': !exists(json, 'cnf') ? undefined : VCCnfDtoFromJSON(json['cnf']) });
|
|
31
|
+
}
|
|
32
|
+
export function VCGenerateCredentialDtoClaimsToJSON(value) {
|
|
33
|
+
if (value === undefined) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
if (value === null) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return Object.assign(Object.assign({}, value), { 'id': value.id, 'cnf': VCCnfDtoToJSON(value.cnf) });
|
|
40
|
+
}
|
|
@@ -21,7 +21,8 @@ export const VCIdTokenVerificationResultResponseDtoChecksEnum = {
|
|
|
21
21
|
Expiration: 'expiration',
|
|
22
22
|
Nonce: 'nonce',
|
|
23
23
|
Schema: 'schema',
|
|
24
|
-
RevocationStatus: 'revocation_status'
|
|
24
|
+
RevocationStatus: 'revocation_status',
|
|
25
|
+
Constraints: 'constraints'
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
27
28
|
* Check if a given object implements the VCIdTokenVerificationResultResponseDto interface.
|
|
@@ -21,7 +21,8 @@ export const VCOldPresentationRequestResponseVerificationResultResponseDtoChecks
|
|
|
21
21
|
Expiration: 'expiration',
|
|
22
22
|
Nonce: 'nonce',
|
|
23
23
|
Schema: 'schema',
|
|
24
|
-
RevocationStatus: 'revocation_status'
|
|
24
|
+
RevocationStatus: 'revocation_status',
|
|
25
|
+
Constraints: 'constraints'
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
27
28
|
* Check if a given object implements the VCOldPresentationRequestResponseVerificationResultResponseDto interface.
|
|
@@ -19,7 +19,8 @@ import { VCRequestVerificationOptionsDtoFromJSON, VCRequestVerificationOptionsDt
|
|
|
19
19
|
* @export
|
|
20
20
|
*/
|
|
21
21
|
export const VCPresentationRequestResponseVerificationOptionsDtoChecksEnum = {
|
|
22
|
-
Format: 'format'
|
|
22
|
+
Format: 'format',
|
|
23
|
+
Constraints: 'constraints'
|
|
23
24
|
};
|
|
24
25
|
/**
|
|
25
26
|
* Check if a given object implements the VCPresentationRequestResponseVerificationOptionsDto interface.
|
|
@@ -24,7 +24,8 @@ export const VCPresentationRequestResponseVerificationResultResponseDtoChecksEnu
|
|
|
24
24
|
Expiration: 'expiration',
|
|
25
25
|
Nonce: 'nonce',
|
|
26
26
|
Schema: 'schema',
|
|
27
|
-
RevocationStatus: 'revocation_status'
|
|
27
|
+
RevocationStatus: 'revocation_status',
|
|
28
|
+
Constraints: 'constraints'
|
|
28
29
|
};
|
|
29
30
|
/**
|
|
30
31
|
* Check if a given object implements the VCPresentationRequestResponseVerificationResultResponseDto interface.
|
|
@@ -24,7 +24,8 @@ export const VCPresentationRequestUpdateVerificationResultRequestDtoChecksEnum =
|
|
|
24
24
|
Expiration: 'expiration',
|
|
25
25
|
Nonce: 'nonce',
|
|
26
26
|
Schema: 'schema',
|
|
27
|
-
RevocationStatus: 'revocation_status'
|
|
27
|
+
RevocationStatus: 'revocation_status',
|
|
28
|
+
Constraints: 'constraints'
|
|
28
29
|
};
|
|
29
30
|
/**
|
|
30
31
|
* Check if a given object implements the VCPresentationRequestUpdateVerificationResultRequestDto interface.
|
|
@@ -21,7 +21,8 @@ export const VCPresentationRequestVerificationResultResponseDtoChecksEnum = {
|
|
|
21
21
|
Expiration: 'expiration',
|
|
22
22
|
Nonce: 'nonce',
|
|
23
23
|
Schema: 'schema',
|
|
24
|
-
RevocationStatus: 'revocation_status'
|
|
24
|
+
RevocationStatus: 'revocation_status',
|
|
25
|
+
Constraints: 'constraints'
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
27
28
|
* Check if a given object implements the VCPresentationRequestVerificationResultResponseDto interface.
|
|
@@ -19,7 +19,8 @@ export const VCPresentationVerificationOptionsDtoChecksEnum = {
|
|
|
19
19
|
Format: 'format',
|
|
20
20
|
Signature: 'signature',
|
|
21
21
|
Expiration: 'expiration',
|
|
22
|
-
Nonce: 'nonce'
|
|
22
|
+
Nonce: 'nonce',
|
|
23
|
+
Constraints: 'constraints'
|
|
23
24
|
};
|
|
24
25
|
/**
|
|
25
26
|
* Check if a given object implements the VCPresentationVerificationOptionsDto interface.
|
|
@@ -22,7 +22,8 @@ export const VCPresentationVerificationResultResponseDtoChecksEnum = {
|
|
|
22
22
|
Expiration: 'expiration',
|
|
23
23
|
Nonce: 'nonce',
|
|
24
24
|
Schema: 'schema',
|
|
25
|
-
RevocationStatus: 'revocation_status'
|
|
25
|
+
RevocationStatus: 'revocation_status',
|
|
26
|
+
Constraints: 'constraints'
|
|
26
27
|
};
|
|
27
28
|
/**
|
|
28
29
|
* Check if a given object implements the VCPresentationVerificationResultResponseDto interface.
|
package/lib/esm/models/index.js
CHANGED
|
@@ -248,6 +248,7 @@ export * from './ShreIntentListResponse';
|
|
|
248
248
|
export * from './UpdateDelegationsRequest';
|
|
249
249
|
export * from './VCApp';
|
|
250
250
|
export * from './VCAppSignal';
|
|
251
|
+
export * from './VCClaimsDto';
|
|
251
252
|
export * from './VCCnfDto';
|
|
252
253
|
export * from './VCComponent';
|
|
253
254
|
export * from './VCConstraintsDto';
|
|
@@ -280,9 +281,11 @@ export * from './VCDatabase';
|
|
|
280
281
|
export * from './VCErrorResponseDto';
|
|
281
282
|
export * from './VCErrorsResponseDto';
|
|
282
283
|
export * from './VCFieldsDto';
|
|
284
|
+
export * from './VCFieldsDtoFilter';
|
|
285
|
+
export * from './VCFilterDto';
|
|
283
286
|
export * from './VCFormatDto';
|
|
284
287
|
export * from './VCGenerateCredentialDto';
|
|
285
|
-
export * from './
|
|
288
|
+
export * from './VCGenerateCredentialDtoClaims';
|
|
286
289
|
export * from './VCGenerateCredentialPayloadDto';
|
|
287
290
|
export * from './VCGeneratePresentationDto';
|
|
288
291
|
export * from './VCGeneratePresentationPayloadDto';
|
|
@@ -183,22 +183,22 @@ export declare class SharesApi extends runtime.BaseAPI {
|
|
|
183
183
|
*/
|
|
184
184
|
itemsIdSharesGet(id: string, meecoDelegationId?: string, meecoOrganisationId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetItemSharesResponse>;
|
|
185
185
|
/**
|
|
186
|
-
* Share your item with connected users. Each share can be a share of all slots of the item, in that case `slot_id` is `NULL`, or it can be a share of just one slot. In this case `slot_id` references one of the slots of the item. There are 3 users involved in each share: * owner - the owner of the shared item * sender - the user who shares data. Can be the owner or one of the recipients * recipient - the user who recieves the shared data. Whether a non-owner may on-share a shared slot is defined in field `onsharing_permitted`. Only the owner of the item can set `onsharing_permitted` to `true`. If `onsharing_permitted` is `false`, the recipient may on-share the item, but when that recipient creates an on-share, `onsharing_permitted` in that on-share is forced to be `false`. In other words, the depth of on-sharing in limited to 3: OWNER ==> RECIPIENT AND SENDER ==> RECIPIENT Some shares require that the recipient accepts the terms of the share. Until the terms are not accepted the share DEK is hidden. Data in slots is initially encrypted with the DEK in field `encrypted_dek`. The DEK in `encrypted_dek` is encrypted with the public key of the share recipient. When processing a share the client application is expected to decrypt the slot data and re-encrypt with the private DEK. A public key of the recipient is needed to encrypt the share DEK. Updating all shares of the same item is performed by the owner in one go. In a situation when a share has been created by a recipient, not the owner, and there is no connection between the owner and the recipient, the owner has no access to a public key of the recipient. In order to address this problem when a share is created we also add fields `public_key` and `keypair_external_id` from the connection record between the recipient and the sender. `keypair_external_id` identifies the keypair that the public key belongs to. When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `
|
|
186
|
+
* Share your item with connected users. Each share can be a share of all slots of the item, in that case `slot_id` is `NULL`, or it can be a share of just one slot. In this case `slot_id` references one of the slots of the item. There are 3 users involved in each share: * owner - the owner of the shared item * sender - the user who shares data. Can be the owner or one of the recipients * recipient - the user who recieves the shared data. Whether a non-owner may on-share a shared slot is defined in field `onsharing_permitted`. Only the owner of the item can set `onsharing_permitted` to `true`. If `onsharing_permitted` is `false`, the recipient may on-share the item, but when that recipient creates an on-share, `onsharing_permitted` in that on-share is forced to be `false`. In other words, the depth of on-sharing in limited to 3: OWNER ==> RECIPIENT AND SENDER ==> RECIPIENT Some shares require that the recipient accepts the terms of the share. Until the terms are not accepted the share DEK is hidden. Data in slots is initially encrypted with the DEK in field `encrypted_dek`. The DEK in `encrypted_dek` is encrypted with the public key of the share recipient. When processing a share the client application is expected to decrypt the slot data and re-encrypt with the private DEK. A public key of the recipient is needed to encrypt the share DEK. Updating all shares of the same item is performed by the owner in one go. In a situation when a share has been created by a recipient, not the owner, and there is no connection between the owner and the recipient, the owner has no access to a public key of the recipient. In order to address this problem when a share is created we also add fields `public_key` and `keypair_external_id` from the connection record between the recipient and the sender. `keypair_external_id` identifies the keypair that the public key belongs to. When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `value_verification_hash` when creating or updating the share. When other senders create a share, `value_verification_hash` must be `NULL`. `encrypted_value_verification_key` may and should be sent by every sender, owner or not, because `encrypted_value_verification_key` must be re-encrypted with the share DEK for each share. If the sender replaces `encrypted_value_verification_key` and/or the slot value, this will break the client-side verification against `encrypted_value_verification_key`. Field `encrypted_value` may be `NULL`. If `encrypted_value` is `NULL`, then `encrypted_value_verification_key` and `value_verification_hash` may also be `NULL`. If `encrypted_value` is present, then `encrypted_value_verification_key` and `value_verification_hash` are mandatory.
|
|
187
187
|
* Share your item with connected users
|
|
188
188
|
*/
|
|
189
189
|
itemsIdSharesPostRaw(requestParameters: ItemsIdSharesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VaultSharesCreateResponse>>;
|
|
190
190
|
/**
|
|
191
|
-
* Share your item with connected users. Each share can be a share of all slots of the item, in that case `slot_id` is `NULL`, or it can be a share of just one slot. In this case `slot_id` references one of the slots of the item. There are 3 users involved in each share: * owner - the owner of the shared item * sender - the user who shares data. Can be the owner or one of the recipients * recipient - the user who recieves the shared data. Whether a non-owner may on-share a shared slot is defined in field `onsharing_permitted`. Only the owner of the item can set `onsharing_permitted` to `true`. If `onsharing_permitted` is `false`, the recipient may on-share the item, but when that recipient creates an on-share, `onsharing_permitted` in that on-share is forced to be `false`. In other words, the depth of on-sharing in limited to 3: OWNER ==> RECIPIENT AND SENDER ==> RECIPIENT Some shares require that the recipient accepts the terms of the share. Until the terms are not accepted the share DEK is hidden. Data in slots is initially encrypted with the DEK in field `encrypted_dek`. The DEK in `encrypted_dek` is encrypted with the public key of the share recipient. When processing a share the client application is expected to decrypt the slot data and re-encrypt with the private DEK. A public key of the recipient is needed to encrypt the share DEK. Updating all shares of the same item is performed by the owner in one go. In a situation when a share has been created by a recipient, not the owner, and there is no connection between the owner and the recipient, the owner has no access to a public key of the recipient. In order to address this problem when a share is created we also add fields `public_key` and `keypair_external_id` from the connection record between the recipient and the sender. `keypair_external_id` identifies the keypair that the public key belongs to. When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `
|
|
191
|
+
* Share your item with connected users. Each share can be a share of all slots of the item, in that case `slot_id` is `NULL`, or it can be a share of just one slot. In this case `slot_id` references one of the slots of the item. There are 3 users involved in each share: * owner - the owner of the shared item * sender - the user who shares data. Can be the owner or one of the recipients * recipient - the user who recieves the shared data. Whether a non-owner may on-share a shared slot is defined in field `onsharing_permitted`. Only the owner of the item can set `onsharing_permitted` to `true`. If `onsharing_permitted` is `false`, the recipient may on-share the item, but when that recipient creates an on-share, `onsharing_permitted` in that on-share is forced to be `false`. In other words, the depth of on-sharing in limited to 3: OWNER ==> RECIPIENT AND SENDER ==> RECIPIENT Some shares require that the recipient accepts the terms of the share. Until the terms are not accepted the share DEK is hidden. Data in slots is initially encrypted with the DEK in field `encrypted_dek`. The DEK in `encrypted_dek` is encrypted with the public key of the share recipient. When processing a share the client application is expected to decrypt the slot data and re-encrypt with the private DEK. A public key of the recipient is needed to encrypt the share DEK. Updating all shares of the same item is performed by the owner in one go. In a situation when a share has been created by a recipient, not the owner, and there is no connection between the owner and the recipient, the owner has no access to a public key of the recipient. In order to address this problem when a share is created we also add fields `public_key` and `keypair_external_id` from the connection record between the recipient and the sender. `keypair_external_id` identifies the keypair that the public key belongs to. When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `value_verification_hash` when creating or updating the share. When other senders create a share, `value_verification_hash` must be `NULL`. `encrypted_value_verification_key` may and should be sent by every sender, owner or not, because `encrypted_value_verification_key` must be re-encrypted with the share DEK for each share. If the sender replaces `encrypted_value_verification_key` and/or the slot value, this will break the client-side verification against `encrypted_value_verification_key`. Field `encrypted_value` may be `NULL`. If `encrypted_value` is `NULL`, then `encrypted_value_verification_key` and `value_verification_hash` may also be `NULL`. If `encrypted_value` is present, then `encrypted_value_verification_key` and `value_verification_hash` are mandatory.
|
|
192
192
|
* Share your item with connected users
|
|
193
193
|
*/
|
|
194
194
|
itemsIdSharesPost(id: string, meecoDelegationId?: string, meecoOrganisationId?: string, postItemSharesRequest?: PostItemSharesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VaultSharesCreateResponse>;
|
|
195
195
|
/**
|
|
196
|
-
* Updating all shares of one item is done by the item owner in one go. Before calling this endpoint the client application is expected to retrieve the list of shares IDs and public keys via `GET /items/{id}/shares`. The POST body of this endpoint contains * a list of share DEKs encrypted with public keys of share recipients * a list of slot values for each slot and each share, each encrypted with the DEK of the share that the slot belongs to * Optionally: a list of completed `ClientTask` tasks When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `
|
|
196
|
+
* Updating all shares of one item is done by the item owner in one go. Before calling this endpoint the client application is expected to retrieve the list of shares IDs and public keys via `GET /items/{id}/shares`. The POST body of this endpoint contains * a list of share DEKs encrypted with public keys of share recipients * a list of slot values for each slot and each share, each encrypted with the DEK of the share that the slot belongs to * Optionally: a list of completed `ClientTask` tasks When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `value_verification_hash` when creating or updating the share. When other senders create a share, `value_verification_hash` must be `NULL`. `encrypted_value_verification_key` may and should be sent by every sender, owner or not, because `encrypted_value_verification_key` must be re-encrypted with the share DEK for each share. If the sender replaces `encrypted_value_verification_key` and/or the slot value, this will break the client-side verification against `encrypted_value_verification_key`. Field `encrypted_value` may be `NULL`. If `encrypted_value` is `NULL`, then `encrypted_value_verification_key` and `value_verification_hash` may also be `NULL`. If `encrypted_value` is present, then `encrypted_value_verification_key` and `value_verification_hash` are mandatory.
|
|
197
197
|
* Update all shares of one item
|
|
198
198
|
*/
|
|
199
199
|
itemsIdSharesPutRaw(requestParameters: ItemsIdSharesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemSharesUpdateResponse>>;
|
|
200
200
|
/**
|
|
201
|
-
* Updating all shares of one item is done by the item owner in one go. Before calling this endpoint the client application is expected to retrieve the list of shares IDs and public keys via `GET /items/{id}/shares`. The POST body of this endpoint contains * a list of share DEKs encrypted with public keys of share recipients * a list of slot values for each slot and each share, each encrypted with the DEK of the share that the slot belongs to * Optionally: a list of completed `ClientTask` tasks When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `
|
|
201
|
+
* Updating all shares of one item is done by the item owner in one go. Before calling this endpoint the client application is expected to retrieve the list of shares IDs and public keys via `GET /items/{id}/shares`. The POST body of this endpoint contains * a list of share DEKs encrypted with public keys of share recipients * a list of slot values for each slot and each share, each encrypted with the DEK of the share that the slot belongs to * Optionally: a list of completed `ClientTask` tasks When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `value_verification_hash` when creating or updating the share. When other senders create a share, `value_verification_hash` must be `NULL`. `encrypted_value_verification_key` may and should be sent by every sender, owner or not, because `encrypted_value_verification_key` must be re-encrypted with the share DEK for each share. If the sender replaces `encrypted_value_verification_key` and/or the slot value, this will break the client-side verification against `encrypted_value_verification_key`. Field `encrypted_value` may be `NULL`. If `encrypted_value` is `NULL`, then `encrypted_value_verification_key` and `value_verification_hash` may also be `NULL`. If `encrypted_value` is present, then `encrypted_value_verification_key` and `value_verification_hash` are mandatory.
|
|
202
202
|
* Update all shares of one item
|
|
203
203
|
*/
|
|
204
204
|
itemsIdSharesPut(id: string, meecoDelegationId?: string, meecoOrganisationId?: string, putItemSharesRequest?: PutItemSharesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemSharesUpdateResponse>;
|
|
@@ -162,12 +162,12 @@ export declare class VerifiableCredentialsApi extends runtime.BaseAPI {
|
|
|
162
162
|
*/
|
|
163
163
|
credentialTypesPost(meecoOrganisationID: string, vCCreateCredentialTypePayloadDto: VCCreateCredentialTypePayloadDto, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VCCredentialTypeResponseDto>;
|
|
164
164
|
/**
|
|
165
|
-
* <h4>Requires the following security rights:</h4><ul><li><code>vc:org:manage</code></li></ul><br /><hr /><p>Generates unsigned verifiable credential token in JWT format. Client is expected to sign it with a private key.</p><hr /><p>An example of how credential signing in Javascript:</p><pre><code>import { generateKeyPairFromSeed } from \'@stablelib/ed25519\'; <br />import { EdDSASigner, hexToBytes } from \'did-jwt\'; <br /><br />const key = generateKeyPairFromSeed(hexToBytes(SECRET_HEX)); <br />const signerFn = EdDSASigner(key.secretKey); <br /><br />const signature = await signerFn(unsignedJwt); <br />const vcJwt = [unsignedJwt, signature].join(\'.\');</code></pre><hr /><br /><h4>Issuer property caveat</h4><p>We use <b>openapi-generator</b> to generate Typescript SDK for the given API swagger definition. However, <b>openapi-generator</b> does not support <b>oneOf</b> configuration properly and generates an invalid Typescript SDK. To avoid the problem, swagger defines <b>issuer</b> property only as string for the moment. While in fact, endpoint accepts issuer as an object in format of <code>{id: string; name: string;}</code> as well.</p>
|
|
165
|
+
* <h4>Requires the following security rights:</h4><ul><li><code>vc:org:manage</code></li></ul><br /><hr /><p>Generates unsigned verifiable credential token in JWT format. Client is expected to sign it with a private key.</p><hr /><p>An example of how credential signing in Javascript:</p><pre><code>import { generateKeyPairFromSeed } from \'@stablelib/ed25519\'; <br />import { EdDSASigner, hexToBytes } from \'did-jwt\'; <br /><br />const key = generateKeyPairFromSeed(hexToBytes(SECRET_HEX)); <br />const signerFn = EdDSASigner(key.secretKey); <br /><br />const signature = await signerFn(unsignedJwt); <br />const vcJwt = [unsignedJwt, signature].join(\'.\');</code></pre><hr /><br /><h4>Issuer property caveat</h4><p>We use <b>openapi-generator</b> to generate Typescript SDK for the given API swagger definition. However, <b>openapi-generator</b> does not support <b>oneOf</b> configuration properly and generates an invalid Typescript SDK. To avoid the problem, swagger defines <b>issuer</b> property only as string for the moment. While in fact, endpoint accepts issuer as an object in format of <code>{id: string; name: string;}</code> as well.</p><br /><h4>Type property caveat</h4><p> <code>Type</code> is required for <code>vc+sd-jwt</code> format and must be a string <br /> however, endpoint accepts <code>Type</code> as an Array of string for <code>JWT VC</code> in format of <code>[\"VerifiableCredential\", \"AlumniCredential\"]</code> as well. <br /></p>
|
|
166
166
|
* Generate credential based on type and claims provided
|
|
167
167
|
*/
|
|
168
168
|
credentialsGeneratePostRaw(requestParameters: CredentialsGeneratePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VCUnsignedCredentialResponseDto>>;
|
|
169
169
|
/**
|
|
170
|
-
* <h4>Requires the following security rights:</h4><ul><li><code>vc:org:manage</code></li></ul><br /><hr /><p>Generates unsigned verifiable credential token in JWT format. Client is expected to sign it with a private key.</p><hr /><p>An example of how credential signing in Javascript:</p><pre><code>import { generateKeyPairFromSeed } from \'@stablelib/ed25519\'; <br />import { EdDSASigner, hexToBytes } from \'did-jwt\'; <br /><br />const key = generateKeyPairFromSeed(hexToBytes(SECRET_HEX)); <br />const signerFn = EdDSASigner(key.secretKey); <br /><br />const signature = await signerFn(unsignedJwt); <br />const vcJwt = [unsignedJwt, signature].join(\'.\');</code></pre><hr /><br /><h4>Issuer property caveat</h4><p>We use <b>openapi-generator</b> to generate Typescript SDK for the given API swagger definition. However, <b>openapi-generator</b> does not support <b>oneOf</b> configuration properly and generates an invalid Typescript SDK. To avoid the problem, swagger defines <b>issuer</b> property only as string for the moment. While in fact, endpoint accepts issuer as an object in format of <code>{id: string; name: string;}</code> as well.</p>
|
|
170
|
+
* <h4>Requires the following security rights:</h4><ul><li><code>vc:org:manage</code></li></ul><br /><hr /><p>Generates unsigned verifiable credential token in JWT format. Client is expected to sign it with a private key.</p><hr /><p>An example of how credential signing in Javascript:</p><pre><code>import { generateKeyPairFromSeed } from \'@stablelib/ed25519\'; <br />import { EdDSASigner, hexToBytes } from \'did-jwt\'; <br /><br />const key = generateKeyPairFromSeed(hexToBytes(SECRET_HEX)); <br />const signerFn = EdDSASigner(key.secretKey); <br /><br />const signature = await signerFn(unsignedJwt); <br />const vcJwt = [unsignedJwt, signature].join(\'.\');</code></pre><hr /><br /><h4>Issuer property caveat</h4><p>We use <b>openapi-generator</b> to generate Typescript SDK for the given API swagger definition. However, <b>openapi-generator</b> does not support <b>oneOf</b> configuration properly and generates an invalid Typescript SDK. To avoid the problem, swagger defines <b>issuer</b> property only as string for the moment. While in fact, endpoint accepts issuer as an object in format of <code>{id: string; name: string;}</code> as well.</p><br /><h4>Type property caveat</h4><p> <code>Type</code> is required for <code>vc+sd-jwt</code> format and must be a string <br /> however, endpoint accepts <code>Type</code> as an Array of string for <code>JWT VC</code> in format of <code>[\"VerifiableCredential\", \"AlumniCredential\"]</code> as well. <br /></p>
|
|
171
171
|
* Generate credential based on type and claims provided
|
|
172
172
|
*/
|
|
173
173
|
credentialsGeneratePost(meecoOrganisationID: string, vCGenerateCredentialPayloadDto: VCGenerateCredentialPayloadDto, accept?: CredentialsGeneratePostAcceptEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VCUnsignedCredentialResponseDto>;
|