import * as plugins from '../plugins.js';
import type * as authInterfaces from '../data/auth.js';
import type { IApiTokenInfo, IApiTokenPolicy, TApiTokenScope } from '../data/route-management.js';
/**
 * Create a new API token. Returns the raw token value once (never shown again).
 * Admin JWT only — tokens cannot create tokens.
 */
export interface IReq_CreateApiToken extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_CreateApiToken> {
    method: 'createApiToken';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        name: string;
        scopes: TApiTokenScope[];
        policy?: IApiTokenPolicy;
        expiresInDays?: number | null;
    };
    response: {
        success: boolean;
        tokenId?: string;
        tokenValue?: string;
        message?: string;
    };
}
/**
 * List all API tokens (without hashes).
 */
export interface IReq_ListApiTokens extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ListApiTokens> {
    method: 'listApiTokens';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
    };
    response: {
        tokens: IApiTokenInfo[];
    };
}
/**
 * Revoke (delete) an API token.
 */
export interface IReq_RevokeApiToken extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RevokeApiToken> {
    method: 'revokeApiToken';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        id: string;
    };
    response: {
        success: boolean;
        message?: string;
    };
}
/**
 * Roll (regenerate) an API token's secret. Returns the new raw token value once.
 * Admin JWT only.
 */
export interface IReq_RollApiToken extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RollApiToken> {
    method: 'rollApiToken';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        id: string;
    };
    response: {
        success: boolean;
        tokenValue?: string;
        message?: string;
    };
}
/**
 * Enable or disable an API token.
 */
export interface IReq_ToggleApiToken extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ToggleApiToken> {
    method: 'toggleApiToken';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        id: string;
        enabled: boolean;
    };
    response: {
        success: boolean;
        message?: string;
    };
}
