oro-sdk 3.14.0 → 3.17.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Consult, ConsultRequest, ConsultService, DataCreateResponse, DiagnosisService, Document, DocumentType, Grant, GuardService, IdentityResponse, LocalizedData, LockboxManifest, Meta, Metadata, MetadataCategory, PopulatedWorkflowData, Practice, PracticeService, SearchService, TellerService, TokenData, TosAndCpAcceptanceRequest, Uuid, VaultIndex, VaultService, WorkflowData, WorkflowService } from 'oro-sdk-apis';
1
+ import { Consult, ConsultRequest, ConsultService, DataCreateResponse, DiagnosisService, Document, DocumentType, Grant, GuardService, IdentityResponse, LocalizedData, LockboxManifest, Meta, Metadata, MetadataCategory, PopulatedWorkflowData, Practice, PracticeService, RoleBasedScopes, SearchService, TellerService, TokenData, TosAndCpAcceptanceRequest, Uuid, VaultIndex, VaultService, WorkflowData, WorkflowService } from 'oro-sdk-apis';
2
2
  import * as OroToolbox from 'oro-toolbox';
3
3
  import { LocalEncryptedData, RecoveryData, RegisterPatientOutput, UserPreference } from './models';
4
4
  export declare class OroClient {
@@ -98,22 +98,6 @@ export declare class OroClient {
98
98
  recoverySecurityQuestions: string[];
99
99
  recoverySecurityAnswers: string[];
100
100
  }, indexSearch?: boolean): Promise<RegisterPatientOutput>;
101
- /**
102
- * Builds the vault index for the logged user
103
- *
104
- * Steps:
105
- * 1. Retrieves, decrypts and sets the lockbox IndexSnapshot
106
- * 2. Retrieves, decrypts and adds all other index entries starting at the snapshot timestamp
107
- * 3. Updates the IndexSnapshot if changed
108
- * @deprecated
109
- * @returns the latest vault index
110
- */
111
- buildVaultIndex(forceRefresh?: boolean): Promise<void>;
112
- /**
113
- * Setter for the vault index
114
- * @param index
115
- */
116
- setVaultIndex(index: VaultIndex): void;
117
101
  /**
118
102
  * Fetches all grants, and consultations that exist in each lockbox
119
103
  * Then updates the index for the current user with the lockbox consult relationship
@@ -126,11 +110,6 @@ export declare class OroClient {
126
110
  * @param indexOwnerUuid
127
111
  */
128
112
  vaultIndexAdd(entries: VaultIndex, indexOwnerUuid?: Uuid): Promise<void>;
129
- /**
130
- * adds or updates the index snapshot for the logged user
131
- * @param index
132
- */
133
- indexSnapshotAdd(index: VaultIndex): Promise<void>;
134
113
  /**
135
114
  * @name grantLockbox
136
115
  * @description Grants a lockbox by retrieving the shared secret of the lockbox and encrypting it with the grantees public key
@@ -243,7 +222,13 @@ export declare class OroClient {
243
222
  */
244
223
  getGrants(filter?: {
245
224
  consultationId: Uuid;
246
- }, forceRefresh?: boolean): Promise<Grant[]>;
225
+ }): Promise<Grant[]>;
226
+ /**
227
+ * Fetches the role of the account that is logged in
228
+ *
229
+ * @returns the role based scopes defined by the whoami
230
+ */
231
+ getAccountRole(): Promise<RoleBasedScopes[]>;
247
232
  /**
248
233
  * @name getCachedSecretCryptor
249
234
  * @description Retrieves the cached lockbox secret or fetches the secret from vault, then creates the symmetric cryptor and stores it in memory
@@ -358,7 +343,7 @@ export declare class OroClient {
358
343
  * @param practiceUuid the uuid of the practice to look consult into
359
344
  * @returns the list of consults
360
345
  */
361
- getAssignedConsultations(practiceUuid: Uuid, forceRefresh?: boolean): Promise<Consult[]>;
346
+ getAssignedConsultations(practiceUuid: Uuid): Promise<Consult[]>;
362
347
  /**
363
348
  * Gets the past consultations of the patient as well as his relatives if any
364
349
  * @param consultationId any consultation uuid from which we will fetch all the other consultations of the same patient as the owner of this consultation id
@@ -2,6 +2,8 @@ export declare class IncompleteAuthentication extends Error {
2
2
  }
3
3
  export declare class MissingGrant extends Error {
4
4
  }
5
+ export declare class MissingGrantFilter extends Error {
6
+ }
5
7
  export declare class MissingLockbox extends Error {
6
8
  }
7
9
  export declare class MissingLockboxOwner extends Error {