import type { Client } from 'openapi-fetch';
import type { RequestOptions } from './common.js';
import type { AppReplaceUpdate, CreateStripeCheckoutSessionRequest, operations, paths } from './schemas.js';
/**
 * Apps
 * Manage integrations for extending OpenMeter's functionality.
 */
export declare class Apps {
    private client;
    marketplace: AppMarketplace;
    stripe: AppStripe;
    customInvoicing: AppCustomInvoicing;
    constructor(client: Client<paths, `${string}/${string}`>);
    /**
     * List apps
     * @param query - The query parameters
     * @param signal - An optional abort signal
     * @returns The apps
     */
    list(query?: operations['listApps']['parameters']['query'], options?: RequestOptions): Promise<{
        totalCount: number;
        page: number;
        pageSize: number;
        items: import("./schemas.js").components["schemas"]["App"][];
    } | undefined>;
    /**
     * Get an app
     * @param id - The ID of the app
     * @param signal - An optional abort signal
     * @returns The app
     */
    get(id: operations['getApp']['parameters']['path']['id'], options?: RequestOptions): Promise<import("openapi-typescript-helpers").SuccessResponse<{
        200: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/json": import("./schemas.js").components["schemas"]["App"];
            };
        };
        400: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["BadRequestProblemResponse"];
            };
        };
        401: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["UnauthorizedProblemResponse"];
            };
        };
        403: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["ForbiddenProblemResponse"];
            };
        };
        404: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["NotFoundProblemResponse"];
            };
        };
        412: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["PreconditionFailedProblemResponse"];
            };
        };
        500: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["InternalServerErrorProblemResponse"];
            };
        };
        503: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["ServiceUnavailableProblemResponse"];
            };
        };
        default: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["UnexpectedProblemResponse"];
            };
        };
    }, `${string}/${string}`> | undefined>;
    /**
     * Update an app
     * @param id - The ID of the app
     * @param body - The body of the request
     * @param signal - An optional abort signal
     * @returns The app
     */
    update(id: operations['updateApp']['parameters']['path']['id'], body: AppReplaceUpdate, options?: RequestOptions): Promise<import("openapi-typescript-helpers").SuccessResponse<{
        200: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/json": import("./schemas.js").components["schemas"]["App"];
            };
        };
        400: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["BadRequestProblemResponse"];
            };
        };
        401: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["UnauthorizedProblemResponse"];
            };
        };
        403: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["ForbiddenProblemResponse"];
            };
        };
        404: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["NotFoundProblemResponse"];
            };
        };
        412: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["PreconditionFailedProblemResponse"];
            };
        };
        500: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["InternalServerErrorProblemResponse"];
            };
        };
        503: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["ServiceUnavailableProblemResponse"];
            };
        };
        default: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/problem+json": import("./schemas.js").components["schemas"]["UnexpectedProblemResponse"];
            };
        };
    }, `${string}/${string}`> | undefined>;
    /**
     * Uninstall an app
     * @param id - The ID of the app
     * @param signal - An optional abort signal
     * @returns The app
     */
    uninstall(id: operations['uninstallApp']['parameters']['path']['id'], options?: RequestOptions): Promise<undefined>;
}
/**
 * App Marketplace
 * Available apps from the OpenMeter Marketplace.
 */
