/** * Motor plugin implementation for Payment Gateway and OIDC Authorization * * @packageDocumentation */ import type { MotorPlugin, MotorServiceWorkerConfig, PaymentInstrument, CanMakePaymentRequest, CanMakePaymentResponse, PaymentRequestEvent, PaymentHandlerResponse, ProcessPaymentRequest, ProcessPaymentResponse, ValidatePaymentMethodRequest, ValidatePaymentMethodResponse, PaymentStatus, RefundPaymentRequest, RefundPaymentResponse, OIDCConfiguration, OIDCAuthorizationRequest, OIDCAuthorizationResponse, OIDCTokenRequest, OIDCTokenResponse, OIDCUserInfo, JWKS, HealthCheckResponse, ServiceInfoResponse } from './types.js'; import { MotorClient } from './client.js'; import { MotorServiceWorkerManager } from './worker.js'; import { PaymentGatewayClient } from './payment.js'; import { OIDCClient } from './oidc.js'; /** * Configuration for the Motor plugin */ export interface MotorPluginConfig extends MotorServiceWorkerConfig { /** Whether to automatically register the service worker */ auto_register_worker?: boolean; /** Whether to use service worker when available */ prefer_service_worker?: boolean; /** Fallback configuration for direct HTTP calls */ fallback_url?: string; /** OIDC client ID */ oidc_client_id?: string; /** OIDC redirect URI */ oidc_redirect_uri?: string; } /** * Motor plugin implementation */ export declare class MotorPluginImpl implements MotorPlugin { private readonly config; private client; private paymentClient; private oidcClient?; private workerManager?; private isInitialized; constructor(config?: Partial); /** * Initialize the plugin */ initialize(): Promise; /** * Setup service worker */ private setupServiceWorker; /** * Setup fallback HTTP client */ private setupFallback; getPaymentInstruments(): Promise; canMakePayment(request: CanMakePaymentRequest): Promise; handlePaymentRequest(event: PaymentRequestEvent): Promise; processPayment(request: ProcessPaymentRequest): Promise; validatePaymentMethod(request: ValidatePaymentMethodRequest): Promise; getPaymentStatus(paymentId: string): Promise; refundPayment(request: RefundPaymentRequest): Promise; getOIDCConfiguration(): Promise; authorize(request: OIDCAuthorizationRequest): Promise; token(request: OIDCTokenRequest): Promise; getUserInfo(accessToken: string): Promise; getJWKS(): Promise; healthCheck(): Promise; getServiceInfo(): Promise; /** * Ensure plugin is initialized */ private ensureInitialized; /** * Get the HTTP client */ getClient(): MotorClient; /** * Get the payment client */ getPaymentClient(): PaymentGatewayClient; /** * Get the OIDC client */ getOIDCClient(): OIDCClient | undefined; /** * Get service worker manager */ getServiceWorkerManager(): MotorServiceWorkerManager | undefined; /** * Check if plugin is initialized */ isReady(): boolean; } /** * Create a Motor plugin with auto-detection */ export declare function createMotorPlugin(config?: Partial): Promise; /** * Create a Motor plugin for browser environment */ export declare function createMotorPluginForBrowser(workerUrl?: string, config?: Partial): Promise; /** * Create a Motor plugin for Node.js environment */ export declare function createMotorPluginForNode(serverUrl?: string, config?: Partial): Promise; //# sourceMappingURL=plugin.d.ts.map