UNPKG

@scalar/api-client

Version:

the open source API testing client

28 lines 954 B
import { type WorkspaceStore } from '@scalar/workspace-store/client'; import { type Ref } from 'vue'; /** * Default workspace meta used when we need to create or navigate to a fallback workspace. * Keep in sync with the persisted workspace structure. */ export declare const DEFAULT_WORKSPACE: Workspace; export type Workspace = { name: string; id: string; }; export type UseWorkspaceSelectorReturn = { activeWorkspace: Ref<Workspace | null>; workspaces: Ref<Workspace[]>; store: Ref<WorkspaceStore | null>; setWorkspaceId: (id: string) => Promise<void>; createWorkspace: (props: { name: string; }) => Promise<Workspace | undefined>; loadWorkspace: (id: string) => Promise<{ success: true; workspace: WorkspaceStore; } | { success: false; }>; }; export declare const useWorkspaceSelector: () => UseWorkspaceSelectorReturn; //# sourceMappingURL=use-workspace-selector.d.ts.map