@basementuniverse/jsonpad-realtime-sdk 1.4.0 → 1.5.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/README.md
CHANGED
|
@@ -90,6 +90,8 @@ A connection that drops without closing cleanly keeps its slot on the server unt
|
|
|
90
90
|
const jsonpadRealtime = new JSONPadRealtime('your-api-token', { retry: false });
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
+
The same happens if you subscribe to items by alias while one of your alias indexes is still being built: the connection is refused with `INDEX_BUILDING` (code 16006), and retried once the server's suggested delay has passed. Subscribing by item id always works.
|
|
94
|
+
|
|
93
95
|
## `listen()` method
|
|
94
96
|
|
|
95
97
|
The `listen()` method takes an array of event types to listen for. You can pass in any of the following event types:
|
|
@@ -110,7 +110,8 @@ declare class ListEvent extends CustomEvent<any> {
|
|
|
110
110
|
*/
|
|
111
111
|
declare class RealtimeErrorEvent extends CustomEvent<string> {
|
|
112
112
|
/**
|
|
113
|
-
* The jsonpad error code, e.g. 10015
|
|
113
|
+
* The jsonpad error code, e.g. 10015 (too many connections) or 16006 (an
|
|
114
|
+
* alias index is still being built), or null if the error didn't come from
|
|
114
115
|
* the server
|
|
115
116
|
*/
|
|
116
117
|
readonly code: number | null;
|
package/package.json
CHANGED
|
@@ -9,7 +9,8 @@ import { RealtimeErrorData } from '../types';
|
|
|
9
9
|
*/
|
|
10
10
|
export class RealtimeErrorEvent extends CustomEvent<string> {
|
|
11
11
|
/**
|
|
12
|
-
* The jsonpad error code, e.g. 10015
|
|
12
|
+
* The jsonpad error code, e.g. 10015 (too many connections) or 16006 (an
|
|
13
|
+
* alias index is still being built), or null if the error didn't come from
|
|
13
14
|
* the server
|
|
14
15
|
*/
|
|
15
16
|
public readonly code: number | null;
|