/** * The native Azure read transport (#1212) — the read half of what * `op/activities/az-apply.ts` already does for writes. * * Azure's observers shelled `az resource show`, once per declared entity, * serially, and read the failure out of the CLI's stderr. The applier does * not: `azApply` PUTs each resource at its ARM URL over `fetch`, honours an * endpoint override, and is injectable for tests. Since `az resource show` * returns the ARM JSON that endpoint would have returned anyway, this is * transport only — the payload the readers normalize is unchanged, which is * what made Azure the cheapest of the three observers to move. * * ## Signing * * Requests are unsigned, exactly like `azApply`'s. That is what makes the * emulator lane work with no credential plumbing, and the reason this is * scoped to floci-az rather than announced as a real-ARM read path: real ARM * wants a bearer token. The `az` CLI path remains for a signed read until * token acquisition lands here. */ import { type AzHttp } from "../op/activities/az-apply.js"; export interface AzureReadClientOptions { /** Endpoint override (floci-az `http://localhost:4577`). Omit for real ARM. */ endpoint?: string; subscriptionId?: string; /** Resource group the environment maps to. */ resourceGroup: string; http?: AzHttp; signal?: AbortSignal; } /** A failed read, carrying the status and ARM's own error code where it sent one. */ export declare class AzureReadError extends Error { readonly status: number; readonly code?: string | undefined; constructor(message: string, status: number, code?: string | undefined); } /** True when the read failed only because the resource is not there. */ export declare function isNotFound(err: unknown): boolean; /** The ARM URL for one resource in the group — the same shape the applier PUTs to. */ export declare function armResourceReadUrl(options: AzureReadClientOptions, type: string, name: string, apiVersion?: string): string; /** One resource as ARM returns it. */ export interface ArmResourceBody { id?: string; name?: string; type?: string; location?: string; tags?: Record; properties?: Record; [key: string]: unknown; } /** * GET the resource-group's resource list — the enumeration half live export * needs (#1214). Real ARM returns envelopes (id/name/type/location/tags); * callers wanting the full body follow up with {@link getResourceById}. */ export declare function listResources(options: AzureReadClientOptions): Promise; /** GET one resource by its full ARM id — the read for a list entry, nested types included. */ export declare function getResourceById(options: AzureReadClientOptions, id: string, apiVersion?: string): Promise; /** GET one resource. Throws {@link AzureReadError}; 404 means absent, which callers check with {@link isNotFound}. */ export declare function getResource(options: AzureReadClientOptions, type: string, name: string, apiVersion?: string): Promise; //# sourceMappingURL=read-client.d.ts.map