import * as z from "zod/v3";
import { Result as SafeParseResult } from "../types/fp.js";
import { APIKeyQuota } from "./apikeyquota.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
/**
 * Generic metadata attached to the API key.
 *
 * @remarks
 *
 * The accepted shape depends on the key's `purpose` and is validated when the key is created. For `ai-gateway` keys this carries `environment` and `spendAttribution`.
 */
export type APIKeyMetadata = {};
/**
 * Information about the newly created API key.
 */
export type APIKey = {
    /**
     * The unique identifier of the API key.
     */
    id: string;
    /**
     * The human-readable name of the API key.
     */
    name: string;
    /**
     * The last few characters of the API key string, for helping identify the API key.
     */
    partialKey: string;
    /**
     * The ID of the team that the API key grants access to.
     */
    teamId: string;
    /**
     * The API key's purpose, i.e. what resources it can be used with.
     */
    purpose: string;
    /**
     * The ID of the project that this API key grants access to.
     *
     * @remarks
     *
     * When this is unset, the API key grants access to all projects in the team.
     */
    projectId: string | null;
    /**
     * Timestamp (in milliseconds) of when the API key expires.
     */
    expiresAt: number | null;
    /**
     * Timestamp (in milliseconds) of when the API key was most recently used.
     */
    activeAt: number;
    /**
     * Timestamp (in milliseconds) of when the API key was created.
     */
    createdAt: number;
    /**
     * The ID of the user who created the API key.
     */
    createdBy: string;
    /**
     * Timestamp (in milliseconds) of when the API key was marked as leaked.
     */
    leakedAt: number | null;
    /**
     * URL where the API key was discovered as leaked.
     */
    leakedUrl: string | null;
    /**
     * The ID of the app that created the API key, if any
     */
    createdByAppId: string | null;
    /**
     * AI Gateway quota associated with an API key.
     */
    quota?: APIKeyQuota | undefined;
    /**
     * Generic metadata attached to the API key.
     *
     * @remarks
     *
     * The accepted shape depends on the key's `purpose` and is validated when the key is created. For `ai-gateway` keys this carries `environment` and `spendAttribution`.
     */
    metadata?: APIKeyMetadata | undefined;
};
/** @internal */
export declare const APIKeyMetadata$inboundSchema: z.ZodType<APIKeyMetadata, z.ZodTypeDef, unknown>;
export declare function apiKeyMetadataFromJSON(jsonString: string): SafeParseResult<APIKeyMetadata, SDKValidationError>;
/** @internal */
export declare const APIKey$inboundSchema: z.ZodType<APIKey, z.ZodTypeDef, unknown>;
export declare function apiKeyFromJSON(jsonString: string): SafeParseResult<APIKey, SDKValidationError>;
//# sourceMappingURL=apikey.d.ts.map