/** * Previews — per-PR cost browser (ADR-137 §2.3 / §2.4). * * Two read-only operations over the per-PR cost aggregator. Wire shape * sourced from `@sylphx/contract` (`previewCostEndpoints`). */ import type { PreviewCostEnvelope, PreviewCostListResult } from '@sylphx/contract'; import type { Client } from './client.js'; export interface PreviewCostOptions { /** * Override the org context for the request. When omitted, the server * resolves the caller's current org from the auth token (or session * cookie). Pass an org slug or id to override. */ readonly orgId?: string; } export interface ListPreviewCostOptions extends PreviewCostOptions { /** * Opaque cursor returned by a previous `listCosts()` call. Absent or * empty means "first page". */ readonly cursor?: string; } /** * Fetch the per-PR cost envelope for one project + PR. * * Returns `404` (via thrown `ApiError`) when no preview environment has * existed for the PR on the project (common under ADR-130 selective * preview-tier policy — PRs that never matched a preview policy produce * no envelope). */ export declare const cost: (client: Client, projectId: string, prNumber: number, options?: PreviewCostOptions) => Promise; /** * List the most recent 50 PR cost envelopes for a project, ordered by * window-open time descending. The `cursor` field on the result, when * present, can be passed back as `options.cursor` to fetch the next page. */ export declare const listCosts: (client: Client, projectId: string, options?: ListPreviewCostOptions) => Promise; export type { PreviewCostEnvelope, PreviewCostListItem, PreviewCostListResult, } from '@sylphx/contract'; //# sourceMappingURL=previews.d.ts.map