import type { FetchLike } from "../handlers/HandlerRegistration.js"; import type { UsageSigningKey } from "./UsageReport.js"; /** What registering an installation's usage-report key came to. */ export type UsageKeyRegistration = { readonly result: "REGISTERED"; } /** The kid is registered to another installation; nothing was changed. */ | { readonly result: "KEY_ID_IN_USE"; readonly issuer: string; } | { readonly result: "FAILED"; readonly code: string; }; /** * Registers an installation's usage-report key with Decionis * (`POST /v1/execution/provider-keys`, purpose `usage_report`, `issuer` the * installation id). Decionis keeps one key per kid and a registration under a * kid it already holds re-points that kid to the new issuer, which would make * the first installation's reports fail `USAGE_REPORT_ISSUER_MISMATCH`. So a * kid already registered, unrevoked, to another installation is refused here * and left alone: replicas sharing one key file each need their own kid. * * The API key needs `policy:write`; it is an operator's, used for this call * only, never the executor's runtime key. */ export declare function registerUsageKey(options: { readonly baseUrl: string; readonly apiKey: string; readonly fetch: FetchLike; readonly key: UsageSigningKey; readonly installationId: string; }): Promise; //# sourceMappingURL=UsageKeyRegistration.d.ts.map