capacitor-amplitude
Advanced tools
Comparing version 3.0.0-beta.1 to 3.0.0-beta.2
@@ -25,2 +25,8 @@ export type PropertiesObject = Record<string, any>; | ||
logRevenue(options: InstanceNameOptions & unknown): Promise<void>; | ||
getDeviceId(options: InstanceNameOptions): Promise<{ | ||
deviceId: string; | ||
}>; | ||
getUserId(options: InstanceNameOptions): Promise<{ | ||
userId: string; | ||
}>; | ||
} | ||
@@ -27,0 +33,0 @@ export interface AmplitudeConfiguration { |
@@ -8,3 +8,3 @@ import type { AmplitudeConfiguration, PropertiesObject } from './definitions'; | ||
constructor(instanceName?: string); | ||
initialize(apiKey: string, configuration: AmplitudeConfiguration): Promise<void>; | ||
initialize(apiKey: string, configuration?: AmplitudeConfiguration): Promise<void>; | ||
track(options: { | ||
@@ -29,2 +29,8 @@ eventName: string; | ||
logRevenue(_: unknown): Promise<void>; | ||
getDeviceId(): Promise<{ | ||
deviceId: string; | ||
}>; | ||
getUserId(): Promise<{ | ||
userId: string; | ||
}>; | ||
} |
@@ -12,3 +12,3 @@ import { registerPlugin } from '@capacitor/core'; | ||
} | ||
initialize(apiKey, configuration) { | ||
initialize(apiKey, configuration = {}) { | ||
return CapacitorAmplitude.initialize(Object.assign({ instanceName: this.instanceName, apiKey }, configuration)); | ||
@@ -39,2 +39,12 @@ } | ||
} | ||
getDeviceId() { | ||
return CapacitorAmplitude.getDeviceId({ | ||
instanceName: this.instanceName, | ||
}).then(({ deviceId }) => ({ deviceId })); | ||
} | ||
getUserId() { | ||
return CapacitorAmplitude.getUserId({ | ||
instanceName: this.instanceName, | ||
}).then(({ userId }) => ({ userId })); | ||
} | ||
} | ||
@@ -41,0 +51,0 @@ // private static _instances: Record<string, Amplitude>; |
@@ -73,3 +73,3 @@ 'use strict'; | ||
} | ||
initialize(apiKey, configuration) { | ||
initialize(apiKey, configuration = {}) { | ||
return CapacitorAmplitude.initialize(Object.assign({ instanceName: this.instanceName, apiKey }, configuration)); | ||
@@ -100,2 +100,12 @@ } | ||
} | ||
getDeviceId() { | ||
return CapacitorAmplitude.getDeviceId({ | ||
instanceName: this.instanceName, | ||
}).then(({ deviceId }) => ({ deviceId })); | ||
} | ||
getUserId() { | ||
return CapacitorAmplitude.getUserId({ | ||
instanceName: this.instanceName, | ||
}).then(({ userId }) => ({ userId })); | ||
} | ||
} | ||
@@ -102,0 +112,0 @@ // private static _instances: Record<string, Amplitude>; |
@@ -70,3 +70,3 @@ var capacitorAmplitude = (function (exports, core) { | ||
} | ||
initialize(apiKey, configuration) { | ||
initialize(apiKey, configuration = {}) { | ||
return CapacitorAmplitude.initialize(Object.assign({ instanceName: this.instanceName, apiKey }, configuration)); | ||
@@ -97,2 +97,12 @@ } | ||
} | ||
getDeviceId() { | ||
return CapacitorAmplitude.getDeviceId({ | ||
instanceName: this.instanceName, | ||
}).then(({ deviceId }) => ({ deviceId })); | ||
} | ||
getUserId() { | ||
return CapacitorAmplitude.getUserId({ | ||
instanceName: this.instanceName, | ||
}).then(({ userId }) => ({ userId })); | ||
} | ||
} | ||
@@ -99,0 +109,0 @@ // private static _instances: Record<string, Amplitude>; |
{ | ||
"name": "capacitor-amplitude", | ||
"version": "3.0.0-beta.1", | ||
"version": "3.0.0-beta.2", | ||
"description": "Amplitude plugin for capacitor", | ||
@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js", |
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
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
81624
453
0