mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[SecuritySolution][Endpoint] Open API spec updates for public Endpoint APIs (#187634)
## Summary
Updates/Adds Open API specs for existing public Endpoint APIs. The PR
includes deperated API schemas as well but we can remove them if we all
agree to it.
Note: The PR doesn't change existing kibana schemas that is used in our
server routes and most of the changes in here are file moves and
updating imports to unify duplicate naming/import. This to ensure that
we can easily maintain the open api specs going forward. The best way to
review this is by looking at commits. The major moving cleaning up
happens after commit names prefixed with **_refactor_** or
`645fbc0f1d
` and onwards. I would also
suggest hiding whitespaces when reviewing via Github.
closes elastic/kibana/issues/183816
### Checklist
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
fe1b7b18ae
commit
f3aeb81fd6
126 changed files with 1956 additions and 1132 deletions
|
@ -10,23 +10,18 @@
|
|||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Audit Log Schema
|
||||
* title: Action Log Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { Page, PageSize, StartDate, EndDate, AgentId } from '../model/schema/common.gen';
|
||||
import { Page, PageSize, StartDate, EndDate } from '../../model/schema/common.gen';
|
||||
|
||||
export type AuditLogRequestQuery = z.infer<typeof AuditLogRequestQuery>;
|
||||
export const AuditLogRequestQuery = z.object({
|
||||
export type ActionLogRequestQuery = z.infer<typeof ActionLogRequestQuery>;
|
||||
export const ActionLogRequestQuery = z.object({
|
||||
page: Page.optional(),
|
||||
page_size: PageSize.optional(),
|
||||
start_date: StartDate.optional(),
|
||||
end_date: EndDate.optional(),
|
||||
});
|
||||
|
||||
export type AuditLogRequestParams = z.infer<typeof AuditLogRequestParams>;
|
||||
export const AuditLogRequestParams = z.object({
|
||||
agent_id: AgentId.optional(),
|
||||
});
|
|
@ -0,0 +1,45 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: Action Log Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action_log/{agent_id}:
|
||||
get:
|
||||
summary: Get action requests log schema
|
||||
operationId: EndpointGetActionLog
|
||||
description: Get action requests log
|
||||
deprecated: true
|
||||
x-codegen-enabled: false
|
||||
x-labels: [ess, serverless]
|
||||
parameters:
|
||||
- name: agent_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/AgentId'
|
||||
- name: query
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/components/schemas/ActionLogRequestQuery'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
ActionLogRequestQuery:
|
||||
type: object
|
||||
properties:
|
||||
page:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/Page'
|
||||
page_size:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/PageSize'
|
||||
start_date:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/StartDate'
|
||||
end_date:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/EndDate'
|
|
@ -5,6 +5,5 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { NoParametersRequestSchema } from './common/base';
|
||||
|
||||
export const UnisolateRouteRequestSchema = NoParametersRequestSchema;
|
||||
export * from './action_log';
|
||||
export * from './deprecated_action_log.gen';
|
|
@ -1,131 +0,0 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: Endpoint Actions Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action/state:
|
||||
get:
|
||||
summary: Get Action State schema
|
||||
operationId: EndpointGetActionsState
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
/api/endpoint/action/running_procs:
|
||||
post:
|
||||
summary: Get Running Processes Action
|
||||
operationId: EndpointGetRunningProcessesAction
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
/api/endpoint/action/isolate:
|
||||
post:
|
||||
summary: Isolate host Action
|
||||
operationId: EndpointIsolateHostAction
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
/api/endpoint/action/unisolate:
|
||||
post:
|
||||
summary: Unisolate host Action
|
||||
operationId: EndpointUnisolateHostAction
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
/api/endpoint/action/kill_process:
|
||||
post:
|
||||
summary: Kill process Action
|
||||
operationId: EndpointKillProcessAction
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/ProcessActionSchemas'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
|
||||
/api/endpoint/action/suspend_process:
|
||||
post:
|
||||
summary: Suspend process Action
|
||||
operationId: EndpointSuspendProcessAction
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/ProcessActionSchemas'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
|
@ -1,51 +0,0 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: Audit Log Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action_log/{agent_id}:
|
||||
get:
|
||||
summary: Get action audit log schema
|
||||
operationId: EndpointGetActionAuditLog
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
parameters:
|
||||
- name: query
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/components/schemas/AuditLogRequestQuery'
|
||||
- name: query
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/components/schemas/AuditLogRequestParams'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
AuditLogRequestQuery:
|
||||
type: object
|
||||
properties:
|
||||
page:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/Page'
|
||||
page_size:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/PageSize'
|
||||
start_date:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/StartDate'
|
||||
end_date:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/EndDate'
|
||||
|
||||
AuditLogRequestParams:
|
||||
type: object
|
||||
properties:
|
||||
agent_id:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/AgentId'
|
|
@ -7,24 +7,27 @@
|
|||
|
||||
import type { TypeOf } from '@kbn/config-schema';
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import {
|
||||
KillProcessRouteRequestSchema,
|
||||
SuspendProcessRouteRequestSchema,
|
||||
UploadActionRequestSchema,
|
||||
} from '../..';
|
||||
import { ExecuteActionRequestSchema } from '../execute_route';
|
||||
import { EndpointActionGetFileSchema } from '../get_file_route';
|
||||
import { ScanActionRequestSchema } from '../scan_route';
|
||||
import { NoParametersRequestSchema } from './base';
|
||||
|
||||
import { ExecuteActionRequestSchema } from '../response_actions/execute';
|
||||
import { EndpointActionGetFileSchema } from '../response_actions/get_file';
|
||||
import { ScanActionRequestSchema } from '../response_actions/scan';
|
||||
import { IsolateRouteRequestSchema } from '../response_actions/isolate';
|
||||
import { UnisolateRouteRequestSchema } from '../response_actions/unisolate';
|
||||
import { GetProcessesRouteRequestSchema } from '../response_actions/running_procs';
|
||||
import { KillProcessRouteRequestSchema } from '../response_actions/kill_process';
|
||||
import { SuspendProcessRouteRequestSchema } from '../response_actions/suspend_process';
|
||||
import { UploadActionRequestSchema } from '../response_actions/upload';
|
||||
|
||||
export const ResponseActionBodySchema = schema.oneOf([
|
||||
NoParametersRequestSchema.body,
|
||||
IsolateRouteRequestSchema.body,
|
||||
UnisolateRouteRequestSchema.body,
|
||||
GetProcessesRouteRequestSchema.body,
|
||||
KillProcessRouteRequestSchema.body,
|
||||
SuspendProcessRouteRequestSchema.body,
|
||||
EndpointActionGetFileSchema.body,
|
||||
ExecuteActionRequestSchema.body,
|
||||
ScanActionRequestSchema.body,
|
||||
UploadActionRequestSchema.body,
|
||||
ScanActionRequestSchema.body,
|
||||
]);
|
||||
|
||||
export type ResponseActionsRequestBody = TypeOf<typeof ResponseActionBodySchema>;
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Details Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { SuccessResponse } from '../../model/schema/common.gen';
|
||||
|
||||
export type EndpointGetActionsDetailsRequestParams = z.infer<
|
||||
typeof EndpointGetActionsDetailsRequestParams
|
||||
>;
|
||||
export const EndpointGetActionsDetailsRequestParams = z.object({
|
||||
action_id: z.string(),
|
||||
});
|
||||
export type EndpointGetActionsDetailsRequestParamsInput = z.input<
|
||||
typeof EndpointGetActionsDetailsRequestParams
|
||||
>;
|
||||
|
||||
export type EndpointGetActionsDetailsResponse = z.infer<typeof EndpointGetActionsDetailsResponse>;
|
||||
export const EndpointGetActionsDetailsResponse = SuccessResponse;
|
|
@ -7,28 +7,21 @@ paths:
|
|||
get:
|
||||
summary: Get Action details schema
|
||||
operationId: EndpointGetActionsDetails
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
description: Get action details
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
parameters:
|
||||
- name: query
|
||||
- name: action_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/components/schemas/DetailsRequestParams'
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
components:
|
||||
schemas:
|
||||
DetailsRequestParams:
|
||||
type: object
|
||||
properties:
|
||||
action_id:
|
||||
type: string
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './details';
|
||||
export * from './details.gen';
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Execute Action Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { BaseActionSchema, Command, Timeout } from '../model/schema/common.gen';
|
||||
|
||||
export type ExecuteActionRequestBody = z.infer<typeof ExecuteActionRequestBody>;
|
||||
export const ExecuteActionRequestBody = BaseActionSchema.merge(
|
||||
z.object({
|
||||
parameters: z.object({
|
||||
command: Command,
|
||||
timeout: Timeout.optional(),
|
||||
}),
|
||||
})
|
||||
);
|
|
@ -1,39 +0,0 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: File Download Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action/{action_id}/file/{file_id}/download`:
|
||||
get:
|
||||
summary: File Download schema
|
||||
operationId: EndpointFileDownload
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
parameters:
|
||||
- name: query
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/components/schemas/FileDownloadRequestParams'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
components:
|
||||
schemas:
|
||||
FileDownloadRequestParams:
|
||||
type: object
|
||||
required:
|
||||
- action_id
|
||||
- file_id
|
||||
properties:
|
||||
action_id:
|
||||
type: string
|
||||
file_id:
|
||||
type: string
|
||||
|
|
@ -16,8 +16,16 @@
|
|||
|
||||
import { z } from 'zod';
|
||||
|
||||
export type FileDownloadRequestParams = z.infer<typeof FileDownloadRequestParams>;
|
||||
export const FileDownloadRequestParams = z.object({
|
||||
import { SuccessResponse } from '../../model/schema/common.gen';
|
||||
|
||||
export type EndpointFileDownloadRequestParams = z.infer<typeof EndpointFileDownloadRequestParams>;
|
||||
export const EndpointFileDownloadRequestParams = z.object({
|
||||
action_id: z.string(),
|
||||
file_id: z.string(),
|
||||
});
|
||||
export type EndpointFileDownloadRequestParamsInput = z.input<
|
||||
typeof EndpointFileDownloadRequestParams
|
||||
>;
|
||||
|
||||
export type EndpointFileDownloadResponse = z.infer<typeof EndpointFileDownloadResponse>;
|
||||
export const EndpointFileDownloadResponse = SuccessResponse;
|
|
@ -0,0 +1,30 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: File Download Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action/{action_id}/file/{file_id}/download`:
|
||||
get:
|
||||
summary: File Download schema
|
||||
operationId: EndpointFileDownload
|
||||
description: Download a file from an endpoint
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
parameters:
|
||||
- name: action_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: file_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './file_download';
|
||||
export * from './file_download.gen';
|
|
@ -1,40 +0,0 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: File Info Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action/{action_id}/file/{file_id}`:
|
||||
get:
|
||||
summary: File Info schema
|
||||
operationId: EndpointFileInfo
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
parameters:
|
||||
- name: query
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/components/schemas/FileInfoRequestParams'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
FileInfoRequestParams:
|
||||
type: object
|
||||
required:
|
||||
- action_id
|
||||
- file_id
|
||||
properties:
|
||||
action_id:
|
||||
type: string
|
||||
file_id:
|
||||
type: string
|
||||
|
|
@ -16,8 +16,14 @@
|
|||
|
||||
import { z } from 'zod';
|
||||
|
||||
export type FileInfoRequestParams = z.infer<typeof FileInfoRequestParams>;
|
||||
export const FileInfoRequestParams = z.object({
|
||||
import { SuccessResponse } from '../../model/schema/common.gen';
|
||||
|
||||
export type EndpointFileInfoRequestParams = z.infer<typeof EndpointFileInfoRequestParams>;
|
||||
export const EndpointFileInfoRequestParams = z.object({
|
||||
action_id: z.string(),
|
||||
file_id: z.string(),
|
||||
});
|
||||
export type EndpointFileInfoRequestParamsInput = z.input<typeof EndpointFileInfoRequestParams>;
|
||||
|
||||
export type EndpointFileInfoResponse = z.infer<typeof EndpointFileInfoResponse>;
|
||||
export const EndpointFileInfoResponse = SuccessResponse;
|
|
@ -0,0 +1,30 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: File Info Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action/{action_id}/file/{file_id}`:
|
||||
get:
|
||||
summary: File Info schema
|
||||
operationId: EndpointFileInfo
|
||||
description: Get file info
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
parameters:
|
||||
- name: action_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: file_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './file_info';
|
||||
export * from './file_info.gen';
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: File Upload Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { BaseActionSchema } from '../model/schema/common.gen';
|
||||
|
||||
export type FileUploadActionRequestBody = z.infer<typeof FileUploadActionRequestBody>;
|
||||
export const FileUploadActionRequestBody = BaseActionSchema.merge(
|
||||
z.object({
|
||||
parameters: z.object({
|
||||
overwrite: z.boolean().optional().default(false),
|
||||
}),
|
||||
file: z.string(),
|
||||
})
|
||||
);
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Get File Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { BaseActionSchema } from '../model/schema/common.gen';
|
||||
|
||||
export type GetFileActionRequestBody = z.infer<typeof GetFileActionRequestBody>;
|
||||
export const GetFileActionRequestBody = BaseActionSchema.merge(
|
||||
z.object({
|
||||
parameters: z.object({
|
||||
path: z.string(),
|
||||
}),
|
||||
})
|
||||
);
|
|
@ -1,53 +0,0 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: Actions List Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action:
|
||||
get:
|
||||
summary: Get Actions List schema
|
||||
operationId: EndpointGetActionsList
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
parameters:
|
||||
- name: query
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/components/schemas/EndpointActionListRequestQuery'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
components:
|
||||
schemas:
|
||||
EndpointActionListRequestQuery:
|
||||
type: object
|
||||
properties:
|
||||
agentIds:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/AgentIds'
|
||||
commands:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/Commands'
|
||||
page:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/Page'
|
||||
pageSize:
|
||||
type: integer
|
||||
default: 10
|
||||
minimum: 1
|
||||
maximum: 10000
|
||||
description: Number of items per page
|
||||
startDate:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/StartDate'
|
||||
endDate:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/EndDate'
|
||||
userIds:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/UserIds'
|
||||
types:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/Types'
|
||||
withOutputs:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/WithOutputs'
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './list';
|
||||
export * from './list.gen';
|
|
@ -17,7 +17,9 @@
|
|||
import { z } from 'zod';
|
||||
|
||||
import {
|
||||
SuccessResponse,
|
||||
AgentIds,
|
||||
AgentTypes,
|
||||
Commands,
|
||||
Page,
|
||||
StartDate,
|
||||
|
@ -25,11 +27,12 @@ import {
|
|||
UserIds,
|
||||
Types,
|
||||
WithOutputs,
|
||||
} from '../model/schema/common.gen';
|
||||
} from '../../model/schema/common.gen';
|
||||
|
||||
export type EndpointActionListRequestQuery = z.infer<typeof EndpointActionListRequestQuery>;
|
||||
export const EndpointActionListRequestQuery = z.object({
|
||||
export type GetEndpointActionListRouteQuery = z.infer<typeof GetEndpointActionListRouteQuery>;
|
||||
export const GetEndpointActionListRouteQuery = z.object({
|
||||
agentIds: AgentIds.optional(),
|
||||
agentTypes: AgentTypes.optional(),
|
||||
commands: Commands.optional(),
|
||||
page: Page.optional(),
|
||||
/**
|
||||
|
@ -42,3 +45,14 @@ export const EndpointActionListRequestQuery = z.object({
|
|||
types: Types.optional(),
|
||||
withOutputs: WithOutputs.optional(),
|
||||
});
|
||||
|
||||
export type EndpointGetActionsListRequestQuery = z.infer<typeof EndpointGetActionsListRequestQuery>;
|
||||
export const EndpointGetActionsListRequestQuery = z.object({
|
||||
query: GetEndpointActionListRouteQuery,
|
||||
});
|
||||
export type EndpointGetActionsListRequestQueryInput = z.input<
|
||||
typeof EndpointGetActionsListRequestQuery
|
||||
>;
|
||||
|
||||
export type EndpointGetActionsListResponse = z.infer<typeof EndpointGetActionsListResponse>;
|
||||
export const EndpointGetActionsListResponse = SuccessResponse;
|
|
@ -0,0 +1,54 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: Actions List Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action:
|
||||
get:
|
||||
summary: Get Actions List schema
|
||||
operationId: EndpointGetActionsList
|
||||
description: Get a list of action requests and their responses
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
parameters:
|
||||
- name: query
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/components/schemas/GetEndpointActionListRouteQuery'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
components:
|
||||
schemas:
|
||||
GetEndpointActionListRouteQuery:
|
||||
type: object
|
||||
properties:
|
||||
agentIds:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/AgentIds'
|
||||
agentTypes:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/AgentTypes'
|
||||
commands:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/Commands'
|
||||
page:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/Page'
|
||||
pageSize:
|
||||
type: integer
|
||||
default: 10
|
||||
minimum: 1
|
||||
maximum: 10000
|
||||
description: Number of items per page
|
||||
startDate:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/StartDate'
|
||||
endDate:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/EndDate'
|
||||
userIds:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/UserIds'
|
||||
types:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/Types'
|
||||
withOutputs:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/WithOutputs'
|
|
@ -12,9 +12,9 @@ import {
|
|||
RESPONSE_ACTION_API_COMMANDS_NAMES,
|
||||
RESPONSE_ACTION_STATUS,
|
||||
RESPONSE_ACTION_TYPE,
|
||||
} from '../../../endpoint/service/response_actions/constants';
|
||||
import { ENDPOINT_DEFAULT_PAGE_SIZE } from '../../../endpoint/constants';
|
||||
import { agentTypesSchema } from './common/base';
|
||||
} from '../../../../endpoint/service/response_actions/constants';
|
||||
import { ENDPOINT_DEFAULT_PAGE_SIZE } from '../../../../endpoint/constants';
|
||||
import { agentTypesSchema } from '../common/base';
|
||||
|
||||
const commandsSchema = schema.oneOf(
|
||||
// @ts-expect-error TS2769: No overload matches this call
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Execute Action Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import {
|
||||
SuccessResponse,
|
||||
BaseActionSchema,
|
||||
Command,
|
||||
Timeout,
|
||||
} from '../../../model/schema/common.gen';
|
||||
|
||||
export type ExecuteRouteRequestBody = z.infer<typeof ExecuteRouteRequestBody>;
|
||||
export const ExecuteRouteRequestBody = BaseActionSchema.merge(
|
||||
z.object({
|
||||
parameters: z.object({
|
||||
command: Command,
|
||||
timeout: Timeout.optional(),
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
export type EndpointExecuteActionRequestBody = z.infer<typeof EndpointExecuteActionRequestBody>;
|
||||
export const EndpointExecuteActionRequestBody = ExecuteRouteRequestBody;
|
||||
export type EndpointExecuteActionRequestBodyInput = z.input<
|
||||
typeof EndpointExecuteActionRequestBody
|
||||
>;
|
||||
|
||||
export type EndpointExecuteActionResponse = z.infer<typeof EndpointExecuteActionResponse>;
|
||||
export const EndpointExecuteActionResponse = SuccessResponse;
|
|
@ -7,29 +7,28 @@ paths:
|
|||
post:
|
||||
summary: Execute Action
|
||||
operationId: EndpointExecuteAction
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
description: Execute a given command on an endpoint
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ExecuteActionRequestBody'
|
||||
$ref: '#/components/schemas/ExecuteRouteRequestBody'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
ExecuteActionRequestBody:
|
||||
ExecuteRouteRequestBody:
|
||||
allOf:
|
||||
- $ref: '../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
- $ref: '../../../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
- type: object
|
||||
required:
|
||||
- parameters
|
||||
|
@ -40,6 +39,6 @@ components:
|
|||
type: object
|
||||
properties:
|
||||
command:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/Command'
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/Command'
|
||||
timeout:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/Timeout'
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/Timeout'
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import type { TypeOf } from '@kbn/config-schema';
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import { BaseActionRequestSchema } from './common/base';
|
||||
import { BaseActionRequestSchema } from '../../common/base';
|
||||
|
||||
export const ExecuteActionRequestSchema = {
|
||||
body: schema.object({
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './execute';
|
||||
export * from './execute.gen';
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Get File Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { SuccessResponse, BaseActionSchema } from '../../../model/schema/common.gen';
|
||||
|
||||
export type GetFileRouteRequestBody = z.infer<typeof GetFileRouteRequestBody>;
|
||||
export const GetFileRouteRequestBody = BaseActionSchema.merge(
|
||||
z.object({
|
||||
parameters: z.object({
|
||||
path: z.string(),
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
export type EndpointGetFileActionRequestBody = z.infer<typeof EndpointGetFileActionRequestBody>;
|
||||
export const EndpointGetFileActionRequestBody = GetFileRouteRequestBody;
|
||||
export type EndpointGetFileActionRequestBodyInput = z.input<
|
||||
typeof EndpointGetFileActionRequestBody
|
||||
>;
|
||||
|
||||
export type EndpointGetFileActionResponse = z.infer<typeof EndpointGetFileActionResponse>;
|
||||
export const EndpointGetFileActionResponse = SuccessResponse;
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: Get File Schema
|
||||
|
@ -7,29 +8,28 @@ paths:
|
|||
post:
|
||||
summary: Get File Action
|
||||
operationId: EndpointGetFileAction
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
description: Get a file from an endpoint
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GetFileActionRequestBody'
|
||||
$ref: '#/components/schemas/GetFileRouteRequestBody'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
GetFileActionRequestBody:
|
||||
GetFileRouteRequestBody:
|
||||
allOf:
|
||||
- $ref: '../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
- $ref: '../../../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
- type: object
|
||||
required:
|
||||
- parameters
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import type { TypeOf } from '@kbn/config-schema';
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import { BaseActionRequestSchema } from './common/base';
|
||||
import { BaseActionRequestSchema } from '../../common/base';
|
||||
|
||||
export const EndpointActionGetFileSchema = {
|
||||
body: schema.object({
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './get_file';
|
||||
export * from './get_file.gen';
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { BaseActionSchema, SuccessResponse } from '../model/schema/common.gen';
|
||||
import { BaseActionSchema, SuccessResponse } from '../../../model/schema/common.gen';
|
||||
|
||||
export type EndpointIsolateRedirectRequestBody = z.infer<typeof EndpointIsolateRedirectRequestBody>;
|
||||
export const EndpointIsolateRedirectRequestBody = BaseActionSchema;
|
|
@ -7,15 +7,15 @@ paths:
|
|||
post:
|
||||
summary: Permanently redirects to a new location
|
||||
operationId: EndpointIsolateRedirect
|
||||
deprecated: true
|
||||
x-codegen-enabled: true
|
||||
x-labels:
|
||||
- ess
|
||||
x-labels: [ess]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
responses:
|
||||
'308':
|
||||
description: Permanent Redirect
|
||||
|
@ -30,4 +30,4 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './isolate';
|
||||
export * from './isolate.gen';
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Isolate Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { SuccessResponse, NoParametersRequestSchema } from '../../../model/schema/common.gen';
|
||||
|
||||
export type IsolateRouteRequestBody = z.infer<typeof IsolateRouteRequestBody>;
|
||||
export const IsolateRouteRequestBody = NoParametersRequestSchema;
|
||||
|
||||
export type EndpointIsolateActionRequestBody = z.infer<typeof EndpointIsolateActionRequestBody>;
|
||||
export const EndpointIsolateActionRequestBody = IsolateRouteRequestBody;
|
||||
export type EndpointIsolateActionRequestBodyInput = z.input<
|
||||
typeof EndpointIsolateActionRequestBody
|
||||
>;
|
||||
|
||||
export type EndpointIsolateActionResponse = z.infer<typeof EndpointIsolateActionResponse>;
|
||||
export const EndpointIsolateActionResponse = SuccessResponse;
|
|
@ -0,0 +1,30 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: Isolate Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action/isolate:
|
||||
post:
|
||||
summary: Isolate Action
|
||||
operationId: EndpointIsolateAction
|
||||
description: Isolate an endpoint
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/IsolateRouteRequestBody'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
IsolateRouteRequestBody:
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/NoParametersRequestSchema'
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import type { TypeOf } from '@kbn/config-schema';
|
||||
import { NoParametersRequestSchema } from './common/base';
|
||||
import { NoParametersRequestSchema } from '../../common/base';
|
||||
|
||||
export const IsolateRouteRequestSchema = NoParametersRequestSchema;
|
||||
export type IsolationRouteRequestBody = TypeOf<typeof IsolateRouteRequestSchema.body>;
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
export * from './kill_process';
|
||||
export * from './kill_process.gen';
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Kill Process Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { KillOrSuspendActionSchema, SuccessResponse } from '../../../model/schema/common.gen';
|
||||
|
||||
export type EndpointKillProcessActionRequestBody = z.infer<
|
||||
typeof EndpointKillProcessActionRequestBody
|
||||
>;
|
||||
export const EndpointKillProcessActionRequestBody = KillOrSuspendActionSchema;
|
||||
export type EndpointKillProcessActionRequestBodyInput = z.input<
|
||||
typeof EndpointKillProcessActionRequestBody
|
||||
>;
|
||||
|
||||
export type EndpointKillProcessActionResponse = z.infer<typeof EndpointKillProcessActionResponse>;
|
||||
export const EndpointKillProcessActionResponse = SuccessResponse;
|
|
@ -0,0 +1,25 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: Kill Process Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action/kill_process:
|
||||
post:
|
||||
summary: Kill process Action
|
||||
operationId: EndpointKillProcessAction
|
||||
description: Kill a running process on an endpoint
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/KillOrSuspendActionSchema'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
|
@ -5,8 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { TypeOf } from '@kbn/config-schema';
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import { BaseActionRequestSchema } from './common/base';
|
||||
import { BaseActionRequestSchema } from '../../common/base';
|
||||
|
||||
// --------------------------------------------------
|
||||
// Tests for this module are at:
|
||||
|
@ -41,3 +42,5 @@ export const KillProcessRouteRequestSchema = {
|
|||
}
|
||||
),
|
||||
};
|
||||
|
||||
export type KillProcessRequestBody = TypeOf<typeof KillProcessRouteRequestSchema.body>;
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './running_procs';
|
||||
export * from './running_procs.gen';
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Get Running Processes Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { SuccessResponse, NoParametersRequestSchema } from '../../../model/schema/common.gen';
|
||||
|
||||
export type GetProcessesRouteRequestBody = z.infer<typeof GetProcessesRouteRequestBody>;
|
||||
export const GetProcessesRouteRequestBody = NoParametersRequestSchema;
|
||||
|
||||
export type EndpointGetProcessesActionRequestBody = z.infer<
|
||||
typeof EndpointGetProcessesActionRequestBody
|
||||
>;
|
||||
export const EndpointGetProcessesActionRequestBody = GetProcessesRouteRequestBody;
|
||||
export type EndpointGetProcessesActionRequestBodyInput = z.input<
|
||||
typeof EndpointGetProcessesActionRequestBody
|
||||
>;
|
||||
|
||||
export type EndpointGetProcessesActionResponse = z.infer<typeof EndpointGetProcessesActionResponse>;
|
||||
export const EndpointGetProcessesActionResponse = SuccessResponse;
|
|
@ -0,0 +1,31 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: Get Running Processes Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action/running_procs:
|
||||
post:
|
||||
summary: Get Running Processes Action
|
||||
operationId: EndpointGetProcessesAction
|
||||
description: Get list of running processes on an endpoint
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GetProcessesRouteRequestBody'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
GetProcessesRouteRequestBody:
|
||||
allOf:
|
||||
- $ref: '../../../model/schema/common.schema.yaml#/components/schemas/NoParametersRequestSchema'
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import type { TypeOf } from '@kbn/config-schema';
|
||||
import { NoParametersRequestSchema } from './common/base';
|
||||
import { NoParametersRequestSchema } from '../../common/base';
|
||||
|
||||
export const GetProcessesRouteRequestSchema = NoParametersRequestSchema;
|
||||
export type GetProcessesRequestBody = TypeOf<typeof GetProcessesRouteRequestSchema.body>;
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './scan';
|
||||
export * from './scan.gen';
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Scan Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { SuccessResponse, BaseActionSchema } from '../../../model/schema/common.gen';
|
||||
|
||||
export type ScanRouteRequestBody = z.infer<typeof ScanRouteRequestBody>;
|
||||
export const ScanRouteRequestBody = BaseActionSchema.merge(
|
||||
z.object({
|
||||
parameters: z.object({
|
||||
path: z.string(),
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
export type EndpointScanActionRequestBody = z.infer<typeof EndpointScanActionRequestBody>;
|
||||
export const EndpointScanActionRequestBody = ScanRouteRequestBody;
|
||||
export type EndpointScanActionRequestBodyInput = z.input<typeof EndpointScanActionRequestBody>;
|
||||
|
||||
export type EndpointScanActionResponse = z.infer<typeof EndpointScanActionResponse>;
|
||||
export const EndpointScanActionResponse = SuccessResponse;
|
|
@ -7,29 +7,28 @@ paths:
|
|||
post:
|
||||
summary: Scan Action
|
||||
operationId: EndpointScanAction
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
description: Scan a file or directory
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ScanActionRequestBody'
|
||||
$ref: '#/components/schemas/ScanRouteRequestBody'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
ScanActionRequestBody:
|
||||
ScanRouteRequestBody:
|
||||
allOf:
|
||||
- $ref: '../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
- $ref: '../../../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
- type: object
|
||||
required:
|
||||
- parameters
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import type { TypeOf } from '@kbn/config-schema';
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import { BaseActionRequestSchema } from './common/base';
|
||||
import { BaseActionRequestSchema } from '../../common/base';
|
||||
|
||||
export const ScanActionRequestSchema = {
|
||||
body: schema.object({
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './suspend_process';
|
||||
export * from './suspend_process.gen';
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Suspend Process Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { KillOrSuspendActionSchema, SuccessResponse } from '../../../model/schema/common.gen';
|
||||
|
||||
export type EndpointSuspendProcessActionRequestBody = z.infer<
|
||||
typeof EndpointSuspendProcessActionRequestBody
|
||||
>;
|
||||
export const EndpointSuspendProcessActionRequestBody = KillOrSuspendActionSchema;
|
||||
export type EndpointSuspendProcessActionRequestBodyInput = z.input<
|
||||
typeof EndpointSuspendProcessActionRequestBody
|
||||
>;
|
||||
|
||||
export type EndpointSuspendProcessActionResponse = z.infer<
|
||||
typeof EndpointSuspendProcessActionResponse
|
||||
>;
|
||||
export const EndpointSuspendProcessActionResponse = SuccessResponse;
|
|
@ -0,0 +1,25 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: Suspend Process Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action/suspend_process:
|
||||
post:
|
||||
summary: Suspend process Action
|
||||
operationId: EndpointSuspendProcessAction
|
||||
description: Suspend a running process on an endpoint
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/KillOrSuspendActionSchema'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
|
@ -5,8 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { TypeOf } from '@kbn/config-schema';
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import { BaseActionRequestSchema } from './common/base';
|
||||
import { BaseActionRequestSchema } from '../../common/base';
|
||||
|
||||
export const SuspendProcessRouteRequestSchema = {
|
||||
body: schema.object({
|
||||
|
@ -17,3 +18,5 @@ export const SuspendProcessRouteRequestSchema = {
|
|||
]),
|
||||
}),
|
||||
};
|
||||
|
||||
export type SuspendProcessRequestBody = TypeOf<typeof SuspendProcessRouteRequestSchema.body>;
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { BaseActionSchema, SuccessResponse } from '../model/schema/common.gen';
|
||||
import { BaseActionSchema, SuccessResponse } from '../../../model/schema/common.gen';
|
||||
|
||||
export type EndpointUnisolateRedirectRequestBody = z.infer<
|
||||
typeof EndpointUnisolateRedirectRequestBody
|
|
@ -7,15 +7,15 @@ paths:
|
|||
post:
|
||||
summary: Permanently redirects to a new location
|
||||
operationId: EndpointUnisolateRedirect
|
||||
deprecated: true
|
||||
x-codegen-enabled: true
|
||||
x-labels:
|
||||
- ess
|
||||
x-labels: [ess]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
responses:
|
||||
'308':
|
||||
description: Permanent Redirect
|
||||
|
@ -30,4 +30,4 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './unisolate';
|
||||
export * from './unisolate.gen';
|
||||
export * from './deprecated_unisolate.gen';
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Unisolate Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { SuccessResponse, NoParametersRequestSchema } from '../../../model/schema/common.gen';
|
||||
|
||||
export type UnisolateRouteRequestBody = z.infer<typeof UnisolateRouteRequestBody>;
|
||||
export const UnisolateRouteRequestBody = NoParametersRequestSchema;
|
||||
|
||||
export type EndpointUnisolateActionRequestBody = z.infer<typeof EndpointUnisolateActionRequestBody>;
|
||||
export const EndpointUnisolateActionRequestBody = UnisolateRouteRequestBody;
|
||||
export type EndpointUnisolateActionRequestBodyInput = z.input<
|
||||
typeof EndpointUnisolateActionRequestBody
|
||||
>;
|
||||
|
||||
export type EndpointUnisolateActionResponse = z.infer<typeof EndpointUnisolateActionResponse>;
|
||||
export const EndpointUnisolateActionResponse = SuccessResponse;
|
|
@ -0,0 +1,30 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: Unisolate Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action/unisolate:
|
||||
post:
|
||||
summary: Unisolate Action
|
||||
operationId: EndpointUnisolateAction
|
||||
description: Release an endpoint
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UnisolateRouteRequestBody'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
UnisolateRouteRequestBody:
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/NoParametersRequestSchema'
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { TypeOf } from '@kbn/config-schema';
|
||||
import { NoParametersRequestSchema } from '../../common/base';
|
||||
|
||||
export const UnisolateRouteRequestSchema = NoParametersRequestSchema;
|
||||
export type UnisolationRouteRequestBody = TypeOf<typeof UnisolateRouteRequestSchema.body>;
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './upload';
|
||||
export * from './upload.gen';
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: File Upload Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { SuccessResponse, BaseActionSchema } from '../../../model/schema/common.gen';
|
||||
|
||||
export type UploadRouteRequestBody = z.infer<typeof UploadRouteRequestBody>;
|
||||
export const UploadRouteRequestBody = BaseActionSchema.merge(
|
||||
z.object({
|
||||
parameters: z.object({
|
||||
overwrite: z.boolean().optional().default(false),
|
||||
}),
|
||||
file: z.string(),
|
||||
})
|
||||
);
|
||||
|
||||
export type EndpointUploadActionRequestBody = z.infer<typeof EndpointUploadActionRequestBody>;
|
||||
export const EndpointUploadActionRequestBody = UploadRouteRequestBody;
|
||||
export type EndpointUploadActionRequestBodyInput = z.input<typeof EndpointUploadActionRequestBody>;
|
||||
|
||||
export type EndpointUploadActionResponse = z.infer<typeof EndpointUploadActionResponse>;
|
||||
export const EndpointUploadActionResponse = SuccessResponse;
|
|
@ -7,29 +7,28 @@ paths:
|
|||
post:
|
||||
summary: Upload Action
|
||||
operationId: EndpointUploadAction
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
description: Upload a file to an endpoint
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FileUploadActionRequestBody'
|
||||
$ref: '#/components/schemas/UploadRouteRequestBody'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
$ref: '../../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
FileUploadActionRequestBody:
|
||||
UploadRouteRequestBody:
|
||||
allOf:
|
||||
- $ref: '../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
- $ref: '../../../model/schema/common.schema.yaml#/components/schemas/BaseActionSchema'
|
||||
- type: object
|
||||
required:
|
||||
- parameters
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import type { TypeOf } from '@kbn/config-schema';
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import { BaseActionRequestSchema } from './common/base';
|
||||
import { BaseActionRequestSchema } from '../../common/base';
|
||||
|
||||
export const UploadActionRequestSchema = {
|
||||
body: schema.object({
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Scan Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { BaseActionSchema } from '../model/schema/common.gen';
|
||||
|
||||
export type ScanActionRequestBody = z.infer<typeof ScanActionRequestBody>;
|
||||
export const ScanActionRequestBody = BaseActionSchema.merge(
|
||||
z.object({
|
||||
parameters: z.object({
|
||||
path: z.string(),
|
||||
}),
|
||||
})
|
||||
);
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './state.gen';
|
|
@ -10,13 +10,13 @@
|
|||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Details Schema
|
||||
* title: Endpoint Action State Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import type { z } from 'zod';
|
||||
|
||||
export type DetailsRequestParams = z.infer<typeof DetailsRequestParams>;
|
||||
export const DetailsRequestParams = z.object({
|
||||
action_id: z.string().optional(),
|
||||
});
|
||||
import { SuccessResponse } from '../../model/schema/common.gen';
|
||||
|
||||
export type EndpointGetActionsStateResponse = z.infer<typeof EndpointGetActionsStateResponse>;
|
||||
export const EndpointGetActionsStateResponse = SuccessResponse;
|
|
@ -0,0 +1,19 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: Endpoint Action State Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/action/state:
|
||||
get:
|
||||
summary: Get Action State schema
|
||||
operationId: EndpointGetActionsState
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './status';
|
||||
export * from './status.gen';
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Get Action status schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { AgentIds, SuccessResponse } from '../../model/schema/common.gen';
|
||||
|
||||
export type EndpointGetActionsStatusRequestQuery = z.infer<
|
||||
typeof EndpointGetActionsStatusRequestQuery
|
||||
>;
|
||||
export const EndpointGetActionsStatusRequestQuery = z.object({
|
||||
query: z.object({
|
||||
agent_ids: AgentIds.optional(),
|
||||
}),
|
||||
});
|
||||
export type EndpointGetActionsStatusRequestQueryInput = z.input<
|
||||
typeof EndpointGetActionsStatusRequestQuery
|
||||
>;
|
||||
|
||||
export type EndpointGetActionsStatusResponse = z.infer<typeof EndpointGetActionsStatusResponse>;
|
||||
export const EndpointGetActionsStatusResponse = SuccessResponse;
|
|
@ -7,10 +7,9 @@ paths:
|
|||
get:
|
||||
summary: Get Actions status schema
|
||||
operationId: EndpointGetActionsStatus
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
description: Get action status
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
parameters:
|
||||
- name: query
|
||||
in: query
|
||||
|
@ -19,12 +18,12 @@ paths:
|
|||
type: object
|
||||
properties:
|
||||
agent_ids:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/AgentIds'
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/AgentIds'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
|
@ -5,28 +5,28 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './actions/audit_log_route';
|
||||
export * from './actions/action_status_route';
|
||||
export * from './actions/details_route';
|
||||
export * from './actions/file_download_route';
|
||||
export * from './actions/file_info_route';
|
||||
export * from './actions/file_upload_route';
|
||||
export * from './actions/list_route';
|
||||
export * from './actions/isolate_route';
|
||||
export * from './actions/unisolate_route';
|
||||
export * from './actions/kill_process_route';
|
||||
export * from './actions/suspend_process_route';
|
||||
export * from './actions/get_processes_route';
|
||||
export * from './actions/get_file_route';
|
||||
export * from './actions/execute_route';
|
||||
export * from './actions/scan_route';
|
||||
export * from './actions/common/base';
|
||||
export * from './actions/common/response_actions';
|
||||
|
||||
export * from './metadata/list_metadata_route';
|
||||
export * from './metadata/get_metadata_route';
|
||||
export * from './actions/action_log';
|
||||
export * from './actions/status';
|
||||
export * from './actions/details';
|
||||
export * from './actions/file_download';
|
||||
export * from './actions/file_info';
|
||||
export * from './actions/list';
|
||||
|
||||
export * from './policy/get_policy_response_route';
|
||||
export * from './policy/get_agent_policy_summary_route';
|
||||
export * from './actions/response_actions/isolate';
|
||||
export * from './actions/response_actions/unisolate';
|
||||
export * from './actions/response_actions/kill_process';
|
||||
export * from './actions/response_actions/suspend_process';
|
||||
export * from './actions/response_actions/running_procs';
|
||||
export * from './actions/response_actions/get_file';
|
||||
export * from './actions/response_actions/execute';
|
||||
export * from './actions/response_actions/upload';
|
||||
export * from './actions/response_actions/scan';
|
||||
|
||||
export * from './suggestions/get_suggestions_route';
|
||||
export * from './metadata';
|
||||
|
||||
export * from './policy';
|
||||
|
||||
export * from './suggestions';
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Endpoint Metadata Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { ListRequestQuery } from './list_metadata.gen';
|
||||
import { SuccessResponse } from '../model/schema/common.gen';
|
||||
|
||||
export type GetEndpointMetadataListRequestQuery = z.infer<
|
||||
typeof GetEndpointMetadataListRequestQuery
|
||||
>;
|
||||
export const GetEndpointMetadataListRequestQuery = z.object({
|
||||
query: ListRequestQuery,
|
||||
});
|
||||
export type GetEndpointMetadataListRequestQueryInput = z.input<
|
||||
typeof GetEndpointMetadataListRequestQuery
|
||||
>;
|
||||
|
||||
export type GetEndpointMetadataListResponse = z.infer<typeof GetEndpointMetadataListResponse>;
|
||||
export const GetEndpointMetadataListResponse = SuccessResponse;
|
|
@ -7,10 +7,8 @@ paths:
|
|||
get:
|
||||
summary: Get Metadata List schema
|
||||
operationId: GetEndpointMetadataList
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
parameters:
|
||||
- name: query
|
||||
in: query
|
||||
|
@ -30,9 +28,7 @@ paths:
|
|||
summary: Get Metadata Transform schema
|
||||
operationId: GetEndpointMetadataTransform
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
x-labels: [ess, serverless]
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
|
@ -46,18 +42,13 @@ paths:
|
|||
summary: Get Metadata schema
|
||||
operationId: GetEndpointMetadata
|
||||
x-codegen-enabled: false
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
x-labels: [ess, serverless]
|
||||
parameters:
|
||||
- name: query
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './get_metadata';
|
||||
export * from './get_metadata.gen';
|
||||
|
||||
export * from './list_metadata';
|
||||
export * from './list_metadata.gen';
|
|
@ -70,6 +70,7 @@ export const Command = z.enum([
|
|||
'get-file',
|
||||
'execute',
|
||||
'upload',
|
||||
'scan',
|
||||
]);
|
||||
export type CommandEnum = typeof Command.enum;
|
||||
export const CommandEnum = Command.enum;
|
||||
|
@ -98,16 +99,22 @@ export type UserIds = z.infer<typeof UserIds>;
|
|||
export const UserIds = z.union([z.array(z.string().min(1)).min(1), z.string().min(1)]);
|
||||
|
||||
/**
|
||||
* With Outputs
|
||||
* Shows detailed outputs for an action response
|
||||
*/
|
||||
export type WithOutputs = z.infer<typeof WithOutputs>;
|
||||
export const WithOutputs = z.union([z.array(z.string().min(1)).min(1), z.string().min(1)]);
|
||||
|
||||
/**
|
||||
* Type of response action
|
||||
*/
|
||||
export type Type = z.infer<typeof Type>;
|
||||
export const Type = z.enum(['automated', 'manual']);
|
||||
export type TypeEnum = typeof Type.enum;
|
||||
export const TypeEnum = Type.enum;
|
||||
|
||||
/**
|
||||
* List of types of response actions
|
||||
*/
|
||||
export type Types = z.infer<typeof Types>;
|
||||
export const Types = z.array(Type);
|
||||
|
||||
|
@ -135,17 +142,28 @@ export const Comment = z.string();
|
|||
export type Parameters = z.infer<typeof Parameters>;
|
||||
export const Parameters = z.object({});
|
||||
|
||||
export type AgentTypes = z.infer<typeof AgentTypes>;
|
||||
export const AgentTypes = z.enum(['endpoint', 'sentinel_one', 'crowdstrike']);
|
||||
export type AgentTypesEnum = typeof AgentTypes.enum;
|
||||
export const AgentTypesEnum = AgentTypes.enum;
|
||||
|
||||
export type BaseActionSchema = z.infer<typeof BaseActionSchema>;
|
||||
export const BaseActionSchema = z.object({
|
||||
endpoint_ids: EndpointIds.optional(),
|
||||
endpoint_ids: EndpointIds,
|
||||
alert_ids: AlertIds.optional(),
|
||||
case_ids: CaseIds.optional(),
|
||||
comment: Comment.optional(),
|
||||
parameters: Parameters.optional(),
|
||||
agent_type: AgentTypes.optional(),
|
||||
});
|
||||
|
||||
export type ProcessActionSchemas = z.infer<typeof ProcessActionSchemas>;
|
||||
export const ProcessActionSchemas = BaseActionSchema.merge(
|
||||
export type NoParametersRequestSchema = z.infer<typeof NoParametersRequestSchema>;
|
||||
export const NoParametersRequestSchema = z.object({
|
||||
body: BaseActionSchema,
|
||||
});
|
||||
|
||||
export type KillOrSuspendActionSchema = z.infer<typeof KillOrSuspendActionSchema>;
|
||||
export const KillOrSuspendActionSchema = BaseActionSchema.merge(
|
||||
z.object({
|
||||
parameters: z.union([
|
||||
z.object({
|
||||
|
|
|
@ -54,6 +54,7 @@ components:
|
|||
- get-file
|
||||
- execute
|
||||
- upload
|
||||
- scan
|
||||
minLength: 1
|
||||
description: The command to be executed (cannot be an empty string)
|
||||
|
||||
|
@ -101,16 +102,18 @@ components:
|
|||
minItems: 1
|
||||
- type: string
|
||||
minLength: 1
|
||||
description: With Outputs
|
||||
description: Shows detailed outputs for an action response
|
||||
|
||||
Type:
|
||||
type: string
|
||||
description: Type of response action
|
||||
enum:
|
||||
- automated
|
||||
- manual
|
||||
|
||||
Types:
|
||||
type: array
|
||||
description: List of types of response actions
|
||||
items:
|
||||
$ref: '#/components/schemas/Type'
|
||||
minLength: 1
|
||||
|
@ -136,6 +139,12 @@ components:
|
|||
Parameters:
|
||||
type: object
|
||||
description: Optional parameters object
|
||||
AgentTypes:
|
||||
type: string
|
||||
enum:
|
||||
- endpoint
|
||||
- sentinel_one
|
||||
- crowdstrike
|
||||
|
||||
BaseActionSchema:
|
||||
x-inline: true
|
||||
|
@ -151,8 +160,20 @@ components:
|
|||
$ref: '#/components/schemas/Comment'
|
||||
parameters:
|
||||
$ref: '#/components/schemas/Parameters'
|
||||
agent_type:
|
||||
$ref: '#/components/schemas/AgentTypes'
|
||||
required:
|
||||
- endpoint_ids
|
||||
|
||||
ProcessActionSchemas:
|
||||
NoParametersRequestSchema:
|
||||
type: object
|
||||
required:
|
||||
- body
|
||||
properties:
|
||||
body:
|
||||
$ref: '#/components/schemas/BaseActionSchema'
|
||||
|
||||
KillOrSuspendActionSchema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/BaseActionSchema'
|
||||
- type: object
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { SuccessResponse, AgentId } from '../model/schema/common.gen';
|
||||
import { SuccessResponse } from '../model/schema/common.gen';
|
||||
|
||||
export type GetAgentPolicySummaryRequestQuery = z.infer<typeof GetAgentPolicySummaryRequestQuery>;
|
||||
export const GetAgentPolicySummaryRequestQuery = z.object({
|
||||
|
@ -31,13 +31,3 @@ export type GetAgentPolicySummaryRequestQueryInput = z.input<
|
|||
|
||||
export type GetAgentPolicySummaryResponse = z.infer<typeof GetAgentPolicySummaryResponse>;
|
||||
export const GetAgentPolicySummaryResponse = SuccessResponse;
|
||||
export type GetPolicyResponseRequestQuery = z.infer<typeof GetPolicyResponseRequestQuery>;
|
||||
export const GetPolicyResponseRequestQuery = z.object({
|
||||
query: z.object({
|
||||
agentId: AgentId.optional(),
|
||||
}),
|
||||
});
|
||||
export type GetPolicyResponseRequestQueryInput = z.input<typeof GetPolicyResponseRequestQuery>;
|
||||
|
||||
export type GetPolicyResponseResponse = z.infer<typeof GetPolicyResponseResponse>;
|
||||
export const GetPolicyResponseResponse = SuccessResponse;
|
|
@ -7,10 +7,9 @@ paths:
|
|||
get:
|
||||
summary: Get Agent Policy Summary schema
|
||||
operationId: GetAgentPolicySummary
|
||||
deprecated: true
|
||||
x-codegen-enabled: true
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
x-labels: [ess, serverless]
|
||||
parameters:
|
||||
- name: query
|
||||
in: query
|
||||
|
@ -31,28 +30,3 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
||||
|
||||
/api/endpoint/policy_response:
|
||||
get:
|
||||
summary: Get Policy Response schema
|
||||
operationId: GetPolicyResponse
|
||||
x-codegen-enabled: true
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
parameters:
|
||||
- name: query
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
agentId:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/AgentId'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './policy_response';
|
||||
export * from './deprecated_agent_policy_summary';
|
||||
export * from './policy_response.gen';
|
||||
export * from './deprecated_agent_policy_summary.gen';
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTICE: Do not edit this file manually.
|
||||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator.
|
||||
*
|
||||
* info:
|
||||
* title: Endpoint Policy Schema
|
||||
* version: 2023-10-31
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { AgentId, SuccessResponse } from '../model/schema/common.gen';
|
||||
|
||||
export type GetPolicyResponseRequestQuery = z.infer<typeof GetPolicyResponseRequestQuery>;
|
||||
export const GetPolicyResponseRequestQuery = z.object({
|
||||
query: z.object({
|
||||
agentId: AgentId.optional(),
|
||||
}),
|
||||
});
|
||||
export type GetPolicyResponseRequestQueryInput = z.input<typeof GetPolicyResponseRequestQuery>;
|
||||
|
||||
export type GetPolicyResponseResponse = z.infer<typeof GetPolicyResponseResponse>;
|
||||
export const GetPolicyResponseResponse = SuccessResponse;
|
|
@ -0,0 +1,27 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: Endpoint Policy Schema
|
||||
version: '2023-10-31'
|
||||
paths:
|
||||
/api/endpoint/policy_response:
|
||||
get:
|
||||
summary: Get Policy Response schema
|
||||
operationId: GetPolicyResponse
|
||||
x-codegen-enabled: true
|
||||
x-labels: [ess, serverless]
|
||||
parameters:
|
||||
- name: query
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
agentId:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/AgentId'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './protection_updates_note';
|
||||
export * from './protection_updates_note.gen';
|
|
@ -8,9 +8,7 @@ paths:
|
|||
summary: Get Protection Updates Note schema
|
||||
operationId: GetProtectionUpdatesNote
|
||||
x-codegen-enabled: true
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
x-labels: [ess, serverless]
|
||||
parameters:
|
||||
- name: package_policy_id
|
||||
in: path
|
||||
|
@ -28,9 +26,7 @@ paths:
|
|||
summary: Create Update Protection Updates Note schema
|
||||
operationId: CreateUpdateProtectionUpdatesNote
|
||||
x-codegen-enabled: true
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
x-labels: [ess, serverless]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
|
|
|
@ -8,9 +8,7 @@ paths:
|
|||
summary: Get suggestions
|
||||
operationId: GetEndpointSuggestions
|
||||
x-codegen-enabled: true
|
||||
x-labels:
|
||||
- ess
|
||||
- serverless
|
||||
x-labels: [ess, serverless]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './get_suggestions';
|
||||
export * from './get_suggestions.gen';
|
|
@ -19,10 +19,10 @@ import {
|
|||
KillProcessRouteRequestSchema,
|
||||
SuspendProcessRouteRequestSchema,
|
||||
UploadActionRequestSchema,
|
||||
ExecuteActionRequestSchema,
|
||||
ScanActionRequestSchema,
|
||||
NoParametersRequestSchema,
|
||||
} from '../../api/endpoint';
|
||||
import { NoParametersRequestSchema } from '../../api/endpoint/actions/common/base';
|
||||
import { ExecuteActionRequestSchema } from '../../api/endpoint/actions/execute_route';
|
||||
import { ScanActionRequestSchema } from '../../api/endpoint/actions/scan_route';
|
||||
|
||||
// NOTE: Even though schemas are kept in common/api/endpoint - we keep tests here, because common/api should import from outside
|
||||
describe('actions schemas', () => {
|
||||
|
|
|
@ -9,13 +9,12 @@ import type { TypeOf } from '@kbn/config-schema';
|
|||
import type { EcsError } from '@elastic/ecs';
|
||||
import type { BaseFileMetadata, FileCompression, FileJSON } from '@kbn/files-plugin/common';
|
||||
import type {
|
||||
KillProcessRouteRequestSchema,
|
||||
ResponseActionBodySchema,
|
||||
SuspendProcessRouteRequestSchema,
|
||||
UploadActionApiRequestBody,
|
||||
ActionStatusRequestSchema,
|
||||
KillProcessRequestBody,
|
||||
SuspendProcessRequestBody,
|
||||
} from '../../api/endpoint';
|
||||
import type { ActionStatusRequestSchema } from '../../api/endpoint/actions/action_status_route';
|
||||
import type { NoParametersRequestSchema } from '../../api/endpoint/actions/common/base';
|
||||
|
||||
import type {
|
||||
ResponseActionAgentType,
|
||||
ResponseActionsApiCommandNames,
|
||||
|
@ -358,14 +357,6 @@ export interface ActivityLog {
|
|||
data: ActivityLogEntry[];
|
||||
}
|
||||
|
||||
export type HostIsolationRequestBody = TypeOf<typeof NoParametersRequestSchema.body>;
|
||||
|
||||
export type ResponseActionRequestBody = TypeOf<typeof ResponseActionBodySchema>;
|
||||
|
||||
export type KillProcessRequestBody = TypeOf<typeof KillProcessRouteRequestSchema.body>;
|
||||
|
||||
export type SuspendProcessRequestBody = TypeOf<typeof SuspendProcessRouteRequestSchema.body>;
|
||||
|
||||
/** Note: this type should almost never be used. Use instead the response action specific types above */
|
||||
export type KillOrSuspendProcessRequestBody = KillProcessRequestBody & SuspendProcessRequestBody;
|
||||
|
||||
|
@ -373,8 +364,6 @@ export interface HostIsolationResponse {
|
|||
action: string;
|
||||
}
|
||||
|
||||
export type ProcessesRequestBody = TypeOf<typeof NoParametersRequestSchema.body>;
|
||||
|
||||
export interface ResponseActionApiResponse<
|
||||
TOutputContent extends EndpointActionResponseDataOutput = EndpointActionResponseDataOutput
|
||||
> {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue