Files
supabase/web/spec/realtime.json
2021-08-20 00:13:12 +08:00

8030 lines
165 KiB
JSON

{
"id": 0,
"name": "@supabase/realtime-js",
"kind": 0,
"flags": {},
"originalName": "",
"children": [
{
"id": 196,
"name": "\"RealtimeClient\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/RealtimeClient.ts",
"children": [
{
"id": 197,
"name": "RealtimeClient",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 228,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Socket"
},
"signatures": [
{
"id": 229,
"name": "new RealtimeClient",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Socket"
},
"parameters": [
{
"id": 230,
"name": "endPoint",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The string WebSocket endpoint, ie, \"ws://example.com/socket\", \"wss://example.com\", \"/socket\" (inherited host & protocol)"
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 231,
"name": "options",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "reference",
"id": 303,
"name": "Options"
}
}
],
"type": {
"type": "reference",
"id": 197,
"name": "RealtimeClient"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 65,
"character": 3
}
]
},
{
"id": 198,
"name": "channels",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 36,
"character": 10
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 93,
"name": "RealtimeSubscription"
}
},
"defaultValue": "[]"
},
{
"id": 220,
"name": "conn",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 52,
"character": 6
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"name": "WebSocket"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 218,
"name": "decode",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 50,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 217,
"name": "encode",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 49,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 199,
"name": "endPoint",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 37,
"character": 10
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "\"\""
},
{
"id": 200,
"name": "headers",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 38,
"character": 9
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "reflection",
"declaration": {
"id": 201,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 202,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 203,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
}
},
{
"id": 210,
"name": "heartbeatIntervalMs",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 42,
"character": 21
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "30000"
},
{
"id": 212,
"name": "heartbeatTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 44,
"character": 16
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"typeArguments": [
{
"type": "query",
"queryType": {
"type": "reference",
"name": "setInterval"
}
}
],
"name": "ReturnType"
},
{
"type": "intrinsic",
"name": "undefined"
}
]
},
"defaultValue": "undefined"
},
{
"id": 216,
"name": "logger",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 48,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
},
"defaultValue": "noop"
},
{
"id": 211,
"name": "longpollerTimeout",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 43,
"character": 19
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "20000"
},
{
"id": 204,
"name": "params",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 39,
"character": 8
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "reflection",
"declaration": {
"id": 205,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 206,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 207,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
}
},
{
"id": 213,
"name": "pendingHeartbeatRef",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 45,
"character": 21
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 219,
"name": "reconnectAfterMs",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 51,
"character": 18
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 215,
"name": "reconnectTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 47,
"character": 16
}
],
"type": {
"type": "reference",
"id": 25,
"name": "Timer"
}
},
{
"id": 214,
"name": "ref",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 46,
"character": 5
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "0"
},
{
"id": 221,
"name": "sendBuffer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 53,
"character": 12
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"name": "Function"
}
},
"defaultValue": "[]"
},
{
"id": 222,
"name": "serializer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 54,
"character": 12
}
],
"type": {
"type": "reference",
"id": 172,
"name": "Serializer"
},
"defaultValue": "new Serializer()"
},
{
"id": 208,
"name": "timeout",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 40,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "DEFAULT_TIMEOUT"
},
{
"id": 209,
"name": "transport",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 41,
"character": 11
}
],
"type": {
"type": "intrinsic",
"name": "any"
},
"defaultValue": "WebSocket"
},
{
"id": 290,
"name": "_appendParams",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 291,
"name": "_appendParams",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 292,
"name": "url",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 293,
"name": "params",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 294,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 295,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 296,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 347,
"character": 44
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 347,
"character": 23
}
]
},
{
"id": 297,
"name": "_flushSendBuffer",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 298,
"name": "_flushSendBuffer",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 357,
"character": 26
}
]
},
{
"id": 282,
"name": "_onConnClose",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 283,
"name": "_onConnClose",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 284,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 327,
"character": 22
}
]
},
{
"id": 285,
"name": "_onConnError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 286,
"name": "_onConnError",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 287,
"name": "error",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Error"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 335,
"character": 22
}
]
},
{
"id": 280,
"name": "_onConnOpen",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 281,
"name": "_onConnOpen",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 319,
"character": 21
}
]
},
{
"id": 299,
"name": "_resetHeartbeat",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 300,
"name": "_resetHeartbeat",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 364,
"character": 25
}
]
},
{
"id": 301,
"name": "_sendHeartbeat",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 302,
"name": "_sendHeartbeat",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 373,
"character": 24
}
]
},
{
"id": 288,
"name": "_triggerChanError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 289,
"name": "_triggerChanError",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 341,
"character": 27
}
]
},
{
"id": 265,
"name": "channel",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 266,
"name": "channel",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 267,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 268,
"name": "chanParams",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 269,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
}
}
},
"defaultValue": "{}"
}
],
"type": {
"type": "reference",
"id": 93,
"name": "RealtimeSubscription"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 249,
"character": 9
}
]
},
{
"id": 232,
"name": "connect",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 233,
"name": "connect",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Connects the socket."
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 117,
"character": 9
}
]
},
{
"id": 258,
"name": "connectionState",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 259,
"name": "connectionState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Returns the current state of the socket."
},
"type": {
"type": "union",
"types": [
{
"type": "stringLiteral",
"value": "connecting"
},
{
"type": "stringLiteral",
"value": "open"
},
{
"type": "stringLiteral",
"value": "closing"
},
{
"type": "stringLiteral",
"value": "closed"
}
]
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 218,
"character": 17
}
]
},
{
"id": 234,
"name": "disconnect",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 235,
"name": "disconnect",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Disconnects the socket."
},
"parameters": [
{
"id": 236,
"name": "code",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"comment": {
"text": "A numeric status code to send on disconnect."
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
},
{
"id": 237,
"name": "reason",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"comment": {
"text": "A custom reason for the disconnect.\n"
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
}
],
"type": {
"type": "reference",
"typeArguments": [
{
"type": "reflection",
"declaration": {
"id": 238,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 240,
"name": "data",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 142,
"character": 40
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
}
},
{
"id": 239,
"name": "error",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 142,
"character": 20
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"name": "Error"
},
{
"type": "intrinsic",
"name": "null"
}
]
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
240,
239
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 142,
"character": 13
}
]
}
}
],
"name": "Promise"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 139,
"character": 12
}
]
},
{
"id": 276,
"name": "endPointURL",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 277,
"name": "endPointURL",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Returns the URL of the websocket."
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 298,
"character": 13
}
]
},
{
"id": 260,
"name": "isConnected",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 261,
"name": "isConnected",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Retuns `true` is the connection is open."
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 234,
"character": 13
}
]
},
{
"id": 241,
"name": "log",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 242,
"name": "log",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Logs the message. Override `this.logger` for specialized logging."
},
"parameters": [
{
"id": 243,
"name": "kind",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 244,
"name": "msg",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 245,
"name": "data",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 167,
"character": 5
}
]
},
{
"id": 278,
"name": "makeRef",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 279,
"name": "makeRef",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Return the next message ref, accounting for overflows"
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 308,
"character": 9
}
]
},
{
"id": 249,
"name": "onClose",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 250,
"name": "onClose",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Registers a callbacks for connection state change events.",
"tags": [
{
"tag": "example",
"text": "\n socket.onOpen(() => console.log(\"Socket closed.\"))\n"
}
]
},
"parameters": [
{
"id": 251,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "A function to be called when the event occurs.\n"
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 189,
"character": 9
}
]
},
{
"id": 273,
"name": "onConnMessage",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 274,
"name": "onConnMessage",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 275,
"name": "rawMessage",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 270,
"character": 15
}
]
},
{
"id": 252,
"name": "onError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 253,
"name": "onError",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Registers a callback for connection state change events.",
"tags": [
{
"tag": "example",
"text": "\n socket.onOpen((error) => console.log(\"An error occurred\"))\n"
}
]
},
"parameters": [
{
"id": 254,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "A function to be called when the event occurs.\n"
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 200,
"character": 9
}
]
},
{
"id": 255,
"name": "onMessage",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 256,
"name": "onMessage",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Calls a function any time a message is received.",
"tags": [
{
"tag": "example",
"text": "\n socket.onMessage((message) => console.log(message))\n"
}
]
},
"parameters": [
{
"id": 257,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "A function to be called when the event occurs.\n"
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 211,
"character": 11
}
]
},
{
"id": 246,
"name": "onOpen",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 247,
"name": "onOpen",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Registers a callback for connection state change event.",
"tags": [
{
"tag": "example",
"text": "\n socket.onOpen(() => console.log(\"Socket opened.\"))\n"
}
]
},
"parameters": [
{
"id": 248,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "A function to be called when the event occurs.\n"
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 178,
"character": 8
}
]
},
{
"id": 270,
"name": "push",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 271,
"name": "push",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 272,
"name": "data",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 321,
"name": "Message"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 255,
"character": 6
}
]
},
{
"id": 262,
"name": "remove",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 263,
"name": "remove",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Removes a subscription from the socket."
},
"parameters": [
{
"id": 264,
"name": "channel",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "An open subscription.\n"
},
"type": {
"type": "reference",
"id": 93,
"name": "RealtimeSubscription"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 243,
"character": 8
}
]
},
{
"id": 223,
"name": "stateChangeCallbacks",
"kind": 2097152,
"kindString": "Object literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 225,
"name": "close",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 62,
"character": 9
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "never"
}
},
"defaultValue": "[]"
},
{
"id": 226,
"name": "error",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 63,
"character": 9
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "never"
}
},
"defaultValue": "[]"
},
{
"id": 227,
"name": "message",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 64,
"character": 11
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "never"
}
},
"defaultValue": "[]"
},
{
"id": 224,
"name": "open",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 61,
"character": 8
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "never"
}
},
"defaultValue": "[]"
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
225,
226,
227,
224
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 55,
"character": 22
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
228
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
198,
220,
218,
217,
199,
200,
210,
212,
216,
211,
204,
213,
219,
215,
214,
221,
222,
208,
209
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
290,
297,
282,
285,
280,
299,
301,
288,
265,
232,
258,
234,
276,
260,
241,
278,
249,
273,
252,
255,
246,
270,
262
]
},
{
"title": "Object literals",
"kind": 2097152,
"children": [
223
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 35,
"character": 35
}
]
},
{
"id": 321,
"name": "Message",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 26,
"character": 12
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 322,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"children": [
{
"id": 324,
"name": "event",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 28,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 325,
"name": "payload",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 29,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 326,
"name": "ref",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 30,
"character": 5
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 323,
"name": "topic",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 27,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
324,
325,
326,
323
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 26,
"character": 14
}
]
}
}
},
{
"id": 303,
"name": "Options",
"kind": 4194304,
"kindString": "Type alias",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 14,
"character": 19
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 304,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 311,
"name": "decode",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 21,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 310,
"name": "encode",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 20,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 313,
"name": "headers",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 23,
"character": 9
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "reflection",
"declaration": {
"id": 314,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 315,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 316,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
}
},
{
"id": 307,
"name": "heartbeatIntervalMs",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 17,
"character": 21
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
},
{
"id": 309,
"name": "logger",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 19,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 308,
"name": "longpollerTimeout",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 18,
"character": 19
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
},
{
"id": 317,
"name": "params",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 24,
"character": 8
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "reflection",
"declaration": {
"id": 318,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 319,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 320,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
}
},
{
"id": 312,
"name": "reconnectAfterMs",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 22,
"character": 18
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 306,
"name": "timeout",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 16,
"character": 9
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
},
{
"id": 305,
"name": "transport",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 15,
"character": 11
}
],
"type": {
"type": "reference",
"name": "WebSocket"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
311,
310,
313,
307,
309,
308,
317,
312,
306,
305
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 14,
"character": 21
}
]
}
}
},
{
"id": 327,
"name": "noop",
"kind": 64,
"kindString": "Function",
"flags": {
"isConst": true
},
"signatures": [
{
"id": 328,
"name": "noop",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 33,
"character": 10
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
197
]
},
{
"title": "Type aliases",
"kind": 4194304,
"children": [
321,
303
]
},
{
"title": "Functions",
"kind": 64,
"children": [
327
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 92,
"name": "\"RealtimeSubscription\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/RealtimeSubscription.ts",
"children": [
{
"id": 93,
"name": "RealtimeSubscription",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 101,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 105,
"name": "new RealtimeSubscription",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 106,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 107,
"name": "params",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
},
"defaultValue": "{}"
},
{
"id": 108,
"name": "socket",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 197,
"name": "RealtimeClient"
}
}
],
"type": {
"type": "reference",
"id": 93,
"name": "RealtimeSubscription"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 13,
"character": 25
}
]
},
{
"id": 94,
"name": "bindings",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 7,
"character": 10
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "any"
}
},
"defaultValue": "[]"
},
{
"id": 98,
"name": "joinPush",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 11,
"character": 10
}
],
"type": {
"type": "reference",
"id": 39,
"name": "Push"
}
},
{
"id": 97,
"name": "joinedOnce",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 10,
"character": 12
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
},
"defaultValue": "false"
},
{
"id": 103,
"name": "params",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 17,
"character": 17
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 100,
"name": "pushBuffer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 13,
"character": 12
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 39,
"name": "Push"
}
},
"defaultValue": "[]"
},
{
"id": 99,
"name": "rejoinTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 12,
"character": 13
}
],
"type": {
"type": "reference",
"id": 25,
"name": "Timer"
}
},
{
"id": 104,
"name": "socket",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 18,
"character": 17
}
],
"type": {
"type": "reference",
"id": 197,
"name": "RealtimeClient"
}
},
{
"id": 96,
"name": "state",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 9,
"character": 7
}
],
"type": {
"type": "reference",
"id": 7,
"name": "CHANNEL_STATES"
},
"defaultValue": "CHANNEL_STATES.closed"
},
{
"id": 95,
"name": "timeout",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 8,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "number"
}
},
{
"id": 102,
"name": "topic",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 16,
"character": 16
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 127,
"name": "canPush",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 128,
"name": "canPush",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 97,
"character": 9
}
]
},
{
"id": 161,
"name": "isClosed",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 162,
"name": "isClosed",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 201,
"character": 10
}
]
},
{
"id": 163,
"name": "isErrored",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 164,
"name": "isErrored",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 204,
"character": 11
}
]
},
{
"id": 165,
"name": "isJoined",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 166,
"name": "isJoined",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 207,
"character": 10
}
]
},
{
"id": 167,
"name": "isJoining",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 168,
"name": "isJoining",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 210,
"character": 11
}
]
},
{
"id": 169,
"name": "isLeaving",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 170,
"name": "isLeaving",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 213,
"character": 11
}
]
},
{
"id": 142,
"name": "isMember",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 143,
"name": "isMember",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 144,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 154,
"character": 10
}
]
},
{
"id": 145,
"name": "joinRef",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 146,
"name": "joinRef",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 158,
"character": 9
}
]
},
{
"id": 124,
"name": "off",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 125,
"name": "off",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 126,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 93,
"character": 5
}
]
},
{
"id": 120,
"name": "on",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 121,
"name": "on",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 122,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 123,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 89,
"character": 4
}
]
},
{
"id": 114,
"name": "onClose",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 115,
"name": "onClose",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 116,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 81,
"character": 9
}
]
},
{
"id": 117,
"name": "onError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 118,
"name": "onError",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 119,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 85,
"character": 9
}
]
},
{
"id": 137,
"name": "onMessage",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 138,
"name": "onMessage",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Overridable message hook",
"text": "Receives all events for specialized message handling before dispatching to the channel callbacks.\nMust return the payload, modified or unmodified.\n"
},
"parameters": [
{
"id": 139,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 140,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 141,
"name": "ref",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 150,
"character": 11
}
]
},
{
"id": 129,
"name": "push",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 130,
"name": "push",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 131,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 13,
"name": "CHANNEL_EVENTS"
}
},
{
"id": 132,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 133,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "reference",
"id": 39,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 101,
"character": 6
}
]
},
{
"id": 150,
"name": "rejoin",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 151,
"name": "rejoin",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 152,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 167,
"character": 8
}
]
},
{
"id": 109,
"name": "rejoinUntilConnected",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 110,
"name": "rejoinUntilConnected",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 64,
"character": 22
}
]
},
{
"id": 158,
"name": "replyEventName",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 159,
"name": "replyEventName",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 160,
"name": "ref",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 197,
"character": 16
}
]
},
{
"id": 147,
"name": "sendJoin",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 148,
"name": "sendJoin",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 149,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 162,
"character": 10
}
]
},
{
"id": 111,
"name": "subscribe",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 112,
"name": "subscribe",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 113,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "reference",
"id": 39,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 71,
"character": 11
}
]
},
{
"id": 153,
"name": "trigger",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 154,
"name": "trigger",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 155,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 156,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 157,
"name": "ref",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 174,
"character": 9
}
]
},
{
"id": 134,
"name": "unsubscribe",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 135,
"name": "unsubscribe",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Leaves the channel",
"text": "Unsubscribes from server events, and instructs channel to terminate on server.\nTriggers onClose() hooks.\n\nTo receive leave acknowledgements, use the a `receive` hook to bind to the server ack, ie:\nchannel.unsubscribe().receive(\"ok\", () => alert(\"left!\") )\n"
},
"parameters": [
{
"id": 136,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "reference",
"id": 39,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 125,
"character": 13
}
]
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
101
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
94,
98,
97,
103,
100,
99,
104,
96,
95,
102
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
127,
161,
163,
165,
167,
169,
142,
145,
124,
120,
114,
117,
137,
129,
150,
109,
158,
147,
111,
153,
134
]
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 6,
"character": 41
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
93
]
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 415,
"name": "\"index\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/index.ts",
"sources": [
{
"fileName": "index.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 1,
"name": "\"lib/constants\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/constants.ts",
"children": [
{
"id": 13,
"name": "CHANNEL_EVENTS",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"children": [
{
"id": 14,
"name": "close",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 23,
"character": 7
}
],
"defaultValue": "\"phx_close\""
},
{
"id": 15,
"name": "error",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 24,
"character": 7
}
],
"defaultValue": "\"phx_error\""
},
{
"id": 16,
"name": "join",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 25,
"character": 6
}
],
"defaultValue": "\"phx_join\""
},
{
"id": 18,
"name": "leave",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 27,
"character": 7
}
],
"defaultValue": "\"phx_leave\""
},
{
"id": 17,
"name": "reply",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 26,
"character": 7
}
],
"defaultValue": "\"phx_reply\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
14,
15,
16,
18,
17
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 22,
"character": 26
}
]
},
{
"id": 7,
"name": "CHANNEL_STATES",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"children": [
{
"id": 8,
"name": "closed",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 15,
"character": 8
}
],
"defaultValue": "\"closed\""
},
{
"id": 9,
"name": "errored",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 16,
"character": 9
}
],
"defaultValue": "\"errored\""
},
{
"id": 10,
"name": "joined",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 17,
"character": 8
}
],
"defaultValue": "\"joined\""
},
{
"id": 11,
"name": "joining",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 18,
"character": 9
}
],
"defaultValue": "\"joining\""
},
{
"id": 12,
"name": "leaving",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 19,
"character": 9
}
],
"defaultValue": "\"leaving\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
8,
9,
10,
11,
12
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 14,
"character": 26
}
]
},
{
"id": 2,
"name": "SOCKET_STATES",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"children": [
{
"id": 6,
"name": "closed",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 11,
"character": 8
}
],
"defaultValue": "3"
},
{
"id": 5,
"name": "closing",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 10,
"character": 9
}
],
"defaultValue": "2"
},
{
"id": 3,
"name": "connecting",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 8,
"character": 12
}
],
"defaultValue": "0"
},
{
"id": 4,
"name": "open",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 9,
"character": 6
}
],
"defaultValue": "1"
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
6,
5,
3,
4
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 7,
"character": 25
}
]
},
{
"id": 19,
"name": "TRANSPORTS",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"children": [
{
"id": 20,
"name": "websocket",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 31,
"character": 11
}
],
"defaultValue": "\"websocket\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
20
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 30,
"character": 22
}
]
},
{
"id": 22,
"name": "DEFAULT_TIMEOUT",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isConst": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 3,
"character": 28
}
],
"type": {
"type": "unknown",
"name": "10000"
},
"defaultValue": "10000"
},
{
"id": 21,
"name": "VSN",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isConst": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 1,
"character": 16
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "\"1.0.0\""
},
{
"id": 23,
"name": "WS_CLOSE_NORMAL",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isConst": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 5,
"character": 28
}
],
"type": {
"type": "unknown",
"name": "1000"
},
"defaultValue": "1000"
}
],
"groups": [
{
"title": "Enumerations",
"kind": 4,
"children": [
13,
7,
2,
19
]
},
{
"title": "Variables",
"kind": 32,
"children": [
22,
21,
23
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 38,
"name": "\"lib/push\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/push.ts",
"children": [
{
"id": 39,
"name": "Push",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 52,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Push"
},
"signatures": [
{
"id": 57,
"name": "new Push",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Push"
},
"parameters": [
{
"id": 58,
"name": "channel",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The Channel"
},
"type": {
"type": "reference",
"id": 93,
"name": "RealtimeSubscription"
}
},
{
"id": 59,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The event, for example `\"phx_join\"`"
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 60,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The payload, for example `{user_id: 123}`"
},
"type": {
"type": "intrinsic",
"name": "any"
},
"defaultValue": "{}"
},
{
"id": 61,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The push timeout in milliseconds\n"
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "DEFAULT_TIMEOUT"
}
],
"type": {
"type": "reference",
"id": 39,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 16,
"character": 32
}
]
},
{
"id": 53,
"name": "channel",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"comment": {
"shortText": "The Channel"
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 27,
"character": 18
}
],
"type": {
"type": "reference",
"id": 93,
"name": "RealtimeSubscription"
}
},
{
"id": 54,
"name": "event",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"comment": {
"shortText": "The event, for example `\"phx_join\"`"
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 28,
"character": 16
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 55,
"name": "payload",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"comment": {
"shortText": "The payload, for example `{user_id: 123}`"
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 29,
"character": 18
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 47,
"name": "recHooks",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 12,
"character": 10
}
],
"type": {
"type": "array",
"elementType": {
"type": "reflection",
"declaration": {
"id": 48,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 50,
"name": "callback",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 14,
"character": 12
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 49,
"name": "status",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 13,
"character": 10
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
50,
49
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 12,
"character": 11
}
]
}
}
},
"defaultValue": "[]"
},
{
"id": 43,
"name": "receivedResp",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 8,
"character": 14
}
],
"type": {
"type": "union",
"types": [
{
"type": "reflection",
"declaration": {
"id": 44,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 46,
"name": "response",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 10,
"character": 12
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 45,
"name": "status",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 9,
"character": 10
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
46,
45
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 8,
"character": 15
}
]
}
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 42,
"name": "ref",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 7,
"character": 5
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "\"\""
},
{
"id": 51,
"name": "refEvent",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 16,
"character": 10
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 40,
"name": "sent",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 5,
"character": 6
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
},
"defaultValue": "false"
},
{
"id": 56,
"name": "timeout",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"comment": {
"shortText": "The push timeout in milliseconds\n"
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 30,
"character": 18
}
],
"type": {
"type": "intrinsic",
"name": "number"
}
},
{
"id": 41,
"name": "timeoutTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 6,
"character": 14
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "number"
},
{
"type": "intrinsic",
"name": "undefined"
}
]
},
"defaultValue": "undefined"
},
{
"id": 79,
"name": "_cancelRefEvent",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 80,
"name": "_cancelRefEvent",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 94,
"character": 25
}
]
},
{
"id": 81,
"name": "_cancelTimeout",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 82,
"name": "_cancelTimeout",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 101,
"character": 24
}
]
},
{
"id": 89,
"name": "_hasReceived",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 90,
"name": "_hasReceived",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 91,
"name": "status",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "null"
},
{
"type": "intrinsic",
"name": "false"
},
{
"type": "intrinsic",
"name": "true"
}
]
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 118,
"character": 22
}
]
},
{
"id": 83,
"name": "_matchReceive",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 84,
"name": "_matchReceive",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 85,
"name": "__namedParameters",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"originalName": "__0",
"type": {
"type": "reflection",
"declaration": {
"id": 86,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 88,
"name": "response",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 108,
"character": 12
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 87,
"name": "status",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 107,
"character": 10
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
88,
87
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 106,
"character": 24
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 106,
"character": 23
}
]
},
{
"id": 77,
"name": "destroy",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 78,
"name": "destroy",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 89,
"character": 9
}
]
},
{
"id": 67,
"name": "receive",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 68,
"name": "receive",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 69,
"name": "status",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 70,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "unknown",
"name": "this"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 57,
"character": 9
}
]
},
{
"id": 62,
"name": "resend",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 63,
"name": "resend",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 64,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 33,
"character": 8
}
]
},
{
"id": 65,
"name": "send",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 66,
"name": "send",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 43,
"character": 6
}
]
},
{
"id": 71,
"name": "startTimeout",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 72,
"name": "startTimeout",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 66,
"character": 14
}
]
},
{
"id": 73,
"name": "trigger",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 74,
"name": "trigger",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 75,
"name": "status",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 76,
"name": "response",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 85,
"character": 9
}
]
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
52
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
53,
54,
55,
47,
43,
42,
51,
40,
56,
41
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
79,
81,
89,
83,
77,
67,
62,
65,
71,
73
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 4,
"character": 25
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
39
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 171,
"name": "\"lib/serializer\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/serializer.ts",
"children": [
{
"id": 172,
"name": "Serializer",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 173,
"name": "HEADER_LENGTH",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 5,
"character": 15
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "1"
},
{
"id": 178,
"name": "_binaryDecode",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 179,
"name": "_binaryDecode",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 180,
"name": "buffer",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "ArrayBuffer"
}
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 181,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 184,
"name": "event",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 33,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 185,
"name": "payload",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 34,
"character": 11
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
},
{
"id": 182,
"name": "ref",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 31,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "null"
}
},
{
"id": 183,
"name": "topic",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 32,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
184,
185,
182,
183
]
}
]
}
}
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 19,
"character": 23
}
]
},
{
"id": 186,
"name": "_decodeBroadcast",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 187,
"name": "_decodeBroadcast",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 188,
"name": "buffer",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "ArrayBuffer"
}
},
{
"id": 189,
"name": "view",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "DataView"
}
},
{
"id": 190,
"name": "decoder",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "TextDecoder"
}
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 191,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 194,
"name": "event",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 33,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 195,
"name": "payload",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 34,
"character": 11
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
},
{
"id": 192,
"name": "ref",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 31,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "null"
}
},
{
"id": 193,
"name": "topic",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 32,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
194,
195,
192,
193
]
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 30,
"character": 4
}
]
}
}
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 26,
"character": 26
}
]
},
{
"id": 174,
"name": "decode",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 175,
"name": "decode",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 176,
"name": "rawPayload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"name": "ArrayBuffer"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
},
{
"id": 177,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 7,
"character": 8
}
]
}
],
"groups": [
{
"title": "Properties",
"kind": 1024,
"children": [
173
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
178,
186,
174
]
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 4,
"character": 31
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
172
]
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 24,
"name": "\"lib/timer\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/timer.ts",
"children": [
{
"id": 25,
"name": "Timer",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Creates a timer that accepts a `timerCalc` function to perform calculated timeout retries, such as exponential backoff.",
"tags": [
{
"tag": "example",
"text": "\n let reconnectTimer = new Timer(() => this.connect(), function(tries){\n return [1000, 5000, 10000][tries - 1] || 10000\n })\n reconnectTimer.scheduleTimeout() // fires after 1000\n reconnectTimer.scheduleTimeout() // fires after 5000\n reconnectTimer.reset()\n reconnectTimer.scheduleTimeout() // fires after 1000\n"
}
]
},
"children": [
{
"id": 28,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 31,
"name": "new Timer",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 32,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 33,
"name": "timerCalc",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "reference",
"id": 25,
"name": "Timer"
}
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 15,
"character": 19
}
]
},
{
"id": 29,
"name": "callback",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "lib/timer.ts",
"line": 17,
"character": 29
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 26,
"name": "timer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/timer.ts",
"line": 14,
"character": 7
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "number"
},
{
"type": "intrinsic",
"name": "undefined"
}
]
},
"defaultValue": "undefined"
},
{
"id": 30,
"name": "timerCalc",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "lib/timer.ts",
"line": 17,
"character": 57
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 27,
"name": "tries",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/timer.ts",
"line": 15,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "0"
},
{
"id": 34,
"name": "reset",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 35,
"name": "reset",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 22,
"character": 7
}
]
},
{
"id": 36,
"name": "scheduleTimeout",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 37,
"name": "scheduleTimeout",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 28,
"character": 17
}
]
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
28
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
29,
26,
30,
27
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
34,
36
]
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 13,
"character": 26
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
25
]
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 329,
"name": "\"lib/transformers\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/transformers.ts",
"children": [
{
"id": 330,
"name": "PostgresTypes",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Helpers to convert the change Payload into native JS types."
},
"children": [
{
"id": 331,
"name": "abstime",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 9,
"character": 9
}
],
"defaultValue": "\"abstime\""
},
{
"id": 332,
"name": "bool",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 10,
"character": 6
}
],
"defaultValue": "\"bool\""
},
{
"id": 333,
"name": "date",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 11,
"character": 6
}
],
"defaultValue": "\"date\""
},
{
"id": 334,
"name": "daterange",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 12,
"character": 11
}
],
"defaultValue": "\"daterange\""
},
{
"id": 335,
"name": "float4",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 13,
"character": 8
}
],
"defaultValue": "\"float4\""
},
{
"id": 336,
"name": "float8",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 14,
"character": 8
}
],
"defaultValue": "\"float8\""
},
{
"id": 337,
"name": "int2",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 15,
"character": 6
}
],
"defaultValue": "\"int2\""
},
{
"id": 338,
"name": "int4",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 16,
"character": 6
}
],
"defaultValue": "\"int4\""
},
{
"id": 339,
"name": "int4range",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 17,
"character": 11
}
],
"defaultValue": "\"int4range\""
},
{
"id": 340,
"name": "int8",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 18,
"character": 6
}
],
"defaultValue": "\"int8\""
},
{
"id": 341,
"name": "int8range",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 19,
"character": 11
}
],
"defaultValue": "\"int8range\""
},
{
"id": 342,
"name": "json",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 20,
"character": 6
}
],
"defaultValue": "\"json\""
},
{
"id": 343,
"name": "jsonb",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 21,
"character": 7
}
],
"defaultValue": "\"jsonb\""
},
{
"id": 344,
"name": "money",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 22,
"character": 7
}
],
"defaultValue": "\"money\""
},
{
"id": 345,
"name": "numeric",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 23,
"character": 9
}
],
"defaultValue": "\"numeric\""
},
{
"id": 346,
"name": "oid",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 24,
"character": 5
}
],
"defaultValue": "\"oid\""
},
{
"id": 347,
"name": "reltime",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 25,
"character": 9
}
],
"defaultValue": "\"reltime\""
},
{
"id": 348,
"name": "time",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 26,
"character": 6
}
],
"defaultValue": "\"time\""
},
{
"id": 349,
"name": "timestamp",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 27,
"character": 11
}
],
"defaultValue": "\"timestamp\""
},
{
"id": 350,
"name": "timestamptz",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 28,
"character": 13
}
],
"defaultValue": "\"timestamptz\""
},
{
"id": 351,
"name": "timetz",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 29,
"character": 8
}
],
"defaultValue": "\"timetz\""
},
{
"id": 352,
"name": "tsrange",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 30,
"character": 9
}
],
"defaultValue": "\"tsrange\""
},
{
"id": 353,
"name": "tstzrange",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 31,
"character": 11
}
],
"defaultValue": "\"tstzrange\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
331,
332,
333,
334,
335,
336,
337,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
350,
351,
352,
353
]
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 8,
"character": 25
}
]
},
{
"id": 354,
"name": "Column",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 34,
"character": 11
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 355,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"children": [
{
"id": 356,
"name": "flags",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 35,
"character": 7
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "string"
}
}
},
{
"id": 357,
"name": "name",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 36,
"character": 6
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 358,
"name": "type",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 37,
"character": 6
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 359,
"name": "type_modifier",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 38,
"character": 15
}
],
"type": {
"type": "intrinsic",
"name": "number"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
356,
357,
358,
359
]
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 34,
"character": 13
}
]
}
}
},
{
"id": 360,
"name": "Records",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 41,
"character": 12
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 361,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": [
{
"id": 362,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 363,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 41,
"character": 14
}
]
}
}
},
{
"id": 380,
"name": "convertCell",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"comment": {
"shortText": "If the value of the cell is `null`, returns null.\nOtherwise converts the string value to the correct type.",
"tags": [
{
"tag": "example",
"text": "convertCell('bool', 't')\n//=> true"
},
{
"tag": "example",
"text": "convertCell('int8', '10')\n//=> 10"
},
{
"tag": "example",
"text": "convertCell('_int4', '{1,2,3,4}')\n//=> [1,2,3,4]\n"
}
]
},
"signatures": [
{
"id": 381,
"name": "convertCell",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "If the value of the cell is `null`, returns null.\nOtherwise converts the string value to the correct type.",
"tags": [
{
"tag": "example",
"text": "convertCell('bool', 't')\n//=> true"
},
{
"tag": "example",
"text": "convertCell('int8', '10')\n//=> 10"
},
{
"tag": "example",
"text": "convertCell('_int4', '{1,2,3,4}')\n//=> [1,2,3,4]\n"
}
]
},
"parameters": [
{
"id": 382,
"name": "type",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "A postgres column type"
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 383,
"name": "stringValue",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The cell value\n"
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 112,
"character": 24
}
]
},
{
"id": 364,
"name": "convertChangeData",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"comment": {
"shortText": "Takes an array of columns and an object of string values then converts each string value\nto its mapped type.",
"tags": [
{
"tag": "example",
"text": "convertChangeData([{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age:'33'}, {})\n//=>{ first_name: 'Paul', age: 33 }\n"
}
]
},
"signatures": [
{
"id": 365,
"name": "convertChangeData",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Takes an array of columns and an object of string values then converts each string value\nto its mapped type.",
"tags": [
{
"tag": "example",
"text": "convertChangeData([{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age:'33'}, {})\n//=>{ first_name: 'Paul', age: 33 }\n"
}
]
},
"parameters": [
{
"id": 366,
"name": "columns",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 354,
"name": "Column"
}
}
},
{
"id": 367,
"name": "records",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {},
"type": {
"type": "reference",
"id": 360,
"name": "Records"
}
},
{
"id": 368,
"name": "options",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The map of various options that can be applied to the mapper"
},
"type": {
"type": "reflection",
"declaration": {
"id": 369,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 370,
"name": "skipTypes",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 60,
"character": 22
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "string"
}
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
370
]
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 60,
"character": 10
}
]
}
},
"defaultValue": "{}"
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 371,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 372,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 373,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
]
}
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 57,
"character": 30
}
]
},
{
"id": 374,
"name": "convertColumn",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"comment": {
"shortText": "Converts the value of an individual column.",
"returns": "Useless information\n",
"tags": [
{
"tag": "example",
"text": "convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, [])\n//=> 33"
},
{
"tag": "example",
"text": "convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, ['int4'])\n//=> \"33\"\n"
}
]
},
"signatures": [
{
"id": 375,
"name": "convertColumn",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Converts the value of an individual column.",
"returns": "Useless information\n",
"tags": [
{
"tag": "example",
"text": "convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, [])\n//=> 33"
},
{
"tag": "example",
"text": "convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, ['int4'])\n//=> \"33\"\n"
}
]
},
"parameters": [
{
"id": 376,
"name": "columnName",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The column that you want to convert"
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 377,
"name": "columns",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 354,
"name": "Column"
}
}
},
{
"id": 378,
"name": "records",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The map of string values"
},
"type": {
"type": "reference",
"id": 360,
"name": "Records"
}
},
{
"id": 379,
"name": "skipTypes",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "An array of types that should not be converted"
},
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "string"
}
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 85,
"character": 26
}
]
},
{
"id": 384,
"name": "noop",
"kind": 64,
"kindString": "Function",
"flags": {
"isConst": true
},
"signatures": [
{
"id": 385,
"name": "noop",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"parameters": [
{
"id": 386,
"name": "stringValue",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 183,
"character": 10
}
]
},
{
"id": 408,
"name": "toArray",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"comment": {
"shortText": "Converts a Postgres Array into a native JS array",
"tags": [
{
"tag": "example",
"text": "toArray('{1,2,3,4}', 'int4')\n//=> [1,2,3,4]"
},
{
"tag": "example",
"text": "toArray('{}', 'int4')\n//=> []\n"
}
]
},
"signatures": [
{
"id": 409,
"name": "toArray",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Converts a Postgres Array into a native JS array",
"tags": [
{
"tag": "example",
"text": "toArray('{1,2,3,4}', 'int4')\n//=> [1,2,3,4]"
},
{
"tag": "example",
"text": "toArray('{}', 'int4')\n//=> []\n"
}
]
},
"parameters": [
{
"id": 410,
"name": "stringValue",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 411,
"name": "type",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "any"
}
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 225,
"character": 20
}
]
},
{
"id": 387,
"name": "toBoolean",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 388,
"name": "toBoolean",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 389,
"name": "stringValue",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "null"
},
{
"type": "intrinsic",
"name": "false"
},
{
"type": "intrinsic",
"name": "true"
}
]
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 186,
"character": 22
}
]
},
{
"id": 390,
"name": "toDate",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 391,
"name": "toDate",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 392,
"name": "stringValue",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "reference",
"name": "Date"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 196,
"character": 19
}
]
},
{
"id": 393,
"name": "toDateRange",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 394,
"name": "toDateRange",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 395,
"name": "stringValue",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"name": "Date"
}
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 199,
"character": 24
}
]
},
{
"id": 396,
"name": "toFloat",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 397,
"name": "toFloat",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 398,
"name": "stringValue",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "number"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 203,
"character": 20
}
]
},
{
"id": 399,
"name": "toInt",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 400,
"name": "toInt",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 401,
"name": "stringValue",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "number"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 206,
"character": 18
}
]
},
{
"id": 402,
"name": "toIntRange",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 403,
"name": "toIntRange",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 404,
"name": "stringValue",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "number"
}
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 209,
"character": 23
}
]
},
{
"id": 405,
"name": "toJson",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 406,
"name": "toJson",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 407,
"name": "stringValue",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 213,
"character": 19
}
]
},
{
"id": 412,
"name": "toTimestampString",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"comment": {
"shortText": "Fixes timestamp to be ISO-8601. Swaps the space between the date and time for a 'T'\nSee https://github.com/supabase/supabase/issues/18",
"tags": [
{
"tag": "example",
"text": "toTimestampString('2019-09-10 00:00:00')\n//=> '2019-09-10T00:00:00'\n"
}
]
},
"signatures": [
{
"id": 413,
"name": "toTimestampString",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Fixes timestamp to be ISO-8601. Swaps the space between the date and time for a 'T'\nSee https://github.com/supabase/supabase/issues/18",
"tags": [
{
"tag": "example",
"text": "toTimestampString('2019-09-10 00:00:00')\n//=> '2019-09-10T00:00:00'\n"
}
]
},
"parameters": [
{
"id": 414,
"name": "stringValue",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 246,
"character": 30
}
]
}
],
"groups": [
{
"title": "Enumerations",
"kind": 4,
"children": [
330
]
},
{
"title": "Type aliases",
"kind": 4194304,
"children": [
354,
360
]
},
{
"title": "Functions",
"kind": 64,
"children": [
380,
364,
374,
384,
408,
387,
390,
393,
396,
399,
402,
405,
412
]
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 1,
"character": 0
}
]
}
],
"groups": [
{
"title": "Modules",
"kind": 1,
"children": [
196,
92,
415,
1,
38,
171,
24,
329
]
}
]
}