Files
supabase/web/spec/realtime.json
2022-04-11 15:56:16 +02:00

12500 lines
263 KiB
JSON

{
"id": 0,
"name": "@supabase/realtime-js",
"kind": 0,
"flags": {},
"originalName": "",
"children": [
{
"id": 466,
"name": "\"RealtimeChannel\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/RealtimeChannel.ts",
"children": [
{
"id": 467,
"name": "RealtimeChannel",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 476,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 483,
"name": "new RealtimeChannel",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 484,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 485,
"name": "params",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 486,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 487,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 488,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 19,
"character": 18
}
]
}
},
"defaultValue": "{}"
},
{
"id": 489,
"name": "socket",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 74,
"name": "RealtimeClient"
}
}
],
"type": {
"type": "reference",
"id": 467,
"name": "RealtimeChannel"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 15,
"character": 28
}
]
},
{
"id": 468,
"name": "bindings",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 8,
"character": 10
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "any"
}
},
"defaultValue": "[]"
},
{
"id": 472,
"name": "joinPush",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 12,
"character": 10
}
],
"type": {
"type": "reference",
"id": 307,
"name": "Push"
}
},
{
"id": 471,
"name": "joinedOnce",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 11,
"character": 12
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
},
"defaultValue": "false"
},
{
"id": 478,
"name": "params",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 19,
"character": 17
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 479,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 480,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 481,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 19,
"character": 18
}
]
}
}
},
{
"id": 475,
"name": "presence",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 15,
"character": 10
}
],
"type": {
"type": "reference",
"id": 373,
"name": "RealtimePresence"
}
},
{
"id": 474,
"name": "pushBuffer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 14,
"character": 12
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 307,
"name": "Push"
}
},
"defaultValue": "[]"
},
{
"id": 473,
"name": "rejoinTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 13,
"character": 13
}
],
"type": {
"type": "reference",
"id": 35,
"name": "Timer"
}
},
{
"id": 482,
"name": "socket",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 20,
"character": 17
}
],
"type": {
"type": "reference",
"id": 74,
"name": "RealtimeClient"
}
},
{
"id": 470,
"name": "state",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 10,
"character": 7
}
],
"type": {
"type": "reference",
"id": 9,
"name": "CHANNEL_STATES"
},
"defaultValue": "CHANNEL_STATES.closed"
},
{
"id": 469,
"name": "timeout",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 9,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "number"
}
},
{
"id": 477,
"name": "topic",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 18,
"character": 16
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 518,
"name": "canPush",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 519,
"name": "canPush",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Returns `true` if the socket is connected and the channel has been joined."
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 145,
"character": 9
}
]
},
{
"id": 562,
"name": "isClosed",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 563,
"name": "isClosed",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 258,
"character": 10
}
]
},
{
"id": 564,
"name": "isErrored",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 565,
"name": "isErrored",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 261,
"character": 11
}
]
},
{
"id": 566,
"name": "isJoined",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 567,
"name": "isJoined",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 264,
"character": 10
}
]
},
{
"id": 568,
"name": "isJoining",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 569,
"name": "isJoining",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 267,
"character": 11
}
]
},
{
"id": 570,
"name": "isLeaving",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 571,
"name": "isLeaving",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 270,
"character": 11
}
]
},
{
"id": 539,
"name": "isMember",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 540,
"name": "isMember",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 541,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 206,
"character": 10
}
]
},
{
"id": 542,
"name": "joinRef",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 543,
"name": "joinRef",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 210,
"character": 9
}
]
},
{
"id": 490,
"name": "list",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 491,
"name": "list",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "any"
}
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 67,
"character": 6
}
]
},
{
"id": 511,
"name": "off",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 512,
"name": "off",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 513,
"name": "type",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 514,
"name": "eventFilter",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 515,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 516,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 517,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 133,
"character": 32
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 133,
"character": 5
}
]
},
{
"id": 503,
"name": "on",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 504,
"name": "on",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 505,
"name": "type",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 506,
"name": "eventFilter",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "reflection",
"declaration": {
"id": 507,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 508,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 509,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
}
},
{
"id": 510,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 125,
"character": 4
}
]
},
{
"id": 497,
"name": "onClose",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 498,
"name": "onClose",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Registers a callback that will be executed when the channel closes."
},
"parameters": [
{
"id": 499,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 114,
"character": 9
}
]
},
{
"id": 500,
"name": "onError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 501,
"name": "onError",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Registers a callback that will be executed when the channel encounteres an error."
},
"parameters": [
{
"id": 502,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 121,
"character": 9
}
]
},
{
"id": 534,
"name": "onMessage",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 535,
"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": 536,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 537,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 538,
"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": "RealtimeChannel.ts",
"line": 202,
"character": 11
}
]
},
{
"id": 520,
"name": "push",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 521,
"name": "push",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 522,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 15,
"name": "CHANNEL_EVENTS"
}
},
{
"id": 523,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 524,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "reference",
"id": 307,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 149,
"character": 6
}
]
},
{
"id": 544,
"name": "rejoin",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 545,
"name": "rejoin",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 546,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 214,
"character": 8
}
]
},
{
"id": 492,
"name": "rejoinUntilConnected",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 493,
"name": "rejoinUntilConnected",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 71,
"character": 22
}
]
},
{
"id": 559,
"name": "replyEventName",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 560,
"name": "replyEventName",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 561,
"name": "ref",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 254,
"character": 16
}
]
},
{
"id": 552,
"name": "send",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 553,
"name": "send",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 554,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 555,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 557,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 558,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"children": [
{
"id": 556,
"name": "type",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 245,
"character": 22
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
556
]
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 245,
"character": 15
}
]
}
}
}
],
"type": {
"type": "reference",
"typeArguments": [
{
"type": "intrinsic",
"name": "unknown"
}
],
"name": "Promise"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 245,
"character": 6
}
]
},
{
"id": 494,
"name": "subscribe",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 495,
"name": "subscribe",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 496,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "reference",
"id": 307,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 78,
"character": 11
}
]
},
{
"id": 547,
"name": "trigger",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 548,
"name": "trigger",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 549,
"name": "type",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 550,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 551,
"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": "RealtimeChannel.ts",
"line": 223,
"character": 9
}
]
},
{
"id": 531,
"name": "unsubscribe",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 532,
"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": 533,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "reference",
"id": 307,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 177,
"character": 13
}
]
},
{
"id": 525,
"name": "updateJoinPayload",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 526,
"name": "updateJoinPayload",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 527,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 528,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 529,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 530,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 164,
"character": 28
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 164,
"character": 19
}
]
},
{
"id": 572,
"name": "isEqual",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 573,
"name": "isEqual",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 574,
"name": "obj1",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 575,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 576,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 577,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 275,
"character": 9
}
]
}
}
},
{
"id": 578,
"name": "obj2",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 579,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 580,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 581,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 276,
"character": 9
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 274,
"character": 24
}
]
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
476
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
468,
472,
471,
478,
475,
474,
473,
482,
470,
469,
477
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
518,
562,
564,
566,
568,
570,
539,
542,
490,
511,
503,
497,
500,
534,
520,
544,
492,
559,
552,
494,
547,
531,
525,
572
]
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 7,
"character": 36
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
467
]
}
],
"sources": [
{
"fileName": "RealtimeChannel.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 73,
"name": "\"RealtimeClient\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/RealtimeClient.ts",
"children": [
{
"id": 74,
"name": "RealtimeClient",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 106,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Socket."
},
"signatures": [
{
"id": 107,
"name": "new RealtimeClient",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Socket."
},
"parameters": [
{
"id": 108,
"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": 109,
"name": "options",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "reference",
"id": 186,
"name": "Options"
}
}
],
"type": {
"type": "reference",
"id": 74,
"name": "RealtimeClient"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 75,
"character": 3
}
]
},
{
"id": 75,
"name": "accessToken",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 45,
"character": 13
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 76,
"name": "channels",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 46,
"character": 10
}
],
"type": {
"type": "array",
"elementType": {
"type": "union",
"types": [
{
"type": "reference",
"id": 219,
"name": "RealtimeSubscription"
},
{
"type": "reference",
"id": 467,
"name": "RealtimeChannel"
}
]
}
},
"defaultValue": "[]"
},
{
"id": 98,
"name": "conn",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 62,
"character": 6
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"name": "WebSocket"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 96,
"name": "decode",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 60,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 95,
"name": "encode",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 59,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 77,
"name": "endPoint",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 47,
"character": 10
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "\"\""
},
{
"id": 78,
"name": "headers",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 48,
"character": 9
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "reflection",
"declaration": {
"id": 79,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 80,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 81,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
},
"defaultValue": "DEFAULT_HEADERS"
},
{
"id": 88,
"name": "heartbeatIntervalMs",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 52,
"character": 21
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "30000"
},
{
"id": 90,
"name": "heartbeatTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 54,
"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": 94,
"name": "logger",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 58,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
},
"defaultValue": "noop"
},
{
"id": 89,
"name": "longpollerTimeout",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 53,
"character": 19
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "20000"
},
{
"id": 82,
"name": "params",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 49,
"character": 8
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "reflection",
"declaration": {
"id": 83,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 84,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 85,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
}
},
{
"id": 91,
"name": "pendingHeartbeatRef",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 55,
"character": 21
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 97,
"name": "reconnectAfterMs",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 61,
"character": 18
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 93,
"name": "reconnectTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 57,
"character": 16
}
],
"type": {
"type": "reference",
"id": 35,
"name": "Timer"
}
},
{
"id": 92,
"name": "ref",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 56,
"character": 5
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "0"
},
{
"id": 99,
"name": "sendBuffer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 63,
"character": 12
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"name": "Function"
}
},
"defaultValue": "[]"
},
{
"id": 100,
"name": "serializer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 64,
"character": 12
}
],
"type": {
"type": "reference",
"id": 49,
"name": "Serializer"
},
"defaultValue": "new Serializer()"
},
{
"id": 86,
"name": "timeout",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 50,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "DEFAULT_TIMEOUT"
},
{
"id": 87,
"name": "transport",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 51,
"character": 11
}
],
"type": {
"type": "intrinsic",
"name": "any"
},
"defaultValue": "w3cwebsocket"
},
{
"id": 175,
"name": "_appendParams",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 176,
"name": "_appendParams",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 177,
"name": "url",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 178,
"name": "params",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 179,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 180,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 181,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 444,
"character": 11
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 442,
"character": 23
}
]
},
{
"id": 182,
"name": "_flushSendBuffer",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 183,
"name": "_flushSendBuffer",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 455,
"character": 26
}
]
},
{
"id": 167,
"name": "_onConnClose",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 168,
"name": "_onConnClose",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 169,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 422,
"character": 22
}
]
},
{
"id": 170,
"name": "_onConnError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 171,
"name": "_onConnError",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 172,
"name": "error",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "ErrorEvent"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 430,
"character": 22
}
]
},
{
"id": 165,
"name": "_onConnOpen",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 166,
"name": "_onConnOpen",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 410,
"character": 21
}
]
},
{
"id": 184,
"name": "_sendHeartbeat",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 185,
"name": "_sendHeartbeat",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 462,
"character": 24
}
]
},
{
"id": 173,
"name": "_triggerChanError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 174,
"name": "_triggerChanError",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 436,
"character": 27
}
]
},
{
"id": 143,
"name": "channel",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 144,
"name": "channel",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 145,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 146,
"name": "chanParams",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 210,
"name": "ChannelParams"
},
"defaultValue": "{ isNewVersion: false }"
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 467,
"name": "RealtimeChannel"
},
{
"type": "reference",
"id": 219,
"name": "RealtimeSubscription"
}
]
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 266,
"character": 9
}
]
},
{
"id": 110,
"name": "connect",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 111,
"name": "connect",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Connects the socket, unless already connected."
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 127,
"character": 9
}
]
},
{
"id": 136,
"name": "connectionState",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 137,
"name": "connectionState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Returns the current state of the socket."
},
"type": {
"type": "reference",
"id": 24,
"name": "CONNECTION_STATE"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 234,
"character": 17
}
]
},
{
"id": 112,
"name": "disconnect",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 113,
"name": "disconnect",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Disconnects the socket."
},
"parameters": [
{
"id": 114,
"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": 115,
"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": 116,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 118,
"name": "data",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 152,
"character": 40
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
}
},
{
"id": 117,
"name": "error",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 152,
"character": 20
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"name": "Error"
},
{
"type": "intrinsic",
"name": "null"
}
]
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
118,
117
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 152,
"character": 13
}
]
}
}
],
"name": "Promise"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 149,
"character": 12
}
]
},
{
"id": 155,
"name": "endPointURL",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 156,
"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": 359,
"character": 13
}
]
},
{
"id": 138,
"name": "isConnected",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 139,
"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": 250,
"character": 13
}
]
},
{
"id": 162,
"name": "leaveOpenTopic",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 163,
"name": "leaveOpenTopic",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Unsubscribe from channels with the specified topic."
},
"parameters": [
{
"id": 164,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 400,
"character": 16
}
]
},
{
"id": 119,
"name": "log",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 120,
"name": "log",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Logs the message.",
"text": "For customized logging, `this.logger` can be overriden.\n"
},
"parameters": [
{
"id": 121,
"name": "kind",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 122,
"name": "msg",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 123,
"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": 179,
"character": 5
}
]
},
{
"id": 157,
"name": "makeRef",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 158,
"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": 369,
"character": 9
}
]
},
{
"id": 127,
"name": "onClose",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 128,
"name": "onClose",
"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(() => console.log(\"Socket closed.\"))\n"
}
]
},
"parameters": [
{
"id": 129,
"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": 203,
"character": 9
}
]
},
{
"id": 150,
"name": "onConnMessage",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 151,
"name": "onConnMessage",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 152,
"name": "rawMessage",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 153,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 154,
"name": "data",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 327,
"character": 34
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
154
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 327,
"character": 27
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 327,
"character": 15
}
]
},
{
"id": 130,
"name": "onError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 131,
"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": 132,
"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": 215,
"character": 9
}
]
},
{
"id": 133,
"name": "onMessage",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 134,
"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": 135,
"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": 227,
"character": 11
}
]
},
{
"id": 124,
"name": "onOpen",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 125,
"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": 126,
"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": 191,
"character": 8
}
]
},
{
"id": 147,
"name": "push",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 148,
"name": "push",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Push out a message if the socket is connected.",
"text": "If the socket is not connected, the message gets enqueued within a local buffer, and sent out when a connection is next established.\n"
},
"parameters": [
{
"id": 149,
"name": "data",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 204,
"name": "Message"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 312,
"character": 6
}
]
},
{
"id": 140,
"name": "remove",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 141,
"name": "remove",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Removes a subscription from the socket."
},
"parameters": [
{
"id": 142,
"name": "channel",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "An open subscription.\n"
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 219,
"name": "RealtimeSubscription"
},
{
"type": "reference",
"id": 467,
"name": "RealtimeChannel"
}
]
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 259,
"character": 8
}
]
},
{
"id": 159,
"name": "setAuth",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 160,
"name": "setAuth",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Sets the JWT access token used for channel subscription authorization and Realtime RLS."
},
"parameters": [
{
"id": 161,
"name": "token",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "A JWT string.\n"
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "null"
}
]
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 385,
"character": 9
}
]
},
{
"id": 101,
"name": "stateChangeCallbacks",
"kind": 2097152,
"kindString": "Object literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 103,
"name": "close",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 72,
"character": 9
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "never"
}
},
"defaultValue": "[]"
},
{
"id": 104,
"name": "error",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 73,
"character": 9
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "never"
}
},
"defaultValue": "[]"
},
{
"id": 105,
"name": "message",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 74,
"character": 11
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "never"
}
},
"defaultValue": "[]"
},
{
"id": 102,
"name": "open",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 71,
"character": 8
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "never"
}
},
"defaultValue": "[]"
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
103,
104,
105,
102
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 65,
"character": 22
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
106
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
75,
76,
98,
96,
95,
77,
78,
88,
90,
94,
89,
82,
91,
97,
93,
92,
99,
100,
86,
87
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
175,
182,
167,
170,
165,
184,
173,
143,
110,
136,
112,
155,
138,
162,
119,
157,
127,
150,
130,
133,
124,
147,
140,
159
]
},
{
"title": "Object literals",
"kind": 2097152,
"children": [
101
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 44,
"character": 35
}
]
},
{
"id": 210,
"name": "ChannelParams",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 36,
"character": 18
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 211,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": [
{
"id": 214,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 215,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"children": [
{
"id": 212,
"name": "isNewVersion",
"kind": 32,
"kindString": "Variable",
"flags": {
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 37,
"character": 14
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "false"
},
{
"type": "intrinsic",
"name": "true"
}
]
}
},
{
"id": 213,
"name": "selfBroadcast",
"kind": 32,
"kindString": "Variable",
"flags": {
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 38,
"character": 15
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "false"
},
{
"type": "intrinsic",
"name": "true"
}
]
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
212,
213
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 36,
"character": 20
}
]
}
}
},
{
"id": 204,
"name": "Message",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 29,
"character": 12
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 205,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"children": [
{
"id": 207,
"name": "event",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 31,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 208,
"name": "payload",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 32,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 209,
"name": "ref",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 33,
"character": 5
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 206,
"name": "topic",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 30,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
207,
208,
209,
206
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 29,
"character": 14
}
]
}
}
},
{
"id": 186,
"name": "Options",
"kind": 4194304,
"kindString": "Type alias",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 17,
"character": 19
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 187,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 194,
"name": "decode",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 24,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 193,
"name": "encode",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 23,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 196,
"name": "headers",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 26,
"character": 9
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "reflection",
"declaration": {
"id": 197,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 198,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 199,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
}
},
{
"id": 190,
"name": "heartbeatIntervalMs",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 20,
"character": 21
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
},
{
"id": 192,
"name": "logger",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 22,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 191,
"name": "longpollerTimeout",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 21,
"character": 19
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
},
{
"id": 200,
"name": "params",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 27,
"character": 8
}
],
"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": 195,
"name": "reconnectAfterMs",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 25,
"character": 18
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 189,
"name": "timeout",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 19,
"character": 9
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
},
{
"id": 188,
"name": "transport",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 18,
"character": 11
}
],
"type": {
"type": "reference",
"name": "WebSocket"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
194,
193,
196,
190,
192,
191,
200,
195,
189,
188
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 17,
"character": 21
}
]
}
}
},
{
"id": 216,
"name": "noop",
"kind": 64,
"kindString": "Function",
"flags": {
"isConst": true
},
"signatures": [
{
"id": 217,
"name": "noop",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 42,
"character": 10
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
74
]
},
{
"title": "Type aliases",
"kind": 4194304,
"children": [
210,
204,
186
]
},
{
"title": "Functions",
"kind": 64,
"children": [
216
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 372,
"name": "\"RealtimePresence\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/RealtimePresence.ts",
"children": [
{
"id": 373,
"name": "RealtimePresence",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 384,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Presence."
},
"signatures": [
{
"id": 386,
"name": "new RealtimePresence",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Presence."
},
"parameters": [
{
"id": 387,
"name": "channel",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The RealtimeSubscription"
},
"type": {
"type": "reference",
"id": 467,
"name": "RealtimeChannel"
}
},
{
"id": 388,
"name": "opts",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"comment": {
"shortText": "The options,\n for example `{events: {state: 'state', diff: 'diff'}}`\n"
},
"type": {
"type": "reference",
"name": "PresenceOpts"
}
}
],
"type": {
"type": "reference",
"id": 373,
"name": "RealtimePresence"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 55,
"character": 3
}
]
},
{
"id": 385,
"name": "channel",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"comment": {
"shortText": "The RealtimeSubscription"
},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 64,
"character": 28
}
],
"type": {
"type": "reference",
"id": 467,
"name": "RealtimeChannel"
}
},
{
"id": 376,
"name": "joinRef",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 46,
"character": 9
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 375,
"name": "pendingDiffs",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 45,
"character": 14
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 456,
"name": "RawPresenceDiff"
}
},
"defaultValue": "[]"
},
{
"id": 374,
"name": "state",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 44,
"character": 7
}
],
"type": {
"type": "reference",
"id": 439,
"name": "PresenceState"
}
},
{
"id": 432,
"name": "inPendingSyncState",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 433,
"name": "inPendingSyncState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 323,
"character": 28
}
]
},
{
"id": 428,
"name": "list",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 429,
"name": "list",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"typeParameter": [
{
"id": 430,
"name": "T",
"kind": 131072,
"kindString": "Type parameter",
"flags": {
"isExported": true
}
}
],
"parameters": [
{
"id": 431,
"name": "by",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "reference",
"id": 460,
"typeArguments": [
{
"type": "typeParameter",
"name": "T",
"default": {
"type": "intrinsic",
"name": "any"
}
}
],
"name": "PresenceChooser"
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "typeParameter",
"name": "T",
"default": {
"type": "intrinsic",
"name": "any"
}
}
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 319,
"character": 6
}
]
},
{
"id": 417,
"name": "onJoin",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 418,
"name": "onJoin",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 419,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "PresenceOnJoinCallback"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 307,
"character": 8
}
]
},
{
"id": 420,
"name": "onLeave",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 421,
"name": "onLeave",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 422,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "PresenceOnLeaveCallback"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 311,
"character": 9
}
]
},
{
"id": 423,
"name": "onSync",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 424,
"name": "onSync",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 425,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 426,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 427,
"name": "__call",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 315,
"character": 18
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 315,
"character": 8
}
]
},
{
"id": 414,
"name": "cloneDeep",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 415,
"name": "cloneDeep",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 416,
"name": "obj",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "object"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 303,
"character": 26
}
]
},
{
"id": 401,
"name": "list",
"kind": 2048,
"kindString": "Method",
"flags": {
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 402,
"name": "list",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Returns the array of presences, with selected metadata."
},
"typeParameter": [
{
"id": 403,
"name": "T",
"kind": 131072,
"kindString": "Type parameter",
"flags": {
"isExported": true
}
}
],
"parameters": [
{
"id": 404,
"name": "presences",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 439,
"name": "PresenceState"
}
},
{
"id": 405,
"name": "chooser",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 460,
"typeArguments": [
{
"type": "typeParameter",
"name": "T",
"default": {
"type": "intrinsic",
"name": "any"
}
}
],
"name": "PresenceChooser"
},
{
"type": "intrinsic",
"name": "undefined"
}
]
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "typeParameter",
"name": "T",
"default": {
"type": "intrinsic",
"name": "any"
}
}
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 237,
"character": 13
}
]
},
{
"id": 406,
"name": "map",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 407,
"name": "map",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"typeParameter": [
{
"id": 408,
"name": "T",
"kind": 131072,
"kindString": "Type parameter",
"flags": {
"isExported": true
}
}
],
"parameters": [
{
"id": 409,
"name": "obj",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 439,
"name": "PresenceState"
}
},
{
"id": 410,
"name": "func",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 460,
"typeArguments": [
{
"type": "typeParameter",
"name": "T",
"default": {
"type": "intrinsic",
"name": "any"
}
}
],
"name": "PresenceChooser"
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "typeParameter",
"name": "T",
"default": {
"type": "intrinsic",
"name": "any"
}
}
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 250,
"character": 20
}
]
},
{
"id": 395,
"name": "syncDiff",
"kind": 2048,
"kindString": "Method",
"flags": {
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 396,
"name": "syncDiff",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Used to sync a diff of presence join and leave events from the\nserver, as they happen.",
"text": "Like `syncState`, `syncDiff` accepts optional `onJoin` and\n`onLeave` callbacks to react to a user joining or leaving from a\ndevice.\n"
},
"parameters": [
{
"id": 397,
"name": "state",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 439,
"name": "PresenceState"
}
},
{
"id": 398,
"name": "diff",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 456,
"name": "RawPresenceDiff"
},
{
"type": "reference",
"id": 443,
"name": "PresenceDiff"
}
]
}
},
{
"id": 399,
"name": "onJoin",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "PresenceOnJoinCallback"
}
},
{
"id": 400,
"name": "onLeave",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "PresenceOnLeaveCallback"
}
}
],
"type": {
"type": "reference",
"id": 439,
"name": "PresenceState"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 177,
"character": 17
}
]
},
{
"id": 389,
"name": "syncState",
"kind": 2048,
"kindString": "Method",
"flags": {
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 390,
"name": "syncState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Used to sync the list of presences on the server with the\nclient's state.",
"text": "An optional `onJoin` and `onLeave` callback can be provided to\nreact to changes in the client's local presences across\ndisconnects and reconnects with the server.\n"
},
"parameters": [
{
"id": 391,
"name": "currentState",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 439,
"name": "PresenceState"
}
},
{
"id": 392,
"name": "newState",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 447,
"name": "RawPresenceState"
},
{
"type": "reference",
"id": 439,
"name": "PresenceState"
}
]
}
},
{
"id": 393,
"name": "onJoin",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "PresenceOnJoinCallback"
}
},
{
"id": 394,
"name": "onLeave",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "PresenceOnLeaveCallback"
}
}
],
"type": {
"type": "reference",
"id": 439,
"name": "PresenceState"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 122,
"character": 18
}
]
},
{
"id": 411,
"name": "transformState",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 412,
"name": "transformState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Remove 'metas' key\nChange 'phx_ref' to 'presence_id'\nRemove 'phx_ref' and 'phx_ref_prev'",
"tags": [
{
"tag": "example",
"text": "\n// returns {\n abc123: [\n { presence_id: '2', user_id: 1 },\n { presence_id: '3', user_id: 2 }\n ]\n}\nRealtimePresence.transformState({\n abc123: {\n metas: [\n { phx_ref: '2', phx_ref_prev: '1' user_id: 1 },\n { phx_ref: '3', user_id: 2 }\n ]\n }\n})\n"
}
]
},
"parameters": [
{
"id": 413,
"name": "state",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 447,
"name": "RawPresenceState"
},
{
"type": "reference",
"id": 439,
"name": "PresenceState"
}
]
}
}
],
"type": {
"type": "reference",
"id": 439,
"name": "PresenceState"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 278,
"character": 31
}
]
},
{
"id": 377,
"name": "caller",
"kind": 2097152,
"kindString": "Object literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 378,
"name": "onJoin",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 379,
"name": "onJoin",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 52,
"character": 10
}
]
},
{
"id": 380,
"name": "onLeave",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 381,
"name": "onLeave",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 53,
"character": 11
}
]
},
{
"id": 382,
"name": "onSync",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 383,
"name": "onSync",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 54,
"character": 10
}
]
}
],
"groups": [
{
"title": "Functions",
"kind": 64,
"children": [
378,
380,
382
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 47,
"character": 8
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
384
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
385,
376,
375,
374
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
432,
428,
417,
420,
423,
414,
401,
406,
395,
389,
411
]
},
{
"title": "Object literals",
"kind": 2097152,
"children": [
377
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 43,
"character": 37
}
]
},
{
"id": 434,
"name": "Presence",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 13,
"character": 13
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 435,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": [
{
"id": 437,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 438,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"children": [
{
"id": 436,
"name": "presence_id",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 14,
"character": 13
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
436
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 13,
"character": 15
}
]
}
}
},
{
"id": 460,
"name": "PresenceChooser",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"typeParameter": [
{
"id": 461,
"name": "T",
"kind": 131072,
"kindString": "Type parameter",
"flags": {}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 41,
"character": 20
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 462,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"signatures": [
{
"id": 463,
"name": "__call",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"parameters": [
{
"id": 464,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 465,
"name": "presences",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"type": {
"type": "typeParameter",
"name": "T"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 41,
"character": 25
}
]
}
}
},
{
"id": 443,
"name": "PresenceDiff",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 20,
"character": 17
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 444,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"children": [
{
"id": 445,
"name": "joins",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 21,
"character": 7
}
],
"type": {
"type": "reference",
"id": 439,
"name": "PresenceState"
}
},
{
"id": 446,
"name": "leaves",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 22,
"character": 8
}
],
"type": {
"type": "reference",
"id": 439,
"name": "PresenceState"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
445,
446
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 20,
"character": 19
}
]
}
}
},
{
"id": 439,
"name": "PresenceState",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 18,
"character": 18
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 440,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": [
{
"id": 441,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 442,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 434,
"name": "Presence"
}
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 18,
"character": 20
}
]
}
}
},
{
"id": 456,
"name": "RawPresenceDiff",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 36,
"character": 20
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 457,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"children": [
{
"id": 458,
"name": "joins",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 37,
"character": 7
}
],
"type": {
"type": "reference",
"id": 447,
"name": "RawPresenceState"
}
},
{
"id": 459,
"name": "leaves",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 38,
"character": 8
}
],
"type": {
"type": "reference",
"id": 447,
"name": "RawPresenceState"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
458,
459
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 36,
"character": 22
}
]
}
}
},
{
"id": 447,
"name": "RawPresenceState",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 25,
"character": 21
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 448,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": [
{
"id": 449,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 450,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "reference",
"id": 616,
"typeArguments": [
{
"type": "stringLiteral",
"value": "metas"
},
{
"type": "array",
"elementType": {
"type": "reflection",
"declaration": {
"id": 451,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": [
{
"id": 454,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 455,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"children": [
{
"id": 452,
"name": "phx_ref",
"kind": 32,
"kindString": "Variable",
"flags": {
"isOptional": true
},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 29,
"character": 13
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
},
{
"id": 453,
"name": "phx_ref_prev",
"kind": 32,
"kindString": "Variable",
"flags": {
"isOptional": true
},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 30,
"character": 18
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
452,
453
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 27,
"character": 12
}
]
}
}
}
],
"name": "Record"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 25,
"character": 23
}
]
}
}
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
373
]
},
{
"title": "Type aliases",
"kind": 4194304,
"children": [
434,
460,
443,
439,
456,
447
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 218,
"name": "\"RealtimeSubscription\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/RealtimeSubscription.ts",
"children": [
{
"id": 219,
"name": "RealtimeSubscription",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 227,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 234,
"name": "new RealtimeSubscription",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 235,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 236,
"name": "params",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 237,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 238,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 239,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 17,
"character": 18
}
]
}
},
"defaultValue": "{}"
},
{
"id": 240,
"name": "socket",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 74,
"name": "RealtimeClient"
}
}
],
"type": {
"type": "reference",
"id": 219,
"name": "RealtimeSubscription"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 13,
"character": 25
}
]
},
{
"id": 220,
"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": 224,
"name": "joinPush",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 11,
"character": 10
}
],
"type": {
"type": "reference",
"id": 307,
"name": "Push"
}
},
{
"id": 223,
"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": 229,
"name": "params",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 17,
"character": 17
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 230,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 231,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 232,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 17,
"character": 18
}
]
}
}
},
{
"id": 226,
"name": "pushBuffer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 13,
"character": 12
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 307,
"name": "Push"
}
},
"defaultValue": "[]"
},
{
"id": 225,
"name": "rejoinTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 12,
"character": 13
}
],
"type": {
"type": "reference",
"id": 35,
"name": "Timer"
}
},
{
"id": 233,
"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": 74,
"name": "RealtimeClient"
}
},
{
"id": 222,
"name": "state",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 9,
"character": 7
}
],
"type": {
"type": "reference",
"id": 9,
"name": "CHANNEL_STATES"
},
"defaultValue": "CHANNEL_STATES.closed"
},
{
"id": 221,
"name": "timeout",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 8,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "number"
}
},
{
"id": 228,
"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": 259,
"name": "canPush",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 260,
"name": "canPush",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 97,
"character": 9
}
]
},
{
"id": 296,
"name": "isClosed",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 297,
"name": "isClosed",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 202,
"character": 10
}
]
},
{
"id": 298,
"name": "isErrored",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 299,
"name": "isErrored",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 205,
"character": 11
}
]
},
{
"id": 300,
"name": "isJoined",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 301,
"name": "isJoined",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 208,
"character": 10
}
]
},
{
"id": 302,
"name": "isJoining",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 303,
"name": "isJoining",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 211,
"character": 11
}
]
},
{
"id": 304,
"name": "isLeaving",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 305,
"name": "isLeaving",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 214,
"character": 11
}
]
},
{
"id": 280,
"name": "isMember",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 281,
"name": "isMember",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 282,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 158,
"character": 10
}
]
},
{
"id": 283,
"name": "joinRef",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 284,
"name": "joinRef",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 162,
"character": 9
}
]
},
{
"id": 256,
"name": "off",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 257,
"name": "off",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 258,
"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": 252,
"name": "on",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 253,
"name": "on",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 254,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 255,
"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": 246,
"name": "onClose",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 247,
"name": "onClose",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 248,
"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": 249,
"name": "onError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 250,
"name": "onError",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 251,
"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": 275,
"name": "onMessage",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 276,
"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": 277,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 278,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 279,
"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": 154,
"character": 11
}
]
},
{
"id": 261,
"name": "push",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 262,
"name": "push",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 263,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 15,
"name": "CHANNEL_EVENTS"
}
},
{
"id": 264,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 265,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "reference",
"id": 307,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 101,
"character": 6
}
]
},
{
"id": 285,
"name": "rejoin",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 286,
"name": "rejoin",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 287,
"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": 166,
"character": 8
}
]
},
{
"id": 241,
"name": "rejoinUntilConnected",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 242,
"name": "rejoinUntilConnected",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 64,
"character": 22
}
]
},
{
"id": 293,
"name": "replyEventName",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 294,
"name": "replyEventName",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 295,
"name": "ref",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 198,
"character": 16
}
]
},
{
"id": 243,
"name": "subscribe",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 244,
"name": "subscribe",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 245,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "reference",
"id": 307,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 71,
"character": 11
}
]
},
{
"id": 288,
"name": "trigger",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 289,
"name": "trigger",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 290,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 291,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 292,
"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": 175,
"character": 9
}
]
},
{
"id": 272,
"name": "unsubscribe",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 273,
"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": 274,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "reference",
"id": 307,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 129,
"character": 13
}
]
},
{
"id": 266,
"name": "updateJoinPayload",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 267,
"name": "updateJoinPayload",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 268,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 269,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 270,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 271,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 116,
"character": 28
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 116,
"character": 19
}
]
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
227
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
220,
224,
223,
229,
226,
225,
233,
222,
221,
228
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
259,
296,
298,
300,
302,
304,
280,
283,
256,
252,
246,
249,
275,
261,
285,
241,
293,
243,
288,
272,
266
]
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 6,
"character": 41
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
219
]
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 656,
"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": 3,
"name": "\"lib/constants\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/constants.ts",
"children": [
{
"id": 15,
"name": "CHANNEL_EVENTS",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"children": [
{
"id": 21,
"name": "access_token",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 32,
"character": 14
}
],
"defaultValue": "\"access_token\""
},
{
"id": 16,
"name": "close",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 27,
"character": 7
}
],
"defaultValue": "\"phx_close\""
},
{
"id": 17,
"name": "error",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 28,
"character": 7
}
],
"defaultValue": "\"phx_error\""
},
{
"id": 18,
"name": "join",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 29,
"character": 6
}
],
"defaultValue": "\"phx_join\""
},
{
"id": 20,
"name": "leave",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 31,
"character": 7
}
],
"defaultValue": "\"phx_leave\""
},
{
"id": 19,
"name": "reply",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 30,
"character": 7
}
],
"defaultValue": "\"phx_reply\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
21,
16,
17,
18,
20,
19
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 26,
"character": 26
}
]
},
{
"id": 9,
"name": "CHANNEL_STATES",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"children": [
{
"id": 10,
"name": "closed",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 19,
"character": 8
}
],
"defaultValue": "\"closed\""
},
{
"id": 11,
"name": "errored",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 20,
"character": 9
}
],
"defaultValue": "\"errored\""
},
{
"id": 12,
"name": "joined",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 21,
"character": 8
}
],
"defaultValue": "\"joined\""
},
{
"id": 13,
"name": "joining",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 22,
"character": 9
}
],
"defaultValue": "\"joining\""
},
{
"id": 14,
"name": "leaving",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 23,
"character": 9
}
],
"defaultValue": "\"leaving\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
10,
11,
12,
13,
14
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 18,
"character": 26
}
]
},
{
"id": 24,
"name": "CONNECTION_STATE",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"children": [
{
"id": 28,
"name": "Closed",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 43,
"character": 8
}
],
"defaultValue": "\"closed\""
},
{
"id": 27,
"name": "Closing",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 42,
"character": 9
}
],
"defaultValue": "\"closing\""
},
{
"id": 25,
"name": "Connecting",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 40,
"character": 12
}
],
"defaultValue": "\"connecting\""
},
{
"id": 26,
"name": "Open",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 41,
"character": 6
}
],
"defaultValue": "\"open\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
28,
27,
25,
26
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 39,
"character": 28
}
]
},
{
"id": 4,
"name": "SOCKET_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": "3"
},
{
"id": 7,
"name": "closing",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 14,
"character": 9
}
],
"defaultValue": "2"
},
{
"id": 5,
"name": "connecting",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 12,
"character": 12
}
],
"defaultValue": "0"
},
{
"id": 6,
"name": "open",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 13,
"character": 6
}
],
"defaultValue": "1"
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
8,
7,
5,
6
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 11,
"character": 25
}
]
},
{
"id": 22,
"name": "TRANSPORTS",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"children": [
{
"id": 23,
"name": "websocket",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 36,
"character": 11
}
],
"defaultValue": "\"websocket\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
23
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 35,
"character": 22
}
]
},
{
"id": 32,
"name": "DEFAULT_TIMEOUT",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isConst": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 7,
"character": 28
}
],
"type": {
"type": "unknown",
"name": "10000"
},
"defaultValue": "10000"
},
{
"id": 31,
"name": "VSN",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isConst": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 5,
"character": 16
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "\"1.0.0\""
},
{
"id": 33,
"name": "WS_CLOSE_NORMAL",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isConst": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 9,
"character": 28
}
],
"type": {
"type": "unknown",
"name": "1000"
},
"defaultValue": "1000"
},
{
"id": 29,
"name": "DEFAULT_HEADERS",
"kind": 2097152,
"kindString": "Object literal",
"flags": {
"isExported": true,
"isConst": true
},
"children": [
{
"id": 30,
"name": "X-Client-Info",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 3,
"character": 48
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "`realtime-js/${version}`"
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
30
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 3,
"character": 28
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
}
],
"groups": [
{
"title": "Enumerations",
"kind": 4,
"children": [
15,
9,
24,
4,
22
]
},
{
"title": "Variables",
"kind": 32,
"children": [
32,
31,
33
]
},
{
"title": "Object literals",
"kind": 2097152,
"children": [
29
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 306,
"name": "\"lib/push\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/push.ts",
"children": [
{
"id": 307,
"name": "Push",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 320,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Push"
},
"signatures": [
{
"id": 328,
"name": "new Push",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Push"
},
"parameters": [
{
"id": 329,
"name": "channel",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The Channel"
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 219,
"name": "RealtimeSubscription"
},
{
"type": "reference",
"id": 467,
"name": "RealtimeChannel"
}
]
}
},
{
"id": 330,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The event, for example `\"phx_join\"`"
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 331,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The payload, for example `{user_id: 123}`"
},
"type": {
"type": "reflection",
"declaration": {
"id": 332,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 333,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 334,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 30,
"character": 19
}
]
}
},
"defaultValue": "{}"
},
{
"id": 335,
"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": 307,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 17,
"character": 32
}
]
},
{
"id": 321,
"name": "channel",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"comment": {
"shortText": "The Channel"
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 28,
"character": 18
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 219,
"name": "RealtimeSubscription"
},
{
"type": "reference",
"id": 467,
"name": "RealtimeChannel"
}
]
}
},
{
"id": 322,
"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": 29,
"character": 16
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 323,
"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": 30,
"character": 18
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 324,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 325,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 326,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 30,
"character": 19
}
]
}
}
},
{
"id": 315,
"name": "recHooks",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 13,
"character": 10
}
],
"type": {
"type": "array",
"elementType": {
"type": "reflection",
"declaration": {
"id": 316,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 318,
"name": "callback",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 15,
"character": 12
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 317,
"name": "status",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 14,
"character": 10
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
318,
317
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 13,
"character": 11
}
]
}
}
},
"defaultValue": "[]"
},
{
"id": 311,
"name": "receivedResp",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 9,
"character": 14
}
],
"type": {
"type": "union",
"types": [
{
"type": "reflection",
"declaration": {
"id": 312,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 314,
"name": "response",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 11,
"character": 12
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 313,
"name": "status",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 10,
"character": 10
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
314,
313
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 9,
"character": 15
}
]
}
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 310,
"name": "ref",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 8,
"character": 5
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "\"\""
},
{
"id": 319,
"name": "refEvent",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 17,
"character": 10
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 308,
"name": "sent",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 6,
"character": 6
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
},
"defaultValue": "false"
},
{
"id": 327,
"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": 31,
"character": 18
}
],
"type": {
"type": "intrinsic",
"name": "number"
}
},
{
"id": 309,
"name": "timeoutTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 7,
"character": 14
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "number"
},
{
"type": "intrinsic",
"name": "undefined"
}
]
},
"defaultValue": "undefined"
},
{
"id": 359,
"name": "_cancelRefEvent",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 360,
"name": "_cancelRefEvent",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 105,
"character": 25
}
]
},
{
"id": 361,
"name": "_cancelTimeout",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 362,
"name": "_cancelTimeout",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 117,
"character": 24
}
]
},
{
"id": 369,
"name": "_hasReceived",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 370,
"name": "_hasReceived",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 371,
"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": 134,
"character": 22
}
]
},
{
"id": 363,
"name": "_matchReceive",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 364,
"name": "_matchReceive",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 365,
"name": "__namedParameters",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"originalName": "__0",
"type": {
"type": "reflection",
"declaration": {
"id": 366,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 368,
"name": "response",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 124,
"character": 12
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 367,
"name": "status",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 123,
"character": 10
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
368,
367
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 122,
"character": 24
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 122,
"character": 23
}
]
},
{
"id": 357,
"name": "destroy",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 358,
"name": "destroy",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 100,
"character": 9
}
]
},
{
"id": 347,
"name": "receive",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 348,
"name": "receive",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 349,
"name": "status",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 350,
"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": 62,
"character": 9
}
]
},
{
"id": 336,
"name": "resend",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 337,
"name": "resend",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 338,
"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": 34,
"character": 8
}
]
},
{
"id": 339,
"name": "send",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 340,
"name": "send",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 44,
"character": 6
}
]
},
{
"id": 351,
"name": "startTimeout",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 352,
"name": "startTimeout",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 71,
"character": 14
}
]
},
{
"id": 353,
"name": "trigger",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 354,
"name": "trigger",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 355,
"name": "status",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 356,
"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": 96,
"character": 9
}
]
},
{
"id": 341,
"name": "updatePayload",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 342,
"name": "updatePayload",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 343,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 344,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 345,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 346,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 58,
"character": 24
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 58,
"character": 15
}
]
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
320
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
321,
322,
323,
315,
311,
310,
319,
308,
327,
309
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
359,
361,
369,
363,
357,
347,
336,
339,
351,
353,
341
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 5,
"character": 25
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
307
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 48,
"name": "\"lib/serializer\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/serializer.ts",
"children": [
{
"id": 49,
"name": "Serializer",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 50,
"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": 55,
"name": "_binaryDecode",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 56,
"name": "_binaryDecode",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 57,
"name": "buffer",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "ArrayBuffer"
}
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 58,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 61,
"name": "event",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 33,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 62,
"name": "payload",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 34,
"character": 11
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
},
{
"id": 59,
"name": "ref",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 31,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "null"
}
},
{
"id": 60,
"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": [
61,
62,
59,
60
]
}
]
}
}
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 19,
"character": 23
}
]
},
{
"id": 63,
"name": "_decodeBroadcast",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 64,
"name": "_decodeBroadcast",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 65,
"name": "buffer",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "ArrayBuffer"
}
},
{
"id": 66,
"name": "view",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "DataView"
}
},
{
"id": 67,
"name": "decoder",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "TextDecoder"
}
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 68,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 71,
"name": "event",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 33,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 72,
"name": "payload",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 34,
"character": 11
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
},
{
"id": 69,
"name": "ref",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 31,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "null"
}
},
{
"id": 70,
"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": [
71,
72,
69,
70
]
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 30,
"character": 4
}
]
}
}
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 26,
"character": 26
}
]
},
{
"id": 51,
"name": "decode",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 52,
"name": "decode",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 53,
"name": "rawPayload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"name": "ArrayBuffer"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
},
{
"id": 54,
"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": [
50
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
55,
63,
51
]
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 4,
"character": 31
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
49
]
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 34,
"name": "\"lib/timer\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/timer.ts",
"children": [
{
"id": 35,
"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": 38,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 41,
"name": "new Timer",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 42,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 43,
"name": "timerCalc",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "reference",
"id": 35,
"name": "Timer"
}
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 15,
"character": 19
}
]
},
{
"id": 39,
"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": 36,
"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": 40,
"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": 37,
"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": 44,
"name": "reset",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 45,
"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": 46,
"name": "scheduleTimeout",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 47,
"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": [
38
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
39,
36,
40,
37
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
44,
46
]
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 13,
"character": 26
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
35
]
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 582,
"name": "\"lib/transformers\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/transformers.ts",
"children": [
{
"id": 583,
"name": "PostgresTypes",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Helpers to convert the change Payload into native JS types."
},
"children": [
{
"id": 584,
"name": "abstime",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 9,
"character": 9
}
],
"defaultValue": "\"abstime\""
},
{
"id": 585,
"name": "bool",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 10,
"character": 6
}
],
"defaultValue": "\"bool\""
},
{
"id": 586,
"name": "date",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 11,
"character": 6
}
],
"defaultValue": "\"date\""
},
{
"id": 587,
"name": "daterange",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 12,
"character": 11
}
],
"defaultValue": "\"daterange\""
},
{
"id": 588,
"name": "float4",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 13,
"character": 8
}
],
"defaultValue": "\"float4\""
},
{
"id": 589,
"name": "float8",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 14,
"character": 8
}
],
"defaultValue": "\"float8\""
},
{
"id": 590,
"name": "int2",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 15,
"character": 6
}
],
"defaultValue": "\"int2\""
},
{
"id": 591,
"name": "int4",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 16,
"character": 6
}
],
"defaultValue": "\"int4\""
},
{
"id": 592,
"name": "int4range",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 17,
"character": 11
}
],
"defaultValue": "\"int4range\""
},
{
"id": 593,
"name": "int8",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 18,
"character": 6
}
],
"defaultValue": "\"int8\""
},
{
"id": 594,
"name": "int8range",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 19,
"character": 11
}
],
"defaultValue": "\"int8range\""
},
{
"id": 595,
"name": "json",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 20,
"character": 6
}
],
"defaultValue": "\"json\""
},
{
"id": 596,
"name": "jsonb",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 21,
"character": 7
}
],
"defaultValue": "\"jsonb\""
},
{
"id": 597,
"name": "money",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 22,
"character": 7
}
],
"defaultValue": "\"money\""
},
{
"id": 598,
"name": "numeric",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 23,
"character": 9
}
],
"defaultValue": "\"numeric\""
},
{
"id": 599,
"name": "oid",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 24,
"character": 5
}
],
"defaultValue": "\"oid\""
},
{
"id": 600,
"name": "reltime",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 25,
"character": 9
}
],
"defaultValue": "\"reltime\""
},
{
"id": 601,
"name": "text",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 26,
"character": 6
}
],
"defaultValue": "\"text\""
},
{
"id": 602,
"name": "time",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 27,
"character": 6
}
],
"defaultValue": "\"time\""
},
{
"id": 603,
"name": "timestamp",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 28,
"character": 11
}
],
"defaultValue": "\"timestamp\""
},
{
"id": 604,
"name": "timestamptz",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 29,
"character": 13
}
],
"defaultValue": "\"timestamptz\""
},
{
"id": 605,
"name": "timetz",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 30,
"character": 8
}
],
"defaultValue": "\"timetz\""
},
{
"id": 606,
"name": "tsrange",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 31,
"character": 9
}
],
"defaultValue": "\"tsrange\""
},
{
"id": 607,
"name": "tstzrange",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 32,
"character": 11
}
],
"defaultValue": "\"tstzrange\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
584,
585,
586,
587,
588,
589,
590,
591,
592,
593,
594,
595,
596,
597,
598,
599,
600,
601,
602,
603,
604,
605,
606,
607
]
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 8,
"character": 25
}
]
},
{
"id": 614,
"name": "BaseValue",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 42,
"character": 14
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "null"
},
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "number"
},
{
"type": "intrinsic",
"name": "boolean"
}
]
}
},
{
"id": 608,
"name": "Columns",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 35,
"character": 12
}
],
"type": {
"type": "array",
"elementType": {
"type": "reflection",
"declaration": {
"id": 609,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"children": [
{
"id": 612,
"name": "flags",
"kind": 32,
"kindString": "Variable",
"flags": {
"isOptional": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 38,
"character": 7
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "string"
}
}
},
{
"id": 610,
"name": "name",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 36,
"character": 6
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 611,
"name": "type",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 37,
"character": 6
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 613,
"name": "type_modifier",
"kind": 32,
"kindString": "Variable",
"flags": {
"isOptional": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 39,
"character": 15
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
612,
610,
611,
613
]
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 35,
"character": 14
}
]
}
}
}
},
{
"id": 616,
"name": "Record",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 45,
"character": 11
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 617,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": [
{
"id": 618,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 619,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 45,
"character": 13
}
]
}
}
},
{
"id": 615,
"name": "RecordValue",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 43,
"character": 16
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 614,
"name": "BaseValue"
},
{
"type": "array",
"elementType": {
"type": "reference",
"id": 614,
"name": "BaseValue"
}
}
]
}
},
{
"id": 633,
"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": 634,
"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": 635,
"name": "type",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "A postgres column type"
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 636,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 118,
"character": 24
}
]
},
{
"id": 620,
"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": 621,
"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": 622,
"name": "columns",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 608,
"name": "Columns"
}
},
{
"id": 623,
"name": "record",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {},
"type": {
"type": "reference",
"id": 616,
"name": "Record"
}
},
{
"id": 624,
"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": 625,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 626,
"name": "skipTypes",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 64,
"character": 22
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "string"
}
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
626
]
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 64,
"character": 10
}
]
}
},
"defaultValue": "{}"
}
],
"type": {
"type": "reference",
"id": 616,
"name": "Record"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 61,
"character": 30
}
]
},
{
"id": 627,
"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": 628,
"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": 629,
"name": "columnName",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The column that you want to convert"
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 630,
"name": "columns",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 608,
"name": "Columns"
}
},
{
"id": 631,
"name": "record",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The map of string values"
},
"type": {
"type": "reference",
"id": 616,
"name": "Record"
}
},
{
"id": 632,
"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": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 88,
"character": 26
}
]
},
{
"id": 637,
"name": "noop",
"kind": 64,
"kindString": "Function",
"flags": {
"isConst": true
},
"signatures": [
{
"id": 638,
"name": "noop",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"parameters": [
{
"id": 639,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 162,
"character": 10
}
]
},
{
"id": 649,
"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('{}', 'int4')\n//=> []"
},
{
"tag": "example",
"text": "toArray('{\"[2021-01-01,2021-12-31)\",\"(2021-01-01,2021-12-32]\"}', 'daterange')\n//=> ['[2021-01-01,2021-12-31)', '(2021-01-01,2021-12-32]']"
},
{
"tag": "example",
"text": "toArray([1,2,3,4], 'int4')\n//=> [1,2,3,4]\n"
}
]
},
"signatures": [
{
"id": 650,
"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('{}', 'int4')\n//=> []"
},
{
"tag": "example",
"text": "toArray('{\"[2021-01-01,2021-12-31)\",\"(2021-01-01,2021-12-32]\"}', 'daterange')\n//=> ['[2021-01-01,2021-12-31)', '(2021-01-01,2021-12-32]']"
},
{
"tag": "example",
"text": "toArray([1,2,3,4], 'int4')\n//=> [1,2,3,4]\n"
}
]
},
"parameters": [
{
"id": 651,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
},
{
"id": 652,
"name": "type",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 206,
"character": 20
}
]
},
{
"id": 640,
"name": "toBoolean",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 641,
"name": "toBoolean",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 642,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 165,
"character": 22
}
]
},
{
"id": 646,
"name": "toJson",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 647,
"name": "toJson",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 648,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 184,
"character": 19
}
]
},
{
"id": 643,
"name": "toNumber",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 644,
"name": "toNumber",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 645,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 175,
"character": 21
}
]
},
{
"id": 653,
"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": 654,
"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": 655,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"type": {
"type": "reference",
"id": 615,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 241,
"character": 30
}
]
}
],
"groups": [
{
"title": "Enumerations",
"kind": 4,
"children": [
583
]
},
{
"title": "Type aliases",
"kind": 4194304,
"children": [
614,
608,
616,
615
]
},
{
"title": "Functions",
"kind": 64,
"children": [
633,
620,
627,
637,
649,
640,
646,
643,
653
]
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 1,
"name": "\"lib/version\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/version.ts",
"children": [
{
"id": 2,
"name": "version",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isConst": true
},
"sources": [
{
"fileName": "lib/version.ts",
"line": 1,
"character": 20
}
],
"type": {
"type": "stringLiteral",
"value": "0.0.0-automated"
},
"defaultValue": "\"0.0.0-automated\""
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
2
]
}
],
"sources": [
{
"fileName": "lib/version.ts",
"line": 1,
"character": 0
}
]
}
],
"groups": [
{
"title": "Modules",
"kind": 1,
"children": [
466,
73,
372,
218,
656,
3,
306,
48,
34,
582,
1
]
}
]
}