UNPKG

@kandy-io/uc-sdk-3.x

Version:

The v3 stream of the Kandy UC JavaScript SDK has been deprecated and is not receiving regular updates. The latest version of the SDK can be found at https://github.com/Kandy-IO/kandy-uc-js-sdk.

1,553 lines 1.26 MB
[ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The SDK creation factory. Create an instance of the SDK by calling this factory with the desired configurations.\nThe SDK instance will be referred as 'api' throughout the rest of the documentation content." } ] } ] }, "tags": [ { "title": "public", "description": null, "lineNumber": 3, "type": null }, { "title": "method", "description": null, "lineNumber": 4, "name": "create" }, { "title": "param", "description": "The configuration object.", "lineNumber": 5, "type": { "type": "NameExpression", "name": "config" }, "name": "config" }, { "title": "return", "description": "The SDK instance.", "lineNumber": 6, "type": { "type": "NameExpression", "name": "api" } }, { "title": "example", "description": "// Instantiate the SDK.\nimport { create } from 'kandy'\nconst client = create({\n authentication: { ... },\n logs: { ... },\n ...\n});\n// Use the SDK's API.\nclient.on( ... );", "lineNumber": 7 } ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 20, "column": 3 } }, "context": { "loc": { "start": { "line": 121, "column": 0 }, "end": { "line": 121, "column": 58 } }, "file": "/var/jenkins_home/workspace/Kandy.js_v4-support/builds/core/index.js" }, "augments": [], "examples": [ { "description": "// Instantiate the SDK.\nimport { create } from 'kandy'\nconst client = create({\n authentication: { ... },\n logs: { ... },\n ...\n});\n// Use the SDK's API.\nclient.on( ... );" } ], "implements": [], "params": [ { "title": "param", "name": "config", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The configuration object." } ] } ] }, "type": { "type": "NameExpression", "name": "config" } } ], "properties": [], "returns": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The SDK instance." } ] } ] }, "title": "returns", "type": { "type": "NameExpression", "name": "api" } } ], "sees": [], "throws": [], "todos": [], "yields": [], "access": "public", "kind": "function", "name": "create", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "create", "kind": "function" } ], "namespace": "create" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The configuration object. This object defines what different configuration\nvalues you can use when instantiating the SDK using the " }, { "type": "link", "url": "#create", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "create" } ] }, { "type": "text", "value": " function." } ] } ] }, "tags": [ { "title": "public", "description": null, "lineNumber": 3, "type": null }, { "title": "module", "description": null, "lineNumber": 4, "type": null, "name": "config" } ], "loc": { "start": { "line": 31, "column": 0 }, "end": { "line": 36, "column": 3 } }, "context": { "loc": { "start": { "line": 121, "column": 0 }, "end": { "line": 121, "column": 58 } }, "file": "/var/jenkins_home/workspace/Kandy.js_v4-support/builds/core/index.js" }, "augments": [], "examples": [], "implements": [], "params": [], "properties": [], "returns": [], "sees": [], "throws": [], "todos": [], "yields": [], "access": "public", "kind": "module", "name": "config", "members": { "global": [], "inner": [], "instance": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Configuration options for the Logs feature." } ] }, { "type": "paragraph", "children": [ { "type": "text", "value": "The SDK will log information about the operations it is performing. The\namount of information will depend on how the Logs feature is configured." } ] }, { "type": "paragraph", "children": [ { "type": "text", "value": "The format of logs can also be customized by providing a\n" }, { "type": "link", "url": "#loggerloghandler", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "LogHandler" } ] }, { "type": "text", "value": ". This function will receive a\n" }, { "type": "link", "url": "#loggerlogentry", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "LogEntry" } ] }, { "type": "text", "value": " which it can handle as it sees fit. By\ndefault, the SDK will log information to the console. For more\ninformation, see the " }, { "type": "link", "url": "#logger", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "Logs feature" } ] }, { "type": "text", "value": " description." } ] } ] }, "tags": [ { "title": "public", "description": null, "lineNumber": 12, "type": null }, { "title": "static", "description": null, "lineNumber": 13 }, { "title": "name", "description": null, "lineNumber": 14, "name": "config.logs" }, { "title": "memberof", "description": "config", "lineNumber": 15 }, { "title": "requires", "description": null, "lineNumber": 16, "name": "logs" }, { "title": "instance", "description": null, "lineNumber": 17 }, { "title": "param", "description": "Logs configs.", "lineNumber": 18, "type": { "type": "NameExpression", "name": "Object" }, "name": "logs" }, { "title": "param", "description": "Log level to be set. See {@link logger.levels}.", "lineNumber": 19, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "string" } }, "name": "logs.logLevel", "default": "'debug'" }, { "title": "param", "description": "The function to receive log entries from the\n SDK. If not provided, a default handler will be used that logs entries\n to the console.", "lineNumber": 20, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "logger.LogHandler" } }, "name": "logs.handler" }, { "title": "param", "description": "Enable the detailed call logger\n for v3.X. Requires log level debug.", "lineNumber": 23, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "boolean" } }, "name": "logs.enableFcsLogs", "default": "true" }, { "title": "param", "description": "Options specifically for action logs when\n logLevel is at DEBUG+ levels. Set this to false to not output action logs.", "lineNumber": 25, "type": { "type": "OptionalType", "expression": { "type": "UnionType", "elements": [ { "type": "NameExpression", "name": "Object" }, { "type": "NameExpression", "name": "boolean" } ] } }, "name": "logs.logActions", "default": "false" }, { "title": "param", "description": "The function to receive action\n log entries from the SDK. If not provided, a default handler will be used\n that logs actions to the console.", "lineNumber": 27, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "logger.LogHandler" } }, "name": "logs.logActions.handler" }, { "title": "param", "description": "Only output information\n about the action itself. Omits the SDK context for when it occurred.", "lineNumber": 30, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "boolean" } }, "name": "logs.logActions.actionOnly", "default": "false" }, { "title": "param", "description": "Whether logs should be\n minimized when initially output. The full log is still output and can be\n inspected on the console.", "lineNumber": 32, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "boolean" } }, "name": "logs.logActions.collapsed", "default": "false" }, { "title": "param", "description": "Include a diff of what SDK\n context was changed by the action.", "lineNumber": 35, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "boolean" } }, "name": "logs.logActions.diff", "default": "false" }, { "title": "param", "description": "Log level to be set\n on the action logs", "lineNumber": 37, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "string" } }, "name": "logs.logActions.level", "default": "'debug'" }, { "title": "param", "description": "Allow action payloads\n to be exposed in the logs, potentially displaying sensitive information.", "lineNumber": 39, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "boolean" } }, "name": "logs.logActions.exposePayloads", "default": "true" } ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 44, "column": 3 } }, "context": { "loc": { "start": { "line": 45, "column": 0 }, "end": { "line": 50, "column": 1 } }, "file": "/var/jenkins_home/workspace/Kandy.js_v4-support/packages/kandy/src/logs/config.js" }, "augments": [], "examples": [], "implements": [], "params": [ { "title": "param", "name": "logs", "lineNumber": 18, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Logs configs." } ] } ] }, "type": { "type": "NameExpression", "name": "Object" }, "properties": [ { "title": "param", "name": "logs.logLevel", "lineNumber": 19, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Log level to be set. See " }, { "type": "link", "url": "#loggerlevels", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "logger.levels" } ] }, { "type": "text", "value": "." } ] } ] }, "type": { "type": "NameExpression", "name": "string" }, "default": "'debug'" }, { "title": "param", "name": "logs.handler", "lineNumber": 20, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The function to receive log entries from the\nSDK. If not provided, a default handler will be used that logs entries\nto the console." } ] } ] }, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "logger.LogHandler" } } }, { "title": "param", "name": "logs.enableFcsLogs", "lineNumber": 23, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Enable the detailed call logger\nfor v3.X. Requires log level debug." } ] } ] }, "type": { "type": "NameExpression", "name": "boolean" }, "default": "true" }, { "title": "param", "name": "logs.logActions", "lineNumber": 25, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Options specifically for action logs when\nlogLevel is at DEBUG+ levels. Set this to false to not output action logs." } ] } ] }, "type": { "type": "UnionType", "elements": [ { "type": "NameExpression", "name": "Object" }, { "type": "NameExpression", "name": "boolean" } ] }, "default": "false", "properties": [ { "title": "param", "name": "logs.logActions.handler", "lineNumber": 27, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The function to receive action\nlog entries from the SDK. If not provided, a default handler will be used\nthat logs actions to the console." } ] } ] }, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "logger.LogHandler" } } }, { "title": "param", "name": "logs.logActions.actionOnly", "lineNumber": 30, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Only output information\nabout the action itself. Omits the SDK context for when it occurred." } ] } ] }, "type": { "type": "NameExpression", "name": "boolean" }, "default": "false" }, { "title": "param", "name": "logs.logActions.collapsed", "lineNumber": 32, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Whether logs should be\nminimized when initially output. The full log is still output and can be\ninspected on the console." } ] } ] }, "type": { "type": "NameExpression", "name": "boolean" }, "default": "false" }, { "title": "param", "name": "logs.logActions.diff", "lineNumber": 35, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Include a diff of what SDK\ncontext was changed by the action." } ] } ] }, "type": { "type": "NameExpression", "name": "boolean" }, "default": "false" }, { "title": "param", "name": "logs.logActions.level", "lineNumber": 37, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Log level to be set\non the action logs" } ] } ] }, "type": { "type": "NameExpression", "name": "string" }, "default": "'debug'" }, { "title": "param", "name": "logs.logActions.exposePayloads", "lineNumber": 39, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Allow action payloads\nto be exposed in the logs, potentially displaying sensitive information." } ] } ] }, "type": { "type": "NameExpression", "name": "boolean" }, "default": "true" } ] } ] } ], "properties": [], "returns": [], "sees": [], "throws": [], "todos": [], "yields": [], "access": "public", "scope": "instance", "name": "config.logs", "memberof": "config", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "config", "kind": "module" }, { "name": "config.logs", "scope": "instance" } ], "namespace": "config#config.logs" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Configuration options for the Authentication feature." } ] } ] }, "tags": [ { "title": "public", "description": null, "lineNumber": 2, "type": null }, { "title": "name", "description": null, "lineNumber": 3, "name": "config.authentication" }, { "title": "memberof", "description": "config", "lineNumber": 4 }, { "title": "instance", "description": null, "lineNumber": 5 }, { "title": "param", "description": "Authentication configs.", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Object" }, "name": "authentication" }, { "title": "param", "description": null, "lineNumber": 7, "type": { "type": "NameExpression", "name": "Object" }, "name": "authentication.subscription" }, { "title": "param", "description": "Hostname of the server to be used for subscription requests.", "lineNumber": 8, "type": { "type": "NameExpression", "name": "string" }, "name": "authentication.subscription.server" }, { "title": "param", "description": "Protocol to be used for subscription requests.", "lineNumber": 9, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "string" } }, "name": "authentication.subscription.protocol", "default": "'https'" }, { "title": "param", "description": "Port to be used for subscription requests.", "lineNumber": 10, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Number" } }, "name": "authentication.subscription.port", "default": "443" }, { "title": "param", "description": "Time duration, in seconds, until a subscription should expire.", "lineNumber": 11, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Number" } }, "name": "authentication.subscription.expires", "default": "3600" }, { "title": "param", "description": "Services to subscribe to for notifications. Default value is ['call', 'IM', 'presence'].", "lineNumber": 12, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Array" } }, "name": "authentication.subscription.service" }, { "title": "param", "description": null, "lineNumber": 13, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "string" } }, "name": "authentication.subscription.localization", "default": "English_US" }, { "title": "param", "description": null, "lineNumber": 14, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Boolean" } }, "name": "authentication.subscription.useTurn", "default": "true" }, { "title": "param", "description": null, "lineNumber": 15, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "string" } }, "name": "authentication.subscription.notificationType", "default": "Websocket" }, { "title": "param", "description": null, "lineNumber": 16, "type": { "type": "NameExpression", "name": "Object" }, "name": "authentication.websocket" }, { "title": "param", "description": "Hostname of the server to be used for websocket notifications.", "lineNumber": 17, "type": { "type": "NameExpression", "name": "string" }, "name": "authentication.websocket.server" }, { "title": "param", "description": "Protocol to be used for websocket notifications.", "lineNumber": 18, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "string" } }, "name": "authentication.websocket.protocol", "default": "'wss'" }, { "title": "param", "description": "Port to be used for websocket notifications.", "lineNumber": 19, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Number" } }, "name": "authentication.websocket.port", "default": "443" }, { "title": "param", "description": null, "lineNumber": 20, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Number" } }, "name": "authentication.earlyRefreshMargin", "default": "300" } ], "loc": { "start": { "line": 25, "column": 0 }, "end": { "line": 46, "column": 3 } }, "context": { "loc": { "start": { "line": 54, "column": 0 }, "end": { "line": 72, "column": 1 } }, "file": "/var/jenkins_home/workspace/Kandy.js_v4-support/packages/kandy/src/auth/uc/index.js" }, "augments": [], "examples": [], "implements": [], "params": [ { "title": "param", "name": "authentication", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Authentication configs." } ] } ] }, "type": { "type": "NameExpression", "name": "Object" }, "properties": [ { "title": "param", "name": "authentication.subscription", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Object" }, "properties": [ { "title": "param", "name": "authentication.subscription.server", "lineNumber": 8, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Hostname of the server to be used for subscription requests." } ] } ] }, "type": { "type": "NameExpression", "name": "string" } }, { "title": "param", "name": "authentication.subscription.protocol", "lineNumber": 9, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Protocol to be used for subscription requests." } ] } ] }, "type": { "type": "NameExpression", "name": "string" }, "default": "'https'" }, { "title": "param", "name": "authentication.subscription.port", "lineNumber": 10, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Port to be used for subscription requests." } ] } ] }, "type": { "type": "NameExpression", "name": "Number" }, "default": "443" }, { "title": "param", "name": "authentication.subscription.expires", "lineNumber": 11, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Time duration, in seconds, until a subscription should expire." } ] } ] }, "type": { "type": "NameExpression", "name": "Number" }, "default": "3600" }, { "title": "param", "name": "authentication.subscription.service", "lineNumber": 12, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Services to subscribe to for notifications. Default value is ['call', 'IM', 'presence']." } ] } ] }, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Array" } } }, { "title": "param", "name": "authentication.subscription.localization", "lineNumber": 13, "type": { "type": "NameExpression", "name": "string" }, "default": "English_US" }, { "title": "param", "name": "authentication.subscription.useTurn", "lineNumber": 14, "type": { "type": "NameExpression", "name": "Boolean" }, "default": "true" }, { "title": "param", "name": "authentication.subscription.notificationType", "lineNumber": 15, "type": { "type": "NameExpression", "name": "string" }, "default": "Websocket" } ] }, { "title": "param", "name": "authentication.websocket", "lineNumber": 16, "type": { "type": "NameExpression", "name": "Object" }, "properties": [ { "title": "param", "name": "authentication.websocket.server", "lineNumber": 17, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Hostname of the server to be used for websocket notifications." } ] } ] }, "type": { "type": "NameExpression", "name": "string" } }, { "title": "param", "name": "authentication.websocket.protocol", "lineNumber": 18, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Protocol to be used for websocket notifications." } ] } ] }, "type": { "type": "NameExpression", "name": "string" }, "default": "'wss'" }, { "title": "param", "name": "authentication.websocket.port", "lineNumber": 19, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Port to be used for websocket notifications." } ] } ] }, "type": { "type": "NameExpression", "name": "Number" }, "default": "443" } ] }, { "title": "param", "name": "authentication.earlyRefreshMargin", "lineNumber": 20, "type": { "type": "NameExpression", "name": "Number" }, "default": "300" } ] } ], "properties": [], "returns": [], "sees": [], "throws": [], "todos": [], "yields": [], "access": "public", "name": "config.authentication", "memberof": "config", "scope": "instance", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "config", "kind": "module" }, { "name": "config.authentication", "scope": "instance" } ], "namespace": "config#config.authentication" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Configuration options for the call feature." } ] } ] }, "tags": [ { "title": "public", "description": null, "lineNumber": 2, "type": null }, { "title": "name", "description": null, "lineNumber": 3, "name": "config.call" }, { "title": "memberof", "description": "config", "lineNumber": 4 }, { "title": "instance", "description": null, "lineNumber": 5 }, { "title": "param", "description": "The call configuration object.", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Object" }, "name": "call" }, { "title": "param", "description": "Default options to be used when making/answering a call.", "lineNumber": 7, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Object" } }, "name": "call.callDefaults" }, { "title": "param", "description": "Specifies whether audio is enabled or not.", "lineNumber": 8, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "boolean" } }, "name": "call.callDefaults.isAudioEnabled", "default": "true" }, { "title": "param", "description": "Specifies whether video is enabled or not.", "lineNumber": 9, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "boolean" } }, "name": "call.callDefaults.isVideoEnabled", "default": "true" }, { "title": "param", "description": "Specifies whether to send an initial video stream or not.", "lineNumber": 10, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "boolean" } }, "name": "call.callDefaults.sendInitialVideo", "default": "false" }, { "title": "param", "description": "Specifies the container where video (coming from remote party) is rendered.", "lineNumber": 11, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Object" } }, "name": "call.callDefaults.remoteVideoContainer" }, { "title": "param", "description": "Specifies the container where video (coming from local party) is rendered.", "lineNumber": 12, "type": { "type"