@convergence/convergence
Version:
Convergence JavaScript Client
1,918 lines • 3.43 MB
JSON
{
"id": 0,
"name": "Convergence JavaScript Client API Documentation",
"kind": 0,
"flags": {},
"children": [
{
"id": 9161,
"name": "Activities",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/Users/michael/development/convergence/client/convergence-client-javascript/src/main/activity/index.ts",
"comment": {
"shortText": "For any real-time collaboration application, connected users must have some\ncontext about their current collaboration state. This goes beyond just\ndata synchronization, typically involving communicating user intentions\n(such as highlighting a sentence before deleting it) and availability\n(who can I collaborate with?).",
"text": "Great real-time apps go the extra mile to prevent conflicts. That's what\nthis API is all about.\n"
},
"children": [
{
"id": 8872,
"name": "Activity",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The [[Activity]] class represents a activity that the users of a\ncollaboration are participating in together. The activity allows\ndeveloper to indicate what user are doing within a collaborative\napplication. The activity has a set of participants that indicate\nwhich users are part of that activity. Each [[ActivityParticipant]]\ncan share state which indicates what they are doing within the\n[[Activity]]."
},
"children": [
{
"id": 9021,
"name": "addListener",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 9022,
"name": "addListener",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Adds a new event listener for the specified event. The class will ignore\nduplicate registrations of the same listener to the same event.",
"returns": "\n This object, in support of a fluent API.\n"
},
"parameters": [
{
"id": 9023,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The name of the event to add the listener for."
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 9024,
"name": "listener",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The listener callback to register."
},
"type": {
"type": "reference",
"id": 500,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventListener"
}
}
],
"type": {
"type": "reference",
"id": 455,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventEmitter"
},
"inheritedFrom": {
"type": "reference",
"id": 465,
"name": "ConvergenceEventEmitter.addListener"
}
}
],
"sources": [
{
"fileName": "src/main/util/ConvergenceEventEmitter.ts",
"line": 89,
"character": 20
}
],
"inheritedFrom": {
"type": "reference",
"id": 465,
"name": "ConvergenceEventEmitter.addListener"
}
},
{
"id": 8934,
"name": "clearState",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8935,
"name": "clearState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Clears all local state from this [[Activity]]. This will fire a single\n\"state_cleared\" event for other joined participants to listen for."
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 564,
"character": 19
}
]
},
{
"id": 8911,
"name": "createdTime",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8912,
"name": "createdTime",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Gets the time this [[Activity]] was created.",
"returns": "\n The [[Activity]] created time.\n"
},
"type": {
"type": "reference",
"name": "Date"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 329,
"character": 20
}
]
},
{
"id": 9046,
"name": "events",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 9047,
"name": "events",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Provides the events emitted by this object as an Observable stream.",
"returns": "\n An Observable stream of all events emitted by this object.\n",
"tags": [
{
"tag": "example",
"text": "\n```typescript\n\neventEmitter.events()\n .filter(e => e.name === \"myevent\")\n .subscribe(e => console.log(e));\n```\n"
}
]
},
"type": {
"type": "reference",
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "Observable"
},
"inheritedFrom": {
"type": "reference",
"id": 490,
"name": "ConvergenceEventEmitter.events"
}
}
],
"sources": [
{
"fileName": "src/main/util/ConvergenceEventEmitter.ts",
"line": 241,
"character": 15
}
],
"inheritedFrom": {
"type": "reference",
"id": 490,
"name": "ConvergenceEventEmitter.events"
}
},
{
"id": 8909,
"name": "id",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8910,
"name": "id",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Gets the id of this [[Activity]], which is unique within\nits user defined type.",
"returns": "\n The [[Activity]] id.\n"
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 319,
"character": 11
}
]
},
{
"id": 8913,
"name": "isEphemeral",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8914,
"name": "isEphemeral",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Determines if this [[Activity]] is ephemeral. If so,\nit will be deleted when the last participant leaves.",
"returns": "\n True if the [[Activity]] is ephemeral, false otherwise.\n"
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 340,
"character": 20
}
]
},
{
"id": 8919,
"name": "isJoined",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8920,
"name": "isJoined",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Determines if the [[Activity]] is still joined.",
"returns": "\n True if the [[Activity]] is joined, false otherwise.\n"
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 382,
"character": 17
}
]
},
{
"id": 8917,
"name": "leave",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8918,
"name": "leave",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Causes the local session to leave the [[Activity]]. All other participants\nof this activity will be notified that this session has left. The state\nassociated with this session will be removed from eh [[Activity]]. After\ncalling leave, the [[Activity]] object becomes non-functional. The local\nuser can rejoin the activity from the [[ActivityService]] but will\nreceive a new [[Activity]] object."
},
"type": {
"type": "reference",
"typeArguments": [
{
"type": "intrinsic",
"name": "void"
}
],
"name": "Promise"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 356,
"character": 14
}
]
},
{
"id": 9042,
"name": "off",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 9043,
"name": "off",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Removes a single event listener for a specific event.",
"returns": "\n This object, in support of a fluent API.\n"
},
"parameters": [
{
"id": 9044,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The name of the event to remove the listener for."
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 9045,
"name": "listener",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The listener callback to unregister."
},
"type": {
"type": "reference",
"id": 500,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventListener"
}
}
],
"type": {
"type": "reference",
"id": 455,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventEmitter"
},
"inheritedFrom": {
"type": "reference",
"id": 486,
"name": "ConvergenceEventEmitter.off"
}
}
],
"sources": [
{
"fileName": "src/main/util/ConvergenceEventEmitter.ts",
"line": 223,
"character": 12
}
],
"inheritedFrom": {
"type": "reference",
"id": 486,
"name": "ConvergenceEventEmitter.off"
}
},
{
"id": 9025,
"name": "on",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 9026,
"name": "on",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Adds a new event listener for the specified event. The class will ignore\nduplicate registrations of the same listener to the same event.",
"returns": "\n This object, in support of a fluent API.\n"
},
"parameters": [
{
"id": 9027,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The name of the event to add the listener for."
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 9028,
"name": "listener",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The listener callback to register."
},
"type": {
"type": "reference",
"id": 500,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventListener"
}
}
],
"type": {
"type": "reference",
"id": 455,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventEmitter"
},
"inheritedFrom": {
"type": "reference",
"id": 469,
"name": "ConvergenceEventEmitter.on"
}
}
],
"sources": [
{
"fileName": "src/main/util/ConvergenceEventEmitter.ts",
"line": 127,
"character": 11
}
],
"inheritedFrom": {
"type": "reference",
"id": 469,
"name": "ConvergenceEventEmitter.on"
}
},
{
"id": 9029,
"name": "once",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 9030,
"name": "once",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Adds a single shot event listener for the specified event. The listener\nwill be called the first time the specified event is fired after the\nevent registration occurs, after which the registration will be removed\nand no further events will be passed to the listener.",
"returns": "\n This object, in support of a fluent API.\n"
},
"parameters": [
{
"id": 9031,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The name of the event to add the listener for."
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 9032,
"name": "listener",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The listener callback to register."
},
"type": {
"type": "reference",
"id": 500,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventListener"
}
}
],
"type": {
"type": "reference",
"id": 455,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventEmitter"
},
"inheritedFrom": {
"type": "reference",
"id": 473,
"name": "ConvergenceEventEmitter.once"
}
}
],
"sources": [
{
"fileName": "src/main/util/ConvergenceEventEmitter.ts",
"line": 144,
"character": 13
}
],
"inheritedFrom": {
"type": "reference",
"id": 473,
"name": "ConvergenceEventEmitter.once"
}
},
{
"id": 8936,
"name": "participant",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8937,
"name": "participant",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Gets an [[ActivityParticipant]] by their sessionId.",
"returns": "\n The [[ActivityParticipant]] corresponding to the supplied id, or\n undefined if no such participant exists.\n"
},
"parameters": [
{
"id": 8938,
"name": "sessionId",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The sessionId of the participant to get."
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "reference",
"id": 9057,
"name": "ActivityParticipant"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 602,
"character": 20
}
]
},
{
"id": 8939,
"name": "participants",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8940,
"name": "participants",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Gets all participants presently joined to this [[Activity]].",
"returns": "\n An array of [[ActivityParticipant]] objects, one for each joined\n participant.\n"
},
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 9057,
"name": "ActivityParticipant"
}
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 613,
"character": 21
}
]
},
{
"id": 8941,
"name": "participantsAsObservable",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8942,
"name": "participantsAsObservable",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Gets the participants as an Observable stream.",
"text": "```typescript\nactivity\n .participantsAsObservable()\n .subscribe(p => console.log(p));\n```\n",
"returns": "\n An Observable array of participants.\n"
},
"type": {
"type": "reference",
"typeArguments": [
{
"type": "array",
"elementType": {
"type": "reference",
"id": 9057,
"name": "ActivityParticipant"
}
}
],
"name": "Observable"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 629,
"character": 33
}
]
},
{
"id": 8915,
"name": "permissions",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8916,
"name": "permissions",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 8783,
"name": "ActivityPermissionManager"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 344,
"character": 20
}
]
},
{
"id": 9033,
"name": "removeAllListeners",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 9034,
"name": "removeAllListeners",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Removes all listeners for all events. This is useful for cleanup before\ndisposing of this particular event emitter.",
"returns": "\n This object, in support of a fluent API.\n"
},
"type": {
"type": "reference",
"id": 455,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventEmitter"
},
"inheritedFrom": {
"type": "reference",
"id": 477,
"name": "ConvergenceEventEmitter.removeAllListeners"
}
}
],
"sources": [
{
"fileName": "src/main/util/ConvergenceEventEmitter.ts",
"line": 159,
"character": 27
}
],
"inheritedFrom": {
"type": "reference",
"id": 477,
"name": "ConvergenceEventEmitter.removeAllListeners"
}
},
{
"id": 9038,
"name": "removeListener",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 9039,
"name": "removeListener",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Removes a single event listener for a specific event.",
"returns": "\n This object, in support of a fluent API.\n"
},
"parameters": [
{
"id": 9040,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The name of the event to remove the listener for."
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 9041,
"name": "listener",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The listener callback to unregister."
},
"type": {
"type": "reference",
"id": 500,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventListener"
}
}
],
"type": {
"type": "reference",
"id": 455,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventEmitter"
},
"inheritedFrom": {
"type": "reference",
"id": 482,
"name": "ConvergenceEventEmitter.removeListener"
}
}
],
"sources": [
{
"fileName": "src/main/util/ConvergenceEventEmitter.ts",
"line": 194,
"character": 23
}
],
"inheritedFrom": {
"type": "reference",
"id": 482,
"name": "ConvergenceEventEmitter.removeListener"
}
},
{
"id": 9035,
"name": "removeListeners",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 9036,
"name": "removeListeners",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Removes all listeners bound on the given event.",
"returns": "\n This object, in support of a fluent API.\n"
},
"parameters": [
{
"id": 9037,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "the name of the event to remove listeners for\n"
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "reference",
"id": 455,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventEmitter"
},
"inheritedFrom": {
"type": "reference",
"id": 479,
"name": "ConvergenceEventEmitter.removeListeners"
}
}
],
"sources": [
{
"fileName": "src/main/util/ConvergenceEventEmitter.ts",
"line": 174,
"character": 24
}
],
"inheritedFrom": {
"type": "reference",
"id": 479,
"name": "ConvergenceEventEmitter.removeListeners"
}
},
{
"id": 8929,
"name": "removeState",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8930,
"name": "removeState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Removes a single local state entry from the [[Activity]]. This will fire\na single \"state_removed\" event for other joined participants to listen\nfor.",
"text": "```typescript\nactivity.removeState(\"pointer\");\n```\n"
},
"parameters": [
{
"id": 8931,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The key of the local state to remove.\n"
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
},
{
"id": 8932,
"name": "removeState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Removes one or more local state entries from the [[Activity]]. This will\nfire a multiple \"state_removed\" event for other joined participants to\nlisten for; one for each key removed.",
"text": "```typescript\nactivity.removeState([\"pointer\", \"viewport\"]);\n```\n"
},
"parameters": [
{
"id": 8933,
"name": "keys",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The keys of the local state to remove.\n"
},
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "string"
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 501,
"character": 20
},
{
"fileName": "src/main/activity/Activity.ts",
"line": 515,
"character": 20
},
{
"fileName": "src/main/activity/Activity.ts",
"line": 517,
"character": 20
}
]
},
{
"id": 8905,
"name": "session",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8906,
"name": "session",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Gets the session that this activity is a part of.",
"returns": "\n The session that this [[Activity]] is a part of.\n"
},
"type": {
"type": "reference",
"id": 832,
"name": "ConvergenceSession"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 298,
"character": 16
}
]
},
{
"id": 8923,
"name": "setState",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8924,
"name": "setState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Sets a single key-value pair within this Activity's local state. This will\nresult in a single \"state_set\" event being emitted for other joined\nparticipants to listen for.",
"text": "```typescript\nactivity.setState(\"key1\", \"delta\");\n```\n"
},
"parameters": [
{
"id": 8925,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The key of the delta to set."
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 8926,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n The delta to set for the supplied key.\n"
},
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
},
{
"id": 8927,
"name": "setState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Sets multiple key-value pairs within this Activity's local state. This\nmethod does not replace all state; that is, keys not supplied in the map\nwill not be altered. This method will result in multiple \"state_set\"\nevents being fired for other joined participants to list for; one for\neach key set.",
"text": "```typescript\nconst state = {\n key1: \"v1\",\n key2: false\n};\nactivity.setState(state);\n```\nor\n\n```typescript\nconst state = new Map();\nstate.set(\"key1\", \"v1\");\nstate.set(\"key2\", false);\nactivity.setState(state);\n```"
},
"parameters": [
{
"id": 8928,
"name": "state",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "\n A mapping containing the key-value pairs to set.\n"
},
"type": {
"type": "reference",
"id": 965,
"name": "StringMapLike"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 414,
"character": 17
},
{
"fileName": "src/main/activity/Activity.ts",
"line": 441,
"character": 17
},
{
"fileName": "src/main/activity/Activity.ts",
"line": 443,
"character": 17
}
]
},
{
"id": 8921,
"name": "state",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8922,
"name": "state",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Gets the local session's state within this [[Activity]].",
"returns": "\n The local sessions state.\n"
},
"type": {
"type": "reference",
"typeArguments": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "any"
}
],
"name": "Map"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 392,
"character": 14
}
]
},
{
"id": 8907,
"name": "type",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPublic": true,
"isExported": true
},
"signatures": [
{
"id": 8908,
"name": "type",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Gets the user defined type of this [[Activity]].",
"returns": "\n The [[Activity]] type.\n"
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 308,
"character": 13
}
]
},
{
"id": 8873,
"name": "Events",
"kind": 2097152,
"kindString": "Object literal",
"flags": {
"isPublic": true,
"isStatic": true,
"isExported": true,
"isReadonly": true
},
"comment": {
"shortText": "Holds the constants for the event names that are fired by the Activity\nclass."
},
"children": [
{
"id": 8881,
"name": "DELETED",
"kind": 8388608,
"kindString": "Event",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Fired when a the activity was deleted while joined."
},
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 150,
"character": 11
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "ActivityLeftEvent.EVENT_NAME"
},
{
"id": 8882,
"name": "FORCE_LEAVE",
"kind": 8388608,
"kindString": "Event",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Fired when the server forces the local session to leave the activity."
},
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 157,
"character": 15
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "ActivityForceLeaveEvent.EVENT_NAME"
},
{
"id": 8880,
"name": "LEFT",
"kind": 8388608,
"kindString": "Event",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Fired when a the activity is left by the local session. The resulting event\nwill be an [[ActivityLeftEvent]]."
},
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 143,
"character": 8
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "ActivityLeftEvent.EVENT_NAME"
},
{
"id": 8874,
"name": "SESSION_JOINED",
"kind": 8388608,
"kindString": "Event",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Fired when a remote session joins the activity. The resulting event will\nbe an [[ActivitySessionJoinedEvent]]."
},
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 92,
"character": 18
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "ActivitySessionJoinedEvent.EVENT_NAME"
},
{
"id": 8875,
"name": "SESSION_LEFT",
"kind": 8388608,
"kindString": "Event",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Fired when a remote session leaves the activity. The resulting event will\nbe an [[ActivitySessionLeftEvent]]."
},
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 100,
"character": 16
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "ActivitySessionLeftEvent.EVENT_NAME"
},
{
"id": 8877,
"name": "STATE_CLEARED",
"kind": 8388608,
"kindString": "Event",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Fired when a remote session clears state within the Activity. The resulting\nevent will be an [[ActivityStateClearedEvent]]."
},
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 116,
"character": 17
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "ActivityStateClearedEvent.EVENT_NAME"
},
{
"id": 8879,
"name": "STATE_DELTA",
"kind": 8388608,
"kindString": "Event",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Fired when a remote session makes any changes to state within Activity. The\nresulting event will be a [[ActivityStateDeltaEvent]].",
"text": "This is a batch event whereas [[ActivityStateClearedEvent]] and\n[[ActivityStateSetEvent]] are fired for individual properties.\n"
},
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 135,
"character": 15
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "ActivityStateDeltaEvent.EVENT_NAME"
},
{
"id": 8878,
"name": "STATE_REMOVED",
"kind": 8388608,
"kindString": "Event",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Fired when a remote session clears state within the Activity. The resulting\nevent will be an [[ActivityStateRemovedEvent]]."
},
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 124,
"character": 17
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "ActivityStateRemovedEvent.EVENT_NAME"
},
{
"id": 8876,
"name": "STATE_SET",
"kind": 8388608,
"kindString": "Event",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Fired when a remote session sets state within the Activity. The resulting\nevent will be an [[ActivityStateSetEvent]]."
},
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 108,
"character": 13
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "ActivityStateSetEvent.EVENT_NAME"
}
],
"groups": [
{
"title": "Events",
"kind": 8388608,
"children": [
8881,
8882,
8880,
8874,
8875,
8877,
8879,
8878,
8876
]
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 85,
"character": 31
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
}
],
"groups": [
{
"title": "Methods",
"kind": 2048,
"children": [
9021,
8934,
8911,
9046,
8909,
8913,
8919,
8917,
9042,
9025,
9029,
8936,
8939,
8941,
8915,
9033,
9038,
9035,
8929,
8905,
8923,
8921,
8907
]
},
{
"title": "Object literals",
"kind": 2097152,
"children": [
8873
]
}
],
"sources": [
{
"fileName": "src/main/activity/Activity.ts",
"line": 79,
"character": 21
}
],
"extendedTypes": [
{
"type": "reference",
"id": 455,
"typeArguments": [
{
"type": "reference",
"id": 8540,
"name": "IActivityEvent"
}
],
"name": "ConvergenceEventEmitter"
}
]
},
{
"id": 8858,
"name": "ActivityDeletedEvent",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The ActivityDeletedEvent is fired when an activity was deleted while the\nlocal session was joined to an [[Activity]]."
},
"children": [
{
"id": 8862,
"name": "activity",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true,
"isReadonly": true
},
"comment": {
"shortText": "The Activity that this event relates to."
},
"sources": [
{
"fileName": "src/main/activity/events/ActivityDeletedEvent.ts",
"line": 45,
"character": 28
}
],
"type": {
"type": "reference",
"id": 8872,
"name": "Activity"
},
"implementationOf": {
"type": "reference",
"id": 8541,
"name": "IActivityEvent.activity"
}
},
{
"id": 8865,
"name": "local",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true,
"isReadonly": true
},
"comment": {
"shortText": "Will be true if this event is from the local user / session;\nfalse otherwise."
},
"sources": [
{
"fileName": "src/main/activity/events/ActivityDeletedEvent.ts",
"line": 57,
"character": 25
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
},
"implementationOf": {
"type": "reference",
"id": 8544,
"name": "IActivityEvent.local"
}
},
{
"id": 8860,
"name": "name",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isReadonly": true
},
"comment": {
"shortText": "The name of the event that was fired. This is commonly used to filter when\nusing the [[ConvergenceEventEmitter.events]] stream.",
"text": "Note that the name is only guaranteed to be unique within the class /\nsubsystem that is firing it. Names might be reused across classes and\nsubsystems.\n"
},
"sources": [
{
"fileName": "src/main/activity/events/ActivityDeletedEvent.ts",
"line": 35,
"character": 22
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "ActivityDeletedEvent.EVENT_NAME",
"implementationOf": {
"type": "reference",
"id": 8545,
"name": "IActivityEvent.name"
}
},
{
"id": 8864,
"name": "sessionId",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true,
"isReadonly": true
},
"comment": {
"shortText": "The session id of the session that originated this event."
},
"sources": [
{
"fileName": "src/main/activity/events/ActivityDeletedEvent.ts",
"line": 53,
"character": 29
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"implementationOf": {
"type": "reference",
"id": 8543,
"name": "IActivityEvent.sessionId"
}
},
{
"id": 8863,
"name": "user",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true,
"isReadonly": true
},
"comment": {
"shortText": "The username of the user originated this event."
},
"sources": [
{
"fileName": "src/main/activity/events/ActivityDeletedEvent.ts",
"line": 49,
"character": 24
}
],
"type": {
"type": "reference",
"id": 812,
"name": "DomainUser"
},
"implementationOf": {
"type"