UNPKG

@finos/legend-application-studio

Version:
98 lines 4.76 kB
/** * 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 GeneratorFn, ActionState } from '@finos/legend-shared'; import { type SDLCServerClient, WorkspaceType, Project, Workspace, Patch } from '@finos/legend-server-sdlc'; import type { LegendStudioApplicationStore } from '../LegendStudioBaseStore.js'; import { ProjectConfigurationStatus } from './ProjectConfigurationStatus.js'; import { GraphManagerState } from '@finos/legend-graph'; import { type RecentProjectEntry, type RecentWorkspaceEntry } from '../../__lib__/LegendStudioUserDataHelper.js'; interface ImportProjectSuccessReport { projectId: string; projectName: string; reviewUrl: string; } export declare class WorkspaceSetupStore { readonly applicationStore: LegendStudioApplicationStore; readonly sdlcServerClient: SDLCServerClient; readonly initState: ActionState; projects: Project[]; currentProject?: Project | undefined; currentProjectConfigurationStatus?: ProjectConfigurationStatus | undefined; loadProjectsState: ActionState; createOrImportProjectState: ActionState; importProjectSuccessReport?: ImportProjectSuccessReport | undefined; showCreateProjectModal: boolean; engineInitializeState: ActionState; enginePromise: Promise<void> | undefined; createSandboxProjectState: ActionState; sandboxProject: Project | boolean; hasSandboxAccess: boolean | undefined; sandboxModal: boolean; loadSandboxState: ActionState; patches: Patch[]; loadPatchesState: ActionState; workspaces: Workspace[]; currentWorkspace?: Workspace | undefined; loadWorkspacesState: ActionState; createWorkspaceState: ActionState; showCreateWorkspaceModal: boolean; graphManagerState: GraphManagerState; recentProjects: RecentProjectEntry[]; recentWorkspaces: RecentWorkspaceEntry[]; selectRecentProjectState: ActionState; constructor(applicationStore: LegendStudioApplicationStore, sdlcServerClient: SDLCServerClient); get supportsCreatingSandboxProject(): boolean; setShowCreateProjectModal(val: boolean): void; setShowCreateWorkspaceModal(val: boolean): void; setImportProjectSuccessReport(importProjectSuccessReport: ImportProjectSuccessReport | undefined): void; resetProject(): void; resetWorkspace(): void; setSandboxModal(val: boolean): void; removeRecentProject(projectId: string): void; removeRecentWorkspace(entry: { projectId: string; workspaceId: string; workspaceType: WorkspaceType; }): void; clearRecents(): void; /** * Fetches a project by id (used when the user picks a cached "recent" * project that may not be in the current search results) and switches to * it. If the project no longer exists, the entry is pruned from recents. * * NOTE: we deliberately don't short-circuit using the cached recent entry * here. Going through `getProject` keeps the prune-on-404 path intact, and * the cached metadata is already used elsewhere to make the UI feel fast * (dropdown stubs in `WorkspaceSetup.tsx` and tile labels in * `RecentWorkspacesPanel.tsx`). */ selectRecentProject(projectId: string): GeneratorFn<void>; createSandboxProject(): GeneratorFn<void>; initialize(projectId: string | undefined, workspaceId: string | undefined, groupWorkspaceId: string | undefined): GeneratorFn<void>; initializeEngine(): GeneratorFn<void>; loadProjects(searchText: string): GeneratorFn<void>; loadSandboxProject(): GeneratorFn<void>; changeProject(project: Project, workspaceInfo?: { workspaceId: string; workspaceType: WorkspaceType; } | undefined): GeneratorFn<void>; changeWorkspace(workspace: Workspace): void; createProject(name: string, description: string, groupId: string, artifactId: string, tags?: string[]): GeneratorFn<void>; importProject(id: string, groupId: string, artifactId: string): GeneratorFn<void>; createWorkspace(projectId: string, patchReleaseVersionId: string | undefined, workspaceId: string, workspaceType: WorkspaceType): GeneratorFn<void>; } export {}; //# sourceMappingURL=WorkspaceSetupStore.d.ts.map