import type { APIKeyJSON } from './JSON'; /** * The Backend `APIKey` object holds information about an API key. */ export declare class APIKey { /** * A unique ID for the API key. */ readonly id: string; /** * The type of the API key. Currently always `'api_key'`. */ readonly type: string; /** * The API key's name. */ readonly name: string; /** * The user or organization ID that the API key is associated with. */ readonly subject: string; /** * An array of scopes that define what the API key can access. */ readonly scopes: string[]; /** * Custom claims associated with the API key. */ readonly claims: Record | null; /** * A boolean indicating whether the API key has been revoked. */ readonly revoked: boolean; /** * The reason for revoking the API key, if it has been revoked. */ readonly revocationReason: string | null; /** * A boolean indicating whether the API key has expired. */ readonly expired: boolean; /** * The expiration date and time of the API key. `null` if the API key never expires. */ readonly expiration: number | null; /** * The user ID for the user creating the API key. */ readonly createdBy: string | null; /** * An optional description for the API key. */ readonly description: string | null; /** * The date and time when the API key was last used to authenticate a request. */ readonly lastUsedAt: number | null; /** * The date when the API key was created. */ readonly createdAt: number; /** * The date when the API key was last updated. */ readonly updatedAt: number; /** * The API key secret. **This property is only present in the response from [`create()`](/docs/reference/objects/api-keys#create) and cannot be retrieved later.** */ readonly secret?: string | undefined; constructor( /** * A unique ID for the API key. */ id: string, /** * The type of the API key. Currently always `'api_key'`. */ type: string, /** * The API key's name. */ name: string, /** * The user or organization ID that the API key is associated with. */ subject: string, /** * An array of scopes that define what the API key can access. */ scopes: string[], /** * Custom claims associated with the API key. */ claims: Record | null, /** * A boolean indicating whether the API key has been revoked. */ revoked: boolean, /** * The reason for revoking the API key, if it has been revoked. */ revocationReason: string | null, /** * A boolean indicating whether the API key has expired. */ expired: boolean, /** * The expiration date and time of the API key. `null` if the API key never expires. */ expiration: number | null, /** * The user ID for the user creating the API key. */ createdBy: string | null, /** * An optional description for the API key. */ description: string | null, /** * The date and time when the API key was last used to authenticate a request. */ lastUsedAt: number | null, /** * The date when the API key was created. */ createdAt: number, /** * The date when the API key was last updated. */ updatedAt: number, /** * The API key secret. **This property is only present in the response from [`create()`](/docs/reference/objects/api-keys#create) and cannot be retrieved later.** */ secret?: string | undefined); static fromJSON(data: APIKeyJSON): APIKey; } //# sourceMappingURL=APIKey.d.ts.map