forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add API test Add data client test
- Loading branch information
Showing
25 changed files
with
1,411 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 128 additions & 0 deletions
128
...plugins/security_solution/common/api/entity_analytics/entity_store/entities/common.gen.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
/* | ||
* 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: Common Entities Schemas | ||
* version: 1 | ||
*/ | ||
|
||
import { z } from '@kbn/zod'; | ||
|
||
export type UserEntityRecord = z.infer<typeof UserEntityRecord>; | ||
export const UserEntityRecord = z.object({ | ||
user: z | ||
.object({ | ||
full_name: z.array(z.string()).optional(), | ||
domain: z.array(z.string()).optional(), | ||
roles: z.array(z.string()).optional(), | ||
name: z.string(), | ||
id: z.array(z.string()).optional(), | ||
email: z.array(z.string()).optional(), | ||
hash: z.array(z.string()).optional(), | ||
}) | ||
.optional(), | ||
entity: z | ||
.object({ | ||
/** | ||
* The last seen timestamp of the entity. | ||
*/ | ||
lastSeenTimestamp: z.string().datetime(), | ||
/** | ||
* The schema version of the entity. | ||
*/ | ||
schemaVersion: z.string(), | ||
/** | ||
* The definition version of the entity. | ||
*/ | ||
definitionVersion: z.string(), | ||
/** | ||
* The display name of the entity. | ||
*/ | ||
displayName: z.string(), | ||
/** | ||
* The identity fields of the entity. | ||
*/ | ||
identityFields: z.array(z.string()), | ||
/** | ||
* The ID of the entity. | ||
*/ | ||
id: z.string(), | ||
/** | ||
* The type of the entity. | ||
*/ | ||
type: z.literal('node'), | ||
/** | ||
* The first seen timestamp of the entity. | ||
*/ | ||
firstSeenTimestamp: z.string().datetime(), | ||
/** | ||
* The definition ID of the entity. | ||
*/ | ||
definitionId: z.string(), | ||
}) | ||
.optional(), | ||
}); | ||
|
||
export type HostEntityRecord = z.infer<typeof HostEntityRecord>; | ||
export const HostEntityRecord = z.object({ | ||
host: z | ||
.object({ | ||
hostname: z.array(z.string()).optional(), | ||
domain: z.array(z.string()).optional(), | ||
ip: z.array(z.string()).optional(), | ||
name: z.string(), | ||
id: z.array(z.string()).optional(), | ||
type: z.array(z.string()).optional(), | ||
mac: z.array(z.string()).optional(), | ||
architecture: z.array(z.string()).optional(), | ||
}) | ||
.optional(), | ||
entity: z | ||
.object({ | ||
/** | ||
* The last seen timestamp of the entity. | ||
*/ | ||
lastSeenTimestamp: z.string().datetime(), | ||
/** | ||
* The schema version of the entity. | ||
*/ | ||
schemaVersion: z.string(), | ||
/** | ||
* The definition version of the entity. | ||
*/ | ||
definitionVersion: z.string(), | ||
/** | ||
* The display name of the entity. | ||
*/ | ||
displayName: z.string(), | ||
/** | ||
* The identity fields of the entity. | ||
*/ | ||
identityFields: z.array(z.string()), | ||
/** | ||
* The ID of the entity. | ||
*/ | ||
id: z.string(), | ||
/** | ||
* The type of the entity. | ||
*/ | ||
type: z.literal('node'), | ||
/** | ||
* The first seen timestamp of the entity. | ||
*/ | ||
firstSeenTimestamp: z.string().datetime(), | ||
/** | ||
* The definition ID of the entity. | ||
*/ | ||
definitionId: z.string(), | ||
}) | ||
.optional(), | ||
}); |
172 changes: 172 additions & 0 deletions
172
...ns/security_solution/common/api/entity_analytics/entity_store/entities/common.schema.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: Common Entities Schemas | ||
description: Common Entities schemas for the Entity Store | ||
version: '1' | ||
paths: {} | ||
components: | ||
schemas: | ||
UserEntityRecord: | ||
type: object | ||
properties: | ||
user: | ||
type: object | ||
properties: | ||
full_name: | ||
type: array | ||
items: | ||
type: string | ||
domain: | ||
type: array | ||
items: | ||
type: string | ||
roles: | ||
type: array | ||
items: | ||
type: string | ||
name: | ||
type: string | ||
id: | ||
type: array | ||
items: | ||
type: string | ||
email: | ||
type: array | ||
items: | ||
type: string | ||
hash: | ||
type: array | ||
items: | ||
type: string | ||
required: | ||
- name | ||
entity: | ||
type: object | ||
properties: | ||
lastSeenTimestamp: | ||
type: string | ||
format: date-time | ||
description: The last seen timestamp of the entity. | ||
schemaVersion: | ||
type: string | ||
description: The schema version of the entity. | ||
definitionVersion: | ||
type: string | ||
description: The definition version of the entity. | ||
displayName: | ||
type: string | ||
description: The display name of the entity. | ||
identityFields: | ||
type: array | ||
items: | ||
type: string | ||
description: The identity fields of the entity. | ||
id: | ||
type: string | ||
description: The ID of the entity. | ||
type: | ||
type: string | ||
enum: | ||
- node | ||
description: The type of the entity. | ||
firstSeenTimestamp: | ||
type: string | ||
format: date-time | ||
description: The first seen timestamp of the entity. | ||
definitionId: | ||
type: string | ||
description: The definition ID of the entity. | ||
required: | ||
- lastSeenTimestamp | ||
- schemaVersion | ||
- definitionVersion | ||
- displayName | ||
- identityFields | ||
- id | ||
- type | ||
- firstSeenTimestamp | ||
- definitionId | ||
HostEntityRecord: | ||
type: object | ||
properties: | ||
host: | ||
type: object | ||
properties: | ||
hostname: | ||
type: array | ||
items: | ||
type: string | ||
domain: | ||
type: array | ||
items: | ||
type: string | ||
ip: | ||
type: array | ||
items: | ||
type: string | ||
name: | ||
type: string | ||
id: | ||
type: array | ||
items: | ||
type: string | ||
type: | ||
type: array | ||
items: | ||
type: string | ||
mac: | ||
type: array | ||
items: | ||
type: string | ||
architecture: | ||
type: array | ||
items: | ||
type: string | ||
required: | ||
- name | ||
entity: | ||
type: object | ||
properties: | ||
lastSeenTimestamp: | ||
type: string | ||
format: date-time | ||
description: The last seen timestamp of the entity. | ||
schemaVersion: | ||
type: string | ||
description: The schema version of the entity. | ||
definitionVersion: | ||
type: string | ||
description: The definition version of the entity. | ||
displayName: | ||
type: string | ||
description: The display name of the entity. | ||
identityFields: | ||
type: array | ||
items: | ||
type: string | ||
description: The identity fields of the entity. | ||
id: | ||
type: string | ||
description: The ID of the entity. | ||
type: | ||
type: string | ||
enum: | ||
- node | ||
description: The type of the entity. | ||
firstSeenTimestamp: | ||
type: string | ||
format: date-time | ||
description: The first seen timestamp of the entity. | ||
definitionId: | ||
type: string | ||
description: The definition ID of the entity. | ||
required: | ||
- lastSeenTimestamp | ||
- schemaVersion | ||
- definitionVersion | ||
- displayName | ||
- identityFields | ||
- id | ||
- type | ||
- firstSeenTimestamp | ||
- definitionId |
Oops, something went wrong.