@adapty/capacitor - v3.16.3
    Preparing search index...

    Interface AdaptyPlugin

    interface AdaptyPlugin {
        addListener: AddListenerFn;
        activate(
            options: { apiKey: string; params?: ActivateParamsInput },
        ): Promise<void>;
        createWebPaywallUrl(
            options: { paywallOrProduct: AdaptyPaywall | AdaptyPaywallProduct },
        ): Promise<string>;
        getCurrentInstallationStatus(): Promise<AdaptyInstallationStatus>;
        getOnboarding(
            options: {
                locale?: string;
                params?: GetPlacementParamsInput;
                placementId: string;
            },
        ): Promise<AdaptyOnboarding>;
        getOnboardingForDefaultAudience(
            options: {
                locale?: string;
                params?: GetPlacementForDefaultAudienceParamsInput;
                placementId: string;
            },
        ): Promise<AdaptyOnboarding>;
        getPaywall(
            options: {
                locale?: string;
                params?: GetPlacementParamsInput;
                placementId: string;
            },
        ): Promise<AdaptyPaywall>;
        getPaywallForDefaultAudience(
            options: {
                locale?: string;
                params?: GetPlacementForDefaultAudienceParamsInput;
                placementId: string;
            },
        ): Promise<AdaptyPaywall>;
        getPaywallProducts(
            options: { paywall: AdaptyPaywall },
        ): Promise<AdaptyPaywallProduct[]>;
        getProfile(): Promise<AdaptyProfile>;
        identify(options: { customerUserId: string }): Promise<void>;
        isActivated(): Promise<boolean>;
        logout(): Promise<void>;
        logShowPaywall(options: { paywall: AdaptyPaywall }): Promise<void>;
        makePurchase(
            options: {
                params?: MakePurchaseParamsInput;
                product: AdaptyPaywallProduct;
            },
        ): Promise<AdaptyPurchaseResult>;
        openWebPaywall(
            options: {
                openIn?: WebPresentation;
                paywallOrProduct: AdaptyPaywall | AdaptyPaywallProduct;
            },
        ): Promise<void>;
        presentCodeRedemptionSheet(): Promise<void>;
        removeAllListeners(): Promise<void>;
        reportTransaction(
            options: { transactionId: string; variationId?: string },
        ): Promise<void>;
        restorePurchases(): Promise<AdaptyProfile>;
        setFallback(options: { fileLocation: FileLocation }): Promise<void>;
        setIntegrationIdentifier(
            options: { key: string; value: string },
        ): Promise<void>;
        setLogLevel(
            options: { logger?: LoggerConfig; logLevel?: LogLevel },
        ): Promise<void>;
        updateAttribution(
            options: { attribution: Record<string, any>; source: string },
        ): Promise<void>;
        updateCollectingRefundDataConsent(
            options: { consent: boolean },
        ): Promise<void>;
        updateProfile(options: Partial<AdaptyProfileParameters>): Promise<void>;
        updateRefundPreference(
            options: { refundPreference: RefundPreference },
        ): Promise<void>;
    }

    Implemented by

    Index

    Properties

    addListener: AddListenerFn

    Adds a strongly-typed event listener.

    Supported events:

    • onLatestProfileLoad → { profile: AdaptyProfile }
    • onInstallationDetailsSuccess → { details: AdaptyInstallationDetails }
    • onInstallationDetailsFail → { error: AdaptyError }

    Methods

    • Identifies the user with a customer user ID.

      Parameters

      • options: { customerUserId: string }

      Returns Promise<void>

    • Presents the code redemption sheet (iOS only).

      Returns Promise<void>

    • Reports a transaction to Adapty.

      Parameters

      • options: { transactionId: string; variationId?: string }

      Returns Promise<void>

    • Sets an integration identifier.

      Parameters

      • options: { key: string; value: string }

      Returns Promise<void>

    • Updates attribution data for the current user.

      Parameters

      • options: { attribution: Record<string, any>; source: string }

      Returns Promise<void>

    • Updates collecting refund data consent (iOS only).

      Parameters

      • options: { consent: boolean }

      Returns Promise<void>