// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Environment, Folder, GrpcRequest, HttpRequest, WebsocketRequest, Workspace } from "./gen_models"; export type BatchUpsertResult = { workspaces: Array, environments: Array, folders: Array, httpRequests: Array, grpcRequests: Array, websocketRequests: Array, }; export type ImportConflictResolution = "keep_mine" | "take_source"; /** * Where a staged import will be committed. * * The destination workspace and optional folder IDs are captured in the plan so the preview describes * the exact destination that confirmation will use. */ export type ImportDestination = { "type": "new_workspace" } | { "type": "existing_workspace", workspaceId: string, folderId?: string, }; /** * Where an import's contents came from, used to link the committed workspace back to it. */ export type ImportOrigin = { /** * The absolute file path or URL the contents were read from. */ origin: string, label: string, }; export type ImportPlan = { importer: string, destination: ImportDestination, resources: BatchUpsertResult, warnings: Array, /** * Stable source key for every model in `resources`, keyed by its planned ID. */ sourceKeys: { [key in string]?: string }, /** * One entry per plannable resource; commit applies only the selected ones. */ items: Array, origin?: ImportOrigin, }; export type ImportPlanAction = "create" | "update" | "delete" | "unchanged" | "keep_local" | "conflict"; export type ImportPlanItem = { action: ImportPlanAction, model: ImportResourceType, modelId: string, name: string, /** * Planned parent folder ID for incoming resources; current parent for deletions. */ parentId?: string, selected: boolean, resolution?: ImportConflictResolution, }; export type ImportPlanWarning = { title: string, detail: string, }; /** * The model types an import plan can contain. */ export type ImportResourceType = "environment" | "folder" | "grpc_request" | "http_request" | "websocket_request" | "workspace";