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
523 changes: 520 additions & 3 deletions oas_docs/bundle.serverless.json

Large diffs are not rendered by default.

324 changes: 324 additions & 0 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39363,8 +39363,37 @@ paths:
minLength: 1
type: string
type: array
queries:
items:
allOf:
- type: object
properties:
id:
minLength: 1
type: string
title:
minLength: 1
type: string
required:
- id
- title
- type: object
properties:
kql:
additionalProperties: false
type: object
properties:
query:
minLength: 1
type: string
required:
- query
required:
- kql
type: array
required:
- dashboards
- queries
- type: object
properties:
stream:
Expand Down Expand Up @@ -40423,8 +40452,37 @@ paths:
minLength: 1
type: string
type: array
queries:
items:
allOf:
- type: object
properties:
id:
minLength: 1
type: string
title:
minLength: 1
type: string
required:
- id
- title
- type: object
properties:
kql:
additionalProperties: false
type: object
properties:
query:
minLength: 1
type: string
required:
- query
required:
- kql
type: array
required:
- dashboards
- queries
- type: object
properties:
stream:
Expand Down Expand Up @@ -41336,8 +41394,37 @@ paths:
minLength: 1
type: string
type: array
queries:
items:
allOf:
- type: object
properties:
id:
minLength: 1
type: string
title:
minLength: 1
type: string
required:
- id
- title
- type: object
properties:
kql:
additionalProperties: false
type: object
properties:
query:
minLength: 1
type: string
required:
- query
required:
- kql
type: array
required:
- dashboards
- queries
- type: object
properties:
stream:
Expand Down Expand Up @@ -43779,6 +43866,243 @@ paths:
tags:
- streams
x-state: Technical Preview
/api/streams/{name}/queries:
get:
description: Fetches all queries linked to a stream that are visible to the current user in the current space.
operationId: get-streams-name-queries
parameters:
- in: path
name: name
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
anyOf:
- additionalProperties: false
type: object
properties: {}
- enum:
- 'null'
nullable: true
- not: {}
responses: {}
summary: Get stream queries
tags:
- streams
x-state: Technical Preview
/api/streams/{name}/queries/_bulk:
post:
description: Bulk update queries of a stream. Can add new queries and delete existing ones.
operationId: post-streams-name-queries-bulk
parameters:
- description: A required header to protect against CSRF attacks
in: header
name: kbn-xsrf
required: true
schema:
example: 'true'
type: string
- in: path
name: name
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
additionalProperties: false
type: object
properties:
operations:
items:
anyOf:
- additionalProperties: false
type: object
properties:
index:
allOf:
- type: object
properties:
id:
minLength: 1
type: string
title:
minLength: 1
type: string
required:
- id
- title
- type: object
properties:
kql:
additionalProperties: false
type: object
properties:
query:
minLength: 1
type: string
required:
- query
required:
- kql
required:
- index
- additionalProperties: false
type: object
properties:
delete:
additionalProperties: false
type: object
properties:
id:
type: string
required:
- id
required:
- delete
type: array
required:
- operations
responses: {}
summary: Bulk update queries
tags:
- streams
x-state: Technical Preview
/api/streams/{name}/queries/{queryId}:
delete:
description: Remove a query from a stream. Noop if the query is not found on the stream.
operationId: delete-streams-name-queries-queryid
parameters:
- description: A required header to protect against CSRF attacks
in: header
name: kbn-xsrf
required: true
schema:
example: 'true'
type: string
- in: path
name: name
required: true
schema:
type: string
- in: path
name: queryId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
anyOf:
- additionalProperties: false
type: object
properties: {}
- enum:
- 'null'
nullable: true
- not: {}
responses: {}
summary: Remove a query from a stream
tags:
- streams
x-state: Technical Preview
put:
description: Adds a query to a stream. Noop if the query is already present on the stream.
operationId: put-streams-name-queries-queryid
parameters:
- description: A required header to protect against CSRF attacks
in: header
name: kbn-xsrf
required: true
schema:
example: 'true'
type: string
- in: path
name: name
required: true
schema:
type: string
- in: path
name: queryId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
additionalProperties: false
type: object
properties:
kql:
additionalProperties: false
type: object
properties:
query:
minLength: 1
type: string
required:
- query
title:
minLength: 1
type: string
required:
- title
- kql
responses: {}
summary: Upsert a query to a stream
tags:
- streams
x-state: Technical Preview
/api/streams/{name}/significant_events:
get:
description: Read the significant events
operationId: get-streams-name-significant-events
parameters:
- in: path
name: name
required: true
schema:
type: string
- in: query
name: from
required: true
schema:
format: date-time
type: string
- in: query
name: to
required: true
schema:
format: date-time
type: string
- in: query
name: bucketSize
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
anyOf:
- additionalProperties: false
type: object
properties: {}
- enum:
- 'null'
nullable: true
- not: {}
responses: {}
summary: Read the significant events
tags:
- streams
x-state: Technical Preview
/api/task_manager/_health:
get:
description: |
Expand Down
24 changes: 12 additions & 12 deletions src/platform/packages/shared/kbn-storage-adapter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,24 +135,24 @@ type Exact<T, U> = T extends U
// The IStorageClient type then checks if the application type is a subset of the storage
// document type. If this is not the case, the IStorageClient type is set to never, which
// will cause a type error in the consuming code.
export type IStorageClient<TSchema extends IndexStorageSettings, TApplicationType> = Exact<
ApplicationDocument<TApplicationType>,
Partial<StorageDocumentOf<TSchema>>
> extends true
? InternalIStorageClient<ApplicationDocument<TApplicationType>>
export type IStorageClient<
TSchema extends IndexStorageSettings,
TApplicationType extends StorageDocumentOf<TSchema>
> = Exact<TApplicationType, StorageDocumentOf<TSchema>> extends true
? InternalIStorageClient<TApplicationType>
: never;

export type SimpleIStorageClient<TStorageSettings extends IndexStorageSettings> = IStorageClient<
TStorageSettings,
Omit<StorageDocumentOf<TStorageSettings>, '_id'>
StorageDocumentOf<TStorageSettings>
>;

export type ApplicationDocument<TApplicationType> = TApplicationType & { _id: string };

export type StorageDocumentOf<TStorageSettings extends StorageSettings> = StorageFieldTypeOf<{
type: 'object';
properties: TStorageSettings['schema']['properties'];
}> & { _id: string };
export type StorageDocumentOf<TStorageSettings extends StorageSettings> = Partial<
StorageFieldTypeOf<{
type: 'object';
properties: TStorageSettings['schema']['properties'];
}>
>;

export { StorageIndexAdapter } from './src/index_adapter';

Expand Down
Loading