@wix/realtime 1.0.32 → 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 +429 -307
- 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,23 +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\
|
|
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 "
|
|
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 "
|
|
931
911
|
},
|
|
932
912
|
{
|
|
933
913
|
"kind": "code",
|
|
@@ -935,7 +915,7 @@
|
|
|
935
915
|
},
|
|
936
916
|
{
|
|
937
917
|
"kind": "text",
|
|
938
|
-
"text": "
|
|
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,92 @@
|
|
|
1721
1701
|
"summary": [
|
|
1722
1702
|
{
|
|
1723
1703
|
"kind": "text",
|
|
1724
|
-
"text": "Publishes a message to a channel or channel resource
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
|
|
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
|
-
},
|
|
1704
|
+
"text": "Publishes a message to a channel or channel resource."
|
|
1705
|
+
}
|
|
1706
|
+
],
|
|
1707
|
+
"blockTags": [
|
|
1762
1708
|
{
|
|
1763
|
-
"
|
|
1764
|
-
"
|
|
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
|
+
]
|
|
1765
1764
|
},
|
|
1766
1765
|
{
|
|
1767
|
-
"
|
|
1768
|
-
"
|
|
1766
|
+
"tag": "@deprecated",
|
|
1767
|
+
"content": [
|
|
1768
|
+
{
|
|
1769
|
+
"kind": "text",
|
|
1770
|
+
"text": "Use "
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
"kind": "code",
|
|
1774
|
+
"text": "`publisher.publish`"
|
|
1775
|
+
},
|
|
1776
|
+
{
|
|
1777
|
+
"kind": "text",
|
|
1778
|
+
"text": " from "
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"kind": "code",
|
|
1782
|
+
"text": "`@wix/realtime`"
|
|
1783
|
+
},
|
|
1784
|
+
{
|
|
1785
|
+
"kind": "text",
|
|
1786
|
+
"text": " instead."
|
|
1787
|
+
}
|
|
1788
|
+
]
|
|
1769
1789
|
},
|
|
1770
|
-
{
|
|
1771
|
-
"kind": "text",
|
|
1772
|
-
"text": "."
|
|
1773
|
-
}
|
|
1774
|
-
],
|
|
1775
|
-
"blockTags": [
|
|
1776
1790
|
{
|
|
1777
1791
|
"tag": "@requiredField",
|
|
1778
1792
|
"content": [
|
|
@@ -1814,15 +1828,7 @@
|
|
|
1814
1828
|
"content": [
|
|
1815
1829
|
{
|
|
1816
1830
|
"kind": "text",
|
|
1817
|
-
"text": "
|
|
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."
|
|
1831
|
+
"text": "Fulfilled when the message is published. Doesn't indicate that the message was received by subscribers."
|
|
1826
1832
|
}
|
|
1827
1833
|
]
|
|
1828
1834
|
}
|
|
@@ -1839,7 +1845,7 @@
|
|
|
1839
1845
|
"summary": [
|
|
1840
1846
|
{
|
|
1841
1847
|
"kind": "text",
|
|
1842
|
-
"text": "
|
|
1848
|
+
"text": "Channel, and optionally resource, to publish to."
|
|
1843
1849
|
}
|
|
1844
1850
|
]
|
|
1845
1851
|
},
|
|
@@ -1860,7 +1866,7 @@
|
|
|
1860
1866
|
"summary": [
|
|
1861
1867
|
{
|
|
1862
1868
|
"kind": "text",
|
|
1863
|
-
"text": "Message payload
|
|
1869
|
+
"text": "Message payload. Max: 10 KB."
|
|
1864
1870
|
}
|
|
1865
1871
|
]
|
|
1866
1872
|
},
|
|
@@ -1881,7 +1887,7 @@
|
|
|
1881
1887
|
"summary": [
|
|
1882
1888
|
{
|
|
1883
1889
|
"kind": "text",
|
|
1884
|
-
"text": "Options
|
|
1890
|
+
"text": "Options for publishing, such as targeting specific users."
|
|
1885
1891
|
}
|
|
1886
1892
|
]
|
|
1887
1893
|
},
|
|
@@ -1928,23 +1934,7 @@
|
|
|
1928
1934
|
"summary": [
|
|
1929
1935
|
{
|
|
1930
1936
|
"kind": "text",
|
|
1931
|
-
"text": "Checks permissions for a subscriber on a channel or channel resource.\n\
|
|
1932
|
-
},
|
|
1933
|
-
{
|
|
1934
|
-
"kind": "code",
|
|
1935
|
-
"text": "`realtime_check_permission`"
|
|
1936
|
-
},
|
|
1937
|
-
{
|
|
1938
|
-
"kind": "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 "
|
|
1940
|
-
},
|
|
1941
|
-
{
|
|
1942
|
-
"kind": "code",
|
|
1943
|
-
"text": "`realtime_check_permission()`"
|
|
1944
|
-
},
|
|
1945
|
-
{
|
|
1946
|
-
"kind": "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: "
|
|
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: "
|
|
1948
1938
|
},
|
|
1949
1939
|
{
|
|
1950
1940
|
"kind": "code",
|
|
@@ -1952,23 +1942,23 @@
|
|
|
1952
1942
|
},
|
|
1953
1943
|
{
|
|
1954
1944
|
"kind": "text",
|
|
1955
|
-
"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 "
|
|
1956
1946
|
},
|
|
1957
1947
|
{
|
|
1958
1948
|
"kind": "code",
|
|
1959
|
-
"text": "`
|
|
1949
|
+
"text": "`permissionsRouter`"
|
|
1960
1950
|
},
|
|
1961
1951
|
{
|
|
1962
1952
|
"kind": "text",
|
|
1963
|
-
"text": " to add permissions
|
|
1953
|
+
"text": " to add permissions logic per channel, then\n call "
|
|
1964
1954
|
},
|
|
1965
1955
|
{
|
|
1966
1956
|
"kind": "code",
|
|
1967
|
-
"text": "`check()`"
|
|
1957
|
+
"text": "`permissionsRouter.check()`"
|
|
1968
1958
|
},
|
|
1969
1959
|
{
|
|
1970
1960
|
"kind": "text",
|
|
1971
|
-
"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."
|
|
1972
1962
|
}
|
|
1973
1963
|
],
|
|
1974
1964
|
"blockTags": [
|
|
@@ -2048,7 +2038,7 @@
|
|
|
2048
2038
|
"summary": [
|
|
2049
2039
|
{
|
|
2050
2040
|
"kind": "text",
|
|
2051
|
-
"text": "
|
|
2041
|
+
"text": "Channel, and optionally resource, to check permissions for."
|
|
2052
2042
|
}
|
|
2053
2043
|
]
|
|
2054
2044
|
},
|
|
@@ -2069,7 +2059,7 @@
|
|
|
2069
2059
|
"summary": [
|
|
2070
2060
|
{
|
|
2071
2061
|
"kind": "text",
|
|
2072
|
-
"text": "
|
|
2062
|
+
"text": "Subscriber to check permissions for."
|
|
2073
2063
|
}
|
|
2074
2064
|
]
|
|
2075
2065
|
},
|
|
@@ -2157,7 +2147,7 @@
|
|
|
2157
2147
|
"summary": [
|
|
2158
2148
|
{
|
|
2159
2149
|
"kind": "text",
|
|
2160
|
-
"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 "
|
|
2161
2151
|
},
|
|
2162
2152
|
{
|
|
2163
2153
|
"kind": "code",
|
|
@@ -2165,7 +2155,15 @@
|
|
|
2165
2155
|
},
|
|
2166
2156
|
{
|
|
2167
2157
|
"kind": "text",
|
|
2168
|
-
"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."
|
|
2169
2167
|
}
|
|
2170
2168
|
],
|
|
2171
2169
|
"blockTags": [
|
|
@@ -2208,7 +2206,7 @@
|
|
|
2208
2206
|
"summary": [
|
|
2209
2207
|
{
|
|
2210
2208
|
"kind": "text",
|
|
2211
|
-
"text": "
|
|
2209
|
+
"text": "Channel, and optionally resource, to subscribe to."
|
|
2212
2210
|
}
|
|
2213
2211
|
]
|
|
2214
2212
|
},
|
|
@@ -2229,7 +2227,7 @@
|
|
|
2229
2227
|
"summary": [
|
|
2230
2228
|
{
|
|
2231
2229
|
"kind": "text",
|
|
2232
|
-
"text": "Callback
|
|
2230
|
+
"text": "Callback that runs whenever a message is published to the channel."
|
|
2233
2231
|
}
|
|
2234
2232
|
]
|
|
2235
2233
|
},
|
|
@@ -2252,7 +2250,7 @@
|
|
|
2252
2250
|
"summary": [
|
|
2253
2251
|
{
|
|
2254
2252
|
"kind": "text",
|
|
2255
|
-
"text": "
|
|
2253
|
+
"text": "Lifecycle handlers for subscription events."
|
|
2256
2254
|
}
|
|
2257
2255
|
]
|
|
2258
2256
|
},
|
|
@@ -2279,7 +2277,7 @@
|
|
|
2279
2277
|
"summary": [
|
|
2280
2278
|
{
|
|
2281
2279
|
"kind": "text",
|
|
2282
|
-
"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 "
|
|
2283
2281
|
},
|
|
2284
2282
|
{
|
|
2285
2283
|
"kind": "code",
|
|
@@ -2287,7 +2285,15 @@
|
|
|
2287
2285
|
},
|
|
2288
2286
|
{
|
|
2289
2287
|
"kind": "text",
|
|
2290
|
-
"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."
|
|
2291
2297
|
}
|
|
2292
2298
|
],
|
|
2293
2299
|
"blockTags": [
|
|
@@ -2366,7 +2372,7 @@
|
|
|
2366
2372
|
"summary": [
|
|
2367
2373
|
{
|
|
2368
2374
|
"kind": "text",
|
|
2369
|
-
"text": "
|
|
2375
|
+
"text": "Removes one or more subscriptions.\n\nYou can unsubscribe in three ways:\n- By "
|
|
2370
2376
|
},
|
|
2371
2377
|
{
|
|
2372
2378
|
"kind": "code",
|
|
@@ -2374,7 +2380,7 @@
|
|
|
2374
2380
|
},
|
|
2375
2381
|
{
|
|
2376
2382
|
"kind": "text",
|
|
2377
|
-
"text": "
|
|
2383
|
+
"text": ": removes a single subscription.\n- By "
|
|
2378
2384
|
},
|
|
2379
2385
|
{
|
|
2380
2386
|
"kind": "code",
|
|
@@ -2382,7 +2388,7 @@
|
|
|
2382
2388
|
},
|
|
2383
2389
|
{
|
|
2384
2390
|
"kind": "text",
|
|
2385
|
-
"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."
|
|
2386
2392
|
}
|
|
2387
2393
|
],
|
|
2388
2394
|
"blockTags": [
|
|
@@ -2425,7 +2431,23 @@
|
|
|
2425
2431
|
"summary": [
|
|
2426
2432
|
{
|
|
2427
2433
|
"kind": "text",
|
|
2428
|
-
"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."
|
|
2429
2451
|
}
|
|
2430
2452
|
]
|
|
2431
2453
|
},
|
|
@@ -2452,7 +2474,7 @@
|
|
|
2452
2474
|
"summary": [
|
|
2453
2475
|
{
|
|
2454
2476
|
"kind": "text",
|
|
2455
|
-
"text": "
|
|
2477
|
+
"text": "Removes one or more subscriptions.\n\nYou can unsubscribe in three ways:\n- By "
|
|
2456
2478
|
},
|
|
2457
2479
|
{
|
|
2458
2480
|
"kind": "code",
|
|
@@ -2460,7 +2482,7 @@
|
|
|
2460
2482
|
},
|
|
2461
2483
|
{
|
|
2462
2484
|
"kind": "text",
|
|
2463
|
-
"text": "
|
|
2485
|
+
"text": ": removes a single subscription.\n- By "
|
|
2464
2486
|
},
|
|
2465
2487
|
{
|
|
2466
2488
|
"kind": "code",
|
|
@@ -2468,7 +2490,7 @@
|
|
|
2468
2490
|
},
|
|
2469
2491
|
{
|
|
2470
2492
|
"kind": "text",
|
|
2471
|
-
"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."
|
|
2472
2494
|
}
|
|
2473
2495
|
],
|
|
2474
2496
|
"blockTags": [
|
|
@@ -2566,7 +2588,7 @@
|
|
|
2566
2588
|
"summary": [
|
|
2567
2589
|
{
|
|
2568
2590
|
"kind": "text",
|
|
2569
|
-
"text": "
|
|
2591
|
+
"text": "The input is invalid. For example, a channel name with unsupported characters."
|
|
2570
2592
|
}
|
|
2571
2593
|
]
|
|
2572
2594
|
},
|
|
@@ -2585,7 +2607,7 @@
|
|
|
2585
2607
|
"summary": [
|
|
2586
2608
|
{
|
|
2587
2609
|
"kind": "text",
|
|
2588
|
-
"text": "A connection attempt failed. The client keeps retrying automatically."
|
|
2610
|
+
"text": "A connection attempt failed. The client keeps retrying automatically with exponential backoff."
|
|
2589
2611
|
}
|
|
2590
2612
|
]
|
|
2591
2613
|
},
|
|
@@ -2604,7 +2626,15 @@
|
|
|
2604
2626
|
"summary": [
|
|
2605
2627
|
{
|
|
2606
2628
|
"kind": "text",
|
|
2607
|
-
"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."
|
|
2608
2638
|
}
|
|
2609
2639
|
]
|
|
2610
2640
|
},
|
|
@@ -2623,7 +2653,7 @@
|
|
|
2623
2653
|
"summary": [
|
|
2624
2654
|
{
|
|
2625
2655
|
"kind": "text",
|
|
2626
|
-
"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."
|
|
2627
2657
|
}
|
|
2628
2658
|
]
|
|
2629
2659
|
},
|
|
@@ -2655,7 +2685,7 @@
|
|
|
2655
2685
|
"summary": [
|
|
2656
2686
|
{
|
|
2657
2687
|
"kind": "text",
|
|
2658
|
-
"text": "An
|
|
2688
|
+
"text": "An error related to a realtime subscription or connection."
|
|
2659
2689
|
}
|
|
2660
2690
|
]
|
|
2661
2691
|
},
|
|
@@ -2802,7 +2832,7 @@
|
|
|
2802
2832
|
"summary": [
|
|
2803
2833
|
{
|
|
2804
2834
|
"kind": "text",
|
|
2805
|
-
"text": "Channel related to the error."
|
|
2835
|
+
"text": "Channel related to the error, if applicable."
|
|
2806
2836
|
}
|
|
2807
2837
|
]
|
|
2808
2838
|
},
|
|
@@ -2823,7 +2853,7 @@
|
|
|
2823
2853
|
"summary": [
|
|
2824
2854
|
{
|
|
2825
2855
|
"kind": "text",
|
|
2826
|
-
"text": "Error code."
|
|
2856
|
+
"text": "Error code indicating the type of error."
|
|
2827
2857
|
}
|
|
2828
2858
|
]
|
|
2829
2859
|
},
|
|
@@ -2862,7 +2892,11 @@
|
|
|
2862
2892
|
},
|
|
2863
2893
|
{
|
|
2864
2894
|
"kind": "text",
|
|
2865
|
-
"text": ",
|
|
2895
|
+
"text": ", the subscription\nmust be re-created manually.\n\nDefault: "
|
|
2896
|
+
},
|
|
2897
|
+
{
|
|
2898
|
+
"kind": "code",
|
|
2899
|
+
"text": "`false`"
|
|
2866
2900
|
}
|
|
2867
2901
|
]
|
|
2868
2902
|
},
|
|
@@ -2883,7 +2917,47 @@
|
|
|
2883
2917
|
"summary": [
|
|
2884
2918
|
{
|
|
2885
2919
|
"kind": "text",
|
|
2886
|
-
"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": "."
|
|
2887
2961
|
}
|
|
2888
2962
|
]
|
|
2889
2963
|
},
|
|
@@ -2932,7 +3006,7 @@
|
|
|
2932
3006
|
"summary": [
|
|
2933
3007
|
{
|
|
2934
3008
|
"kind": "text",
|
|
2935
|
-
"text": "
|
|
3009
|
+
"text": "A message received on a realtime channel."
|
|
2936
3010
|
}
|
|
2937
3011
|
]
|
|
2938
3012
|
},
|
|
@@ -2947,7 +3021,7 @@
|
|
|
2947
3021
|
"summary": [
|
|
2948
3022
|
{
|
|
2949
3023
|
"kind": "text",
|
|
2950
|
-
"text": "Message payload.\nMax:
|
|
3024
|
+
"text": "Message payload containing the published data.\n\nMax: 10 KB."
|
|
2951
3025
|
}
|
|
2952
3026
|
]
|
|
2953
3027
|
},
|
|
@@ -2983,7 +3057,7 @@
|
|
|
2983
3057
|
"summary": [
|
|
2984
3058
|
{
|
|
2985
3059
|
"kind": "text",
|
|
2986
|
-
"text": "
|
|
3060
|
+
"text": "Information about the user who published the message.\n\nReturned only when the publisher's identity is available."
|
|
2987
3061
|
}
|
|
2988
3062
|
]
|
|
2989
3063
|
},
|
|
@@ -3015,7 +3089,7 @@
|
|
|
3015
3089
|
"summary": [
|
|
3016
3090
|
{
|
|
3017
3091
|
"kind": "text",
|
|
3018
|
-
"text": "
|
|
3092
|
+
"text": "Information about the user who published a message."
|
|
3019
3093
|
}
|
|
3020
3094
|
]
|
|
3021
3095
|
},
|
|
@@ -3030,7 +3104,7 @@
|
|
|
3030
3104
|
"summary": [
|
|
3031
3105
|
{
|
|
3032
3106
|
"kind": "text",
|
|
3033
|
-
"text": "ID
|
|
3107
|
+
"text": "Publisher ID."
|
|
3034
3108
|
}
|
|
3035
3109
|
]
|
|
3036
3110
|
},
|
|
@@ -3059,7 +3133,7 @@
|
|
|
3059
3133
|
"summary": [
|
|
3060
3134
|
{
|
|
3061
3135
|
"kind": "text",
|
|
3062
|
-
"text": "
|
|
3136
|
+
"text": "Optional lifecycle handlers for a subscription. Use these to respond to\nsubscription status changes, such as successful connections and errors."
|
|
3063
3137
|
}
|
|
3064
3138
|
]
|
|
3065
3139
|
},
|
|
@@ -3076,7 +3150,7 @@
|
|
|
3076
3150
|
"summary": [
|
|
3077
3151
|
{
|
|
3078
3152
|
"kind": "text",
|
|
3079
|
-
"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 "
|
|
3080
3154
|
},
|
|
3081
3155
|
{
|
|
3082
3156
|
"kind": "code",
|
|
@@ -3084,7 +3158,7 @@
|
|
|
3084
3158
|
},
|
|
3085
3159
|
{
|
|
3086
3160
|
"kind": "text",
|
|
3087
|
-
"text": "
|
|
3161
|
+
"text": " parameter indicates whether the server restored\nmissed messages since the last disconnection:\n\n- **First subscription**: always "
|
|
3088
3162
|
},
|
|
3089
3163
|
{
|
|
3090
3164
|
"kind": "code",
|
|
@@ -3092,23 +3166,23 @@
|
|
|
3092
3166
|
},
|
|
3093
3167
|
{
|
|
3094
3168
|
"kind": "text",
|
|
3095
|
-
"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, "
|
|
3096
3170
|
},
|
|
3097
3171
|
{
|
|
3098
3172
|
"kind": "code",
|
|
3099
|
-
"text": "`
|
|
3173
|
+
"text": "`true`"
|
|
3100
3174
|
},
|
|
3101
3175
|
{
|
|
3102
3176
|
"kind": "text",
|
|
3103
|
-
"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, "
|
|
3104
3178
|
},
|
|
3105
3179
|
{
|
|
3106
3180
|
"kind": "code",
|
|
3107
|
-
"text": "`
|
|
3181
|
+
"text": "`false`"
|
|
3108
3182
|
},
|
|
3109
3183
|
{
|
|
3110
3184
|
"kind": "text",
|
|
3111
|
-
"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. -->"
|
|
3112
3186
|
}
|
|
3113
3187
|
],
|
|
3114
3188
|
"blockTags": [
|
|
@@ -3118,7 +3192,7 @@
|
|
|
3118
3192
|
"content": [
|
|
3119
3193
|
{
|
|
3120
3194
|
"kind": "text",
|
|
3121
|
-
"text": "
|
|
3195
|
+
"text": "ID of the subscription that was established."
|
|
3122
3196
|
}
|
|
3123
3197
|
]
|
|
3124
3198
|
},
|
|
@@ -3153,7 +3227,7 @@
|
|
|
3153
3227
|
"summary": [
|
|
3154
3228
|
{
|
|
3155
3229
|
"kind": "text",
|
|
3156
|
-
"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 "
|
|
3157
3231
|
},
|
|
3158
3232
|
{
|
|
3159
3233
|
"kind": "code",
|
|
@@ -3161,15 +3235,7 @@
|
|
|
3161
3235
|
},
|
|
3162
3236
|
{
|
|
3163
3237
|
"kind": "text",
|
|
3164
|
-
"text": " code and
|
|
3165
|
-
},
|
|
3166
|
-
{
|
|
3167
|
-
"kind": "code",
|
|
3168
|
-
"text": "`message`"
|
|
3169
|
-
},
|
|
3170
|
-
{
|
|
3171
|
-
"kind": "text",
|
|
3172
|
-
"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 "
|
|
3173
3239
|
},
|
|
3174
3240
|
{
|
|
3175
3241
|
"kind": "code",
|
|
@@ -3177,7 +3243,7 @@
|
|
|
3177
3243
|
},
|
|
3178
3244
|
{
|
|
3179
3245
|
"kind": "text",
|
|
3180
|
-
"text": "
|
|
3246
|
+
"text": "\n flag to determine whether the client is auto-reconnecting ("
|
|
3181
3247
|
},
|
|
3182
3248
|
{
|
|
3183
3249
|
"kind": "code",
|
|
@@ -3185,7 +3251,7 @@
|
|
|
3185
3251
|
},
|
|
3186
3252
|
{
|
|
3187
3253
|
"kind": "text",
|
|
3188
|
-
"text": ") or
|
|
3254
|
+
"text": ") or\n whether you need to re-create the subscription ("
|
|
3189
3255
|
},
|
|
3190
3256
|
{
|
|
3191
3257
|
"kind": "code",
|
|
@@ -3193,7 +3259,7 @@
|
|
|
3193
3259
|
},
|
|
3194
3260
|
{
|
|
3195
3261
|
"kind": "text",
|
|
3196
|
-
"text": "
|
|
3262
|
+
"text": ").\n\n- **Connection error**: fired on each failed reconnection attempt.\n The "
|
|
3197
3263
|
},
|
|
3198
3264
|
{
|
|
3199
3265
|
"kind": "code",
|
|
@@ -3209,15 +3275,7 @@
|
|
|
3209
3275
|
},
|
|
3210
3276
|
{
|
|
3211
3277
|
"kind": "text",
|
|
3212
|
-
"text": " for these errors\n
|
|
3213
|
-
},
|
|
3214
|
-
{
|
|
3215
|
-
"kind": "code",
|
|
3216
|
-
"text": "`recoverable: false`"
|
|
3217
|
-
},
|
|
3218
|
-
{
|
|
3219
|
-
"kind": "text",
|
|
3220
|
-
"text": "\n is fired instead.\n\nInspect "
|
|
3278
|
+
"text": " for these errors because the\n client keeps retrying with exponential backoff.\n\nCheck "
|
|
3221
3279
|
},
|
|
3222
3280
|
{
|
|
3223
3281
|
"kind": "code",
|
|
@@ -3225,7 +3283,7 @@
|
|
|
3225
3283
|
},
|
|
3226
3284
|
{
|
|
3227
3285
|
"kind": "text",
|
|
3228
|
-
"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"
|
|
3229
3287
|
},
|
|
3230
3288
|
{
|
|
3231
3289
|
"kind": "code",
|
|
@@ -3233,7 +3291,7 @@
|
|
|
3233
3291
|
},
|
|
3234
3292
|
{
|
|
3235
3293
|
"kind": "text",
|
|
3236
|
-
"text": "
|
|
3294
|
+
"text": "."
|
|
3237
3295
|
}
|
|
3238
3296
|
],
|
|
3239
3297
|
"blockTags": [
|
|
@@ -3243,39 +3301,7 @@
|
|
|
3243
3301
|
"content": [
|
|
3244
3302
|
{
|
|
3245
3303
|
"kind": "text",
|
|
3246
|
-
"text": "The error that occurred
|
|
3247
|
-
},
|
|
3248
|
-
{
|
|
3249
|
-
"kind": "code",
|
|
3250
|
-
"text": "`errorCode`"
|
|
3251
|
-
},
|
|
3252
|
-
{
|
|
3253
|
-
"kind": "text",
|
|
3254
|
-
"text": ",\n "
|
|
3255
|
-
},
|
|
3256
|
-
{
|
|
3257
|
-
"kind": "code",
|
|
3258
|
-
"text": "`recoverable`"
|
|
3259
|
-
},
|
|
3260
|
-
{
|
|
3261
|
-
"kind": "text",
|
|
3262
|
-
"text": ", and optionally "
|
|
3263
|
-
},
|
|
3264
|
-
{
|
|
3265
|
-
"kind": "code",
|
|
3266
|
-
"text": "`channel`"
|
|
3267
|
-
},
|
|
3268
|
-
{
|
|
3269
|
-
"kind": "text",
|
|
3270
|
-
"text": " and "
|
|
3271
|
-
},
|
|
3272
|
-
{
|
|
3273
|
-
"kind": "code",
|
|
3274
|
-
"text": "`status`"
|
|
3275
|
-
},
|
|
3276
|
-
{
|
|
3277
|
-
"kind": "text",
|
|
3278
|
-
"text": "."
|
|
3304
|
+
"text": "The error that occurred."
|
|
3279
3305
|
}
|
|
3280
3306
|
]
|
|
3281
3307
|
},
|
|
@@ -3285,7 +3311,7 @@
|
|
|
3285
3311
|
"content": [
|
|
3286
3312
|
{
|
|
3287
3313
|
"kind": "text",
|
|
3288
|
-
"text": "
|
|
3314
|
+
"text": "ID of the affected subscription."
|
|
3289
3315
|
}
|
|
3290
3316
|
]
|
|
3291
3317
|
}
|
|
@@ -3319,7 +3345,39 @@
|
|
|
3319
3345
|
"summary": [
|
|
3320
3346
|
{
|
|
3321
3347
|
"kind": "text",
|
|
3322
|
-
"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."
|
|
3323
3381
|
}
|
|
3324
3382
|
]
|
|
3325
3383
|
},
|
|
@@ -3336,7 +3394,15 @@
|
|
|
3336
3394
|
"summary": [
|
|
3337
3395
|
{
|
|
3338
3396
|
"kind": "text",
|
|
3339
|
-
"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."
|
|
3340
3406
|
}
|
|
3341
3407
|
]
|
|
3342
3408
|
},
|
|
@@ -3359,7 +3425,15 @@
|
|
|
3359
3425
|
"summary": [
|
|
3360
3426
|
{
|
|
3361
3427
|
"kind": "text",
|
|
3362
|
-
"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."
|
|
3363
3437
|
}
|
|
3364
3438
|
]
|
|
3365
3439
|
},
|
|
@@ -3404,7 +3478,7 @@
|
|
|
3404
3478
|
"summary": [
|
|
3405
3479
|
{
|
|
3406
3480
|
"kind": "text",
|
|
3407
|
-
"text": "
|
|
3481
|
+
"text": "Callback that runs when a message is received on a subscribed channel or channel resource."
|
|
3408
3482
|
}
|
|
3409
3483
|
]
|
|
3410
3484
|
},
|
|
@@ -3415,6 +3489,14 @@
|
|
|
3415
3489
|
"variant": "param",
|
|
3416
3490
|
"kind": 32768,
|
|
3417
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
|
+
},
|
|
3418
3500
|
"type": {
|
|
3419
3501
|
"type": "reference",
|
|
3420
3502
|
"target": 73,
|
|
@@ -3428,6 +3510,14 @@
|
|
|
3428
3510
|
"variant": "param",
|
|
3429
3511
|
"kind": 32768,
|
|
3430
3512
|
"flags": {},
|
|
3513
|
+
"comment": {
|
|
3514
|
+
"summary": [
|
|
3515
|
+
{
|
|
3516
|
+
"kind": "text",
|
|
3517
|
+
"text": "The channel the message was received on."
|
|
3518
|
+
}
|
|
3519
|
+
]
|
|
3520
|
+
},
|
|
3431
3521
|
"type": {
|
|
3432
3522
|
"type": "reference",
|
|
3433
3523
|
"target": 31,
|
|
@@ -3470,7 +3560,7 @@
|
|
|
3470
3560
|
"summary": [
|
|
3471
3561
|
{
|
|
3472
3562
|
"kind": "text",
|
|
3473
|
-
"text": "
|
|
3563
|
+
"text": "Callback that runs when a subscription error occurs."
|
|
3474
3564
|
}
|
|
3475
3565
|
]
|
|
3476
3566
|
},
|
|
@@ -3481,6 +3571,14 @@
|
|
|
3481
3571
|
"variant": "param",
|
|
3482
3572
|
"kind": 32768,
|
|
3483
3573
|
"flags": {},
|
|
3574
|
+
"comment": {
|
|
3575
|
+
"summary": [
|
|
3576
|
+
{
|
|
3577
|
+
"kind": "text",
|
|
3578
|
+
"text": "The error that occurred."
|
|
3579
|
+
}
|
|
3580
|
+
]
|
|
3581
|
+
},
|
|
3484
3582
|
"type": {
|
|
3485
3583
|
"type": "reference",
|
|
3486
3584
|
"target": 99,
|
|
@@ -3494,6 +3592,14 @@
|
|
|
3494
3592
|
"variant": "param",
|
|
3495
3593
|
"kind": 32768,
|
|
3496
3594
|
"flags": {},
|
|
3595
|
+
"comment": {
|
|
3596
|
+
"summary": [
|
|
3597
|
+
{
|
|
3598
|
+
"kind": "text",
|
|
3599
|
+
"text": "ID of the affected subscription."
|
|
3600
|
+
}
|
|
3601
|
+
]
|
|
3602
|
+
},
|
|
3497
3603
|
"type": {
|
|
3498
3604
|
"type": "intrinsic",
|
|
3499
3605
|
"name": "string"
|
|
@@ -3534,7 +3640,7 @@
|
|
|
3534
3640
|
"summary": [
|
|
3535
3641
|
{
|
|
3536
3642
|
"kind": "text",
|
|
3537
|
-
"text": "
|
|
3643
|
+
"text": "Callback that runs when a subscription is successfully established or re-established after a reconnection."
|
|
3538
3644
|
}
|
|
3539
3645
|
]
|
|
3540
3646
|
},
|
|
@@ -3545,6 +3651,14 @@
|
|
|
3545
3651
|
"variant": "param",
|
|
3546
3652
|
"kind": 32768,
|
|
3547
3653
|
"flags": {},
|
|
3654
|
+
"comment": {
|
|
3655
|
+
"summary": [
|
|
3656
|
+
{
|
|
3657
|
+
"kind": "text",
|
|
3658
|
+
"text": "ID of the subscription."
|
|
3659
|
+
}
|
|
3660
|
+
]
|
|
3661
|
+
},
|
|
3548
3662
|
"type": {
|
|
3549
3663
|
"type": "intrinsic",
|
|
3550
3664
|
"name": "string"
|
|
@@ -3556,6 +3670,14 @@
|
|
|
3556
3670
|
"variant": "param",
|
|
3557
3671
|
"kind": 32768,
|
|
3558
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
|
+
},
|
|
3559
3681
|
"type": {
|
|
3560
3682
|
"type": "intrinsic",
|
|
3561
3683
|
"name": "boolean"
|