capacitor-adapty
Advanced tools
Comparing version 0.1.6 to 0.1.7
import { PluginListenerHandle } from '@capacitor/core'; | ||
import { ActivateOptions, AdaptyPromo, AdaptyPurchaserInfo, GetAPNSTokenResult, GetPaywallsResult, IdentifyOptions, LogShowPaywallOptions, MakePurchaseOptions, MakePurchaseResult, RestorePurchasesResult, SetAPNSTokenOptions, SetExternalAnalyticsEnabledOptions, SetVariationIDOptions, UpdateAttributionOptions, UpdateProfileOptions, AdaptyDefaultOptions } from './sdk/types'; | ||
import { ActivateOptions, AdaptyPromo, AdaptyPurchaserInfo, GetAPNSTokenResult, GetPaywallsResult, IdentifyOptions, LogShowPaywallOptions, MakePurchaseOptions, MakePurchaseResult, RestorePurchasesResult, GetCustomerUserIdResult, SetAPNSTokenOptions, SetExternalAnalyticsEnabledOptions, SetVariationIDOptions, UpdateAttributionOptions, UpdateProfileOptions, AdaptyDefaultOptions } from './sdk/types'; | ||
declare global { | ||
@@ -33,2 +33,3 @@ interface PluginRegistry { | ||
makePurchase(options: MakePurchaseOptions): Promise<MakePurchaseResult>; | ||
getCustomerUserId(): Promise<GetCustomerUserIdResult>; | ||
addListener(eventName: 'onPurchaseSuccess', listenerFunc: PurchaseSuccessListener): Promise<PluginListenerHandle> & PluginListenerHandle; | ||
@@ -35,0 +36,0 @@ addListener(eventName: 'onPurchaseFailed', listenerFunc: PurchaseFailedListener): Promise<PluginListenerHandle> & PluginListenerHandle; |
@@ -17,3 +17,2 @@ import { AdaptyDefaultOptions, AdaptyPurchaserInfo, UpdateProfileOptions, RestorePurchasesResult, MakePurchaseResult, AdaptyPromo, GetPaywallsResult } from './sdk/types'; | ||
setVariationID: (variationId: string, transactionId: string) => Promise<void>; | ||
activate: (sdkKey: string, userId: string | any, observerMode: boolean, logLevel: 'errors' | 'verbose' | 'none') => Promise<void>; | ||
updateAttribution: (object: Object, source: 'Branch' | 'AppsFlyer' | 'Adjust' | 'Custom' | 'AppleSearchAds') => Promise<void>; | ||
@@ -37,3 +36,3 @@ } | ||
setVariationID(variationId: string, transactionId: string): Promise<void>; | ||
activate(sdkKey: string, userId: string | any, observerMode: boolean, logLevel: 'errors' | 'verbose' | 'none'): Promise<void>; | ||
getCustomerUserId(): Promise<string>; | ||
updateAttribution(attribution: Object, source: 'Branch' | 'AppsFlyer' | 'Adjust' | 'Custom' | 'AppleSearchAds', networkUserId?: string): Promise<void>; | ||
@@ -40,0 +39,0 @@ addListener: { |
@@ -67,9 +67,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
activate(sdkKey, userId, observerMode, logLevel) { | ||
return this.adapty.activate({ | ||
sdkKey, | ||
customerUserId: userId, | ||
observerMode, | ||
logLevel, | ||
}); | ||
getCustomerUserId() { | ||
return this.adapty | ||
.getCustomerUserId() | ||
.then(({ customerUserId }) => customerUserId); | ||
} | ||
@@ -80,3 +77,3 @@ updateAttribution(attribution, source, networkUserId) { | ||
source, | ||
networkUserId | ||
networkUserId, | ||
}); | ||
@@ -83,0 +80,0 @@ } |
@@ -516,2 +516,5 @@ export declare enum AdaptyEvent { | ||
} | ||
export interface GetCustomerUserIdResult { | ||
customerUserId: string; | ||
} | ||
export interface GetAPNSTokenResult { | ||
@@ -518,0 +521,0 @@ token: string; |
{ | ||
"name": "capacitor-adapty", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "Adapty plugin for capacitor", | ||
@@ -5,0 +5,0 @@ "main": "plugin.js", |
@@ -125,9 +125,6 @@ var capacitorAdapty = (function (exports, core) { | ||
} | ||
activate(sdkKey, userId, observerMode, logLevel) { | ||
return this.adapty.activate({ | ||
sdkKey, | ||
customerUserId: userId, | ||
observerMode, | ||
logLevel, | ||
}); | ||
getCustomerUserId() { | ||
return this.adapty | ||
.getCustomerUserId() | ||
.then(({ customerUserId }) => customerUserId); | ||
} | ||
@@ -138,3 +135,3 @@ updateAttribution(attribution, source, networkUserId) { | ||
source, | ||
networkUserId | ||
networkUserId, | ||
}); | ||
@@ -141,0 +138,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
326837
1299