mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
26 lines
707 B
TypeScript
26 lines
707 B
TypeScript
import type {Client} from 'sentry/api';
|
|
import type {NewQuery, SavedQuery} from 'sentry/types';
|
|
|
|
export function fetchHomepageQuery(api: Client, orgId: string): Promise<SavedQuery> {
|
|
return api.requestPromise(`/organizations/${orgId}/discover/homepage/`, {
|
|
method: 'GET',
|
|
});
|
|
}
|
|
|
|
export function updateHomepageQuery(
|
|
api: Client,
|
|
orgId: string,
|
|
query: NewQuery
|
|
): Promise<SavedQuery> {
|
|
return api.requestPromise(`/organizations/${orgId}/discover/homepage/`, {
|
|
method: 'PUT',
|
|
data: query,
|
|
});
|
|
}
|
|
|
|
export function deleteHomepageQuery(api: Client, orgId: string): Promise<void> {
|
|
return api.requestPromise(`/organizations/${orgId}/discover/homepage/`, {
|
|
method: 'DELETE',
|
|
});
|
|
}
|