import type { Client } from 'openapi-fetch'; import type { RequestOptions } from './common.cjs'; import type { AppReplaceUpdate, CreateStripeCheckoutSessionRequest, operations, paths } from './schemas.cjs'; /** * Apps * Manage integrations for extending OpenMeter's functionality. */ export declare class Apps { private client; marketplace: AppMarketplace; stripe: AppStripe; customInvoicing: AppCustomInvoicing; constructor(client: Client); /** * 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.cjs").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 | 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 | 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; } /** * App Marketplace * Available apps from the OpenMeter Marketplace. */ export declare class AppMarketplace { private client; constructor(client: Client); /** * 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.cjs").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.cjs").components["schemas"]["AppType"]; name: string; description: string; capabilities: import("./schemas.cjs").components["schemas"]["AppCapability"][]; installMethods: import("./schemas.cjs").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; /** * 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.cjs").components["schemas"]["App"]; defaultForCapabilityTypes: import("./schemas.cjs").components["schemas"]["AppCapabilityType"][]; } | undefined>; } /** * Stripe App */ export declare class AppStripe { private client; constructor(client: Client); /** * 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.cjs").components["schemas"]["CurrencyCode"]; createdAt: Date; expiresAt?: Date; metadata?: { [key: string]: string; }; status?: string; url?: string; mode: import("./schemas.cjs").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; } /** * Custom Invoicing App */ export declare class AppCustomInvoicing { private client; constructor(client: Client); /** * 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; /** * 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; /** * 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; }