@kandy-io/uc-sdk-3.x
Version:
1,560 lines (1,559 loc) • 2.25 MB
JSON
[
{
"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 refered as 'api' throughout the rest of the documentation content.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 92,
"offset": 204
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 92,
"offset": 204
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 92,
"offset": 204
}
}
},
"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_master/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( ... );"
}
],
"params": [
{
"title": "param",
"name": "config",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The configuration object.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 26,
"offset": 25
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 26,
"offset": 25
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 26,
"offset": 25
}
}
},
"type": {
"type": "NameExpression",
"name": "config"
}
}
],
"properties": [],
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The SDK instance.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
}
}
},
"title": "returns",
"type": {
"type": "NameExpression",
"name": "api"
}
}
],
"sees": [],
"throws": [],
"todos": [],
"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 ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 57,
"offset": 131
},
"indent": [
1
]
}
},
{
"type": "link",
"url": "#create",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "create"
}
],
"position": {
"start": {
"line": 2,
"column": 57,
"offset": 131
},
"end": {
"line": 2,
"column": 71,
"offset": 145
},
"indent": []
}
},
{
"type": "text",
"value": " function.",
"position": {
"start": {
"line": 2,
"column": 71,
"offset": 145
},
"end": {
"line": 2,
"column": 81,
"offset": 155
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 81,
"offset": 155
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 81,
"offset": 155
}
}
},
"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_master/builds/core/index.js"
},
"augments": [],
"examples": [],
"params": [],
"properties": [],
"returns": [],
"sees": [],
"throws": [],
"todos": [],
"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.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 44,
"offset": 43
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 44,
"offset": 43
},
"indent": []
}
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The SDK will log information about the operations it is performing. The\n amount of information will depend on how the Logs feature is configured.",
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 45
},
"end": {
"line": 4,
"column": 76,
"offset": 192
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 45
},
"end": {
"line": 4,
"column": 76,
"offset": 192
},
"indent": [
1
]
}
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The format of logs can also be customized by providing a\n ",
"position": {
"start": {
"line": 6,
"column": 1,
"offset": 194
},
"end": {
"line": 7,
"column": 4,
"offset": 254
},
"indent": [
1
]
}
},
{
"type": "link",
"url": "#loggerloghandler",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "LogHandler"
}
],
"position": {
"start": {
"line": 7,
"column": 4,
"offset": 254
},
"end": {
"line": 7,
"column": 40,
"offset": 290
},
"indent": []
}
},
{
"type": "text",
"value": ". This function will receive a\n ",
"position": {
"start": {
"line": 7,
"column": 40,
"offset": 290
},
"end": {
"line": 8,
"column": 4,
"offset": 324
},
"indent": [
1
]
}
},
{
"type": "link",
"url": "#loggerlogentry",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "LogEntry"
}
],
"position": {
"start": {
"line": 8,
"column": 4,
"offset": 324
},
"end": {
"line": 8,
"column": 36,
"offset": 356
},
"indent": []
}
},
{
"type": "text",
"value": " which it can handle as it sees fit. By\n default, the SDK will log information to the console. For more\n information, see the ",
"position": {
"start": {
"line": 8,
"column": 36,
"offset": 356
},
"end": {
"line": 10,
"column": 25,
"offset": 486
},
"indent": [
1,
1
]
}
},
{
"type": "link",
"url": "#logger",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "Logs feature"
}
],
"position": {
"start": {
"line": 10,
"column": 25,
"offset": 486
},
"end": {
"line": 10,
"column": 52,
"offset": 513
},
"indent": []
}
},
{
"type": "text",
"value": " description.",
"position": {
"start": {
"line": 10,
"column": 52,
"offset": 513
},
"end": {
"line": 10,
"column": 65,
"offset": 526
},
"indent": []
}
}
],
"position": {
"start": {
"line": 6,
"column": 1,
"offset": 194
},
"end": {
"line": 10,
"column": 65,
"offset": 526
},
"indent": [
1,
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 10,
"column": 65,
"offset": 526
}
}
},
"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_master/packages/kandy/src/logs/config.js"
},
"augments": [],
"examples": [],
"params": [
{
"title": "param",
"name": "logs",
"lineNumber": 18,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Logs configs.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 14,
"offset": 13
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 14,
"offset": 13
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 14,
"offset": 13
}
}
},
"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 ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 26,
"offset": 25
},
"indent": []
}
},
{
"type": "link",
"url": "#loggerlevels",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "logger.levels"
}
],
"position": {
"start": {
"line": 1,
"column": 26,
"offset": 25
},
"end": {
"line": 1,
"column": 47,
"offset": 46
},
"indent": []
}
},
{
"type": "text",
"value": ".",
"position": {
"start": {
"line": 1,
"column": 47,
"offset": 46
},
"end": {
"line": 1,
"column": 48,
"offset": 47
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 48,
"offset": 47
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 48,
"offset": 47
}
}
},
"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\n SDK. If not provided, a default handler will be used that logs entries\n to the console.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 19,
"offset": 137
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 19,
"offset": 137
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 19,
"offset": 137
}
}
},
"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\n for v3.X. Requires log level debug.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 39,
"offset": 70
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 39,
"offset": 70
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 39,
"offset": 70
}
}
},
"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\n logLevel is at DEBUG+ levels. Set this to false to not output action logs.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 78,
"offset": 119
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 78,
"offset": 119
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 78,
"offset": 119
}
}
},
"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\n log entries from the SDK. If not provided, a default handler will be used\n that logs actions to the console.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 37,
"offset": 144
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 37,
"offset": 144
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 37,
"offset": 144
}
}
},
"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\n about the action itself. Omits the SDK context for when it occurred.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 72,
"offset": 95
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 72,
"offset": 95
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 72,
"offset": 95
}
}
},
"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\n minimized when initially output. The full log is still output and can be\n inspected on the console.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 29,
"offset": 127
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 29,
"offset": 127
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 29,
"offset": 127
}
}
},
"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\n context was changed by the action.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 38,
"offset": 64
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 38,
"offset": 64
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 38,
"offset": 64
}
}
},
"type": {
"type": "NameExpression",
"name": "boolean"
},
"default": "false"
},
{
"title": "param",
"name": "logs.logActions.level",
"lineNumber": 37,
"description": {
"type": "root",
"children": [