{"_id":"@deltax-sdk/ionic-deltax-mobile-sdk","_rev":"8-bd049f4a7c33e17de5fe49108a9472fe","time":{"1.0.1":"2019-08-23T08:23:13.620Z","created":"2019-08-23T08:24:05.646Z","1.0.2":"2019-08-23T08:24:06.012Z","modified":"2022-07-28T12:27:36.410Z","1.0.3":"2019-08-23T08:52:23.693Z"},"name":"@deltax-sdk/ionic-deltax-mobile-sdk","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.2":{"name":"@deltax-sdk/ionic-deltax-mobile-sdk","version":"1.0.2","description":"## DeltaX Mobile SDK Cordova Plugin","main":"DxMobileSdk.ts","author":{"name":"AdBox Software Private Limited"},"license":"ISC","keywords":["DeltaX","DeltaX Mobile","DeltaX Mobile SDK","DeltaX SDK","DeltaXMobileSDK","dxmobile","dxmobilesdk","dx mobile sdk","dx sdk","dx mobile cordova","cordova-android"],"platforms":["android"],"dependencies":{"@angular/core":"^5.0.3"},"gitHead":"1ffc3455286143f11fae1a7ca6e835abed11d060","_id":"@deltax-sdk/ionic-deltax-mobile-sdk@1.0.2","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-q6a1i60iQJMhTLMbqFAfieE8HSSKK0Be9iLE0xT46rHsxxMQ5sprr76TXbJEcLyNMtZ4FUqyVWvuvhs7z4LUkg==","shasum":"fca44625311121d8f429fed9708bd0440e3eae10","tarball":"https://registry.npmjs.org/@deltax-sdk/ionic-deltax-mobile-sdk/-/ionic-deltax-mobile-sdk-1.0.2.tgz","fileCount":9,"unpackedSize":32207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX6KmCRA9TVsSAnZWagAAHmMP/06FlPCJ+1dnZpuq46Pw\nBMFEew/qpd0+tUVCSuOzS8LuJsQVdgvFQykELn9/6aiu9RTCEkJwcRN+pXCr\n3OngksZZfczP85XJG3BDTID4qLxYhj0uu5l9nB6TMToptvJBb3nce57xQHKg\n4AkeT+N5FAdMp2F5X68QSjAncAzSxyYvvXwB0G/qWbRLL2mlKTpxYIZOCvF6\n81Q9YGXrLuvSG0kbGT9NnPaB/WWO0lTLiTdjmmqhJ4Duuaf03QPGz9PzCYQg\nGm2Wf3upFPTTiJfEkh0cZY17fnn2AcDYwRQbJ6KeHXOxPwZlcVCVGioKsQ4r\nlpPG8XCRBoNN61COljC0GAzCKNikaEaZJrNkIxk2r252kkWiAqaZO4J1PS+B\nd8f6agdgE8FPTHyA43+CsoR9WlX1sIZQ7ABM4jQ7rYRqp1hl3x14y5nl0fAa\niDwRxFoSmWkxxsX2vF81BuKU38W1dtQOvUH4RQs7ngaJkLWnsP2tuK7froia\nVzG+Xc0xhVXm0CKbld/jXv06hk5jBePAxkcVELQTuXFB240RfyNOvi0WkNVV\nq+N09ahWQFXzjtJQhPnzI/iht73uXko1XpUmLmGwl3Ra6fRC9S9ocMFm5Ml+\nwOW26vs8yIJg4Xpp5lgNCKM3WorE7OfUQgTvqHHmO4eUCc/Fx53jGMIupNiF\nxTHi\r\n=w5FA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmRmC+bMinHD7TL/wPExELxwehFI5RuoFbg0Gte6KG0AIgAJNYRZjoCO997cqqw2lucRP+q03Ke+4Sydw9mdG2us0="}]},"maintainers":[{"name":"ganeshpg","email":"shriganesh.pg@deltax.com"},{"name":"ak47surve","email":"akshay@deltax.com"}],"_npmUser":{"name":"ganeshpg","email":"shriganesh.pg@deltax.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ionic-deltax-mobile-sdk_1.0.2_1566548645861_0.16412599888153268"},"_hasShrinkwrap":false},"1.0.3":{"name":"@deltax-sdk/ionic-deltax-mobile-sdk","version":"1.0.3","description":"## DeltaX Mobile SDK Cordova Plugin","main":"DxMobileSdk.ts","author":{"name":"AdBox Software Private Limited"},"license":"ISC","keywords":["DeltaX","DeltaX Mobile","DeltaX Mobile SDK","DeltaX SDK","DeltaXMobileSDK","dxmobile","dxmobilesdk","dx mobile sdk","dx sdk","dx mobile cordova","cordova-android"],"platforms":["android"],"dependencies":{"@angular/core":"^5.0.3"},"gitHead":"dd567759ce4ebf8e2b6638c47d36c382e52bb842","_id":"@deltax-sdk/ionic-deltax-mobile-sdk@1.0.3","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-DVs7Yz/jdSWWbAMkiFXzgmCbQjAKMvhvVr0wKs42BIPzgvO6iO0VQEzUgpMQT+8jqjdHRvLP86xDSUwD711NmA==","shasum":"7e45d5341d6bdb457adb96513d3f371991efdc7b","tarball":"https://registry.npmjs.org/@deltax-sdk/ionic-deltax-mobile-sdk/-/ionic-deltax-mobile-sdk-1.0.3.tgz","fileCount":9,"unpackedSize":32245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX6lICRA9TVsSAnZWagAAZcgP/3R1Wbyr4TvwR6s/7b/d\n7ArAKs2keHmWyR23WlFfFZr3Yhd8hurS8FWl95IF8t/MDFNkIFniTvv1Rr6i\nyUIK28oOGaH6yaKicAqCCEyRGS9i8zu0o6rKV1b/3Q9ix0Q0ysjbM5lUr6cv\nxDhhXm/p6cgqE/o9CDJlRFDftnAoa/e+Sbf+XaBXgctAyYV5t9783e8pICe+\nNBohxG8oZs6fduRY9ASByBhBw2UlBwqfucZ+7EfS2eQEt0LS5U/umb0rcEGk\ndfSC6lLRjxR8eTjij0qBd62XLyDJmbxpPr6l1IM8kajnn4Ys/F/zonAGESDN\nr7f1IezN3F/MA9EUZhC+T91rPwG8gk+2W6QmCDDIRaayR6Ds8YZujPwytWad\nwqEHp5lzrQkU3Vq4R/OEqstYJitXTyWYAgOBDWfQ07kWWMHdHbfzhMs/vsjT\nIKM93yHZkW99RZOuX5csUe5kaVBrvdackPwfI1YNMzzbw7WWtzxTGGYjoOz6\nNiISVEhQbQS6BC9ADuaMnWHYHkpowMc/7E38026o7ouav/vv0rodqLM26J0c\nk7xlSLAP/9unsqAfaJmm3qjltmGIW9EggsuccjvFVpsswUGf4w6msKfFJww4\ndxrJxvG7En2Bul/xscZu8U2ym0GSB/VMpEqsRE+2f9tDCGcZVezc4pqPlbOT\nSpSI\r\n=Twgu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBGegHh/VSJR36D/pAO7HURu98NKMhz+ELnYpAXqI5YMAiAnjUnyhtGxmHWvFSshLlJC2YlGOhw4ddhEuEQCDBGlVA=="}]},"maintainers":[{"name":"ak47surve","email":"akshay@deltax.com"},{"name":"ganeshpg","email":"shriganesh.pg@deltax.com"}],"_npmUser":{"name":"ganeshpg","email":"shriganesh.pg@deltax.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ionic-deltax-mobile-sdk_1.0.3_1566550343571_0.8784763160519311"},"_hasShrinkwrap":false}},"maintainers":[{"email":"ankit.o@deltax.com","name":"supreme_magus"},{"email":"akshay@deltax.com","name":"ak47surve"},{"email":"shriganesh.pg@deltax.com","name":"ganeshpg"}],"description":"## DeltaX Mobile SDK Cordova Plugin","keywords":["DeltaX","DeltaX Mobile","DeltaX Mobile SDK","DeltaX SDK","DeltaXMobileSDK","dxmobile","dxmobilesdk","dx mobile sdk","dx sdk","dx mobile cordova","cordova-android"],"author":{"name":"AdBox Software Private Limited"},"license":"ISC","readme":"\r\n  \r\n\r\n# DxMobileSdk\r\n\r\n  \r\n\r\n  \r\n\r\n## Description\r\n\r\n  \r\n\r\n  \r\n\r\nDxMobileSdk is an angular service which acts as an interface to *@deltax-sdk/cordova-plugin-deltax-mobile-sdk*. It is compatible with ionic 3+ applications built on angular. \r\n  \r\n\r\n  \r\n\r\n**Usage**\r\n\r\n**Installation:**\r\n\r\nFirst, install [cordova-plugin-deltax-mobile-sdk](https://www.npmjs.com/package/@deltax-sdk/cordova-plugin-deltax-mobile-sdk) by running one of the following commands (depending on the ionic version):\r\n\r\n    ionic cordova plugin add @deltax-sdk/cordova-plugin-deltax-mobile-sdk\r\n\r\nOR\r\n\r\n    cordova plugin add @deltax-sdk/cordova-plugin-deltax-mobile-sdk\r\n\r\nThen install the DxMobileSdk wrapper:\r\n\r\n    npm install --save @deltax-sdk/ionic-deltax-mobile-sdk\r\n\r\nNext, add DxMobileSdk as a provider in your NgModule declaration (for example, in `src/app/app.module.ts`): \r\n\r\n```\r\nimport { DxMobileSdk } from '@deltax-sdk/ionic-deltax-mobile-sdk/DxMobileSdk';\r\n\r\n@NgModule({\r\n  declarations: [\r\n    // ...\r\n  ],\r\n  imports: [\r\n    // ...\r\n  ],\r\n  bootstrap: [IonicApp],\r\n  entryComponents: [\r\n    // ...\r\n  ],\r\n  providers: [\r\n    // ...\r\n    , DxMobileSdk\r\n  ]\r\n})\r\nexport class AppModule {}\r\n```\r\n\r\nInitialize the plugin (ideally, in app.component.ts constructor on platform ready, as follows) :\r\n\r\n```\r\nimport { DxMobileSdk } from '@deltax-sdk/ionic-deltax-mobile-sdk/DxMobileSdk';\r\nimport { Platform } from  'ionic-angular';\r\n\r\nexport class MyApp {\r\n  constructor(private platform : Platform, private dxPlugin: DxMobileSdk ) { \r\n\t  this.platform.ready().then( async () => {\r\n\t\t   await this.dxPlugin.initPlugin();\r\n\t   });  \r\n  }\r\n  //...\r\n}\r\n```\r\nNote: It is necessary to wait for a dxPlugin method call to end before making another dxPlugin method call in order to avoid unintended consequences. For example, if trackEvent is called before initDxTracker has completed execution, then the sdk might not have initialized the tracker for the particular business profile, and it might throw an error. We recommend using async await to avoid promise hell.\r\n\r\nFinally, inject it into any of your components or pages:\r\n```\r\nimport { DxMobileSdk } from '@deltax-sdk/ionic-deltax-mobile-sdk/DxMobileSdk';\r\n\r\nexport class MyApp {\r\n  constructor(private dxPlugin: DxMobileSdk ) { }\r\n\r\n  //...\r\n  var params:any = {};\r\n  params.Stage1 = '5';\r\n  params.Stage2 = '10.3';\r\n  params.GoalId = '6AMDV2';\r\n  this.dxPlugin.trackEvent(params, 'xxxx1234').then(\r\n\t\t\t\t( ) => {\r\n\t\t\t\t\t//Statements to execute on success\r\n\t\t\t\t},\r\n\t\t\t\t(err) => {\r\n\t\t\t\t\t//Statements to execute on error\r\n\t\t\t\t}\r\n  );  \r\n}\r\n```\r\n  \r\n | Methods|Description|\r\n| :------------- |------------:|\r\n|initPlugin( ) => Promise(void, Error)|Returns a promise that resolves when the plugin is initialised|\r\n|initDxTracker(businessProfileEncodedId  :  string, setDefault?  :  boolean) => Promise(void, Error)| Returns a promise that resolves when the tracker is initialized for the given businessProfileEncodedId. If setDefault is passed and it is true, the initialized tracker will also be set as default tracker|\r\n|setDefaultInstance(businessProfileEncodedId  :  string) => Promise(void, Error)|Returns a promise that resolves when the existing tracker for the businessProfileEncodedId is set as default tracker|\r\n|setCustomerEmail(email  :  string, businessProfileEncodedId?  :  string, isEncoded?  :  boolean) => Promise(void, Error)|Returns a promise that resolves when the default customer email is set. If businessProfileEncodedId is passed, the default customer email is set for that particular tracker instance. Else, default customer email is set for the default tracker instance. If isEncoded is passed and it is true, the tracker expects an encoded value for customer email. By default, the tracker encodes the given customer email before the event is tracked\r\n|setCustomerPhoneNumber(phoneNumber  :  string, businessProfileEncodedId?  :  string, isEncoded?  :  boolean) => Promise(void, Error)| Refer to setCustomerEmail method description\r\n|setCustomerId(id  :  string, businessProfileEncodedId?  :  string) => Promise(void, Error)| Returns a promise that resolves when the default customer id is set. If businessProfileEncodedId is passed, the default customer email is set for that particular tracker instance. Else, default customer email is set for the default tracker instance\r\n|trackEvent(params  :  any, businessProfileEncodedId?  :  string) => Promise(void, Error)| Returns a promise that resolves when the event has been successfully tracked. Refer to Event Parameters section for supported properties in params object|\r\n|enableTracking( ) => Promise(void, Error)| Returns a promise that resolves when tracking is enabled in the SDK|\r\n|disableTracking( ) => Promise(void, Error)|Returns a promise that resolves when tracking is disabled in the SDK|\r\n|trackClick(uri  :  string, businessProfileEncodedId?  :  string) => Promise(void, Error)|Returns a promise that resolves when a deep link click event is tracked for the given URI string|\r\n\r\n**Event Parameters**\r\n\r\nThe first parameter of the trackEvent method is an object which supports the following properties with string values. Any of these properties which are set will be passed in the event which is tracked.\r\n\r\n - TransactionId\t\r\n - CurrencyCode\t\r\n - TransactionValue\t\r\n - Quantity\t\r\n - CustomerId\t\r\n - CustomerMail\r\n - CustomerPhone\r\n - GoalId\t\r\n - Stage1\t\r\n - Stage2\t\r\n - Stage3\t\r\n - Stage4\t\r\n - Stage5\t\r\n - Stage6\t\r\n - Stage7\t\r\n - Stage8\t\r\n - Stage9\t\r\n - Stage10\t\r\n - XCart\t\r\n\r\nRefer to [cordova-plugin-deltax-mobile-sdk](https://www.npmjs.com/package/@deltax-sdk/cordova-plugin-deltax-mobile-sdk) for detailed documentation.\r\n ","readmeFilename":"readme.md"}