Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ export const asCodeQuerySchema = schema.object(
},
}),
},
{ meta: { id: 'kbn-as-code-query' } }
{
meta: {
id: 'kbn-as-code-query',
title: 'Query',
description:
'A search query consisting of an expression and its language. Supports KQL and Lucene syntax.',
},
}
);

export type AsCodeQuery = TypeOf<typeof asCodeQuerySchema>;
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ export const refreshIntervalSchema = schema.object(
{
pause: schema.boolean({
meta: {
description: 'Set to false to auto-refresh data on an interval.',
description: 'When `true`, auto-refresh is paused.',
},
}),
value: schema.number({
meta: {
description: 'A numeric value indicating refresh frequency in milliseconds.',
description: 'The refresh interval in milliseconds.',
},
}),
},
{ meta: { id: 'kbn-data-service-server-refreshIntervalSchema' } }
{
meta: {
id: 'kbn-data-service-server-refreshIntervalSchema',
title: 'Refresh interval',
description: 'Specifies the auto-refresh interval for the object.',
},
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,34 @@ const relativeTimeRangeMode = schema.literal('relative');

export const timeRangeSchema = schema.object(
{
from: schema.string(),
to: schema.string(),
mode: schema.maybe(schema.oneOf([absoluteTimeRangeMode, relativeTimeRangeMode])),
from: schema.string({
meta: {
description:
'The start of the time range. Accepts Elasticsearch [date math](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/common-options#date-math) expressions (for example, `now-7d`) or ISO 8601 timestamps.',
},
}),
to: schema.string({
meta: {
description:
'The end of the time range. Accepts Elasticsearch [date math](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/common-options#date-math) expressions (for example, `now`) or ISO 8601 timestamps.',
},
}),
mode: schema.maybe(
schema.oneOf([absoluteTimeRangeMode, relativeTimeRangeMode], {
meta: {
description:
'The time range mode. Use `absolute` for fixed start and end timestamps. Use `relative` for [date math](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/common-options#date-math) expressions that are re-evaluated at query time (for example, `now-7d`).',
},
})
),
},
{ meta: { id: 'kbn-es-query-server-timeRangeSchema' } }
{
meta: {
id: 'kbn-es-query-server-timeRangeSchema',
title: 'Time range',
description: 'Specifies the time range for a query.',
},
}
);

export const absoluteTimeRangeSchema = timeRangeSchema.extends(
Expand Down
Loading