UNPKG

klaviyo-react-native-sdk

Version:
81 lines (80 loc) 2.67 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "EventName", { enumerable: true, get: function () { return _Event.EventName; } }); exports.Klaviyo = void 0; Object.defineProperty(exports, "ProfileProperty", { enumerable: true, get: function () { return _Profile.ProfileProperty; } }); var _KlaviyoReactNativeSdk = require("./KlaviyoReactNativeSdk.js"); var _Profile = require("./Profile.js"); var _Event = require("./Event.js"); /** * Implementation of the {@link KlaviyoInterface} */ const Klaviyo = exports.Klaviyo = { initialize(apiKey) { _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.initialize(apiKey); }, setProfile(profile) { _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.setProfile((0, _Profile.formatProfile)(profile)); }, setExternalId(externalId) { _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.setExternalId(externalId); }, getExternalId(callback) { return _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.getExternalId(callback); }, setEmail(email) { _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.setEmail(email); }, getEmail(callback) { return _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.getEmail(callback); }, setPhoneNumber(phoneNumber) { _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.setPhoneNumber(phoneNumber); }, getPhoneNumber(callback) { return _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.getPhoneNumber(callback); }, setProfileAttribute(propertyKey, value) { _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.setProfileAttribute(propertyKey, value); }, setBadgeCount(count) { // checking if method exists since this is iOS only and don't want a // runtime error on android if (_KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.setBadgeCount) { _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.setBadgeCount(count); } else { console.log('setBadgeCount is not available on this platform'); } }, resetProfile() { _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.resetProfile(); }, setPushToken(token) { _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.setPushToken(token); }, getPushToken(callback) { return _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.getPushToken(callback); }, createEvent(event) { _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.createEvent(event); }, registerForInAppForms(configuration) { _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.registerForInAppForms(configuration); }, unregisterFromInAppForms: () => { _KlaviyoReactNativeSdk.KlaviyoReactNativeSdk.unregisterFromInAppForms(); } }; //# sourceMappingURL=index.js.map