Skip to content

Commit

Permalink
[Security Solution][Notes] - fetch notes by saved object ids (elastic…
Browse files Browse the repository at this point in the history
…#193930)

(cherry picked from commit ca46f78)
  • Loading branch information
PhilippeOberti committed Oct 1, 2024
1 parent 5ef7bb7 commit fa4bc94
Show file tree
Hide file tree
Showing 44 changed files with 2,889 additions and 1,068 deletions.
10 changes: 10 additions & 0 deletions oas_docs/output/kibana.serverless.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14806,6 +14806,10 @@ paths:
name: documentIds
schema:
$ref: '#/components/schemas/Security_Timeline_API_DocumentIds'
- in: query
name: savedObjectIds
schema:
$ref: '#/components/schemas/Security_Timeline_API_SavedObjectIds'
- in: query
name: page
schema:
Expand Down Expand Up @@ -31543,6 +31547,12 @@ components:
- threat_match
- zeek
type: string
Security_Timeline_API_SavedObjectIds:
oneOf:
- items:
type: string
type: array
- type: string
Security_Timeline_API_SavedObjectResolveAliasPurpose:
enum:
- savedObjectConversion
Expand Down
10 changes: 10 additions & 0 deletions oas_docs/output/kibana.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18236,6 +18236,10 @@ paths:
name: documentIds
schema:
$ref: '#/components/schemas/Security_Timeline_API_DocumentIds'
- in: query
name: savedObjectIds
schema:
$ref: '#/components/schemas/Security_Timeline_API_SavedObjectIds'
- in: query
name: page
schema:
Expand Down Expand Up @@ -39552,6 +39556,12 @@ components:
- threat_match
- zeek
type: string
Security_Timeline_API_SavedObjectIds:
oneOf:
- items:
type: string
type: array
- type: string
Security_Timeline_API_SavedObjectResolveAliasPurpose:
enum:
- savedObjectConversion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import { Note } from '../model/components.gen';
export type DocumentIds = z.infer<typeof DocumentIds>;
export const DocumentIds = z.union([z.array(z.string()), z.string()]);

export type SavedObjectIds = z.infer<typeof SavedObjectIds>;
export const SavedObjectIds = z.union([z.array(z.string()), z.string()]);

export type GetNotesResult = z.infer<typeof GetNotesResult>;
export const GetNotesResult = z.object({
totalCount: z.number(),
Expand All @@ -30,6 +33,7 @@ export const GetNotesResult = z.object({
export type GetNotesRequestQuery = z.infer<typeof GetNotesRequestQuery>;
export const GetNotesRequestQuery = z.object({
documentIds: DocumentIds.optional(),
savedObjectIds: SavedObjectIds.optional(),
page: z.string().nullable().optional(),
perPage: z.string().nullable().optional(),
search: z.string().nullable().optional(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ paths:
in: query
schema:
$ref: '#/components/schemas/DocumentIds'
- name: savedObjectIds
in: query
schema:
$ref: '#/components/schemas/SavedObjectIds'
- name: page
in: query
schema:
Expand Down Expand Up @@ -65,6 +69,12 @@ components:
items:
type: string
- type: string
SavedObjectIds:
oneOf:
- type: array
items:
type: string
- type: string
GetNotesResult:
type: object
required: [totalCount, notes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ paths:
name: documentIds
schema:
$ref: '#/components/schemas/DocumentIds'
- in: query
name: savedObjectIds
schema:
$ref: '#/components/schemas/SavedObjectIds'
- in: query
name: page
schema:
Expand Down Expand Up @@ -1346,6 +1350,12 @@ components:
- threat_match
- zeek
type: string
SavedObjectIds:
oneOf:
- items:
type: string
type: array
- type: string
SavedObjectResolveAliasPurpose:
enum:
- savedObjectConversion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ paths:
name: documentIds
schema:
$ref: '#/components/schemas/DocumentIds'
- in: query
name: savedObjectIds
schema:
$ref: '#/components/schemas/SavedObjectIds'
- in: query
name: page
schema:
Expand Down Expand Up @@ -1346,6 +1350,12 @@ components:
- threat_match
- zeek
type: string
SavedObjectIds:
oneOf:
- items:
type: string
type: array
- type: string
SavedObjectResolveAliasPurpose:
enum:
- savedObjectConversion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,12 +527,14 @@ export const mockGlobalState: State = {
ids: ['1'],
status: {
fetchNotesByDocumentIds: ReqStatus.Idle,
fetchNotesBySavedObjectIds: ReqStatus.Idle,
createNote: ReqStatus.Idle,
deleteNotes: ReqStatus.Idle,
fetchNotes: ReqStatus.Idle,
},
error: {
fetchNotesByDocumentIds: null,
fetchNotesBySavedObjectIds: null,
createNote: null,
deleteNotes: null,
fetchNotes: null,
Expand Down

This file was deleted.

Loading

0 comments on commit fa4bc94

Please sign in to comment.