@qikdev/sdk 1.0.5 → 1.0.7
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/access.html +1 -1
- package/dist/api.html +1 -1
- package/dist/auth.html +1 -1
- package/dist/cache.html +1 -1
- package/dist/content.html +1 -1
- package/dist/files.html +1 -1
- package/dist/filter.html +1 -1
- package/dist/geo.html +1 -1
- package/dist/global.html +1 -1
- package/dist/index.html +1 -1
- package/dist/main.js +857 -838
- package/dist/module-QikStorage-CookieStorageAdapter.html +1 -1
- package/dist/module-QikStorage-LocalStorageAdapter.html +1 -1
- package/dist/module-QikStorage-StorageAdapter.html +1 -1
- package/dist/module-QikStorage.html +1 -1
- package/dist/qik.access.js.html +1 -1
- package/dist/qik.api.js.html +1 -1
- package/dist/qik.auth.js.html +1 -1
- package/dist/qik.cache.js.html +1 -1
- package/dist/qik.content.js.html +1 -1
- package/dist/qik.core.js.html +1 -1
- package/dist/qik.files.js.html +1 -1
- package/dist/qik.filter.js.html +1 -1
- package/dist/qik.geo.js.html +1 -1
- package/dist/qik.socket.js.html +1 -1
- package/dist/qik.storage.js.html +1 -1
- package/dist/qik.system.js.html +1 -1
- package/dist/qik.utils.js.html +1 -1
- package/dist/socket.html +1 -1
- package/dist/system.html +1 -1
- package/dist/utils.html +1 -1
- package/package.json +1 -1
- package/src/api/qik.api.js +28 -0
- package/src/api/qik.socket.js +20 -10
- package/src/version.js +1 -1
|
@@ -394,7 +394,7 @@
|
|
|
394
394
|
<br class="clear">
|
|
395
395
|
|
|
396
396
|
<footer>
|
|
397
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
397
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
398
398
|
</footer>
|
|
399
399
|
|
|
400
400
|
<script>prettyPrint();</script>
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
<br class="clear">
|
|
181
181
|
|
|
182
182
|
<footer>
|
|
183
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
183
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
184
184
|
</footer>
|
|
185
185
|
|
|
186
186
|
<script>prettyPrint();</script>
|
|
@@ -964,7 +964,7 @@
|
|
|
964
964
|
<br class="clear">
|
|
965
965
|
|
|
966
966
|
<footer>
|
|
967
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
967
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
968
968
|
</footer>
|
|
969
969
|
|
|
970
970
|
<script>prettyPrint();</script>
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
<br class="clear">
|
|
421
421
|
|
|
422
422
|
<footer>
|
|
423
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
423
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
424
424
|
</footer>
|
|
425
425
|
|
|
426
426
|
<script>prettyPrint();</script>
|
package/dist/qik.access.js.html
CHANGED
|
@@ -891,7 +891,7 @@ export default QikAccess;
|
|
|
891
891
|
<br class="clear">
|
|
892
892
|
|
|
893
893
|
<footer>
|
|
894
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
894
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
895
895
|
</footer>
|
|
896
896
|
|
|
897
897
|
<script>prettyPrint();</script>
|
package/dist/qik.api.js.html
CHANGED
|
@@ -396,7 +396,7 @@ export default QikAPI;
|
|
|
396
396
|
<br class="clear">
|
|
397
397
|
|
|
398
398
|
<footer>
|
|
399
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
399
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
400
400
|
</footer>
|
|
401
401
|
|
|
402
402
|
<script>prettyPrint();</script>
|
package/dist/qik.auth.js.html
CHANGED
|
@@ -1031,7 +1031,7 @@ export default QikAuth;
|
|
|
1031
1031
|
<br class="clear">
|
|
1032
1032
|
|
|
1033
1033
|
<footer>
|
|
1034
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
1034
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
1035
1035
|
</footer>
|
|
1036
1036
|
|
|
1037
1037
|
<script>prettyPrint();</script>
|
package/dist/qik.cache.js.html
CHANGED
|
@@ -112,7 +112,7 @@ export default QikCache;
|
|
|
112
112
|
<br class="clear">
|
|
113
113
|
|
|
114
114
|
<footer>
|
|
115
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
115
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
116
116
|
</footer>
|
|
117
117
|
|
|
118
118
|
<script>prettyPrint();</script>
|
package/dist/qik.content.js.html
CHANGED
|
@@ -954,7 +954,7 @@ export default function (qik) {
|
|
|
954
954
|
<br class="clear">
|
|
955
955
|
|
|
956
956
|
<footer>
|
|
957
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
957
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
958
958
|
</footer>
|
|
959
959
|
|
|
960
960
|
<script>prettyPrint();</script>
|
package/dist/qik.core.js.html
CHANGED
|
@@ -309,7 +309,7 @@ export default function(options) {
|
|
|
309
309
|
<br class="clear">
|
|
310
310
|
|
|
311
311
|
<footer>
|
|
312
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
312
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
313
313
|
</footer>
|
|
314
314
|
|
|
315
315
|
<script>prettyPrint();</script>
|
package/dist/qik.files.js.html
CHANGED
|
@@ -236,7 +236,7 @@ export default function (qik) {
|
|
|
236
236
|
<br class="clear">
|
|
237
237
|
|
|
238
238
|
<footer>
|
|
239
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
239
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
240
240
|
</footer>
|
|
241
241
|
|
|
242
242
|
<script>prettyPrint();</script>
|
package/dist/qik.filter.js.html
CHANGED
|
@@ -598,7 +598,7 @@ export default service;</code></pre>
|
|
|
598
598
|
<br class="clear">
|
|
599
599
|
|
|
600
600
|
<footer>
|
|
601
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
601
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
602
602
|
</footer>
|
|
603
603
|
|
|
604
604
|
<script>prettyPrint();</script>
|
package/dist/qik.geo.js.html
CHANGED
|
@@ -950,7 +950,7 @@ export default function(qik) {
|
|
|
950
950
|
<br class="clear">
|
|
951
951
|
|
|
952
952
|
<footer>
|
|
953
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
953
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
954
954
|
</footer>
|
|
955
955
|
|
|
956
956
|
<script>prettyPrint();</script>
|
package/dist/qik.socket.js.html
CHANGED
|
@@ -444,7 +444,7 @@ export default QikSocket;</code></pre>
|
|
|
444
444
|
<br class="clear">
|
|
445
445
|
|
|
446
446
|
<footer>
|
|
447
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
447
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
448
448
|
</footer>
|
|
449
449
|
|
|
450
450
|
<script>prettyPrint();</script>
|
package/dist/qik.storage.js.html
CHANGED
|
@@ -362,7 +362,7 @@ export { StorageAdapter, LocalStorageAdapter, CookieStorageAdapter };
|
|
|
362
362
|
<br class="clear">
|
|
363
363
|
|
|
364
364
|
<footer>
|
|
365
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
365
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
366
366
|
</footer>
|
|
367
367
|
|
|
368
368
|
<script>prettyPrint();</script>
|
package/dist/qik.system.js.html
CHANGED
|
@@ -104,7 +104,7 @@ export default function(qik) {
|
|
|
104
104
|
<br class="clear">
|
|
105
105
|
|
|
106
106
|
<footer>
|
|
107
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
107
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
108
108
|
</footer>
|
|
109
109
|
|
|
110
110
|
<script>prettyPrint();</script>
|
package/dist/qik.utils.js.html
CHANGED
|
@@ -1535,7 +1535,7 @@ export function EventDispatcher() {
|
|
|
1535
1535
|
<br class="clear">
|
|
1536
1536
|
|
|
1537
1537
|
<footer>
|
|
1538
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
1538
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
1539
1539
|
</footer>
|
|
1540
1540
|
|
|
1541
1541
|
<script>prettyPrint();</script>
|
package/dist/socket.html
CHANGED
|
@@ -797,7 +797,7 @@ socketChannel.destroy();</code></pre>
|
|
|
797
797
|
<br class="clear">
|
|
798
798
|
|
|
799
799
|
<footer>
|
|
800
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
800
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
801
801
|
</footer>
|
|
802
802
|
|
|
803
803
|
<script>prettyPrint();</script>
|
package/dist/system.html
CHANGED
|
@@ -184,7 +184,7 @@ and phone number prefixes. Helpful for populating dropdown lists.
|
|
|
184
184
|
<br class="clear">
|
|
185
185
|
|
|
186
186
|
<footer>
|
|
187
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
187
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
188
188
|
</footer>
|
|
189
189
|
|
|
190
190
|
<script>prettyPrint();</script>
|
package/dist/utils.html
CHANGED
|
@@ -4409,7 +4409,7 @@ sdk.utils.parseURL('hello@email.com'); // Returns 'mailto:hello@email.com'</code
|
|
|
4409
4409
|
<br class="clear">
|
|
4410
4410
|
|
|
4411
4411
|
<footer>
|
|
4412
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:
|
|
4412
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:49:48 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
4413
4413
|
</footer>
|
|
4414
4414
|
|
|
4415
4415
|
<script>prettyPrint();</script>
|
package/package.json
CHANGED
package/src/api/qik.api.js
CHANGED
|
@@ -273,6 +273,34 @@ var QikAPI = function (qik) {
|
|
|
273
273
|
//Ignore let QikAuth handle it
|
|
274
274
|
break;
|
|
275
275
|
|
|
276
|
+
case 429: {
|
|
277
|
+
// Rate-limited by the server's fairness/concurrency limiter. It
|
|
278
|
+
// sends Retry-After (seconds); honour it — with jitter so a burst
|
|
279
|
+
// of 429s doesn't retry in lockstep and re-trip the limit — and
|
|
280
|
+
// retry a few times rather than surfacing the error. Retry state
|
|
281
|
+
// lives on the request config, NOT the shared retryCount above,
|
|
282
|
+
// because 429s arrive in concurrent bursts that would corrupt a
|
|
283
|
+
// single shared counter.
|
|
284
|
+
var config429 = err.config || {};
|
|
285
|
+
config429.__retry429 = (config429.__retry429 || 0) + 1;
|
|
286
|
+
if (config429.__retry429 <= 3) {
|
|
287
|
+
var retryAfterHeader = parseInt(
|
|
288
|
+
err?.response?.headers?.["retry-after"],
|
|
289
|
+
10,
|
|
290
|
+
);
|
|
291
|
+
var backoffMs = Number.isFinite(retryAfterHeader)
|
|
292
|
+
? retryAfterHeader * 1000
|
|
293
|
+
: 800 * config429.__retry429;
|
|
294
|
+
var jitterMs = Math.floor(Math.random() * 500);
|
|
295
|
+
return new Promise(function (resolve, reject) {
|
|
296
|
+
setTimeout(function () {
|
|
297
|
+
return instance.request(config429).then(resolve, reject);
|
|
298
|
+
}, backoffMs + jitterMs);
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
|
|
276
304
|
case 502:
|
|
277
305
|
case 504:
|
|
278
306
|
if (retryCount < 5) {
|
package/src/api/qik.socket.js
CHANGED
|
@@ -141,6 +141,15 @@ const QikSocket = function(qik, mode) {
|
|
|
141
141
|
|
|
142
142
|
dispatcher.dispatch('connected', event);
|
|
143
143
|
|
|
144
|
+
// Replay every recorded subscription — frames broadcast before the
|
|
145
|
+
// connection opened were dropped, and reconnects need them resent.
|
|
146
|
+
Object.keys(channels).forEach(function(channel) {
|
|
147
|
+
broadcast({
|
|
148
|
+
action: 'subscribe',
|
|
149
|
+
channel,
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
|
|
144
153
|
// startHeartbeat();
|
|
145
154
|
}
|
|
146
155
|
|
|
@@ -181,6 +190,14 @@ const QikSocket = function(qik, mode) {
|
|
|
181
190
|
}
|
|
182
191
|
|
|
183
192
|
async function broadcast(data) {
|
|
193
|
+
// A socket that exists but isn't OPEN (CONNECTING, CLOSING or CLOSED)
|
|
194
|
+
// throws InvalidStateError on send. Drop the frame instead — subscribe
|
|
195
|
+
// frames are replayed from `channels` when the connection opens.
|
|
196
|
+
if (!socket || socket.readyState !== WebSocket.OPEN) {
|
|
197
|
+
service.debug ? console.log('[socket] - frame dropped, socket not open', data) : null;
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
|
|
184
201
|
socket.send(JSON.stringify(data));
|
|
185
202
|
}
|
|
186
203
|
|
|
@@ -251,17 +268,10 @@ const QikSocket = function(qik, mode) {
|
|
|
251
268
|
}
|
|
252
269
|
|
|
253
270
|
service.debug ? console.log(`[socket] reconnecting...`) : null;
|
|
254
|
-
|
|
255
|
-
// Reconnect all listeners
|
|
256
|
-
const result = await service.connect();
|
|
257
|
-
|
|
258
|
-
// Resubscribe to all previously connected channels
|
|
259
|
-
const subscribedChannels = Object.keys(channels);
|
|
260
|
-
subscribedChannels.forEach(function(channel) {
|
|
261
|
-
service.subscribe(channel);
|
|
262
|
-
})
|
|
263
271
|
|
|
264
|
-
|
|
272
|
+
// Reconnect all listeners. Previously subscribed channels are replayed
|
|
273
|
+
// by socketOpened() the moment the connection opens.
|
|
274
|
+
return await service.connect();
|
|
265
275
|
}
|
|
266
276
|
|
|
267
277
|
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "1.0.
|
|
1
|
+
export const version = "1.0.7";
|