@wix/realtime 1.0.17 → 1.0.18
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/index.d.ts +4 -0
- package/cjs/build/index.js +4 -1
- package/cjs/build/publisher/publisher.context.d.ts +3 -0
- package/cjs/build/publisher/publisher.context.js +3 -0
- package/cjs/build/subscriber/subscriber.context.d.ts +81 -0
- package/cjs/build/subscriber/subscriber.context.js +81 -0
- package/cjs/build/subscriber/subscriber.public.d.ts +0 -8
- package/cjs/build/subscriber/subscriber.public.js +0 -8
- package/cjs/build/types.d.ts +1 -1
- package/dist/statics/docs-ts-model.json +1311 -41
- package/es/build/index.d.ts +4 -0
- package/es/build/index.js +2 -0
- package/es/build/publisher/publisher.context.d.ts +3 -0
- package/es/build/publisher/publisher.context.js +3 -0
- package/es/build/subscriber/subscriber.context.d.ts +81 -0
- package/es/build/subscriber/subscriber.context.js +81 -0
- package/es/build/subscriber/subscriber.public.d.ts +0 -8
- package/es/build/subscriber/subscriber.public.js +0 -8
- package/es/build/types.d.ts +1 -1
- package/package.json +4 -4
|
@@ -61,12 +61,17 @@
|
|
|
61
61
|
"variant": "param",
|
|
62
62
|
"kind": 32768,
|
|
63
63
|
"flags": {},
|
|
64
|
+
"comment": {
|
|
65
|
+
"summary": [
|
|
66
|
+
{
|
|
67
|
+
"kind": "text",
|
|
68
|
+
"text": "The channel, and optionally the resource, to publish to."
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
64
72
|
"type": {
|
|
65
73
|
"type": "reference",
|
|
66
|
-
"target":
|
|
67
|
-
"sourceFileName": "../realtime-common/cjs/build/types.d.ts",
|
|
68
|
-
"qualifiedName": "Channel"
|
|
69
|
-
},
|
|
74
|
+
"target": 43,
|
|
70
75
|
"name": "Channel",
|
|
71
76
|
"package": "@wix/realtime-common"
|
|
72
77
|
}
|
|
@@ -77,6 +82,14 @@
|
|
|
77
82
|
"variant": "param",
|
|
78
83
|
"kind": 32768,
|
|
79
84
|
"flags": {},
|
|
85
|
+
"comment": {
|
|
86
|
+
"summary": [
|
|
87
|
+
{
|
|
88
|
+
"kind": "text",
|
|
89
|
+
"text": "Message payload. Max: 10kb"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
80
93
|
"type": {
|
|
81
94
|
"type": "reference",
|
|
82
95
|
"target": {
|
|
@@ -332,10 +345,7 @@
|
|
|
332
345
|
},
|
|
333
346
|
"type": {
|
|
334
347
|
"type": "reference",
|
|
335
|
-
"target":
|
|
336
|
-
"sourceFileName": "../realtime-common/cjs/build/types.d.ts",
|
|
337
|
-
"qualifiedName": "Channel"
|
|
338
|
-
},
|
|
348
|
+
"target": 43,
|
|
339
349
|
"name": "Channel",
|
|
340
350
|
"package": "@wix/realtime-common"
|
|
341
351
|
}
|
|
@@ -466,10 +476,7 @@
|
|
|
466
476
|
},
|
|
467
477
|
"type": {
|
|
468
478
|
"type": "reference",
|
|
469
|
-
"target":
|
|
470
|
-
"sourceFileName": "../realtime-common/cjs/build/types.d.ts",
|
|
471
|
-
"qualifiedName": "Channel"
|
|
472
|
-
},
|
|
479
|
+
"target": 43,
|
|
473
480
|
"name": "Channel",
|
|
474
481
|
"package": "@wix/realtime-common"
|
|
475
482
|
}
|
|
@@ -793,10 +800,7 @@
|
|
|
793
800
|
},
|
|
794
801
|
"type": {
|
|
795
802
|
"type": "reference",
|
|
796
|
-
"target":
|
|
797
|
-
"sourceFileName": "../realtime-common/cjs/build/types.d.ts",
|
|
798
|
-
"qualifiedName": "Channel"
|
|
799
|
-
},
|
|
803
|
+
"target": 43,
|
|
800
804
|
"name": "Channel",
|
|
801
805
|
"package": "@wix/realtime-common"
|
|
802
806
|
}
|
|
@@ -916,6 +920,34 @@
|
|
|
916
920
|
"variant": "signature",
|
|
917
921
|
"kind": 4096,
|
|
918
922
|
"flags": {},
|
|
923
|
+
"comment": {
|
|
924
|
+
"summary": [
|
|
925
|
+
{
|
|
926
|
+
"kind": "text",
|
|
927
|
+
"text": "Subscribe to a channel. Returns a subscriptionId immediately; the\nactual connection is established asynchronously in the background. Use the\noptional "
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"kind": "code",
|
|
931
|
+
"text": "`options`"
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"kind": "text",
|
|
935
|
+
"text": " parameter to handle subscription lifecycle events.\n\n**Manual client (self-hosted / explicit auth):**\n\n"
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"kind": "code",
|
|
939
|
+
"text": "```ts\nimport { subscriber } from '@wix/realtime';\nimport { createClient, AppStrategy } from '@wix/sdk';\n\nconst client = createClient({\n modules: { subscriber },\n auth: AppStrategy({ appId, appSecret, instanceId }),\n});\n\nconst subscriptionId = client.subscriber.subscribe(\n { name: 'my-channel' },\n (message, channel) => {\n console.log('Received:', message.payload);\n },\n {\n onSubscribed: (id, isSynced) => console.log('Subscribed', id),\n onSubscriptionError: (error, id) => console.error('Error', error),\n },\n);\n```"
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"kind": "text",
|
|
943
|
+
"text": "\n\n**Contextual client (Wix-hosted):**\n\n"
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
"kind": "code",
|
|
947
|
+
"text": "```ts\nimport { subscriber } from '@wix/realtime';\n\nconst subscriptionId = subscriber.subscribe(\n { name: 'my-channel' },\n (message, channel) => {\n console.log('Received:', message.payload);\n },\n);\n```"
|
|
948
|
+
}
|
|
949
|
+
]
|
|
950
|
+
},
|
|
919
951
|
"parameters": [
|
|
920
952
|
{
|
|
921
953
|
"id": 33,
|
|
@@ -923,12 +955,17 @@
|
|
|
923
955
|
"variant": "param",
|
|
924
956
|
"kind": 32768,
|
|
925
957
|
"flags": {},
|
|
958
|
+
"comment": {
|
|
959
|
+
"summary": [
|
|
960
|
+
{
|
|
961
|
+
"kind": "text",
|
|
962
|
+
"text": "The channel, and optionally the resource, to subscribe to."
|
|
963
|
+
}
|
|
964
|
+
]
|
|
965
|
+
},
|
|
926
966
|
"type": {
|
|
927
967
|
"type": "reference",
|
|
928
|
-
"target":
|
|
929
|
-
"sourceFileName": "../realtime-common/cjs/build/types.d.ts",
|
|
930
|
-
"qualifiedName": "Channel"
|
|
931
|
-
},
|
|
968
|
+
"target": 43,
|
|
932
969
|
"name": "Channel",
|
|
933
970
|
"package": "@wix/realtime-common"
|
|
934
971
|
}
|
|
@@ -939,12 +976,17 @@
|
|
|
939
976
|
"variant": "param",
|
|
940
977
|
"kind": 32768,
|
|
941
978
|
"flags": {},
|
|
979
|
+
"comment": {
|
|
980
|
+
"summary": [
|
|
981
|
+
{
|
|
982
|
+
"kind": "text",
|
|
983
|
+
"text": "Callback invoked whenever a message is published to the channel."
|
|
984
|
+
}
|
|
985
|
+
]
|
|
986
|
+
},
|
|
942
987
|
"type": {
|
|
943
988
|
"type": "reference",
|
|
944
|
-
"target":
|
|
945
|
-
"sourceFileName": "../realtime-common/cjs/build/types.d.ts",
|
|
946
|
-
"qualifiedName": "MessageHandler"
|
|
947
|
-
},
|
|
989
|
+
"target": 49,
|
|
948
990
|
"name": "MessageHandler",
|
|
949
991
|
"package": "@wix/realtime-common"
|
|
950
992
|
}
|
|
@@ -957,12 +999,17 @@
|
|
|
957
999
|
"flags": {
|
|
958
1000
|
"isOptional": true
|
|
959
1001
|
},
|
|
1002
|
+
"comment": {
|
|
1003
|
+
"summary": [
|
|
1004
|
+
{
|
|
1005
|
+
"kind": "text",
|
|
1006
|
+
"text": "Optional lifecycle handlers for subscription events."
|
|
1007
|
+
}
|
|
1008
|
+
]
|
|
1009
|
+
},
|
|
960
1010
|
"type": {
|
|
961
1011
|
"type": "reference",
|
|
962
|
-
"target":
|
|
963
|
-
"sourceFileName": "../realtime-common/cjs/build/types.d.ts",
|
|
964
|
-
"qualifiedName": "SubscriptionOptions"
|
|
965
|
-
},
|
|
1012
|
+
"target": 66,
|
|
966
1013
|
"name": "SubscriptionOptions",
|
|
967
1014
|
"package": "@wix/realtime-common"
|
|
968
1015
|
}
|
|
@@ -991,7 +1038,19 @@
|
|
|
991
1038
|
},
|
|
992
1039
|
{
|
|
993
1040
|
"kind": "text",
|
|
994
|
-
"text": " parameter to handle subscription lifecycle events
|
|
1041
|
+
"text": " parameter to handle subscription lifecycle events.\n\n**Manual client (self-hosted / explicit auth):**\n\n"
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"kind": "code",
|
|
1045
|
+
"text": "```ts\nimport { subscriber } from '@wix/realtime';\nimport { createClient, AppStrategy } from '@wix/sdk';\n\nconst client = createClient({\n modules: { subscriber },\n auth: AppStrategy({ appId, appSecret, instanceId }),\n});\n\nconst subscriptionId = client.subscriber.subscribe(\n { name: 'my-channel' },\n (message, channel) => {\n console.log('Received:', message.payload);\n },\n {\n onSubscribed: (id, isSynced) => console.log('Subscribed', id),\n onSubscriptionError: (error, id) => console.error('Error', error),\n },\n);\n```"
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
"kind": "text",
|
|
1049
|
+
"text": "\n\n**Contextual client (Wix-hosted):**\n\n"
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
"kind": "code",
|
|
1053
|
+
"text": "```ts\nimport { subscriber } from '@wix/realtime';\n\nconst subscriptionId = subscriber.subscribe(\n { name: 'my-channel' },\n (message, channel) => {\n console.log('Received:', message.payload);\n },\n);\n```"
|
|
995
1054
|
}
|
|
996
1055
|
]
|
|
997
1056
|
},
|
|
@@ -1038,6 +1097,42 @@
|
|
|
1038
1097
|
"variant": "signature",
|
|
1039
1098
|
"kind": 4096,
|
|
1040
1099
|
"flags": {},
|
|
1100
|
+
"comment": {
|
|
1101
|
+
"summary": [
|
|
1102
|
+
{
|
|
1103
|
+
"kind": "text",
|
|
1104
|
+
"text": "Unsubscribe from a subscription by its ID, by channel, or both.\n\nYou can unsubscribe in three ways:\n- By "
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"kind": "code",
|
|
1108
|
+
"text": "`subscriptionId`"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
"kind": "text",
|
|
1112
|
+
"text": " — removes a single subscription.\n- By "
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
"kind": "code",
|
|
1116
|
+
"text": "`channel`"
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
"kind": "text",
|
|
1120
|
+
"text": " — removes all subscriptions to that channel.\n- By both — removes the specific subscription, verifying it matches the channel.\n\n**Manual client (self-hosted / explicit auth):**\n\n"
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
"kind": "code",
|
|
1124
|
+
"text": "```ts\nimport { subscriber } from '@wix/realtime';\nimport { createClient, AppStrategy } from '@wix/sdk';\n\nconst client = createClient({\n modules: { subscriber },\n auth: AppStrategy({ appId, appSecret, instanceId }),\n});\n\n// Unsubscribe by subscription ID\nclient.subscriber.unsubscribe({ subscriptionId });\n\n// Unsubscribe from all subscriptions to a channel\nclient.subscriber.unsubscribe({ channel: { name: 'my-channel' } });\n```"
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
"kind": "text",
|
|
1128
|
+
"text": "\n\n**Contextual client (Wix-hosted):**\n\n"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"kind": "code",
|
|
1132
|
+
"text": "```ts\nimport { subscriber } from '@wix/realtime';\n\nsubscriber.unsubscribe({ subscriptionId });\n```"
|
|
1133
|
+
}
|
|
1134
|
+
]
|
|
1135
|
+
},
|
|
1041
1136
|
"parameters": [
|
|
1042
1137
|
{
|
|
1043
1138
|
"id": 40,
|
|
@@ -1045,12 +1140,17 @@
|
|
|
1045
1140
|
"variant": "param",
|
|
1046
1141
|
"kind": 32768,
|
|
1047
1142
|
"flags": {},
|
|
1143
|
+
"comment": {
|
|
1144
|
+
"summary": [
|
|
1145
|
+
{
|
|
1146
|
+
"kind": "text",
|
|
1147
|
+
"text": "Identifies what to unsubscribe from — by subscription ID, channel, or both."
|
|
1148
|
+
}
|
|
1149
|
+
]
|
|
1150
|
+
},
|
|
1048
1151
|
"type": {
|
|
1049
1152
|
"type": "reference",
|
|
1050
|
-
"target":
|
|
1051
|
-
"sourceFileName": "../realtime-common/cjs/build/types.d.ts",
|
|
1052
|
-
"qualifiedName": "UnsubscribeOptions"
|
|
1053
|
-
},
|
|
1153
|
+
"target": 69,
|
|
1054
1154
|
"name": "UnsubscribeOptions",
|
|
1055
1155
|
"package": "@wix/realtime-common"
|
|
1056
1156
|
}
|
|
@@ -1071,7 +1171,35 @@
|
|
|
1071
1171
|
"summary": [
|
|
1072
1172
|
{
|
|
1073
1173
|
"kind": "text",
|
|
1074
|
-
"text": "Unsubscribe from a subscription by its ID, by channel, or both
|
|
1174
|
+
"text": "Unsubscribe from a subscription by its ID, by channel, or both.\n\nYou can unsubscribe in three ways:\n- By "
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
"kind": "code",
|
|
1178
|
+
"text": "`subscriptionId`"
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
"kind": "text",
|
|
1182
|
+
"text": " — removes a single subscription.\n- By "
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
"kind": "code",
|
|
1186
|
+
"text": "`channel`"
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
"kind": "text",
|
|
1190
|
+
"text": " — removes all subscriptions to that channel.\n- By both — removes the specific subscription, verifying it matches the channel.\n\n**Manual client (self-hosted / explicit auth):**\n\n"
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
"kind": "code",
|
|
1194
|
+
"text": "```ts\nimport { subscriber } from '@wix/realtime';\nimport { createClient, AppStrategy } from '@wix/sdk';\n\nconst client = createClient({\n modules: { subscriber },\n auth: AppStrategy({ appId, appSecret, instanceId }),\n});\n\n// Unsubscribe by subscription ID\nclient.subscriber.unsubscribe({ subscriptionId });\n\n// Unsubscribe from all subscriptions to a channel\nclient.subscriber.unsubscribe({ channel: { name: 'my-channel' } });\n```"
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
"kind": "text",
|
|
1198
|
+
"text": "\n\n**Contextual client (Wix-hosted):**\n\n"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"kind": "code",
|
|
1202
|
+
"text": "```ts\nimport { subscriber } from '@wix/realtime';\n\nsubscriber.unsubscribe({ subscriptionId });\n```"
|
|
1075
1203
|
}
|
|
1076
1204
|
]
|
|
1077
1205
|
},
|
|
@@ -1115,15 +1243,1157 @@
|
|
|
1115
1243
|
]
|
|
1116
1244
|
}
|
|
1117
1245
|
]
|
|
1118
|
-
}
|
|
1119
|
-
],
|
|
1120
|
-
"groups": [
|
|
1246
|
+
},
|
|
1121
1247
|
{
|
|
1122
|
-
"
|
|
1248
|
+
"id": 86,
|
|
1249
|
+
"name": "RealtimeErrorCode",
|
|
1250
|
+
"variant": "declaration",
|
|
1251
|
+
"kind": 8,
|
|
1252
|
+
"flags": {},
|
|
1253
|
+
"comment": {
|
|
1254
|
+
"summary": [
|
|
1255
|
+
{
|
|
1256
|
+
"kind": "text",
|
|
1257
|
+
"text": "Error codes for realtime errors."
|
|
1258
|
+
}
|
|
1259
|
+
]
|
|
1260
|
+
},
|
|
1123
1261
|
"children": [
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1262
|
+
{
|
|
1263
|
+
"id": 90,
|
|
1264
|
+
"name": "BadInput",
|
|
1265
|
+
"variant": "declaration",
|
|
1266
|
+
"kind": 16,
|
|
1267
|
+
"flags": {},
|
|
1268
|
+
"comment": {
|
|
1269
|
+
"summary": [
|
|
1270
|
+
{
|
|
1271
|
+
"kind": "text",
|
|
1272
|
+
"text": "Invalid input (e.g. bad channel name)."
|
|
1273
|
+
}
|
|
1274
|
+
]
|
|
1275
|
+
},
|
|
1276
|
+
"type": {
|
|
1277
|
+
"type": "literal",
|
|
1278
|
+
"value": "BAD_INPUT"
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
"id": 88,
|
|
1283
|
+
"name": "ConnectionError",
|
|
1284
|
+
"variant": "declaration",
|
|
1285
|
+
"kind": 16,
|
|
1286
|
+
"flags": {},
|
|
1287
|
+
"comment": {
|
|
1288
|
+
"summary": [
|
|
1289
|
+
{
|
|
1290
|
+
"kind": "text",
|
|
1291
|
+
"text": "A connection attempt failed. The client keeps retrying automatically."
|
|
1292
|
+
}
|
|
1293
|
+
]
|
|
1294
|
+
},
|
|
1295
|
+
"type": {
|
|
1296
|
+
"type": "literal",
|
|
1297
|
+
"value": "CONNECTION_ERROR"
|
|
1298
|
+
}
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
"id": 87,
|
|
1302
|
+
"name": "Disconnected",
|
|
1303
|
+
"variant": "declaration",
|
|
1304
|
+
"kind": 16,
|
|
1305
|
+
"flags": {},
|
|
1306
|
+
"comment": {
|
|
1307
|
+
"summary": [
|
|
1308
|
+
{
|
|
1309
|
+
"kind": "text",
|
|
1310
|
+
"text": "The connection was closed, either intentionally or due to an error."
|
|
1311
|
+
}
|
|
1312
|
+
]
|
|
1313
|
+
},
|
|
1314
|
+
"type": {
|
|
1315
|
+
"type": "literal",
|
|
1316
|
+
"value": "DISCONNECTED"
|
|
1317
|
+
}
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
"id": 89,
|
|
1321
|
+
"name": "SubscriptionFailed",
|
|
1322
|
+
"variant": "declaration",
|
|
1323
|
+
"kind": 16,
|
|
1324
|
+
"flags": {},
|
|
1325
|
+
"comment": {
|
|
1326
|
+
"summary": [
|
|
1327
|
+
{
|
|
1328
|
+
"kind": "text",
|
|
1329
|
+
"text": "The subscription request failed (e.g. authorization error)."
|
|
1330
|
+
}
|
|
1331
|
+
]
|
|
1332
|
+
},
|
|
1333
|
+
"type": {
|
|
1334
|
+
"type": "literal",
|
|
1335
|
+
"value": "SUBSCRIPTION_FAILED"
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
],
|
|
1339
|
+
"groups": [
|
|
1340
|
+
{
|
|
1341
|
+
"title": "Enumeration Members",
|
|
1342
|
+
"children": [
|
|
1343
|
+
90,
|
|
1344
|
+
88,
|
|
1345
|
+
87,
|
|
1346
|
+
89
|
|
1347
|
+
]
|
|
1348
|
+
}
|
|
1349
|
+
]
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
"id": 72,
|
|
1353
|
+
"name": "RealtimeError",
|
|
1354
|
+
"variant": "declaration",
|
|
1355
|
+
"kind": 128,
|
|
1356
|
+
"flags": {},
|
|
1357
|
+
"comment": {
|
|
1358
|
+
"summary": [
|
|
1359
|
+
{
|
|
1360
|
+
"kind": "text",
|
|
1361
|
+
"text": "An object representing an error."
|
|
1362
|
+
}
|
|
1363
|
+
]
|
|
1364
|
+
},
|
|
1365
|
+
"children": [
|
|
1366
|
+
{
|
|
1367
|
+
"id": 73,
|
|
1368
|
+
"name": "constructor",
|
|
1369
|
+
"variant": "declaration",
|
|
1370
|
+
"kind": 512,
|
|
1371
|
+
"flags": {},
|
|
1372
|
+
"signatures": [
|
|
1373
|
+
{
|
|
1374
|
+
"id": 74,
|
|
1375
|
+
"name": "new RealtimeError",
|
|
1376
|
+
"variant": "signature",
|
|
1377
|
+
"kind": 16384,
|
|
1378
|
+
"flags": {},
|
|
1379
|
+
"parameters": [
|
|
1380
|
+
{
|
|
1381
|
+
"id": 75,
|
|
1382
|
+
"name": "errorCode",
|
|
1383
|
+
"variant": "param",
|
|
1384
|
+
"kind": 32768,
|
|
1385
|
+
"flags": {},
|
|
1386
|
+
"type": {
|
|
1387
|
+
"type": "reference",
|
|
1388
|
+
"target": 86,
|
|
1389
|
+
"name": "RealtimeErrorCode",
|
|
1390
|
+
"package": "@wix/realtime-common"
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
"id": 76,
|
|
1395
|
+
"name": "message",
|
|
1396
|
+
"variant": "param",
|
|
1397
|
+
"kind": 32768,
|
|
1398
|
+
"flags": {},
|
|
1399
|
+
"type": {
|
|
1400
|
+
"type": "intrinsic",
|
|
1401
|
+
"name": "string"
|
|
1402
|
+
}
|
|
1403
|
+
},
|
|
1404
|
+
{
|
|
1405
|
+
"id": 77,
|
|
1406
|
+
"name": "options",
|
|
1407
|
+
"variant": "param",
|
|
1408
|
+
"kind": 32768,
|
|
1409
|
+
"flags": {
|
|
1410
|
+
"isOptional": true
|
|
1411
|
+
},
|
|
1412
|
+
"type": {
|
|
1413
|
+
"type": "reflection",
|
|
1414
|
+
"declaration": {
|
|
1415
|
+
"id": 78,
|
|
1416
|
+
"name": "__type",
|
|
1417
|
+
"variant": "declaration",
|
|
1418
|
+
"kind": 65536,
|
|
1419
|
+
"flags": {},
|
|
1420
|
+
"children": [
|
|
1421
|
+
{
|
|
1422
|
+
"id": 79,
|
|
1423
|
+
"name": "channel",
|
|
1424
|
+
"variant": "declaration",
|
|
1425
|
+
"kind": 1024,
|
|
1426
|
+
"flags": {
|
|
1427
|
+
"isOptional": true
|
|
1428
|
+
},
|
|
1429
|
+
"type": {
|
|
1430
|
+
"type": "reference",
|
|
1431
|
+
"target": 43,
|
|
1432
|
+
"name": "Channel",
|
|
1433
|
+
"package": "@wix/realtime-common"
|
|
1434
|
+
}
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
"id": 80,
|
|
1438
|
+
"name": "recoverable",
|
|
1439
|
+
"variant": "declaration",
|
|
1440
|
+
"kind": 1024,
|
|
1441
|
+
"flags": {
|
|
1442
|
+
"isOptional": true
|
|
1443
|
+
},
|
|
1444
|
+
"type": {
|
|
1445
|
+
"type": "intrinsic",
|
|
1446
|
+
"name": "boolean"
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
"id": 81,
|
|
1451
|
+
"name": "status",
|
|
1452
|
+
"variant": "declaration",
|
|
1453
|
+
"kind": 1024,
|
|
1454
|
+
"flags": {
|
|
1455
|
+
"isOptional": true
|
|
1456
|
+
},
|
|
1457
|
+
"type": {
|
|
1458
|
+
"type": "intrinsic",
|
|
1459
|
+
"name": "number"
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
],
|
|
1463
|
+
"groups": [
|
|
1464
|
+
{
|
|
1465
|
+
"title": "Properties",
|
|
1466
|
+
"children": [
|
|
1467
|
+
79,
|
|
1468
|
+
80,
|
|
1469
|
+
81
|
|
1470
|
+
]
|
|
1471
|
+
}
|
|
1472
|
+
]
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
],
|
|
1477
|
+
"type": {
|
|
1478
|
+
"type": "reference",
|
|
1479
|
+
"target": 72,
|
|
1480
|
+
"name": "RealtimeError",
|
|
1481
|
+
"package": "@wix/realtime-common"
|
|
1482
|
+
},
|
|
1483
|
+
"overwrites": {
|
|
1484
|
+
"type": "reference",
|
|
1485
|
+
"target": -1,
|
|
1486
|
+
"name": "Error.constructor"
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
],
|
|
1490
|
+
"overwrites": {
|
|
1491
|
+
"type": "reference",
|
|
1492
|
+
"target": -1,
|
|
1493
|
+
"name": "Error.constructor"
|
|
1494
|
+
}
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
"id": 83,
|
|
1498
|
+
"name": "channel",
|
|
1499
|
+
"variant": "declaration",
|
|
1500
|
+
"kind": 1024,
|
|
1501
|
+
"flags": {
|
|
1502
|
+
"isOptional": true
|
|
1503
|
+
},
|
|
1504
|
+
"comment": {
|
|
1505
|
+
"summary": [
|
|
1506
|
+
{
|
|
1507
|
+
"kind": "text",
|
|
1508
|
+
"text": "Channel related to the error."
|
|
1509
|
+
}
|
|
1510
|
+
]
|
|
1511
|
+
},
|
|
1512
|
+
"type": {
|
|
1513
|
+
"type": "reference",
|
|
1514
|
+
"target": 43,
|
|
1515
|
+
"name": "Channel",
|
|
1516
|
+
"package": "@wix/realtime-common"
|
|
1517
|
+
}
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
"id": 82,
|
|
1521
|
+
"name": "errorCode",
|
|
1522
|
+
"variant": "declaration",
|
|
1523
|
+
"kind": 1024,
|
|
1524
|
+
"flags": {},
|
|
1525
|
+
"comment": {
|
|
1526
|
+
"summary": [
|
|
1527
|
+
{
|
|
1528
|
+
"kind": "text",
|
|
1529
|
+
"text": "Error code."
|
|
1530
|
+
}
|
|
1531
|
+
]
|
|
1532
|
+
},
|
|
1533
|
+
"type": {
|
|
1534
|
+
"type": "reference",
|
|
1535
|
+
"target": 86,
|
|
1536
|
+
"name": "RealtimeErrorCode",
|
|
1537
|
+
"package": "@wix/realtime-common"
|
|
1538
|
+
}
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
"id": 84,
|
|
1542
|
+
"name": "recoverable",
|
|
1543
|
+
"variant": "declaration",
|
|
1544
|
+
"kind": 1024,
|
|
1545
|
+
"flags": {
|
|
1546
|
+
"isOptional": true
|
|
1547
|
+
},
|
|
1548
|
+
"comment": {
|
|
1549
|
+
"summary": [
|
|
1550
|
+
{
|
|
1551
|
+
"kind": "text",
|
|
1552
|
+
"text": "Whether the error is recoverable. When "
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
"kind": "code",
|
|
1556
|
+
"text": "`true`"
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
"kind": "text",
|
|
1560
|
+
"text": ", the client is\nautomatically attempting to reconnect. When "
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
"kind": "code",
|
|
1564
|
+
"text": "`false`"
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
"kind": "text",
|
|
1568
|
+
"text": ", user action\nis required (for example, the subscription must be re-created)."
|
|
1569
|
+
}
|
|
1570
|
+
]
|
|
1571
|
+
},
|
|
1572
|
+
"type": {
|
|
1573
|
+
"type": "intrinsic",
|
|
1574
|
+
"name": "boolean"
|
|
1575
|
+
}
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
"id": 85,
|
|
1579
|
+
"name": "status",
|
|
1580
|
+
"variant": "declaration",
|
|
1581
|
+
"kind": 1024,
|
|
1582
|
+
"flags": {
|
|
1583
|
+
"isOptional": true
|
|
1584
|
+
},
|
|
1585
|
+
"comment": {
|
|
1586
|
+
"summary": [
|
|
1587
|
+
{
|
|
1588
|
+
"kind": "text",
|
|
1589
|
+
"text": "HTTP status code from the server response.\nPresent on subscription failed errors (e.g. 401, 403, 500)."
|
|
1590
|
+
}
|
|
1591
|
+
]
|
|
1592
|
+
},
|
|
1593
|
+
"type": {
|
|
1594
|
+
"type": "intrinsic",
|
|
1595
|
+
"name": "number"
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
],
|
|
1599
|
+
"groups": [
|
|
1600
|
+
{
|
|
1601
|
+
"title": "Constructors",
|
|
1602
|
+
"children": [
|
|
1603
|
+
73
|
|
1604
|
+
]
|
|
1605
|
+
},
|
|
1606
|
+
{
|
|
1607
|
+
"title": "Properties",
|
|
1608
|
+
"children": [
|
|
1609
|
+
83,
|
|
1610
|
+
82,
|
|
1611
|
+
84,
|
|
1612
|
+
85
|
|
1613
|
+
]
|
|
1614
|
+
}
|
|
1615
|
+
],
|
|
1616
|
+
"extendedTypes": [
|
|
1617
|
+
{
|
|
1618
|
+
"type": "reference",
|
|
1619
|
+
"target": {
|
|
1620
|
+
"sourceFileName": "../../node_modules/typescript/lib/lib.es5.d.ts",
|
|
1621
|
+
"qualifiedName": "Error"
|
|
1622
|
+
},
|
|
1623
|
+
"name": "Error",
|
|
1624
|
+
"package": "typescript"
|
|
1625
|
+
}
|
|
1626
|
+
]
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
"id": 43,
|
|
1630
|
+
"name": "Channel",
|
|
1631
|
+
"variant": "declaration",
|
|
1632
|
+
"kind": 256,
|
|
1633
|
+
"flags": {},
|
|
1634
|
+
"comment": {
|
|
1635
|
+
"summary": [
|
|
1636
|
+
{
|
|
1637
|
+
"kind": "text",
|
|
1638
|
+
"text": "An object representing a realtime channel."
|
|
1639
|
+
}
|
|
1640
|
+
]
|
|
1641
|
+
},
|
|
1642
|
+
"children": [
|
|
1643
|
+
{
|
|
1644
|
+
"id": 44,
|
|
1645
|
+
"name": "name",
|
|
1646
|
+
"variant": "declaration",
|
|
1647
|
+
"kind": 1024,
|
|
1648
|
+
"flags": {},
|
|
1649
|
+
"comment": {
|
|
1650
|
+
"summary": [
|
|
1651
|
+
{
|
|
1652
|
+
"kind": "text",
|
|
1653
|
+
"text": "Channel name. Only alphanumeric characters, hyphens, and underscores are allowed.\nThe combined length of "
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
"kind": "code",
|
|
1657
|
+
"text": "`name`"
|
|
1658
|
+
},
|
|
1659
|
+
{
|
|
1660
|
+
"kind": "text",
|
|
1661
|
+
"text": " and "
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
"kind": "code",
|
|
1665
|
+
"text": "`resourceId`"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
"kind": "text",
|
|
1669
|
+
"text": " cannot exceed 140 characters."
|
|
1670
|
+
}
|
|
1671
|
+
]
|
|
1672
|
+
},
|
|
1673
|
+
"type": {
|
|
1674
|
+
"type": "intrinsic",
|
|
1675
|
+
"name": "string"
|
|
1676
|
+
}
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
"id": 45,
|
|
1680
|
+
"name": "resourceId",
|
|
1681
|
+
"variant": "declaration",
|
|
1682
|
+
"kind": 1024,
|
|
1683
|
+
"flags": {
|
|
1684
|
+
"isOptional": true
|
|
1685
|
+
},
|
|
1686
|
+
"comment": {
|
|
1687
|
+
"summary": [
|
|
1688
|
+
{
|
|
1689
|
+
"kind": "text",
|
|
1690
|
+
"text": "ID of a specific channel resource."
|
|
1691
|
+
}
|
|
1692
|
+
]
|
|
1693
|
+
},
|
|
1694
|
+
"type": {
|
|
1695
|
+
"type": "intrinsic",
|
|
1696
|
+
"name": "string"
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
],
|
|
1700
|
+
"groups": [
|
|
1701
|
+
{
|
|
1702
|
+
"title": "Properties",
|
|
1703
|
+
"children": [
|
|
1704
|
+
44,
|
|
1705
|
+
45
|
|
1706
|
+
]
|
|
1707
|
+
}
|
|
1708
|
+
]
|
|
1709
|
+
},
|
|
1710
|
+
{
|
|
1711
|
+
"id": 46,
|
|
1712
|
+
"name": "Message",
|
|
1713
|
+
"variant": "declaration",
|
|
1714
|
+
"kind": 256,
|
|
1715
|
+
"flags": {},
|
|
1716
|
+
"comment": {
|
|
1717
|
+
"summary": [
|
|
1718
|
+
{
|
|
1719
|
+
"kind": "text",
|
|
1720
|
+
"text": "An object representing a published message."
|
|
1721
|
+
}
|
|
1722
|
+
]
|
|
1723
|
+
},
|
|
1724
|
+
"children": [
|
|
1725
|
+
{
|
|
1726
|
+
"id": 47,
|
|
1727
|
+
"name": "payload",
|
|
1728
|
+
"variant": "declaration",
|
|
1729
|
+
"kind": 1024,
|
|
1730
|
+
"flags": {},
|
|
1731
|
+
"comment": {
|
|
1732
|
+
"summary": [
|
|
1733
|
+
{
|
|
1734
|
+
"kind": "text",
|
|
1735
|
+
"text": "Message payload.\nMax: 10kb"
|
|
1736
|
+
}
|
|
1737
|
+
]
|
|
1738
|
+
},
|
|
1739
|
+
"type": {
|
|
1740
|
+
"type": "reference",
|
|
1741
|
+
"target": {
|
|
1742
|
+
"sourceFileName": "../../node_modules/typescript/lib/lib.es5.d.ts",
|
|
1743
|
+
"qualifiedName": "Record"
|
|
1744
|
+
},
|
|
1745
|
+
"typeArguments": [
|
|
1746
|
+
{
|
|
1747
|
+
"type": "intrinsic",
|
|
1748
|
+
"name": "string"
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
"type": "intrinsic",
|
|
1752
|
+
"name": "any"
|
|
1753
|
+
}
|
|
1754
|
+
],
|
|
1755
|
+
"name": "Record",
|
|
1756
|
+
"package": "typescript"
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
{
|
|
1760
|
+
"id": 48,
|
|
1761
|
+
"name": "publisher",
|
|
1762
|
+
"variant": "declaration",
|
|
1763
|
+
"kind": 1024,
|
|
1764
|
+
"flags": {
|
|
1765
|
+
"isOptional": true
|
|
1766
|
+
},
|
|
1767
|
+
"comment": {
|
|
1768
|
+
"summary": [
|
|
1769
|
+
{
|
|
1770
|
+
"kind": "text",
|
|
1771
|
+
"text": "Message publisher, if sent."
|
|
1772
|
+
}
|
|
1773
|
+
]
|
|
1774
|
+
},
|
|
1775
|
+
"type": {
|
|
1776
|
+
"type": "reference",
|
|
1777
|
+
"target": 54,
|
|
1778
|
+
"name": "Publisher",
|
|
1779
|
+
"package": "@wix/realtime-common"
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
],
|
|
1783
|
+
"groups": [
|
|
1784
|
+
{
|
|
1785
|
+
"title": "Properties",
|
|
1786
|
+
"children": [
|
|
1787
|
+
47,
|
|
1788
|
+
48
|
|
1789
|
+
]
|
|
1790
|
+
}
|
|
1791
|
+
]
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
"id": 54,
|
|
1795
|
+
"name": "Publisher",
|
|
1796
|
+
"variant": "declaration",
|
|
1797
|
+
"kind": 256,
|
|
1798
|
+
"flags": {},
|
|
1799
|
+
"comment": {
|
|
1800
|
+
"summary": [
|
|
1801
|
+
{
|
|
1802
|
+
"kind": "text",
|
|
1803
|
+
"text": "An object representing a publisher."
|
|
1804
|
+
}
|
|
1805
|
+
]
|
|
1806
|
+
},
|
|
1807
|
+
"children": [
|
|
1808
|
+
{
|
|
1809
|
+
"id": 55,
|
|
1810
|
+
"name": "id",
|
|
1811
|
+
"variant": "declaration",
|
|
1812
|
+
"kind": 1024,
|
|
1813
|
+
"flags": {},
|
|
1814
|
+
"comment": {
|
|
1815
|
+
"summary": [
|
|
1816
|
+
{
|
|
1817
|
+
"kind": "text",
|
|
1818
|
+
"text": "ID of the publisher."
|
|
1819
|
+
}
|
|
1820
|
+
]
|
|
1821
|
+
},
|
|
1822
|
+
"type": {
|
|
1823
|
+
"type": "intrinsic",
|
|
1824
|
+
"name": "string"
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
],
|
|
1828
|
+
"groups": [
|
|
1829
|
+
{
|
|
1830
|
+
"title": "Properties",
|
|
1831
|
+
"children": [
|
|
1832
|
+
55
|
|
1833
|
+
]
|
|
1834
|
+
}
|
|
1835
|
+
]
|
|
1836
|
+
},
|
|
1837
|
+
{
|
|
1838
|
+
"id": 66,
|
|
1839
|
+
"name": "SubscriptionOptions",
|
|
1840
|
+
"variant": "declaration",
|
|
1841
|
+
"kind": 256,
|
|
1842
|
+
"flags": {},
|
|
1843
|
+
"comment": {
|
|
1844
|
+
"summary": [
|
|
1845
|
+
{
|
|
1846
|
+
"kind": "text",
|
|
1847
|
+
"text": "An object containing optional lifecycle handlers for a subscription."
|
|
1848
|
+
}
|
|
1849
|
+
]
|
|
1850
|
+
},
|
|
1851
|
+
"children": [
|
|
1852
|
+
{
|
|
1853
|
+
"id": 67,
|
|
1854
|
+
"name": "onSubscribed",
|
|
1855
|
+
"variant": "declaration",
|
|
1856
|
+
"kind": 1024,
|
|
1857
|
+
"flags": {
|
|
1858
|
+
"isOptional": true
|
|
1859
|
+
},
|
|
1860
|
+
"comment": {
|
|
1861
|
+
"summary": [
|
|
1862
|
+
{
|
|
1863
|
+
"kind": "text",
|
|
1864
|
+
"text": "Runs when the subscription is successfully established.\n\nThis fires on the initial subscription and again every time the\nsubscription is automatically restored after a reconnection, so make\nsure your handler is idempotent.\n\nThe "
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
"kind": "code",
|
|
1868
|
+
"text": "`isSynced`"
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
"kind": "text",
|
|
1872
|
+
"text": " flag indicates whether the server was able to restore\nmissed messages since the last disconnection:\n\n- **First subscription** — always "
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
"kind": "code",
|
|
1876
|
+
"text": "`false`"
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
"kind": "text",
|
|
1880
|
+
"text": ". The client has no prior\n message history, so the server cannot restore anything. The app\n should load its own initial state.\n\n- **Re-subscription after reconnect, "
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
"kind": "code",
|
|
1884
|
+
"text": "`isSynced: true`"
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
"kind": "text",
|
|
1888
|
+
"text": "** — the server\n found the last received message and replayed everything since.\n No action needed from the app.\n\n- **Re-subscription after reconnect, "
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
"kind": "code",
|
|
1892
|
+
"text": "`isSynced: false`"
|
|
1893
|
+
},
|
|
1894
|
+
{
|
|
1895
|
+
"kind": "text",
|
|
1896
|
+
"text": "** — the server\n could not restore missed messages (e.g. they expired). The app\n should resync its state independently."
|
|
1897
|
+
}
|
|
1898
|
+
],
|
|
1899
|
+
"blockTags": [
|
|
1900
|
+
{
|
|
1901
|
+
"tag": "@param",
|
|
1902
|
+
"name": "subscriptionId",
|
|
1903
|
+
"content": [
|
|
1904
|
+
{
|
|
1905
|
+
"kind": "text",
|
|
1906
|
+
"text": "The ID of the subscription that was established."
|
|
1907
|
+
}
|
|
1908
|
+
]
|
|
1909
|
+
},
|
|
1910
|
+
{
|
|
1911
|
+
"tag": "@param",
|
|
1912
|
+
"name": "isSynced",
|
|
1913
|
+
"content": [
|
|
1914
|
+
{
|
|
1915
|
+
"kind": "text",
|
|
1916
|
+
"text": "Whether the server successfully restored missed messages."
|
|
1917
|
+
}
|
|
1918
|
+
]
|
|
1919
|
+
}
|
|
1920
|
+
]
|
|
1921
|
+
},
|
|
1922
|
+
"type": {
|
|
1923
|
+
"type": "reference",
|
|
1924
|
+
"target": 61,
|
|
1925
|
+
"name": "SubscriptionHandler",
|
|
1926
|
+
"package": "@wix/realtime-common"
|
|
1927
|
+
}
|
|
1928
|
+
},
|
|
1929
|
+
{
|
|
1930
|
+
"id": 68,
|
|
1931
|
+
"name": "onSubscriptionError",
|
|
1932
|
+
"variant": "declaration",
|
|
1933
|
+
"kind": 1024,
|
|
1934
|
+
"flags": {
|
|
1935
|
+
"isOptional": true
|
|
1936
|
+
},
|
|
1937
|
+
"comment": {
|
|
1938
|
+
"summary": [
|
|
1939
|
+
{
|
|
1940
|
+
"kind": "text",
|
|
1941
|
+
"text": "Runs when a subscription error occurs.\n\nThis handler is triggered in the following scenarios:\n\n- **Subscription failed** — Authorization failure. The subscription\n request returned a non-2xx status. The error includes the HTTP\n "
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
"kind": "code",
|
|
1945
|
+
"text": "`status`"
|
|
1946
|
+
},
|
|
1947
|
+
{
|
|
1948
|
+
"kind": "text",
|
|
1949
|
+
"text": " code and a "
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
"kind": "code",
|
|
1953
|
+
"text": "`message`"
|
|
1954
|
+
},
|
|
1955
|
+
{
|
|
1956
|
+
"kind": "text",
|
|
1957
|
+
"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 "
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
"kind": "code",
|
|
1961
|
+
"text": "`recoverable`"
|
|
1962
|
+
},
|
|
1963
|
+
{
|
|
1964
|
+
"kind": "text",
|
|
1965
|
+
"text": " flag\n on the error indicates whether the client will auto-reconnect\n ("
|
|
1966
|
+
},
|
|
1967
|
+
{
|
|
1968
|
+
"kind": "code",
|
|
1969
|
+
"text": "`true`"
|
|
1970
|
+
},
|
|
1971
|
+
{
|
|
1972
|
+
"kind": "text",
|
|
1973
|
+
"text": ") or whether manual action is required ("
|
|
1974
|
+
},
|
|
1975
|
+
{
|
|
1976
|
+
"kind": "code",
|
|
1977
|
+
"text": "`false`"
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
"kind": "text",
|
|
1981
|
+
"text": ", e.g. a 401\n means the signed instance is invalid).\n\n- **Connection error** — Fired on every reconnection attempt that\n fails. The "
|
|
1982
|
+
},
|
|
1983
|
+
{
|
|
1984
|
+
"kind": "code",
|
|
1985
|
+
"text": "`recoverable`"
|
|
1986
|
+
},
|
|
1987
|
+
{
|
|
1988
|
+
"kind": "text",
|
|
1989
|
+
"text": " flag is always "
|
|
1990
|
+
},
|
|
1991
|
+
{
|
|
1992
|
+
"kind": "code",
|
|
1993
|
+
"text": "`true`"
|
|
1994
|
+
},
|
|
1995
|
+
{
|
|
1996
|
+
"kind": "text",
|
|
1997
|
+
"text": " for these errors\n (the client keeps retrying with exponential backoff). If the error\n becomes non-recoverable, a disconnection with "
|
|
1998
|
+
},
|
|
1999
|
+
{
|
|
2000
|
+
"kind": "code",
|
|
2001
|
+
"text": "`recoverable: false`"
|
|
2002
|
+
},
|
|
2003
|
+
{
|
|
2004
|
+
"kind": "text",
|
|
2005
|
+
"text": "\n is fired instead.\n\nInspect "
|
|
2006
|
+
},
|
|
2007
|
+
{
|
|
2008
|
+
"kind": "code",
|
|
2009
|
+
"text": "`error.recoverable`"
|
|
2010
|
+
},
|
|
2011
|
+
{
|
|
2012
|
+
"kind": "text",
|
|
2013
|
+
"text": " to distinguish transient errors (where\nthe client is auto-reconnecting) from permanent failures (where user\naction is required).\n\nNote: this handler may fire multiple times during a single session.\nFor example, a typical recovery flow looks like:\n"
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
"kind": "code",
|
|
2017
|
+
"text": "`subscribed → error (recoverable) → error (recoverable) → subscribed`"
|
|
2018
|
+
},
|
|
2019
|
+
{
|
|
2020
|
+
"kind": "text",
|
|
2021
|
+
"text": "\nThis happens because the client automatically tries to recover itself\nafter an unexpected disconnection."
|
|
2022
|
+
}
|
|
2023
|
+
],
|
|
2024
|
+
"blockTags": [
|
|
2025
|
+
{
|
|
2026
|
+
"tag": "@param",
|
|
2027
|
+
"name": "error",
|
|
2028
|
+
"content": [
|
|
2029
|
+
{
|
|
2030
|
+
"kind": "text",
|
|
2031
|
+
"text": "The error that occurred, including "
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
"kind": "code",
|
|
2035
|
+
"text": "`errorCode`"
|
|
2036
|
+
},
|
|
2037
|
+
{
|
|
2038
|
+
"kind": "text",
|
|
2039
|
+
"text": ",\n "
|
|
2040
|
+
},
|
|
2041
|
+
{
|
|
2042
|
+
"kind": "code",
|
|
2043
|
+
"text": "`recoverable`"
|
|
2044
|
+
},
|
|
2045
|
+
{
|
|
2046
|
+
"kind": "text",
|
|
2047
|
+
"text": ", and optionally "
|
|
2048
|
+
},
|
|
2049
|
+
{
|
|
2050
|
+
"kind": "code",
|
|
2051
|
+
"text": "`channel`"
|
|
2052
|
+
},
|
|
2053
|
+
{
|
|
2054
|
+
"kind": "text",
|
|
2055
|
+
"text": " and "
|
|
2056
|
+
},
|
|
2057
|
+
{
|
|
2058
|
+
"kind": "code",
|
|
2059
|
+
"text": "`status`"
|
|
2060
|
+
},
|
|
2061
|
+
{
|
|
2062
|
+
"kind": "text",
|
|
2063
|
+
"text": "."
|
|
2064
|
+
}
|
|
2065
|
+
]
|
|
2066
|
+
},
|
|
2067
|
+
{
|
|
2068
|
+
"tag": "@param",
|
|
2069
|
+
"name": "subscriptionId",
|
|
2070
|
+
"content": [
|
|
2071
|
+
{
|
|
2072
|
+
"kind": "text",
|
|
2073
|
+
"text": "The ID of the affected subscription."
|
|
2074
|
+
}
|
|
2075
|
+
]
|
|
2076
|
+
}
|
|
2077
|
+
]
|
|
2078
|
+
},
|
|
2079
|
+
"type": {
|
|
2080
|
+
"type": "reference",
|
|
2081
|
+
"target": 56,
|
|
2082
|
+
"name": "SubscriptionErrorHandler",
|
|
2083
|
+
"package": "@wix/realtime-common"
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
],
|
|
2087
|
+
"groups": [
|
|
2088
|
+
{
|
|
2089
|
+
"title": "Properties",
|
|
2090
|
+
"children": [
|
|
2091
|
+
67,
|
|
2092
|
+
68
|
|
2093
|
+
]
|
|
2094
|
+
}
|
|
2095
|
+
]
|
|
2096
|
+
},
|
|
2097
|
+
{
|
|
2098
|
+
"id": 69,
|
|
2099
|
+
"name": "UnsubscribeOptions",
|
|
2100
|
+
"variant": "declaration",
|
|
2101
|
+
"kind": 256,
|
|
2102
|
+
"flags": {},
|
|
2103
|
+
"comment": {
|
|
2104
|
+
"summary": [
|
|
2105
|
+
{
|
|
2106
|
+
"kind": "text",
|
|
2107
|
+
"text": "An object containing options to be used when unsubscribing from a\nchannel or channel resource."
|
|
2108
|
+
}
|
|
2109
|
+
]
|
|
2110
|
+
},
|
|
2111
|
+
"children": [
|
|
2112
|
+
{
|
|
2113
|
+
"id": 70,
|
|
2114
|
+
"name": "channel",
|
|
2115
|
+
"variant": "declaration",
|
|
2116
|
+
"kind": 1024,
|
|
2117
|
+
"flags": {
|
|
2118
|
+
"isOptional": true
|
|
2119
|
+
},
|
|
2120
|
+
"comment": {
|
|
2121
|
+
"summary": [
|
|
2122
|
+
{
|
|
2123
|
+
"kind": "text",
|
|
2124
|
+
"text": "The channel, and optionally the resource, to\nunsubscribe from. Use this property when unsubscribing from all subscriptions to a channel\nor channel resource."
|
|
2125
|
+
}
|
|
2126
|
+
]
|
|
2127
|
+
},
|
|
2128
|
+
"type": {
|
|
2129
|
+
"type": "reference",
|
|
2130
|
+
"target": 43,
|
|
2131
|
+
"name": "Channel",
|
|
2132
|
+
"package": "@wix/realtime-common"
|
|
2133
|
+
}
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
"id": 71,
|
|
2137
|
+
"name": "subscriptionId",
|
|
2138
|
+
"variant": "declaration",
|
|
2139
|
+
"kind": 1024,
|
|
2140
|
+
"flags": {
|
|
2141
|
+
"isOptional": true
|
|
2142
|
+
},
|
|
2143
|
+
"comment": {
|
|
2144
|
+
"summary": [
|
|
2145
|
+
{
|
|
2146
|
+
"kind": "text",
|
|
2147
|
+
"text": "ID of the subscription to unsubscribe from. Use this\nproperty when unsubscribing from one of multiple subscriptions to a channel or channel\nresource."
|
|
2148
|
+
}
|
|
2149
|
+
]
|
|
2150
|
+
},
|
|
2151
|
+
"type": {
|
|
2152
|
+
"type": "intrinsic",
|
|
2153
|
+
"name": "string"
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
],
|
|
2157
|
+
"groups": [
|
|
2158
|
+
{
|
|
2159
|
+
"title": "Properties",
|
|
2160
|
+
"children": [
|
|
2161
|
+
70,
|
|
2162
|
+
71
|
|
2163
|
+
]
|
|
2164
|
+
}
|
|
2165
|
+
]
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
"id": 49,
|
|
2169
|
+
"name": "MessageHandler",
|
|
2170
|
+
"variant": "declaration",
|
|
2171
|
+
"kind": 4194304,
|
|
2172
|
+
"flags": {},
|
|
2173
|
+
"type": {
|
|
2174
|
+
"type": "reflection",
|
|
2175
|
+
"declaration": {
|
|
2176
|
+
"id": 50,
|
|
2177
|
+
"name": "__type",
|
|
2178
|
+
"variant": "declaration",
|
|
2179
|
+
"kind": 65536,
|
|
2180
|
+
"flags": {},
|
|
2181
|
+
"signatures": [
|
|
2182
|
+
{
|
|
2183
|
+
"id": 51,
|
|
2184
|
+
"name": "__type",
|
|
2185
|
+
"variant": "signature",
|
|
2186
|
+
"kind": 4096,
|
|
2187
|
+
"flags": {},
|
|
2188
|
+
"comment": {
|
|
2189
|
+
"summary": [
|
|
2190
|
+
{
|
|
2191
|
+
"kind": "text",
|
|
2192
|
+
"text": "Handles a message published to a channel or channel resource."
|
|
2193
|
+
}
|
|
2194
|
+
]
|
|
2195
|
+
},
|
|
2196
|
+
"parameters": [
|
|
2197
|
+
{
|
|
2198
|
+
"id": 52,
|
|
2199
|
+
"name": "message",
|
|
2200
|
+
"variant": "param",
|
|
2201
|
+
"kind": 32768,
|
|
2202
|
+
"flags": {},
|
|
2203
|
+
"type": {
|
|
2204
|
+
"type": "reference",
|
|
2205
|
+
"target": 46,
|
|
2206
|
+
"name": "Message",
|
|
2207
|
+
"package": "@wix/realtime-common"
|
|
2208
|
+
}
|
|
2209
|
+
},
|
|
2210
|
+
{
|
|
2211
|
+
"id": 53,
|
|
2212
|
+
"name": "channel",
|
|
2213
|
+
"variant": "param",
|
|
2214
|
+
"kind": 32768,
|
|
2215
|
+
"flags": {},
|
|
2216
|
+
"type": {
|
|
2217
|
+
"type": "reference",
|
|
2218
|
+
"target": 43,
|
|
2219
|
+
"name": "Channel",
|
|
2220
|
+
"package": "@wix/realtime-common"
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
],
|
|
2224
|
+
"type": {
|
|
2225
|
+
"type": "intrinsic",
|
|
2226
|
+
"name": "void"
|
|
2227
|
+
}
|
|
2228
|
+
}
|
|
2229
|
+
]
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
},
|
|
2233
|
+
{
|
|
2234
|
+
"id": 56,
|
|
2235
|
+
"name": "SubscriptionErrorHandler",
|
|
2236
|
+
"variant": "declaration",
|
|
2237
|
+
"kind": 4194304,
|
|
2238
|
+
"flags": {},
|
|
2239
|
+
"type": {
|
|
2240
|
+
"type": "reflection",
|
|
2241
|
+
"declaration": {
|
|
2242
|
+
"id": 57,
|
|
2243
|
+
"name": "__type",
|
|
2244
|
+
"variant": "declaration",
|
|
2245
|
+
"kind": 65536,
|
|
2246
|
+
"flags": {},
|
|
2247
|
+
"signatures": [
|
|
2248
|
+
{
|
|
2249
|
+
"id": 58,
|
|
2250
|
+
"name": "__type",
|
|
2251
|
+
"variant": "signature",
|
|
2252
|
+
"kind": 4096,
|
|
2253
|
+
"flags": {},
|
|
2254
|
+
"comment": {
|
|
2255
|
+
"summary": [
|
|
2256
|
+
{
|
|
2257
|
+
"kind": "text",
|
|
2258
|
+
"text": "Handles a subscription error event."
|
|
2259
|
+
}
|
|
2260
|
+
]
|
|
2261
|
+
},
|
|
2262
|
+
"parameters": [
|
|
2263
|
+
{
|
|
2264
|
+
"id": 59,
|
|
2265
|
+
"name": "error",
|
|
2266
|
+
"variant": "param",
|
|
2267
|
+
"kind": 32768,
|
|
2268
|
+
"flags": {},
|
|
2269
|
+
"type": {
|
|
2270
|
+
"type": "reference",
|
|
2271
|
+
"target": 72,
|
|
2272
|
+
"name": "RealtimeError",
|
|
2273
|
+
"package": "@wix/realtime-common"
|
|
2274
|
+
}
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
"id": 60,
|
|
2278
|
+
"name": "subscriptionId",
|
|
2279
|
+
"variant": "param",
|
|
2280
|
+
"kind": 32768,
|
|
2281
|
+
"flags": {},
|
|
2282
|
+
"type": {
|
|
2283
|
+
"type": "intrinsic",
|
|
2284
|
+
"name": "string"
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
],
|
|
2288
|
+
"type": {
|
|
2289
|
+
"type": "intrinsic",
|
|
2290
|
+
"name": "void"
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
]
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
"id": 61,
|
|
2299
|
+
"name": "SubscriptionHandler",
|
|
2300
|
+
"variant": "declaration",
|
|
2301
|
+
"kind": 4194304,
|
|
2302
|
+
"flags": {},
|
|
2303
|
+
"type": {
|
|
2304
|
+
"type": "reflection",
|
|
2305
|
+
"declaration": {
|
|
2306
|
+
"id": 62,
|
|
2307
|
+
"name": "__type",
|
|
2308
|
+
"variant": "declaration",
|
|
2309
|
+
"kind": 65536,
|
|
2310
|
+
"flags": {},
|
|
2311
|
+
"signatures": [
|
|
2312
|
+
{
|
|
2313
|
+
"id": 63,
|
|
2314
|
+
"name": "__type",
|
|
2315
|
+
"variant": "signature",
|
|
2316
|
+
"kind": 4096,
|
|
2317
|
+
"flags": {},
|
|
2318
|
+
"comment": {
|
|
2319
|
+
"summary": [
|
|
2320
|
+
{
|
|
2321
|
+
"kind": "text",
|
|
2322
|
+
"text": "Handles a successful subscription or re-subscription event."
|
|
2323
|
+
}
|
|
2324
|
+
]
|
|
2325
|
+
},
|
|
2326
|
+
"parameters": [
|
|
2327
|
+
{
|
|
2328
|
+
"id": 64,
|
|
2329
|
+
"name": "subscriptionId",
|
|
2330
|
+
"variant": "param",
|
|
2331
|
+
"kind": 32768,
|
|
2332
|
+
"flags": {},
|
|
2333
|
+
"type": {
|
|
2334
|
+
"type": "intrinsic",
|
|
2335
|
+
"name": "string"
|
|
2336
|
+
}
|
|
2337
|
+
},
|
|
2338
|
+
{
|
|
2339
|
+
"id": 65,
|
|
2340
|
+
"name": "isSynced",
|
|
2341
|
+
"variant": "param",
|
|
2342
|
+
"kind": 32768,
|
|
2343
|
+
"flags": {},
|
|
2344
|
+
"type": {
|
|
2345
|
+
"type": "intrinsic",
|
|
2346
|
+
"name": "boolean"
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
],
|
|
2350
|
+
"type": {
|
|
2351
|
+
"type": "intrinsic",
|
|
2352
|
+
"name": "void"
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
]
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
}
|
|
2359
|
+
],
|
|
2360
|
+
"groups": [
|
|
2361
|
+
{
|
|
2362
|
+
"title": "Namespaces",
|
|
2363
|
+
"children": [
|
|
2364
|
+
23,
|
|
2365
|
+
1,
|
|
2366
|
+
30
|
|
2367
|
+
]
|
|
2368
|
+
},
|
|
2369
|
+
{
|
|
2370
|
+
"title": "Enumerations",
|
|
2371
|
+
"children": [
|
|
2372
|
+
86
|
|
2373
|
+
]
|
|
2374
|
+
},
|
|
2375
|
+
{
|
|
2376
|
+
"title": "Classes",
|
|
2377
|
+
"children": [
|
|
2378
|
+
72
|
|
2379
|
+
]
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
"title": "Interfaces",
|
|
2383
|
+
"children": [
|
|
2384
|
+
43,
|
|
2385
|
+
46,
|
|
2386
|
+
54,
|
|
2387
|
+
66,
|
|
2388
|
+
69
|
|
2389
|
+
]
|
|
2390
|
+
},
|
|
2391
|
+
{
|
|
2392
|
+
"title": "Type Aliases",
|
|
2393
|
+
"children": [
|
|
2394
|
+
49,
|
|
2395
|
+
56,
|
|
2396
|
+
61
|
|
1127
2397
|
]
|
|
1128
2398
|
}
|
|
1129
2399
|
],
|