diff --git a/README.md b/README.md index 6704b94..7fea30f 100644 --- a/README.md +++ b/README.md @@ -265,12 +265,12 @@ echo(options: { value: string; }) => Promise<{ value: string; }> ### mParticleInit(...) ```typescript -mParticleInit(call: { key: string; production: boolean; }) => Promise +mParticleInit(call: { key: string; production?: boolean; planID?: string; planVer?: number; logLevel?: any; }) => Promise ``` -| Param | Type | -| ---------- | -------------------------------------------------- | -| **`call`** | { key: string; production: boolean; } | +| Param | Type | +| ---------- | ------------------------------------------------------------------------------------------------------ | +| **`call`** | { key: string; production?: boolean; planID?: string; planVer?: number; logLevel?: any; } | **Returns:** Promise<any> diff --git a/android/.gradle/7.0/executionHistory/executionHistory.bin b/android/.gradle/7.0/executionHistory/executionHistory.bin index 867dbe1..4c0a749 100644 Binary files a/android/.gradle/7.0/executionHistory/executionHistory.bin and b/android/.gradle/7.0/executionHistory/executionHistory.bin differ diff --git a/android/.gradle/7.0/executionHistory/executionHistory.lock b/android/.gradle/7.0/executionHistory/executionHistory.lock index d996c92..2477bcf 100644 Binary files a/android/.gradle/7.0/executionHistory/executionHistory.lock and b/android/.gradle/7.0/executionHistory/executionHistory.lock differ diff --git a/android/.gradle/7.0/fileHashes/fileHashes.bin b/android/.gradle/7.0/fileHashes/fileHashes.bin index b35ae95..c24888d 100644 Binary files a/android/.gradle/7.0/fileHashes/fileHashes.bin and b/android/.gradle/7.0/fileHashes/fileHashes.bin differ diff --git a/android/.gradle/7.0/fileHashes/fileHashes.lock b/android/.gradle/7.0/fileHashes/fileHashes.lock index 489b21d..75f8d38 100644 Binary files a/android/.gradle/7.0/fileHashes/fileHashes.lock and b/android/.gradle/7.0/fileHashes/fileHashes.lock differ diff --git a/android/.gradle/7.0/javaCompile/javaCompile.lock b/android/.gradle/7.0/javaCompile/javaCompile.lock index 5ea6181..7d81004 100644 Binary files a/android/.gradle/7.0/javaCompile/javaCompile.lock and b/android/.gradle/7.0/javaCompile/javaCompile.lock differ diff --git a/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 12dc6df..41247d2 100644 Binary files a/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/dist/docs.json b/dist/docs.json index 906638e..44fa8bc 100644 --- a/dist/docs.json +++ b/dist/docs.json @@ -23,12 +23,12 @@ }, { "name": "mParticleInit", - "signature": "(call: { key: string; production: boolean; }) => Promise", + "signature": "(call: { key: string; production?: boolean; planID?: string; planVer?: number; logLevel?: any; }) => Promise", "parameters": [ { "name": "call", "docs": "", - "type": "{ key: string; production: boolean; }" + "type": "{ key: string; production?: boolean | undefined; planID?: string | undefined; planVer?: number | undefined; logLevel?: any; }" } ], "returns": "Promise", diff --git a/dist/esm/definitions.d.ts b/dist/esm/definitions.d.ts index 559bcf4..4a7b3ab 100644 --- a/dist/esm/definitions.d.ts +++ b/dist/esm/definitions.d.ts @@ -7,7 +7,10 @@ export interface MParticleCapacitorPlugin { }>; mParticleInit(call: { key: string; - production: boolean; + production?: boolean; + planID?: string; + planVer?: number; + logLevel?: any; }): Promise; loginMParticleUser(call: { email: string; diff --git a/dist/esm/web.d.ts b/dist/esm/web.d.ts index 82ee4c7..1fe0809 100644 --- a/dist/esm/web.d.ts +++ b/dist/esm/web.d.ts @@ -4,10 +4,10 @@ import mParticle from '@mparticle/web-sdk'; export declare class MParticleCapacitorWeb extends WebPlugin implements MParticleCapacitorPlugin { mParticleInit(call: { key: string; - production: boolean; - planID: string; - planVer: number; - logLevel: any; + production?: boolean; + planID?: string; + planVer?: number; + logLevel?: any; }): Promise; loginMParticleUser(call: { email: string; diff --git a/dist/esm/web.js.map b/dist/esm/web.js.map index fac39cc..d0dcd49 100644 --- a/dist/esm/web.js.map +++ b/dist/esm/web.js.map @@ -1 +1 @@ -{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,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ACrH,SAAS,CAAC,SAAS,CAAC,gBAAgB,CAClC,SAAS,EACT,OAAO,EAAE,+BAA+B;QACxC,gBAAgB,EAAE,UAAU;QAC5B,WAAW,EACX,qBAAqB,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAA0B;QACnC,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"} \ No newline at end of file diff --git a/src/definitions.ts b/src/definitions.ts index 1bff5b7..c006454 100644 --- a/src/definitions.ts +++ b/src/definitions.ts @@ -3,7 +3,7 @@ export type mParticleInitListener = (info:any) => any; export interface MParticleCapacitorPlugin { echo(options: { value: string }): Promise<{ value: string }>; - mParticleInit(call: { key:string, production:boolean } ): Promise; + mParticleInit(call: { key:string, production?:boolean, planID?:string, planVer?:number, logLevel?:any } ): Promise; loginMParticleUser(call: { email:string, customerId:string } ): Promise; logoutMParticleUser(call?:any): Promise; diff --git a/src/web.ts b/src/web.ts index 106a6da..7b54229 100644 --- a/src/web.ts +++ b/src/web.ts @@ -6,7 +6,7 @@ export class MParticleCapacitorWeb extends WebPlugin implements MParticleCapacitorPlugin { - async mParticleInit(call: { key:string, production:boolean, planID:string, planVer:number, logLevel:any } ): Promise { + async mParticleInit(call: { key:string, production?:boolean, planID?:string, planVer?:number, logLevel?:any } ): Promise { const mParticleConfig = { isDevelopmentMode: !(call.production) || true, dataPlan: {