-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Investigations] - Add timeline api codegen #187172
Closed
Closed
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
cbe8c98
update timeline api's to use codegen
michaelolo24 0c538ca
properly require fields
michaelolo24 b6aba77
additional cleanup
michaelolo24 2ce1115
[CI] Auto-commit changed files from 'yarn openapi:generate'
kibanamachine e7cf737
remove circular dependency for now
michaelolo24 e9f9c69
very rough first pass at recursive template changes
michaelolo24 eb0a656
update recursive call
michaelolo24 a638e33
fix lint errors
michaelolo24 7719929
Merge remote-tracking branch 'upstream/main' into add-timeline-api-co…
michaelolo24 fdd0c16
update with main
michaelolo24 1e51fd0
update with main
michaelolo24 0aac6c5
Merge remote-tracking branch 'upstream/main' into add-timeline-api-co…
michaelolo24 4d1ac51
Merge remote-tracking branch 'upstream/main' into add-timeline-api-co…
michaelolo24 2374b79
update with deleteNote
michaelolo24 fcb4cb0
Merge remote-tracking branch 'upstream/main' into add-timeline-api-co…
michaelolo24 48f5a16
fix additional merge conflict
michaelolo24 9842519
get openapi codegen up to date
michaelolo24 1e5dd0c
Merge remote-tracking branch 'upstream/main' into add-timeline-api-co…
michaelolo24 f067c72
update with main
michaelolo24 2d44e35
Merge branch 'main' into add-timeline-api-codegen
michaelolo24 c3b174f
Merge branch 'main' into add-timeline-api-codegen
michaelolo24 5726ceb
Merge branch 'main' into add-timeline-api-codegen
michaelolo24 8ab5b45
Merge remote-tracking branch 'upstream/main' into add-timeline-api-co…
michaelolo24 b49ac0d
fix ref in resolve api schema
michaelolo24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
34 changes: 34 additions & 0 deletions
34
...ity_solution/common/api/timeline/clean_draft_timelines/clean_draft_timelines_route.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,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: Elastic Security - Timeline - Draft Timeline API | ||
* version: 2023-10-31 | ||
*/ | ||
|
||
import { z } from 'zod'; | ||
|
||
import { TimelineType, TimelineResponse } from '../model/components.gen'; | ||
|
||
export type CleanDraftTimelinesRequestBody = z.infer<typeof CleanDraftTimelinesRequestBody>; | ||
export const CleanDraftTimelinesRequestBody = z.object({ | ||
timelineType: TimelineType, | ||
}); | ||
export type CleanDraftTimelinesRequestBodyInput = z.input<typeof CleanDraftTimelinesRequestBody>; | ||
|
||
export type CleanDraftTimelinesResponse = z.infer<typeof CleanDraftTimelinesResponse>; | ||
export const CleanDraftTimelinesResponse = z.object({ | ||
data: z.object({ | ||
persistTimeline: z.object({ | ||
timeline: TimelineResponse, | ||
}), | ||
}), | ||
}); |
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
43 changes: 43 additions & 0 deletions
43
...gins/security_solution/common/api/timeline/create_timelines/create_timelines_route.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,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: Elastic Security - Timeline - Create Timelines API | ||
* version: 2023-10-31 | ||
*/ | ||
|
||
import { z } from 'zod'; | ||
|
||
import { | ||
TimelineStatus, | ||
TimelineType, | ||
SavedTimeline, | ||
TimelineResponse, | ||
} from '../model/components.gen'; | ||
|
||
export type CreateTimelinesRequestBody = z.infer<typeof CreateTimelinesRequestBody>; | ||
export const CreateTimelinesRequestBody = z.object({ | ||
status: TimelineStatus.nullable().optional(), | ||
timelineId: z.string().nullable().optional(), | ||
templateTimelineId: z.string().nullable().optional(), | ||
templateTimelineVersion: z.number().nullable().optional(), | ||
timelineType: TimelineType.nullable().optional(), | ||
version: z.string().nullable().optional(), | ||
timeline: SavedTimeline, | ||
}); | ||
export type CreateTimelinesRequestBodyInput = z.input<typeof CreateTimelinesRequestBody>; | ||
|
||
export type CreateTimelinesResponse = z.infer<typeof CreateTimelinesResponse>; | ||
export const CreateTimelinesResponse = z.object({ | ||
data: z.object({ | ||
persistTimeline: TimelineResponse, | ||
}), | ||
}); |
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
29 changes: 29 additions & 0 deletions
29
x-pack/plugins/security_solution/common/api/timeline/delete_note/delete_note_route.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,29 @@ | ||
/* | ||
* 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: Elastic Security - Timeline - Notes API | ||
* version: 2023-10-31 | ||
*/ | ||
|
||
import { z } from 'zod'; | ||
|
||
export type DeleteNoteRequestBody = z.infer<typeof DeleteNoteRequestBody>; | ||
export const DeleteNoteRequestBody = z.object({ | ||
noteId: z.string().nullable().optional(), | ||
noteIds: z.array(z.string()).nullable().optional(), | ||
}); | ||
export type DeleteNoteRequestBodyInput = z.input<typeof DeleteNoteRequestBody>; | ||
|
||
export type DeleteNoteResponse = z.infer<typeof DeleteNoteResponse>; | ||
export const DeleteNoteResponse = z.object({ | ||
data: z.object({}).optional(), | ||
}); |
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
34 changes: 34 additions & 0 deletions
34
...gins/security_solution/common/api/timeline/delete_timelines/delete_timelines_route.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,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: Elastic Security - Timeline - Delete Timelines API | ||
* version: 2023-10-31 | ||
*/ | ||
|
||
import { z } from 'zod'; | ||
|
||
export type DeleteTimelinesRequestBody = z.infer<typeof DeleteTimelinesRequestBody>; | ||
export const DeleteTimelinesRequestBody = z.object({ | ||
savedObjectIds: z.array(z.string()), | ||
/** | ||
* Saved search ids that should be deleted alongside the timelines | ||
*/ | ||
searchIds: z.array(z.string()).optional(), | ||
}); | ||
export type DeleteTimelinesRequestBodyInput = z.input<typeof DeleteTimelinesRequestBody>; | ||
|
||
export type DeleteTimelinesResponse = z.infer<typeof DeleteTimelinesResponse>; | ||
export const DeleteTimelinesResponse = z.object({ | ||
data: z.object({ | ||
deleteTimeline: z.boolean(), | ||
}), | ||
}); |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to update based on how
nullable: true
interacts with the $ref. Reference IssueThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelolo24 is this something you consider a blocker for this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I updated this, so it was more of a note. Updated the text from
Need
=>Needed
as it was done :)