kibana/api_docs/kbn_json_ast.devdocs.json

679 lines
No EOL
21 KiB
JSON

{
"id": "@kbn/json-ast",
"client": {
"classes": [],
"functions": [],
"interfaces": [],
"enums": [],
"misc": [],
"objects": []
},
"server": {
"classes": [],
"functions": [],
"interfaces": [],
"enums": [],
"misc": [],
"objects": []
},
"common": {
"classes": [],
"functions": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.addReferences",
"type": "Function",
"tags": [],
"label": "addReferences",
"description": [],
"signature": [
"(source: string, refsToAdd: string[]) => string"
],
"path": "packages/kbn-json-ast/src/references.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.addReferences.$1",
"type": "string",
"tags": [],
"label": "source",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/references.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.addReferences.$2",
"type": "Array",
"tags": [],
"label": "refsToAdd",
"description": [],
"signature": [
"string[]"
],
"path": "packages/kbn-json-ast/src/references.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.getPropFromSource",
"type": "Function",
"tags": [],
"label": "getPropFromSource",
"description": [],
"signature": [
"(source: string, name: string) => (babel.types.ObjectProperty & { key: babel.types.StringLiteral; }) | undefined"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.getPropFromSource.$1",
"type": "string",
"tags": [],
"label": "source",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.getPropFromSource.$2",
"type": "string",
"tags": [],
"label": "name",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeAllReferences",
"type": "Function",
"tags": [],
"label": "removeAllReferences",
"description": [],
"signature": [
"(source: string) => string"
],
"path": "packages/kbn-json-ast/src/references.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeAllReferences.$1",
"type": "string",
"tags": [],
"label": "source",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/references.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeCompilerOption",
"type": "Function",
"tags": [],
"label": "removeCompilerOption",
"description": [],
"signature": [
"(source: string, name: string) => string"
],
"path": "packages/kbn-json-ast/src/compiler_options.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeCompilerOption.$1",
"type": "string",
"tags": [],
"label": "source",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/compiler_options.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeCompilerOption.$2",
"type": "string",
"tags": [],
"label": "name",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/compiler_options.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeProp",
"type": "Function",
"tags": [],
"label": "removeProp",
"description": [
"\nRemoves a property from a JSONc object. If the property does not exist the source is just returned"
],
"signature": [
"(source: string, key: string, opts: { node?: babel.types.ObjectExpression | undefined; } | undefined) => string"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeProp.$1",
"type": "string",
"tags": [],
"label": "source",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeProp.$2",
"type": "string",
"tags": [],
"label": "key",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeProp.$3",
"type": "Object",
"tags": [],
"label": "opts",
"description": [],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeProp.$3.node",
"type": "Object",
"tags": [],
"label": "node",
"description": [],
"signature": [
"babel.types.ObjectExpression | undefined"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false
}
]
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeReferences",
"type": "Function",
"tags": [],
"label": "removeReferences",
"description": [],
"signature": [
"(source: string, refs: string[]) => string"
],
"path": "packages/kbn-json-ast/src/references.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeReferences.$1",
"type": "string",
"tags": [],
"label": "source",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/references.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.removeReferences.$2",
"type": "Array",
"tags": [],
"label": "refs",
"description": [],
"signature": [
"string[]"
],
"path": "packages/kbn-json-ast/src/references.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.replaceReferences",
"type": "Function",
"tags": [],
"label": "replaceReferences",
"description": [],
"signature": [
"(source: string, replacements: [path: string, pkgId: string][]) => string"
],
"path": "packages/kbn-json-ast/src/references.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.replaceReferences.$1",
"type": "string",
"tags": [],
"label": "source",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/references.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.replaceReferences.$2",
"type": "Array",
"tags": [],
"label": "replacements",
"description": [],
"signature": [
"[path: string, pkgId: string][]"
],
"path": "packages/kbn-json-ast/src/references.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setCompilerOption",
"type": "Function",
"tags": [],
"label": "setCompilerOption",
"description": [],
"signature": [
"(source: string, name: string, value: any) => string"
],
"path": "packages/kbn-json-ast/src/compiler_options.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setCompilerOption.$1",
"type": "string",
"tags": [],
"label": "source",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/compiler_options.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setCompilerOption.$2",
"type": "string",
"tags": [],
"label": "name",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/compiler_options.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setCompilerOption.$3",
"type": "Any",
"tags": [],
"label": "value",
"description": [],
"signature": [
"any"
],
"path": "packages/kbn-json-ast/src/compiler_options.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setExtends",
"type": "Function",
"tags": [],
"label": "setExtends",
"description": [],
"signature": [
"(jsonc: string, value: string) => string"
],
"path": "packages/kbn-json-ast/src/extends.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setExtends.$1",
"type": "string",
"tags": [],
"label": "jsonc",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/extends.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setExtends.$2",
"type": "string",
"tags": [],
"label": "value",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/extends.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setProp",
"type": "Function",
"tags": [],
"label": "setProp",
"description": [],
"signature": [
"(source: string, key: string, value: any, opts: { insertAtTop?: boolean | undefined; insertAfter?: babel.types.ObjectProperty | undefined; node?: babel.types.ObjectExpression | undefined; spaces?: string | undefined; } | undefined) => string"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setProp.$1",
"type": "string",
"tags": [],
"label": "source",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setProp.$2",
"type": "string",
"tags": [],
"label": "key",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setProp.$3",
"type": "Any",
"tags": [],
"label": "value",
"description": [],
"signature": [
"any"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setProp.$4",
"type": "Object",
"tags": [],
"label": "opts",
"description": [],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setProp.$4.insertAtTop",
"type": "CompoundType",
"tags": [],
"label": "insertAtTop",
"description": [
"by default, if the key isn't already in the json, it will be added at the bottom. Set this to true to add the key at the top instead"
],
"signature": [
"boolean | undefined"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setProp.$4.insertAfter",
"type": "Object",
"tags": [],
"label": "insertAfter",
"description": [
"by default, if the key isn't already in the json, it will be added at the bottom. Set this to an existing property node to have the key added after this node"
],
"signature": [
"babel.types.ObjectProperty | undefined"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setProp.$4.node",
"type": "Object",
"tags": [],
"label": "node",
"description": [
"In order to set the property an object other than the root object, parse the source and pass the node of the desired object here (make sure to also pass spaces)"
],
"signature": [
"babel.types.ObjectExpression | undefined"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.setProp.$4.spaces",
"type": "string",
"tags": [],
"label": "spaces",
"description": [
"This overrides the default \" \" spacing used for multi line or new properties that are added"
],
"signature": [
"string | undefined"
],
"path": "packages/kbn-json-ast/src/props.ts",
"deprecated": false,
"trackAdoption": false
}
]
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.snip",
"type": "Function",
"tags": [],
"label": "snip",
"description": [
"\nReplace or remove specific points of the source code"
],
"signature": [
"(source: string, snips: Snip[]) => string"
],
"path": "packages/kbn-json-ast/src/snip.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.snip.$1",
"type": "string",
"tags": [],
"label": "source",
"description": [],
"signature": [
"string"
],
"path": "packages/kbn-json-ast/src/snip.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "@kbn/json-ast",
"id": "def-common.snip.$2",
"type": "Array",
"tags": [],
"label": "snips",
"description": [],
"signature": [
"Snip[]"
],
"path": "packages/kbn-json-ast/src/snip.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
}
],
"interfaces": [],
"enums": [],
"misc": [],
"objects": []
}
}