-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SIEM][CASE] Server common constants (#63952)
- Loading branch information
Showing
39 changed files
with
207 additions
and
106 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
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,28 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { | ||
CASE_DETAILS_URL, | ||
CASE_COMMENTS_URL, | ||
CASE_USER_ACTIONS_URL, | ||
CASE_COMMENT_DETAILS_URL, | ||
} from '../constants'; | ||
|
||
export const getCaseDetailsUrl = (id: string): string => { | ||
return CASE_DETAILS_URL.replace('{case_id}', id); | ||
}; | ||
|
||
export const getCaseCommentsUrl = (id: string): string => { | ||
return CASE_COMMENTS_URL.replace('{case_id}', id); | ||
}; | ||
|
||
export const getCaseCommentDetailsUrl = (caseId: string, commentId: string): string => { | ||
return CASE_COMMENT_DETAILS_URL.replace('{case_id}', caseId).replace('{comment_id}', commentId); | ||
}; | ||
|
||
export const getCaseUserActionUrl = (id: string): string => { | ||
return CASE_USER_ACTIONS_URL.replace('{case_id}', id); | ||
}; |
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; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
export const APP_ID = 'case'; | ||
|
||
/** | ||
* Case routes | ||
*/ | ||
|
||
export const CASES_URL = '/api/cases'; | ||
export const CASE_DETAILS_URL = `${CASES_URL}/{case_id}`; | ||
export const CASE_CONFIGURE_URL = `${CASES_URL}/configure`; | ||
export const CASE_CONFIGURE_CONNECTORS_URL = `${CASE_CONFIGURE_URL}/connectors`; | ||
export const CASE_COMMENTS_URL = `${CASE_DETAILS_URL}/comments`; | ||
export const CASE_COMMENT_DETAILS_URL = `${CASE_DETAILS_URL}/comments/{comment_id}`; | ||
export const CASE_REPORTERS_URL = `${CASES_URL}/reporters`; | ||
export const CASE_STATUS_URL = `${CASES_URL}/status`; | ||
export const CASE_TAGS_URL = `${CASES_URL}/tags`; | ||
export const CASE_USER_ACTIONS_URL = `${CASE_DETAILS_URL}/user_actions`; | ||
|
||
/** | ||
* Action routes | ||
*/ | ||
|
||
export const ACTION_URL = '/api/action'; | ||
export const ACTION_TYPES_URL = '/api/action/types'; |
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
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
Oops, something went wrong.