@wix/realtime 1.0.29 → 1.0.31
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/statics/docs-ts-model.json +1725 -603
- package/package.json +5 -5
|
@@ -7,21 +7,29 @@
|
|
|
7
7
|
"flags": {},
|
|
8
8
|
"children": [
|
|
9
9
|
{
|
|
10
|
-
"id":
|
|
10
|
+
"id": 72,
|
|
11
|
+
"name": "Channel",
|
|
12
|
+
"variant": "reference",
|
|
13
|
+
"kind": 8388608,
|
|
14
|
+
"flags": {},
|
|
15
|
+
"target": 31
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": 52,
|
|
11
19
|
"name": "publisher",
|
|
12
20
|
"variant": "declaration",
|
|
13
21
|
"kind": 4,
|
|
14
22
|
"flags": {},
|
|
15
23
|
"children": [
|
|
16
24
|
{
|
|
17
|
-
"id":
|
|
25
|
+
"id": 53,
|
|
18
26
|
"name": "publish",
|
|
19
27
|
"variant": "declaration",
|
|
20
28
|
"kind": 64,
|
|
21
29
|
"flags": {},
|
|
22
30
|
"signatures": [
|
|
23
31
|
{
|
|
24
|
-
"id":
|
|
32
|
+
"id": 54,
|
|
25
33
|
"name": "publish",
|
|
26
34
|
"variant": "signature",
|
|
27
35
|
"kind": 4096,
|
|
@@ -64,7 +72,7 @@
|
|
|
64
72
|
},
|
|
65
73
|
"parameters": [
|
|
66
74
|
{
|
|
67
|
-
"id":
|
|
75
|
+
"id": 55,
|
|
68
76
|
"name": "channel",
|
|
69
77
|
"variant": "param",
|
|
70
78
|
"kind": 32768,
|
|
@@ -79,13 +87,13 @@
|
|
|
79
87
|
},
|
|
80
88
|
"type": {
|
|
81
89
|
"type": "reference",
|
|
82
|
-
"target":
|
|
90
|
+
"target": 31,
|
|
83
91
|
"name": "Channel",
|
|
84
92
|
"package": "@wix/realtime-common"
|
|
85
93
|
}
|
|
86
94
|
},
|
|
87
95
|
{
|
|
88
|
-
"id":
|
|
96
|
+
"id": 56,
|
|
89
97
|
"name": "payload",
|
|
90
98
|
"variant": "param",
|
|
91
99
|
"kind": 32768,
|
|
@@ -136,7 +144,7 @@
|
|
|
136
144
|
}
|
|
137
145
|
},
|
|
138
146
|
{
|
|
139
|
-
"id":
|
|
147
|
+
"id": 57,
|
|
140
148
|
"name": "publish",
|
|
141
149
|
"variant": "signature",
|
|
142
150
|
"kind": 4096,
|
|
@@ -179,7 +187,7 @@
|
|
|
179
187
|
},
|
|
180
188
|
"parameters": [
|
|
181
189
|
{
|
|
182
|
-
"id":
|
|
190
|
+
"id": 58,
|
|
183
191
|
"name": "httpClient",
|
|
184
192
|
"variant": "param",
|
|
185
193
|
"kind": 32768,
|
|
@@ -212,7 +220,7 @@
|
|
|
212
220
|
{
|
|
213
221
|
"title": "Functions",
|
|
214
222
|
"children": [
|
|
215
|
-
|
|
223
|
+
53
|
|
216
224
|
]
|
|
217
225
|
}
|
|
218
226
|
]
|
|
@@ -225,34 +233,23 @@
|
|
|
225
233
|
"flags": {},
|
|
226
234
|
"children": [
|
|
227
235
|
{
|
|
228
|
-
"id":
|
|
236
|
+
"id": 2,
|
|
229
237
|
"name": "PermissionsRouter",
|
|
230
238
|
"variant": "declaration",
|
|
231
|
-
"kind":
|
|
239
|
+
"kind": 4,
|
|
232
240
|
"flags": {},
|
|
233
|
-
"
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
"tag": "@summary",
|
|
243
|
-
"content": [
|
|
244
|
-
{
|
|
245
|
-
"kind": "text",
|
|
246
|
-
"text": "A router for defining and checking permissions."
|
|
247
|
-
}
|
|
248
|
-
]
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
"tag": "@description",
|
|
252
|
-
"content": [
|
|
241
|
+
"children": [
|
|
242
|
+
{
|
|
243
|
+
"id": 14,
|
|
244
|
+
"name": "PermissionsRouter",
|
|
245
|
+
"variant": "declaration",
|
|
246
|
+
"kind": 256,
|
|
247
|
+
"flags": {},
|
|
248
|
+
"comment": {
|
|
249
|
+
"summary": [
|
|
253
250
|
{
|
|
254
251
|
"kind": "text",
|
|
255
|
-
"text": "
|
|
252
|
+
"text": "A router for defining and checking permissions.\n\nUse the permissions router to define the permissions you want to grant to subscribers\n on channels or channel resources. You can set permissions on the channel and channel\n resource level. If you do not define permissions for a particular channel resource,\n that resource inherits the permissions of its parent channel.\n\n Typically you use the permissions router in the **realtime-permissions.js** file in\n your site's backend to:\n\n + Set default permissions for all channels and channel resources where no explicit\n permissions are defined.\n + Add permissions logic for specific channels or channel resources.\n + Check the permissions for a specific subscriber on a specific channel.\n\n > **Note:** Although it is recommended, you do not need to use the permissions router to set permissions. You can also define all your permissions logic in the ["
|
|
256
253
|
},
|
|
257
254
|
{
|
|
258
255
|
"kind": "code",
|
|
@@ -263,50 +260,26 @@
|
|
|
263
260
|
"text": "](#realtime_check_permission) function."
|
|
264
261
|
}
|
|
265
262
|
]
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
},
|
|
269
|
-
"children": [
|
|
270
|
-
{
|
|
271
|
-
"id": 8,
|
|
272
|
-
"name": "add",
|
|
273
|
-
"variant": "declaration",
|
|
274
|
-
"kind": 2048,
|
|
275
|
-
"flags": {},
|
|
276
|
-
"signatures": [
|
|
263
|
+
},
|
|
264
|
+
"children": [
|
|
277
265
|
{
|
|
278
|
-
"id":
|
|
266
|
+
"id": 15,
|
|
279
267
|
"name": "add",
|
|
280
|
-
"variant": "
|
|
281
|
-
"kind":
|
|
268
|
+
"variant": "declaration",
|
|
269
|
+
"kind": 2048,
|
|
282
270
|
"flags": {},
|
|
283
|
-
"
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
]
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
"tag": "@summary",
|
|
297
|
-
"content": [
|
|
298
|
-
{
|
|
299
|
-
"kind": "text",
|
|
300
|
-
"text": "Sets a permissions handler for a specific channel or channel resource."
|
|
301
|
-
}
|
|
302
|
-
]
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
"tag": "@description",
|
|
306
|
-
"content": [
|
|
271
|
+
"signatures": [
|
|
272
|
+
{
|
|
273
|
+
"id": 16,
|
|
274
|
+
"name": "add",
|
|
275
|
+
"variant": "signature",
|
|
276
|
+
"kind": 4096,
|
|
277
|
+
"flags": {},
|
|
278
|
+
"comment": {
|
|
279
|
+
"summary": [
|
|
307
280
|
{
|
|
308
281
|
"kind": "text",
|
|
309
|
-
"text": "
|
|
282
|
+
"text": "Sets a permissions handler for a specific channel or channel resource.\n\nThe handler set by the "
|
|
310
283
|
},
|
|
311
284
|
{
|
|
312
285
|
"kind": "code",
|
|
@@ -340,104 +313,135 @@
|
|
|
340
313
|
"kind": "text",
|
|
341
314
|
"text": " function\n + channel: A, resource: 2, permissions: no handler is specified\n\n\n Permissions will be checked as follows:\n\n + A: use handler X\n + A, 1: use handler Y\n + A, 2: use handler X"
|
|
342
315
|
}
|
|
343
|
-
]
|
|
344
|
-
|
|
345
|
-
]
|
|
346
|
-
},
|
|
347
|
-
"parameters": [
|
|
348
|
-
{
|
|
349
|
-
"id": 10,
|
|
350
|
-
"name": "channel",
|
|
351
|
-
"variant": "param",
|
|
352
|
-
"kind": 32768,
|
|
353
|
-
"flags": {},
|
|
354
|
-
"comment": {
|
|
355
|
-
"summary": [
|
|
316
|
+
],
|
|
317
|
+
"blockTags": [
|
|
356
318
|
{
|
|
357
|
-
"
|
|
358
|
-
"
|
|
319
|
+
"tag": "@requiredField",
|
|
320
|
+
"content": [
|
|
321
|
+
{
|
|
322
|
+
"kind": "text",
|
|
323
|
+
"text": "channel"
|
|
324
|
+
}
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"tag": "@servicePath",
|
|
329
|
+
"content": [
|
|
330
|
+
{
|
|
331
|
+
"kind": "text",
|
|
332
|
+
"text": "wix-realtime-backend.Channel"
|
|
333
|
+
}
|
|
334
|
+
]
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"tag": "@requiredField",
|
|
338
|
+
"content": [
|
|
339
|
+
{
|
|
340
|
+
"kind": "text",
|
|
341
|
+
"text": "handler"
|
|
342
|
+
}
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"tag": "@servicePath",
|
|
347
|
+
"content": [
|
|
348
|
+
{
|
|
349
|
+
"kind": "text",
|
|
350
|
+
"text": "wix-realtime-backend.PermissionsRouter.PermissionsHandler"
|
|
351
|
+
}
|
|
352
|
+
]
|
|
359
353
|
}
|
|
360
354
|
]
|
|
361
355
|
},
|
|
356
|
+
"parameters": [
|
|
357
|
+
{
|
|
358
|
+
"id": 17,
|
|
359
|
+
"name": "channel",
|
|
360
|
+
"variant": "param",
|
|
361
|
+
"kind": 32768,
|
|
362
|
+
"flags": {},
|
|
363
|
+
"comment": {
|
|
364
|
+
"summary": [
|
|
365
|
+
{
|
|
366
|
+
"kind": "text",
|
|
367
|
+
"text": "Channel or channel resource to add a permissions handler for."
|
|
368
|
+
}
|
|
369
|
+
]
|
|
370
|
+
},
|
|
371
|
+
"type": {
|
|
372
|
+
"type": "reference",
|
|
373
|
+
"target": 31,
|
|
374
|
+
"name": "Channel",
|
|
375
|
+
"package": "@wix/realtime-common"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"id": 18,
|
|
380
|
+
"name": "handler",
|
|
381
|
+
"variant": "param",
|
|
382
|
+
"kind": 32768,
|
|
383
|
+
"flags": {},
|
|
384
|
+
"comment": {
|
|
385
|
+
"summary": [
|
|
386
|
+
{
|
|
387
|
+
"kind": "text",
|
|
388
|
+
"text": "The name of the\n function or the function expression to use when checking permissions for the specified channel."
|
|
389
|
+
}
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
"type": {
|
|
393
|
+
"type": "reference",
|
|
394
|
+
"target": 26,
|
|
395
|
+
"name": "PermissionsHandler",
|
|
396
|
+
"package": "@wix/sdk_realtime_site"
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
],
|
|
362
400
|
"type": {
|
|
363
|
-
"type": "
|
|
364
|
-
"
|
|
365
|
-
"name": "Channel",
|
|
366
|
-
"package": "@wix/realtime-common"
|
|
367
|
-
}
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
"id": 11,
|
|
371
|
-
"name": "permissionHandler",
|
|
372
|
-
"variant": "param",
|
|
373
|
-
"kind": 32768,
|
|
374
|
-
"flags": {},
|
|
375
|
-
"comment": {
|
|
376
|
-
"summary": [
|
|
401
|
+
"type": "intersection",
|
|
402
|
+
"types": [
|
|
377
403
|
{
|
|
378
|
-
"
|
|
379
|
-
"
|
|
404
|
+
"type": "reference",
|
|
405
|
+
"target": {
|
|
406
|
+
"sourceFileName": "../../node_modules/typescript/lib/lib.es5.d.ts",
|
|
407
|
+
"qualifiedName": "Promise"
|
|
408
|
+
},
|
|
409
|
+
"typeArguments": [
|
|
410
|
+
{
|
|
411
|
+
"type": "intrinsic",
|
|
412
|
+
"name": "void"
|
|
413
|
+
}
|
|
414
|
+
],
|
|
415
|
+
"name": "Promise",
|
|
416
|
+
"package": "typescript"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"type": "intrinsic",
|
|
420
|
+
"name": "void"
|
|
380
421
|
}
|
|
381
422
|
]
|
|
382
|
-
},
|
|
383
|
-
"type": {
|
|
384
|
-
"type": "reference",
|
|
385
|
-
"target": {
|
|
386
|
-
"sourceFileName": "../site/cjs/build/types.d.ts",
|
|
387
|
-
"qualifiedName": "PermissionHandler"
|
|
388
|
-
},
|
|
389
|
-
"name": "PermissionHandler",
|
|
390
|
-
"package": "@wix/sdk_realtime_site"
|
|
391
423
|
}
|
|
392
424
|
}
|
|
393
|
-
]
|
|
394
|
-
|
|
395
|
-
"type": "intrinsic",
|
|
396
|
-
"name": "void"
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
]
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
"id": 15,
|
|
403
|
-
"name": "check",
|
|
404
|
-
"variant": "declaration",
|
|
405
|
-
"kind": 2048,
|
|
406
|
-
"flags": {},
|
|
407
|
-
"signatures": [
|
|
425
|
+
]
|
|
426
|
+
},
|
|
408
427
|
{
|
|
409
|
-
"id":
|
|
428
|
+
"id": 19,
|
|
410
429
|
"name": "check",
|
|
411
|
-
"variant": "
|
|
412
|
-
"kind":
|
|
430
|
+
"variant": "declaration",
|
|
431
|
+
"kind": 2048,
|
|
413
432
|
"flags": {},
|
|
414
|
-
"
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}
|
|
424
|
-
]
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
"tag": "@summary",
|
|
428
|
-
"content": [
|
|
429
|
-
{
|
|
430
|
-
"kind": "text",
|
|
431
|
-
"text": "Checks the permissions for a subscriber on a channel or channel resource."
|
|
432
|
-
}
|
|
433
|
-
]
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
"tag": "@description",
|
|
437
|
-
"content": [
|
|
433
|
+
"signatures": [
|
|
434
|
+
{
|
|
435
|
+
"id": 20,
|
|
436
|
+
"name": "check",
|
|
437
|
+
"variant": "signature",
|
|
438
|
+
"kind": 4096,
|
|
439
|
+
"flags": {},
|
|
440
|
+
"comment": {
|
|
441
|
+
"summary": [
|
|
438
442
|
{
|
|
439
443
|
"kind": "text",
|
|
440
|
-
"text": "
|
|
444
|
+
"text": "Checks the permissions for a subscriber on a channel or channel resource.\n\nThe "
|
|
441
445
|
},
|
|
442
446
|
{
|
|
443
447
|
"kind": "code",
|
|
@@ -461,200 +465,521 @@
|
|
|
461
465
|
},
|
|
462
466
|
{
|
|
463
467
|
"kind": "text",
|
|
464
|
-
"text": "](
|
|
468
|
+
"text": "](#realtime_check_permission) function like so:\n\n "
|
|
465
469
|
},
|
|
466
470
|
{
|
|
467
471
|
"kind": "code",
|
|
468
472
|
"text": "```JavaScript\n export function realtime_check_permission(channel, subscriber) {\n return permissionsRouter.check(channel,subscriber);\n }\n ```"
|
|
469
473
|
}
|
|
470
|
-
]
|
|
471
|
-
|
|
472
|
-
{
|
|
473
|
-
"tag": "@returns",
|
|
474
|
-
"content": []
|
|
475
|
-
}
|
|
476
|
-
]
|
|
477
|
-
},
|
|
478
|
-
"parameters": [
|
|
479
|
-
{
|
|
480
|
-
"id": 17,
|
|
481
|
-
"name": "channel",
|
|
482
|
-
"variant": "param",
|
|
483
|
-
"kind": 32768,
|
|
484
|
-
"flags": {},
|
|
485
|
-
"comment": {
|
|
486
|
-
"summary": [
|
|
474
|
+
],
|
|
475
|
+
"blockTags": [
|
|
487
476
|
{
|
|
488
|
-
"
|
|
489
|
-
"
|
|
477
|
+
"tag": "@requiredField",
|
|
478
|
+
"content": [
|
|
479
|
+
{
|
|
480
|
+
"kind": "text",
|
|
481
|
+
"text": "channel"
|
|
482
|
+
}
|
|
483
|
+
]
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"tag": "@servicePath",
|
|
487
|
+
"content": [
|
|
488
|
+
{
|
|
489
|
+
"kind": "text",
|
|
490
|
+
"text": "wix-realtime-backend.Channel"
|
|
491
|
+
}
|
|
492
|
+
]
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"tag": "@requiredField",
|
|
496
|
+
"content": [
|
|
497
|
+
{
|
|
498
|
+
"kind": "text",
|
|
499
|
+
"text": "subscriber"
|
|
500
|
+
}
|
|
501
|
+
]
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"tag": "@servicePath",
|
|
505
|
+
"content": [
|
|
506
|
+
{
|
|
507
|
+
"kind": "text",
|
|
508
|
+
"text": "wix-realtime-backend.Subscriber"
|
|
509
|
+
}
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"tag": "@returns",
|
|
514
|
+
"content": [
|
|
515
|
+
{
|
|
516
|
+
"kind": "text",
|
|
517
|
+
"text": "The permissions granted to the subscriber on the channel or channel resource."
|
|
518
|
+
}
|
|
519
|
+
]
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"tag": "@servicePath",
|
|
523
|
+
"content": [
|
|
524
|
+
{
|
|
525
|
+
"kind": "text",
|
|
526
|
+
"text": "wix-realtime-backend.ChannelPermissions"
|
|
527
|
+
}
|
|
528
|
+
]
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"tag": "@servicePath",
|
|
532
|
+
"content": [
|
|
533
|
+
{
|
|
534
|
+
"kind": "text",
|
|
535
|
+
"text": "wix-realtime-backend.ChannelPermissions"
|
|
536
|
+
}
|
|
537
|
+
]
|
|
490
538
|
}
|
|
491
539
|
]
|
|
492
540
|
},
|
|
541
|
+
"parameters": [
|
|
542
|
+
{
|
|
543
|
+
"id": 21,
|
|
544
|
+
"name": "channel",
|
|
545
|
+
"variant": "param",
|
|
546
|
+
"kind": 32768,
|
|
547
|
+
"flags": {},
|
|
548
|
+
"comment": {
|
|
549
|
+
"summary": [
|
|
550
|
+
{
|
|
551
|
+
"kind": "text",
|
|
552
|
+
"text": "Channel to check permissions for."
|
|
553
|
+
}
|
|
554
|
+
]
|
|
555
|
+
},
|
|
556
|
+
"type": {
|
|
557
|
+
"type": "reference",
|
|
558
|
+
"target": 31,
|
|
559
|
+
"name": "Channel",
|
|
560
|
+
"package": "@wix/realtime-common"
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"id": 22,
|
|
565
|
+
"name": "subscriber",
|
|
566
|
+
"variant": "param",
|
|
567
|
+
"kind": 32768,
|
|
568
|
+
"flags": {},
|
|
569
|
+
"comment": {
|
|
570
|
+
"summary": [
|
|
571
|
+
{
|
|
572
|
+
"kind": "text",
|
|
573
|
+
"text": "Subscriber to check permissions for."
|
|
574
|
+
}
|
|
575
|
+
]
|
|
576
|
+
},
|
|
577
|
+
"type": {
|
|
578
|
+
"type": "reference",
|
|
579
|
+
"target": 36,
|
|
580
|
+
"name": "Subscriber",
|
|
581
|
+
"package": "@wix/realtime-common"
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
],
|
|
493
585
|
"type": {
|
|
494
|
-
"type": "
|
|
495
|
-
"
|
|
496
|
-
|
|
497
|
-
|
|
586
|
+
"type": "intersection",
|
|
587
|
+
"types": [
|
|
588
|
+
{
|
|
589
|
+
"type": "reference",
|
|
590
|
+
"target": {
|
|
591
|
+
"sourceFileName": "../../node_modules/typescript/lib/lib.es5.d.ts",
|
|
592
|
+
"qualifiedName": "Promise"
|
|
593
|
+
},
|
|
594
|
+
"typeArguments": [
|
|
595
|
+
{
|
|
596
|
+
"type": "reference",
|
|
597
|
+
"target": 34,
|
|
598
|
+
"name": "ChannelPermissions",
|
|
599
|
+
"package": "@wix/realtime-common"
|
|
600
|
+
}
|
|
601
|
+
],
|
|
602
|
+
"name": "Promise",
|
|
603
|
+
"package": "typescript"
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"type": "reference",
|
|
607
|
+
"target": 34,
|
|
608
|
+
"name": "ChannelPermissions",
|
|
609
|
+
"package": "@wix/realtime-common"
|
|
610
|
+
}
|
|
611
|
+
]
|
|
498
612
|
}
|
|
499
|
-
}
|
|
613
|
+
}
|
|
614
|
+
]
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"id": 23,
|
|
618
|
+
"name": "default",
|
|
619
|
+
"variant": "declaration",
|
|
620
|
+
"kind": 2048,
|
|
621
|
+
"flags": {},
|
|
622
|
+
"signatures": [
|
|
500
623
|
{
|
|
501
|
-
"id":
|
|
502
|
-
"name": "
|
|
503
|
-
"variant": "
|
|
504
|
-
"kind":
|
|
624
|
+
"id": 24,
|
|
625
|
+
"name": "default",
|
|
626
|
+
"variant": "signature",
|
|
627
|
+
"kind": 4096,
|
|
505
628
|
"flags": {},
|
|
506
629
|
"comment": {
|
|
507
630
|
"summary": [
|
|
508
631
|
{
|
|
509
632
|
"kind": "text",
|
|
510
|
-
"text": "
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
633
|
+
"text": "Sets a permissions handler for default permissions.\n\nThe handler set by the "
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"kind": "code",
|
|
637
|
+
"text": "`default()`"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"kind": "text",
|
|
641
|
+
"text": " function is used for permission checks by the permissions\n router for all channels where an explicit handler has not been added. For channel resources,\n if no explicit handler has been set, the resource will inherit the permissions of its parent\n channel.\n\n For example, suppose you have the following channel, resources, and permissions:\n\n + channel: A, permissions: no handler specified\n + channel: A, resource: 1, permissions: no handler specified\n + channel: A, resource: 2, permissions: handler is specified\n\n\n Permissions will be checked as follows:\n\n + A: use the handler set by "
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"kind": "code",
|
|
645
|
+
"text": "`default()`"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"kind": "text",
|
|
649
|
+
"text": " function\n + A, 1: use the handler set by "
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"kind": "code",
|
|
653
|
+
"text": "`default()`"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"kind": "text",
|
|
657
|
+
"text": " function\n + A, 2: use the handler set by "
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
"kind": "code",
|
|
661
|
+
"text": "`add()`"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"kind": "text",
|
|
665
|
+
"text": " function for this resource\n\n\n If no default handler is set, subscribers to channels without explicit permissions handlers will\n receive the following permissions:\n "
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"kind": "code",
|
|
669
|
+
"text": "`{\"read\": true}`"
|
|
670
|
+
}
|
|
671
|
+
],
|
|
672
|
+
"blockTags": [
|
|
673
|
+
{
|
|
674
|
+
"tag": "@requiredField",
|
|
675
|
+
"content": [
|
|
676
|
+
{
|
|
677
|
+
"kind": "text",
|
|
678
|
+
"text": "handler"
|
|
679
|
+
}
|
|
680
|
+
]
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"tag": "@servicePath",
|
|
684
|
+
"content": [
|
|
685
|
+
{
|
|
686
|
+
"kind": "text",
|
|
687
|
+
"text": "wix-realtime-backend.PermissionsRouter.PermissionsHandler"
|
|
688
|
+
}
|
|
689
|
+
]
|
|
690
|
+
}
|
|
691
|
+
]
|
|
692
|
+
},
|
|
693
|
+
"parameters": [
|
|
694
|
+
{
|
|
695
|
+
"id": 25,
|
|
696
|
+
"name": "handler",
|
|
697
|
+
"variant": "param",
|
|
698
|
+
"kind": 32768,
|
|
699
|
+
"flags": {},
|
|
700
|
+
"comment": {
|
|
701
|
+
"summary": [
|
|
702
|
+
{
|
|
703
|
+
"kind": "text",
|
|
704
|
+
"text": "The name of the\n function or the function expression to use when checking default permissions."
|
|
705
|
+
}
|
|
706
|
+
]
|
|
707
|
+
},
|
|
708
|
+
"type": {
|
|
709
|
+
"type": "reference",
|
|
710
|
+
"target": 26,
|
|
711
|
+
"name": "PermissionsHandler",
|
|
712
|
+
"package": "@wix/sdk_realtime_site"
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
],
|
|
716
|
+
"type": {
|
|
717
|
+
"type": "intrinsic",
|
|
718
|
+
"name": "void"
|
|
522
719
|
}
|
|
523
720
|
}
|
|
524
|
-
]
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
721
|
+
]
|
|
722
|
+
}
|
|
723
|
+
],
|
|
724
|
+
"groups": [
|
|
725
|
+
{
|
|
726
|
+
"title": "Methods",
|
|
727
|
+
"children": [
|
|
728
|
+
15,
|
|
729
|
+
19,
|
|
730
|
+
23
|
|
731
|
+
]
|
|
732
|
+
}
|
|
733
|
+
]
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"id": 26,
|
|
737
|
+
"name": "PermissionsHandler",
|
|
738
|
+
"variant": "declaration",
|
|
739
|
+
"kind": 4194304,
|
|
740
|
+
"flags": {},
|
|
741
|
+
"type": {
|
|
742
|
+
"type": "reflection",
|
|
743
|
+
"declaration": {
|
|
744
|
+
"id": 27,
|
|
745
|
+
"name": "__type",
|
|
746
|
+
"variant": "declaration",
|
|
747
|
+
"kind": 65536,
|
|
748
|
+
"flags": {},
|
|
749
|
+
"signatures": [
|
|
750
|
+
{
|
|
751
|
+
"id": 28,
|
|
752
|
+
"name": "__type",
|
|
753
|
+
"variant": "signature",
|
|
754
|
+
"kind": 4096,
|
|
755
|
+
"flags": {},
|
|
756
|
+
"comment": {
|
|
757
|
+
"summary": [
|
|
758
|
+
{
|
|
759
|
+
"kind": "text",
|
|
760
|
+
"text": "undefined\n\nHandles setting of permissions for a subscriber on a channel or\n channel resource."
|
|
761
|
+
}
|
|
762
|
+
],
|
|
763
|
+
"blockTags": [
|
|
764
|
+
{
|
|
765
|
+
"tag": "@requiredField",
|
|
766
|
+
"content": [
|
|
767
|
+
{
|
|
768
|
+
"kind": "text",
|
|
769
|
+
"text": "channel"
|
|
770
|
+
}
|
|
771
|
+
]
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"tag": "@servicePath",
|
|
775
|
+
"content": [
|
|
776
|
+
{
|
|
777
|
+
"kind": "text",
|
|
778
|
+
"text": "wix-realtime-backend.Channel"
|
|
779
|
+
}
|
|
780
|
+
]
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"tag": "@requiredField",
|
|
784
|
+
"content": [
|
|
785
|
+
{
|
|
786
|
+
"kind": "text",
|
|
787
|
+
"text": "subscriber"
|
|
788
|
+
}
|
|
789
|
+
]
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"tag": "@servicePath",
|
|
793
|
+
"content": [
|
|
794
|
+
{
|
|
795
|
+
"kind": "text",
|
|
796
|
+
"text": "wix-realtime-backend.Subscriber"
|
|
797
|
+
}
|
|
798
|
+
]
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"tag": "@servicePath",
|
|
802
|
+
"content": [
|
|
803
|
+
{
|
|
804
|
+
"kind": "text",
|
|
805
|
+
"text": "wix-realtime-backend.ChannelPermissions"
|
|
806
|
+
}
|
|
807
|
+
]
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"tag": "@servicePath",
|
|
811
|
+
"content": [
|
|
812
|
+
{
|
|
813
|
+
"kind": "text",
|
|
814
|
+
"text": "wix-realtime-backend.ChannelPermissions"
|
|
815
|
+
}
|
|
816
|
+
]
|
|
817
|
+
}
|
|
818
|
+
]
|
|
819
|
+
},
|
|
820
|
+
"parameters": [
|
|
821
|
+
{
|
|
822
|
+
"id": 29,
|
|
823
|
+
"name": "channel",
|
|
824
|
+
"variant": "param",
|
|
825
|
+
"kind": 32768,
|
|
539
826
|
"flags": {},
|
|
540
|
-
"
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
"kind": 1024,
|
|
546
|
-
"flags": {},
|
|
547
|
-
"type": {
|
|
548
|
-
"type": "intrinsic",
|
|
549
|
-
"name": "boolean"
|
|
827
|
+
"comment": {
|
|
828
|
+
"summary": [
|
|
829
|
+
{
|
|
830
|
+
"kind": "text",
|
|
831
|
+
"text": "The channel to grant permissions to."
|
|
550
832
|
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
833
|
+
]
|
|
834
|
+
},
|
|
835
|
+
"type": {
|
|
836
|
+
"type": "reference",
|
|
837
|
+
"target": 31,
|
|
838
|
+
"name": "Channel",
|
|
839
|
+
"package": "@wix/realtime-common"
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"id": 30,
|
|
844
|
+
"name": "subscriber",
|
|
845
|
+
"variant": "param",
|
|
846
|
+
"kind": 32768,
|
|
847
|
+
"flags": {},
|
|
848
|
+
"comment": {
|
|
849
|
+
"summary": [
|
|
850
|
+
{
|
|
851
|
+
"kind": "text",
|
|
852
|
+
"text": "The subscriber to grant permissions to."
|
|
561
853
|
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
"
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
]
|
|
571
|
-
}
|
|
572
|
-
]
|
|
854
|
+
]
|
|
855
|
+
},
|
|
856
|
+
"type": {
|
|
857
|
+
"type": "reference",
|
|
858
|
+
"target": 36,
|
|
859
|
+
"name": "Subscriber",
|
|
860
|
+
"package": "@wix/realtime-common"
|
|
861
|
+
}
|
|
573
862
|
}
|
|
863
|
+
],
|
|
864
|
+
"type": {
|
|
865
|
+
"type": "union",
|
|
866
|
+
"types": [
|
|
867
|
+
{
|
|
868
|
+
"type": "reference",
|
|
869
|
+
"target": {
|
|
870
|
+
"sourceFileName": "../../node_modules/typescript/lib/lib.es5.d.ts",
|
|
871
|
+
"qualifiedName": "Promise"
|
|
872
|
+
},
|
|
873
|
+
"typeArguments": [
|
|
874
|
+
{
|
|
875
|
+
"type": "reference",
|
|
876
|
+
"target": 34,
|
|
877
|
+
"name": "ChannelPermissions",
|
|
878
|
+
"package": "@wix/realtime-common"
|
|
879
|
+
}
|
|
880
|
+
],
|
|
881
|
+
"name": "Promise",
|
|
882
|
+
"package": "typescript"
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"type": "reference",
|
|
886
|
+
"target": 34,
|
|
887
|
+
"name": "ChannelPermissions",
|
|
888
|
+
"package": "@wix/realtime-common"
|
|
889
|
+
}
|
|
890
|
+
]
|
|
574
891
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
"package": "typescript"
|
|
578
|
-
}
|
|
892
|
+
}
|
|
893
|
+
]
|
|
579
894
|
}
|
|
580
|
-
|
|
895
|
+
}
|
|
581
896
|
},
|
|
582
897
|
{
|
|
583
|
-
"id":
|
|
584
|
-
"name": "
|
|
898
|
+
"id": 3,
|
|
899
|
+
"name": "add",
|
|
585
900
|
"variant": "declaration",
|
|
586
|
-
"kind":
|
|
901
|
+
"kind": 64,
|
|
587
902
|
"flags": {},
|
|
588
903
|
"signatures": [
|
|
589
904
|
{
|
|
590
|
-
"id":
|
|
591
|
-
"name": "
|
|
905
|
+
"id": 4,
|
|
906
|
+
"name": "add",
|
|
592
907
|
"variant": "signature",
|
|
593
908
|
"kind": 4096,
|
|
594
909
|
"flags": {},
|
|
595
910
|
"comment": {
|
|
596
|
-
"summary": [
|
|
911
|
+
"summary": [
|
|
912
|
+
{
|
|
913
|
+
"kind": "text",
|
|
914
|
+
"text": "Sets a permissions handler for a specific channel or channel resource.\n\nThe handler set by the "
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"kind": "code",
|
|
918
|
+
"text": "`add()`"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"kind": "text",
|
|
922
|
+
"text": " function is used for permission checks by the permissions\n router for the channel or channel resource specified in the "
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
"kind": "code",
|
|
926
|
+
"text": "`channel`"
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
"kind": "text",
|
|
930
|
+
"text": " property.\n\n Adding a handler to a specific channel without a specified resource adds a handler for\n all permissions checks on the channel and all permissions checks on any of the channel's\n resources that do not have their own permissions handlers.\n\n For example, suppose you have the following channel, resources, and permissions:\n\n + channel: A, permissions: handler X is specified using the "
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
"kind": "code",
|
|
934
|
+
"text": "`add()`"
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
"kind": "text",
|
|
938
|
+
"text": " function\n + channel: A, resource: 1, permissions: handler Y is specified using the "
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"kind": "code",
|
|
942
|
+
"text": "`add()`"
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"kind": "text",
|
|
946
|
+
"text": " function\n + channel: A, resource: 2, permissions: no handler is specified\n\n\n Permissions will be checked as follows:\n\n + A: use handler X\n + A, 1: use handler Y\n + A, 2: use handler X"
|
|
947
|
+
}
|
|
948
|
+
],
|
|
597
949
|
"blockTags": [
|
|
598
950
|
{
|
|
599
|
-
"tag": "@
|
|
951
|
+
"tag": "@requiredField",
|
|
600
952
|
"content": [
|
|
601
953
|
{
|
|
602
954
|
"kind": "text",
|
|
603
|
-
"text": "
|
|
955
|
+
"text": "channel"
|
|
604
956
|
}
|
|
605
957
|
]
|
|
606
958
|
},
|
|
607
959
|
{
|
|
608
|
-
"tag": "@
|
|
960
|
+
"tag": "@servicePath",
|
|
609
961
|
"content": [
|
|
610
962
|
{
|
|
611
963
|
"kind": "text",
|
|
612
|
-
"text": "
|
|
964
|
+
"text": "wix-realtime-backend.Channel"
|
|
613
965
|
}
|
|
614
966
|
]
|
|
615
967
|
},
|
|
616
968
|
{
|
|
617
|
-
"tag": "@
|
|
969
|
+
"tag": "@requiredField",
|
|
618
970
|
"content": [
|
|
619
971
|
{
|
|
620
972
|
"kind": "text",
|
|
621
|
-
"text": "
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
"kind": "text",
|
|
629
|
-
"text": " function is used for permission checks by the permissions\n router for all channels where an explicit handler has not been added. For channel resources,\n if no explicit handler has been set, the resource will inherit the permissions of its parent\n channel.\n\n For example, suppose you have the following channel, resources, and permissions:\n\n + channel: A, permissions: no handler specified\n + channel: A, resource: 1, permissions: no handler specified\n + channel: A, resource: 2, permissions: handler is specified\n\n\n Permissions will be checked as follows:\n\n + A: use the handler set by "
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
"kind": "code",
|
|
633
|
-
"text": "`default()`"
|
|
634
|
-
},
|
|
635
|
-
{
|
|
636
|
-
"kind": "text",
|
|
637
|
-
"text": " function\n + A, 1: use the handler set by "
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
"kind": "code",
|
|
641
|
-
"text": "`default()`"
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
"kind": "text",
|
|
645
|
-
"text": " function\n + A, 2: use the handler set by "
|
|
646
|
-
},
|
|
647
|
-
{
|
|
648
|
-
"kind": "code",
|
|
649
|
-
"text": "`add()`"
|
|
650
|
-
},
|
|
973
|
+
"text": "handler"
|
|
974
|
+
}
|
|
975
|
+
]
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"tag": "@servicePath",
|
|
979
|
+
"content": [
|
|
651
980
|
{
|
|
652
981
|
"kind": "text",
|
|
653
|
-
"text": "
|
|
654
|
-
},
|
|
655
|
-
{
|
|
656
|
-
"kind": "code",
|
|
657
|
-
"text": "`{\"read\": true}`"
|
|
982
|
+
"text": "wix-realtime-backend.PermissionsRouter.PermissionsHandler"
|
|
658
983
|
}
|
|
659
984
|
]
|
|
660
985
|
}
|
|
@@ -662,8 +987,8 @@
|
|
|
662
987
|
},
|
|
663
988
|
"parameters": [
|
|
664
989
|
{
|
|
665
|
-
"id":
|
|
666
|
-
"name": "
|
|
990
|
+
"id": 5,
|
|
991
|
+
"name": "channel",
|
|
667
992
|
"variant": "param",
|
|
668
993
|
"kind": 32768,
|
|
669
994
|
"flags": {},
|
|
@@ -671,75 +996,931 @@
|
|
|
671
996
|
"summary": [
|
|
672
997
|
{
|
|
673
998
|
"kind": "text",
|
|
674
|
-
"text": "
|
|
999
|
+
"text": "Channel or channel resource to add a permissions handler for."
|
|
675
1000
|
}
|
|
676
1001
|
]
|
|
677
1002
|
},
|
|
678
1003
|
"type": {
|
|
679
1004
|
"type": "reference",
|
|
680
|
-
"target":
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
1005
|
+
"target": 31,
|
|
1006
|
+
"name": "Channel",
|
|
1007
|
+
"package": "@wix/realtime-common"
|
|
1008
|
+
}
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"id": 6,
|
|
1012
|
+
"name": "handler",
|
|
1013
|
+
"variant": "param",
|
|
1014
|
+
"kind": 32768,
|
|
1015
|
+
"flags": {},
|
|
1016
|
+
"comment": {
|
|
1017
|
+
"summary": [
|
|
1018
|
+
{
|
|
1019
|
+
"kind": "text",
|
|
1020
|
+
"text": "The name of the\n function or the function expression to use when checking permissions for the specified channel."
|
|
1021
|
+
}
|
|
1022
|
+
]
|
|
1023
|
+
},
|
|
1024
|
+
"type": {
|
|
1025
|
+
"type": "reference",
|
|
1026
|
+
"target": 26,
|
|
1027
|
+
"name": "PermissionsHandler",
|
|
685
1028
|
"package": "@wix/sdk_realtime_site"
|
|
686
1029
|
}
|
|
687
|
-
}
|
|
688
|
-
],
|
|
1030
|
+
}
|
|
1031
|
+
],
|
|
1032
|
+
"type": {
|
|
1033
|
+
"type": "reference",
|
|
1034
|
+
"target": {
|
|
1035
|
+
"sourceFileName": "../../node_modules/typescript/lib/lib.es5.d.ts",
|
|
1036
|
+
"qualifiedName": "Promise"
|
|
1037
|
+
},
|
|
1038
|
+
"typeArguments": [
|
|
1039
|
+
{
|
|
1040
|
+
"type": "intrinsic",
|
|
1041
|
+
"name": "void"
|
|
1042
|
+
}
|
|
1043
|
+
],
|
|
1044
|
+
"name": "Promise",
|
|
1045
|
+
"package": "typescript"
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
]
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
"id": 7,
|
|
1052
|
+
"name": "check",
|
|
1053
|
+
"variant": "declaration",
|
|
1054
|
+
"kind": 64,
|
|
1055
|
+
"flags": {},
|
|
1056
|
+
"signatures": [
|
|
1057
|
+
{
|
|
1058
|
+
"id": 8,
|
|
1059
|
+
"name": "check",
|
|
1060
|
+
"variant": "signature",
|
|
1061
|
+
"kind": 4096,
|
|
1062
|
+
"flags": {},
|
|
1063
|
+
"comment": {
|
|
1064
|
+
"summary": [
|
|
1065
|
+
{
|
|
1066
|
+
"kind": "text",
|
|
1067
|
+
"text": "Checks the permissions for a subscriber on a channel or channel resource.\n\nThe "
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
"kind": "code",
|
|
1071
|
+
"text": "`check()`"
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
"kind": "text",
|
|
1075
|
+
"text": " function returns a Promise that resolves to the permissions for the\n specified user on the specified channel or channel resource.\n\n The check is performed as follows:\n\n 1. If a permissions handler for the specified channel or channel resource exists,\n it's invoked and its result is returned.\n 1. If no handler is found for the specified channel resource, but a handler\n exists for the resource's channel, it's invoked and its result is returned.\n 1. If no handler is found for the specified channel, but a default permissions handler\n exists, it's invoked and its result is returned.\n 1. If the default handler has not been found, the default permissions are returned.\n\n The default permissions are:\n "
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"kind": "code",
|
|
1079
|
+
"text": "`{\"read\": true}`"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"kind": "text",
|
|
1083
|
+
"text": "\n\n\n This function is typically called in the body of the\n ["
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"kind": "code",
|
|
1087
|
+
"text": "`realtime_check_permission()`"
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
"kind": "text",
|
|
1091
|
+
"text": "](#realtime_check_permission) function like so:\n\n "
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
"kind": "code",
|
|
1095
|
+
"text": "```JavaScript\n export function realtime_check_permission(channel, subscriber) {\n return permissionsRouter.check(channel,subscriber);\n }\n ```"
|
|
1096
|
+
}
|
|
1097
|
+
],
|
|
1098
|
+
"blockTags": [
|
|
1099
|
+
{
|
|
1100
|
+
"tag": "@requiredField",
|
|
1101
|
+
"content": [
|
|
1102
|
+
{
|
|
1103
|
+
"kind": "text",
|
|
1104
|
+
"text": "channel"
|
|
1105
|
+
}
|
|
1106
|
+
]
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
"tag": "@servicePath",
|
|
1110
|
+
"content": [
|
|
1111
|
+
{
|
|
1112
|
+
"kind": "text",
|
|
1113
|
+
"text": "wix-realtime-backend.Channel"
|
|
1114
|
+
}
|
|
1115
|
+
]
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
"tag": "@requiredField",
|
|
1119
|
+
"content": [
|
|
1120
|
+
{
|
|
1121
|
+
"kind": "text",
|
|
1122
|
+
"text": "subscriber"
|
|
1123
|
+
}
|
|
1124
|
+
]
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
"tag": "@servicePath",
|
|
1128
|
+
"content": [
|
|
1129
|
+
{
|
|
1130
|
+
"kind": "text",
|
|
1131
|
+
"text": "wix-realtime-backend.Subscriber"
|
|
1132
|
+
}
|
|
1133
|
+
]
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
"tag": "@returns",
|
|
1137
|
+
"content": [
|
|
1138
|
+
{
|
|
1139
|
+
"kind": "text",
|
|
1140
|
+
"text": "The permissions granted to the subscriber on the channel or channel resource."
|
|
1141
|
+
}
|
|
1142
|
+
]
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
"tag": "@servicePath",
|
|
1146
|
+
"content": [
|
|
1147
|
+
{
|
|
1148
|
+
"kind": "text",
|
|
1149
|
+
"text": "wix-realtime-backend.ChannelPermissions"
|
|
1150
|
+
}
|
|
1151
|
+
]
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
"tag": "@servicePath",
|
|
1155
|
+
"content": [
|
|
1156
|
+
{
|
|
1157
|
+
"kind": "text",
|
|
1158
|
+
"text": "wix-realtime-backend.ChannelPermissions"
|
|
1159
|
+
}
|
|
1160
|
+
]
|
|
1161
|
+
}
|
|
1162
|
+
]
|
|
1163
|
+
},
|
|
1164
|
+
"parameters": [
|
|
1165
|
+
{
|
|
1166
|
+
"id": 9,
|
|
1167
|
+
"name": "channel",
|
|
1168
|
+
"variant": "param",
|
|
1169
|
+
"kind": 32768,
|
|
1170
|
+
"flags": {},
|
|
1171
|
+
"comment": {
|
|
1172
|
+
"summary": [
|
|
1173
|
+
{
|
|
1174
|
+
"kind": "text",
|
|
1175
|
+
"text": "Channel to check permissions for."
|
|
1176
|
+
}
|
|
1177
|
+
]
|
|
1178
|
+
},
|
|
1179
|
+
"type": {
|
|
1180
|
+
"type": "reference",
|
|
1181
|
+
"target": 31,
|
|
1182
|
+
"name": "Channel",
|
|
1183
|
+
"package": "@wix/realtime-common"
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
"id": 10,
|
|
1188
|
+
"name": "subscriber",
|
|
1189
|
+
"variant": "param",
|
|
1190
|
+
"kind": 32768,
|
|
1191
|
+
"flags": {},
|
|
1192
|
+
"comment": {
|
|
1193
|
+
"summary": [
|
|
1194
|
+
{
|
|
1195
|
+
"kind": "text",
|
|
1196
|
+
"text": "Subscriber to check permissions for."
|
|
1197
|
+
}
|
|
1198
|
+
]
|
|
1199
|
+
},
|
|
1200
|
+
"type": {
|
|
1201
|
+
"type": "reference",
|
|
1202
|
+
"target": 36,
|
|
1203
|
+
"name": "Subscriber",
|
|
1204
|
+
"package": "@wix/realtime-common"
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
],
|
|
1208
|
+
"type": {
|
|
1209
|
+
"type": "reference",
|
|
1210
|
+
"target": {
|
|
1211
|
+
"sourceFileName": "../../node_modules/typescript/lib/lib.es5.d.ts",
|
|
1212
|
+
"qualifiedName": "Promise"
|
|
1213
|
+
},
|
|
1214
|
+
"typeArguments": [
|
|
1215
|
+
{
|
|
1216
|
+
"type": "reference",
|
|
1217
|
+
"target": 34,
|
|
1218
|
+
"name": "ChannelPermissions",
|
|
1219
|
+
"package": "@wix/realtime-common"
|
|
1220
|
+
}
|
|
1221
|
+
],
|
|
1222
|
+
"name": "Promise",
|
|
1223
|
+
"package": "typescript"
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
]
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
"id": 11,
|
|
1230
|
+
"name": "default_reserved_word",
|
|
1231
|
+
"variant": "declaration",
|
|
1232
|
+
"kind": 64,
|
|
1233
|
+
"flags": {},
|
|
1234
|
+
"signatures": [
|
|
1235
|
+
{
|
|
1236
|
+
"id": 12,
|
|
1237
|
+
"name": "default_reserved_word",
|
|
1238
|
+
"variant": "signature",
|
|
1239
|
+
"kind": 4096,
|
|
1240
|
+
"flags": {},
|
|
1241
|
+
"comment": {
|
|
1242
|
+
"summary": [
|
|
1243
|
+
{
|
|
1244
|
+
"kind": "text",
|
|
1245
|
+
"text": "Sets a permissions handler for default permissions.\n\nThe handler set by the "
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
"kind": "code",
|
|
1249
|
+
"text": "`default()`"
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
"kind": "text",
|
|
1253
|
+
"text": " function is used for permission checks by the permissions\n router for all channels where an explicit handler has not been added. For channel resources,\n if no explicit handler has been set, the resource will inherit the permissions of its parent\n channel.\n\n For example, suppose you have the following channel, resources, and permissions:\n\n + channel: A, permissions: no handler specified\n + channel: A, resource: 1, permissions: no handler specified\n + channel: A, resource: 2, permissions: handler is specified\n\n\n Permissions will be checked as follows:\n\n + A: use the handler set by "
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"kind": "code",
|
|
1257
|
+
"text": "`default()`"
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
"kind": "text",
|
|
1261
|
+
"text": " function\n + A, 1: use the handler set by "
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
"kind": "code",
|
|
1265
|
+
"text": "`default()`"
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
"kind": "text",
|
|
1269
|
+
"text": " function\n + A, 2: use the handler set by "
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
"kind": "code",
|
|
1273
|
+
"text": "`add()`"
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
"kind": "text",
|
|
1277
|
+
"text": " function for this resource\n\n\n If no default handler is set, subscribers to channels without explicit permissions handlers will\n receive the following permissions:\n "
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
"kind": "code",
|
|
1281
|
+
"text": "`{\"read\": true}`"
|
|
1282
|
+
}
|
|
1283
|
+
],
|
|
1284
|
+
"blockTags": [
|
|
1285
|
+
{
|
|
1286
|
+
"tag": "@requiredField",
|
|
1287
|
+
"content": [
|
|
1288
|
+
{
|
|
1289
|
+
"kind": "text",
|
|
1290
|
+
"text": "handler"
|
|
1291
|
+
}
|
|
1292
|
+
]
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
"tag": "@servicePath",
|
|
1296
|
+
"content": [
|
|
1297
|
+
{
|
|
1298
|
+
"kind": "text",
|
|
1299
|
+
"text": "wix-realtime-backend.PermissionsRouter.PermissionsHandler"
|
|
1300
|
+
}
|
|
1301
|
+
]
|
|
1302
|
+
}
|
|
1303
|
+
]
|
|
1304
|
+
},
|
|
1305
|
+
"parameters": [
|
|
1306
|
+
{
|
|
1307
|
+
"id": 13,
|
|
1308
|
+
"name": "handler",
|
|
1309
|
+
"variant": "param",
|
|
1310
|
+
"kind": 32768,
|
|
1311
|
+
"flags": {},
|
|
1312
|
+
"comment": {
|
|
1313
|
+
"summary": [
|
|
1314
|
+
{
|
|
1315
|
+
"kind": "text",
|
|
1316
|
+
"text": "The name of the\n function or the function expression to use when checking default permissions."
|
|
1317
|
+
}
|
|
1318
|
+
]
|
|
1319
|
+
},
|
|
1320
|
+
"type": {
|
|
1321
|
+
"type": "reference",
|
|
1322
|
+
"target": 26,
|
|
1323
|
+
"name": "PermissionsHandler",
|
|
1324
|
+
"package": "@wix/sdk_realtime_site"
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
],
|
|
1328
|
+
"type": {
|
|
1329
|
+
"type": "intrinsic",
|
|
1330
|
+
"name": "void"
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
]
|
|
1334
|
+
}
|
|
1335
|
+
],
|
|
1336
|
+
"groups": [
|
|
1337
|
+
{
|
|
1338
|
+
"title": "Interfaces",
|
|
1339
|
+
"children": [
|
|
1340
|
+
14
|
|
1341
|
+
]
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
"title": "Type Aliases",
|
|
1345
|
+
"children": [
|
|
1346
|
+
26
|
|
1347
|
+
]
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
"title": "Functions",
|
|
1351
|
+
"children": [
|
|
1352
|
+
3,
|
|
1353
|
+
7,
|
|
1354
|
+
11
|
|
1355
|
+
]
|
|
1356
|
+
}
|
|
1357
|
+
]
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
"id": 31,
|
|
1361
|
+
"name": "Channel",
|
|
1362
|
+
"variant": "declaration",
|
|
1363
|
+
"kind": 256,
|
|
1364
|
+
"flags": {},
|
|
1365
|
+
"comment": {
|
|
1366
|
+
"summary": [
|
|
1367
|
+
{
|
|
1368
|
+
"kind": "text",
|
|
1369
|
+
"text": "An object representing a realtime channel."
|
|
1370
|
+
}
|
|
1371
|
+
]
|
|
1372
|
+
},
|
|
1373
|
+
"children": [
|
|
1374
|
+
{
|
|
1375
|
+
"id": 32,
|
|
1376
|
+
"name": "name",
|
|
1377
|
+
"variant": "declaration",
|
|
1378
|
+
"kind": 1024,
|
|
1379
|
+
"flags": {},
|
|
1380
|
+
"comment": {
|
|
1381
|
+
"summary": [
|
|
1382
|
+
{
|
|
1383
|
+
"kind": "text",
|
|
1384
|
+
"text": "Channel name. Only alphanumeric characters, hyphens, and underscores are allowed.\nThe combined length of "
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"kind": "code",
|
|
1388
|
+
"text": "`name`"
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
"kind": "text",
|
|
1392
|
+
"text": " and "
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
"kind": "code",
|
|
1396
|
+
"text": "`resourceId`"
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
"kind": "text",
|
|
1400
|
+
"text": " cannot exceed 140 characters."
|
|
1401
|
+
}
|
|
1402
|
+
]
|
|
1403
|
+
},
|
|
1404
|
+
"type": {
|
|
1405
|
+
"type": "intrinsic",
|
|
1406
|
+
"name": "string"
|
|
1407
|
+
}
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
"id": 33,
|
|
1411
|
+
"name": "resourceId",
|
|
1412
|
+
"variant": "declaration",
|
|
1413
|
+
"kind": 1024,
|
|
1414
|
+
"flags": {
|
|
1415
|
+
"isOptional": true
|
|
1416
|
+
},
|
|
1417
|
+
"comment": {
|
|
1418
|
+
"summary": [
|
|
1419
|
+
{
|
|
1420
|
+
"kind": "text",
|
|
1421
|
+
"text": "ID of a specific channel resource."
|
|
1422
|
+
}
|
|
1423
|
+
]
|
|
1424
|
+
},
|
|
1425
|
+
"type": {
|
|
1426
|
+
"type": "intrinsic",
|
|
1427
|
+
"name": "string"
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
],
|
|
1431
|
+
"groups": [
|
|
1432
|
+
{
|
|
1433
|
+
"title": "Properties",
|
|
1434
|
+
"children": [
|
|
1435
|
+
32,
|
|
1436
|
+
33
|
|
1437
|
+
]
|
|
1438
|
+
}
|
|
1439
|
+
]
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"id": 34,
|
|
1443
|
+
"name": "ChannelPermissions",
|
|
1444
|
+
"variant": "declaration",
|
|
1445
|
+
"kind": 256,
|
|
1446
|
+
"flags": {},
|
|
1447
|
+
"comment": {
|
|
1448
|
+
"summary": [
|
|
1449
|
+
{
|
|
1450
|
+
"kind": "text",
|
|
1451
|
+
"text": "An object containing permission settings for a channel."
|
|
1452
|
+
}
|
|
1453
|
+
]
|
|
1454
|
+
},
|
|
1455
|
+
"children": [
|
|
1456
|
+
{
|
|
1457
|
+
"id": 35,
|
|
1458
|
+
"name": "read",
|
|
1459
|
+
"variant": "declaration",
|
|
1460
|
+
"kind": 1024,
|
|
1461
|
+
"flags": {
|
|
1462
|
+
"isOptional": true
|
|
1463
|
+
},
|
|
1464
|
+
"comment": {
|
|
1465
|
+
"summary": [
|
|
1466
|
+
{
|
|
1467
|
+
"kind": "text",
|
|
1468
|
+
"text": "Whether the subscriber has read permissions. Defaults to "
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
"kind": "code",
|
|
1472
|
+
"text": "`true`"
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
"kind": "text",
|
|
1476
|
+
"text": "."
|
|
1477
|
+
}
|
|
1478
|
+
]
|
|
1479
|
+
},
|
|
1480
|
+
"type": {
|
|
1481
|
+
"type": "intrinsic",
|
|
1482
|
+
"name": "boolean"
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
],
|
|
1486
|
+
"groups": [
|
|
1487
|
+
{
|
|
1488
|
+
"title": "Properties",
|
|
1489
|
+
"children": [
|
|
1490
|
+
35
|
|
1491
|
+
]
|
|
1492
|
+
}
|
|
1493
|
+
]
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
"id": 39,
|
|
1497
|
+
"name": "PublishOptions",
|
|
1498
|
+
"variant": "declaration",
|
|
1499
|
+
"kind": 256,
|
|
1500
|
+
"flags": {},
|
|
1501
|
+
"comment": {
|
|
1502
|
+
"summary": [
|
|
1503
|
+
{
|
|
1504
|
+
"kind": "text",
|
|
1505
|
+
"text": "An object containing options for publishing."
|
|
1506
|
+
}
|
|
1507
|
+
]
|
|
1508
|
+
},
|
|
1509
|
+
"children": [
|
|
1510
|
+
{
|
|
1511
|
+
"id": 41,
|
|
1512
|
+
"name": "includePublisher",
|
|
1513
|
+
"variant": "declaration",
|
|
1514
|
+
"kind": 1024,
|
|
1515
|
+
"flags": {
|
|
1516
|
+
"isOptional": true
|
|
1517
|
+
},
|
|
1518
|
+
"comment": {
|
|
1519
|
+
"summary": [
|
|
1520
|
+
{
|
|
1521
|
+
"kind": "text",
|
|
1522
|
+
"text": "Whether to include information about the message publisher.\nDefaults to "
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
"kind": "code",
|
|
1526
|
+
"text": "`false`"
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"kind": "text",
|
|
1530
|
+
"text": "."
|
|
1531
|
+
}
|
|
1532
|
+
]
|
|
1533
|
+
},
|
|
1534
|
+
"type": {
|
|
1535
|
+
"type": "intrinsic",
|
|
1536
|
+
"name": "boolean"
|
|
1537
|
+
}
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
"id": 40,
|
|
1541
|
+
"name": "users",
|
|
1542
|
+
"variant": "declaration",
|
|
1543
|
+
"kind": 1024,
|
|
1544
|
+
"flags": {
|
|
1545
|
+
"isOptional": true
|
|
1546
|
+
},
|
|
1547
|
+
"comment": {
|
|
1548
|
+
"summary": [
|
|
1549
|
+
{
|
|
1550
|
+
"kind": "text",
|
|
1551
|
+
"text": "User IDs of specific users to publish to."
|
|
1552
|
+
}
|
|
1553
|
+
]
|
|
1554
|
+
},
|
|
1555
|
+
"type": {
|
|
1556
|
+
"type": "array",
|
|
1557
|
+
"elementType": {
|
|
1558
|
+
"type": "intrinsic",
|
|
1559
|
+
"name": "string"
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
],
|
|
1564
|
+
"groups": [
|
|
1565
|
+
{
|
|
1566
|
+
"title": "Properties",
|
|
1567
|
+
"children": [
|
|
1568
|
+
41,
|
|
1569
|
+
40
|
|
1570
|
+
]
|
|
1571
|
+
}
|
|
1572
|
+
]
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"id": 36,
|
|
1576
|
+
"name": "Subscriber",
|
|
1577
|
+
"variant": "declaration",
|
|
1578
|
+
"kind": 256,
|
|
1579
|
+
"flags": {},
|
|
1580
|
+
"comment": {
|
|
1581
|
+
"summary": [
|
|
1582
|
+
{
|
|
1583
|
+
"kind": "text",
|
|
1584
|
+
"text": "An object representing a channel subscriber."
|
|
1585
|
+
}
|
|
1586
|
+
]
|
|
1587
|
+
},
|
|
1588
|
+
"children": [
|
|
1589
|
+
{
|
|
1590
|
+
"id": 37,
|
|
1591
|
+
"name": "id",
|
|
1592
|
+
"variant": "declaration",
|
|
1593
|
+
"kind": 1024,
|
|
1594
|
+
"flags": {},
|
|
1595
|
+
"comment": {
|
|
1596
|
+
"summary": [
|
|
1597
|
+
{
|
|
1598
|
+
"kind": "text",
|
|
1599
|
+
"text": "The subscriber's user ID."
|
|
1600
|
+
}
|
|
1601
|
+
],
|
|
1602
|
+
"blockTags": [
|
|
1603
|
+
{
|
|
1604
|
+
"tag": "@requiredField",
|
|
1605
|
+
"content": [
|
|
1606
|
+
{
|
|
1607
|
+
"kind": "text",
|
|
1608
|
+
"text": "id"
|
|
1609
|
+
}
|
|
1610
|
+
]
|
|
1611
|
+
}
|
|
1612
|
+
]
|
|
1613
|
+
},
|
|
1614
|
+
"type": {
|
|
1615
|
+
"type": "intrinsic",
|
|
1616
|
+
"name": "string"
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
"id": 38,
|
|
1621
|
+
"name": "type",
|
|
1622
|
+
"variant": "declaration",
|
|
1623
|
+
"kind": 1024,
|
|
1624
|
+
"flags": {},
|
|
1625
|
+
"comment": {
|
|
1626
|
+
"summary": [
|
|
1627
|
+
{
|
|
1628
|
+
"kind": "text",
|
|
1629
|
+
"text": "The type of subscriber."
|
|
1630
|
+
}
|
|
1631
|
+
],
|
|
1632
|
+
"blockTags": [
|
|
1633
|
+
{
|
|
1634
|
+
"tag": "@requiredField",
|
|
1635
|
+
"content": [
|
|
1636
|
+
{
|
|
1637
|
+
"kind": "text",
|
|
1638
|
+
"text": "type"
|
|
1639
|
+
}
|
|
1640
|
+
]
|
|
1641
|
+
}
|
|
1642
|
+
]
|
|
1643
|
+
},
|
|
1644
|
+
"type": {
|
|
1645
|
+
"type": "reference",
|
|
1646
|
+
"target": {
|
|
1647
|
+
"sourceFileName": "../realtime-common/cjs/build/types.d.ts",
|
|
1648
|
+
"qualifiedName": "SubscriberType"
|
|
1649
|
+
},
|
|
1650
|
+
"name": "SubscriberType",
|
|
1651
|
+
"package": "@wix/realtime-common"
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
],
|
|
1655
|
+
"groups": [
|
|
1656
|
+
{
|
|
1657
|
+
"title": "Properties",
|
|
1658
|
+
"children": [
|
|
1659
|
+
37,
|
|
1660
|
+
38
|
|
1661
|
+
]
|
|
1662
|
+
}
|
|
1663
|
+
]
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
"id": 51,
|
|
1667
|
+
"name": "permissionsRouter",
|
|
1668
|
+
"variant": "declaration",
|
|
1669
|
+
"kind": 4194304,
|
|
1670
|
+
"flags": {
|
|
1671
|
+
"isReadonly": true
|
|
1672
|
+
},
|
|
1673
|
+
"comment": {
|
|
1674
|
+
"summary": [
|
|
1675
|
+
{
|
|
1676
|
+
"kind": "text",
|
|
1677
|
+
"text": "Returns the realtime permissions router.\n\nUse the permissions router to define the permissions you want to grant to subscribers\n on channels or channel resources. You can set permissions on the channel and channel\n resource level. If you do not define permissions for a particular channel resource,\n that resource inherits the permissions of its parent channel.\n\n Typically you use the permissions router in the **realtime-permissions.js** file in\n your site's backend to:\n\n + Set default permissions for all channels and channel resources where no explicit\n permissions are defined.\n + Add permissions logic for specific channels or channel resources.\n + Check the permissions for a specific subscriber on a specific channel.\n\n > **Note:** Although it is recommended, you do not need to use the permissions router to set permissions. You can also define all your permissions logic in the ["
|
|
1678
|
+
},
|
|
1679
|
+
{
|
|
1680
|
+
"kind": "code",
|
|
1681
|
+
"text": "`realtime_check_permission()`"
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
"kind": "text",
|
|
1685
|
+
"text": "](#realtime_check_permission) function."
|
|
1686
|
+
}
|
|
1687
|
+
],
|
|
1688
|
+
"blockTags": [
|
|
1689
|
+
{
|
|
1690
|
+
"tag": "@servicePath",
|
|
1691
|
+
"content": [
|
|
1692
|
+
{
|
|
1693
|
+
"kind": "text",
|
|
1694
|
+
"text": "wix-realtime-backend.PermissionsRouter"
|
|
1695
|
+
}
|
|
1696
|
+
]
|
|
1697
|
+
}
|
|
1698
|
+
]
|
|
1699
|
+
},
|
|
1700
|
+
"type": {
|
|
1701
|
+
"type": "reference",
|
|
1702
|
+
"target": 14,
|
|
1703
|
+
"name": "PermissionsRouter",
|
|
1704
|
+
"package": "@wix/sdk_realtime_site"
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
{
|
|
1708
|
+
"id": 42,
|
|
1709
|
+
"name": "publish",
|
|
1710
|
+
"variant": "declaration",
|
|
1711
|
+
"kind": 64,
|
|
1712
|
+
"flags": {},
|
|
1713
|
+
"signatures": [
|
|
1714
|
+
{
|
|
1715
|
+
"id": 43,
|
|
1716
|
+
"name": "publish",
|
|
1717
|
+
"variant": "signature",
|
|
1718
|
+
"kind": 4096,
|
|
1719
|
+
"flags": {},
|
|
1720
|
+
"comment": {
|
|
1721
|
+
"summary": [
|
|
1722
|
+
{
|
|
1723
|
+
"kind": "text",
|
|
1724
|
+
"text": "Publishes a message to a channel or channel resource.\n\nThe "
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
"kind": "code",
|
|
1728
|
+
"text": "`publish()`"
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
"kind": "text",
|
|
1732
|
+
"text": " function publishes a message to the specified channel or\n channel resource.\n\n When site visitors subscribe to a channel, they do not\n receive messages published to a resource on that same channel. Similarly,\n when site visitors subscribe to a channel resource, they do not\n receive messages published to that same channel without a specified resource.\n\n To publish a message to specific users only, specify the users by ID in\n the "
|
|
1733
|
+
},
|
|
1734
|
+
{
|
|
1735
|
+
"kind": "code",
|
|
1736
|
+
"text": "`PublishOptions`"
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
"kind": "text",
|
|
1740
|
+
"text": " object sent to the "
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
"kind": "code",
|
|
1744
|
+
"text": "`options`"
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
"kind": "text",
|
|
1748
|
+
"text": " parameter.\n\n To include the ID of the user who triggered the publish in the published message,\n set the "
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
"kind": "code",
|
|
1752
|
+
"text": "`includePublisher`"
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
"kind": "text",
|
|
1756
|
+
"text": " property of the "
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
"kind": "code",
|
|
1760
|
+
"text": "`PublishOptions`"
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
"kind": "text",
|
|
1764
|
+
"text": " object to "
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
"kind": "code",
|
|
1768
|
+
"text": "`true`"
|
|
1769
|
+
},
|
|
1770
|
+
{
|
|
1771
|
+
"kind": "text",
|
|
1772
|
+
"text": "."
|
|
1773
|
+
}
|
|
1774
|
+
],
|
|
1775
|
+
"blockTags": [
|
|
1776
|
+
{
|
|
1777
|
+
"tag": "@requiredField",
|
|
1778
|
+
"content": [
|
|
1779
|
+
{
|
|
1780
|
+
"kind": "text",
|
|
1781
|
+
"text": "channel"
|
|
1782
|
+
}
|
|
1783
|
+
]
|
|
1784
|
+
},
|
|
1785
|
+
{
|
|
1786
|
+
"tag": "@servicePath",
|
|
1787
|
+
"content": [
|
|
1788
|
+
{
|
|
1789
|
+
"kind": "text",
|
|
1790
|
+
"text": "wix-realtime-backend.Channel"
|
|
1791
|
+
}
|
|
1792
|
+
]
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
"tag": "@requiredField",
|
|
1796
|
+
"content": [
|
|
1797
|
+
{
|
|
1798
|
+
"kind": "text",
|
|
1799
|
+
"text": "payload"
|
|
1800
|
+
}
|
|
1801
|
+
]
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"tag": "@servicePath",
|
|
1805
|
+
"content": [
|
|
1806
|
+
{
|
|
1807
|
+
"kind": "text",
|
|
1808
|
+
"text": "wix-realtime-backend.PublishOptions"
|
|
1809
|
+
}
|
|
1810
|
+
]
|
|
1811
|
+
},
|
|
1812
|
+
{
|
|
1813
|
+
"tag": "@returns",
|
|
1814
|
+
"content": [
|
|
1815
|
+
{
|
|
1816
|
+
"kind": "text",
|
|
1817
|
+
"text": "When the message is published to the channel or channel resource, "
|
|
1818
|
+
},
|
|
1819
|
+
{
|
|
1820
|
+
"kind": "code",
|
|
1821
|
+
"text": "`void`"
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
"kind": "text",
|
|
1825
|
+
"text": " is returned. Does not indicate that the message was received."
|
|
1826
|
+
}
|
|
1827
|
+
]
|
|
1828
|
+
}
|
|
1829
|
+
]
|
|
1830
|
+
},
|
|
1831
|
+
"parameters": [
|
|
1832
|
+
{
|
|
1833
|
+
"id": 44,
|
|
1834
|
+
"name": "channel",
|
|
1835
|
+
"variant": "param",
|
|
1836
|
+
"kind": 32768,
|
|
1837
|
+
"flags": {},
|
|
1838
|
+
"comment": {
|
|
1839
|
+
"summary": [
|
|
1840
|
+
{
|
|
1841
|
+
"kind": "text",
|
|
1842
|
+
"text": "The channel, and optionally the resource, to\n publish to."
|
|
1843
|
+
}
|
|
1844
|
+
]
|
|
1845
|
+
},
|
|
1846
|
+
"type": {
|
|
1847
|
+
"type": "reference",
|
|
1848
|
+
"target": 31,
|
|
1849
|
+
"name": "Channel",
|
|
1850
|
+
"package": "@wix/realtime-common"
|
|
1851
|
+
}
|
|
1852
|
+
},
|
|
1853
|
+
{
|
|
1854
|
+
"id": 45,
|
|
1855
|
+
"name": "payload",
|
|
1856
|
+
"variant": "param",
|
|
1857
|
+
"kind": 32768,
|
|
1858
|
+
"flags": {},
|
|
1859
|
+
"comment": {
|
|
1860
|
+
"summary": [
|
|
1861
|
+
{
|
|
1862
|
+
"kind": "text",
|
|
1863
|
+
"text": "Message payload.\n Max: 10kb"
|
|
1864
|
+
}
|
|
1865
|
+
]
|
|
1866
|
+
},
|
|
1867
|
+
"type": {
|
|
1868
|
+
"type": "intrinsic",
|
|
1869
|
+
"name": "any"
|
|
1870
|
+
}
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
"id": 46,
|
|
1874
|
+
"name": "options",
|
|
1875
|
+
"variant": "param",
|
|
1876
|
+
"kind": 32768,
|
|
1877
|
+
"flags": {
|
|
1878
|
+
"isOptional": true
|
|
1879
|
+
},
|
|
1880
|
+
"comment": {
|
|
1881
|
+
"summary": [
|
|
1882
|
+
{
|
|
1883
|
+
"kind": "text",
|
|
1884
|
+
"text": "Options to use when publishing."
|
|
1885
|
+
}
|
|
1886
|
+
]
|
|
1887
|
+
},
|
|
689
1888
|
"type": {
|
|
1889
|
+
"type": "reference",
|
|
1890
|
+
"target": 39,
|
|
1891
|
+
"name": "PublishOptions",
|
|
1892
|
+
"package": "@wix/sdk_realtime_site"
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
],
|
|
1896
|
+
"type": {
|
|
1897
|
+
"type": "reference",
|
|
1898
|
+
"target": {
|
|
1899
|
+
"sourceFileName": "../../node_modules/typescript/lib/lib.es5.d.ts",
|
|
1900
|
+
"qualifiedName": "Promise"
|
|
1901
|
+
},
|
|
1902
|
+
"typeArguments": [
|
|
1903
|
+
{
|
|
690
1904
|
"type": "intrinsic",
|
|
691
1905
|
"name": "void"
|
|
692
1906
|
}
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
"groups": [
|
|
698
|
-
{
|
|
699
|
-
"title": "Methods",
|
|
700
|
-
"children": [
|
|
701
|
-
8,
|
|
702
|
-
15,
|
|
703
|
-
12
|
|
704
|
-
]
|
|
1907
|
+
],
|
|
1908
|
+
"name": "Promise",
|
|
1909
|
+
"package": "typescript"
|
|
1910
|
+
}
|
|
705
1911
|
}
|
|
706
1912
|
]
|
|
707
1913
|
},
|
|
708
1914
|
{
|
|
709
|
-
"id":
|
|
710
|
-
"name": "
|
|
711
|
-
"variant": "declaration",
|
|
712
|
-
"kind": 32,
|
|
713
|
-
"flags": {
|
|
714
|
-
"isConst": true
|
|
715
|
-
},
|
|
716
|
-
"comment": {
|
|
717
|
-
"summary": [
|
|
718
|
-
{
|
|
719
|
-
"kind": "text",
|
|
720
|
-
"text": "Implementation of the IPermissionsRouter interface."
|
|
721
|
-
}
|
|
722
|
-
]
|
|
723
|
-
},
|
|
724
|
-
"type": {
|
|
725
|
-
"type": "reference",
|
|
726
|
-
"target": 7,
|
|
727
|
-
"name": "PermissionsRouter",
|
|
728
|
-
"package": "@wix/sdk_realtime_site"
|
|
729
|
-
}
|
|
730
|
-
},
|
|
731
|
-
{
|
|
732
|
-
"id": 2,
|
|
733
|
-
"name": "publish",
|
|
1915
|
+
"id": 47,
|
|
1916
|
+
"name": "realtime_check_permission",
|
|
734
1917
|
"variant": "declaration",
|
|
735
1918
|
"kind": 64,
|
|
736
|
-
"flags": {
|
|
737
|
-
"isPublic": true
|
|
738
|
-
},
|
|
1919
|
+
"flags": {},
|
|
739
1920
|
"signatures": [
|
|
740
1921
|
{
|
|
741
|
-
"id":
|
|
742
|
-
"name": "
|
|
1922
|
+
"id": 48,
|
|
1923
|
+
"name": "realtime_check_permission",
|
|
743
1924
|
"variant": "signature",
|
|
744
1925
|
"kind": 4096,
|
|
745
1926
|
"flags": {},
|
|
@@ -747,80 +1928,110 @@
|
|
|
747
1928
|
"summary": [
|
|
748
1929
|
{
|
|
749
1930
|
"kind": "text",
|
|
750
|
-
"text": "
|
|
751
|
-
},
|
|
752
|
-
{
|
|
753
|
-
"kind": "code",
|
|
754
|
-
"text": "`publish()`"
|
|
755
|
-
},
|
|
756
|
-
{
|
|
757
|
-
"kind": "text",
|
|
758
|
-
"text": " function publishes a message to the specified channel or\n channel resource.\n\n When site visitors subscribe to a channel, they do not\n receive messages published to a resource on that same channel. Similarly,\n when site visitors subscribe to a channel resource, they do not\n receive messages published to that same channel without a specified resource.\n\n To publish a message to specific users only, specify the users by ID in\n the "
|
|
1931
|
+
"text": "Checks permissions for a subscriber on a channel or channel resource.\n\nThe "
|
|
759
1932
|
},
|
|
760
1933
|
{
|
|
761
1934
|
"kind": "code",
|
|
762
|
-
"text": "`
|
|
1935
|
+
"text": "`realtime_check_permission`"
|
|
763
1936
|
},
|
|
764
1937
|
{
|
|
765
1938
|
"kind": "text",
|
|
766
|
-
"text": "
|
|
1939
|
+
"text": " hook is triggered when a site visitor subscribes\n to a channel to check what permissions the subscriber will have.\n\n The "
|
|
767
1940
|
},
|
|
768
1941
|
{
|
|
769
1942
|
"kind": "code",
|
|
770
|
-
"text": "`
|
|
1943
|
+
"text": "`realtime_check_permission()`"
|
|
771
1944
|
},
|
|
772
1945
|
{
|
|
773
1946
|
"kind": "text",
|
|
774
|
-
"text": "
|
|
1947
|
+
"text": " function is not a function that you call from\n your code. You define the function in a file named **realtime-permissions.js**\n in your site's Backend section.\n\n\n\n__Important:__\n- If this function isn't defined, all subscribers will receive the default permissions: "
|
|
775
1948
|
},
|
|
776
1949
|
{
|
|
777
1950
|
"kind": "code",
|
|
778
|
-
"text": "`
|
|
1951
|
+
"text": "`{\"read\": true}`"
|
|
779
1952
|
},
|
|
780
1953
|
{
|
|
781
1954
|
"kind": "text",
|
|
782
|
-
"text": "
|
|
1955
|
+
"text": ".\n- In Wix Studio, you don't need to define this function, but you must create a backend file named **realtime-permissions.js**. Without this file, subscriptions will fail.\n\n\n\n\n Implement permissions logic for channels and subscribers by either:\n\n + Including all permissions logic in the body of this function.\n + Use the "
|
|
783
1956
|
},
|
|
784
1957
|
{
|
|
785
1958
|
"kind": "code",
|
|
786
|
-
"text": "`
|
|
1959
|
+
"text": "`PermissionsRouter`"
|
|
787
1960
|
},
|
|
788
1961
|
{
|
|
789
1962
|
"kind": "text",
|
|
790
|
-
"text": "
|
|
1963
|
+
"text": " to add permissions\n logic per channel. Then call ["
|
|
791
1964
|
},
|
|
792
1965
|
{
|
|
793
1966
|
"kind": "code",
|
|
794
|
-
"text": "`
|
|
1967
|
+
"text": "`check()`"
|
|
795
1968
|
},
|
|
796
1969
|
{
|
|
797
1970
|
"kind": "text",
|
|
798
|
-
"text": "."
|
|
1971
|
+
"text": "](https://dev.wix.com/docs/sdk/backend-modules/realtime/site/permissions-router/check) in the body of\n this function and return the permissions object it returns.\n\n\n> **Note:** When previewing your site, permissions for read are always granted."
|
|
799
1972
|
}
|
|
800
1973
|
],
|
|
801
1974
|
"blockTags": [
|
|
802
1975
|
{
|
|
803
|
-
"tag": "@
|
|
1976
|
+
"tag": "@requiredField",
|
|
804
1977
|
"content": [
|
|
805
1978
|
{
|
|
806
1979
|
"kind": "text",
|
|
807
|
-
"text": "
|
|
808
|
-
}
|
|
1980
|
+
"text": "channel"
|
|
1981
|
+
}
|
|
1982
|
+
]
|
|
1983
|
+
},
|
|
1984
|
+
{
|
|
1985
|
+
"tag": "@servicePath",
|
|
1986
|
+
"content": [
|
|
809
1987
|
{
|
|
810
|
-
"kind": "
|
|
811
|
-
"text": "
|
|
812
|
-
}
|
|
1988
|
+
"kind": "text",
|
|
1989
|
+
"text": "wix-realtime-backend.Channel"
|
|
1990
|
+
}
|
|
1991
|
+
]
|
|
1992
|
+
},
|
|
1993
|
+
{
|
|
1994
|
+
"tag": "@requiredField",
|
|
1995
|
+
"content": [
|
|
813
1996
|
{
|
|
814
1997
|
"kind": "text",
|
|
815
|
-
"text": "
|
|
816
|
-
}
|
|
1998
|
+
"text": "subscriber"
|
|
1999
|
+
}
|
|
2000
|
+
]
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
"tag": "@servicePath",
|
|
2004
|
+
"content": [
|
|
817
2005
|
{
|
|
818
|
-
"kind": "
|
|
819
|
-
"text": "
|
|
820
|
-
}
|
|
2006
|
+
"kind": "text",
|
|
2007
|
+
"text": "wix-realtime-backend.Subscriber"
|
|
2008
|
+
}
|
|
2009
|
+
]
|
|
2010
|
+
},
|
|
2011
|
+
{
|
|
2012
|
+
"tag": "@returns",
|
|
2013
|
+
"content": [
|
|
2014
|
+
{
|
|
2015
|
+
"kind": "text",
|
|
2016
|
+
"text": "The permissions granted to the subscriber on the channel or channel resource."
|
|
2017
|
+
}
|
|
2018
|
+
]
|
|
2019
|
+
},
|
|
2020
|
+
{
|
|
2021
|
+
"tag": "@servicePath",
|
|
2022
|
+
"content": [
|
|
821
2023
|
{
|
|
822
2024
|
"kind": "text",
|
|
823
|
-
"text": "
|
|
2025
|
+
"text": "wix-realtime-backend.ChannelPermissions"
|
|
2026
|
+
}
|
|
2027
|
+
]
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
"tag": "@servicePath",
|
|
2031
|
+
"content": [
|
|
2032
|
+
{
|
|
2033
|
+
"kind": "text",
|
|
2034
|
+
"text": "wix-realtime-backend.ChannelPermissions"
|
|
824
2035
|
}
|
|
825
2036
|
]
|
|
826
2037
|
}
|
|
@@ -828,7 +2039,7 @@
|
|
|
828
2039
|
},
|
|
829
2040
|
"parameters": [
|
|
830
2041
|
{
|
|
831
|
-
"id":
|
|
2042
|
+
"id": 49,
|
|
832
2043
|
"name": "channel",
|
|
833
2044
|
"variant": "param",
|
|
834
2045
|
"kind": 32768,
|
|
@@ -837,20 +2048,20 @@
|
|
|
837
2048
|
"summary": [
|
|
838
2049
|
{
|
|
839
2050
|
"kind": "text",
|
|
840
|
-
"text": "The channel, and optionally the resource
|
|
2051
|
+
"text": "The channel, and optionally the resource,\n to check permissions for."
|
|
841
2052
|
}
|
|
842
2053
|
]
|
|
843
2054
|
},
|
|
844
2055
|
"type": {
|
|
845
2056
|
"type": "reference",
|
|
846
|
-
"target":
|
|
2057
|
+
"target": 31,
|
|
847
2058
|
"name": "Channel",
|
|
848
2059
|
"package": "@wix/realtime-common"
|
|
849
2060
|
}
|
|
850
2061
|
},
|
|
851
2062
|
{
|
|
852
|
-
"id":
|
|
853
|
-
"name": "
|
|
2063
|
+
"id": 50,
|
|
2064
|
+
"name": "subscriber",
|
|
854
2065
|
"variant": "param",
|
|
855
2066
|
"kind": 32768,
|
|
856
2067
|
"flags": {},
|
|
@@ -858,39 +2069,15 @@
|
|
|
858
2069
|
"summary": [
|
|
859
2070
|
{
|
|
860
2071
|
"kind": "text",
|
|
861
|
-
"text": "
|
|
862
|
-
}
|
|
863
|
-
]
|
|
864
|
-
},
|
|
865
|
-
"type": {
|
|
866
|
-
"type": "intrinsic",
|
|
867
|
-
"name": "any"
|
|
868
|
-
}
|
|
869
|
-
},
|
|
870
|
-
{
|
|
871
|
-
"id": 6,
|
|
872
|
-
"name": "options",
|
|
873
|
-
"variant": "param",
|
|
874
|
-
"kind": 32768,
|
|
875
|
-
"flags": {
|
|
876
|
-
"isOptional": true
|
|
877
|
-
},
|
|
878
|
-
"comment": {
|
|
879
|
-
"summary": [
|
|
880
|
-
{
|
|
881
|
-
"kind": "text",
|
|
882
|
-
"text": "Options to use when publishing."
|
|
2072
|
+
"text": "The subscriber to check permissions\n for."
|
|
883
2073
|
}
|
|
884
2074
|
]
|
|
885
2075
|
},
|
|
886
2076
|
"type": {
|
|
887
2077
|
"type": "reference",
|
|
888
|
-
"target":
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
},
|
|
892
|
-
"name": "PublishOptions",
|
|
893
|
-
"package": "@wix/sdk_realtime_site"
|
|
2078
|
+
"target": 36,
|
|
2079
|
+
"name": "Subscriber",
|
|
2080
|
+
"package": "@wix/realtime-common"
|
|
894
2081
|
}
|
|
895
2082
|
}
|
|
896
2083
|
],
|
|
@@ -902,8 +2089,10 @@
|
|
|
902
2089
|
},
|
|
903
2090
|
"typeArguments": [
|
|
904
2091
|
{
|
|
905
|
-
"type": "
|
|
906
|
-
"
|
|
2092
|
+
"type": "reference",
|
|
2093
|
+
"target": 34,
|
|
2094
|
+
"name": "ChannelPermissions",
|
|
2095
|
+
"package": "@wix/realtime-common"
|
|
907
2096
|
}
|
|
908
2097
|
],
|
|
909
2098
|
"name": "Promise",
|
|
@@ -914,42 +2103,52 @@
|
|
|
914
2103
|
}
|
|
915
2104
|
],
|
|
916
2105
|
"groups": [
|
|
2106
|
+
{
|
|
2107
|
+
"title": "Namespaces",
|
|
2108
|
+
"children": [
|
|
2109
|
+
2
|
|
2110
|
+
]
|
|
2111
|
+
},
|
|
917
2112
|
{
|
|
918
2113
|
"title": "Interfaces",
|
|
919
2114
|
"children": [
|
|
920
|
-
|
|
2115
|
+
31,
|
|
2116
|
+
34,
|
|
2117
|
+
39,
|
|
2118
|
+
36
|
|
921
2119
|
]
|
|
922
2120
|
},
|
|
923
2121
|
{
|
|
924
|
-
"title": "
|
|
2122
|
+
"title": "Type Aliases",
|
|
925
2123
|
"children": [
|
|
926
|
-
|
|
2124
|
+
51
|
|
927
2125
|
]
|
|
928
2126
|
},
|
|
929
2127
|
{
|
|
930
2128
|
"title": "Functions",
|
|
931
2129
|
"children": [
|
|
932
|
-
|
|
2130
|
+
42,
|
|
2131
|
+
47
|
|
933
2132
|
]
|
|
934
2133
|
}
|
|
935
2134
|
]
|
|
936
2135
|
},
|
|
937
2136
|
{
|
|
938
|
-
"id":
|
|
2137
|
+
"id": 59,
|
|
939
2138
|
"name": "subscriber",
|
|
940
2139
|
"variant": "declaration",
|
|
941
2140
|
"kind": 4,
|
|
942
2141
|
"flags": {},
|
|
943
2142
|
"children": [
|
|
944
2143
|
{
|
|
945
|
-
"id":
|
|
2144
|
+
"id": 60,
|
|
946
2145
|
"name": "subscribe",
|
|
947
2146
|
"variant": "declaration",
|
|
948
2147
|
"kind": 64,
|
|
949
2148
|
"flags": {},
|
|
950
2149
|
"signatures": [
|
|
951
2150
|
{
|
|
952
|
-
"id":
|
|
2151
|
+
"id": 61,
|
|
953
2152
|
"name": "subscribe",
|
|
954
2153
|
"variant": "signature",
|
|
955
2154
|
"kind": 4096,
|
|
@@ -1000,7 +2199,7 @@
|
|
|
1000
2199
|
},
|
|
1001
2200
|
"parameters": [
|
|
1002
2201
|
{
|
|
1003
|
-
"id":
|
|
2202
|
+
"id": 62,
|
|
1004
2203
|
"name": "channel",
|
|
1005
2204
|
"variant": "param",
|
|
1006
2205
|
"kind": 32768,
|
|
@@ -1015,13 +2214,13 @@
|
|
|
1015
2214
|
},
|
|
1016
2215
|
"type": {
|
|
1017
2216
|
"type": "reference",
|
|
1018
|
-
"target":
|
|
2217
|
+
"target": 31,
|
|
1019
2218
|
"name": "Channel",
|
|
1020
2219
|
"package": "@wix/realtime-common"
|
|
1021
2220
|
}
|
|
1022
2221
|
},
|
|
1023
2222
|
{
|
|
1024
|
-
"id":
|
|
2223
|
+
"id": 63,
|
|
1025
2224
|
"name": "messageHandler",
|
|
1026
2225
|
"variant": "param",
|
|
1027
2226
|
"kind": 32768,
|
|
@@ -1036,13 +2235,13 @@
|
|
|
1036
2235
|
},
|
|
1037
2236
|
"type": {
|
|
1038
2237
|
"type": "reference",
|
|
1039
|
-
"target":
|
|
2238
|
+
"target": 76,
|
|
1040
2239
|
"name": "MessageHandler",
|
|
1041
2240
|
"package": "@wix/realtime-common"
|
|
1042
2241
|
}
|
|
1043
2242
|
},
|
|
1044
2243
|
{
|
|
1045
|
-
"id":
|
|
2244
|
+
"id": 64,
|
|
1046
2245
|
"name": "options",
|
|
1047
2246
|
"variant": "param",
|
|
1048
2247
|
"kind": 32768,
|
|
@@ -1059,7 +2258,7 @@
|
|
|
1059
2258
|
},
|
|
1060
2259
|
"type": {
|
|
1061
2260
|
"type": "reference",
|
|
1062
|
-
"target":
|
|
2261
|
+
"target": 93,
|
|
1063
2262
|
"name": "SubscriptionOptions",
|
|
1064
2263
|
"package": "@wix/realtime-common"
|
|
1065
2264
|
}
|
|
@@ -1071,7 +2270,7 @@
|
|
|
1071
2270
|
}
|
|
1072
2271
|
},
|
|
1073
2272
|
{
|
|
1074
|
-
"id":
|
|
2273
|
+
"id": 65,
|
|
1075
2274
|
"name": "subscribe",
|
|
1076
2275
|
"variant": "signature",
|
|
1077
2276
|
"kind": 4096,
|
|
@@ -1122,7 +2321,7 @@
|
|
|
1122
2321
|
},
|
|
1123
2322
|
"parameters": [
|
|
1124
2323
|
{
|
|
1125
|
-
"id":
|
|
2324
|
+
"id": 66,
|
|
1126
2325
|
"name": "httpClient",
|
|
1127
2326
|
"variant": "param",
|
|
1128
2327
|
"kind": 32768,
|
|
@@ -1151,14 +2350,14 @@
|
|
|
1151
2350
|
]
|
|
1152
2351
|
},
|
|
1153
2352
|
{
|
|
1154
|
-
"id":
|
|
2353
|
+
"id": 67,
|
|
1155
2354
|
"name": "unsubscribe",
|
|
1156
2355
|
"variant": "declaration",
|
|
1157
2356
|
"kind": 64,
|
|
1158
2357
|
"flags": {},
|
|
1159
2358
|
"signatures": [
|
|
1160
2359
|
{
|
|
1161
|
-
"id":
|
|
2360
|
+
"id": 68,
|
|
1162
2361
|
"name": "unsubscribe",
|
|
1163
2362
|
"variant": "signature",
|
|
1164
2363
|
"kind": 4096,
|
|
@@ -1217,7 +2416,7 @@
|
|
|
1217
2416
|
},
|
|
1218
2417
|
"parameters": [
|
|
1219
2418
|
{
|
|
1220
|
-
"id":
|
|
2419
|
+
"id": 69,
|
|
1221
2420
|
"name": "options",
|
|
1222
2421
|
"variant": "param",
|
|
1223
2422
|
"kind": 32768,
|
|
@@ -1232,7 +2431,7 @@
|
|
|
1232
2431
|
},
|
|
1233
2432
|
"type": {
|
|
1234
2433
|
"type": "reference",
|
|
1235
|
-
"target":
|
|
2434
|
+
"target": 96,
|
|
1236
2435
|
"name": "UnsubscribeOptions",
|
|
1237
2436
|
"package": "@wix/realtime-common"
|
|
1238
2437
|
}
|
|
@@ -1244,7 +2443,7 @@
|
|
|
1244
2443
|
}
|
|
1245
2444
|
},
|
|
1246
2445
|
{
|
|
1247
|
-
"id":
|
|
2446
|
+
"id": 70,
|
|
1248
2447
|
"name": "unsubscribe",
|
|
1249
2448
|
"variant": "signature",
|
|
1250
2449
|
"kind": 4096,
|
|
@@ -1303,7 +2502,7 @@
|
|
|
1303
2502
|
},
|
|
1304
2503
|
"parameters": [
|
|
1305
2504
|
{
|
|
1306
|
-
"id":
|
|
2505
|
+
"id": 71,
|
|
1307
2506
|
"name": "_",
|
|
1308
2507
|
"variant": "param",
|
|
1309
2508
|
"kind": 32768,
|
|
@@ -1336,14 +2535,14 @@
|
|
|
1336
2535
|
{
|
|
1337
2536
|
"title": "Functions",
|
|
1338
2537
|
"children": [
|
|
1339
|
-
|
|
1340
|
-
|
|
2538
|
+
60,
|
|
2539
|
+
67
|
|
1341
2540
|
]
|
|
1342
2541
|
}
|
|
1343
2542
|
]
|
|
1344
2543
|
},
|
|
1345
2544
|
{
|
|
1346
|
-
"id":
|
|
2545
|
+
"id": 113,
|
|
1347
2546
|
"name": "RealtimeErrorCode",
|
|
1348
2547
|
"variant": "declaration",
|
|
1349
2548
|
"kind": 8,
|
|
@@ -1358,7 +2557,7 @@
|
|
|
1358
2557
|
},
|
|
1359
2558
|
"children": [
|
|
1360
2559
|
{
|
|
1361
|
-
"id":
|
|
2560
|
+
"id": 117,
|
|
1362
2561
|
"name": "BadInput",
|
|
1363
2562
|
"variant": "declaration",
|
|
1364
2563
|
"kind": 16,
|
|
@@ -1377,7 +2576,7 @@
|
|
|
1377
2576
|
}
|
|
1378
2577
|
},
|
|
1379
2578
|
{
|
|
1380
|
-
"id":
|
|
2579
|
+
"id": 115,
|
|
1381
2580
|
"name": "ConnectionError",
|
|
1382
2581
|
"variant": "declaration",
|
|
1383
2582
|
"kind": 16,
|
|
@@ -1396,7 +2595,7 @@
|
|
|
1396
2595
|
}
|
|
1397
2596
|
},
|
|
1398
2597
|
{
|
|
1399
|
-
"id":
|
|
2598
|
+
"id": 114,
|
|
1400
2599
|
"name": "Disconnected",
|
|
1401
2600
|
"variant": "declaration",
|
|
1402
2601
|
"kind": 16,
|
|
@@ -1415,7 +2614,7 @@
|
|
|
1415
2614
|
}
|
|
1416
2615
|
},
|
|
1417
2616
|
{
|
|
1418
|
-
"id":
|
|
2617
|
+
"id": 116,
|
|
1419
2618
|
"name": "SubscriptionFailed",
|
|
1420
2619
|
"variant": "declaration",
|
|
1421
2620
|
"kind": 16,
|
|
@@ -1438,16 +2637,16 @@
|
|
|
1438
2637
|
{
|
|
1439
2638
|
"title": "Enumeration Members",
|
|
1440
2639
|
"children": [
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
2640
|
+
117,
|
|
2641
|
+
115,
|
|
2642
|
+
114,
|
|
2643
|
+
116
|
|
1445
2644
|
]
|
|
1446
2645
|
}
|
|
1447
2646
|
]
|
|
1448
2647
|
},
|
|
1449
2648
|
{
|
|
1450
|
-
"id":
|
|
2649
|
+
"id": 99,
|
|
1451
2650
|
"name": "RealtimeError",
|
|
1452
2651
|
"variant": "declaration",
|
|
1453
2652
|
"kind": 128,
|
|
@@ -1462,34 +2661,34 @@
|
|
|
1462
2661
|
},
|
|
1463
2662
|
"children": [
|
|
1464
2663
|
{
|
|
1465
|
-
"id":
|
|
2664
|
+
"id": 100,
|
|
1466
2665
|
"name": "constructor",
|
|
1467
2666
|
"variant": "declaration",
|
|
1468
2667
|
"kind": 512,
|
|
1469
2668
|
"flags": {},
|
|
1470
2669
|
"signatures": [
|
|
1471
2670
|
{
|
|
1472
|
-
"id":
|
|
2671
|
+
"id": 101,
|
|
1473
2672
|
"name": "new RealtimeError",
|
|
1474
2673
|
"variant": "signature",
|
|
1475
2674
|
"kind": 16384,
|
|
1476
2675
|
"flags": {},
|
|
1477
2676
|
"parameters": [
|
|
1478
2677
|
{
|
|
1479
|
-
"id":
|
|
2678
|
+
"id": 102,
|
|
1480
2679
|
"name": "errorCode",
|
|
1481
2680
|
"variant": "param",
|
|
1482
2681
|
"kind": 32768,
|
|
1483
2682
|
"flags": {},
|
|
1484
2683
|
"type": {
|
|
1485
2684
|
"type": "reference",
|
|
1486
|
-
"target":
|
|
2685
|
+
"target": 113,
|
|
1487
2686
|
"name": "RealtimeErrorCode",
|
|
1488
2687
|
"package": "@wix/realtime-common"
|
|
1489
2688
|
}
|
|
1490
2689
|
},
|
|
1491
2690
|
{
|
|
1492
|
-
"id":
|
|
2691
|
+
"id": 103,
|
|
1493
2692
|
"name": "message",
|
|
1494
2693
|
"variant": "param",
|
|
1495
2694
|
"kind": 32768,
|
|
@@ -1500,7 +2699,7 @@
|
|
|
1500
2699
|
}
|
|
1501
2700
|
},
|
|
1502
2701
|
{
|
|
1503
|
-
"id":
|
|
2702
|
+
"id": 104,
|
|
1504
2703
|
"name": "options",
|
|
1505
2704
|
"variant": "param",
|
|
1506
2705
|
"kind": 32768,
|
|
@@ -1510,14 +2709,14 @@
|
|
|
1510
2709
|
"type": {
|
|
1511
2710
|
"type": "reflection",
|
|
1512
2711
|
"declaration": {
|
|
1513
|
-
"id":
|
|
2712
|
+
"id": 105,
|
|
1514
2713
|
"name": "__type",
|
|
1515
2714
|
"variant": "declaration",
|
|
1516
2715
|
"kind": 65536,
|
|
1517
2716
|
"flags": {},
|
|
1518
2717
|
"children": [
|
|
1519
2718
|
{
|
|
1520
|
-
"id":
|
|
2719
|
+
"id": 106,
|
|
1521
2720
|
"name": "channel",
|
|
1522
2721
|
"variant": "declaration",
|
|
1523
2722
|
"kind": 1024,
|
|
@@ -1526,13 +2725,13 @@
|
|
|
1526
2725
|
},
|
|
1527
2726
|
"type": {
|
|
1528
2727
|
"type": "reference",
|
|
1529
|
-
"target":
|
|
2728
|
+
"target": 31,
|
|
1530
2729
|
"name": "Channel",
|
|
1531
2730
|
"package": "@wix/realtime-common"
|
|
1532
2731
|
}
|
|
1533
2732
|
},
|
|
1534
2733
|
{
|
|
1535
|
-
"id":
|
|
2734
|
+
"id": 107,
|
|
1536
2735
|
"name": "recoverable",
|
|
1537
2736
|
"variant": "declaration",
|
|
1538
2737
|
"kind": 1024,
|
|
@@ -1545,7 +2744,7 @@
|
|
|
1545
2744
|
}
|
|
1546
2745
|
},
|
|
1547
2746
|
{
|
|
1548
|
-
"id":
|
|
2747
|
+
"id": 108,
|
|
1549
2748
|
"name": "status",
|
|
1550
2749
|
"variant": "declaration",
|
|
1551
2750
|
"kind": 1024,
|
|
@@ -1562,9 +2761,9 @@
|
|
|
1562
2761
|
{
|
|
1563
2762
|
"title": "Properties",
|
|
1564
2763
|
"children": [
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
2764
|
+
106,
|
|
2765
|
+
107,
|
|
2766
|
+
108
|
|
1568
2767
|
]
|
|
1569
2768
|
}
|
|
1570
2769
|
]
|
|
@@ -1574,7 +2773,7 @@
|
|
|
1574
2773
|
],
|
|
1575
2774
|
"type": {
|
|
1576
2775
|
"type": "reference",
|
|
1577
|
-
"target":
|
|
2776
|
+
"target": 99,
|
|
1578
2777
|
"name": "RealtimeError",
|
|
1579
2778
|
"package": "@wix/realtime-common"
|
|
1580
2779
|
},
|
|
@@ -1592,7 +2791,7 @@
|
|
|
1592
2791
|
}
|
|
1593
2792
|
},
|
|
1594
2793
|
{
|
|
1595
|
-
"id":
|
|
2794
|
+
"id": 110,
|
|
1596
2795
|
"name": "channel",
|
|
1597
2796
|
"variant": "declaration",
|
|
1598
2797
|
"kind": 1024,
|
|
@@ -1609,13 +2808,13 @@
|
|
|
1609
2808
|
},
|
|
1610
2809
|
"type": {
|
|
1611
2810
|
"type": "reference",
|
|
1612
|
-
"target":
|
|
2811
|
+
"target": 31,
|
|
1613
2812
|
"name": "Channel",
|
|
1614
2813
|
"package": "@wix/realtime-common"
|
|
1615
2814
|
}
|
|
1616
2815
|
},
|
|
1617
2816
|
{
|
|
1618
|
-
"id":
|
|
2817
|
+
"id": 109,
|
|
1619
2818
|
"name": "errorCode",
|
|
1620
2819
|
"variant": "declaration",
|
|
1621
2820
|
"kind": 1024,
|
|
@@ -1630,13 +2829,13 @@
|
|
|
1630
2829
|
},
|
|
1631
2830
|
"type": {
|
|
1632
2831
|
"type": "reference",
|
|
1633
|
-
"target":
|
|
2832
|
+
"target": 113,
|
|
1634
2833
|
"name": "RealtimeErrorCode",
|
|
1635
2834
|
"package": "@wix/realtime-common"
|
|
1636
2835
|
}
|
|
1637
2836
|
},
|
|
1638
2837
|
{
|
|
1639
|
-
"id":
|
|
2838
|
+
"id": 111,
|
|
1640
2839
|
"name": "recoverable",
|
|
1641
2840
|
"variant": "declaration",
|
|
1642
2841
|
"kind": 1024,
|
|
@@ -1673,7 +2872,7 @@
|
|
|
1673
2872
|
}
|
|
1674
2873
|
},
|
|
1675
2874
|
{
|
|
1676
|
-
"id":
|
|
2875
|
+
"id": 112,
|
|
1677
2876
|
"name": "status",
|
|
1678
2877
|
"variant": "declaration",
|
|
1679
2878
|
"kind": 1024,
|
|
@@ -1698,16 +2897,16 @@
|
|
|
1698
2897
|
{
|
|
1699
2898
|
"title": "Constructors",
|
|
1700
2899
|
"children": [
|
|
1701
|
-
|
|
2900
|
+
100
|
|
1702
2901
|
]
|
|
1703
2902
|
},
|
|
1704
2903
|
{
|
|
1705
2904
|
"title": "Properties",
|
|
1706
2905
|
"children": [
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
2906
|
+
110,
|
|
2907
|
+
109,
|
|
2908
|
+
111,
|
|
2909
|
+
112
|
|
1711
2910
|
]
|
|
1712
2911
|
}
|
|
1713
2912
|
],
|
|
@@ -1724,89 +2923,7 @@
|
|
|
1724
2923
|
]
|
|
1725
2924
|
},
|
|
1726
2925
|
{
|
|
1727
|
-
"id":
|
|
1728
|
-
"name": "Channel",
|
|
1729
|
-
"variant": "declaration",
|
|
1730
|
-
"kind": 256,
|
|
1731
|
-
"flags": {},
|
|
1732
|
-
"comment": {
|
|
1733
|
-
"summary": [
|
|
1734
|
-
{
|
|
1735
|
-
"kind": "text",
|
|
1736
|
-
"text": "An object representing a realtime channel."
|
|
1737
|
-
}
|
|
1738
|
-
]
|
|
1739
|
-
},
|
|
1740
|
-
"children": [
|
|
1741
|
-
{
|
|
1742
|
-
"id": 44,
|
|
1743
|
-
"name": "name",
|
|
1744
|
-
"variant": "declaration",
|
|
1745
|
-
"kind": 1024,
|
|
1746
|
-
"flags": {},
|
|
1747
|
-
"comment": {
|
|
1748
|
-
"summary": [
|
|
1749
|
-
{
|
|
1750
|
-
"kind": "text",
|
|
1751
|
-
"text": "Channel name. Only alphanumeric characters, hyphens, and underscores are allowed.\nThe combined length of "
|
|
1752
|
-
},
|
|
1753
|
-
{
|
|
1754
|
-
"kind": "code",
|
|
1755
|
-
"text": "`name`"
|
|
1756
|
-
},
|
|
1757
|
-
{
|
|
1758
|
-
"kind": "text",
|
|
1759
|
-
"text": " and "
|
|
1760
|
-
},
|
|
1761
|
-
{
|
|
1762
|
-
"kind": "code",
|
|
1763
|
-
"text": "`resourceId`"
|
|
1764
|
-
},
|
|
1765
|
-
{
|
|
1766
|
-
"kind": "text",
|
|
1767
|
-
"text": " cannot exceed 140 characters."
|
|
1768
|
-
}
|
|
1769
|
-
]
|
|
1770
|
-
},
|
|
1771
|
-
"type": {
|
|
1772
|
-
"type": "intrinsic",
|
|
1773
|
-
"name": "string"
|
|
1774
|
-
}
|
|
1775
|
-
},
|
|
1776
|
-
{
|
|
1777
|
-
"id": 45,
|
|
1778
|
-
"name": "resourceId",
|
|
1779
|
-
"variant": "declaration",
|
|
1780
|
-
"kind": 1024,
|
|
1781
|
-
"flags": {
|
|
1782
|
-
"isOptional": true
|
|
1783
|
-
},
|
|
1784
|
-
"comment": {
|
|
1785
|
-
"summary": [
|
|
1786
|
-
{
|
|
1787
|
-
"kind": "text",
|
|
1788
|
-
"text": "ID of a specific channel resource."
|
|
1789
|
-
}
|
|
1790
|
-
]
|
|
1791
|
-
},
|
|
1792
|
-
"type": {
|
|
1793
|
-
"type": "intrinsic",
|
|
1794
|
-
"name": "string"
|
|
1795
|
-
}
|
|
1796
|
-
}
|
|
1797
|
-
],
|
|
1798
|
-
"groups": [
|
|
1799
|
-
{
|
|
1800
|
-
"title": "Properties",
|
|
1801
|
-
"children": [
|
|
1802
|
-
44,
|
|
1803
|
-
45
|
|
1804
|
-
]
|
|
1805
|
-
}
|
|
1806
|
-
]
|
|
1807
|
-
},
|
|
1808
|
-
{
|
|
1809
|
-
"id": 46,
|
|
2926
|
+
"id": 73,
|
|
1810
2927
|
"name": "Message",
|
|
1811
2928
|
"variant": "declaration",
|
|
1812
2929
|
"kind": 256,
|
|
@@ -1821,7 +2938,7 @@
|
|
|
1821
2938
|
},
|
|
1822
2939
|
"children": [
|
|
1823
2940
|
{
|
|
1824
|
-
"id":
|
|
2941
|
+
"id": 74,
|
|
1825
2942
|
"name": "payload",
|
|
1826
2943
|
"variant": "declaration",
|
|
1827
2944
|
"kind": 1024,
|
|
@@ -1855,7 +2972,7 @@
|
|
|
1855
2972
|
}
|
|
1856
2973
|
},
|
|
1857
2974
|
{
|
|
1858
|
-
"id":
|
|
2975
|
+
"id": 75,
|
|
1859
2976
|
"name": "publisher",
|
|
1860
2977
|
"variant": "declaration",
|
|
1861
2978
|
"kind": 1024,
|
|
@@ -1872,7 +2989,7 @@
|
|
|
1872
2989
|
},
|
|
1873
2990
|
"type": {
|
|
1874
2991
|
"type": "reference",
|
|
1875
|
-
"target":
|
|
2992
|
+
"target": 81,
|
|
1876
2993
|
"name": "Publisher",
|
|
1877
2994
|
"package": "@wix/realtime-common"
|
|
1878
2995
|
}
|
|
@@ -1882,14 +2999,14 @@
|
|
|
1882
2999
|
{
|
|
1883
3000
|
"title": "Properties",
|
|
1884
3001
|
"children": [
|
|
1885
|
-
|
|
1886
|
-
|
|
3002
|
+
74,
|
|
3003
|
+
75
|
|
1887
3004
|
]
|
|
1888
3005
|
}
|
|
1889
3006
|
]
|
|
1890
3007
|
},
|
|
1891
3008
|
{
|
|
1892
|
-
"id":
|
|
3009
|
+
"id": 81,
|
|
1893
3010
|
"name": "Publisher",
|
|
1894
3011
|
"variant": "declaration",
|
|
1895
3012
|
"kind": 256,
|
|
@@ -1904,7 +3021,7 @@
|
|
|
1904
3021
|
},
|
|
1905
3022
|
"children": [
|
|
1906
3023
|
{
|
|
1907
|
-
"id":
|
|
3024
|
+
"id": 82,
|
|
1908
3025
|
"name": "id",
|
|
1909
3026
|
"variant": "declaration",
|
|
1910
3027
|
"kind": 1024,
|
|
@@ -1927,13 +3044,13 @@
|
|
|
1927
3044
|
{
|
|
1928
3045
|
"title": "Properties",
|
|
1929
3046
|
"children": [
|
|
1930
|
-
|
|
3047
|
+
82
|
|
1931
3048
|
]
|
|
1932
3049
|
}
|
|
1933
3050
|
]
|
|
1934
3051
|
},
|
|
1935
3052
|
{
|
|
1936
|
-
"id":
|
|
3053
|
+
"id": 93,
|
|
1937
3054
|
"name": "SubscriptionOptions",
|
|
1938
3055
|
"variant": "declaration",
|
|
1939
3056
|
"kind": 256,
|
|
@@ -1948,7 +3065,7 @@
|
|
|
1948
3065
|
},
|
|
1949
3066
|
"children": [
|
|
1950
3067
|
{
|
|
1951
|
-
"id":
|
|
3068
|
+
"id": 94,
|
|
1952
3069
|
"name": "onSubscribed",
|
|
1953
3070
|
"variant": "declaration",
|
|
1954
3071
|
"kind": 1024,
|
|
@@ -2019,13 +3136,13 @@
|
|
|
2019
3136
|
},
|
|
2020
3137
|
"type": {
|
|
2021
3138
|
"type": "reference",
|
|
2022
|
-
"target":
|
|
3139
|
+
"target": 88,
|
|
2023
3140
|
"name": "SubscriptionHandler",
|
|
2024
3141
|
"package": "@wix/realtime-common"
|
|
2025
3142
|
}
|
|
2026
3143
|
},
|
|
2027
3144
|
{
|
|
2028
|
-
"id":
|
|
3145
|
+
"id": 95,
|
|
2029
3146
|
"name": "onSubscriptionError",
|
|
2030
3147
|
"variant": "declaration",
|
|
2031
3148
|
"kind": 1024,
|
|
@@ -2176,7 +3293,7 @@
|
|
|
2176
3293
|
},
|
|
2177
3294
|
"type": {
|
|
2178
3295
|
"type": "reference",
|
|
2179
|
-
"target":
|
|
3296
|
+
"target": 83,
|
|
2180
3297
|
"name": "SubscriptionErrorHandler",
|
|
2181
3298
|
"package": "@wix/realtime-common"
|
|
2182
3299
|
}
|
|
@@ -2186,14 +3303,14 @@
|
|
|
2186
3303
|
{
|
|
2187
3304
|
"title": "Properties",
|
|
2188
3305
|
"children": [
|
|
2189
|
-
|
|
2190
|
-
|
|
3306
|
+
94,
|
|
3307
|
+
95
|
|
2191
3308
|
]
|
|
2192
3309
|
}
|
|
2193
3310
|
]
|
|
2194
3311
|
},
|
|
2195
3312
|
{
|
|
2196
|
-
"id":
|
|
3313
|
+
"id": 96,
|
|
2197
3314
|
"name": "UnsubscribeOptions",
|
|
2198
3315
|
"variant": "declaration",
|
|
2199
3316
|
"kind": 256,
|
|
@@ -2208,7 +3325,7 @@
|
|
|
2208
3325
|
},
|
|
2209
3326
|
"children": [
|
|
2210
3327
|
{
|
|
2211
|
-
"id":
|
|
3328
|
+
"id": 97,
|
|
2212
3329
|
"name": "channel",
|
|
2213
3330
|
"variant": "declaration",
|
|
2214
3331
|
"kind": 1024,
|
|
@@ -2225,13 +3342,13 @@
|
|
|
2225
3342
|
},
|
|
2226
3343
|
"type": {
|
|
2227
3344
|
"type": "reference",
|
|
2228
|
-
"target":
|
|
3345
|
+
"target": 31,
|
|
2229
3346
|
"name": "Channel",
|
|
2230
3347
|
"package": "@wix/realtime-common"
|
|
2231
3348
|
}
|
|
2232
3349
|
},
|
|
2233
3350
|
{
|
|
2234
|
-
"id":
|
|
3351
|
+
"id": 98,
|
|
2235
3352
|
"name": "subscriptionId",
|
|
2236
3353
|
"variant": "declaration",
|
|
2237
3354
|
"kind": 1024,
|
|
@@ -2256,14 +3373,14 @@
|
|
|
2256
3373
|
{
|
|
2257
3374
|
"title": "Properties",
|
|
2258
3375
|
"children": [
|
|
2259
|
-
|
|
2260
|
-
|
|
3376
|
+
97,
|
|
3377
|
+
98
|
|
2261
3378
|
]
|
|
2262
3379
|
}
|
|
2263
3380
|
]
|
|
2264
3381
|
},
|
|
2265
3382
|
{
|
|
2266
|
-
"id":
|
|
3383
|
+
"id": 76,
|
|
2267
3384
|
"name": "MessageHandler",
|
|
2268
3385
|
"variant": "declaration",
|
|
2269
3386
|
"kind": 4194304,
|
|
@@ -2271,14 +3388,14 @@
|
|
|
2271
3388
|
"type": {
|
|
2272
3389
|
"type": "reflection",
|
|
2273
3390
|
"declaration": {
|
|
2274
|
-
"id":
|
|
3391
|
+
"id": 77,
|
|
2275
3392
|
"name": "__type",
|
|
2276
3393
|
"variant": "declaration",
|
|
2277
3394
|
"kind": 65536,
|
|
2278
3395
|
"flags": {},
|
|
2279
3396
|
"signatures": [
|
|
2280
3397
|
{
|
|
2281
|
-
"id":
|
|
3398
|
+
"id": 78,
|
|
2282
3399
|
"name": "__type",
|
|
2283
3400
|
"variant": "signature",
|
|
2284
3401
|
"kind": 4096,
|
|
@@ -2293,27 +3410,27 @@
|
|
|
2293
3410
|
},
|
|
2294
3411
|
"parameters": [
|
|
2295
3412
|
{
|
|
2296
|
-
"id":
|
|
3413
|
+
"id": 79,
|
|
2297
3414
|
"name": "message",
|
|
2298
3415
|
"variant": "param",
|
|
2299
3416
|
"kind": 32768,
|
|
2300
3417
|
"flags": {},
|
|
2301
3418
|
"type": {
|
|
2302
3419
|
"type": "reference",
|
|
2303
|
-
"target":
|
|
3420
|
+
"target": 73,
|
|
2304
3421
|
"name": "Message",
|
|
2305
3422
|
"package": "@wix/realtime-common"
|
|
2306
3423
|
}
|
|
2307
3424
|
},
|
|
2308
3425
|
{
|
|
2309
|
-
"id":
|
|
3426
|
+
"id": 80,
|
|
2310
3427
|
"name": "channel",
|
|
2311
3428
|
"variant": "param",
|
|
2312
3429
|
"kind": 32768,
|
|
2313
3430
|
"flags": {},
|
|
2314
3431
|
"type": {
|
|
2315
3432
|
"type": "reference",
|
|
2316
|
-
"target":
|
|
3433
|
+
"target": 31,
|
|
2317
3434
|
"name": "Channel",
|
|
2318
3435
|
"package": "@wix/realtime-common"
|
|
2319
3436
|
}
|
|
@@ -2329,7 +3446,7 @@
|
|
|
2329
3446
|
}
|
|
2330
3447
|
},
|
|
2331
3448
|
{
|
|
2332
|
-
"id":
|
|
3449
|
+
"id": 83,
|
|
2333
3450
|
"name": "SubscriptionErrorHandler",
|
|
2334
3451
|
"variant": "declaration",
|
|
2335
3452
|
"kind": 4194304,
|
|
@@ -2337,14 +3454,14 @@
|
|
|
2337
3454
|
"type": {
|
|
2338
3455
|
"type": "reflection",
|
|
2339
3456
|
"declaration": {
|
|
2340
|
-
"id":
|
|
3457
|
+
"id": 84,
|
|
2341
3458
|
"name": "__type",
|
|
2342
3459
|
"variant": "declaration",
|
|
2343
3460
|
"kind": 65536,
|
|
2344
3461
|
"flags": {},
|
|
2345
3462
|
"signatures": [
|
|
2346
3463
|
{
|
|
2347
|
-
"id":
|
|
3464
|
+
"id": 85,
|
|
2348
3465
|
"name": "__type",
|
|
2349
3466
|
"variant": "signature",
|
|
2350
3467
|
"kind": 4096,
|
|
@@ -2359,20 +3476,20 @@
|
|
|
2359
3476
|
},
|
|
2360
3477
|
"parameters": [
|
|
2361
3478
|
{
|
|
2362
|
-
"id":
|
|
3479
|
+
"id": 86,
|
|
2363
3480
|
"name": "error",
|
|
2364
3481
|
"variant": "param",
|
|
2365
3482
|
"kind": 32768,
|
|
2366
3483
|
"flags": {},
|
|
2367
3484
|
"type": {
|
|
2368
3485
|
"type": "reference",
|
|
2369
|
-
"target":
|
|
3486
|
+
"target": 99,
|
|
2370
3487
|
"name": "RealtimeError",
|
|
2371
3488
|
"package": "@wix/realtime-common"
|
|
2372
3489
|
}
|
|
2373
3490
|
},
|
|
2374
3491
|
{
|
|
2375
|
-
"id":
|
|
3492
|
+
"id": 87,
|
|
2376
3493
|
"name": "subscriptionId",
|
|
2377
3494
|
"variant": "param",
|
|
2378
3495
|
"kind": 32768,
|
|
@@ -2393,7 +3510,7 @@
|
|
|
2393
3510
|
}
|
|
2394
3511
|
},
|
|
2395
3512
|
{
|
|
2396
|
-
"id":
|
|
3513
|
+
"id": 88,
|
|
2397
3514
|
"name": "SubscriptionHandler",
|
|
2398
3515
|
"variant": "declaration",
|
|
2399
3516
|
"kind": 4194304,
|
|
@@ -2401,14 +3518,14 @@
|
|
|
2401
3518
|
"type": {
|
|
2402
3519
|
"type": "reflection",
|
|
2403
3520
|
"declaration": {
|
|
2404
|
-
"id":
|
|
3521
|
+
"id": 89,
|
|
2405
3522
|
"name": "__type",
|
|
2406
3523
|
"variant": "declaration",
|
|
2407
3524
|
"kind": 65536,
|
|
2408
3525
|
"flags": {},
|
|
2409
3526
|
"signatures": [
|
|
2410
3527
|
{
|
|
2411
|
-
"id":
|
|
3528
|
+
"id": 90,
|
|
2412
3529
|
"name": "__type",
|
|
2413
3530
|
"variant": "signature",
|
|
2414
3531
|
"kind": 4096,
|
|
@@ -2423,7 +3540,7 @@
|
|
|
2423
3540
|
},
|
|
2424
3541
|
"parameters": [
|
|
2425
3542
|
{
|
|
2426
|
-
"id":
|
|
3543
|
+
"id": 91,
|
|
2427
3544
|
"name": "subscriptionId",
|
|
2428
3545
|
"variant": "param",
|
|
2429
3546
|
"kind": 32768,
|
|
@@ -2434,7 +3551,7 @@
|
|
|
2434
3551
|
}
|
|
2435
3552
|
},
|
|
2436
3553
|
{
|
|
2437
|
-
"id":
|
|
3554
|
+
"id": 92,
|
|
2438
3555
|
"name": "isSynced",
|
|
2439
3556
|
"variant": "param",
|
|
2440
3557
|
"kind": 32768,
|
|
@@ -2456,42 +3573,47 @@
|
|
|
2456
3573
|
}
|
|
2457
3574
|
],
|
|
2458
3575
|
"groups": [
|
|
3576
|
+
{
|
|
3577
|
+
"title": "References",
|
|
3578
|
+
"children": [
|
|
3579
|
+
72
|
|
3580
|
+
]
|
|
3581
|
+
},
|
|
2459
3582
|
{
|
|
2460
3583
|
"title": "Namespaces",
|
|
2461
3584
|
"children": [
|
|
2462
|
-
|
|
3585
|
+
52,
|
|
2463
3586
|
1,
|
|
2464
|
-
|
|
3587
|
+
59
|
|
2465
3588
|
]
|
|
2466
3589
|
},
|
|
2467
3590
|
{
|
|
2468
3591
|
"title": "Enumerations",
|
|
2469
3592
|
"children": [
|
|
2470
|
-
|
|
3593
|
+
113
|
|
2471
3594
|
]
|
|
2472
3595
|
},
|
|
2473
3596
|
{
|
|
2474
3597
|
"title": "Classes",
|
|
2475
3598
|
"children": [
|
|
2476
|
-
|
|
3599
|
+
99
|
|
2477
3600
|
]
|
|
2478
3601
|
},
|
|
2479
3602
|
{
|
|
2480
3603
|
"title": "Interfaces",
|
|
2481
3604
|
"children": [
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
69
|
|
3605
|
+
73,
|
|
3606
|
+
81,
|
|
3607
|
+
93,
|
|
3608
|
+
96
|
|
2487
3609
|
]
|
|
2488
3610
|
},
|
|
2489
3611
|
{
|
|
2490
3612
|
"title": "Type Aliases",
|
|
2491
3613
|
"children": [
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
3614
|
+
76,
|
|
3615
|
+
83,
|
|
3616
|
+
88
|
|
2495
3617
|
]
|
|
2496
3618
|
}
|
|
2497
3619
|
],
|