Skip to content

Commit

Permalink
[Security Solution][Notes] - fetch notes by saved object ids (#193930)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeOberti authored Oct 1, 2024
1 parent 9d671f6 commit ca46f78
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 @@ -14921,6 +14921,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 @@ -31674,6 +31678,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 @@ -18351,6 +18351,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 @@ -39683,6 +39687,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 @@ -63,6 +63,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 @@ -1359,6 +1363,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 @@ -63,6 +63,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 @@ -1359,6 +1363,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 ca46f78

Please sign in to comment.