import { AuthApiTransports } from "../../shared/transports.js"; import { PolyesterMutationOptions, PolyesterRequestOptions } from "../../shared/request-options.js"; import { SubaccountResolver } from "../subaccount-resolver.js"; import { PolyesterRealtime } from "../../realtime/types.js"; import "../../realtime/index.js"; import { BaseSubscribeInput } from "../../shared/types.js"; import { ApiKeyPoliciesService } from "../policies/api-key-policies/api-key-policies.js"; import "../policies/api-key-policies/index.js"; import { ApiKey, ApiKeyIdInputSchema, ApiKeysCreateInputSchema, ApiKeysListInputSchema, ApiKeysUpdateInputSchema } from "./api-keys.schemas.js"; import * as v from "valibot"; //#region src/services/api-keys/api-keys.d.ts interface SubscribeApiKeysInput extends BaseSubscribeInput { accountId: string; } /** * Manages API key metadata, client-generated Ed25519 keypairs, policies, and realtime API key updates. */ declare class ApiKeysService { #private; readonly policies: ApiKeyPoliciesService; constructor(transports: AuthApiTransports, realtime: PolyesterRealtime, resolver?: SubaccountResolver); /** * Returns non-revoked API keys owned by the caller, newest first, optionally scoped through an explicit or resolver-provided subaccount ID. */ list(params?: v.InferInput, options?: PolyesterRequestOptions): Promise; /** * Fetches one caller-owned API key by ak_... key ID and returns null when no matching key is returned. */ get(input: v.InferInput, options?: PolyesterRequestOptions): Promise; /** * Creates API key metadata using a client-generated Ed25519 public key; security settings may require MFA fresh step-up and retrying with stepUpToken. */ create(payload: v.InferInput, options?: PolyesterMutationOptions): Promise; /** * Permanently revokes the specified API key; revoked keys cannot authenticate again. */ delete(input: v.InferInput, options?: PolyesterMutationOptions): Promise; /** * Updates mutable key metadata, ACTIVE/DISABLED status, IP whitelist replacement/clearing, and optional expiry; revocation must use delete. */ update(payload: v.InferInput, options?: PolyesterMutationOptions): Promise; /** * Generates an Ed25519 keypair locally and returns public and secret key material as both hex strings and byte arrays; only the public key should be sent to the API. */ generateKeypair(): Promise<{ publicKey: { hex: string; bytes: Uint8Array; }; secretKey: { hex: string; bytes: Uint8Array; }; }>; /** * Subscribes to private API key updates for an account and emits normalized API key metadata from realtime protobuf publications. */ subscribe(input: SubscribeApiKeysInput): () => void; } //#endregion export { ApiKeysService }; //# sourceMappingURL=api-keys.d.ts.map