import type { DepotClient } from './client.js'; import type { JsonObject } from './shape.js'; export interface ListRunsRequest { status?: string[] | undefined; repo?: string | undefined; sha?: string | undefined; trigger?: string | undefined; pr?: number | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } export interface ListWorkflowsRequest { name?: string | undefined; repo?: string | undefined; status?: string[] | undefined; trigger?: string | undefined; sha?: string | undefined; pr?: number | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } export interface LogsRequest { attemptId?: string | undefined; jobId?: string | undefined; pageToken?: string | undefined; } export interface ListArtifactsRequest { runId?: string | undefined; workflowId?: string | undefined; jobId?: string | undefined; attemptId?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } export type DiagnosisTargetType = 'RUN' | 'WORKFLOW' | 'JOB' | 'ATTEMPT'; /** * Verified live on 2026-09-06: GetFailureDiagnosis accepts `targetType` only as the protobuf enum * number. Every symbolic spelling (`RUN`, `TARGET_TYPE_RUN`, `run`, snake_case field name) is * answered with 400 "target_type is required"; 5 gives "Unsupported target_type: 5". */ export declare const DIAGNOSIS_TARGET_TYPE_WIRE: Readonly>; /** The same table read backwards, for responses that echo the target as a number. */ export declare const DIAGNOSIS_TARGET_TYPE_NAMES: Readonly>; export interface BuildStepsRequest { projectId: string; buildId: string; pageSize?: number | undefined; pageToken?: string | undefined; } export interface BuildStepLogsRequest extends BuildStepsRequest { buildStepDigest: string; } export interface UsageWindow { startAt: string; endAt: string; } /** * From depot/sandbox-sdk sandbox.proto. Protobuf JSON spells enum values by their full name, and * Depot's JSON binding accepted `SANDBOX_STATUS_RUNNING` inside `filter.states` on 2026-09-06. */ export interface ListSandboxesRequest { pageSize?: number | undefined; pageToken?: string | undefined; filter?: { states?: string[] | undefined; createdAfter?: string | undefined; createdBefore?: string | undefined; } | undefined; } /** The registry service pages by number (`page`, `pageSize`, `hasMore`), not by token. */ export interface RegistryPageRequest { page?: number | undefined; pageSize?: number | undefined; query?: string | undefined; } export interface ListRegistryImagesRequest { repository: string; page?: number | undefined; pageSize?: number | undefined; tagQuery?: string | undefined; tagStatus?: string | undefined; } /** * Typed entry points for the Depot RPCs this server actually uses. Responses stay as * `JsonObject`: `depot.ci.v1` is documented in prose but published in neither `depot/proto` nor * the Buf Schema Registry, so hand-written response interfaces would assert a contract nobody * publishes. Callers read fields through the tolerant accessors in `shape.ts` instead. */ export declare class DepotApi { private readonly client; constructor(client: DepotClient); listOrganizations(): Promise; listProjects(request?: { regionId?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; }): Promise; getProject(projectId: string): Promise; listTrustPolicies(projectId: string): Promise; /** * Per depot/proto, ListTokensResponse.Token carries only token_id and description; the secret * exists solely in CreateToken's response, which this server never calls. Verified live * 2026-09-06 (an organization without project tokens answers `{}`). */ listTokens(projectId: string): Promise; listBuilds(request: { projectId: string; pageSize?: number | undefined; pageToken?: string | undefined; }): Promise; getBuild(buildId: string): Promise; /** * Both build-step RPCs go over Connect's binary protobuf encoding: their JSON binding fails on * Depot's side (the server cannot encode its own response, observed 2026-09-06), while the * binary encoding works. Decoded into the shape the JSON binding would have produced. */ getBuildSteps(request: BuildStepsRequest): Promise; getBuildStepLogs(request: BuildStepLogsRequest): Promise; listImages(request: { projectId: string; pageSize?: number | undefined; pageToken?: string | undefined; }): Promise; getUsage(window: UsageWindow): Promise; getProjectUsage(request: UsageWindow & { projectId: string; }): Promise; listProjectUsage(request: UsageWindow & { pageSize?: number | undefined; pageToken?: string | undefined; }): Promise; listRuns(request: ListRunsRequest): Promise; getRun(runId: string): Promise; getRunStatus(runId: string): Promise; listWorkflows(request: ListWorkflowsRequest): Promise; getWorkflow(workflowId: string): Promise; getJob(jobId: string): Promise; getAttempt(attemptId: string): Promise; getRunMetrics(runId: string): Promise; getJobMetrics(jobId: string): Promise; getJobAttemptMetrics(attemptId: string): Promise; getJobSummary(request: { jobId?: string | undefined; attemptId?: string | undefined; }): Promise; getJobAttemptLogs(request: LogsRequest): Promise; listArtifacts(request: ListArtifactsRequest): Promise; getArtifactDownloadUrl(artifactId: string): Promise; getFailureDiagnosis(targetId: string, targetType: DiagnosisTargetType): Promise; cancelRun(runId: string): Promise; cancelWorkflow(workflowId: string): Promise; /** CancelJobRequest is {workflowId, jobId}: verified against Depot's generated bindings and live on 2026-09-07. */ cancelJob(jobId: string, workflowId: string): Promise; /** RetryJobRequest is {workflowId, jobId}; without the workflow Depot answers 400 "Workflow not found" (live, 2026-09-07). */ retryJob(jobId: string, workflowId: string): Promise; retryFailedJobs(workflowId: string): Promise; rerunWorkflow(workflowId: string): Promise; /** * Mutating. Field names from Depot's CLI bindings (`pkg/proto/depot/ci/v1/ci.pb.go`, * `DispatchWorkflowRequest`): `repo` in owner/name form, `workflow` as the file basename, `ref` * a branch or tag, `inputs` a string map; `orgId` is left to the `x-depot-org` header. The * response carries `orgId` and `runId`. Never invoked live by this project. */ dispatchWorkflow(request: DispatchWorkflowRequest): Promise; /** * v3beta2 secret/variable list filters are undocumented, and Connect's JSON codec rejects * unknown fields, so the request is deliberately empty and all filtering happens client-side. */ listSecrets(): Promise; listVariables(): Promise; listSandboxes(request?: ListSandboxesRequest): Promise; /** GetSandbox takes a SandboxRef, whose only selector today is `id`. */ getSandbox(sandboxId: string): Promise; /** * Mutating, beta. `StopSandboxRequest` wraps the SandboxRef under `sandbox` (depot/sandbox-sdk * sandbox.proto); a graceful stop that lands in FINISHED. Depot answers `failed_precondition` * for a sandbox already in a terminal state. Never invoked live by this project. */ stopSandbox(sandboxId: string): Promise; /** Mutating, beta. Same shape as StopSandbox; a hard termination that lands in CANCELLED. */ killSandbox(sandboxId: string): Promise; listRegistryRepositories(request?: RegistryPageRequest): Promise; /** Answers `invalid_argument: Invalid repository` unless `repository` is set (observed live). */ listRegistryImages(request: ListRegistryImagesRequest): Promise; /** `reference` is a tag or a digest. */ getRegistryImageDetail(request: { repository: string; reference: string; }): Promise; /** An empty object means no policy is configured for the repository. */ getRegistryRetentionPolicy(repository: string): Promise; /** * Verified live on 2026-09-06: the lookup is a oneof of `id` or `name`; a missing variable is * `not_found` "variable 'X' not found", neither field is `invalid_argument`. */ getVariable(name: string): Promise; /** Same lookup as `getVariable`; verified live the same day ("secret 'X' not found"). */ getSecret(name: string): Promise; /** * Mutating. Field names for the three variable writes come from the generated bindings Depot's * open-source CLI vendors (`pkg/proto/depot/ci/v3beta2/variables.pb.go`), not from a live call: * this project has never invoked them. `variantName` defaults to "default" server-side. */ setVariableVariant(request: SetVariableVariantRequest): Promise; /** Mutating. Answers `{deletedVariable: true}` when the last variant went with it. */ deleteVariableVariant(variantId: string): Promise; /** Mutating. Removes the variable and every variant; the lookup oneof matches GetVariable. */ deleteVariable(lookup: { id: string; } | { name: string; }): Promise; /** * Mutating. Shape from `depot/proto` `CreateProjectRequest`; `hardware` travels as the enum * name (`HARDWARE_16X32`), the spelling Depot itself uses in `ListProjects` responses. */ createProject(request: CreateProjectRequest): Promise; /** * Mutating. Shape from `depot/proto` `UpdateProjectRequest`: every field but `projectId` is * optional and an omitted one is left as it is. `cachePolicy` is a whole message, so a caller * changing one of its two numbers must send both or Depot reads the other as zero. */ updateProject(request: UpdateProjectRequest): Promise; /** Mutating and irreversible. `DeleteProjectRequest` is the project id alone. */ deleteProject(projectId: string): Promise; } export interface VariableAttribute { /** One of repository, environment, branch, workflow. */ key: string; value: string; } export interface SetVariableVariantRequest { variableName: string; variantName?: string | undefined; value: string; description?: string | undefined; attributes: VariableAttribute[]; } export interface DispatchWorkflowRequest { repo: string; workflow: string; ref: string; inputs?: Readonly> | undefined; } export interface CreateProjectRequest { name: string; regionId: string; cachePolicy?: { keepDays: number; keepGb: number; } | undefined; hardware?: string | undefined; } export interface UpdateProjectRequest { projectId: string; name?: string | undefined; regionId?: string | undefined; cachePolicy?: { keepDays: number; keepGb: number; } | undefined; hardware?: string | undefined; } //# sourceMappingURL=api.d.ts.map