import type { DeepPartial, Entity, FieldsParam, ListParams, SavedQuery, Schema } from "../types"; import { ResourceApi } from "./common"; type SavedQuerySchema = Schema; type SavedQueryEntity = Entity; /** * This resource lets you access and work with saved searches in YouTrack. * https://www.jetbrains.com/help/youtrack/devportal/resource-api-savedQueries.html */ export declare class SavedQueriesApi extends ResourceApi { /** * Get all saved searches that are visible to the current user. * @param fields - A list of SavedQuery attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param top - Optional. Lets you specify the maximum number of entries that are returned in the response. If not set, the server limits the maximum number of returned entries. * @param skip - Optional. Lets you set a number of returned entities to skip before returning the first one. * @returns A list of saved queries visible to the current user. */ getSavedQueries(params?: ListParams & FieldsParam): Promise[]>; /** * Create a new saved search. * @param body - Required fields: name, query. * @param fields - A list of SavedQuery attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns The created saved search. */ createSavedQuery(body: { name: string; query: string; } | DeepPartial, params?: FieldsParam): Promise>; /** * Read settings of the saved search with the specified ID. * @param queryId - Id of the saved search. * @param fields - A list of SavedQuery attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns The settings of the specified saved search. */ getSavedQueryById(queryId: string, params?: FieldsParam): Promise>; /** * Update settings of the saved search with the specified ID. * @param queryId - Id of the saved search. * @param body - The fields to update. Provide the fields that need to be modified. * @param fields - A list of SavedQuery attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns The updated saved search. */ updateSavedQuery(queryId: string, body: DeepPartial, params?: FieldsParam): Promise>; /** * Delete the saved search with the specified ID. * @param queryId - Database ID of the saved search. * @param params - A list of SavedQuery attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns The deleted saved search. */ deleteSavedQuery(queryId: string, params?: FieldsParam): Promise>; } export {};