UNPKG

@qonversion/capacitor-plugin

Version:

Qonversion provides full in-app purchases infrastructure, so you do not need to build your own server for receipt validation. Implement in-app subscriptions, validate user receipts, check subscription status, and provide access to your app features and co

49 lines (48 loc) 1.55 kB
import type { QProduct, QNoCodeAction, QNoCodesError, QNoCodeScreenInfo } from './internal/Mapper'; export type NoCodeEvent = { name: string; payload: QNoCodeAction | QNoCodesError | QNoCodeScreenInfo | undefined; }; export interface NoCodesNativePlugin { initialize(params: { projectKey: string; source: string; version: string; proxyUrl?: string; locale?: string; theme?: string; }): void; setScreenPresentationConfig(params: { configData: Record<string, unknown>; contextKey?: string; }): Promise<void>; showScreen(params: { contextKey: string; }): Promise<void>; close(): Promise<void>; setPurchaseDelegate(): void; setLocale(params: { locale: string | null; }): void; setTheme(params: { theme: string; }): void; delegatedPurchaseCompleted(): void; delegatedPurchaseFailed(params: { errorMessage: string; }): void; delegatedRestoreCompleted(): void; delegatedRestoreFailed(params: { errorMessage: string; }): void; addListener(event: 'noCodesEvent', listener: (payload: NoCodeEvent) => void): Promise<{ remove: () => Promise<void>; }>; addListener(event: 'noCodesPurchase', listener: (payload: QProduct) => void): Promise<{ remove: () => Promise<void>; }>; addListener(event: 'noCodesRestore', listener: () => void): Promise<{ remove: () => Promise<void>; }>; } export declare const NoCodesPlugin: NoCodesNativePlugin;