Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the API docs bug, where optional functions on interfaces were losing their children. #107236

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions api_docs/actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@
],
"path": "x-pack/plugins/actions/server/types.ts",
"deprecated": false,
"returnComment": [],
"children": []
"children": [],
"returnComment": []
},
{
"parentPluginId": "actions",
Expand Down Expand Up @@ -1838,6 +1838,22 @@
],
"path": "x-pack/plugins/actions/common/rewrite_request_case.ts",
"deprecated": false,
"returnComment": [],
"children": [
{
"parentPluginId": "actions",
"id": "def-common.requested",
"type": "Object",
"tags": [],
"label": "requested",
"description": [],
"signature": [
"{ [K in keyof T as CamelToSnake<RenameActionToConnector<Extract<K, string>>>]: T[K]; }"
],
"path": "x-pack/plugins/actions/common/rewrite_request_case.ts",
"deprecated": false
}
],
"initialIsOpen": false
},
{
Expand Down Expand Up @@ -1868,6 +1884,22 @@
],
"path": "x-pack/plugins/actions/common/rewrite_request_case.ts",
"deprecated": false,
"returnComment": [],
"children": [
{
"parentPluginId": "actions",
"id": "def-common.responded",
"type": "Uncategorized",
"tags": [],
"label": "responded",
"description": [],
"signature": [
"T"
],
"path": "x-pack/plugins/actions/common/rewrite_request_case.ts",
"deprecated": false
}
],
"initialIsOpen": false
}
],
Expand Down
2 changes: 1 addition & 1 deletion api_docs/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import actionsObj from './actions.json';

| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 117 | 0 | 117 | 7 |
| 119 | 0 | 119 | 7 |

## Server

