import * as r from '@ubio/request';
import { ApiRequest } from './api-request.js';
export declare class CredentialsService {
    protected api: ApiRequest;
    constructor(api: ApiRequest);
    protected resolveCredentials(prop: any): Promise<CredentialsData | null>;
    getCredentials(prop: any): Promise<CredentialsData>;
    getAuthAgent(prop: any): Promise<r.AuthAgent>;
}
export interface StoredCredentials {
    id: string;
    name: string;
    providerName: string;
    credentialsType: CredentialsType;
    createdAt: number;
    updatedAt: number;
}
export type CredentialsType = 'basic' | 'bearer' | 'oauth1' | 'oauth2';
export type CredentialsConfig = CredentialsBasicConfig | CredentialsBearerConfig | CredentialsOAuth1Config | CredentialsOAuth2Config;
export type CredentialsData = CredentialsBasicData | CredentialsBearerData | CredentialsOAuth1Data | CredentialsOAuth2Data;
export interface CredentialsBasicConfig {
    type: 'basic';
    usernameLabel?: string;
    passwordLabel?: string;
    help?: string;
}
export interface CredentialsBasicData {
    username: string;
    password: string;
}
export interface CredentialsBearerConfig {
    type: 'bearer';
    prefix?: string;
    help?: string;
}
export interface CredentialsBearerData {
    prefix: string;
    token: string;
}
export interface CredentialsOAuth1Config {
    type: 'oauth1';
    requestTokenUrl: string;
    accessTokenUrl: string;
    userAuthorizationUrl: string;
    signatureMethod?: r.OAuth1SignatureMethod;
    customConfig?: boolean;
    help?: string;
}
export interface CredentialsOAuth1Data {
    requestTokenUrl: string;
    accessTokenUrl: string;
    userAuthorizationUrl: string;
    signatureMethod: r.OAuth1SignatureMethod;
    consumerKey: string;
    consumerSecret: string;
    tokenKey?: string;
    tokenSecret?: string;
    privateKey?: string;
    version?: string;
    realm?: string;
    callback?: string;
    verifier?: string;
    timestamp?: string;
    nonce?: string;
    includeBodyHash?: boolean;
}
export interface CredentialsOAuth2Config {
    type: 'oauth2';
    authorizationUrl: string;
    tokenUrl: string;
    scope: string;
    customConfig?: boolean;
    help?: string;
}
export interface CredentialsOAuth2Data {
    authorizationUrl: string;
    tokenUrl: string;
    clientId: string;
    clientSecret: string;
    scope: string;
    refreshToken?: string;
    accessToken?: string;
    expiresAt?: number;
}
//# sourceMappingURL=credentials.d.ts.map