oro-sdk 5.0.1 → 5.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 ORO Health Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
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, RoleBasedScopes, 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, 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 {
@@ -150,9 +150,10 @@ export declare class OroClient {
150
150
  * @param category the category for the attachment data
151
151
  * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
152
152
  * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
153
+ * @param withNotification if the insertion of data requires notification
153
154
  * @returns the data uuid
154
155
  */
155
- createConsultationAttachmentData(lockboxUuid: Uuid, data: File, consultationId: string, documentType: DocumentType, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid): Promise<DataCreateResponse>;
156
+ createConsultationAttachmentData(lockboxUuid: Uuid, data: File, consultationId: string, documentType: DocumentType, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid, withNotification?: boolean): Promise<DataCreateResponse>;
156
157
  /**
157
158
  * @name createJsonData
158
159
  * @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a JSON
@@ -162,11 +163,12 @@ export declare class OroClient {
162
163
  * @param privateMeta the metadata that will be secured in the vault
163
164
  * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
164
165
  * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
166
+ * @param withNotification if the insertion of data requires notification
165
167
  * @returns the data uuid
166
168
  */
167
- createJsonData<T = Meta>(lockboxUuid: Uuid, data: any, meta?: T, privateMeta?: {
169
+ createJsonData<T extends Metadata>(lockboxUuid: Uuid, data: any, meta?: T, privateMeta?: {
168
170
  [val: string]: any;
169
- }, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid): Promise<DataCreateResponse>;
171
+ }, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid, withNotification?: boolean): Promise<DataCreateResponse>;
170
172
  /**
171
173
  * Get or upsert a data in lockbox
172
174
  * @param lockboxUuid the lockbox uuid
@@ -174,9 +176,10 @@ export declare class OroClient {
174
176
  * @param publicMetadata the public Metadata
175
177
  * @param privateMetadata the private Metadata
176
178
  * @param forceReplace set true when the insertion of data requires to replace the data when it exists already
179
+ * @param withNotification if the insertion of data requires notification
177
180
  * @returns the data uuid
178
181
  */
179
- getOrInsertJsonData<M = Metadata>(lockboxUuid: Uuid, data: any, publicMetadata: M, privateMetadata: Metadata, forceReplace?: boolean): Promise<Uuid>;
182
+ getOrInsertJsonData<M extends Metadata>(lockboxUuid: Uuid, data: any, publicMetadata: M, privateMetadata: Metadata, forceReplace?: boolean, withNotification?: boolean): Promise<Uuid>;
180
183
  /**
181
184
  * @name createBytesData
182
185
  * @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a Bytes
@@ -186,11 +189,12 @@ export declare class OroClient {
186
189
  * @param privateMeta the metadata that will be secured in the vault
187
190
  * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
188
191
  * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
192
+ * @param withNotification if the insertion of data requires notification
189
193
  * @returns the data uuid
190
194
  */
191
- createBytesData<T = Meta>(lockboxUuid: Uuid, data: Uint8Array, meta: T, privateMeta: {
195
+ createBytesData<T extends Metadata>(lockboxUuid: Uuid, data: Uint8Array, meta: T, privateMeta: {
192
196
  [val: string]: any;
193
- }, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid): Promise<DataCreateResponse>;
197
+ }, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid, withNotification?: boolean): Promise<DataCreateResponse>;
194
198
  /**
195
199
  * @name getJsonData
196
200
  * @description Fetches and decrypts the lockbox data with the cached shared secret.