oro-sdk 5.7.0 → 5.8.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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.7.0",
2
+ "version": "5.8.0",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -55,7 +55,7 @@
55
55
  "form-data": "^4.0.0",
56
56
  "formdata-node": "^4.3.1",
57
57
  "idb-keyval": "^5.0.6",
58
- "oro-sdk-apis": "3.8.0",
58
+ "oro-sdk-apis": "4.0.0",
59
59
  "oro-toolbox": "0.0.6",
60
60
  "uuid": "^8.3.2"
61
61
  }
package/src/client.ts CHANGED
@@ -35,6 +35,7 @@ import {
35
35
  RoleBasedScopes,
36
36
  SearchService,
37
37
  SecretShard,
38
+ SubscriptionAcceptanceRequest,
38
39
  TellerService,
39
40
  TokenData,
40
41
  TosAndCpAcceptanceRequest,
@@ -132,18 +133,20 @@ export class OroClient {
132
133
 
133
134
  const hashedPassword = this.toolbox.hashStringToBase64(this.toolbox.hashStringToBase64(password))
134
135
 
136
+ email = email.toLowerCase()
135
137
  const emailConfirmed = !!skipEmailValidation
138
+ const subscriptionAcceptance = subscription ? ({ email } as SubscriptionAcceptanceRequest) : undefined
136
139
 
137
140
  const signupRequest: IdentityCreateRequest = {
138
141
  practiceUuid: practice.uuid,
139
- email: email.toLowerCase(),
142
+ email,
140
143
  emailConfirmed,
141
144
  password: hashedPassword,
142
145
  publicKey: this.toolbox.encodeToBase64(this.rsa.public()),
143
146
  recoveryPassword,
144
147
  tosAndCpAcceptance,
145
148
  tokenData,
146
- subscription,
149
+ subscriptionAcceptance,
147
150
  }
148
151
 
149
152
  const identity = await this.guardClient.identityCreate(signupRequest)
package/LICENSE DELETED
@@ -1,21 +0,0 @@
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.