Expand Down
146 changes: 102 additions & 44 deletions api_docs/alerting.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,48 @@
],
"path": "x-pack/plugins/alerting/public/alert_navigation_registry/types.ts",
"deprecated": false,
"returnComment": [
"A URL that is meant to be relative to your application id, or a state object that your application uses to render\nthe rule. This information is intended to be used with cores NavigateToApp function, along with the application id that was\noriginally registered to {@link PluginSetupContract.registerNavigation}."
],
"children": [
{
"parentPluginId": "alerting",
"id": "def-public.alert",
"type": "Object",
"tags": [],
"label": "alert",
"description": [],
"signature": [
"{ enabled: boolean; id: string; name: string; params: never; actions: ",
{
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertingPluginApi",
"section": "def-common.AlertAction",
"text": "AlertAction"
},
"[]; throttle: string | null; tags: string[]; alertTypeId: string; consumer: string; schedule: ",
{
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertingPluginApi",
"section": "def-common.IntervalSchedule",
"text": "IntervalSchedule"
},
"; scheduledTaskId?: string | undefined; createdBy: string | null; updatedBy: string | null; createdAt: Date; updatedAt: Date; apiKeyOwner: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\" | null; muteAll: boolean; mutedInstanceIds: string[]; executionStatus: ",
{
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertingPluginApi",
"section": "def-common.AlertExecutionStatus",
"text": "AlertExecutionStatus"
},
"; }"
],
"path": "x-pack/plugins/alerting/public/alert_navigation_registry/types.ts",
"deprecated": false
}
],
"initialIsOpen": false
}
],
Expand Down Expand Up @@ -67,57 +109,63 @@
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false,
"returnComment": [],
"children": [
{
"parentPluginId": "alerting",
"id": "def-public.applicationId",
"id": "def-public.PluginSetupContract.registerNavigation.$1",
"type": "string",
"tags": [],
"label": "applicationId",
"description": [
"The application id that the user should be navigated to, to view a particular alert in a custom way."
],
"signature": [
"string"
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
},
{
"parentPluginId": "alerting",
"id": "def-public.ruleType",
"id": "def-public.PluginSetupContract.registerNavigation.$2",
"type": "string",
"tags": [],
"label": "ruleType",
"description": [
"The rule type that has been registered with Alerting.Server.PluginSetupContract.registerType. If\nno such rule with that id exists, a warning is output to the console log. It used to throw an error, but that was temporarily moved\nbecause it was causing flaky test failures with https://github.com/elastic/kibana/issues/59229 and needs to be\ninvestigated more."
],
"signature": [
"string"
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
},
{
"parentPluginId": "alerting",
"id": "def-public.handler",
"id": "def-public.PluginSetupContract.registerNavigation.$3",
"type": "Function",
"tags": [],
"label": "handler",
"description": [
"The navigation handler should return either a relative URL, or a state object. This information can be used,\nin conjunction with the consumer id, to navigate the user to a custom URL to view a rule's details."
],
"signature": [
"(alert: Pick<",
{
"pluginId": "alerting",
"scope": "common",
"scope": "public",
"docId": "kibAlertingPluginApi",
"section": "def-common.Alert",
"text": "Alert"
},
"<never>, \"enabled\" | \"id\" | \"name\" | \"params\" | \"actions\" | \"throttle\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">) => string | ",
"JsonObject"
"section": "def-public.AlertNavigationHandler",
"text": "AlertNavigationHandler"
}
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
}
]
],
"returnComment": []
},
{
"parentPluginId": "alerting",
Expand All @@ -141,45 +189,47 @@
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false,
"returnComment": [],
"children": [
{
"parentPluginId": "alerting",
"id": "def-public.applicationId",
"id": "def-public.PluginSetupContract.registerDefaultNavigation.$1",
"type": "string",
"tags": [],
"label": "applicationId",
"description": [
"The application id that the user should be navigated to, to view a particular alert in a custom way."
],
"signature": [
"string"
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
},
{
"parentPluginId": "alerting",
"id": "def-public.handler",
"id": "def-public.PluginSetupContract.registerDefaultNavigation.$2",
"type": "Function",
"tags": [],
"label": "handler",
"description": [
"The navigation handler should return either a relative URL, or a state object. This information can be used,\nin conjunction with the consumer id, to navigate the user to a custom URL to view a rule's details."
],
"signature": [
"(alert: Pick<",
{
"pluginId": "alerting",
"scope": "common",
"scope": "public",
"docId": "kibAlertingPluginApi",
"section": "def-common.Alert",
"text": "Alert"
},
"<never>, \"enabled\" | \"id\" | \"name\" | \"params\" | \"actions\" | \"throttle\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">) => string | ",
"JsonObject"
"section": "def-public.AlertNavigationHandler",
"text": "AlertNavigationHandler"
}
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
}
]
],
"returnComment": []
}
],
"lifecycle": "setup",
Expand Down Expand Up @@ -223,19 +273,23 @@
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false,
"returnComment": [],
"children": [
{
"parentPluginId": "alerting",
"id": "def-public.alertId",
"id": "def-public.PluginStartContract.getNavigation.$1",
"type": "string",
"tags": [],
"label": "alertId",
"description": [],
"signature": [
"string"
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
}
]
],
"returnComment": []
}
],
"lifecycle": "start",
Expand Down Expand Up @@ -955,8 +1009,8 @@
],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false,
"returnComment": [],
"children": []
"children": [],
"returnComment": []
},
{
"parentPluginId": "alerting",
Expand Down Expand Up @@ -995,8 +1049,8 @@
],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false,
"returnComment": [],
"children": []
"children": [],
"returnComment": []
},
{
"parentPluginId": "alerting",
Expand All @@ -1010,8 +1064,8 @@
],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false,
"returnComment": [],
"children": []
"children": [],
"returnComment": []
}
],
"initialIsOpen": false
Expand Down Expand Up @@ -1102,19 +1156,23 @@
],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false,
"returnComment": [],
"children": [
{
"parentPluginId": "alerting",
"id": "def-server.id",
"id": "def-server.AlertServices.alertInstanceFactory.$1",
"type": "string",
"tags": [],
"label": "id",
"description": [],
"signature": [
"string"
],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
}
]
],
"returnComment": []
}
],
"initialIsOpen": false
Expand Down Expand Up @@ -1660,8 +1718,8 @@
],
"path": "x-pack/plugins/alerting/server/plugin.ts",
"deprecated": false,
"returnComment": [],
"children": []
"children": [],
"returnComment": []
}
],
"initialIsOpen": false
Expand Down
2 changes: 1 addition & 1 deletion api_docs/alerting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import alertingObj from './alerting.json';

| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 242 | 0 | 234 | 16 |
| 243 | 0 | 235 | 16 |

## Client

Expand Down
Loading