@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
63 lines (62 loc) • 2.51 kB
TypeScript
import type { NoCodesListener } from './dto/NoCodesListener';
import type { PurchaseDelegate } from './dto/PurchaseDelegate';
import { NoCodesConfig } from './NoCodesConfig';
import { NoCodesTheme } from './dto/enums';
export declare class NoCodesConfigBuilder {
private readonly projectKey;
private noCodesListener;
private purchaseDelegate;
private proxyUrl;
private locale;
private theme;
constructor(projectKey: string);
/**
* Provide a listener to be notified about NoCodes events.
*
* Make sure you provide this listener for being up-to-date with the NoCodes events.
* Else you can lose some important updates. Also, please, consider that this listener
* should live for the whole lifetime of the application.
*
* @param noCodesListener listener to be called when NoCodes events occur.
* @return builder instance for chain calls.
*/
setNoCodesListener(noCodesListener: NoCodesListener): NoCodesConfigBuilder;
/**
* Provide a delegate for custom purchase and restore handling.
* When this delegate is provided, it replaces the default Qonversion SDK purchase flow.
*
* @param purchaseDelegate delegate to handle purchase and restore operations.
* @return builder instance for chain calls.
*/
setPurchaseDelegate(purchaseDelegate: PurchaseDelegate): NoCodesConfigBuilder;
/**
* Set proxy URL for NoCodes SDK.
*
* @param proxyUrl proxy URL to use for API requests.
* @return builder instance for chain calls.
*/
setProxyURL(proxyUrl: string): NoCodesConfigBuilder;
/**
* Set the locale for No-Code screens.
* Use this to override the device locale for the No-Codes SDK.
*
* @param locale the locale to use (e.g. "en", "de", "fr").
* @return builder instance for chain calls.
*/
setLocale(locale: string): NoCodesConfigBuilder;
/**
* Set the theme mode for No-Code screens.
* Controls how screens adapt to light/dark themes.
*
* @param theme the desired theme mode. Use AUTO to follow device settings,
* LIGHT to force light theme, or DARK to force dark theme.
* @return builder instance for chain calls.
*/
setTheme(theme: NoCodesTheme): NoCodesConfigBuilder;
/**
* Generate {@link NoCodesConfig} instance with all the provided configurations.
*
* @return the complete {@link NoCodesConfig} instance.
*/
build(): NoCodesConfig;
}