import type { components } from '../generated/api.js';
import type { ApiKeyId } from '../core/branded-types.js';
import { WorkspaceScopedResource } from './base.js';
import type { ListParams } from '../core/utils.js';
/**
 * Manage API keys for a workspace.
 *
 * API keys are used to authenticate SDK/API requests. Each key has a role
 * and a set of permissions. Keys expire after 1-90 days.
 */
export declare class ApiKeysResource extends WorkspaceScopedResource {
    /**
     * Get info about the currently authenticated API key.
     * Does not require a workspace ID in the path.
     */
    me(): Promise<{
        expires_at: string;
        expires_in_seconds: number;
        key_id: string;
        name: string | null;
        workspace_id: string;
    } & import("../index.js").ResponseMetadata>;
    /** Create a new API key */
    create(body: components['schemas']['CreateApiKeyRequest']): Promise<{
        api_key: string;
        created_by_credential_id: string | null;
        created_by_entity_id: string | null;
        expires_at: string;
        key_id: string;
        name: string | null;
        permissions: string[];
        role: string;
    } & import("../index.js").ResponseMetadata>;
    /** List API keys in the workspace */
    list(params?: ListParams & {
        mine_only?: boolean;
    }): Promise<{
        continuation_token?: number | null | undefined;
        has_more: boolean;
        items: {
            created_at: string;
            created_by_credential_id: string | null;
            created_by_entity_id: string | null;
            expires_at: string;
            id: string;
            key_id: string;
            last_used_at: string | null;
            name: string | null;
            permissions: string[];
            role: string;
            updated_at: string;
            workspace_id: string;
        }[];
        total?: number | null | undefined;
    } & import("../index.js").ResponseMetadata>;
    listAutoPaging(params?: ListParams & {
        mine_only?: boolean;
    }): AsyncGenerator<{
        created_at: string;
        created_by_credential_id: string | null;
        created_by_entity_id: string | null;
        expires_at: string;
        id: string;
        key_id: string;
        last_used_at: string | null;
        name: string | null;
        permissions: string[];
        role: string;
        updated_at: string;
        workspace_id: string;
    }, any, any>;
    /** Revoke an API key */
    revoke(keyId: ApiKeyId | string): Promise<void>;
    /** Rotate an API key — invalidates the old key and issues a new one */
    rotate(keyId: ApiKeyId | string, body: components['schemas']['RotateApiKeyRequest']): Promise<{
        api_key: string;
        created_by_credential_id: string | null;
        created_by_entity_id: string | null;
        expires_at: string;
        key_id: string;
        name: string | null;
        permissions: string[];
        role: string;
    } & import("../index.js").ResponseMetadata>;
}
//# sourceMappingURL=api-keys.d.ts.map