-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add search analysis module (#680)
KIT-2526
- Loading branch information
Showing
7 changed files
with
481 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import API from '../../APICore.js'; | ||
import Resource from '../Resource.js'; | ||
import {ReplayAnalysis} from './SearchAnalysisInterface.js'; | ||
|
||
export default class SearchAnalysis extends Resource { | ||
static baseUrl = '/rest/search/v3/analysis'; | ||
|
||
/** | ||
* Replay a query that was already done and get inspection details. | ||
* | ||
* @param id The SearchUID of the request to replay. | ||
* @param from The inclusive date at which to start looking for the request. Example: 2019-08-24T14:15:22Z | ||
* @param to The inclusive date at which to stop looking for the SearchUID. When omitted searches up until the most recent requests. Example:2019-08-24T14:15:22Z | ||
* @returns | ||
*/ | ||
replay(id: string, from: string, to?: string) { | ||
return this.api.post<ReplayAnalysis>( | ||
`${SearchAnalysis.baseUrl}/inspect/replay?organizationId=${API.orgPlaceholder}`, | ||
{id, dateRange: {from, to}} | ||
); | ||
} | ||
} |
Oops, something went wrong.