@wix/realtime 1.0.33 → 1.0.34
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/cjs/build/publisher/publisher.context.d.ts +14 -5
- package/cjs/build/publisher/publisher.context.js +14 -5
- package/cjs/build/subscriber/subscriber.context.d.ts +21 -11
- package/cjs/build/subscriber/subscriber.context.js +21 -11
- package/dist/statics/docs-ts-model.json +405 -308
- package/es/build/publisher/publisher.context.d.ts +14 -5
- package/es/build/publisher/publisher.context.js +14 -5
- package/es/build/subscriber/subscriber.context.d.ts +21 -11
- package/es/build/subscriber/subscriber.context.js +21 -11
- package/package.json +4 -4
|
@@ -38,7 +38,15 @@
|
|
|
38
38
|
"summary": [
|
|
39
39
|
{
|
|
40
40
|
"kind": "text",
|
|
41
|
-
"text": "Publishes a message to a
|
|
41
|
+
"text": "Publishes a message to a channel or channel resource.\n\nAll subscribers currently listening to the specified channel receive the\nmessage. Subscribers to a channel don't receive messages published to a\nresource on that channel, and vice versa.\n\nThis method is backend-only and requires elevated permissions.\n\n<!-- TODO: Check whether this API is relevant for headless projects. -->\n\n> **Note:** This function requires elevated permissions and runs only on the backend.\n> You can also call this method from the frontend using "
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"kind": "code",
|
|
45
|
+
"text": "`elevate()`"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"kind": "text",
|
|
49
|
+
"text": ".\n> Elevated permissions are only available for apps and service accounts."
|
|
42
50
|
}
|
|
43
51
|
],
|
|
44
52
|
"blockTags": [
|
|
@@ -81,7 +89,7 @@
|
|
|
81
89
|
"summary": [
|
|
82
90
|
{
|
|
83
91
|
"kind": "text",
|
|
84
|
-
"text": "
|
|
92
|
+
"text": "Channel, and optionally resource, to publish to."
|
|
85
93
|
}
|
|
86
94
|
]
|
|
87
95
|
},
|
|
@@ -102,7 +110,7 @@
|
|
|
102
110
|
"summary": [
|
|
103
111
|
{
|
|
104
112
|
"kind": "text",
|
|
105
|
-
"text": "Message payload. Max:
|
|
113
|
+
"text": "Message payload. Max: 10 KB."
|
|
106
114
|
}
|
|
107
115
|
]
|
|
108
116
|
},
|
|
@@ -153,7 +161,15 @@
|
|
|
153
161
|
"summary": [
|
|
154
162
|
{
|
|
155
163
|
"kind": "text",
|
|
156
|
-
"text": "Publishes a message to a
|
|
164
|
+
"text": "Publishes a message to a channel or channel resource.\n\nAll subscribers currently listening to the specified channel receive the\nmessage. Subscribers to a channel don't receive messages published to a\nresource on that channel, and vice versa.\n\nThis method is backend-only and requires elevated permissions.\n\n<!-- TODO: Check whether this API is relevant for headless projects. -->\n\n> **Note:** This function requires elevated permissions and runs only on the backend.\n> You can also call this method from the frontend using "
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"kind": "code",
|
|
168
|
+
"text": "`elevate()`"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"kind": "text",
|
|
172
|
+
"text": ".\n> Elevated permissions are only available for apps and service accounts."
|
|
157
173
|
}
|
|
158
174
|
],
|
|
159
175
|
"blockTags": [
|
|
@@ -249,7 +265,7 @@
|
|
|
249
265
|
"summary": [
|
|
250
266
|
{
|
|
251
267
|
"kind": "text",
|
|
252
|
-
"text": "
|
|
268
|
+
"text": "Manages subscriber permissions on channels.\n\nUse the permissions router to define which subscribers can receive messages\non specific channels or channel resources. The router allows you to set permissions at the\nchannel level and the channel resource level. If you don't define\npermissions for a particular resource, it inherits the permissions of its\nparent channel.\n\nTypically, you use the permissions router in the **realtime-permissions.js**\nfile in your site's backend to:\n\n+ Set default permissions for all channels where no explicit permissions\n are defined.\n+ Add permissions logic for specific channels or channel resources.\n+ Check the permissions for a subscriber on a channel.\n\n> **Note:** You don't have to use the permissions router. You can also\n> define all your permissions logic directly in the\n> "
|
|
253
269
|
},
|
|
254
270
|
{
|
|
255
271
|
"kind": "code",
|
|
@@ -257,7 +273,7 @@
|
|
|
257
273
|
},
|
|
258
274
|
{
|
|
259
275
|
"kind": "text",
|
|
260
|
-
"text": "
|
|
276
|
+
"text": " function."
|
|
261
277
|
}
|
|
262
278
|
]
|
|
263
279
|
},
|
|
@@ -279,23 +295,7 @@
|
|
|
279
295
|
"summary": [
|
|
280
296
|
{
|
|
281
297
|
"kind": "text",
|
|
282
|
-
"text": "Sets a permissions handler for a specific channel or channel resource.\n\
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"kind": "code",
|
|
286
|
-
"text": "`add()`"
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"kind": "text",
|
|
290
|
-
"text": " function is used for permission checks by the permissions\n router for the channel or channel resource specified in the "
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
"kind": "code",
|
|
294
|
-
"text": "`channel`"
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
"kind": "text",
|
|
298
|
-
"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 "
|
|
298
|
+
"text": "Sets a permissions handler for a specific channel or channel resource.\n\nAdding a handler to a channel without specifying a resource applies the\nhandler to the channel itself and to any of its resources that don't have\ntheir own handler.\n\nFor example, given the following setup:\n\n+ channel: A, permissions: handler X (set with "
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
301
|
"kind": "code",
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
},
|
|
304
304
|
{
|
|
305
305
|
"kind": "text",
|
|
306
|
-
"text": "
|
|
306
|
+
"text": ")\n+ channel: A, resource: 1, permissions: handler Y (set with "
|
|
307
307
|
},
|
|
308
308
|
{
|
|
309
309
|
"kind": "code",
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
},
|
|
312
312
|
{
|
|
313
313
|
"kind": "text",
|
|
314
|
-
"text": "
|
|
314
|
+
"text": ")\n+ channel: A, resource: 2, permissions: no handler\n\nPermissions are checked as follows:\n\n+ A: handler X\n+ A, resource 1: handler Y\n+ A, resource 2: handler X (inherited from channel)"
|
|
315
315
|
}
|
|
316
316
|
],
|
|
317
317
|
"blockTags": [
|
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
"summary": [
|
|
365
365
|
{
|
|
366
366
|
"kind": "text",
|
|
367
|
-
"text": "Channel or channel resource to
|
|
367
|
+
"text": "Channel or channel resource to set a permissions handler for."
|
|
368
368
|
}
|
|
369
369
|
]
|
|
370
370
|
},
|
|
@@ -385,7 +385,7 @@
|
|
|
385
385
|
"summary": [
|
|
386
386
|
{
|
|
387
387
|
"kind": "text",
|
|
388
|
-
"text": "
|
|
388
|
+
"text": "Function to run when checking permissions for the specified channel."
|
|
389
389
|
}
|
|
390
390
|
]
|
|
391
391
|
},
|
|
@@ -441,15 +441,7 @@
|
|
|
441
441
|
"summary": [
|
|
442
442
|
{
|
|
443
443
|
"kind": "text",
|
|
444
|
-
"text": "Checks the permissions for a subscriber on a channel or channel resource.\n\nThe "
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
"kind": "code",
|
|
448
|
-
"text": "`check()`"
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
"kind": "text",
|
|
452
|
-
"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 "
|
|
444
|
+
"text": "Checks the permissions for a subscriber on a channel or channel resource.\n\nThe resolution chain is:\n\n1. If a handler exists for the specified channel or resource, it runs and\n its result is returned.\n1. If no handler exists for the resource, the parent channel's handler\n runs instead.\n1. If no channel handler exists, the default handler runs.\n1. If no default handler is set, the built-in default permissions are\n returned: "
|
|
453
445
|
},
|
|
454
446
|
{
|
|
455
447
|
"kind": "code",
|
|
@@ -457,7 +449,7 @@
|
|
|
457
449
|
},
|
|
458
450
|
{
|
|
459
451
|
"kind": "text",
|
|
460
|
-
"text": "
|
|
452
|
+
"text": ".\n\nTypically, call this method in the body of the "
|
|
461
453
|
},
|
|
462
454
|
{
|
|
463
455
|
"kind": "code",
|
|
@@ -465,11 +457,11 @@
|
|
|
465
457
|
},
|
|
466
458
|
{
|
|
467
459
|
"kind": "text",
|
|
468
|
-
"text": "
|
|
460
|
+
"text": "\nfunction:\n\n"
|
|
469
461
|
},
|
|
470
462
|
{
|
|
471
463
|
"kind": "code",
|
|
472
|
-
"text": "```JavaScript\
|
|
464
|
+
"text": "```JavaScript\nexport function realtime_check_permission(channel, subscriber) {\n return permissionsRouter.check(channel, subscriber);\n}\n```"
|
|
473
465
|
}
|
|
474
466
|
],
|
|
475
467
|
"blockTags": [
|
|
@@ -514,7 +506,7 @@
|
|
|
514
506
|
"content": [
|
|
515
507
|
{
|
|
516
508
|
"kind": "text",
|
|
517
|
-
"text": "The permissions granted to the subscriber
|
|
509
|
+
"text": "The permissions granted to the subscriber."
|
|
518
510
|
}
|
|
519
511
|
]
|
|
520
512
|
},
|
|
@@ -549,7 +541,7 @@
|
|
|
549
541
|
"summary": [
|
|
550
542
|
{
|
|
551
543
|
"kind": "text",
|
|
552
|
-
"text": "Channel to check permissions for."
|
|
544
|
+
"text": "Channel or channel resource to check permissions for."
|
|
553
545
|
}
|
|
554
546
|
]
|
|
555
547
|
},
|
|
@@ -630,43 +622,39 @@
|
|
|
630
622
|
"summary": [
|
|
631
623
|
{
|
|
632
624
|
"kind": "text",
|
|
633
|
-
"text": "Sets
|
|
625
|
+
"text": "Sets the default permissions handler.\n\nThe default handler runs for all channels and resources where no explicit\nhandler has been added with "
|
|
634
626
|
},
|
|
635
627
|
{
|
|
636
628
|
"kind": "code",
|
|
637
|
-
"text": "`
|
|
629
|
+
"text": "`add()`"
|
|
638
630
|
},
|
|
639
631
|
{
|
|
640
632
|
"kind": "text",
|
|
641
|
-
"text": "
|
|
633
|
+
"text": ". Resources without their own handler\ninherit the parent channel's handler before falling back to the default.\n\nFor example, given the following setup:\n\n+ channel: A, permissions: no handler\n+ channel: A, resource: 1, permissions: no handler\n+ channel: A, resource: 2, permissions: handler set with "
|
|
642
634
|
},
|
|
643
635
|
{
|
|
644
636
|
"kind": "code",
|
|
645
|
-
"text": "`
|
|
637
|
+
"text": "`add()`"
|
|
646
638
|
},
|
|
647
639
|
{
|
|
648
640
|
"kind": "text",
|
|
649
|
-
"text": "
|
|
641
|
+
"text": "\n\nPermissions are checked as follows:\n\n+ A: default handler\n+ A, resource 1: default handler\n+ A, resource 2: handler set with "
|
|
650
642
|
},
|
|
651
643
|
{
|
|
652
644
|
"kind": "code",
|
|
653
|
-
"text": "`
|
|
645
|
+
"text": "`add()`"
|
|
654
646
|
},
|
|
655
647
|
{
|
|
656
648
|
"kind": "text",
|
|
657
|
-
"text": "
|
|
649
|
+
"text": "\n\nIf no default handler is set, the built-in default permissions are used:\n"
|
|
658
650
|
},
|
|
659
651
|
{
|
|
660
652
|
"kind": "code",
|
|
661
|
-
"text": "`
|
|
653
|
+
"text": "`{\"read\": true}`"
|
|
662
654
|
},
|
|
663
655
|
{
|
|
664
656
|
"kind": "text",
|
|
665
|
-
"text": "
|
|
666
|
-
},
|
|
667
|
-
{
|
|
668
|
-
"kind": "code",
|
|
669
|
-
"text": "`{\"read\": true}`"
|
|
657
|
+
"text": "."
|
|
670
658
|
}
|
|
671
659
|
],
|
|
672
660
|
"blockTags": [
|
|
@@ -701,7 +689,7 @@
|
|
|
701
689
|
"summary": [
|
|
702
690
|
{
|
|
703
691
|
"kind": "text",
|
|
704
|
-
"text": "
|
|
692
|
+
"text": "Function to run when checking default permissions."
|
|
705
693
|
}
|
|
706
694
|
]
|
|
707
695
|
},
|
|
@@ -757,7 +745,15 @@
|
|
|
757
745
|
"summary": [
|
|
758
746
|
{
|
|
759
747
|
"kind": "text",
|
|
760
|
-
"text": "
|
|
748
|
+
"text": "A function that determines the permissions for a subscriber on a channel\nor channel resource. Return a "
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"kind": "code",
|
|
752
|
+
"text": "`ChannelPermissions`"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"kind": "text",
|
|
756
|
+
"text": " object to grant or deny\naccess."
|
|
761
757
|
}
|
|
762
758
|
],
|
|
763
759
|
"blockTags": [
|
|
@@ -828,7 +824,7 @@
|
|
|
828
824
|
"summary": [
|
|
829
825
|
{
|
|
830
826
|
"kind": "text",
|
|
831
|
-
"text": "
|
|
827
|
+
"text": "Channel or channel resource being checked."
|
|
832
828
|
}
|
|
833
829
|
]
|
|
834
830
|
},
|
|
@@ -849,7 +845,7 @@
|
|
|
849
845
|
"summary": [
|
|
850
846
|
{
|
|
851
847
|
"kind": "text",
|
|
852
|
-
"text": "
|
|
848
|
+
"text": "Subscriber whose permissions are being checked."
|
|
853
849
|
}
|
|
854
850
|
]
|
|
855
851
|
},
|
|
@@ -911,7 +907,7 @@
|
|
|
911
907
|
"summary": [
|
|
912
908
|
{
|
|
913
909
|
"kind": "text",
|
|
914
|
-
"text": "Sets a permissions handler for a specific channel or channel resource.\n\
|
|
910
|
+
"text": "Sets a permissions handler for a specific channel or channel resource.\n\nAdding a handler to a channel without specifying a resource applies the\nhandler to the channel itself and to any of its resources that don't have\ntheir own handler.\n\nFor example, given the following setup:\n\n+ channel: A, permissions: handler X (set with "
|
|
915
911
|
},
|
|
916
912
|
{
|
|
917
913
|
"kind": "code",
|
|
@@ -919,23 +915,7 @@
|
|
|
919
915
|
},
|
|
920
916
|
{
|
|
921
917
|
"kind": "text",
|
|
922
|
-
"text": "
|
|
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 "
|
|
918
|
+
"text": ")\n+ channel: A, resource: 1, permissions: handler Y (set with "
|
|
939
919
|
},
|
|
940
920
|
{
|
|
941
921
|
"kind": "code",
|
|
@@ -943,7 +923,7 @@
|
|
|
943
923
|
},
|
|
944
924
|
{
|
|
945
925
|
"kind": "text",
|
|
946
|
-
"text": "
|
|
926
|
+
"text": ")\n+ channel: A, resource: 2, permissions: no handler\n\nPermissions are checked as follows:\n\n+ A: handler X\n+ A, resource 1: handler Y\n+ A, resource 2: handler X (inherited from channel)"
|
|
947
927
|
}
|
|
948
928
|
],
|
|
949
929
|
"blockTags": [
|
|
@@ -996,7 +976,7 @@
|
|
|
996
976
|
"summary": [
|
|
997
977
|
{
|
|
998
978
|
"kind": "text",
|
|
999
|
-
"text": "Channel or channel resource to
|
|
979
|
+
"text": "Channel or channel resource to set a permissions handler for."
|
|
1000
980
|
}
|
|
1001
981
|
]
|
|
1002
982
|
},
|
|
@@ -1017,7 +997,7 @@
|
|
|
1017
997
|
"summary": [
|
|
1018
998
|
{
|
|
1019
999
|
"kind": "text",
|
|
1020
|
-
"text": "
|
|
1000
|
+
"text": "Function to run when checking permissions for the specified channel."
|
|
1021
1001
|
}
|
|
1022
1002
|
]
|
|
1023
1003
|
},
|
|
@@ -1064,15 +1044,7 @@
|
|
|
1064
1044
|
"summary": [
|
|
1065
1045
|
{
|
|
1066
1046
|
"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 "
|
|
1047
|
+
"text": "Checks the permissions for a subscriber on a channel or channel resource.\n\nThe resolution chain is:\n\n1. If a handler exists for the specified channel or resource, it runs and\n its result is returned.\n1. If no handler exists for the resource, the parent channel's handler\n runs instead.\n1. If no channel handler exists, the default handler runs.\n1. If no default handler is set, the built-in default permissions are\n returned: "
|
|
1076
1048
|
},
|
|
1077
1049
|
{
|
|
1078
1050
|
"kind": "code",
|
|
@@ -1080,7 +1052,7 @@
|
|
|
1080
1052
|
},
|
|
1081
1053
|
{
|
|
1082
1054
|
"kind": "text",
|
|
1083
|
-
"text": "
|
|
1055
|
+
"text": ".\n\nTypically, call this method in the body of the "
|
|
1084
1056
|
},
|
|
1085
1057
|
{
|
|
1086
1058
|
"kind": "code",
|
|
@@ -1088,11 +1060,11 @@
|
|
|
1088
1060
|
},
|
|
1089
1061
|
{
|
|
1090
1062
|
"kind": "text",
|
|
1091
|
-
"text": "
|
|
1063
|
+
"text": "\nfunction:\n\n"
|
|
1092
1064
|
},
|
|
1093
1065
|
{
|
|
1094
1066
|
"kind": "code",
|
|
1095
|
-
"text": "```JavaScript\
|
|
1067
|
+
"text": "```JavaScript\nexport function realtime_check_permission(channel, subscriber) {\n return permissionsRouter.check(channel, subscriber);\n}\n```"
|
|
1096
1068
|
}
|
|
1097
1069
|
],
|
|
1098
1070
|
"blockTags": [
|
|
@@ -1137,7 +1109,7 @@
|
|
|
1137
1109
|
"content": [
|
|
1138
1110
|
{
|
|
1139
1111
|
"kind": "text",
|
|
1140
|
-
"text": "The permissions granted to the subscriber
|
|
1112
|
+
"text": "The permissions granted to the subscriber."
|
|
1141
1113
|
}
|
|
1142
1114
|
]
|
|
1143
1115
|
},
|
|
@@ -1172,7 +1144,7 @@
|
|
|
1172
1144
|
"summary": [
|
|
1173
1145
|
{
|
|
1174
1146
|
"kind": "text",
|
|
1175
|
-
"text": "Channel to check permissions for."
|
|
1147
|
+
"text": "Channel or channel resource to check permissions for."
|
|
1176
1148
|
}
|
|
1177
1149
|
]
|
|
1178
1150
|
},
|
|
@@ -1242,43 +1214,39 @@
|
|
|
1242
1214
|
"summary": [
|
|
1243
1215
|
{
|
|
1244
1216
|
"kind": "text",
|
|
1245
|
-
"text": "Sets
|
|
1217
|
+
"text": "Sets the default permissions handler.\n\nThe default handler runs for all channels and resources where no explicit\nhandler has been added with "
|
|
1246
1218
|
},
|
|
1247
1219
|
{
|
|
1248
1220
|
"kind": "code",
|
|
1249
|
-
"text": "`
|
|
1221
|
+
"text": "`add()`"
|
|
1250
1222
|
},
|
|
1251
1223
|
{
|
|
1252
1224
|
"kind": "text",
|
|
1253
|
-
"text": "
|
|
1225
|
+
"text": ". Resources without their own handler\ninherit the parent channel's handler before falling back to the default.\n\nFor example, given the following setup:\n\n+ channel: A, permissions: no handler\n+ channel: A, resource: 1, permissions: no handler\n+ channel: A, resource: 2, permissions: handler set with "
|
|
1254
1226
|
},
|
|
1255
1227
|
{
|
|
1256
1228
|
"kind": "code",
|
|
1257
|
-
"text": "`
|
|
1229
|
+
"text": "`add()`"
|
|
1258
1230
|
},
|
|
1259
1231
|
{
|
|
1260
1232
|
"kind": "text",
|
|
1261
|
-
"text": "
|
|
1233
|
+
"text": "\n\nPermissions are checked as follows:\n\n+ A: default handler\n+ A, resource 1: default handler\n+ A, resource 2: handler set with "
|
|
1262
1234
|
},
|
|
1263
1235
|
{
|
|
1264
1236
|
"kind": "code",
|
|
1265
|
-
"text": "`
|
|
1237
|
+
"text": "`add()`"
|
|
1266
1238
|
},
|
|
1267
1239
|
{
|
|
1268
1240
|
"kind": "text",
|
|
1269
|
-
"text": "
|
|
1241
|
+
"text": "\n\nIf no default handler is set, the built-in default permissions are used:\n"
|
|
1270
1242
|
},
|
|
1271
1243
|
{
|
|
1272
1244
|
"kind": "code",
|
|
1273
|
-
"text": "`
|
|
1245
|
+
"text": "`{\"read\": true}`"
|
|
1274
1246
|
},
|
|
1275
1247
|
{
|
|
1276
1248
|
"kind": "text",
|
|
1277
|
-
"text": "
|
|
1278
|
-
},
|
|
1279
|
-
{
|
|
1280
|
-
"kind": "code",
|
|
1281
|
-
"text": "`{\"read\": true}`"
|
|
1249
|
+
"text": "."
|
|
1282
1250
|
}
|
|
1283
1251
|
],
|
|
1284
1252
|
"blockTags": [
|
|
@@ -1313,7 +1281,7 @@
|
|
|
1313
1281
|
"summary": [
|
|
1314
1282
|
{
|
|
1315
1283
|
"kind": "text",
|
|
1316
|
-
"text": "
|
|
1284
|
+
"text": "Function to run when checking default permissions."
|
|
1317
1285
|
}
|
|
1318
1286
|
]
|
|
1319
1287
|
},
|
|
@@ -1366,7 +1334,7 @@
|
|
|
1366
1334
|
"summary": [
|
|
1367
1335
|
{
|
|
1368
1336
|
"kind": "text",
|
|
1369
|
-
"text": "
|
|
1337
|
+
"text": "A realtime channel that subscribers can listen to and publishers can send messages to.\nA channel can optionally contain resources, which act as isolated sub-channels.\nSubscribing to a channel doesn't include messages published to its resources, and vice versa."
|
|
1370
1338
|
}
|
|
1371
1339
|
]
|
|
1372
1340
|
},
|
|
@@ -1381,7 +1349,7 @@
|
|
|
1381
1349
|
"summary": [
|
|
1382
1350
|
{
|
|
1383
1351
|
"kind": "text",
|
|
1384
|
-
"text": "Channel name.
|
|
1352
|
+
"text": "Channel name. Supports alphanumeric characters, hyphens, and underscores.\nThe combined length of "
|
|
1385
1353
|
},
|
|
1386
1354
|
{
|
|
1387
1355
|
"kind": "code",
|
|
@@ -1397,7 +1365,7 @@
|
|
|
1397
1365
|
},
|
|
1398
1366
|
{
|
|
1399
1367
|
"kind": "text",
|
|
1400
|
-
"text": "
|
|
1368
|
+
"text": " can't exceed 140 characters."
|
|
1401
1369
|
}
|
|
1402
1370
|
]
|
|
1403
1371
|
},
|
|
@@ -1418,7 +1386,15 @@
|
|
|
1418
1386
|
"summary": [
|
|
1419
1387
|
{
|
|
1420
1388
|
"kind": "text",
|
|
1421
|
-
"text": "ID
|
|
1389
|
+
"text": "Resource ID within the channel. Use resources to isolate messages within a channel.\nFor example, a "
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
"kind": "code",
|
|
1393
|
+
"text": "`chat`"
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"kind": "text",
|
|
1397
|
+
"text": " channel might use a separate resource for each chat room."
|
|
1422
1398
|
}
|
|
1423
1399
|
]
|
|
1424
1400
|
},
|
|
@@ -1448,7 +1424,7 @@
|
|
|
1448
1424
|
"summary": [
|
|
1449
1425
|
{
|
|
1450
1426
|
"kind": "text",
|
|
1451
|
-
"text": "
|
|
1427
|
+
"text": "Permission settings for a subscriber on a channel or channel resource."
|
|
1452
1428
|
}
|
|
1453
1429
|
]
|
|
1454
1430
|
},
|
|
@@ -1465,15 +1441,11 @@
|
|
|
1465
1441
|
"summary": [
|
|
1466
1442
|
{
|
|
1467
1443
|
"kind": "text",
|
|
1468
|
-
"text": "Whether the subscriber
|
|
1444
|
+
"text": "Whether the subscriber can receive messages on the channel.\n\nDefault: "
|
|
1469
1445
|
},
|
|
1470
1446
|
{
|
|
1471
1447
|
"kind": "code",
|
|
1472
1448
|
"text": "`true`"
|
|
1473
|
-
},
|
|
1474
|
-
{
|
|
1475
|
-
"kind": "text",
|
|
1476
|
-
"text": "."
|
|
1477
1449
|
}
|
|
1478
1450
|
]
|
|
1479
1451
|
},
|
|
@@ -1581,7 +1553,15 @@
|
|
|
1581
1553
|
"summary": [
|
|
1582
1554
|
{
|
|
1583
1555
|
"kind": "text",
|
|
1584
|
-
"text": "
|
|
1556
|
+
"text": "A channel subscriber whose permissions are being checked.\nPassed to the "
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
"kind": "code",
|
|
1560
|
+
"text": "`realtime_check_permission()`"
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
"kind": "text",
|
|
1564
|
+
"text": " hook to identify the subscriber."
|
|
1585
1565
|
}
|
|
1586
1566
|
]
|
|
1587
1567
|
},
|
|
@@ -1596,7 +1576,7 @@
|
|
|
1596
1576
|
"summary": [
|
|
1597
1577
|
{
|
|
1598
1578
|
"kind": "text",
|
|
1599
|
-
"text": "
|
|
1579
|
+
"text": "Subscriber ID."
|
|
1600
1580
|
}
|
|
1601
1581
|
],
|
|
1602
1582
|
"blockTags": [
|
|
@@ -1626,7 +1606,7 @@
|
|
|
1626
1606
|
"summary": [
|
|
1627
1607
|
{
|
|
1628
1608
|
"kind": "text",
|
|
1629
|
-
"text": "
|
|
1609
|
+
"text": "Subscriber type, based on their authentication status."
|
|
1630
1610
|
}
|
|
1631
1611
|
],
|
|
1632
1612
|
"blockTags": [
|
|
@@ -1674,7 +1654,7 @@
|
|
|
1674
1654
|
"summary": [
|
|
1675
1655
|
{
|
|
1676
1656
|
"kind": "text",
|
|
1677
|
-
"text": "
|
|
1657
|
+
"text": "The realtime permissions router.\n\nUse the permissions router to define which subscribers can receive messages\non specific channels or channel resources. You can set permissions at the\nchannel level and the channel resource level. If you don't define\npermissions for a particular resource, it inherits the permissions of its\nparent channel.\n\nTypically, you use the permissions router in the **realtime-permissions.js**\nfile in your site's backend to:\n\n+ Set default permissions for all channels where no explicit permissions\n are defined.\n+ Add permissions logic for specific channels or channel resources.\n+ Check the permissions for a subscriber on a channel.\n\n> **Note:** You don't have to use the permissions router. You can also\n> define all your permissions logic directly in the\n> "
|
|
1678
1658
|
},
|
|
1679
1659
|
{
|
|
1680
1660
|
"kind": "code",
|
|
@@ -1682,7 +1662,7 @@
|
|
|
1682
1662
|
},
|
|
1683
1663
|
{
|
|
1684
1664
|
"kind": "text",
|
|
1685
|
-
"text": "
|
|
1665
|
+
"text": " function."
|
|
1686
1666
|
}
|
|
1687
1667
|
],
|
|
1688
1668
|
"blockTags": [
|
|
@@ -1721,58 +1701,67 @@
|
|
|
1721
1701
|
"summary": [
|
|
1722
1702
|
{
|
|
1723
1703
|
"kind": "text",
|
|
1724
|
-
"text": "Publishes a message to a channel or channel resource
|
|
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": "."
|
|
1704
|
+
"text": "Publishes a message to a channel or channel resource."
|
|
1773
1705
|
}
|
|
1774
1706
|
],
|
|
1775
1707
|
"blockTags": [
|
|
1708
|
+
{
|
|
1709
|
+
"tag": "@deprecated",
|
|
1710
|
+
"content": [
|
|
1711
|
+
{
|
|
1712
|
+
"kind": "text",
|
|
1713
|
+
"text": "Use "
|
|
1714
|
+
},
|
|
1715
|
+
{
|
|
1716
|
+
"kind": "code",
|
|
1717
|
+
"text": "`publisher.publish()`"
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
"kind": "text",
|
|
1721
|
+
"text": " from the "
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
"kind": "code",
|
|
1725
|
+
"text": "`@wix/realtime`"
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
"kind": "text",
|
|
1729
|
+
"text": " module instead.\n\nSubscribers to a channel don't receive messages published to a resource on\nthat channel, and vice versa.\n\nTo publish a message to specific users only, specify the users by ID in\nthe "
|
|
1730
|
+
},
|
|
1731
|
+
{
|
|
1732
|
+
"kind": "code",
|
|
1733
|
+
"text": "`options`"
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
"kind": "text",
|
|
1737
|
+
"text": " parameter. To include the publisher's identity in the message,\nset "
|
|
1738
|
+
},
|
|
1739
|
+
{
|
|
1740
|
+
"kind": "code",
|
|
1741
|
+
"text": "`includePublisher`"
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
"kind": "text",
|
|
1745
|
+
"text": " to "
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
"kind": "code",
|
|
1749
|
+
"text": "`true`"
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
"kind": "text",
|
|
1753
|
+
"text": " in the "
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
"kind": "code",
|
|
1757
|
+
"text": "`options`"
|
|
1758
|
+
},
|
|
1759
|
+
{
|
|
1760
|
+
"kind": "text",
|
|
1761
|
+
"text": " parameter."
|
|
1762
|
+
}
|
|
1763
|
+
]
|
|
1764
|
+
},
|
|
1776
1765
|
{
|
|
1777
1766
|
"tag": "@deprecated",
|
|
1778
1767
|
"content": [
|
|
@@ -1839,15 +1828,7 @@
|
|
|
1839
1828
|
"content": [
|
|
1840
1829
|
{
|
|
1841
1830
|
"kind": "text",
|
|
1842
|
-
"text": "
|
|
1843
|
-
},
|
|
1844
|
-
{
|
|
1845
|
-
"kind": "code",
|
|
1846
|
-
"text": "`void`"
|
|
1847
|
-
},
|
|
1848
|
-
{
|
|
1849
|
-
"kind": "text",
|
|
1850
|
-
"text": " is returned. Does not indicate that the message was received."
|
|
1831
|
+
"text": "Fulfilled when the message is published. Doesn't indicate that the message was received by subscribers."
|
|
1851
1832
|
}
|
|
1852
1833
|
]
|
|
1853
1834
|
}
|
|
@@ -1864,7 +1845,7 @@
|
|
|
1864
1845
|
"summary": [
|
|
1865
1846
|
{
|
|
1866
1847
|
"kind": "text",
|
|
1867
|
-
"text": "
|
|
1848
|
+
"text": "Channel, and optionally resource, to publish to."
|
|
1868
1849
|
}
|
|
1869
1850
|
]
|
|
1870
1851
|
},
|
|
@@ -1885,7 +1866,7 @@
|
|
|
1885
1866
|
"summary": [
|
|
1886
1867
|
{
|
|
1887
1868
|
"kind": "text",
|
|
1888
|
-
"text": "Message payload
|
|
1869
|
+
"text": "Message payload. Max: 10 KB."
|
|
1889
1870
|
}
|
|
1890
1871
|
]
|
|
1891
1872
|
},
|
|
@@ -1906,7 +1887,7 @@
|
|
|
1906
1887
|
"summary": [
|
|
1907
1888
|
{
|
|
1908
1889
|
"kind": "text",
|
|
1909
|
-
"text": "Options
|
|
1890
|
+
"text": "Options for publishing, such as targeting specific users."
|
|
1910
1891
|
}
|
|
1911
1892
|
]
|
|
1912
1893
|
},
|
|
@@ -1953,23 +1934,7 @@
|
|
|
1953
1934
|
"summary": [
|
|
1954
1935
|
{
|
|
1955
1936
|
"kind": "text",
|
|
1956
|
-
"text": "Checks permissions for a subscriber on a channel or channel resource.\n\
|
|
1957
|
-
},
|
|
1958
|
-
{
|
|
1959
|
-
"kind": "code",
|
|
1960
|
-
"text": "`realtime_check_permission`"
|
|
1961
|
-
},
|
|
1962
|
-
{
|
|
1963
|
-
"kind": "text",
|
|
1964
|
-
"text": " hook is triggered when a site visitor subscribes\n to a channel to check what permissions the subscriber will have.\n\n The "
|
|
1965
|
-
},
|
|
1966
|
-
{
|
|
1967
|
-
"kind": "code",
|
|
1968
|
-
"text": "`realtime_check_permission()`"
|
|
1969
|
-
},
|
|
1970
|
-
{
|
|
1971
|
-
"kind": "text",
|
|
1972
|
-
"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: "
|
|
1937
|
+
"text": "Checks permissions for a subscriber on a channel or channel resource.\n\nThis is a hook, not a method you call directly. Define this function as a\nnamed export in a file called **realtime-permissions.js** in your site's\nbackend. It runs automatically when a site visitor subscribes to a channel.\n\n> **Important:**\n> - If this function isn't defined, all subscribers receive the default\n> permissions: "
|
|
1973
1938
|
},
|
|
1974
1939
|
{
|
|
1975
1940
|
"kind": "code",
|
|
@@ -1977,23 +1942,23 @@
|
|
|
1977
1942
|
},
|
|
1978
1943
|
{
|
|
1979
1944
|
"kind": "text",
|
|
1980
|
-
"text": ".\n- In Wix Studio, you don't need to define this function, but you must
|
|
1945
|
+
"text": ".\n> - In Wix Studio, you don't need to define this function, but you must\n> create a backend file named **realtime-permissions.js**. Without this\n> file, subscriptions fail.\n\nImplement permissions logic in one of the following ways:\n\n+ Include all permissions logic directly in the body of this function.\n+ Use the "
|
|
1981
1946
|
},
|
|
1982
1947
|
{
|
|
1983
1948
|
"kind": "code",
|
|
1984
|
-
"text": "`
|
|
1949
|
+
"text": "`permissionsRouter`"
|
|
1985
1950
|
},
|
|
1986
1951
|
{
|
|
1987
1952
|
"kind": "text",
|
|
1988
|
-
"text": " to add permissions
|
|
1953
|
+
"text": " to add permissions logic per channel, then\n call "
|
|
1989
1954
|
},
|
|
1990
1955
|
{
|
|
1991
1956
|
"kind": "code",
|
|
1992
|
-
"text": "`check()`"
|
|
1957
|
+
"text": "`permissionsRouter.check()`"
|
|
1993
1958
|
},
|
|
1994
1959
|
{
|
|
1995
1960
|
"kind": "text",
|
|
1996
|
-
"text": "
|
|
1961
|
+
"text": " in the body of this function and return\n its result.\n\n> **Note:** When previewing your site, read permissions are always granted."
|
|
1997
1962
|
}
|
|
1998
1963
|
],
|
|
1999
1964
|
"blockTags": [
|
|
@@ -2073,7 +2038,7 @@
|
|
|
2073
2038
|
"summary": [
|
|
2074
2039
|
{
|
|
2075
2040
|
"kind": "text",
|
|
2076
|
-
"text": "
|
|
2041
|
+
"text": "Channel, and optionally resource, to check permissions for."
|
|
2077
2042
|
}
|
|
2078
2043
|
]
|
|
2079
2044
|
},
|
|
@@ -2094,7 +2059,7 @@
|
|
|
2094
2059
|
"summary": [
|
|
2095
2060
|
{
|
|
2096
2061
|
"kind": "text",
|
|
2097
|
-
"text": "
|
|
2062
|
+
"text": "Subscriber to check permissions for."
|
|
2098
2063
|
}
|
|
2099
2064
|
]
|
|
2100
2065
|
},
|
|
@@ -2182,7 +2147,7 @@
|
|
|
2182
2147
|
"summary": [
|
|
2183
2148
|
{
|
|
2184
2149
|
"kind": "text",
|
|
2185
|
-
"text": "
|
|
2150
|
+
"text": "Subscribes to a channel or channel resource.\n\nThe method returns a subscription ID immediately. The connection is\nestablished asynchronously in the background. Use the "
|
|
2186
2151
|
},
|
|
2187
2152
|
{
|
|
2188
2153
|
"kind": "code",
|
|
@@ -2190,7 +2155,15 @@
|
|
|
2190
2155
|
},
|
|
2191
2156
|
{
|
|
2192
2157
|
"kind": "text",
|
|
2193
|
-
"text": " parameter
|
|
2158
|
+
"text": " parameter\nto register lifecycle handlers that notify you when the subscription\nsucceeds or encounters an error.\n\nIf the connection drops, the client automatically attempts to reconnect\nand re-subscribe. The "
|
|
2159
|
+
},
|
|
2160
|
+
{
|
|
2161
|
+
"kind": "code",
|
|
2162
|
+
"text": "`onSubscribed`"
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
"kind": "text",
|
|
2166
|
+
"text": " handler fires again on each\nsuccessful re-subscription."
|
|
2194
2167
|
}
|
|
2195
2168
|
],
|
|
2196
2169
|
"blockTags": [
|
|
@@ -2233,7 +2206,7 @@
|
|
|
2233
2206
|
"summary": [
|
|
2234
2207
|
{
|
|
2235
2208
|
"kind": "text",
|
|
2236
|
-
"text": "
|
|
2209
|
+
"text": "Channel, and optionally resource, to subscribe to."
|
|
2237
2210
|
}
|
|
2238
2211
|
]
|
|
2239
2212
|
},
|
|
@@ -2254,7 +2227,7 @@
|
|
|
2254
2227
|
"summary": [
|
|
2255
2228
|
{
|
|
2256
2229
|
"kind": "text",
|
|
2257
|
-
"text": "Callback
|
|
2230
|
+
"text": "Callback that runs whenever a message is published to the channel."
|
|
2258
2231
|
}
|
|
2259
2232
|
]
|
|
2260
2233
|
},
|
|
@@ -2277,7 +2250,7 @@
|
|
|
2277
2250
|
"summary": [
|
|
2278
2251
|
{
|
|
2279
2252
|
"kind": "text",
|
|
2280
|
-
"text": "
|
|
2253
|
+
"text": "Lifecycle handlers for subscription events."
|
|
2281
2254
|
}
|
|
2282
2255
|
]
|
|
2283
2256
|
},
|
|
@@ -2304,7 +2277,7 @@
|
|
|
2304
2277
|
"summary": [
|
|
2305
2278
|
{
|
|
2306
2279
|
"kind": "text",
|
|
2307
|
-
"text": "
|
|
2280
|
+
"text": "Subscribes to a channel or channel resource.\n\nThe method returns a subscription ID immediately. The connection is\nestablished asynchronously in the background. Use the "
|
|
2308
2281
|
},
|
|
2309
2282
|
{
|
|
2310
2283
|
"kind": "code",
|
|
@@ -2312,7 +2285,15 @@
|
|
|
2312
2285
|
},
|
|
2313
2286
|
{
|
|
2314
2287
|
"kind": "text",
|
|
2315
|
-
"text": " parameter
|
|
2288
|
+
"text": " parameter\nto register lifecycle handlers that notify you when the subscription\nsucceeds or encounters an error.\n\nIf the connection drops, the client automatically attempts to reconnect\nand re-subscribe. The "
|
|
2289
|
+
},
|
|
2290
|
+
{
|
|
2291
|
+
"kind": "code",
|
|
2292
|
+
"text": "`onSubscribed`"
|
|
2293
|
+
},
|
|
2294
|
+
{
|
|
2295
|
+
"kind": "text",
|
|
2296
|
+
"text": " handler fires again on each\nsuccessful re-subscription."
|
|
2316
2297
|
}
|
|
2317
2298
|
],
|
|
2318
2299
|
"blockTags": [
|
|
@@ -2391,7 +2372,7 @@
|
|
|
2391
2372
|
"summary": [
|
|
2392
2373
|
{
|
|
2393
2374
|
"kind": "text",
|
|
2394
|
-
"text": "
|
|
2375
|
+
"text": "Removes one or more subscriptions.\n\nYou can unsubscribe in three ways:\n- By "
|
|
2395
2376
|
},
|
|
2396
2377
|
{
|
|
2397
2378
|
"kind": "code",
|
|
@@ -2399,7 +2380,7 @@
|
|
|
2399
2380
|
},
|
|
2400
2381
|
{
|
|
2401
2382
|
"kind": "text",
|
|
2402
|
-
"text": "
|
|
2383
|
+
"text": ": removes a single subscription.\n- By "
|
|
2403
2384
|
},
|
|
2404
2385
|
{
|
|
2405
2386
|
"kind": "code",
|
|
@@ -2407,7 +2388,7 @@
|
|
|
2407
2388
|
},
|
|
2408
2389
|
{
|
|
2409
2390
|
"kind": "text",
|
|
2410
|
-
"text": "
|
|
2391
|
+
"text": ": removes all subscriptions to that channel or channel resource.\n- By both: removes the specific subscription, verifying it matches the channel.\n\nWhen the last subscription on a connection is removed, the connection\ncloses automatically."
|
|
2411
2392
|
}
|
|
2412
2393
|
],
|
|
2413
2394
|
"blockTags": [
|
|
@@ -2450,7 +2431,23 @@
|
|
|
2450
2431
|
"summary": [
|
|
2451
2432
|
{
|
|
2452
2433
|
"kind": "text",
|
|
2453
|
-
"text": "
|
|
2434
|
+
"text": "Specifies what to unsubscribe from. At least one of "
|
|
2435
|
+
},
|
|
2436
|
+
{
|
|
2437
|
+
"kind": "code",
|
|
2438
|
+
"text": "`channel`"
|
|
2439
|
+
},
|
|
2440
|
+
{
|
|
2441
|
+
"kind": "text",
|
|
2442
|
+
"text": " or "
|
|
2443
|
+
},
|
|
2444
|
+
{
|
|
2445
|
+
"kind": "code",
|
|
2446
|
+
"text": "`subscriptionId`"
|
|
2447
|
+
},
|
|
2448
|
+
{
|
|
2449
|
+
"kind": "text",
|
|
2450
|
+
"text": " is required."
|
|
2454
2451
|
}
|
|
2455
2452
|
]
|
|
2456
2453
|
},
|
|
@@ -2477,7 +2474,7 @@
|
|
|
2477
2474
|
"summary": [
|
|
2478
2475
|
{
|
|
2479
2476
|
"kind": "text",
|
|
2480
|
-
"text": "
|
|
2477
|
+
"text": "Removes one or more subscriptions.\n\nYou can unsubscribe in three ways:\n- By "
|
|
2481
2478
|
},
|
|
2482
2479
|
{
|
|
2483
2480
|
"kind": "code",
|
|
@@ -2485,7 +2482,7 @@
|
|
|
2485
2482
|
},
|
|
2486
2483
|
{
|
|
2487
2484
|
"kind": "text",
|
|
2488
|
-
"text": "
|
|
2485
|
+
"text": ": removes a single subscription.\n- By "
|
|
2489
2486
|
},
|
|
2490
2487
|
{
|
|
2491
2488
|
"kind": "code",
|
|
@@ -2493,7 +2490,7 @@
|
|
|
2493
2490
|
},
|
|
2494
2491
|
{
|
|
2495
2492
|
"kind": "text",
|
|
2496
|
-
"text": "
|
|
2493
|
+
"text": ": removes all subscriptions to that channel or channel resource.\n- By both: removes the specific subscription, verifying it matches the channel.\n\nWhen the last subscription on a connection is removed, the connection\ncloses automatically."
|
|
2497
2494
|
}
|
|
2498
2495
|
],
|
|
2499
2496
|
"blockTags": [
|
|
@@ -2591,7 +2588,7 @@
|
|
|
2591
2588
|
"summary": [
|
|
2592
2589
|
{
|
|
2593
2590
|
"kind": "text",
|
|
2594
|
-
"text": "
|
|
2591
|
+
"text": "The input is invalid. For example, a channel name with unsupported characters."
|
|
2595
2592
|
}
|
|
2596
2593
|
]
|
|
2597
2594
|
},
|
|
@@ -2610,7 +2607,7 @@
|
|
|
2610
2607
|
"summary": [
|
|
2611
2608
|
{
|
|
2612
2609
|
"kind": "text",
|
|
2613
|
-
"text": "A connection attempt failed. The client keeps retrying automatically."
|
|
2610
|
+
"text": "A connection attempt failed. The client keeps retrying automatically with exponential backoff."
|
|
2614
2611
|
}
|
|
2615
2612
|
]
|
|
2616
2613
|
},
|
|
@@ -2629,7 +2626,15 @@
|
|
|
2629
2626
|
"summary": [
|
|
2630
2627
|
{
|
|
2631
2628
|
"kind": "text",
|
|
2632
|
-
"text": "The connection was closed, either intentionally or due to an error."
|
|
2629
|
+
"text": "The connection was closed, either intentionally or due to an error. Check "
|
|
2630
|
+
},
|
|
2631
|
+
{
|
|
2632
|
+
"kind": "code",
|
|
2633
|
+
"text": "`recoverable`"
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
"kind": "text",
|
|
2637
|
+
"text": " to determine whether the client is attempting to reconnect."
|
|
2633
2638
|
}
|
|
2634
2639
|
]
|
|
2635
2640
|
},
|
|
@@ -2648,7 +2653,7 @@
|
|
|
2648
2653
|
"summary": [
|
|
2649
2654
|
{
|
|
2650
2655
|
"kind": "text",
|
|
2651
|
-
"text": "The subscription request
|
|
2656
|
+
"text": "The subscription request was rejected by the server. For example, due to an authorization failure. This error is non-recoverable."
|
|
2652
2657
|
}
|
|
2653
2658
|
]
|
|
2654
2659
|
},
|
|
@@ -2680,7 +2685,7 @@
|
|
|
2680
2685
|
"summary": [
|
|
2681
2686
|
{
|
|
2682
2687
|
"kind": "text",
|
|
2683
|
-
"text": "An
|
|
2688
|
+
"text": "An error related to a realtime subscription or connection."
|
|
2684
2689
|
}
|
|
2685
2690
|
]
|
|
2686
2691
|
},
|
|
@@ -2827,7 +2832,7 @@
|
|
|
2827
2832
|
"summary": [
|
|
2828
2833
|
{
|
|
2829
2834
|
"kind": "text",
|
|
2830
|
-
"text": "Channel related to the error."
|
|
2835
|
+
"text": "Channel related to the error, if applicable."
|
|
2831
2836
|
}
|
|
2832
2837
|
]
|
|
2833
2838
|
},
|
|
@@ -2848,7 +2853,7 @@
|
|
|
2848
2853
|
"summary": [
|
|
2849
2854
|
{
|
|
2850
2855
|
"kind": "text",
|
|
2851
|
-
"text": "Error code."
|
|
2856
|
+
"text": "Error code indicating the type of error."
|
|
2852
2857
|
}
|
|
2853
2858
|
]
|
|
2854
2859
|
},
|
|
@@ -2887,7 +2892,11 @@
|
|
|
2887
2892
|
},
|
|
2888
2893
|
{
|
|
2889
2894
|
"kind": "text",
|
|
2890
|
-
"text": ",
|
|
2895
|
+
"text": ", the subscription\nmust be re-created manually.\n\nDefault: "
|
|
2896
|
+
},
|
|
2897
|
+
{
|
|
2898
|
+
"kind": "code",
|
|
2899
|
+
"text": "`false`"
|
|
2891
2900
|
}
|
|
2892
2901
|
]
|
|
2893
2902
|
},
|
|
@@ -2908,7 +2917,47 @@
|
|
|
2908
2917
|
"summary": [
|
|
2909
2918
|
{
|
|
2910
2919
|
"kind": "text",
|
|
2911
|
-
"text": "HTTP status code from the server response
|
|
2920
|
+
"text": "HTTP status code from the server response. For example, "
|
|
2921
|
+
},
|
|
2922
|
+
{
|
|
2923
|
+
"kind": "code",
|
|
2924
|
+
"text": "`401`"
|
|
2925
|
+
},
|
|
2926
|
+
{
|
|
2927
|
+
"kind": "text",
|
|
2928
|
+
"text": ", "
|
|
2929
|
+
},
|
|
2930
|
+
{
|
|
2931
|
+
"kind": "code",
|
|
2932
|
+
"text": "`403`"
|
|
2933
|
+
},
|
|
2934
|
+
{
|
|
2935
|
+
"kind": "text",
|
|
2936
|
+
"text": ", or "
|
|
2937
|
+
},
|
|
2938
|
+
{
|
|
2939
|
+
"kind": "code",
|
|
2940
|
+
"text": "`500`"
|
|
2941
|
+
},
|
|
2942
|
+
{
|
|
2943
|
+
"kind": "text",
|
|
2944
|
+
"text": ".\n\nReturned only when "
|
|
2945
|
+
},
|
|
2946
|
+
{
|
|
2947
|
+
"kind": "code",
|
|
2948
|
+
"text": "`errorCode`"
|
|
2949
|
+
},
|
|
2950
|
+
{
|
|
2951
|
+
"kind": "text",
|
|
2952
|
+
"text": " is "
|
|
2953
|
+
},
|
|
2954
|
+
{
|
|
2955
|
+
"kind": "code",
|
|
2956
|
+
"text": "`SUBSCRIPTION_FAILED`"
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
"kind": "text",
|
|
2960
|
+
"text": "."
|
|
2912
2961
|
}
|
|
2913
2962
|
]
|
|
2914
2963
|
},
|
|
@@ -2957,7 +3006,7 @@
|
|
|
2957
3006
|
"summary": [
|
|
2958
3007
|
{
|
|
2959
3008
|
"kind": "text",
|
|
2960
|
-
"text": "
|
|
3009
|
+
"text": "A message received on a realtime channel."
|
|
2961
3010
|
}
|
|
2962
3011
|
]
|
|
2963
3012
|
},
|
|
@@ -2972,7 +3021,7 @@
|
|
|
2972
3021
|
"summary": [
|
|
2973
3022
|
{
|
|
2974
3023
|
"kind": "text",
|
|
2975
|
-
"text": "Message payload.\nMax:
|
|
3024
|
+
"text": "Message payload containing the published data.\n\nMax: 10 KB."
|
|
2976
3025
|
}
|
|
2977
3026
|
]
|
|
2978
3027
|
},
|
|
@@ -3008,7 +3057,7 @@
|
|
|
3008
3057
|
"summary": [
|
|
3009
3058
|
{
|
|
3010
3059
|
"kind": "text",
|
|
3011
|
-
"text": "
|
|
3060
|
+
"text": "Information about the user who published the message.\n\nReturned only when the publisher's identity is available."
|
|
3012
3061
|
}
|
|
3013
3062
|
]
|
|
3014
3063
|
},
|
|
@@ -3040,7 +3089,7 @@
|
|
|
3040
3089
|
"summary": [
|
|
3041
3090
|
{
|
|
3042
3091
|
"kind": "text",
|
|
3043
|
-
"text": "
|
|
3092
|
+
"text": "Information about the user who published a message."
|
|
3044
3093
|
}
|
|
3045
3094
|
]
|
|
3046
3095
|
},
|
|
@@ -3055,7 +3104,7 @@
|
|
|
3055
3104
|
"summary": [
|
|
3056
3105
|
{
|
|
3057
3106
|
"kind": "text",
|
|
3058
|
-
"text": "ID
|
|
3107
|
+
"text": "Publisher ID."
|
|
3059
3108
|
}
|
|
3060
3109
|
]
|
|
3061
3110
|
},
|
|
@@ -3084,7 +3133,7 @@
|
|
|
3084
3133
|
"summary": [
|
|
3085
3134
|
{
|
|
3086
3135
|
"kind": "text",
|
|
3087
|
-
"text": "
|
|
3136
|
+
"text": "Optional lifecycle handlers for a subscription. Use these to respond to\nsubscription status changes, such as successful connections and errors."
|
|
3088
3137
|
}
|
|
3089
3138
|
]
|
|
3090
3139
|
},
|
|
@@ -3101,7 +3150,7 @@
|
|
|
3101
3150
|
"summary": [
|
|
3102
3151
|
{
|
|
3103
3152
|
"kind": "text",
|
|
3104
|
-
"text": "
|
|
3153
|
+
"text": "Called when the subscription is successfully established.\n\nThis handler fires on the initial subscription and again every time the\nsubscription is automatically restored after a reconnection. Make\nsure your handler is idempotent.\n\nThe "
|
|
3105
3154
|
},
|
|
3106
3155
|
{
|
|
3107
3156
|
"kind": "code",
|
|
@@ -3109,7 +3158,7 @@
|
|
|
3109
3158
|
},
|
|
3110
3159
|
{
|
|
3111
3160
|
"kind": "text",
|
|
3112
|
-
"text": "
|
|
3161
|
+
"text": " parameter indicates whether the server restored\nmissed messages since the last disconnection:\n\n- **First subscription**: always "
|
|
3113
3162
|
},
|
|
3114
3163
|
{
|
|
3115
3164
|
"kind": "code",
|
|
@@ -3117,23 +3166,23 @@
|
|
|
3117
3166
|
},
|
|
3118
3167
|
{
|
|
3119
3168
|
"kind": "text",
|
|
3120
|
-
"text": ". The client has no prior\n message history, so the server
|
|
3169
|
+
"text": ". The client has no prior\n message history, so the server can't restore anything. Load your\n initial state independently.\n\n- **Re-subscription after reconnect, "
|
|
3121
3170
|
},
|
|
3122
3171
|
{
|
|
3123
3172
|
"kind": "code",
|
|
3124
|
-
"text": "`
|
|
3173
|
+
"text": "`true`"
|
|
3125
3174
|
},
|
|
3126
3175
|
{
|
|
3127
3176
|
"kind": "text",
|
|
3128
|
-
"text": "
|
|
3177
|
+
"text": "**: the server\n found the last received message and replayed everything since.\n No action needed.\n\n- **Re-subscription after reconnect, "
|
|
3129
3178
|
},
|
|
3130
3179
|
{
|
|
3131
3180
|
"kind": "code",
|
|
3132
|
-
"text": "`
|
|
3181
|
+
"text": "`false`"
|
|
3133
3182
|
},
|
|
3134
3183
|
{
|
|
3135
3184
|
"kind": "text",
|
|
3136
|
-
"text": "
|
|
3185
|
+
"text": "**: the server\n couldn't restore missed messages (for example, they expired). Resync your\n state independently.\n\n<!-- TODO: Document server-side buffer limits for message replay. -->"
|
|
3137
3186
|
}
|
|
3138
3187
|
],
|
|
3139
3188
|
"blockTags": [
|
|
@@ -3143,7 +3192,7 @@
|
|
|
3143
3192
|
"content": [
|
|
3144
3193
|
{
|
|
3145
3194
|
"kind": "text",
|
|
3146
|
-
"text": "
|
|
3195
|
+
"text": "ID of the subscription that was established."
|
|
3147
3196
|
}
|
|
3148
3197
|
]
|
|
3149
3198
|
},
|
|
@@ -3178,7 +3227,7 @@
|
|
|
3178
3227
|
"summary": [
|
|
3179
3228
|
{
|
|
3180
3229
|
"kind": "text",
|
|
3181
|
-
"text": "
|
|
3230
|
+
"text": "Called when a subscription error occurs.\n\nThis handler is triggered in the following scenarios:\n\n- **Subscription failed**: the subscription request was rejected (for example,\n due to an authorization failure). The error includes the HTTP\n "
|
|
3182
3231
|
},
|
|
3183
3232
|
{
|
|
3184
3233
|
"kind": "code",
|
|
@@ -3186,15 +3235,7 @@
|
|
|
3186
3235
|
},
|
|
3187
3236
|
{
|
|
3188
3237
|
"kind": "text",
|
|
3189
|
-
"text": " code and
|
|
3190
|
-
},
|
|
3191
|
-
{
|
|
3192
|
-
"kind": "code",
|
|
3193
|
-
"text": "`message`"
|
|
3194
|
-
},
|
|
3195
|
-
{
|
|
3196
|
-
"kind": "text",
|
|
3197
|
-
"text": " with details. This is non-recoverable;\n the subscription will not retry automatically.\n\n- **Disconnected** — The connection was closed, either intentionally\n or due to an error. When caused by an error, the "
|
|
3238
|
+
"text": " code. This is non-recoverable and the subscription\n doesn't retry automatically.\n\n- **Disconnected**: the connection was closed. Check the "
|
|
3198
3239
|
},
|
|
3199
3240
|
{
|
|
3200
3241
|
"kind": "code",
|
|
@@ -3202,7 +3243,7 @@
|
|
|
3202
3243
|
},
|
|
3203
3244
|
{
|
|
3204
3245
|
"kind": "text",
|
|
3205
|
-
"text": "
|
|
3246
|
+
"text": "\n flag to determine whether the client is auto-reconnecting ("
|
|
3206
3247
|
},
|
|
3207
3248
|
{
|
|
3208
3249
|
"kind": "code",
|
|
@@ -3210,7 +3251,7 @@
|
|
|
3210
3251
|
},
|
|
3211
3252
|
{
|
|
3212
3253
|
"kind": "text",
|
|
3213
|
-
"text": ") or
|
|
3254
|
+
"text": ") or\n whether you need to re-create the subscription ("
|
|
3214
3255
|
},
|
|
3215
3256
|
{
|
|
3216
3257
|
"kind": "code",
|
|
@@ -3218,7 +3259,7 @@
|
|
|
3218
3259
|
},
|
|
3219
3260
|
{
|
|
3220
3261
|
"kind": "text",
|
|
3221
|
-
"text": "
|
|
3262
|
+
"text": ").\n\n- **Connection error**: fired on each failed reconnection attempt.\n The "
|
|
3222
3263
|
},
|
|
3223
3264
|
{
|
|
3224
3265
|
"kind": "code",
|
|
@@ -3234,15 +3275,7 @@
|
|
|
3234
3275
|
},
|
|
3235
3276
|
{
|
|
3236
3277
|
"kind": "text",
|
|
3237
|
-
"text": " for these errors\n
|
|
3238
|
-
},
|
|
3239
|
-
{
|
|
3240
|
-
"kind": "code",
|
|
3241
|
-
"text": "`recoverable: false`"
|
|
3242
|
-
},
|
|
3243
|
-
{
|
|
3244
|
-
"kind": "text",
|
|
3245
|
-
"text": "\n is fired instead.\n\nInspect "
|
|
3278
|
+
"text": " for these errors because the\n client keeps retrying with exponential backoff.\n\nCheck "
|
|
3246
3279
|
},
|
|
3247
3280
|
{
|
|
3248
3281
|
"kind": "code",
|
|
@@ -3250,7 +3283,7 @@
|
|
|
3250
3283
|
},
|
|
3251
3284
|
{
|
|
3252
3285
|
"kind": "text",
|
|
3253
|
-
"text": " to distinguish transient errors
|
|
3286
|
+
"text": " to distinguish transient errors from permanent\nfailures. This handler may fire multiple times during a single session.\nA typical recovery flow looks like:\n"
|
|
3254
3287
|
},
|
|
3255
3288
|
{
|
|
3256
3289
|
"kind": "code",
|
|
@@ -3258,7 +3291,7 @@
|
|
|
3258
3291
|
},
|
|
3259
3292
|
{
|
|
3260
3293
|
"kind": "text",
|
|
3261
|
-
"text": "
|
|
3294
|
+
"text": "."
|
|
3262
3295
|
}
|
|
3263
3296
|
],
|
|
3264
3297
|
"blockTags": [
|
|
@@ -3268,39 +3301,7 @@
|
|
|
3268
3301
|
"content": [
|
|
3269
3302
|
{
|
|
3270
3303
|
"kind": "text",
|
|
3271
|
-
"text": "The error that occurred
|
|
3272
|
-
},
|
|
3273
|
-
{
|
|
3274
|
-
"kind": "code",
|
|
3275
|
-
"text": "`errorCode`"
|
|
3276
|
-
},
|
|
3277
|
-
{
|
|
3278
|
-
"kind": "text",
|
|
3279
|
-
"text": ",\n "
|
|
3280
|
-
},
|
|
3281
|
-
{
|
|
3282
|
-
"kind": "code",
|
|
3283
|
-
"text": "`recoverable`"
|
|
3284
|
-
},
|
|
3285
|
-
{
|
|
3286
|
-
"kind": "text",
|
|
3287
|
-
"text": ", and optionally "
|
|
3288
|
-
},
|
|
3289
|
-
{
|
|
3290
|
-
"kind": "code",
|
|
3291
|
-
"text": "`channel`"
|
|
3292
|
-
},
|
|
3293
|
-
{
|
|
3294
|
-
"kind": "text",
|
|
3295
|
-
"text": " and "
|
|
3296
|
-
},
|
|
3297
|
-
{
|
|
3298
|
-
"kind": "code",
|
|
3299
|
-
"text": "`status`"
|
|
3300
|
-
},
|
|
3301
|
-
{
|
|
3302
|
-
"kind": "text",
|
|
3303
|
-
"text": "."
|
|
3304
|
+
"text": "The error that occurred."
|
|
3304
3305
|
}
|
|
3305
3306
|
]
|
|
3306
3307
|
},
|
|
@@ -3310,7 +3311,7 @@
|
|
|
3310
3311
|
"content": [
|
|
3311
3312
|
{
|
|
3312
3313
|
"kind": "text",
|
|
3313
|
-
"text": "
|
|
3314
|
+
"text": "ID of the affected subscription."
|
|
3314
3315
|
}
|
|
3315
3316
|
]
|
|
3316
3317
|
}
|
|
@@ -3344,7 +3345,39 @@
|
|
|
3344
3345
|
"summary": [
|
|
3345
3346
|
{
|
|
3346
3347
|
"kind": "text",
|
|
3347
|
-
"text": "
|
|
3348
|
+
"text": "Options for specifying what to unsubscribe from.\n\nSpecify "
|
|
3349
|
+
},
|
|
3350
|
+
{
|
|
3351
|
+
"kind": "code",
|
|
3352
|
+
"text": "`channel`"
|
|
3353
|
+
},
|
|
3354
|
+
{
|
|
3355
|
+
"kind": "text",
|
|
3356
|
+
"text": " to remove all subscriptions to a channel, "
|
|
3357
|
+
},
|
|
3358
|
+
{
|
|
3359
|
+
"kind": "code",
|
|
3360
|
+
"text": "`subscriptionId`"
|
|
3361
|
+
},
|
|
3362
|
+
{
|
|
3363
|
+
"kind": "text",
|
|
3364
|
+
"text": " to remove\na single subscription, or both to remove a specific subscription with channel verification.\nAt least one of "
|
|
3365
|
+
},
|
|
3366
|
+
{
|
|
3367
|
+
"kind": "code",
|
|
3368
|
+
"text": "`channel`"
|
|
3369
|
+
},
|
|
3370
|
+
{
|
|
3371
|
+
"kind": "text",
|
|
3372
|
+
"text": " or "
|
|
3373
|
+
},
|
|
3374
|
+
{
|
|
3375
|
+
"kind": "code",
|
|
3376
|
+
"text": "`subscriptionId`"
|
|
3377
|
+
},
|
|
3378
|
+
{
|
|
3379
|
+
"kind": "text",
|
|
3380
|
+
"text": " is required."
|
|
3348
3381
|
}
|
|
3349
3382
|
]
|
|
3350
3383
|
},
|
|
@@ -3361,7 +3394,15 @@
|
|
|
3361
3394
|
"summary": [
|
|
3362
3395
|
{
|
|
3363
3396
|
"kind": "text",
|
|
3364
|
-
"text": "
|
|
3397
|
+
"text": "Channel to unsubscribe from. When specified without "
|
|
3398
|
+
},
|
|
3399
|
+
{
|
|
3400
|
+
"kind": "code",
|
|
3401
|
+
"text": "`subscriptionId`"
|
|
3402
|
+
},
|
|
3403
|
+
{
|
|
3404
|
+
"kind": "text",
|
|
3405
|
+
"text": ",\nall subscriptions to this channel are removed."
|
|
3365
3406
|
}
|
|
3366
3407
|
]
|
|
3367
3408
|
},
|
|
@@ -3384,7 +3425,15 @@
|
|
|
3384
3425
|
"summary": [
|
|
3385
3426
|
{
|
|
3386
3427
|
"kind": "text",
|
|
3387
|
-
"text": "ID of the subscription to
|
|
3428
|
+
"text": "ID of the subscription to remove. When specified without "
|
|
3429
|
+
},
|
|
3430
|
+
{
|
|
3431
|
+
"kind": "code",
|
|
3432
|
+
"text": "`channel`"
|
|
3433
|
+
},
|
|
3434
|
+
{
|
|
3435
|
+
"kind": "text",
|
|
3436
|
+
"text": ",\nthe specific subscription is removed regardless of its channel."
|
|
3388
3437
|
}
|
|
3389
3438
|
]
|
|
3390
3439
|
},
|
|
@@ -3429,7 +3478,7 @@
|
|
|
3429
3478
|
"summary": [
|
|
3430
3479
|
{
|
|
3431
3480
|
"kind": "text",
|
|
3432
|
-
"text": "
|
|
3481
|
+
"text": "Callback that runs when a message is received on a subscribed channel or channel resource."
|
|
3433
3482
|
}
|
|
3434
3483
|
]
|
|
3435
3484
|
},
|
|
@@ -3440,6 +3489,14 @@
|
|
|
3440
3489
|
"variant": "param",
|
|
3441
3490
|
"kind": 32768,
|
|
3442
3491
|
"flags": {},
|
|
3492
|
+
"comment": {
|
|
3493
|
+
"summary": [
|
|
3494
|
+
{
|
|
3495
|
+
"kind": "text",
|
|
3496
|
+
"text": "The received message, including the payload and optional publisher information."
|
|
3497
|
+
}
|
|
3498
|
+
]
|
|
3499
|
+
},
|
|
3443
3500
|
"type": {
|
|
3444
3501
|
"type": "reference",
|
|
3445
3502
|
"target": 73,
|
|
@@ -3453,6 +3510,14 @@
|
|
|
3453
3510
|
"variant": "param",
|
|
3454
3511
|
"kind": 32768,
|
|
3455
3512
|
"flags": {},
|
|
3513
|
+
"comment": {
|
|
3514
|
+
"summary": [
|
|
3515
|
+
{
|
|
3516
|
+
"kind": "text",
|
|
3517
|
+
"text": "The channel the message was received on."
|
|
3518
|
+
}
|
|
3519
|
+
]
|
|
3520
|
+
},
|
|
3456
3521
|
"type": {
|
|
3457
3522
|
"type": "reference",
|
|
3458
3523
|
"target": 31,
|
|
@@ -3495,7 +3560,7 @@
|
|
|
3495
3560
|
"summary": [
|
|
3496
3561
|
{
|
|
3497
3562
|
"kind": "text",
|
|
3498
|
-
"text": "
|
|
3563
|
+
"text": "Callback that runs when a subscription error occurs."
|
|
3499
3564
|
}
|
|
3500
3565
|
]
|
|
3501
3566
|
},
|
|
@@ -3506,6 +3571,14 @@
|
|
|
3506
3571
|
"variant": "param",
|
|
3507
3572
|
"kind": 32768,
|
|
3508
3573
|
"flags": {},
|
|
3574
|
+
"comment": {
|
|
3575
|
+
"summary": [
|
|
3576
|
+
{
|
|
3577
|
+
"kind": "text",
|
|
3578
|
+
"text": "The error that occurred."
|
|
3579
|
+
}
|
|
3580
|
+
]
|
|
3581
|
+
},
|
|
3509
3582
|
"type": {
|
|
3510
3583
|
"type": "reference",
|
|
3511
3584
|
"target": 99,
|
|
@@ -3519,6 +3592,14 @@
|
|
|
3519
3592
|
"variant": "param",
|
|
3520
3593
|
"kind": 32768,
|
|
3521
3594
|
"flags": {},
|
|
3595
|
+
"comment": {
|
|
3596
|
+
"summary": [
|
|
3597
|
+
{
|
|
3598
|
+
"kind": "text",
|
|
3599
|
+
"text": "ID of the affected subscription."
|
|
3600
|
+
}
|
|
3601
|
+
]
|
|
3602
|
+
},
|
|
3522
3603
|
"type": {
|
|
3523
3604
|
"type": "intrinsic",
|
|
3524
3605
|
"name": "string"
|
|
@@ -3559,7 +3640,7 @@
|
|
|
3559
3640
|
"summary": [
|
|
3560
3641
|
{
|
|
3561
3642
|
"kind": "text",
|
|
3562
|
-
"text": "
|
|
3643
|
+
"text": "Callback that runs when a subscription is successfully established or re-established after a reconnection."
|
|
3563
3644
|
}
|
|
3564
3645
|
]
|
|
3565
3646
|
},
|
|
@@ -3570,6 +3651,14 @@
|
|
|
3570
3651
|
"variant": "param",
|
|
3571
3652
|
"kind": 32768,
|
|
3572
3653
|
"flags": {},
|
|
3654
|
+
"comment": {
|
|
3655
|
+
"summary": [
|
|
3656
|
+
{
|
|
3657
|
+
"kind": "text",
|
|
3658
|
+
"text": "ID of the subscription."
|
|
3659
|
+
}
|
|
3660
|
+
]
|
|
3661
|
+
},
|
|
3573
3662
|
"type": {
|
|
3574
3663
|
"type": "intrinsic",
|
|
3575
3664
|
"name": "string"
|
|
@@ -3581,6 +3670,14 @@
|
|
|
3581
3670
|
"variant": "param",
|
|
3582
3671
|
"kind": 32768,
|
|
3583
3672
|
"flags": {},
|
|
3673
|
+
"comment": {
|
|
3674
|
+
"summary": [
|
|
3675
|
+
{
|
|
3676
|
+
"kind": "text",
|
|
3677
|
+
"text": "Whether the server successfully restored missed messages since the last disconnection. <!-- TODO: Document server-side buffer limits for message replay. -->"
|
|
3678
|
+
}
|
|
3679
|
+
]
|
|
3680
|
+
},
|
|
3584
3681
|
"type": {
|
|
3585
3682
|
"type": "intrinsic",
|
|
3586
3683
|
"name": "boolean"
|