/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { UserDataService } from '@finos/legend-application'; import { type VisitedLegacyDataProduct, type VisitedDataProduct } from './LegendQueryUserDataSpaceHelper.js'; import type { ResolvedDataSpaceEntityWithOrigin } from '@finos/legend-extension-dsl-data-space/application'; export declare enum LEGEND_QUERY_USER_DATA_KEY { RECENTLY_VIEWED_QUERIES = "query-editor.recent-queries", RECENTLY_VIEWED_LEGACY_DATAPRODUCTS = "query-editor.recent-dataSpaces", RECENTLY_VIEWED_DATAPRODUCTS = "query-editor.recent-dataProducts", USER_LAKEHOUSE_INFO = "query-editor.lakehouse-info" } export interface LakehouseUserInfo { env: string | undefined; snowflakeWarehouse: string | undefined; } export declare const USER_DATA_RECENTLY_VIEWED_QUERIES_LIMIT = 10; export declare const USER_DATA_QUERY_DATASPACE_LIMIT = 10; export declare const USER_DATA_QUERY_DATAPRODUCT_LIMIT = 50; type SavedData = string[]; export declare class LegendQueryUserDataHelper { static getPersistedData(service: UserDataService, key: LEGEND_QUERY_USER_DATA_KEY): SavedData; static persistValue(service: UserDataService, value: string, persistedData: SavedData, opts: { key: LEGEND_QUERY_USER_DATA_KEY; limit: number; }): void; static getRecentlyViewedQueries(service: UserDataService): SavedData; static removeRecentlyViewedQueries(service: UserDataService): void; static removeRecentlyViewedQuery(service: UserDataService, queryId: string): void; static addRecentlyViewedQuery(service: UserDataService, queryId: string): void; static getRecentlyVisitedDataSpaces(service: UserDataService): VisitedLegacyDataProduct[]; static findRecentlyVisitedDataSpace(service: UserDataService, id: string): VisitedLegacyDataProduct | undefined; static getRecentlyVisitedDataSpace(service: UserDataService): VisitedLegacyDataProduct | undefined; static persistVisitedDataspace(service: UserDataService, value: VisitedLegacyDataProduct, persistedData: VisitedLegacyDataProduct[], limit?: number): void; static removeRecentlyViewedDataSpaces(service: UserDataService): void; static removeRecentlyViewedDataSpace(service: UserDataService, id: string): void; static removeDataSpace(service: UserDataService, info: ResolvedDataSpaceEntityWithOrigin): void; static addRecentlyVistedDatspace(service: UserDataService, info: ResolvedDataSpaceEntityWithOrigin, execContext: string | undefined): void; static addVisitedDatspace(service: UserDataService, visited: VisitedLegacyDataProduct): void; static updateVisitedDataSpaceExecContext(service: UserDataService, groupId: string, artifactId: string, dataspace: string, exec: string): boolean; static getRecentlyVisitedDataProducts(service: UserDataService): VisitedDataProduct[]; static findRecentlyVisitedDataProduct(service: UserDataService, id: string): VisitedDataProduct | undefined; static getRecentlyVisitedDataProduct(service: UserDataService): VisitedDataProduct | undefined; static persistVisitedDataProduct(service: UserDataService, value: VisitedDataProduct, persistedData: VisitedDataProduct[], limit?: number): void; static removeRecentlyViewedDataProducts(service: UserDataService): void; static removeRecentlyViewedDataProduct(service: UserDataService, id: string): void; static addVisitedDataProduct(service: UserDataService, visited: VisitedDataProduct): void; static updateVisitedDataProductExecContext(service: UserDataService, groupId: string, artifactId: string, dataProductPath: string, exec: string): boolean; static getLakehouseUserInfo(service: UserDataService): LakehouseUserInfo | undefined; static persistLakehouseUserInfo(service: UserDataService, info: LakehouseUserInfo): void; static removeLakehouseUserInfo(service: UserDataService): void; } export {}; //# sourceMappingURL=LegendQueryUserDataHelper.d.ts.map