Skip to main content

DataOwnerApi

@icure/medical-device-sdk / DataOwnerApi

SDK API: DataOwnerApi

Table of contents

Methods

Methods

getDataOwnerIdOf

getDataOwnerIdOf(user): string

Returns the data owner id of the provided user

Parameters

NameTypeDescription
userUserUser for which we want to know the data owner id

Returns

string

Defined in

src/apis/DataOwnerApi.ts:8


giveAccessBackTo

giveAccessBackTo(ownerId, ownerNewPublicKey): Promise<boolean>

Parameters

NameType
ownerIdstring
ownerNewPublicKeystring

Returns

Promise<boolean>

Defined in

src/apis/DataOwnerApi.ts:26


initCryptoFor

initCryptoFor(user, userKeyPair?): Promise<{ privateKey: string ; publicKey: string }[]>

Creates an RSA KeyPair for the provided user and updates its related DataOwner with the generated public key. In the case of a Patient DataOwner, this service also creates a Patient Delegation, giving the patient access to its own information.

Parameters

NameTypeDescription
userUserThe User for which we want to create a keyPair
userKeyPair?ObjectKeyPair to use to init the cryptography scheme of a user. If no keyPair is provided, the service will create one
userKeyPair.privateKeystring-
userKeyPair.publicKeystring-

Returns

Promise<{ privateKey: string ; publicKey: string }[]>

The response will contain the RSA keyPair generated for the provided user;

Defined in

src/apis/DataOwnerApi.ts:24