export declare class AppMarketplace {
    private client;
    constructor(client: Client<paths, `${string}/${string}`>);
    /**
     * List available apps
     * @param query - The query parameters
     * @param signal - An optional abort signal
     * @returns The apps
     */
    list(query?: operations['listMarketplaceListings']['parameters']['query'], options?: RequestOptions): Promise<{
        totalCount: number;
        page: number;
        pageSize: number;
        items: import("./schemas.js").components["schemas"]["MarketplaceListing"][];
    } | undefined>;
    /**
     * Get details for a listing
     * @param type - The type of the listing
     * @param signal - An optional abort signal
     * @returns The listing
     */
    get(type: operations['getMarketplaceListing']['parameters']['path']['type'], options?: RequestOptions): Promise<{
        type: import("./schemas.js").components["schemas"]["AppType"];
        name: string;
        description: string;
        capabilities: import("./schemas.js").components["schemas"]["AppCapability"][];
        installMethods: import("./schemas.js").components["schemas"]["InstallMethod"][];
    } | undefined>;
    /**
     * Install an app via OAuth. Returns a URL to start the OAuth 2.0 flow.
     * @param type - The type of the listing
     * @param signal - An optional abort signal
     * @returns The OAuth2 install URL
     */
    getOauth2InstallUrl(type: operations['marketplaceOAuth2InstallGetURL']['parameters']['path']['type'], options?: RequestOptions): Promise<{
        url: string;
    } | undefined>;
    /**
     * Authorize OAuth2 code. Verifies the OAuth code and exchanges it for a token and refresh token
     * @param type - The type of the listing
     * @param signal - An optional abort signal
     * @returns The authorization URL
     */
    authorizeOauth2(type: operations['marketplaceOAuth2InstallAuthorize']['parameters']['path']['type'], options?: RequestOptions): Promise<undefined>;
    /**
     * Install an app via API key.
     * @param type - The type of the listing
     * @param signal - An optional abort signal
     * @returns The installation
     */
    installWithAPIKey(type: operations['marketplaceAppAPIKeyInstall']['parameters']['path']['type'], body: operations['marketplaceAppAPIKeyInstall']['requestBody']['content']['application/json'], options?: RequestOptions): Promise<{
        app: import("./schemas.js").components["schemas"]["App"];
        defaultForCapabilityTypes: import("./schemas.js").components["schemas"]["AppCapabilityType"][];
    } | undefined>;
}
/**
 * Stripe App
 */
export declare class AppStripe {
    private client;
    constructor(client: Client<paths, `${string}/${string}`>);
    /**
     * Create a checkout session
     * @param body - The body of the request
     * @param signal - An optional abort signal
     * @returns The checkout session
     */
    createCheckoutSession(body: CreateStripeCheckoutSessionRequest, options?: RequestOptions): Promise<{
        customerId: string;
        stripeCustomerId: string;
        sessionId: string;
        setupIntentId: string;
        clientSecret?: string;
        clientReferenceId?: string;
        customerEmail?: string;
        currency?: import("./schemas.js").components["schemas"]["CurrencyCode"];
        createdAt: Date;
        expiresAt?: Date;
        metadata?: {
            [key: string]: string;
        };
        status?: string;
        url?: string;
        mode: import("./schemas.js").components["schemas"]["StripeCheckoutSessionMode"];
        cancelURL?: string;
        successURL?: string;
        returnURL?: string;
    } | undefined>;
    /**
     * Update Stripe API key
     * @param id - The ID of the app
     * @param body - The API key data
     * @param options - The request options
     * @returns The updated API key
     * @deprecated
     */
    updateApiKey(id: string, body: operations['updateStripeAPIKey']['requestBody']['content']['application/json'], options?: RequestOptions): Promise<undefined>;
}
/**
 * Custom Invoicing App
 */
export declare class AppCustomInvoicing {
    private client;
    constructor(client: Client<paths, `${string}/${string}`>);
    /**
     * Submit draft synchronization results
     * @param invoiceId - The ID of the invoice
     * @param body - The body of the request
     * @param options - The request options
     * @returns The synchronization result
     */
    draftSynchronized(invoiceId: string, body: operations['appCustomInvoicingDraftSynchronized']['requestBody']['content']['application/json'], options?: RequestOptions): Promise<undefined>;
    /**
     * Submit issuing synchronization results
     * @param invoiceId - The ID of the invoice
     * @param body - The body of the request
     * @param options - The request options
     * @returns The synchronization result
     */
    issuingSynchronized(invoiceId: string, body: operations['appCustomInvoicingIssuingSynchronized']['requestBody']['content']['application/json'], options?: RequestOptions): Promise<undefined>;
    /**
     * Update payment status
     * @param invoiceId - The ID of the invoice
     * @param body - The body of the request
     * @param options - The request options
     * @returns The payment status update result
     */
    updatePaymentStatus(invoiceId: string, body: operations['appCustomInvoicingUpdatePaymentStatus']['requestBody']['content']['application/json'], options?: RequestOptions): Promise<undefined>;
}
