/** * Copyright (c) 2026-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 { LegendMarketplaceBaseStore } from '../LegendMarketplaceBaseStore.js'; import { ActionState, type GeneratorFn } from '@finos/legend-shared'; import { type ServiceDetail, ServiceOwnershipType } from '@finos/legend-graph'; import { LegendServiceTree, type LegendServiceTreeNode } from './LegendServiceTree.js'; export declare enum LegendServiceSort { DEFAULT = "Default", NAME_ALPHABETICAL = "Name A-Z", NAME_REVERSE_ALPHABETICAL = "Name Z-A" } export declare enum ServicesViewMode { LIST = "list", TILE = "tile", GRID = "grid", TREE = "tree" } export declare class LegendServiceCardState { readonly service: ServiceDetail; constructor(service: ServiceDetail); get title(): string; get patternPath(): string; get description(): string; get owners(): string[]; get ownershipType(): ServiceOwnershipType | undefined; get guid(): string; private static hashString; get displayImage(): string; } export declare class LegendMarketplaceDataAPIsStore { readonly marketplaceBaseStore: LegendMarketplaceBaseStore; searchQuery: string; sort: LegendServiceSort; viewMode: ServicesViewMode; showOwnServicesOnly: boolean; showFavoritesOnly: boolean; favoritePatterns: Set; serviceCardStates: LegendServiceCardState[]; page: number; itemsPerPage: number; ownerFilters: string[]; deploymentIdFilters: string[]; favorites: Set; toggledTreeGroups: Set; treeScopePath: string | undefined; private serviceTreeCache; readonly fetchingServicesState: ActionState; constructor(marketplaceBaseStore: LegendMarketplaceBaseStore); setSearchQuery(query: string): void; setTreeScopePath(path: string | undefined): void; /** * Whether groups are open unless toggled: while searching they are, so * matches are visible. */ get treeGroupsOpenByDefault(): boolean; /** * Whether the group at `path` is open unless toggled. The scope root of a * shared sub-tree always starts open. */ private isTreeGroupOpenByDefault; isTreeGroupExpanded(path: string): boolean; toggleTreeGroup(path: string): void; expandAllTreeGroups(): void; collapseAllTreeGroups(): void; setSort(sort: LegendServiceSort): void; setViewMode(mode: ServicesViewMode): void; setShowOwnServicesOnly(value: boolean): void; setShowFavoritesOnly(value: boolean): void; isFavorite(pattern: string): boolean; toggleFavorite(pattern: string): void; setPage(value: number): void; setItemsPerPage(value: number): void; private persistOwnerFilters; private persistDeploymentIdFilters; addOwnerFilter(value: string): void; removeOwnerFilter(value: string): void; addDeploymentIdFilter(value: string): void; removeDeploymentIdFilter(value: string): void; clearAllFilters(): void; get hasActiveFilters(): boolean; get filteredSortedServices(): LegendServiceCardState[]; /** * The rows to render: one pass over the flat tree that skips collapsed * subtrees. */ get visibleTreeRows(): LegendServiceTreeNode[]; /** * The tree of the filtered services, scoped to `treeScopePath` when set. */ get serviceTree(): LegendServiceTree; /** * Builds the tree, or returns the one built for the same services and scope. * The cache is a plain field rather than a kept-alive computed, so a tree * built ahead of time survives until its inputs change. */ private buildServiceTree; get paginatedServices(): LegendServiceCardState[]; get totalFilteredCount(): number; get isLoading(): boolean; fetchAllServices(): GeneratorFn; } //# sourceMappingURL=LegendMarketplaceDataAPIsStore.d.ts.map