@basementuniverse/jsonpad-realtime-sdk 1.3.0 → 1.3.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 +10 -0
- package/package.json +1 -1
- package/src/types/item.ts +7 -0
package/README.md
CHANGED
|
@@ -166,3 +166,13 @@ The event object passed to the event listener has the following properties:
|
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
168
|
```
|
|
169
|
+
|
|
170
|
+
## Guard indexes
|
|
171
|
+
|
|
172
|
+
If a list has any [guard indexes](https://jsonpad.io/documentation/indexing), the
|
|
173
|
+
values they point at are removed from an item's `data` before the event is
|
|
174
|
+
published, so they never reach a realtime client.
|
|
175
|
+
|
|
176
|
+
Realtime connections authenticate with an API token and can't use an identity,
|
|
177
|
+
so there is no realtime equivalent of the API's `includeGuarded` parameter. Read
|
|
178
|
+
a guarded value through the API instead, as the identity that owns the item.
|
package/package.json
CHANGED
package/src/types/item.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An item, as it arrives in a realtime event
|
|
3
|
+
*
|
|
4
|
+
* Realtime clients authenticate with an API token and never with an identity,
|
|
5
|
+
* so any value covered by a guard index in the item's list has already been
|
|
6
|
+
* removed from `data` before the event was published
|
|
7
|
+
*/
|
|
1
8
|
export type Item = {
|
|
2
9
|
id: string;
|
|
3
10
|
createdAt: Date;
|