@getxflow/cli 1.0.3 → 1.0.4
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/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/xflow/SKILL.md +9 -11
package/dist/version.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEFAULT_API_URL = exports.CLI_VERSION = void 0;
|
|
4
4
|
/** Keep in sync with cli/package.json. */
|
|
5
|
-
exports.CLI_VERSION = '1.0.
|
|
5
|
+
exports.CLI_VERSION = '1.0.4';
|
|
6
6
|
/** Overridden by XFLOW_API_URL or the `api` field in xflow.json. */
|
|
7
7
|
exports.DEFAULT_API_URL = 'https://app.getxflow.com';
|
package/package.json
CHANGED
package/skills/xflow/SKILL.md
CHANGED
|
@@ -23,7 +23,7 @@ contains the fix.
|
|
|
23
23
|
|
|
24
24
|
## Keeping these instructions current
|
|
25
25
|
|
|
26
|
-
These instructions ship with xflow CLI 1.0.
|
|
26
|
+
These instructions ship with xflow CLI 1.0.4, so the copy you are reading can be older than
|
|
27
27
|
the CLI answering your commands.
|
|
28
28
|
|
|
29
29
|
When the CLI says this file does not match it, run `xflow skills --refresh` and then **read
|
|
@@ -233,18 +233,16 @@ A person sets this in the web interface; you cannot, and you should not ask for
|
|
|
233
233
|
|
|
234
234
|
| Level | Who gets in |
|
|
235
235
|
|---|---|
|
|
236
|
-
| Project members | people who have access to the project
|
|
236
|
+
| Project members | people who have access to the project |
|
|
237
237
|
| Anyone with the link | anybody, no sign-in at all |
|
|
238
238
|
|
|
239
239
|
- The plan decides which levels exist: on Free an app opens only inside xflow, Start adds the
|
|
240
|
-
direct address
|
|
240
|
+
direct address and "Anyone with the link".
|
|
241
241
|
- At the closed level the platform signs people in, and a function receives the person in
|
|
242
|
-
`event.xflow.user` (`id`, `role` in the organization, `name
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
- A "Sign out" button: `const r = await fetch('/_xflow/logout', { method: 'POST' })`, then
|
|
247
|
-
`location.href = (await r.json()).next`. It ends every sign-in of the person.
|
|
242
|
+
`event.xflow.user` (`id`, `role` in the organization, `name`). Keep roles inside the app
|
|
243
|
+
(doctor, receptionist) in your own table keyed by `user.id`.
|
|
244
|
+
- People outside the organization (patients, pickers, clients) are not xflow accounts: make the
|
|
245
|
+
app "Anyone with the link" and give it its own sign-in, see below.
|
|
248
246
|
- At "Anyone with the link" the platform signs nobody in: `event.xflow.user` is null for
|
|
249
247
|
visitors. Accounts, sign-in and who sees which rows are the code of your app, see below.
|
|
250
248
|
- `usePlatformAuth()` in the frontend knows the person only inside the xflow frame, and even
|
|
@@ -392,7 +390,7 @@ exports.handler = async (event) => {
|
|
|
392
390
|
// project), 'external' (an outside service with a key), 'schedule',
|
|
393
391
|
// 'platform' (a person through xflow functions invoke or the web interface)
|
|
394
392
|
// slug: the address name of the calling app (<id>--<org>) or page, null otherwise
|
|
395
|
-
// user: { id, role, name
|
|
393
|
+
// user: { id, role, name } of a signed-in person,
|
|
396
394
|
// null for anonymous visitors, pages, keys
|
|
397
395
|
// ip: the visitor's address, null for a schedule
|
|
398
396
|
}
|
|
@@ -409,7 +407,7 @@ exports.minRole = 'developer' // 'member' | 'developer' | 'owner'
|
|
|
409
407
|
|
|
410
408
|
The platform refuses anything below that role before your code runs; it applies to people
|
|
411
409
|
(apps, pages, `functions invoke`), not to keys and schedules. `member` is the people who only
|
|
412
|
-
use the apps (
|
|
410
|
+
use the apps (clinic employees, managers), `developer` and `owner` build them. In the web
|
|
413
411
|
interface these roles are called «Просмотр» (`member`), «Редактор» (`developer`) and «Админ»
|
|
414
412
|
(`owner`). Without the line
|
|
415
413
|
every member of the project can call the function. Losing access
|