import type { OwnResourceReachKind, OwnResourceReachWorkspace } from "@opengeni/sdk"; import type { OpenGeniBrowserClient } from "@opengeni/sdk/browser"; /** * "Where it works" for your own login, model plan or machine: each workspace * you belong to in the organization, with a switch for whether it works there * for your own messages. Nobody else's messages ever use it. Logins and plans * always work in your Personal workspace; a machine can be turned off there too. */ export type OwnReachClient = Pick; export type OwnReachTarget = { client: OwnReachClient; /** The workspace the page is in. */ workspaceId: string; resourceKind: OwnResourceReachKind; resourceId: string; /** * Rows already loaded (by "My things"): shown at once, without asking again. * "Try again" after a failure still reads them fresh. */ initialWorkspaces?: readonly OwnResourceReachWorkspace[] | undefined; }; type ReachState = { status: "loading"; } | { status: "absent"; } | { status: "error"; message: string; } | { status: "ready"; workspaces: OwnResourceReachWorkspace[]; }; export declare const OWN_WHERE_IT_WORKS_TITLE = "Where it works"; export declare const OWN_WHERE_IT_WORKS_DESCRIPTION = "Only your own messages use it. In a shared workspace, people see what the agent does with it."; export declare function useOwnResourceReach({ client, workspaceId, resourceKind, resourceId, initialWorkspaces, }: OwnReachTarget): { state: ReachState; pending: ReadonlySet; rowErrors: Readonly>; setOn: (row: OwnResourceReachWorkspace, on: boolean) => Promise; retry: () => void; }; /** Nothing to choose: only your Personal workspace, where it always works. */ export declare function ownReachHasNothingToChoose(workspaces: readonly OwnResourceReachWorkspace[]): boolean; /** * The workspace rows, with their loading and error states. Put it under a * heading; {@link OwnWhereItWorksSection} does that for detail pages and sheets. * Renders nothing when the thing isn't yours or there is nothing to choose. */ export declare function OwnWhereItWorks({ name, reach, }: { /** The login, plan or machine, for the switches' accessible names. */ name: string; reach: ReturnType; }): import("react").JSX.Element | null; /** "Where it works" as a detail section, for your own login, plan or machine. */ export declare function OwnWhereItWorksSection({ name, ...target }: OwnReachTarget & { name: string; }): import("react").JSX.Element | null; /** "Where it works" as a card, matching the cards of a machine's page. */ export declare function OwnWhereItWorksCard({ name, ...target }: OwnReachTarget & { name: string; }): import("react").JSX.Element | null; export {};