@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/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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipstream/sdk",
3
- "version": "0.16.1",
3
+ "version": "0.17.0",
4
4
  "description": "TypeScript SDK for the Flipstream APIs: typed requests and checked answers, in Node and in browsers.",
5
5
  "keywords": [
6
6
  "flipstream",