@flipstream/sdk 0.16.1 → 0.17.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/CHANGELOG.md +17 -0
- package/README.md +7 -1
- package/dist/api/backend.d.ts +34 -2
- package/dist/api/backend.js +46 -3
- package/dist/api/backend.js.map +1 -1
- package/dist/api/handoff.d.ts +10 -0
- package/dist/api/handoff.js +12 -0
- package/dist/api/handoff.js.map +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/profile.d.ts +52 -0
- package/dist/api/profile.js +219 -0
- package/dist/api/profile.js.map +1 -0
- package/dist/api/time.d.ts +5 -0
- package/dist/api/time.js +7 -0
- package/dist/api/time.js.map +1 -1
- package/dist/core/result.d.ts +6 -4
- package/dist/core/result.js +5 -0
- package/dist/core/result.js.map +1 -1
- package/dist/core/signal.d.ts +17 -0
- package/dist/core/signal.js +24 -0
- package/dist/core/signal.js.map +1 -1
- package/dist/first-party/entry.js +54 -5
- package/dist/first-party/entry.js.map +1 -1
- package/dist/flipstream.d.ts +45 -0
- package/dist/flipstream.js +19 -16
- package/dist/flipstream.js.map +1 -1
- package/dist/version.gen.js +1 -1
- package/docs/admin.md +25 -0
- package/package.json +1 -1
package/docs/admin.md
CHANGED
|
@@ -54,6 +54,31 @@ section's basics, and its most common example, are in the package's README under
|
|
|
54
54
|
option of `createFlipstream`: see "Options" in [README.md](../README.md)), the organisation's
|
|
55
55
|
settings page is the `url`, with what it shows as `sees`, as `workspaces.rename` does. There,
|
|
56
56
|
Owners and Admins change the name and the short name. The `name` you give is never echoed.
|
|
57
|
+
- **Your name and your privacy acceptance are `flipstream.profile` (#524).** `me()` is unchanged.
|
|
58
|
+
- `profile.privacy()` reads on every client. The answer is `{ version }`, and `version` is null
|
|
59
|
+
when none is accepted. It reads `GET /users/{id}/profile?refresh=true`. A later
|
|
60
|
+
`accepted: false` is not read as a withdrawal. Meta that is not a JSON object is `invalid`.
|
|
61
|
+
A 404 stays `not_found`.
|
|
62
|
+
- `profile.setName({ first_name, last_name })` and `profile.acceptPrivacy({ version })` write
|
|
63
|
+
only on the client the first-party session makes (`session.flipstream`). On every other client
|
|
64
|
+
they answer `needs_person`, with `why`, and send nothing. No `url` is named: the page's address
|
|
65
|
+
needs your organisation's short name, and that would be a read.
|
|
66
|
+
- A blank name, or a blank version, is `refused` (`empty`), naming the fields, and nothing is
|
|
67
|
+
sent. `setName` answers only `saved`. The name write reads `GET /users/{sub}?refresh=true`
|
|
68
|
+
fresh, not the scope's shared read, and sets `email`, `first_name` and `last_name`, with that
|
|
69
|
+
email as read, never userinfo's. An empty email is `invalid` and nothing is written. Nothing
|
|
70
|
+
else on your user changes. The answer must name your id and carry the two names just sent;
|
|
71
|
+
another id or another name is `invalid`. Every answer except `needs_person` and `refused`
|
|
72
|
+
drops that scope's shared reads, so the next `me()` reads you again. A refused write leaves
|
|
73
|
+
them. `acceptPrivacy` drops nothing:
|
|
74
|
+
the profile read is not shared.
|
|
75
|
+
- The privacy write reads the profile immediately before it writes, with `refresh=true`. The
|
|
76
|
+
merge keeps every key and its value, as JSON reads them. A `privacy_policy` that is not a list
|
|
77
|
+
is `invalid` and is never written over. `unchanged` only when `privacy()` would already answer
|
|
78
|
+
that version, and then nothing is written. Otherwise it appends
|
|
79
|
+
`{ version, accepted: true, accepted_on }` and sends `PUT /users/{id}/profile` with `{ meta }`
|
|
80
|
+
only, so the stored name stays. The answer must be your profile and hold that entry. A 5xx
|
|
81
|
+
from either write is `unavailable`, never `saved`.
|
|
57
82
|
|
|
58
83
|
## Your organisation's members
|
|
59
84
|
|