@vuoma/sdk 0.2.0 → 0.2.1
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/README.md +5 -4
- package/package.json +1 -1
- package/src/member-contracts.js +1 -1
package/README.md
CHANGED
|
@@ -10,11 +10,11 @@ Install the public package in your own application; access to Vuoma's private
|
|
|
10
10
|
repository is not required:
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
|
-
npm install @vuoma/sdk@0.2.
|
|
13
|
+
npm install @vuoma/sdk@0.2.1
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Use SvelteKit and SvelteKit UI with `@vuoma/
|
|
17
|
-
and same-origin server sessions. Use `@vuoma/native-ui` for React Native account and booking UI and this SDK as
|
|
16
|
+
Use SvelteKit and SvelteKit UI with `@vuoma/svelte` for website account components
|
|
17
|
+
and same-origin server sessions. Use `@vuoma/react-native-ui` for React Native account and booking UI and this SDK as
|
|
18
18
|
its framework-neutral API transport. The complete `@vuoma/react-native` studio
|
|
19
19
|
app core remains a private workspace; independent apps do not depend on it.
|
|
20
20
|
The public setup guide is at `/developers` and `/o/<organization_slug>/developers`
|
|
@@ -102,7 +102,8 @@ the response text and against a supplied Content-Length header.
|
|
|
102
102
|
## Signup, activation and password reset
|
|
103
103
|
|
|
104
104
|
Email confirmation and password creation stay within the host UI; the person
|
|
105
|
-
reads the
|
|
105
|
+
reads the complete code in their email app. The client accepts the supported
|
|
106
|
+
six- and eight-digit codes and preserves leading zeroes. No access token, cookie or API key
|
|
106
107
|
is sent by these methods. For new or automatically resolved accounts, collect a
|
|
107
108
|
display name. Choose `auto` to let verified email ownership resolve a new profile,
|
|
108
109
|
an imported profile or an existing studio account; `activate` performs the same
|
package/package.json
CHANGED
package/src/member-contracts.js
CHANGED
|
@@ -90,7 +90,7 @@ export function accountInput({ mode, email, signupIntent }) {
|
|
|
90
90
|
if (mode === 'signup') check(['new', 'migrate', 'auto', 'activate'].includes(signupIntent), 'Choose a signup intent explicitly.')
|
|
91
91
|
}
|
|
92
92
|
export function displayName(value) { check(text(value, 160, 1) && Boolean(value.trim()) && !/[\u0000-\u001f\u007f]/u.test(value), 'Provide a display name.'); return value }
|
|
93
|
-
export function emailCode(value) { check(typeof value === 'string' &&
|
|
93
|
+
export function emailCode(value) { check(typeof value === 'string' && /^(?:\d{6}|\d{8})$/u.test(value.trim()), 'Provide the email code from your message.'); return value.trim() }
|
|
94
94
|
export function validCapability(value) { return typeof value === 'string' && /^[A-Za-z0-9_-]{43}$/u.test(value) }
|
|
95
95
|
export function accountResolution(value) {
|
|
96
96
|
check(object(value) && ['existing_account', 'existing_profile', 'new_profile'].includes(value.kind) && text(value.display_name, 160, 1) && Boolean(value.display_name.trim()) && !/[\u0000-\u001f\u007f]/u.test(value.display_name) && text(value.masked_email, 320) && /^[^@\s*]\*{3}@[^@\s*]\*{3}(?:\.[a-z0-9.-]+)?$/iu.test(value.masked_email) && (value.masked_phone === null || /^\*{3} \*{3} [0-9]{4}$/u.test(value.masked_phone ?? '')))
|