From ec7b477b1b430c3dad52f3fd8251300e50946764 Mon Sep 17 00:00:00 2001 From: Krzysztof Kurzawa Date: Tue, 7 Feb 2023 12:26:53 +0100 Subject: [PATCH] Release of version 0.11.0 --- CHANGELOG.md | 10 + README.md | 2 +- android/build.gradle | 7 +- .../sdk/react/RNSyneriseInitializer.java | 4 +- .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../UserInterfaceState.xcuserstate | Bin 0 -> 49897 bytes .../xcdebugger/Breakpoints_v2.xcbkptlist | 6 + .../xcschemes/xcschememanagement.plist | 14 + .../NSMutableDictionary+ReactNative.m | 7 +- .../Main/RNSyneriseInitializer.m | 2 +- .../Modules/RNBaseModule.m | 2 +- .../Modules/RNPromotions.m | 4 +- ios/react-native-synerise-sdk.podspec | 2 +- lib/classes/api_queries/BaseApiQuery.d.ts | 15 - lib/classes/api_queries/BaseApiQuery.js | 18 -- .../api_queries/DocumentsApiQuery.d.ts | 13 - lib/classes/api_queries/DocumentsApiQuery.js | 18 -- .../api_queries/DocumentsApiQueryType.d.ts | 4 - .../api_queries/DocumentsApiQueryType.js | 7 - .../api_queries/PromotionsApiQuery.d.ts | 16 -- lib/classes/api_queries/PromotionsApiQuery.js | 37 --- lib/classes/events/CustomEvent.d.ts | 9 - lib/classes/events/CustomEvent.js | 46 --- lib/classes/events/Event.d.ts | 14 - lib/classes/events/Event.js | 20 -- lib/classes/events/auth/LoggedInEvent.d.ts | 5 - lib/classes/events/auth/LoggedInEvent.js | 25 -- lib/classes/events/auth/LoggedOutEvent.d.ts | 5 - lib/classes/events/auth/LoggedOutEvent.js | 25 -- .../events/auth/RecognizeClientEvent.d.ts | 5 - .../events/auth/RecognizeClientEvent.js | 27 -- lib/classes/events/auth/RegisteredEvent.d.ts | 5 - lib/classes/events/auth/RegisteredEvent.js | 25 -- lib/classes/events/cart/CartEvent.d.ts | 14 - lib/classes/events/cart/CartEvent.js | 77 ----- .../events/cart/ProductAddedToCartEvent.d.ts | 6 - .../events/cart/ProductAddedToCartEvent.js | 25 -- .../cart/ProductRemovedFromCartEvent.d.ts | 6 - .../cart/ProductRemovedFromCartEvent.js | 25 -- lib/classes/events/cart/UnitPrice.d.ts | 10 - lib/classes/events/cart/UnitPrice.js | 16 -- .../events/other/AppearedInLocationEvent.d.ts | 5 - .../events/other/AppearedInLocationEvent.js | 34 --- lib/classes/events/other/HitTimerEvent.d.ts | 5 - lib/classes/events/other/HitTimerEvent.js | 25 -- lib/classes/events/other/SearchedEvent.d.ts | 5 - lib/classes/events/other/SearchedEvent.js | 25 -- lib/classes/events/other/SharedEvent.d.ts | 5 - lib/classes/events/other/SharedEvent.js | 25 -- .../events/other/VisitedScreenEvent.d.ts | 5 - .../events/other/VisitedScreenEvent.js | 25 -- .../ProductAddedToFavouritesEvent.d.ts | 5 - .../product/ProductAddedToFavouritesEvent.js | 25 -- .../events/product/ProductViewedEvent.d.ts | 7 - .../events/product/ProductViewedEvent.js | 45 --- .../events/push/PushCancelledEvent.d.ts | 5 - lib/classes/events/push/PushCancelledEvent.js | 25 -- lib/classes/events/push/PushClickedEvent.d.ts | 5 - lib/classes/events/push/PushClickedEvent.js | 25 -- lib/classes/events/push/PushViewedEvent.d.ts | 5 - lib/classes/events/push/PushViewedEvent.js | 25 -- .../RecommendationClickEvent.d.ts | 5 - .../RecommendationClickEvent.js | 25 -- .../recommendation/RecommendationEvent.d.ts | 7 - .../recommendation/RecommendationEvent.js | 44 --- .../RecommendationSeenEvent.d.ts | 5 - .../recommendation/RecommendationSeenEvent.js | 25 -- lib/classes/models/BaseModel.d.ts | 21 -- lib/classes/models/BaseModel.js | 44 --- .../Client/ClientAccountInformation.d.ts | 53 ---- .../models/Client/ClientAccountInformation.js | 49 ---- .../Client/ClientAccountRegisterContext.d.ts | 38 --- .../Client/ClientAccountRegisterContext.js | 60 ---- .../Client/ClientAccountUpdateContext.d.ts | 46 --- .../Client/ClientAccountUpdateContext.js | 66 ----- .../models/Client/ClientAgreements.d.ts | 20 -- lib/classes/models/Client/ClientAgreements.js | 42 --- ...lientAppleSignInAuthenticationContext.d.ts | 15 - .../ClientAppleSignInAuthenticationContext.js | 37 --- .../models/Client/ClientAuthContext.d.ts | 15 - .../models/Client/ClientAuthContext.js | 37 --- .../Client/ClientConditionalAuthResult.d.ts | 12 - .../Client/ClientConditionalAuthResult.js | 27 -- .../Client/ClientConditionalAuthStatus.d.ts | 10 - .../Client/ClientConditionalAuthStatus.js | 13 - .../ClientFacebookAuthenticationContext.d.ts | 15 - .../ClientFacebookAuthenticationContext.js | 37 --- .../models/Client/ClientIdentityProvider.d.ts | 10 - .../models/Client/ClientIdentityProvider.js | 31 -- .../ClientOAuthAuthenticationContext.d.ts | 15 - .../ClientOAuthAuthenticationContext.js | 37 --- .../models/Client/ClientSessionEndReason.d.ts | 13 - .../models/Client/ClientSessionEndReason.js | 43 --- lib/classes/models/Client/ClientSex.d.ts | 9 - lib/classes/models/Client/ClientSex.js | 27 -- .../models/Content/Recommendation.d.ts | 11 - lib/classes/models/Content/Recommendation.js | 27 -- .../models/Content/RecommendationOptions.d.ts | 6 - .../models/Content/RecommendationOptions.js | 14 - .../Content/RecommendationResponse.d.ts | 20 -- .../models/Content/RecommendationResponse.js | 39 --- .../models/Content/ScreenViewAudience.d.ts | 11 - .../models/Content/ScreenViewAudience.js | 31 -- .../models/Content/ScreenViewResponse.d.ts | 34 --- .../models/Content/ScreenViewResponse.js | 45 --- lib/classes/models/Promotions/Promotion.d.ts | 93 ------ lib/classes/models/Promotions/Promotion.js | 89 ------ .../models/Promotions/PromotionDetails.d.ts | 10 - .../models/Promotions/PromotionDetails.js | 30 -- .../Promotions/PromotionDiscountMode.d.ts | 7 - .../Promotions/PromotionDiscountMode.js | 22 -- .../PromotionDiscountModeDetails.d.ts | 13 - .../PromotionDiscountModeDetails.js | 36 --- .../Promotions/PromotionDiscountStep.d.ts | 11 - .../Promotions/PromotionDiscountStep.js | 27 -- .../Promotions/PromotionDiscountType.d.ts | 12 - .../Promotions/PromotionDiscountType.js | 39 --- .../PromotionDiscountTypeDetails.d.ts | 15 - .../PromotionDiscountTypeDetails.js | 29 -- .../PromotionDiscountUsageTrigger.d.ts | 7 - .../PromotionDiscountUsageTrigger.js | 22 -- .../Promotions/PromotionIdentifier.d.ts | 7 - .../models/Promotions/PromotionIdentifier.js | 10 - .../Promotions/PromotionIdentifierKey.d.ts | 5 - .../Promotions/PromotionIdentifierKey.js | 8 - .../models/Promotions/PromotionItemScope.d.ts | 7 - .../models/Promotions/PromotionItemScope.js | 22 -- .../models/Promotions/PromotionResponse.d.ts | 20 -- .../models/Promotions/PromotionResponse.js | 39 --- .../models/Promotions/PromotionStatus.d.ts | 9 - .../models/Promotions/PromotionStatus.js | 27 -- .../models/Promotions/PromotionType.d.ts | 10 - .../models/Promotions/PromotionType.js | 31 -- lib/classes/models/Token/Token.d.ts | 14 - lib/classes/models/Token/Token.js | 29 -- lib/classes/models/Token/TokenOrigin.d.ts | 9 - lib/classes/models/Token/TokenOrigin.js | 27 -- .../models/Vouchers/AssignVoucherData.d.ts | 19 -- .../models/Vouchers/AssignVoucherData.js | 37 --- .../Vouchers/AssignVoucherResponse.d.ts | 12 - .../models/Vouchers/AssignVoucherResponse.js | 28 -- .../models/Vouchers/VoucherCodeStatus.d.ts | 9 - .../models/Vouchers/VoucherCodeStatus.js | 30 -- .../models/Vouchers/VoucherCodesData.d.ts | 25 -- .../models/Vouchers/VoucherCodesData.js | 41 --- .../models/Vouchers/VoucherCodesResponse.d.ts | 10 - .../models/Vouchers/VoucherCodesResponse.js | 34 --- lib/classes/types/Error.d.ts | 17 -- lib/classes/types/Error.js | 38 --- lib/classes/utils/DeviceUtils.d.ts | 5 - lib/classes/utils/DeviceUtils.js | 25 -- lib/config/constants.d.ts | 2 - lib/config/constants.js | 6 - lib/config/import_events.d.ts | 21 -- lib/config/import_events.js | 50 ---- lib/config/import_models.d.ts | 41 --- lib/config/import_models.js | 98 ------- lib/config/import_types.d.ts | 1 - lib/config/import_types.js | 5 - lib/index.d.ts | 5 - lib/index.js | 11 - lib/main/Synerise.d.ts | 39 --- lib/main/Synerise.js | 266 ------------------ .../SyneriseModuleConnector.d.ts | 11 - .../communication/SyneriseModuleConnector.js | 202 ------------- .../communication/SyneriseModuleEmitter.d.ts | 5 - .../communication/SyneriseModuleEmitter.js | 15 - lib/main/modules/BaseModule.d.ts | 7 - lib/main/modules/BaseModule.js | 13 - lib/main/modules/ClientModule.d.ts | 79 ------ lib/main/modules/ClientModule.js | 199 ------------- lib/main/modules/ContentModule.d.ts | 16 -- lib/main/modules/ContentModule.js | 49 ---- lib/main/modules/InjectorModule.d.ts | 56 ---- lib/main/modules/InjectorModule.js | 154 ---------- lib/main/modules/NotificationsModule.d.ts | 31 -- lib/main/modules/NotificationsModule.js | 111 -------- lib/main/modules/PromotionsModule.d.ts | 27 -- lib/main/modules/PromotionsModule.js | 77 ----- lib/main/modules/SettingsModule.d.ts | 53 ---- lib/main/modules/SettingsModule.js | 182 ------------ lib/main/modules/TrackerModule.d.ts | 12 - lib/main/modules/TrackerModule.js | 46 --- package.json | 2 +- react-native-synerise-sdk.podspec | 4 +- 186 files changed, 65 insertions(+), 5012 deletions(-) create mode 100644 ios/ReactNativeSynerise.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 ios/ReactNativeSynerise.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 ios/ReactNativeSynerise.xcodeproj/project.xcworkspace/xcuserdata/kurzy.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 ios/ReactNativeSynerise.xcodeproj/xcuserdata/kurzy.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 ios/ReactNativeSynerise.xcodeproj/xcuserdata/kurzy.xcuserdatad/xcschemes/xcschememanagement.plist delete mode 100644 lib/classes/api_queries/BaseApiQuery.d.ts delete mode 100644 lib/classes/api_queries/BaseApiQuery.js delete mode 100644 lib/classes/api_queries/DocumentsApiQuery.d.ts delete mode 100644 lib/classes/api_queries/DocumentsApiQuery.js delete mode 100644 lib/classes/api_queries/DocumentsApiQueryType.d.ts delete mode 100644 lib/classes/api_queries/DocumentsApiQueryType.js delete mode 100644 lib/classes/api_queries/PromotionsApiQuery.d.ts delete mode 100644 lib/classes/api_queries/PromotionsApiQuery.js delete mode 100644 lib/classes/events/CustomEvent.d.ts delete mode 100644 lib/classes/events/CustomEvent.js delete mode 100644 lib/classes/events/Event.d.ts delete mode 100644 lib/classes/events/Event.js delete mode 100644 lib/classes/events/auth/LoggedInEvent.d.ts delete mode 100644 lib/classes/events/auth/LoggedInEvent.js delete mode 100644 lib/classes/events/auth/LoggedOutEvent.d.ts delete mode 100644 lib/classes/events/auth/LoggedOutEvent.js delete mode 100644 lib/classes/events/auth/RecognizeClientEvent.d.ts delete mode 100644 lib/classes/events/auth/RecognizeClientEvent.js delete mode 100644 lib/classes/events/auth/RegisteredEvent.d.ts delete mode 100644 lib/classes/events/auth/RegisteredEvent.js delete mode 100644 lib/classes/events/cart/CartEvent.d.ts delete mode 100644 lib/classes/events/cart/CartEvent.js delete mode 100644 lib/classes/events/cart/ProductAddedToCartEvent.d.ts delete mode 100644 lib/classes/events/cart/ProductAddedToCartEvent.js delete mode 100644 lib/classes/events/cart/ProductRemovedFromCartEvent.d.ts delete mode 100644 lib/classes/events/cart/ProductRemovedFromCartEvent.js delete mode 100644 lib/classes/events/cart/UnitPrice.d.ts delete mode 100644 lib/classes/events/cart/UnitPrice.js delete mode 100644 lib/classes/events/other/AppearedInLocationEvent.d.ts delete mode 100644 lib/classes/events/other/AppearedInLocationEvent.js delete mode 100644 lib/classes/events/other/HitTimerEvent.d.ts delete mode 100644 lib/classes/events/other/HitTimerEvent.js delete mode 100644 lib/classes/events/other/SearchedEvent.d.ts delete mode 100644 lib/classes/events/other/SearchedEvent.js delete mode 100644 lib/classes/events/other/SharedEvent.d.ts delete mode 100644 lib/classes/events/other/SharedEvent.js delete mode 100644 lib/classes/events/other/VisitedScreenEvent.d.ts delete mode 100644 lib/classes/events/other/VisitedScreenEvent.js delete mode 100644 lib/classes/events/product/ProductAddedToFavouritesEvent.d.ts delete mode 100644 lib/classes/events/product/ProductAddedToFavouritesEvent.js delete mode 100644 lib/classes/events/product/ProductViewedEvent.d.ts delete mode 100644 lib/classes/events/product/ProductViewedEvent.js delete mode 100644 lib/classes/events/push/PushCancelledEvent.d.ts delete mode 100644 lib/classes/events/push/PushCancelledEvent.js delete mode 100644 lib/classes/events/push/PushClickedEvent.d.ts delete mode 100644 lib/classes/events/push/PushClickedEvent.js delete mode 100644 lib/classes/events/push/PushViewedEvent.d.ts delete mode 100644 lib/classes/events/push/PushViewedEvent.js delete mode 100644 lib/classes/events/recommendation/RecommendationClickEvent.d.ts delete mode 100644 lib/classes/events/recommendation/RecommendationClickEvent.js delete mode 100644 lib/classes/events/recommendation/RecommendationEvent.d.ts delete mode 100644 lib/classes/events/recommendation/RecommendationEvent.js delete mode 100644 lib/classes/events/recommendation/RecommendationSeenEvent.d.ts delete mode 100644 lib/classes/events/recommendation/RecommendationSeenEvent.js delete mode 100644 lib/classes/models/BaseModel.d.ts delete mode 100644 lib/classes/models/BaseModel.js delete mode 100644 lib/classes/models/Client/ClientAccountInformation.d.ts delete mode 100644 lib/classes/models/Client/ClientAccountInformation.js delete mode 100644 lib/classes/models/Client/ClientAccountRegisterContext.d.ts delete mode 100644 lib/classes/models/Client/ClientAccountRegisterContext.js delete mode 100644 lib/classes/models/Client/ClientAccountUpdateContext.d.ts delete mode 100644 lib/classes/models/Client/ClientAccountUpdateContext.js delete mode 100644 lib/classes/models/Client/ClientAgreements.d.ts delete mode 100644 lib/classes/models/Client/ClientAgreements.js delete mode 100644 lib/classes/models/Client/ClientAppleSignInAuthenticationContext.d.ts delete mode 100644 lib/classes/models/Client/ClientAppleSignInAuthenticationContext.js delete mode 100644 lib/classes/models/Client/ClientAuthContext.d.ts delete mode 100644 lib/classes/models/Client/ClientAuthContext.js delete mode 100644 lib/classes/models/Client/ClientConditionalAuthResult.d.ts delete mode 100644 lib/classes/models/Client/ClientConditionalAuthResult.js delete mode 100644 lib/classes/models/Client/ClientConditionalAuthStatus.d.ts delete mode 100644 lib/classes/models/Client/ClientConditionalAuthStatus.js delete mode 100644 lib/classes/models/Client/ClientFacebookAuthenticationContext.d.ts delete mode 100644 lib/classes/models/Client/ClientFacebookAuthenticationContext.js delete mode 100644 lib/classes/models/Client/ClientIdentityProvider.d.ts delete mode 100644 lib/classes/models/Client/ClientIdentityProvider.js delete mode 100644 lib/classes/models/Client/ClientOAuthAuthenticationContext.d.ts delete mode 100644 lib/classes/models/Client/ClientOAuthAuthenticationContext.js delete mode 100644 lib/classes/models/Client/ClientSessionEndReason.d.ts delete mode 100644 lib/classes/models/Client/ClientSessionEndReason.js delete mode 100644 lib/classes/models/Client/ClientSex.d.ts delete mode 100644 lib/classes/models/Client/ClientSex.js delete mode 100644 lib/classes/models/Content/Recommendation.d.ts delete mode 100644 lib/classes/models/Content/Recommendation.js delete mode 100644 lib/classes/models/Content/RecommendationOptions.d.ts delete mode 100644 lib/classes/models/Content/RecommendationOptions.js delete mode 100644 lib/classes/models/Content/RecommendationResponse.d.ts delete mode 100644 lib/classes/models/Content/RecommendationResponse.js delete mode 100644 lib/classes/models/Content/ScreenViewAudience.d.ts delete mode 100644 lib/classes/models/Content/ScreenViewAudience.js delete mode 100644 lib/classes/models/Content/ScreenViewResponse.d.ts delete mode 100644 lib/classes/models/Content/ScreenViewResponse.js delete mode 100644 lib/classes/models/Promotions/Promotion.d.ts delete mode 100644 lib/classes/models/Promotions/Promotion.js delete mode 100644 lib/classes/models/Promotions/PromotionDetails.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionDetails.js delete mode 100644 lib/classes/models/Promotions/PromotionDiscountMode.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionDiscountMode.js delete mode 100644 lib/classes/models/Promotions/PromotionDiscountModeDetails.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionDiscountModeDetails.js delete mode 100644 lib/classes/models/Promotions/PromotionDiscountStep.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionDiscountStep.js delete mode 100644 lib/classes/models/Promotions/PromotionDiscountType.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionDiscountType.js delete mode 100644 lib/classes/models/Promotions/PromotionDiscountTypeDetails.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionDiscountTypeDetails.js delete mode 100644 lib/classes/models/Promotions/PromotionDiscountUsageTrigger.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionDiscountUsageTrigger.js delete mode 100644 lib/classes/models/Promotions/PromotionIdentifier.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionIdentifier.js delete mode 100644 lib/classes/models/Promotions/PromotionIdentifierKey.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionIdentifierKey.js delete mode 100644 lib/classes/models/Promotions/PromotionItemScope.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionItemScope.js delete mode 100644 lib/classes/models/Promotions/PromotionResponse.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionResponse.js delete mode 100644 lib/classes/models/Promotions/PromotionStatus.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionStatus.js delete mode 100644 lib/classes/models/Promotions/PromotionType.d.ts delete mode 100644 lib/classes/models/Promotions/PromotionType.js delete mode 100644 lib/classes/models/Token/Token.d.ts delete mode 100644 lib/classes/models/Token/Token.js delete mode 100644 lib/classes/models/Token/TokenOrigin.d.ts delete mode 100644 lib/classes/models/Token/TokenOrigin.js delete mode 100644 lib/classes/models/Vouchers/AssignVoucherData.d.ts delete mode 100644 lib/classes/models/Vouchers/AssignVoucherData.js delete mode 100644 lib/classes/models/Vouchers/AssignVoucherResponse.d.ts delete mode 100644 lib/classes/models/Vouchers/AssignVoucherResponse.js delete mode 100644 lib/classes/models/Vouchers/VoucherCodeStatus.d.ts delete mode 100644 lib/classes/models/Vouchers/VoucherCodeStatus.js delete mode 100644 lib/classes/models/Vouchers/VoucherCodesData.d.ts delete mode 100644 lib/classes/models/Vouchers/VoucherCodesData.js delete mode 100644 lib/classes/models/Vouchers/VoucherCodesResponse.d.ts delete mode 100644 lib/classes/models/Vouchers/VoucherCodesResponse.js delete mode 100644 lib/classes/types/Error.d.ts delete mode 100644 lib/classes/types/Error.js delete mode 100644 lib/classes/utils/DeviceUtils.d.ts delete mode 100644 lib/classes/utils/DeviceUtils.js delete mode 100644 lib/config/constants.d.ts delete mode 100644 lib/config/constants.js delete mode 100644 lib/config/import_events.d.ts delete mode 100644 lib/config/import_events.js delete mode 100644 lib/config/import_models.d.ts delete mode 100644 lib/config/import_models.js delete mode 100644 lib/config/import_types.d.ts delete mode 100644 lib/config/import_types.js delete mode 100644 lib/index.d.ts delete mode 100644 lib/index.js delete mode 100644 lib/main/Synerise.d.ts delete mode 100644 lib/main/Synerise.js delete mode 100644 lib/main/communication/SyneriseModuleConnector.d.ts delete mode 100644 lib/main/communication/SyneriseModuleConnector.js delete mode 100644 lib/main/communication/SyneriseModuleEmitter.d.ts delete mode 100644 lib/main/communication/SyneriseModuleEmitter.js delete mode 100644 lib/main/modules/BaseModule.d.ts delete mode 100644 lib/main/modules/BaseModule.js delete mode 100644 lib/main/modules/ClientModule.d.ts delete mode 100644 lib/main/modules/ClientModule.js delete mode 100644 lib/main/modules/ContentModule.d.ts delete mode 100644 lib/main/modules/ContentModule.js delete mode 100644 lib/main/modules/InjectorModule.d.ts delete mode 100644 lib/main/modules/InjectorModule.js delete mode 100644 lib/main/modules/NotificationsModule.d.ts delete mode 100644 lib/main/modules/NotificationsModule.js delete mode 100644 lib/main/modules/PromotionsModule.d.ts delete mode 100644 lib/main/modules/PromotionsModule.js delete mode 100644 lib/main/modules/SettingsModule.d.ts delete mode 100644 lib/main/modules/SettingsModule.js delete mode 100644 lib/main/modules/TrackerModule.d.ts delete mode 100644 lib/main/modules/TrackerModule.js diff --git a/CHANGELOG.md b/CHANGELOG.md index d0d1182..6a5a946 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. +## [0.11.0] - 2023-02-07 + +### Fixed +- [Android] Fix initialization with custom url. + +### Changed +- Update of native SDK's dependencies. +- Improvements to stability. + + ## [0.10.5] - 2022-07-26 ### Fixed diff --git a/README.md b/README.md index 2157d5e..d042adb 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Most up-to-date documentation is available at Synerise Help Center: ### iOS -* Xcode 12 and iOS SDK 14 +* Xcode 14 and iOS SDK 16 * iOS 9.0+ target deployment * Valid architectures: armv7, armv7s, arm64 devices and i386, x86_64 simulators diff --git a/android/build.gradle b/android/build.gradle index dba92e0..dc23479 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,8 +4,8 @@ ext.versions = [ 'minSdk' : 21, 'compileSdk' : 31, 'targetSdk' : 31, - 'versionCode': 22, - 'versionName': "0.10.5" + 'versionCode': 23, + 'versionName': "0.11.0" ] buildscript { @@ -24,7 +24,6 @@ buildscript { android { compileSdkVersion 31 - buildToolsVersion "28.0.3" defaultConfig { minSdkVersion 21 @@ -46,7 +45,6 @@ android { } repositories { - mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$projectDir/../../../node_modules/react-native/android" @@ -58,6 +56,7 @@ repositories { dependencies { implementation 'com.facebook.react:react-native:+' + implementation "com.squareup.okhttp3:logging-interceptor:4.9.1" api 'com.synerise.sdk:synerise-mobile-sdk:4.6.2' } diff --git a/android/src/main/java/com/synerise/sdk/react/RNSyneriseInitializer.java b/android/src/main/java/com/synerise/sdk/react/RNSyneriseInitializer.java index 5c4f0ae..273c19a 100644 --- a/android/src/main/java/com/synerise/sdk/react/RNSyneriseInitializer.java +++ b/android/src/main/java/com/synerise/sdk/react/RNSyneriseInitializer.java @@ -9,7 +9,7 @@ public class RNSyneriseInitializer { public String clientApiKey; - public String baseUrl; + public String baseUrl = null; public Boolean isDebugModeEnabled; public Boolean isCrashHandlingEnabled; public static volatile boolean isInitialized = false; @@ -19,7 +19,7 @@ public void initialize(Application app) { prepareDefaultSettings(); Synerise.Builder.with(app, clientApiKey, getApplicationName(app)) - .baseUrl(null) + .baseUrl(baseUrl) .syneriseDebugMode(isDebugModeEnabled) .crashHandlingEnabled(isCrashHandlingEnabled) .pushRegistrationRequired(RNNotifications.getNativePushListener()) diff --git a/ios/ReactNativeSynerise.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/ReactNativeSynerise.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios/ReactNativeSynerise.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/ReactNativeSynerise.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/ReactNativeSynerise.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/ReactNativeSynerise.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/ReactNativeSynerise.xcodeproj/project.xcworkspace/xcuserdata/kurzy.xcuserdatad/UserInterfaceState.xcuserstate b/ios/ReactNativeSynerise.xcodeproj/project.xcworkspace/xcuserdata/kurzy.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..2e34e78ff02e249ace6924dc80b1dc3210db0ebf GIT binary patch literal 49897 zcmeF4cU%<5`}lWe_U^Xa9S8P?;L-8uU62kQAQr@~1mRSaCI>2(WJhBXV`4YW7zJBG zqNXRNm}YucQ;aFb7&T2z@A3D{?j1#l@$>zCl6?M9UmV=-%+BmH?|EkCnVDy%)mBzG z>mwo#afrhl;doBR={W-@jrW`DsB>1-R8R0Ltt*>Z0pG^>)z{RH_p6yU%TZSE^y1J} zTS_b*g+=*}Mn`$NE6|&qz=_30^`-R=1?}*z%-zCm1N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!L98W2a(gV=b}P*p*m&>~8FS>|yLl?625A@qzJ?@$vC#@wxE@@x}2a@n!M6I3o_m zp*TCviEHCTe0Tg@{CfOW{7$?h{xJSH(KFFM@kwG(Vn||GA}#S{;_Jk>iRp>Ci3N#8 ziOfV+f|g(<3KOM?9}|j%Dq%=eC(MbOggt>J$i$k&`oyM0Lt<-UTjFS(X;1&s5NQB|0CD`c9r7)0I=n6hX4Qo literal 0 HcmV?d00001 diff --git a/ios/ReactNativeSynerise.xcodeproj/xcuserdata/kurzy.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/ios/ReactNativeSynerise.xcodeproj/xcuserdata/kurzy.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..49f7141 --- /dev/null +++ b/ios/ReactNativeSynerise.xcodeproj/xcuserdata/kurzy.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/ios/ReactNativeSynerise.xcodeproj/xcuserdata/kurzy.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/ReactNativeSynerise.xcodeproj/xcuserdata/kurzy.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..1cb8834 --- /dev/null +++ b/ios/ReactNativeSynerise.xcodeproj/xcuserdata/kurzy.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + ReactNativeSynerise.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/ios/ReactNativeSynerise/Categories/NSMutableDictionary+ReactNative.m b/ios/ReactNativeSynerise/Categories/NSMutableDictionary+ReactNative.m index 25c0ab9..4771d61 100644 --- a/ios/ReactNativeSynerise/Categories/NSMutableDictionary+ReactNative.m +++ b/ios/ReactNativeSynerise/Categories/NSMutableDictionary+ReactNative.m @@ -45,7 +45,12 @@ - (void)setBool:(BOOL)boolean forKey:(NSString *)key { } - (void)setDate:(NSDate *)date forKey:(NSString *)key { - [self setObject:[NSNumber numberWithDouble:[date timeIntervalSince1970]] properClass:NSNumber.class forKey:key]; + NSNumber *dateAsNumber; + if (date != nil) { + dateAsNumber = [NSNumber numberWithDouble:[date timeIntervalSince1970]]; + } + + [self setObject:dateAsNumber properClass:NSNumber.class forKey:key]; } #pragma mark - Private diff --git a/ios/ReactNativeSynerise/Main/RNSyneriseInitializer.m b/ios/ReactNativeSynerise/Main/RNSyneriseInitializer.m index 9af6411..5dec93b 100644 --- a/ios/ReactNativeSynerise/Main/RNSyneriseInitializer.m +++ b/ios/ReactNativeSynerise/Main/RNSyneriseInitializer.m @@ -13,7 +13,7 @@ @implementation RNSyneriseInitializer #pragma mark - Public - (void)initializeSynerise { - dispatch_sync(dispatch_get_main_queue(), ^{ + dispatch_async(dispatch_get_main_queue(), ^{ [self overwriteDefaultSettings]; [SNRSynerise initializeWithClientApiKey:self.clientApiKey andBaseUrl:self.baseURL]; diff --git a/ios/ReactNativeSynerise/Modules/RNBaseModule.m b/ios/ReactNativeSynerise/Modules/RNBaseModule.m index 5615560..e7f55ee 100644 --- a/ios/ReactNativeSynerise/Modules/RNBaseModule.m +++ b/ios/ReactNativeSynerise/Modules/RNBaseModule.m @@ -10,7 +10,7 @@ static NSString * const RNDefaultErrorDomain = @"com.synerise.sdk.react.error"; static NSInteger const RNDefaultErrorCode = -1; -static NSString * const RNDefaultErrorMessage = @""; +static NSString * const RNDefaultErrorMessage = @"An unknown error has occurred"; static NSString * const RNErrorObjectCode = @"code"; static NSString * const RNErrorObjectMessage = @"message"; diff --git a/ios/ReactNativeSynerise/Modules/RNPromotions.m b/ios/ReactNativeSynerise/Modules/RNPromotions.m index 626add0..63ec1f3 100644 --- a/ios/ReactNativeSynerise/Modules/RNPromotions.m +++ b/ios/ReactNativeSynerise/Modules/RNPromotions.m @@ -247,7 +247,7 @@ - (nullable NSDictionary *)dictionaryWithAssignVoucherResponse:(SNRAssignVoucher NSMutableDictionary *dictionary = [@{} mutableCopy]; [dictionary setString:model.message forKey:@"message"]; - [dictionary setDictionary:[self dictionaryWithAssignVoucherData:model.assignVoucherData] forKey:@"assignVoucherData"]; + [dictionary setDictionary:[self dictionaryWithAssignVoucherData:model.assignVoucherData] forKey:@"data"]; return dictionary; } @@ -264,7 +264,7 @@ - (nullable NSDictionary *)dictionaryWithVoucherCodesResponse:(SNRVoucherCodesRe [voucherCodesArray addObject:[self dictionaryWithVoucherCodesData:voucherCodesDataModel]]; } - [dictionary setArray:voucherCodesArray forKey:@"items"]; + [dictionary setArray:voucherCodesArray forKey:@"data"]; return dictionary; } diff --git a/ios/react-native-synerise-sdk.podspec b/ios/react-native-synerise-sdk.podspec index f218753..10a821c 100644 --- a/ios/react-native-synerise-sdk.podspec +++ b/ios/react-native-synerise-sdk.podspec @@ -2,7 +2,7 @@ require 'json' package = JSON.parse(File.read('./../package.json')) -SYNERISE_SDK_FRAMEWORK_VERSION = '3.11.2' +SYNERISE_SDK_FRAMEWORK_VERSION = '3.12.0' Pod::Spec.new do |s| s.name = package['name'] diff --git a/lib/classes/api_queries/BaseApiQuery.d.ts b/lib/classes/api_queries/BaseApiQuery.d.ts deleted file mode 100644 index ed9deea..0000000 --- a/lib/classes/api_queries/BaseApiQuery.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -declare enum ApiQuerySortingOrder { - Ascending = "asc", - Descending = "desc" -} -interface IApiQuerySorting { - property: string; - order: ApiQuerySortingOrder; -} -declare class BaseApiQuery { - limit: number; - page: number; - sorting: Array; - includeMeta: boolean; -} -export { BaseApiQuery, IApiQuerySorting, ApiQuerySortingOrder }; diff --git a/lib/classes/api_queries/BaseApiQuery.js b/lib/classes/api_queries/BaseApiQuery.js deleted file mode 100644 index fd0e93c..0000000 --- a/lib/classes/api_queries/BaseApiQuery.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var ApiQuerySortingOrder; -(function (ApiQuerySortingOrder) { - ApiQuerySortingOrder["Ascending"] = "asc"; - ApiQuerySortingOrder["Descending"] = "desc"; -})(ApiQuerySortingOrder || (ApiQuerySortingOrder = {})); -exports.ApiQuerySortingOrder = ApiQuerySortingOrder; -var BaseApiQuery = /** @class */ (function () { - function BaseApiQuery() { - this.limit = 100; - this.page = 1; - this.sorting = []; - this.includeMeta = false; - } - return BaseApiQuery; -}()); -exports.BaseApiQuery = BaseApiQuery; diff --git a/lib/classes/api_queries/DocumentsApiQuery.d.ts b/lib/classes/api_queries/DocumentsApiQuery.d.ts deleted file mode 100644 index 1095349..0000000 --- a/lib/classes/api_queries/DocumentsApiQuery.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { DocumentsApiQueryType } from './DocumentsApiQueryType'; -declare class DocumentsApiQuery { - type: DocumentsApiQueryType; - typeValue: string; - version: string; - constructor(type: DocumentsApiQueryType, typeValue: string, version: string); - toObject(): { - type: DocumentsApiQueryType; - typeValue: string; - version: string; - }; -} -export { DocumentsApiQuery }; diff --git a/lib/classes/api_queries/DocumentsApiQuery.js b/lib/classes/api_queries/DocumentsApiQuery.js deleted file mode 100644 index f727b89..0000000 --- a/lib/classes/api_queries/DocumentsApiQuery.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var DocumentsApiQuery = /** @class */ (function () { - function DocumentsApiQuery(type, typeValue, version) { - this.type = type; - this.typeValue = typeValue; - this.version = version; - } - DocumentsApiQuery.prototype.toObject = function () { - return { - type: this.type, - typeValue: this.typeValue, - version: this.version, - }; - }; - return DocumentsApiQuery; -}()); -exports.DocumentsApiQuery = DocumentsApiQuery; diff --git a/lib/classes/api_queries/DocumentsApiQueryType.d.ts b/lib/classes/api_queries/DocumentsApiQueryType.d.ts deleted file mode 100644 index b536d49..0000000 --- a/lib/classes/api_queries/DocumentsApiQueryType.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare enum DocumentsApiQueryType { - SCHEMA = "by-schema" -} -export { DocumentsApiQueryType }; diff --git a/lib/classes/api_queries/DocumentsApiQueryType.js b/lib/classes/api_queries/DocumentsApiQueryType.js deleted file mode 100644 index 77b8c4f..0000000 --- a/lib/classes/api_queries/DocumentsApiQueryType.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var DocumentsApiQueryType; -(function (DocumentsApiQueryType) { - DocumentsApiQueryType["SCHEMA"] = "by-schema"; -})(DocumentsApiQueryType || (DocumentsApiQueryType = {})); -exports.DocumentsApiQueryType = DocumentsApiQueryType; diff --git a/lib/classes/api_queries/PromotionsApiQuery.d.ts b/lib/classes/api_queries/PromotionsApiQuery.d.ts deleted file mode 100644 index cbbc90a..0000000 --- a/lib/classes/api_queries/PromotionsApiQuery.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { BaseApiQuery, IApiQuerySorting } from './BaseApiQuery'; -import { PromotionStatus } from '../models/Promotions/PromotionStatus'; -import { PromotionType } from '../models/Promotions/PromotionType'; -declare class PromotionsApiQuery extends BaseApiQuery { - statuses: Array; - types: Array; - toObject(): { - statuses: PromotionStatus[]; - types: PromotionType[]; - sorting: IApiQuerySorting[]; - limit: number; - page: number; - includeMeta: boolean; - }; -} -export { PromotionsApiQuery }; diff --git a/lib/classes/api_queries/PromotionsApiQuery.js b/lib/classes/api_queries/PromotionsApiQuery.js deleted file mode 100644 index 1230d7a..0000000 --- a/lib/classes/api_queries/PromotionsApiQuery.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseApiQuery_1 = require("./BaseApiQuery"); -var PromotionsApiQuery = /** @class */ (function (_super) { - __extends(PromotionsApiQuery, _super); - function PromotionsApiQuery() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.statuses = []; - _this.types = []; - return _this; - } - PromotionsApiQuery.prototype.toObject = function () { - return { - statuses: this.statuses, - types: this.types, - sorting: this.sorting, - limit: this.limit, - page: this.page, - includeMeta: this.includeMeta, - }; - }; - return PromotionsApiQuery; -}(BaseApiQuery_1.BaseApiQuery)); -exports.PromotionsApiQuery = PromotionsApiQuery; diff --git a/lib/classes/events/CustomEvent.d.ts b/lib/classes/events/CustomEvent.d.ts deleted file mode 100644 index 957a6e4..0000000 --- a/lib/classes/events/CustomEvent.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Event } from './Event'; -declare class CustomEvent extends Event { - constructor(label: string, action: string, parameters?: Record); - setString(key: string, string: string): void; - setNumber(key: string, number: number): void; - setBool(key: string, bool: boolean): void; - setObject(key: string, object: object): void; -} -export { CustomEvent }; diff --git a/lib/classes/events/CustomEvent.js b/lib/classes/events/CustomEvent.js deleted file mode 100644 index 7141399..0000000 --- a/lib/classes/events/CustomEvent.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("./Event"); -var CUSTOM_EVENT_TYPE = 'custom'; -var CustomEvent = /** @class */ (function (_super) { - __extends(CustomEvent, _super); - function CustomEvent(label, action, parameters) { - return _super.call(this, CUSTOM_EVENT_TYPE, label, action, parameters || {}) || this; - } - CustomEvent.prototype.setString = function (key, string) { - if (typeof key == 'string' && typeof string == 'string') { - this.parameters[key] = string; - } - }; - CustomEvent.prototype.setNumber = function (key, number) { - if (typeof key == 'string' && typeof number == 'number') { - this.parameters[key] = number; - } - }; - CustomEvent.prototype.setBool = function (key, bool) { - if (typeof key == 'string' && typeof bool == 'boolean') { - this.parameters[key] = bool; - } - }; - CustomEvent.prototype.setObject = function (key, object) { - //TODO: add object validation - if (typeof key == 'string' && typeof object == 'object') { - this.parameters[key] = object; - } - }; - return CustomEvent; -}(Event_1.Event)); -exports.CustomEvent = CustomEvent; diff --git a/lib/classes/events/Event.d.ts b/lib/classes/events/Event.d.ts deleted file mode 100644 index 35b5a62..0000000 --- a/lib/classes/events/Event.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -declare abstract class Event { - private type; - private label; - private action; - protected parameters: Record; - constructor(type: string, label: string, action: string | null, parameters: object); - toObject(): { - type: string; - label: string; - action: string | null; - parameters: Record; - }; -} -export { Event }; diff --git a/lib/classes/events/Event.js b/lib/classes/events/Event.js deleted file mode 100644 index 876cfd3..0000000 --- a/lib/classes/events/Event.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var Event = /** @class */ (function () { - function Event(type, label, action, parameters) { - this.type = type; - this.label = label; - this.action = action; - this.parameters = parameters; - } - Event.prototype.toObject = function () { - return { - type: this.type, - label: this.label, - action: this.action, - parameters: this.parameters, - }; - }; - return Event; -}()); -exports.Event = Event; diff --git a/lib/classes/events/auth/LoggedInEvent.d.ts b/lib/classes/events/auth/LoggedInEvent.d.ts deleted file mode 100644 index 91072b9..0000000 --- a/lib/classes/events/auth/LoggedInEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from './../Event'; -declare class LoggedInEvent extends Event { - constructor(label: string, parameters?: object); -} -export { LoggedInEvent }; diff --git a/lib/classes/events/auth/LoggedInEvent.js b/lib/classes/events/auth/LoggedInEvent.js deleted file mode 100644 index 716c8c4..0000000 --- a/lib/classes/events/auth/LoggedInEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("./../Event"); -var LOGGED_IN_EVENT_TYPE = 'logged-in'; -var LoggedInEvent = /** @class */ (function (_super) { - __extends(LoggedInEvent, _super); - function LoggedInEvent(label, parameters) { - return _super.call(this, LOGGED_IN_EVENT_TYPE, label, null, parameters || {}) || this; - } - return LoggedInEvent; -}(Event_1.Event)); -exports.LoggedInEvent = LoggedInEvent; diff --git a/lib/classes/events/auth/LoggedOutEvent.d.ts b/lib/classes/events/auth/LoggedOutEvent.d.ts deleted file mode 100644 index 2cebb5b..0000000 --- a/lib/classes/events/auth/LoggedOutEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from './../Event'; -declare class LoggedOutEvent extends Event { - constructor(label: string, parameters?: object); -} -export { LoggedOutEvent }; diff --git a/lib/classes/events/auth/LoggedOutEvent.js b/lib/classes/events/auth/LoggedOutEvent.js deleted file mode 100644 index 70fdfcf..0000000 --- a/lib/classes/events/auth/LoggedOutEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("./../Event"); -var LOGGED_OUT_EVENT_TYPE = 'logged-out'; -var LoggedOutEvent = /** @class */ (function (_super) { - __extends(LoggedOutEvent, _super); - function LoggedOutEvent(label, parameters) { - return _super.call(this, LOGGED_OUT_EVENT_TYPE, label, null, parameters || {}) || this; - } - return LoggedOutEvent; -}(Event_1.Event)); -exports.LoggedOutEvent = LoggedOutEvent; diff --git a/lib/classes/events/auth/RecognizeClientEvent.d.ts b/lib/classes/events/auth/RecognizeClientEvent.d.ts deleted file mode 100644 index 483afd0..0000000 --- a/lib/classes/events/auth/RecognizeClientEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from './../Event'; -declare class RecognizeClientEvent extends Event { - constructor(parameters?: object); -} -export { RecognizeClientEvent }; diff --git a/lib/classes/events/auth/RecognizeClientEvent.js b/lib/classes/events/auth/RecognizeClientEvent.js deleted file mode 100644 index 23b302b..0000000 --- a/lib/classes/events/auth/RecognizeClientEvent.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("./../Event"); -var RECOGNIZE_CLIENT_EVENT_TYPE = 'custom'; -var RECOGNIZE_CLIENT_EVENT_LABEL = 'client'; -var RECOGNIZE_CLIENT_EVENT_ACTION = 'client.createOrUpdate'; -var RecognizeClientEvent = /** @class */ (function (_super) { - __extends(RecognizeClientEvent, _super); - function RecognizeClientEvent(parameters) { - return _super.call(this, RECOGNIZE_CLIENT_EVENT_TYPE, RECOGNIZE_CLIENT_EVENT_LABEL, RECOGNIZE_CLIENT_EVENT_ACTION, parameters || {}) || this; - } - return RecognizeClientEvent; -}(Event_1.Event)); -exports.RecognizeClientEvent = RecognizeClientEvent; diff --git a/lib/classes/events/auth/RegisteredEvent.d.ts b/lib/classes/events/auth/RegisteredEvent.d.ts deleted file mode 100644 index 51a3a70..0000000 --- a/lib/classes/events/auth/RegisteredEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from './../Event'; -declare class RegisteredEvent extends Event { - constructor(label: string, parameters?: object); -} -export { RegisteredEvent }; diff --git a/lib/classes/events/auth/RegisteredEvent.js b/lib/classes/events/auth/RegisteredEvent.js deleted file mode 100644 index a82f703..0000000 --- a/lib/classes/events/auth/RegisteredEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("./../Event"); -var REGISTERED_EVENT_TYPE = 'registered'; -var RegisteredEvent = /** @class */ (function (_super) { - __extends(RegisteredEvent, _super); - function RegisteredEvent(label, parameters) { - return _super.call(this, REGISTERED_EVENT_TYPE, label, null, parameters || {}) || this; - } - return RegisteredEvent; -}(Event_1.Event)); -exports.RegisteredEvent = RegisteredEvent; diff --git a/lib/classes/events/cart/CartEvent.d.ts b/lib/classes/events/cart/CartEvent.d.ts deleted file mode 100644 index ef85f21..0000000 --- a/lib/classes/events/cart/CartEvent.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Event } from './../Event'; -import { UnitPrice } from './UnitPrice'; -declare class CartEvent extends Event { - constructor(type: string, label: string, sku: string, finalPrice: UnitPrice, quantity: number, parameters?: object); - setName(name: string): void; - setCategory(category: string): void; - setCategories(categories: string[]): void; - setOffline(offline: boolean): void; - setRegularPrice(regularPrice: UnitPrice): void; - setDiscountedPrice(discountedPrice: UnitPrice): void; - setUrl(url: string): void; - setProducer(producer: string): void; -} -export { CartEvent }; diff --git a/lib/classes/events/cart/CartEvent.js b/lib/classes/events/cart/CartEvent.js deleted file mode 100644 index 6a9f088..0000000 --- a/lib/classes/events/cart/CartEvent.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("./../Event"); -var Params; -(function (Params) { - Params["SKU"] = "sku"; - Params["NAME"] = "name"; - Params["CATEGORY"] = "category"; - Params["CATEGORIES"] = "categories"; - Params["OFFLINE"] = "offline"; - Params["REGULAR_UNIT_PRICE"] = "regularUnitPrice"; - Params["DISCOUNTED_UNIT_PRICE"] = "discountedUnitPrice"; - Params["FINAL_UNIT_PRICE"] = "finalUnitPrice"; - Params["URL"] = "url"; - Params["PRODUCER"] = "producer"; - Params["QUANTITY"] = "quantity"; -})(Params || (Params = {})); -var CartEvent = /** @class */ (function (_super) { - __extends(CartEvent, _super); - function CartEvent(type, label, sku, finalPrice, quantity, parameters) { - var _this = _super.call(this, type, label, null, parameters || {}) || this; - // TODO: walidacja przed konfilktami kluczy - _this.parameters[Params.SKU] = sku; - _this.parameters[Params.QUANTITY] = quantity; - _this.parameters[Params.FINAL_UNIT_PRICE] = finalPrice; - return _this; - } - CartEvent.prototype.setName = function (name) { - if (typeof name == 'string') { - this.parameters[Params.NAME] = name; - } - }; - CartEvent.prototype.setCategory = function (category) { - if (typeof category == 'string') { - this.parameters[Params.CATEGORY] = category; - } - }; - CartEvent.prototype.setCategories = function (categories) { - this.parameters[Params.CATEGORIES] = categories; - }; - CartEvent.prototype.setOffline = function (offline) { - if (typeof offline == 'boolean') { - this.parameters[Params.OFFLINE] = offline; - } - }; - CartEvent.prototype.setRegularPrice = function (regularPrice) { - this.parameters[Params.REGULAR_UNIT_PRICE] = regularPrice; - }; - CartEvent.prototype.setDiscountedPrice = function (discountedPrice) { - this.parameters[Params.DISCOUNTED_UNIT_PRICE] = discountedPrice; - }; - CartEvent.prototype.setUrl = function (url) { - if (typeof url == 'string') { - this.parameters[Params.URL] = url; - } - }; - CartEvent.prototype.setProducer = function (producer) { - if (typeof producer == 'string') { - this.parameters[Params.PRODUCER] = producer; - } - }; - return CartEvent; -}(Event_1.Event)); -exports.CartEvent = CartEvent; diff --git a/lib/classes/events/cart/ProductAddedToCartEvent.d.ts b/lib/classes/events/cart/ProductAddedToCartEvent.d.ts deleted file mode 100644 index 32e056c..0000000 --- a/lib/classes/events/cart/ProductAddedToCartEvent.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { CartEvent } from '../cart/CartEvent'; -import { UnitPrice } from '../cart/UnitPrice'; -declare class ProductAddedToCartEvent extends CartEvent { - constructor(label: string, sku: string, finalPrice: UnitPrice, quantity: number, parameters?: object); -} -export { ProductAddedToCartEvent }; diff --git a/lib/classes/events/cart/ProductAddedToCartEvent.js b/lib/classes/events/cart/ProductAddedToCartEvent.js deleted file mode 100644 index ff16679..0000000 --- a/lib/classes/events/cart/ProductAddedToCartEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var CartEvent_1 = require("../cart/CartEvent"); -var PRODUCT_ADDED_TO_CART_EVENT_TYPE = 'added-to-cart'; -var ProductAddedToCartEvent = /** @class */ (function (_super) { - __extends(ProductAddedToCartEvent, _super); - function ProductAddedToCartEvent(label, sku, finalPrice, quantity, parameters) { - return _super.call(this, PRODUCT_ADDED_TO_CART_EVENT_TYPE, label, sku, finalPrice, quantity, parameters || {}) || this; - } - return ProductAddedToCartEvent; -}(CartEvent_1.CartEvent)); -exports.ProductAddedToCartEvent = ProductAddedToCartEvent; diff --git a/lib/classes/events/cart/ProductRemovedFromCartEvent.d.ts b/lib/classes/events/cart/ProductRemovedFromCartEvent.d.ts deleted file mode 100644 index d9a61f0..0000000 --- a/lib/classes/events/cart/ProductRemovedFromCartEvent.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { CartEvent } from '../cart/CartEvent'; -import { UnitPrice } from '../cart/UnitPrice'; -declare class ProductRemovedFromCartEvent extends CartEvent { - constructor(label: string, sku: string, finalPrice: UnitPrice, quantity: number, parameters?: object); -} -export { ProductRemovedFromCartEvent }; diff --git a/lib/classes/events/cart/ProductRemovedFromCartEvent.js b/lib/classes/events/cart/ProductRemovedFromCartEvent.js deleted file mode 100644 index 7625b7a..0000000 --- a/lib/classes/events/cart/ProductRemovedFromCartEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var CartEvent_1 = require("../cart/CartEvent"); -var PRODUCT_REMOVED_FROM_CART_EVENT_TYPE = 'removed-from-cart'; -var ProductRemovedFromCartEvent = /** @class */ (function (_super) { - __extends(ProductRemovedFromCartEvent, _super); - function ProductRemovedFromCartEvent(label, sku, finalPrice, quantity, parameters) { - return _super.call(this, PRODUCT_REMOVED_FROM_CART_EVENT_TYPE, label, sku, finalPrice, quantity, parameters || {}) || this; - } - return ProductRemovedFromCartEvent; -}(CartEvent_1.CartEvent)); -exports.ProductRemovedFromCartEvent = ProductRemovedFromCartEvent; diff --git a/lib/classes/events/cart/UnitPrice.d.ts b/lib/classes/events/cart/UnitPrice.d.ts deleted file mode 100644 index becdd73..0000000 --- a/lib/classes/events/cart/UnitPrice.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare class UnitPrice { - private amount; - private currency; - constructor(amount: number, currency: string); - toObject(): { - amount: number; - currency: String; - }; -} -export { UnitPrice }; diff --git a/lib/classes/events/cart/UnitPrice.js b/lib/classes/events/cart/UnitPrice.js deleted file mode 100644 index f430c76..0000000 --- a/lib/classes/events/cart/UnitPrice.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var UnitPrice = /** @class */ (function () { - function UnitPrice(amount, currency) { - this.amount = amount; - this.currency = currency; - } - UnitPrice.prototype.toObject = function () { - return { - amount: this.amount, - currency: this.currency, - }; - }; - return UnitPrice; -}()); -exports.UnitPrice = UnitPrice; diff --git a/lib/classes/events/other/AppearedInLocationEvent.d.ts b/lib/classes/events/other/AppearedInLocationEvent.d.ts deleted file mode 100644 index ea21363..0000000 --- a/lib/classes/events/other/AppearedInLocationEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from './../Event'; -declare class AppearedInLocationEvent extends Event { - constructor(label: string, lat: number, lon: number, parameters?: object); -} -export { AppearedInLocationEvent }; diff --git a/lib/classes/events/other/AppearedInLocationEvent.js b/lib/classes/events/other/AppearedInLocationEvent.js deleted file mode 100644 index 98e04e2..0000000 --- a/lib/classes/events/other/AppearedInLocationEvent.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("./../Event"); -var Params; -(function (Params) { - Params["LAT"] = "lat"; - Params["LON"] = "lon"; -})(Params || (Params = {})); -var APPEARED_IN_LOCATION_EVENT_TYPE = 'appeared-in-location'; -var AppearedInLocationEvent = /** @class */ (function (_super) { - __extends(AppearedInLocationEvent, _super); - function AppearedInLocationEvent(label, lat, lon, parameters) { - var _this = _super.call(this, APPEARED_IN_LOCATION_EVENT_TYPE, label, null, parameters || {}) || this; - //TODO: walidacja czy nie ma kluczy takich - _this.parameters[Params.LAT] = lat; - _this.parameters[Params.LON] = lon; - return _this; - } - return AppearedInLocationEvent; -}(Event_1.Event)); -exports.AppearedInLocationEvent = AppearedInLocationEvent; diff --git a/lib/classes/events/other/HitTimerEvent.d.ts b/lib/classes/events/other/HitTimerEvent.d.ts deleted file mode 100644 index 3dade3c..0000000 --- a/lib/classes/events/other/HitTimerEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from './../Event'; -declare class HitTimerEvent extends Event { - constructor(label: string, parameters?: object); -} -export { HitTimerEvent }; diff --git a/lib/classes/events/other/HitTimerEvent.js b/lib/classes/events/other/HitTimerEvent.js deleted file mode 100644 index 0e1334b..0000000 --- a/lib/classes/events/other/HitTimerEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("./../Event"); -var HIT_TIMER_EVENT_TYPE = 'hit-timer'; -var HitTimerEvent = /** @class */ (function (_super) { - __extends(HitTimerEvent, _super); - function HitTimerEvent(label, parameters) { - return _super.call(this, HIT_TIMER_EVENT_TYPE, label, null, parameters || {}) || this; - } - return HitTimerEvent; -}(Event_1.Event)); -exports.HitTimerEvent = HitTimerEvent; diff --git a/lib/classes/events/other/SearchedEvent.d.ts b/lib/classes/events/other/SearchedEvent.d.ts deleted file mode 100644 index 18f5fcc..0000000 --- a/lib/classes/events/other/SearchedEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from './../Event'; -declare class SearchedEvent extends Event { - constructor(label: string, parameters?: object); -} -export { SearchedEvent }; diff --git a/lib/classes/events/other/SearchedEvent.js b/lib/classes/events/other/SearchedEvent.js deleted file mode 100644 index cf7253b..0000000 --- a/lib/classes/events/other/SearchedEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("./../Event"); -var SEARCHED_EVENT_TYPE = 'searched'; -var SearchedEvent = /** @class */ (function (_super) { - __extends(SearchedEvent, _super); - function SearchedEvent(label, parameters) { - return _super.call(this, SEARCHED_EVENT_TYPE, label, null, parameters || {}) || this; - } - return SearchedEvent; -}(Event_1.Event)); -exports.SearchedEvent = SearchedEvent; diff --git a/lib/classes/events/other/SharedEvent.d.ts b/lib/classes/events/other/SharedEvent.d.ts deleted file mode 100644 index 4d7e620..0000000 --- a/lib/classes/events/other/SharedEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from './../Event'; -declare class SharedEvent extends Event { - constructor(label: string, parameters?: object); -} -export { SharedEvent }; diff --git a/lib/classes/events/other/SharedEvent.js b/lib/classes/events/other/SharedEvent.js deleted file mode 100644 index a37e790..0000000 --- a/lib/classes/events/other/SharedEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("./../Event"); -var SHARED_EVENT_TYPE = 'shared'; -var SharedEvent = /** @class */ (function (_super) { - __extends(SharedEvent, _super); - function SharedEvent(label, parameters) { - return _super.call(this, SHARED_EVENT_TYPE, label, null, parameters || {}) || this; - } - return SharedEvent; -}(Event_1.Event)); -exports.SharedEvent = SharedEvent; diff --git a/lib/classes/events/other/VisitedScreenEvent.d.ts b/lib/classes/events/other/VisitedScreenEvent.d.ts deleted file mode 100644 index bcb3d50..0000000 --- a/lib/classes/events/other/VisitedScreenEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from './../Event'; -declare class VisitedScreenEvent extends Event { - constructor(label: string, parameters?: object); -} -export { VisitedScreenEvent }; diff --git a/lib/classes/events/other/VisitedScreenEvent.js b/lib/classes/events/other/VisitedScreenEvent.js deleted file mode 100644 index af8cb52..0000000 --- a/lib/classes/events/other/VisitedScreenEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("./../Event"); -var VISITED_SCREEN_EVENT_TYPE = 'visited-screen'; -var VisitedScreenEvent = /** @class */ (function (_super) { - __extends(VisitedScreenEvent, _super); - function VisitedScreenEvent(label, parameters) { - return _super.call(this, VISITED_SCREEN_EVENT_TYPE, label, null, parameters || {}) || this; - } - return VisitedScreenEvent; -}(Event_1.Event)); -exports.VisitedScreenEvent = VisitedScreenEvent; diff --git a/lib/classes/events/product/ProductAddedToFavouritesEvent.d.ts b/lib/classes/events/product/ProductAddedToFavouritesEvent.d.ts deleted file mode 100644 index 065375d..0000000 --- a/lib/classes/events/product/ProductAddedToFavouritesEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from '../Event'; -declare class ProductAddedToFavouritesEvent extends Event { - constructor(label: string, parameters?: object); -} -export { ProductAddedToFavouritesEvent }; diff --git a/lib/classes/events/product/ProductAddedToFavouritesEvent.js b/lib/classes/events/product/ProductAddedToFavouritesEvent.js deleted file mode 100644 index db1bed3..0000000 --- a/lib/classes/events/product/ProductAddedToFavouritesEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("../Event"); -var PRODUCT_DDED_TO_FAVOURITES_EVENT_TYPE = 'added-to-favorites'; -var ProductAddedToFavouritesEvent = /** @class */ (function (_super) { - __extends(ProductAddedToFavouritesEvent, _super); - function ProductAddedToFavouritesEvent(label, parameters) { - return _super.call(this, PRODUCT_DDED_TO_FAVOURITES_EVENT_TYPE, label, null, parameters || {}) || this; - } - return ProductAddedToFavouritesEvent; -}(Event_1.Event)); -exports.ProductAddedToFavouritesEvent = ProductAddedToFavouritesEvent; diff --git a/lib/classes/events/product/ProductViewedEvent.d.ts b/lib/classes/events/product/ProductViewedEvent.d.ts deleted file mode 100644 index e9fc796..0000000 --- a/lib/classes/events/product/ProductViewedEvent.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Event } from '../Event'; -declare class ProductViewedEvent extends Event { - constructor(label: string, productId: string, name: string, parameters?: object); - setCategory(category: string): void; - setUrl(url: string): void; -} -export { ProductViewedEvent }; diff --git a/lib/classes/events/product/ProductViewedEvent.js b/lib/classes/events/product/ProductViewedEvent.js deleted file mode 100644 index f17c10e..0000000 --- a/lib/classes/events/product/ProductViewedEvent.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("../Event"); -var PRODUCT_VIEWED_EVENT_TYPE = 'product-view'; -var Params; -(function (Params) { - Params["PRODUCT_ID"] = "productId"; - Params["NAME"] = "name"; - Params["CATEGORY"] = "category"; - Params["URL"] = "url"; -})(Params || (Params = {})); -var ProductViewedEvent = /** @class */ (function (_super) { - __extends(ProductViewedEvent, _super); - function ProductViewedEvent(label, productId, name, parameters) { - var _this = _super.call(this, PRODUCT_VIEWED_EVENT_TYPE, label, null, parameters || {}) || this; - _this.parameters[Params.PRODUCT_ID] = productId; - _this.parameters[Params.NAME] = name; - return _this; - } - ProductViewedEvent.prototype.setCategory = function (category) { - if (typeof category == 'string') { - this.parameters[Params.CATEGORY] = category; - } - }; - ProductViewedEvent.prototype.setUrl = function (url) { - if (typeof url == 'string') { - this.parameters[Params.URL] = url; - } - }; - return ProductViewedEvent; -}(Event_1.Event)); -exports.ProductViewedEvent = ProductViewedEvent; diff --git a/lib/classes/events/push/PushCancelledEvent.d.ts b/lib/classes/events/push/PushCancelledEvent.d.ts deleted file mode 100644 index 8e561cd..0000000 --- a/lib/classes/events/push/PushCancelledEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from '../Event'; -declare class PushCancelledEvent extends Event { - constructor(label: string, parameters?: object); -} -export { PushCancelledEvent }; diff --git a/lib/classes/events/push/PushCancelledEvent.js b/lib/classes/events/push/PushCancelledEvent.js deleted file mode 100644 index c6d9755..0000000 --- a/lib/classes/events/push/PushCancelledEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("../Event"); -var PUSH_CANCELLED_EVENT_TYPE = 'cancelled-push'; -var PushCancelledEvent = /** @class */ (function (_super) { - __extends(PushCancelledEvent, _super); - function PushCancelledEvent(label, parameters) { - return _super.call(this, PUSH_CANCELLED_EVENT_TYPE, label, null, parameters || {}) || this; - } - return PushCancelledEvent; -}(Event_1.Event)); -exports.PushCancelledEvent = PushCancelledEvent; diff --git a/lib/classes/events/push/PushClickedEvent.d.ts b/lib/classes/events/push/PushClickedEvent.d.ts deleted file mode 100644 index 4b969af..0000000 --- a/lib/classes/events/push/PushClickedEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from '../Event'; -declare class PushClickedEvent extends Event { - constructor(label: string, parameters?: object); -} -export { PushClickedEvent }; diff --git a/lib/classes/events/push/PushClickedEvent.js b/lib/classes/events/push/PushClickedEvent.js deleted file mode 100644 index 82bbb0d..0000000 --- a/lib/classes/events/push/PushClickedEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("../Event"); -var PUSH_CLICKED_EVENT_TYPE = 'clicked-push'; -var PushClickedEvent = /** @class */ (function (_super) { - __extends(PushClickedEvent, _super); - function PushClickedEvent(label, parameters) { - return _super.call(this, PUSH_CLICKED_EVENT_TYPE, label, null, parameters || {}) || this; - } - return PushClickedEvent; -}(Event_1.Event)); -exports.PushClickedEvent = PushClickedEvent; diff --git a/lib/classes/events/push/PushViewedEvent.d.ts b/lib/classes/events/push/PushViewedEvent.d.ts deleted file mode 100644 index 52291c7..0000000 --- a/lib/classes/events/push/PushViewedEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Event } from '../Event'; -declare class PushViewedEvent extends Event { - constructor(label: string, parameters?: object); -} -export { PushViewedEvent }; diff --git a/lib/classes/events/push/PushViewedEvent.js b/lib/classes/events/push/PushViewedEvent.js deleted file mode 100644 index ced5113..0000000 --- a/lib/classes/events/push/PushViewedEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("../Event"); -var PUSH_VIEWED_EVENT_TYPE = 'viewed-push'; -var PushViewedEvent = /** @class */ (function (_super) { - __extends(PushViewedEvent, _super); - function PushViewedEvent(label, parameters) { - return _super.call(this, PUSH_VIEWED_EVENT_TYPE, label, null, parameters || {}) || this; - } - return PushViewedEvent; -}(Event_1.Event)); -exports.PushViewedEvent = PushViewedEvent; diff --git a/lib/classes/events/recommendation/RecommendationClickEvent.d.ts b/lib/classes/events/recommendation/RecommendationClickEvent.d.ts deleted file mode 100644 index 9d4fcef..0000000 --- a/lib/classes/events/recommendation/RecommendationClickEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { RecommendationEvent } from './RecommendationEvent'; -declare class RecommendationClickEvent extends RecommendationEvent { - constructor(label: string, productId: string, name: string, campaignId: string, campaignHash: string, parameters?: object); -} -export { RecommendationClickEvent }; diff --git a/lib/classes/events/recommendation/RecommendationClickEvent.js b/lib/classes/events/recommendation/RecommendationClickEvent.js deleted file mode 100644 index 07bedf3..0000000 --- a/lib/classes/events/recommendation/RecommendationClickEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var RecommendationEvent_1 = require("./RecommendationEvent"); -var RECOMMENDATION_CLICK_EVENT_TYPE = 'recommendation-click'; -var RecommendationClickEvent = /** @class */ (function (_super) { - __extends(RecommendationClickEvent, _super); - function RecommendationClickEvent(label, productId, name, campaignId, campaignHash, parameters) { - return _super.call(this, RECOMMENDATION_CLICK_EVENT_TYPE, label, productId, name, campaignId, campaignHash, parameters || {}) || this; - } - return RecommendationClickEvent; -}(RecommendationEvent_1.RecommendationEvent)); -exports.RecommendationClickEvent = RecommendationClickEvent; diff --git a/lib/classes/events/recommendation/RecommendationEvent.d.ts b/lib/classes/events/recommendation/RecommendationEvent.d.ts deleted file mode 100644 index fdae887..0000000 --- a/lib/classes/events/recommendation/RecommendationEvent.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Event } from '../Event'; -declare class RecommendationEvent extends Event { - constructor(type: string, label: string, productId: string, name: string, campaignId: string, campaignHash: string, parameters?: object); - setCategory(category: string): void; - setUrl(url: string): void; -} -export { RecommendationEvent }; diff --git a/lib/classes/events/recommendation/RecommendationEvent.js b/lib/classes/events/recommendation/RecommendationEvent.js deleted file mode 100644 index 7a811d6..0000000 --- a/lib/classes/events/recommendation/RecommendationEvent.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("../Event"); -var Params; -(function (Params) { - Params["PRODUCT_ID"] = "productId"; - Params["NAME"] = "name"; - Params["CATEGORY"] = "category"; - Params["URL"] = "url"; - Params["CAMPAIGN_ID"] = "campaignId"; - Params["CAMPAIGN_HASH"] = "campaignHash"; -})(Params || (Params = {})); -var RecommendationEvent = /** @class */ (function (_super) { - __extends(RecommendationEvent, _super); - function RecommendationEvent(type, label, productId, name, campaignId, campaignHash, parameters) { - var _this = _super.call(this, type, label, null, parameters || {}) || this; - _this.parameters[Params.PRODUCT_ID] = productId; - _this.parameters[Params.NAME] = name; - _this.parameters[Params.CAMPAIGN_ID] = campaignId; - _this.parameters[Params.CAMPAIGN_HASH] = campaignHash; - return _this; - } - RecommendationEvent.prototype.setCategory = function (category) { - this.parameters[Params.CATEGORY] = category; - }; - RecommendationEvent.prototype.setUrl = function (url) { - this.parameters[Params.URL] = url; - }; - return RecommendationEvent; -}(Event_1.Event)); -exports.RecommendationEvent = RecommendationEvent; diff --git a/lib/classes/events/recommendation/RecommendationSeenEvent.d.ts b/lib/classes/events/recommendation/RecommendationSeenEvent.d.ts deleted file mode 100644 index 6ec6957..0000000 --- a/lib/classes/events/recommendation/RecommendationSeenEvent.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { RecommendationEvent } from './RecommendationEvent'; -declare class RecommendationSeenEvent extends RecommendationEvent { - constructor(label: string, productId: string, name: string, campaignId: string, campaignHash: string, parameters?: object); -} -export { RecommendationSeenEvent }; diff --git a/lib/classes/events/recommendation/RecommendationSeenEvent.js b/lib/classes/events/recommendation/RecommendationSeenEvent.js deleted file mode 100644 index 1fbe5f8..0000000 --- a/lib/classes/events/recommendation/RecommendationSeenEvent.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var RecommendationEvent_1 = require("./RecommendationEvent"); -var RECOMMENDATION_SEEN_EVENT_TYPE = 'recommendation-seen'; -var RecommendationSeenEvent = /** @class */ (function (_super) { - __extends(RecommendationSeenEvent, _super); - function RecommendationSeenEvent(label, productId, name, campaignId, campaignHash, parameters) { - return _super.call(this, RECOMMENDATION_SEEN_EVENT_TYPE, label, productId, name, campaignId, campaignHash, parameters || {}) || this; - } - return RecommendationSeenEvent; -}(RecommendationEvent_1.RecommendationEvent)); -exports.RecommendationSeenEvent = RecommendationSeenEvent; diff --git a/lib/classes/models/BaseModel.d.ts b/lib/classes/models/BaseModel.d.ts deleted file mode 100644 index 1df69e6..0000000 --- a/lib/classes/models/BaseModel.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -interface ModelMappableConstructor { - new (modelObject?: any): M; -} -interface ModelMappable { - toObject(): object; - toObjectIfNotEmpty(): object | undefined; -} -declare abstract class BaseModel implements ModelMappable { - constructor(); - constructor(modelObject: object); - toObject(): object; - toObjectIfNotEmpty(): object | undefined; -} -declare type ModelMappingFunction = (modelObject: object) => BaseModel | null; -declare class ModelMapper { - mappingFunction: ModelMappingFunction; - static make(modelClass: ModelMappableConstructor): ModelMapper; - constructor(mappingFunction: ModelMappingFunction); - getModelInstance(modelObject: object): any; -} -export { ModelMapper, ModelMappingFunction, BaseModel }; diff --git a/lib/classes/models/BaseModel.js b/lib/classes/models/BaseModel.js deleted file mode 100644 index 6600d2c..0000000 --- a/lib/classes/models/BaseModel.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel = /** @class */ (function () { - function BaseModel(modelObject) { - } - BaseModel.prototype.toObject = function () { - return {}; - }; - BaseModel.prototype.toObjectIfNotEmpty = function () { - var object = this.toObject(); - var filteredObject = Object.entries(Object.entries(object) - .filter(function (_a) { - var key = _a[0], value = _a[1]; - return value !== undefined; - })); - if (Object.keys(filteredObject).length > 0) { - return object; - } - else { - return undefined; - } - }; - return BaseModel; -}()); -exports.BaseModel = BaseModel; -var ModelMapper = /** @class */ (function () { - function ModelMapper(mappingFunction) { - this.mappingFunction = mappingFunction; - } - ModelMapper.make = function (modelClass) { - var createModelFunction = function (modelClass, modelObject) { - return new modelClass(modelObject); - }; - var mappingFunction = function (modelObject) { - return createModelFunction(modelClass, modelObject); - }; - return new ModelMapper(mappingFunction); - }; - ModelMapper.prototype.getModelInstance = function (modelObject) { - return this.mappingFunction(modelObject); - }; - return ModelMapper; -}()); -exports.ModelMapper = ModelMapper; diff --git a/lib/classes/models/Client/ClientAccountInformation.d.ts b/lib/classes/models/Client/ClientAccountInformation.d.ts deleted file mode 100644 index a96ad41..0000000 --- a/lib/classes/models/Client/ClientAccountInformation.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { BaseModel } from '../BaseModel'; -import { ClientSex } from './../Client/ClientSex'; -import { IClientAgreements, ClientAgreements } from './../Client/ClientAgreements'; -interface IClientAccountInformation { - clientId: number; - email: string; - phone?: string; - customId?: string; - uuid: string; - firstName?: string; - lastName?: string; - displayName?: string; - sex: string; - birthDate?: string; - avatarUrl?: string; - company?: string; - address?: string; - city?: string; - province?: string; - zipCode?: string; - countryCode?: string; - anonymous: boolean; - lastActivityDate: number; - agreements?: IClientAgreements; - attributes?: object; - tags?: Array; -} -declare class ClientAccountInformation extends BaseModel { - clientId: number; - email: string; - phone?: string; - customId?: string; - uuid: string; - firstName?: string; - lastName?: string; - displayName?: string; - sex: ClientSex; - birthDate?: string; - avatarUrl?: string; - company?: string; - address?: string; - city?: string; - province?: string; - zipCode?: string; - countryCode?: string; - anonymous: boolean; - lastActivityDate: Date; - agreements?: ClientAgreements; - attributes?: object; - tags?: Array; - constructor(modelObject: IClientAccountInformation); -} -export { ClientAccountInformation }; diff --git a/lib/classes/models/Client/ClientAccountInformation.js b/lib/classes/models/Client/ClientAccountInformation.js deleted file mode 100644 index 3a71885..0000000 --- a/lib/classes/models/Client/ClientAccountInformation.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var ClientSex_1 = require("./../Client/ClientSex"); -var ClientAgreements_1 = require("./../Client/ClientAgreements"); -var ClientAccountInformation = /** @class */ (function (_super) { - __extends(ClientAccountInformation, _super); - function ClientAccountInformation(modelObject) { - var _this = _super.call(this, modelObject) || this; - _this.clientId = modelObject.clientId; - _this.email = modelObject.email; - _this.phone = modelObject.phone; - _this.customId = modelObject.customId; - _this.uuid = modelObject.uuid; - _this.firstName = modelObject.firstName; - _this.lastName = modelObject.lastName; - _this.displayName = modelObject.displayName; - _this.sex = ClientSex_1.ClientSexFromString(modelObject.sex); - _this.birthDate = modelObject.birthDate; - _this.avatarUrl = modelObject.avatarUrl; - _this.company = modelObject.company; - _this.address = modelObject.address; - _this.city = modelObject.city; - _this.province = modelObject.province; - _this.zipCode = modelObject.zipCode; - _this.countryCode = modelObject.countryCode; - _this.anonymous = modelObject.anonymous; - _this.lastActivityDate = new Date(modelObject.lastActivityDate * 1000); - _this.agreements = new ClientAgreements_1.ClientAgreements(modelObject.agreements); - _this.attributes = modelObject.attributes; - _this.tags = modelObject.tags; - return _this; - } - return ClientAccountInformation; -}(BaseModel_1.BaseModel)); -exports.ClientAccountInformation = ClientAccountInformation; diff --git a/lib/classes/models/Client/ClientAccountRegisterContext.d.ts b/lib/classes/models/Client/ClientAccountRegisterContext.d.ts deleted file mode 100644 index f40067b..0000000 --- a/lib/classes/models/Client/ClientAccountRegisterContext.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { BaseModel } from './../BaseModel'; -import { ClientSex } from './../Client/ClientSex'; -import { IClientAgreements, ClientAgreements } from './../Client/ClientAgreements'; -interface IClientAccountRegisterContext { - phone?: string; - customId?: string; - firstName?: string; - lastName?: string; - sex?: ClientSex; - company?: string; - address?: string; - city?: string; - province?: string; - zipCode?: string; - countryCode?: string; - agreements?: IClientAgreements; - attributes?: object; -} -declare class ClientAccountRegisterContext extends BaseModel { - email: string; - password: string; - phone?: string; - customId?: string; - firstName?: string; - lastName?: string; - sex?: ClientSex; - company?: string; - address?: string; - city?: string; - province?: string; - zipCode?: string; - countryCode?: string; - agreements: ClientAgreements; - attributes?: object; - constructor(email: string, password: string, modelObject?: IClientAccountRegisterContext); - toObject(): object; -} -export { IClientAccountRegisterContext, ClientAccountRegisterContext }; diff --git a/lib/classes/models/Client/ClientAccountRegisterContext.js b/lib/classes/models/Client/ClientAccountRegisterContext.js deleted file mode 100644 index 1cfbb9a..0000000 --- a/lib/classes/models/Client/ClientAccountRegisterContext.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("./../BaseModel"); -var ClientAgreements_1 = require("./../Client/ClientAgreements"); -var ClientAccountRegisterContext = /** @class */ (function (_super) { - __extends(ClientAccountRegisterContext, _super); - function ClientAccountRegisterContext(email, password, modelObject) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; - var _this = _super.call(this) || this; - _this.email = email; - _this.password = password; - _this.phone = (_a = modelObject) === null || _a === void 0 ? void 0 : _a.phone; - _this.customId = (_b = modelObject) === null || _b === void 0 ? void 0 : _b.customId; - _this.firstName = (_c = modelObject) === null || _c === void 0 ? void 0 : _c.firstName; - _this.lastName = (_d = modelObject) === null || _d === void 0 ? void 0 : _d.lastName; - _this.sex = (_e = modelObject) === null || _e === void 0 ? void 0 : _e.sex; - _this.company = (_f = modelObject) === null || _f === void 0 ? void 0 : _f.company; - _this.address = (_g = modelObject) === null || _g === void 0 ? void 0 : _g.address; - _this.province = (_h = modelObject) === null || _h === void 0 ? void 0 : _h.province; - _this.zipCode = (_j = modelObject) === null || _j === void 0 ? void 0 : _j.zipCode; - _this.countryCode = (_k = modelObject) === null || _k === void 0 ? void 0 : _k.countryCode; - _this.agreements = new ClientAgreements_1.ClientAgreements((_l = modelObject) === null || _l === void 0 ? void 0 : _l.agreements); - _this.attributes = (_m = modelObject) === null || _m === void 0 ? void 0 : _m.attributes; - return _this; - } - ClientAccountRegisterContext.prototype.toObject = function () { - return { - email: this.email, - password: this.password, - phone: this.phone, - customId: this.customId, - firstName: this.firstName, - lastName: this.lastName, - sex: this.sex, - company: this.company, - address: this.address, - city: this.city, - province: this.province, - zipCode: this.zipCode, - countryCode: this.countryCode, - agreements: this.agreements.toObjectIfNotEmpty(), - attributes: this.attributes, - }; - }; - return ClientAccountRegisterContext; -}(BaseModel_1.BaseModel)); -exports.ClientAccountRegisterContext = ClientAccountRegisterContext; diff --git a/lib/classes/models/Client/ClientAccountUpdateContext.d.ts b/lib/classes/models/Client/ClientAccountUpdateContext.d.ts deleted file mode 100644 index 0f7a216..0000000 --- a/lib/classes/models/Client/ClientAccountUpdateContext.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { BaseModel } from './../BaseModel'; -import { ClientSex } from './../Client/ClientSex'; -import { IClientAgreements, ClientAgreements } from './../Client/ClientAgreements'; -interface IClientAccountUpdateContext { - email?: string; - phone?: string; - customId?: string; - uuid?: string; - firstName?: string; - lastName?: string; - displayName?: string; - sex?: ClientSex; - birthDate?: string; - avatarUrl?: string; - company?: string; - address?: string; - city?: string; - province?: string; - zipCode?: string; - countryCode?: string; - agreements?: IClientAgreements; - attributes?: object; -} -declare class ClientAccountUpdateContext extends BaseModel { - email?: string; - phone?: string; - customId?: string; - uuid?: string; - firstName?: string; - lastName?: string; - displayName?: string; - sex?: ClientSex; - birthDate?: string; - avatarUrl?: string; - company?: string; - address?: string; - city?: string; - province?: string; - zipCode?: string; - countryCode?: string; - agreements: ClientAgreements; - attributes?: object; - constructor(modelObject?: IClientAccountUpdateContext); - toObject(): object; -} -export { IClientAccountUpdateContext, ClientAccountUpdateContext }; diff --git a/lib/classes/models/Client/ClientAccountUpdateContext.js b/lib/classes/models/Client/ClientAccountUpdateContext.js deleted file mode 100644 index 940035f..0000000 --- a/lib/classes/models/Client/ClientAccountUpdateContext.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("./../BaseModel"); -var ClientAgreements_1 = require("./../Client/ClientAgreements"); -var ClientAccountUpdateContext = /** @class */ (function (_super) { - __extends(ClientAccountUpdateContext, _super); - function ClientAccountUpdateContext(modelObject) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s; - var _this = _super.call(this) || this; - _this.email = (_a = modelObject) === null || _a === void 0 ? void 0 : _a.email; - _this.phone = (_b = modelObject) === null || _b === void 0 ? void 0 : _b.phone; - _this.customId = (_c = modelObject) === null || _c === void 0 ? void 0 : _c.customId; - _this.uuid = (_d = modelObject) === null || _d === void 0 ? void 0 : _d.uuid; - _this.firstName = (_e = modelObject) === null || _e === void 0 ? void 0 : _e.firstName; - _this.lastName = (_f = modelObject) === null || _f === void 0 ? void 0 : _f.lastName; - _this.displayName = (_g = modelObject) === null || _g === void 0 ? void 0 : _g.displayName; - _this.sex = (_h = modelObject) === null || _h === void 0 ? void 0 : _h.sex; - _this.birthDate = (_j = modelObject) === null || _j === void 0 ? void 0 : _j.birthDate; - _this.avatarUrl = (_k = modelObject) === null || _k === void 0 ? void 0 : _k.avatarUrl; - _this.company = (_l = modelObject) === null || _l === void 0 ? void 0 : _l.company; - _this.address = (_m = modelObject) === null || _m === void 0 ? void 0 : _m.address; - _this.province = (_o = modelObject) === null || _o === void 0 ? void 0 : _o.province; - _this.zipCode = (_p = modelObject) === null || _p === void 0 ? void 0 : _p.zipCode; - _this.countryCode = (_q = modelObject) === null || _q === void 0 ? void 0 : _q.countryCode; - _this.agreements = new ClientAgreements_1.ClientAgreements((_r = modelObject) === null || _r === void 0 ? void 0 : _r.agreements); - _this.attributes = (_s = modelObject) === null || _s === void 0 ? void 0 : _s.attributes; - return _this; - } - ClientAccountUpdateContext.prototype.toObject = function () { - return { - email: this.email, - phone: this.phone, - customId: this.customId, - uuid: this.uuid, - firstName: this.firstName, - lastName: this.lastName, - displayName: this.displayName, - sex: this.sex, - birthDate: this.birthDate, - avatarUrl: this.avatarUrl, - company: this.company, - address: this.address, - city: this.city, - province: this.province, - zipCode: this.zipCode, - countryCode: this.countryCode, - agreements: this.agreements.toObjectIfNotEmpty(), - attributes: this.attributes, - }; - }; - return ClientAccountUpdateContext; -}(BaseModel_1.BaseModel)); -exports.ClientAccountUpdateContext = ClientAccountUpdateContext; diff --git a/lib/classes/models/Client/ClientAgreements.d.ts b/lib/classes/models/Client/ClientAgreements.d.ts deleted file mode 100644 index 95c46e9..0000000 --- a/lib/classes/models/Client/ClientAgreements.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { BaseModel } from './../BaseModel'; -interface IClientAgreements { - email?: boolean; - sms?: boolean; - push?: boolean; - bluetooth?: boolean; - rfid?: boolean; - wifi?: boolean; -} -declare class ClientAgreements extends BaseModel { - email?: boolean; - sms?: boolean; - push?: boolean; - bluetooth?: boolean; - rfid?: boolean; - wifi?: boolean; - constructor(modelObject?: IClientAgreements); - toObject(): object; -} -export { IClientAgreements, ClientAgreements }; diff --git a/lib/classes/models/Client/ClientAgreements.js b/lib/classes/models/Client/ClientAgreements.js deleted file mode 100644 index 0806c54..0000000 --- a/lib/classes/models/Client/ClientAgreements.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("./../BaseModel"); -var ClientAgreements = /** @class */ (function (_super) { - __extends(ClientAgreements, _super); - function ClientAgreements(modelObject) { - var _a, _b, _c, _d, _e, _f; - var _this = _super.call(this, modelObject || {}) || this; - _this.email = (_a = modelObject) === null || _a === void 0 ? void 0 : _a.email; - _this.sms = (_b = modelObject) === null || _b === void 0 ? void 0 : _b.sms; - _this.push = (_c = modelObject) === null || _c === void 0 ? void 0 : _c.push; - _this.bluetooth = (_d = modelObject) === null || _d === void 0 ? void 0 : _d.bluetooth; - _this.rfid = (_e = modelObject) === null || _e === void 0 ? void 0 : _e.rfid; - _this.wifi = (_f = modelObject) === null || _f === void 0 ? void 0 : _f.wifi; - return _this; - } - ClientAgreements.prototype.toObject = function () { - return { - email: this.email, - sms: this.sms, - push: this.push, - bluetooth: this.bluetooth, - rfid: this.rfid, - wifi: this.wifi - }; - }; - return ClientAgreements; -}(BaseModel_1.BaseModel)); -exports.ClientAgreements = ClientAgreements; diff --git a/lib/classes/models/Client/ClientAppleSignInAuthenticationContext.d.ts b/lib/classes/models/Client/ClientAppleSignInAuthenticationContext.d.ts deleted file mode 100644 index 8b6ce77..0000000 --- a/lib/classes/models/Client/ClientAppleSignInAuthenticationContext.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BaseModel } from './../BaseModel'; -import { IClientAgreements, ClientAgreements } from './ClientAgreements'; -interface IClientAppleSignInAuthenticationContext { - authID?: string; - agreements?: IClientAgreements; - attributes?: object; -} -declare class ClientAppleSignInAuthenticationContext extends BaseModel { - authID?: string; - agreements: ClientAgreements; - attributes?: object; - constructor(modelObject?: IClientAppleSignInAuthenticationContext); - toObject(): object; -} -export { IClientAppleSignInAuthenticationContext, ClientAppleSignInAuthenticationContext }; diff --git a/lib/classes/models/Client/ClientAppleSignInAuthenticationContext.js b/lib/classes/models/Client/ClientAppleSignInAuthenticationContext.js deleted file mode 100644 index e40ea88..0000000 --- a/lib/classes/models/Client/ClientAppleSignInAuthenticationContext.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("./../BaseModel"); -var ClientAgreements_1 = require("./ClientAgreements"); -var ClientAppleSignInAuthenticationContext = /** @class */ (function (_super) { - __extends(ClientAppleSignInAuthenticationContext, _super); - function ClientAppleSignInAuthenticationContext(modelObject) { - var _a, _b, _c; - var _this = _super.call(this) || this; - _this.authID = (_a = modelObject) === null || _a === void 0 ? void 0 : _a.authID; - _this.agreements = new ClientAgreements_1.ClientAgreements((_b = modelObject) === null || _b === void 0 ? void 0 : _b.agreements); - _this.attributes = (_c = modelObject) === null || _c === void 0 ? void 0 : _c.attributes; - return _this; - } - ClientAppleSignInAuthenticationContext.prototype.toObject = function () { - return { - authID: this.authID, - agreements: this.agreements.toObjectIfNotEmpty(), - attributes: this.attributes, - }; - }; - return ClientAppleSignInAuthenticationContext; -}(BaseModel_1.BaseModel)); -exports.ClientAppleSignInAuthenticationContext = ClientAppleSignInAuthenticationContext; diff --git a/lib/classes/models/Client/ClientAuthContext.d.ts b/lib/classes/models/Client/ClientAuthContext.d.ts deleted file mode 100644 index d8b56a9..0000000 --- a/lib/classes/models/Client/ClientAuthContext.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BaseModel } from '../BaseModel'; -import { IClientAgreements, ClientAgreements } from './ClientAgreements'; -interface IClientAuthContext { - authID?: string; - agreements?: IClientAgreements; - attributes?: object; -} -declare class ClientAuthContext extends BaseModel { - authID?: string; - agreements: ClientAgreements; - attributes?: object; - constructor(modelObject?: IClientAuthContext); - toObject(): object; -} -export { IClientAuthContext, ClientAuthContext }; diff --git a/lib/classes/models/Client/ClientAuthContext.js b/lib/classes/models/Client/ClientAuthContext.js deleted file mode 100644 index a9442a8..0000000 --- a/lib/classes/models/Client/ClientAuthContext.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var ClientAgreements_1 = require("./ClientAgreements"); -var ClientAuthContext = /** @class */ (function (_super) { - __extends(ClientAuthContext, _super); - function ClientAuthContext(modelObject) { - var _a, _b, _c; - var _this = _super.call(this) || this; - _this.authID = (_a = modelObject) === null || _a === void 0 ? void 0 : _a.authID; - _this.agreements = new ClientAgreements_1.ClientAgreements((_b = modelObject) === null || _b === void 0 ? void 0 : _b.agreements); - _this.attributes = (_c = modelObject) === null || _c === void 0 ? void 0 : _c.attributes; - return _this; - } - ClientAuthContext.prototype.toObject = function () { - return { - authID: this.authID, - agreements: this.agreements.toObjectIfNotEmpty(), - attributes: this.attributes, - }; - }; - return ClientAuthContext; -}(BaseModel_1.BaseModel)); -exports.ClientAuthContext = ClientAuthContext; diff --git a/lib/classes/models/Client/ClientConditionalAuthResult.d.ts b/lib/classes/models/Client/ClientConditionalAuthResult.d.ts deleted file mode 100644 index 7f20076..0000000 --- a/lib/classes/models/Client/ClientConditionalAuthResult.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BaseModel } from './../BaseModel'; -import { ClientConditionalAuthStatus } from './ClientConditionalAuthStatus'; -interface IClientConditionalAuthResult { - status: ClientConditionalAuthStatus; - conditions: Array; -} -declare class ClientConditionalAuthResult extends BaseModel { - status: ClientConditionalAuthStatus; - conditions: Array; - constructor(model: IClientConditionalAuthResult); -} -export { IClientConditionalAuthResult, ClientConditionalAuthResult }; diff --git a/lib/classes/models/Client/ClientConditionalAuthResult.js b/lib/classes/models/Client/ClientConditionalAuthResult.js deleted file mode 100644 index 95a4fa4..0000000 --- a/lib/classes/models/Client/ClientConditionalAuthResult.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("./../BaseModel"); -var ClientConditionalAuthResult = /** @class */ (function (_super) { - __extends(ClientConditionalAuthResult, _super); - function ClientConditionalAuthResult(model) { - var _this = _super.call(this, model) || this; - _this.status = model.status; - _this.conditions = model.conditions; - return _this; - } - return ClientConditionalAuthResult; -}(BaseModel_1.BaseModel)); -exports.ClientConditionalAuthResult = ClientConditionalAuthResult; diff --git a/lib/classes/models/Client/ClientConditionalAuthStatus.d.ts b/lib/classes/models/Client/ClientConditionalAuthStatus.d.ts deleted file mode 100644 index f0ddb93..0000000 --- a/lib/classes/models/Client/ClientConditionalAuthStatus.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare enum ClientConditionalAuthStatus { - Success = "SUCCESS", - Unauthorized = "UNAUTHORIZED", - ActivationRequired = "ACTIVATION_REQUIRED", - RegistrationRequired = "REGISTRATION_REQUIRED", - ApprovalRequired = "APPROVAL_REQUIRED", - TermsAcceptanceRequired = "TERMS_ACCEPTANCE_REQUIRED", - MfaRequired = "MFA_REQUIRED" -} -export { ClientConditionalAuthStatus }; diff --git a/lib/classes/models/Client/ClientConditionalAuthStatus.js b/lib/classes/models/Client/ClientConditionalAuthStatus.js deleted file mode 100644 index 62235ca..0000000 --- a/lib/classes/models/Client/ClientConditionalAuthStatus.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var ClientConditionalAuthStatus; -(function (ClientConditionalAuthStatus) { - ClientConditionalAuthStatus["Success"] = "SUCCESS"; - ClientConditionalAuthStatus["Unauthorized"] = "UNAUTHORIZED"; - ClientConditionalAuthStatus["ActivationRequired"] = "ACTIVATION_REQUIRED"; - ClientConditionalAuthStatus["RegistrationRequired"] = "REGISTRATION_REQUIRED"; - ClientConditionalAuthStatus["ApprovalRequired"] = "APPROVAL_REQUIRED"; - ClientConditionalAuthStatus["TermsAcceptanceRequired"] = "TERMS_ACCEPTANCE_REQUIRED"; - ClientConditionalAuthStatus["MfaRequired"] = "MFA_REQUIRED"; -})(ClientConditionalAuthStatus || (ClientConditionalAuthStatus = {})); -exports.ClientConditionalAuthStatus = ClientConditionalAuthStatus; diff --git a/lib/classes/models/Client/ClientFacebookAuthenticationContext.d.ts b/lib/classes/models/Client/ClientFacebookAuthenticationContext.d.ts deleted file mode 100644 index 79e5aa0..0000000 --- a/lib/classes/models/Client/ClientFacebookAuthenticationContext.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BaseModel } from './../BaseModel'; -import { IClientAgreements, ClientAgreements } from './ClientAgreements'; -interface IClientFacebookAuthenticationContext { - authID?: string; - agreements?: IClientAgreements; - attributes?: object; -} -declare class ClientFacebookAuthenticationContext extends BaseModel { - authID?: string; - agreements: ClientAgreements; - attributes?: object; - constructor(modelObject?: IClientFacebookAuthenticationContext); - toObject(): object; -} -export { IClientFacebookAuthenticationContext, ClientFacebookAuthenticationContext }; diff --git a/lib/classes/models/Client/ClientFacebookAuthenticationContext.js b/lib/classes/models/Client/ClientFacebookAuthenticationContext.js deleted file mode 100644 index dce082d..0000000 --- a/lib/classes/models/Client/ClientFacebookAuthenticationContext.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("./../BaseModel"); -var ClientAgreements_1 = require("./ClientAgreements"); -var ClientFacebookAuthenticationContext = /** @class */ (function (_super) { - __extends(ClientFacebookAuthenticationContext, _super); - function ClientFacebookAuthenticationContext(modelObject) { - var _a, _b, _c; - var _this = _super.call(this) || this; - _this.authID = (_a = modelObject) === null || _a === void 0 ? void 0 : _a.authID; - _this.agreements = new ClientAgreements_1.ClientAgreements((_b = modelObject) === null || _b === void 0 ? void 0 : _b.agreements); - _this.attributes = (_c = modelObject) === null || _c === void 0 ? void 0 : _c.attributes; - return _this; - } - ClientFacebookAuthenticationContext.prototype.toObject = function () { - return { - authID: this.authID, - agreements: this.agreements.toObjectIfNotEmpty(), - attributes: this.attributes, - }; - }; - return ClientFacebookAuthenticationContext; -}(BaseModel_1.BaseModel)); -exports.ClientFacebookAuthenticationContext = ClientFacebookAuthenticationContext; diff --git a/lib/classes/models/Client/ClientIdentityProvider.d.ts b/lib/classes/models/Client/ClientIdentityProvider.d.ts deleted file mode 100644 index 6d79819..0000000 --- a/lib/classes/models/Client/ClientIdentityProvider.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare enum ClientIdentityProvider { - Facebook = "FACEBOOK", - Google = "GOOGLE", - Oauth = "OAUTH", - Synerise = "SYNERISE", - Unknown = "UNKNOWN" -} -declare function ClientIdentityProviderFromString(string: string): ClientIdentityProvider; -declare function ClientIdentityProviderToString(clientIdentityProvider: ClientIdentityProvider): string; -export { ClientIdentityProvider, ClientIdentityProviderFromString, ClientIdentityProviderToString }; diff --git a/lib/classes/models/Client/ClientIdentityProvider.js b/lib/classes/models/Client/ClientIdentityProvider.js deleted file mode 100644 index b1d8572..0000000 --- a/lib/classes/models/Client/ClientIdentityProvider.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var ClientIdentityProvider; -(function (ClientIdentityProvider) { - ClientIdentityProvider["Facebook"] = "FACEBOOK"; - ClientIdentityProvider["Google"] = "GOOGLE"; - ClientIdentityProvider["Oauth"] = "OAUTH"; - ClientIdentityProvider["Synerise"] = "SYNERISE"; - ClientIdentityProvider["Unknown"] = "UNKNOWN"; -})(ClientIdentityProvider || (ClientIdentityProvider = {})); -exports.ClientIdentityProvider = ClientIdentityProvider; -function ClientIdentityProviderFromString(string) { - if (string === ClientIdentityProvider.Facebook) { - return ClientIdentityProvider.Facebook; - } - else if (string === ClientIdentityProvider.Google) { - return ClientIdentityProvider.Google; - } - else if (string === ClientIdentityProvider.Oauth) { - return ClientIdentityProvider.Oauth; - } - else if (string === ClientIdentityProvider.Synerise) { - return ClientIdentityProvider.Synerise; - } - return ClientIdentityProvider.Unknown; -} -exports.ClientIdentityProviderFromString = ClientIdentityProviderFromString; -function ClientIdentityProviderToString(clientIdentityProvider) { - return clientIdentityProvider; -} -exports.ClientIdentityProviderToString = ClientIdentityProviderToString; diff --git a/lib/classes/models/Client/ClientOAuthAuthenticationContext.d.ts b/lib/classes/models/Client/ClientOAuthAuthenticationContext.d.ts deleted file mode 100644 index 64f7efe..0000000 --- a/lib/classes/models/Client/ClientOAuthAuthenticationContext.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BaseModel } from './../BaseModel'; -import { IClientAgreements, ClientAgreements } from './ClientAgreements'; -interface IClientOAuthAuthenticationContext { - authID?: string; - agreements?: IClientAgreements; - attributes?: object; -} -declare class ClientOAuthAuthenticationContext extends BaseModel { - authID?: string; - agreements: ClientAgreements; - attributes?: object; - constructor(modelObject?: IClientOAuthAuthenticationContext); - toObject(): object; -} -export { IClientOAuthAuthenticationContext, ClientOAuthAuthenticationContext }; diff --git a/lib/classes/models/Client/ClientOAuthAuthenticationContext.js b/lib/classes/models/Client/ClientOAuthAuthenticationContext.js deleted file mode 100644 index d91f36b..0000000 --- a/lib/classes/models/Client/ClientOAuthAuthenticationContext.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("./../BaseModel"); -var ClientAgreements_1 = require("./ClientAgreements"); -var ClientOAuthAuthenticationContext = /** @class */ (function (_super) { - __extends(ClientOAuthAuthenticationContext, _super); - function ClientOAuthAuthenticationContext(modelObject) { - var _a, _b, _c; - var _this = _super.call(this) || this; - _this.authID = (_a = modelObject) === null || _a === void 0 ? void 0 : _a.authID; - _this.agreements = new ClientAgreements_1.ClientAgreements((_b = modelObject) === null || _b === void 0 ? void 0 : _b.agreements); - _this.attributes = (_c = modelObject) === null || _c === void 0 ? void 0 : _c.attributes; - return _this; - } - ClientOAuthAuthenticationContext.prototype.toObject = function () { - return { - authID: this.authID, - agreements: this.agreements.toObjectIfNotEmpty(), - attributes: this.attributes - }; - }; - return ClientOAuthAuthenticationContext; -}(BaseModel_1.BaseModel)); -exports.ClientOAuthAuthenticationContext = ClientOAuthAuthenticationContext; diff --git a/lib/classes/models/Client/ClientSessionEndReason.d.ts b/lib/classes/models/Client/ClientSessionEndReason.d.ts deleted file mode 100644 index 16f88e9..0000000 --- a/lib/classes/models/Client/ClientSessionEndReason.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare enum ClientSessionEndReason { - NotSpecified = "NOT_SPECIFIED", - SessionExpiration = "SESSION_EXPIRATION", - SecurityException = "SECURITY_EXCEPTION", - UserSignOut = "USER_SIGN_OUT", - SystemSignOut = "SYSTEM_SIGN_OUT", - SessionDestroyed = "SESSION_DESTROYED", - ClientRejected = "CLIENT_REJECTED", - UserAccountDeleted = "USER_ACCOUNT_DELETED" -} -declare function ClientSessionEndReasonFromString(string: string): ClientSessionEndReason; -declare function ClientSessionEndReasonToString(reason: ClientSessionEndReason): string; -export { ClientSessionEndReason, ClientSessionEndReasonFromString, ClientSessionEndReasonToString }; diff --git a/lib/classes/models/Client/ClientSessionEndReason.js b/lib/classes/models/Client/ClientSessionEndReason.js deleted file mode 100644 index bfc98f2..0000000 --- a/lib/classes/models/Client/ClientSessionEndReason.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var ClientSessionEndReason; -(function (ClientSessionEndReason) { - ClientSessionEndReason["NotSpecified"] = "NOT_SPECIFIED"; - ClientSessionEndReason["SessionExpiration"] = "SESSION_EXPIRATION"; - ClientSessionEndReason["SecurityException"] = "SECURITY_EXCEPTION"; - ClientSessionEndReason["UserSignOut"] = "USER_SIGN_OUT"; - ClientSessionEndReason["SystemSignOut"] = "SYSTEM_SIGN_OUT"; - ClientSessionEndReason["SessionDestroyed"] = "SESSION_DESTROYED"; - ClientSessionEndReason["ClientRejected"] = "CLIENT_REJECTED"; - ClientSessionEndReason["UserAccountDeleted"] = "USER_ACCOUNT_DELETED"; -})(ClientSessionEndReason || (ClientSessionEndReason = {})); -exports.ClientSessionEndReason = ClientSessionEndReason; -function ClientSessionEndReasonFromString(string) { - if (string === ClientSessionEndReason.SessionExpiration) { - return ClientSessionEndReason.SessionExpiration; - } - else if (string === ClientSessionEndReason.SecurityException) { - return ClientSessionEndReason.SecurityException; - } - else if (string === ClientSessionEndReason.UserSignOut) { - return ClientSessionEndReason.UserSignOut; - } - else if (string === ClientSessionEndReason.SystemSignOut) { - return ClientSessionEndReason.SystemSignOut; - } - else if (string === ClientSessionEndReason.SessionDestroyed) { - return ClientSessionEndReason.SessionDestroyed; - } - else if (string === ClientSessionEndReason.ClientRejected) { - return ClientSessionEndReason.ClientRejected; - } - else if (string === ClientSessionEndReason.UserAccountDeleted) { - return ClientSessionEndReason.UserAccountDeleted; - } - return ClientSessionEndReason.NotSpecified; -} -exports.ClientSessionEndReasonFromString = ClientSessionEndReasonFromString; -function ClientSessionEndReasonToString(reason) { - return reason; -} -exports.ClientSessionEndReasonToString = ClientSessionEndReasonToString; diff --git a/lib/classes/models/Client/ClientSex.d.ts b/lib/classes/models/Client/ClientSex.d.ts deleted file mode 100644 index 840e656..0000000 --- a/lib/classes/models/Client/ClientSex.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare enum ClientSex { - NotSpecified = "NOT_SPECIFIED", - Male = "MALE", - Female = "FEMALE", - Other = "OTHER" -} -declare function ClientSexFromString(string: string): ClientSex; -declare function ClientSexToString(clientSex: ClientSex): string; -export { ClientSex, ClientSexFromString, ClientSexToString }; diff --git a/lib/classes/models/Client/ClientSex.js b/lib/classes/models/Client/ClientSex.js deleted file mode 100644 index c8eccd4..0000000 --- a/lib/classes/models/Client/ClientSex.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var ClientSex; -(function (ClientSex) { - ClientSex["NotSpecified"] = "NOT_SPECIFIED"; - ClientSex["Male"] = "MALE"; - ClientSex["Female"] = "FEMALE"; - ClientSex["Other"] = "OTHER"; -})(ClientSex || (ClientSex = {})); -exports.ClientSex = ClientSex; -function ClientSexFromString(string) { - if (string === ClientSex.Male) { - return ClientSex.Male; - } - else if (string === ClientSex.Female) { - return ClientSex.Female; - } - else if (string === ClientSex.Other) { - return ClientSex.Other; - } - return ClientSex.NotSpecified; -} -exports.ClientSexFromString = ClientSexFromString; -function ClientSexToString(clientSex) { - return clientSex; -} -exports.ClientSexToString = ClientSexToString; diff --git a/lib/classes/models/Content/Recommendation.d.ts b/lib/classes/models/Content/Recommendation.d.ts deleted file mode 100644 index bcb3bb2..0000000 --- a/lib/classes/models/Content/Recommendation.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BaseModel } from '../BaseModel'; -interface IRecommendation { - itemID: string; - attributes: Record; -} -declare class Recommendation extends BaseModel { - itemID: string; - attributes: Record; - constructor(modelObject: IRecommendation); -} -export { IRecommendation, Recommendation }; diff --git a/lib/classes/models/Content/Recommendation.js b/lib/classes/models/Content/Recommendation.js deleted file mode 100644 index 1b4c606..0000000 --- a/lib/classes/models/Content/Recommendation.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var Recommendation = /** @class */ (function (_super) { - __extends(Recommendation, _super); - function Recommendation(modelObject) { - var _this = _super.call(this, modelObject) || this; - _this.itemID = modelObject.itemID; - _this.attributes = modelObject.attributes; - return _this; - } - return Recommendation; -}(BaseModel_1.BaseModel)); -exports.Recommendation = Recommendation; diff --git a/lib/classes/models/Content/RecommendationOptions.d.ts b/lib/classes/models/Content/RecommendationOptions.d.ts deleted file mode 100644 index ce8308c..0000000 --- a/lib/classes/models/Content/RecommendationOptions.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare class RecommendationOptions { - slug: string | undefined; - productID: string | undefined; - toObject(): object; -} -export { RecommendationOptions }; diff --git a/lib/classes/models/Content/RecommendationOptions.js b/lib/classes/models/Content/RecommendationOptions.js deleted file mode 100644 index 1c8cab7..0000000 --- a/lib/classes/models/Content/RecommendationOptions.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var RecommendationOptions = /** @class */ (function () { - function RecommendationOptions() { - } - RecommendationOptions.prototype.toObject = function () { - return { - slug: this.slug, - productID: this.productID, - }; - }; - return RecommendationOptions; -}()); -exports.RecommendationOptions = RecommendationOptions; diff --git a/lib/classes/models/Content/RecommendationResponse.d.ts b/lib/classes/models/Content/RecommendationResponse.d.ts deleted file mode 100644 index f45ab3d..0000000 --- a/lib/classes/models/Content/RecommendationResponse.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { BaseModel } from '../BaseModel'; -import { IRecommendation } from './Recommendation'; -interface IRecommendationResponse { - campaignHash: string; - campaignId: string; - schema: string; - slug: string; - uuid: string; - items: Array; -} -declare class RecommendationResponse extends BaseModel { - campaignHash: string; - campaignId: string; - schema: string; - slug: string; - uuid: string; - items: Array; - constructor(modelObject: IRecommendationResponse); -} -export { IRecommendationResponse, RecommendationResponse }; diff --git a/lib/classes/models/Content/RecommendationResponse.js b/lib/classes/models/Content/RecommendationResponse.js deleted file mode 100644 index 098577f..0000000 --- a/lib/classes/models/Content/RecommendationResponse.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var Recommendation_1 = require("./Recommendation"); -var RecommendationResponse = /** @class */ (function (_super) { - __extends(RecommendationResponse, _super); - function RecommendationResponse(modelObject) { - var _this = _super.call(this, modelObject) || this; - _this.campaignHash = modelObject.campaignHash; - _this.campaignId = modelObject.campaignId; - _this.schema = modelObject.schema; - _this.slug = modelObject.slug; - _this.uuid = modelObject.uuid; - _this.items = new Array(); - if (modelObject.items instanceof Array) { - var i = 0; - for (i = 0; i < modelObject.items.length; i++) { - var recommendation = new Recommendation_1.Recommendation(modelObject.items[i]); - _this.items.push(recommendation); - } - } - return _this; - } - return RecommendationResponse; -}(BaseModel_1.BaseModel)); -exports.RecommendationResponse = RecommendationResponse; diff --git a/lib/classes/models/Content/ScreenViewAudience.d.ts b/lib/classes/models/Content/ScreenViewAudience.d.ts deleted file mode 100644 index e74cf44..0000000 --- a/lib/classes/models/Content/ScreenViewAudience.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BaseModel } from '../BaseModel'; -interface IScreenViewAudience { - IDs?: Array; - query?: string; -} -declare class ScreenViewAudience extends BaseModel { - IDs?: Array; - query?: string; - constructor(modelObject: IScreenViewAudience); -} -export { IScreenViewAudience, ScreenViewAudience }; diff --git a/lib/classes/models/Content/ScreenViewAudience.js b/lib/classes/models/Content/ScreenViewAudience.js deleted file mode 100644 index cd7eb55..0000000 --- a/lib/classes/models/Content/ScreenViewAudience.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var ScreenViewAudience = /** @class */ (function (_super) { - __extends(ScreenViewAudience, _super); - function ScreenViewAudience(modelObject) { - var _this = _super.call(this, modelObject) || this; - if (modelObject.IDs !== undefined) { - _this.IDs = modelObject.IDs; - } - if (modelObject.query !== undefined) { - _this.query = modelObject.query; - } - return _this; - } - return ScreenViewAudience; -}(BaseModel_1.BaseModel)); -exports.ScreenViewAudience = ScreenViewAudience; diff --git a/lib/classes/models/Content/ScreenViewResponse.d.ts b/lib/classes/models/Content/ScreenViewResponse.d.ts deleted file mode 100644 index 475ca11..0000000 --- a/lib/classes/models/Content/ScreenViewResponse.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { BaseModel } from '../BaseModel'; -import { IScreenViewAudience, ScreenViewAudience } from './ScreenViewAudience'; -interface IScreenViewResponse { - audience: IScreenViewAudience; - identifier: string; - hashString: string; - path: string; - name: string; - priority: number; - descriptionText?: string; - data: any; - version: string; - parentVersion?: string; - createdAt: number; - updatedAt: number; - deletedAt?: number; -} -declare class ScreenViewResponse extends BaseModel { - audience: ScreenViewAudience; - identifier: string; - hashString: string; - path: string; - name: string; - priority: number; - descriptionText?: string; - data: any; - version: string; - parentVersion?: string; - createdAt: Date; - updatedAt: Date; - deletedAt?: Date; - constructor(modelObject: IScreenViewResponse); -} -export { IScreenViewResponse, ScreenViewResponse }; diff --git a/lib/classes/models/Content/ScreenViewResponse.js b/lib/classes/models/Content/ScreenViewResponse.js deleted file mode 100644 index bb6bf22..0000000 --- a/lib/classes/models/Content/ScreenViewResponse.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var ScreenViewAudience_1 = require("./ScreenViewAudience"); -var ScreenViewResponse = /** @class */ (function (_super) { - __extends(ScreenViewResponse, _super); - function ScreenViewResponse(modelObject) { - var _this = _super.call(this, modelObject) || this; - _this.audience = new ScreenViewAudience_1.ScreenViewAudience(modelObject.audience); - _this.identifier = modelObject.identifier; - _this.hashString = modelObject.hashString; - _this.path = modelObject.path; - _this.name = modelObject.name; - _this.priority = modelObject.priority; - if (modelObject.descriptionText !== undefined) { - _this.descriptionText = modelObject.descriptionText; - } - _this.data = modelObject.data; - _this.version = modelObject.version; - if (modelObject.parentVersion !== undefined) { - _this.parentVersion = modelObject.parentVersion; - } - _this.createdAt = new Date(modelObject.createdAt * 1000); - _this.updatedAt = new Date(modelObject.updatedAt * 1000); - if (modelObject.deletedAt !== undefined) { - _this.deletedAt = new Date(modelObject.deletedAt * 1000); - } - return _this; - } - return ScreenViewResponse; -}(BaseModel_1.BaseModel)); -exports.ScreenViewResponse = ScreenViewResponse; diff --git a/lib/classes/models/Promotions/Promotion.d.ts b/lib/classes/models/Promotions/Promotion.d.ts deleted file mode 100644 index 9cbf838..0000000 --- a/lib/classes/models/Promotions/Promotion.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { BaseModel } from '../BaseModel'; -import { PromotionStatus } from './../Promotions/PromotionStatus'; -import { PromotionType } from './../Promotions/PromotionType'; -import { IPromotionDetails, PromotionDetails } from './PromotionDetails'; -import { PromotionDiscountType } from './../Promotions/PromotionDiscountType'; -import { PromotionDiscountMode } from './../Promotions/PromotionDiscountMode'; -import { IPromotionDiscountModeDetails, PromotionDiscountModeDetails } from './PromotionDiscountModeDetails'; -import { PromotionItemScope } from './../Promotions/PromotionItemScope'; -declare const PromotionSortingKey: { - ExpireAt: string; - CreatedAt: string; - LastingAt: string; - RequireRedeemPoints: string; - UpdatedAt: string; - Type: string; - Priority: string; -}; -interface IPromotion { - uuid: string; - code: string; - status: string; - type: string; - details?: IPromotionDetails; - redeemLimitPerClient?: number; - redeemQuantityPerActivation?: number; - currentRedeemedQuantity: number; - currentRedeemLimit: number; - activationCounter: number; - possibleRedeems: number; - discountType: string; - discountValue: number; - discountMode: string; - discountModeDetails?: IPromotionDiscountModeDetails; - requireRedeemedPoints: number; - price: number; - priority: number; - itemScope: string; - minBasketValue?: number; - maxBasketValue?: number; - name?: string; - headline?: string; - descriptionText?: string; - images?: Array; - assignedAt?: number; - startAt?: number; - expireAt?: number; - lastingAt: number; - lastingTime?: number; - displayFrom?: string; - displayTo?: string; - params?: object; - catalogIndexItems?: Array; - tags?: Array; -} -declare class Promotion extends BaseModel { - uuid: string; - code: string; - status: PromotionStatus; - type: PromotionType; - details?: PromotionDetails; - redeemLimitPerClient?: number; - redeemQuantityPerActivation?: number; - currentRedeemedQuantity: number; - currentRedeemLimit: number; - activationCounter: number; - possibleRedeems: number; - discountType: PromotionDiscountType; - discountValue: number; - discountMode: PromotionDiscountMode; - discountModeDetails?: PromotionDiscountModeDetails; - requireRedeemedPoints: number; - price: number; - priority: number; - itemScope: PromotionItemScope; - minBasketValue?: number; - maxBasketValue?: number; - name?: string; - headline?: string; - descriptionText?: string; - images?: Array; - assignedAt?: Date; - startAt?: Date; - expireAt?: Date; - lastingAt?: Date; - lastingTime?: number; - displayFrom?: string; - displayTo?: string; - params?: object; - catalogIndexItems?: Array; - tags?: Array; - constructor(modelObject: IPromotion); -} -export { IPromotion, Promotion, PromotionSortingKey }; diff --git a/lib/classes/models/Promotions/Promotion.js b/lib/classes/models/Promotions/Promotion.js deleted file mode 100644 index 6c6dfc8..0000000 --- a/lib/classes/models/Promotions/Promotion.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var PromotionStatus_1 = require("./../Promotions/PromotionStatus"); -var PromotionType_1 = require("./../Promotions/PromotionType"); -var PromotionDetails_1 = require("./PromotionDetails"); -var PromotionDiscountType_1 = require("./../Promotions/PromotionDiscountType"); -var PromotionDiscountMode_1 = require("./../Promotions/PromotionDiscountMode"); -var PromotionDiscountModeDetails_1 = require("./PromotionDiscountModeDetails"); -var PromotionItemScope_1 = require("./../Promotions/PromotionItemScope"); -var PromotionSortingKey = { - ExpireAt: 'expireAt', - CreatedAt: 'createdAt', - LastingAt: 'lastingAt', - RequireRedeemPoints: 'requireRedeemedPoints', - UpdatedAt: 'updatedAt', - Type: 'type', - Priority: 'priority', -}; -exports.PromotionSortingKey = PromotionSortingKey; -var Promotion = /** @class */ (function (_super) { - __extends(Promotion, _super); - function Promotion(modelObject) { - var _this = _super.call(this, modelObject) || this; - _this.uuid = modelObject.uuid; - _this.code = modelObject.code; - _this.status = PromotionStatus_1.PromotionStatusFromString(modelObject.status); - _this.type = PromotionType_1.PromotionTypeFromString(modelObject.type); - if (modelObject.details !== undefined && modelObject.details != null) { - _this.details = new PromotionDetails_1.PromotionDetails(modelObject.details); - } - _this.redeemLimitPerClient = modelObject.redeemLimitPerClient; - _this.redeemQuantityPerActivation = modelObject.redeemQuantityPerActivation; - _this.currentRedeemedQuantity = modelObject.currentRedeemedQuantity; - _this.currentRedeemLimit = modelObject.currentRedeemLimit; - _this.activationCounter = modelObject.activationCounter; - _this.possibleRedeems = modelObject.possibleRedeems; - _this.discountType = PromotionDiscountType_1.PromotionDiscountTypeFromString(modelObject.discountType); - _this.discountValue = modelObject.discountValue; - _this.discountMode = PromotionDiscountMode_1.PromotionDiscountModeFromString(modelObject.discountMode); - if (modelObject.discountModeDetails !== undefined && modelObject.discountModeDetails != null) { - _this.discountModeDetails = new PromotionDiscountModeDetails_1.PromotionDiscountModeDetails(modelObject.discountModeDetails); - } - _this.requireRedeemedPoints = modelObject.requireRedeemedPoints; - _this.price = modelObject.price; - _this.priority = modelObject.priority; - _this.itemScope = PromotionItemScope_1.PromotionItemScopeFromString(modelObject.itemScope); - _this.minBasketValue = modelObject.minBasketValue; - _this.maxBasketValue = modelObject.maxBasketValue; - _this.name = modelObject.name; - _this.headline = modelObject.headline; - _this.descriptionText = modelObject.descriptionText; - _this.images = modelObject.images; - if (modelObject.startAt !== undefined && modelObject.startAt != null) { - _this.startAt = new Date(modelObject.startAt * 1000); - } - if (modelObject.expireAt !== undefined && modelObject.expireAt != null) { - _this.expireAt = new Date(modelObject.expireAt * 1000); - } - if (modelObject.lastingAt !== undefined && modelObject.lastingAt != null) { - _this.lastingAt = new Date(modelObject.lastingAt * 1000); - } - if (modelObject.assignedAt !== undefined && modelObject.assignedAt != null) { - _this.assignedAt = new Date(modelObject.assignedAt * 1000); - } - _this.lastingTime = modelObject.lastingTime; - _this.displayFrom = modelObject.displayFrom; - _this.displayTo = modelObject.displayTo; - _this.params = modelObject.params; - _this.catalogIndexItems = modelObject.catalogIndexItems; - _this.tags = modelObject.tags; - return _this; - } - return Promotion; -}(BaseModel_1.BaseModel)); -exports.Promotion = Promotion; diff --git a/lib/classes/models/Promotions/PromotionDetails.d.ts b/lib/classes/models/Promotions/PromotionDetails.d.ts deleted file mode 100644 index b4a757e..0000000 --- a/lib/classes/models/Promotions/PromotionDetails.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseModel } from '../BaseModel'; -import { IPromotionDiscountTypeDetails, PromotionDiscountTypeDetails } from './PromotionDiscountTypeDetails'; -interface IPromotionDetails { - discountType?: IPromotionDiscountTypeDetails; -} -declare class PromotionDetails extends BaseModel { - discountType?: PromotionDiscountTypeDetails; - constructor(model: IPromotionDetails); -} -export { IPromotionDetails, PromotionDetails }; diff --git a/lib/classes/models/Promotions/PromotionDetails.js b/lib/classes/models/Promotions/PromotionDetails.js deleted file mode 100644 index f9f2c9c..0000000 --- a/lib/classes/models/Promotions/PromotionDetails.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var PromotionDiscountTypeDetails_1 = require("./PromotionDiscountTypeDetails"); -var PromotionDetails = /** @class */ (function (_super) { - __extends(PromotionDetails, _super); - function PromotionDetails(model) { - var _this = _super.call(this, model) || this; - if (model.discountType !== undefined) { - alert(typeof (model.discountType)); - _this.discountType = new PromotionDiscountTypeDetails_1.PromotionDiscountTypeDetails(model.discountType); - } - return _this; - } - return PromotionDetails; -}(BaseModel_1.BaseModel)); -exports.PromotionDetails = PromotionDetails; diff --git a/lib/classes/models/Promotions/PromotionDiscountMode.d.ts b/lib/classes/models/Promotions/PromotionDiscountMode.d.ts deleted file mode 100644 index b77a3cd..0000000 --- a/lib/classes/models/Promotions/PromotionDiscountMode.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare enum PromotionDiscountMode { - Static = "STATIC", - Step = "STEP" -} -declare function PromotionDiscountModeFromString(string: string): PromotionDiscountMode; -declare function PromotionDiscountModeToString(promotionItemScope: PromotionDiscountMode): string; -export { PromotionDiscountMode, PromotionDiscountModeToString, PromotionDiscountModeFromString }; diff --git a/lib/classes/models/Promotions/PromotionDiscountMode.js b/lib/classes/models/Promotions/PromotionDiscountMode.js deleted file mode 100644 index 7523b02..0000000 --- a/lib/classes/models/Promotions/PromotionDiscountMode.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var PromotionDiscountMode; -(function (PromotionDiscountMode) { - PromotionDiscountMode["Static"] = "STATIC"; - PromotionDiscountMode["Step"] = "STEP"; -})(PromotionDiscountMode || (PromotionDiscountMode = {})); -exports.PromotionDiscountMode = PromotionDiscountMode; -function PromotionDiscountModeFromString(string) { - if (string === PromotionDiscountMode.Static) { - return PromotionDiscountMode.Static; - } - else if (string === PromotionDiscountMode.Step) { - return PromotionDiscountMode.Step; - } - return PromotionDiscountMode.Static; -} -exports.PromotionDiscountModeFromString = PromotionDiscountModeFromString; -function PromotionDiscountModeToString(promotionItemScope) { - return promotionItemScope; -} -exports.PromotionDiscountModeToString = PromotionDiscountModeToString; diff --git a/lib/classes/models/Promotions/PromotionDiscountModeDetails.d.ts b/lib/classes/models/Promotions/PromotionDiscountModeDetails.d.ts deleted file mode 100644 index 2c81756..0000000 --- a/lib/classes/models/Promotions/PromotionDiscountModeDetails.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { BaseModel } from '../BaseModel'; -import { IPromotionDiscountStep, PromotionDiscountStep } from './PromotionDiscountStep'; -import { PromotionDiscountUsageTrigger } from './PromotionDiscountUsageTrigger'; -interface IPromotionDiscountModeDetails { - discountSteps: Array; - discountUsageTrigger: string; -} -declare class PromotionDiscountModeDetails extends BaseModel { - discountSteps: Array; - discountUsageTrigger: PromotionDiscountUsageTrigger; - constructor(model: IPromotionDiscountModeDetails); -} -export { IPromotionDiscountModeDetails, PromotionDiscountModeDetails }; diff --git a/lib/classes/models/Promotions/PromotionDiscountModeDetails.js b/lib/classes/models/Promotions/PromotionDiscountModeDetails.js deleted file mode 100644 index 12328a5..0000000 --- a/lib/classes/models/Promotions/PromotionDiscountModeDetails.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var PromotionDiscountStep_1 = require("./PromotionDiscountStep"); -var PromotionDiscountUsageTrigger_1 = require("./PromotionDiscountUsageTrigger"); -var PromotionDiscountModeDetails = /** @class */ (function (_super) { - __extends(PromotionDiscountModeDetails, _super); - function PromotionDiscountModeDetails(model) { - var _this = _super.call(this, model) || this; - _this.discountUsageTrigger = PromotionDiscountUsageTrigger_1.PromotionDiscountUsageTriggerFromString(model.discountUsageTrigger); - _this.discountSteps = new Array(); - if (model.discountSteps instanceof Array) { - var i = 0; - for (i = 0; i < model.discountSteps.length; i++) { - var discountStep = new PromotionDiscountStep_1.PromotionDiscountStep(model.discountSteps[i]); - _this.discountSteps.push(discountStep); - } - } - return _this; - } - return PromotionDiscountModeDetails; -}(BaseModel_1.BaseModel)); -exports.PromotionDiscountModeDetails = PromotionDiscountModeDetails; diff --git a/lib/classes/models/Promotions/PromotionDiscountStep.d.ts b/lib/classes/models/Promotions/PromotionDiscountStep.d.ts deleted file mode 100644 index 40f78c0..0000000 --- a/lib/classes/models/Promotions/PromotionDiscountStep.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BaseModel } from '../BaseModel'; -interface IPromotionDiscountStep { - discountValue: number; - usageThreshold: number; -} -declare class PromotionDiscountStep extends BaseModel { - discountValue: number; - usageThreshold: number; - constructor(model: IPromotionDiscountStep); -} -export { IPromotionDiscountStep, PromotionDiscountStep }; diff --git a/lib/classes/models/Promotions/PromotionDiscountStep.js b/lib/classes/models/Promotions/PromotionDiscountStep.js deleted file mode 100644 index b6dc7da..0000000 --- a/lib/classes/models/Promotions/PromotionDiscountStep.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var PromotionDiscountStep = /** @class */ (function (_super) { - __extends(PromotionDiscountStep, _super); - function PromotionDiscountStep(model) { - var _this = _super.call(this, model) || this; - _this.discountValue = model.discountValue; - _this.usageThreshold = model.usageThreshold; - return _this; - } - return PromotionDiscountStep; -}(BaseModel_1.BaseModel)); -exports.PromotionDiscountStep = PromotionDiscountStep; diff --git a/lib/classes/models/Promotions/PromotionDiscountType.d.ts b/lib/classes/models/Promotions/PromotionDiscountType.d.ts deleted file mode 100644 index af225cd..0000000 --- a/lib/classes/models/Promotions/PromotionDiscountType.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -declare enum PromotionDiscountType { - None = "NONE", - Percent = "PERCENT", - Amount = "AMOUNT", - TwoForOne = "2_FOR_1", - Points = "POINTS", - Multibuy = "MULTIBUY", - ExactPrice = "EXACT_PRICE" -} -declare function PromotionDiscountTypeFromString(string: string): PromotionDiscountType; -declare function PromotionDiscountTypeToString(promotionDiscountType: PromotionDiscountType): string; -export { PromotionDiscountType, PromotionDiscountTypeFromString, PromotionDiscountTypeToString }; diff --git a/lib/classes/models/Promotions/PromotionDiscountType.js b/lib/classes/models/Promotions/PromotionDiscountType.js deleted file mode 100644 index d050021..0000000 --- a/lib/classes/models/Promotions/PromotionDiscountType.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var PromotionDiscountType; -(function (PromotionDiscountType) { - PromotionDiscountType["None"] = "NONE"; - PromotionDiscountType["Percent"] = "PERCENT"; - PromotionDiscountType["Amount"] = "AMOUNT"; - PromotionDiscountType["TwoForOne"] = "2_FOR_1"; - PromotionDiscountType["Points"] = "POINTS"; - PromotionDiscountType["Multibuy"] = "MULTIBUY"; - PromotionDiscountType["ExactPrice"] = "EXACT_PRICE"; -})(PromotionDiscountType || (PromotionDiscountType = {})); -exports.PromotionDiscountType = PromotionDiscountType; -function PromotionDiscountTypeFromString(string) { - if (string === PromotionDiscountType.Percent) { - return PromotionDiscountType.Percent; - } - else if (string === PromotionDiscountType.Amount) { - return PromotionDiscountType.Amount; - } - else if (string === PromotionDiscountType.TwoForOne) { - return PromotionDiscountType.TwoForOne; - } - else if (string === PromotionDiscountType.Points) { - return PromotionDiscountType.Points; - } - else if (string === PromotionDiscountType.Multibuy) { - return PromotionDiscountType.Multibuy; - } - else if (string === PromotionDiscountType.ExactPrice) { - return PromotionDiscountType.ExactPrice; - } - return PromotionDiscountType.None; -} -exports.PromotionDiscountTypeFromString = PromotionDiscountTypeFromString; -function PromotionDiscountTypeToString(promotionDiscountType) { - return promotionDiscountType; -} -exports.PromotionDiscountTypeToString = PromotionDiscountTypeToString; diff --git a/lib/classes/models/Promotions/PromotionDiscountTypeDetails.d.ts b/lib/classes/models/Promotions/PromotionDiscountTypeDetails.d.ts deleted file mode 100644 index 8c686e3..0000000 --- a/lib/classes/models/Promotions/PromotionDiscountTypeDetails.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BaseModel } from '../BaseModel'; -interface IPromotionDiscountTypeDetails { - name: string; - outerScope: boolean; - requiredItemsCount: number; - discountedItemsCount: number; -} -declare class PromotionDiscountTypeDetails extends BaseModel { - name: string; - outerScope: boolean; - requiredItemsCount: number; - discountedItemsCount: number; - constructor(model: IPromotionDiscountTypeDetails); -} -export { IPromotionDiscountTypeDetails, PromotionDiscountTypeDetails }; diff --git a/lib/classes/models/Promotions/PromotionDiscountTypeDetails.js b/lib/classes/models/Promotions/PromotionDiscountTypeDetails.js deleted file mode 100644 index 6e949ef..0000000 --- a/lib/classes/models/Promotions/PromotionDiscountTypeDetails.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var PromotionDiscountTypeDetails = /** @class */ (function (_super) { - __extends(PromotionDiscountTypeDetails, _super); - function PromotionDiscountTypeDetails(model) { - var _this = _super.call(this, model) || this; - _this.name = model.name; - _this.outerScope = model.outerScope; - _this.requiredItemsCount = model.requiredItemsCount; - _this.discountedItemsCount = model.discountedItemsCount; - return _this; - } - return PromotionDiscountTypeDetails; -}(BaseModel_1.BaseModel)); -exports.PromotionDiscountTypeDetails = PromotionDiscountTypeDetails; diff --git a/lib/classes/models/Promotions/PromotionDiscountUsageTrigger.d.ts b/lib/classes/models/Promotions/PromotionDiscountUsageTrigger.d.ts deleted file mode 100644 index 4589e3e..0000000 --- a/lib/classes/models/Promotions/PromotionDiscountUsageTrigger.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare enum PromotionDiscountUsageTrigger { - Transaction = "TRANSACTION", - Redeem = "REDEEM" -} -declare function PromotionDiscountUsageTriggerFromString(string: string): PromotionDiscountUsageTrigger; -declare function PromotionDiscountUsageTriggerToString(promotionItemScope: PromotionDiscountUsageTrigger): string; -export { PromotionDiscountUsageTrigger, PromotionDiscountUsageTriggerFromString, PromotionDiscountUsageTriggerToString }; diff --git a/lib/classes/models/Promotions/PromotionDiscountUsageTrigger.js b/lib/classes/models/Promotions/PromotionDiscountUsageTrigger.js deleted file mode 100644 index f8eaece..0000000 --- a/lib/classes/models/Promotions/PromotionDiscountUsageTrigger.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var PromotionDiscountUsageTrigger; -(function (PromotionDiscountUsageTrigger) { - PromotionDiscountUsageTrigger["Transaction"] = "TRANSACTION"; - PromotionDiscountUsageTrigger["Redeem"] = "REDEEM"; -})(PromotionDiscountUsageTrigger || (PromotionDiscountUsageTrigger = {})); -exports.PromotionDiscountUsageTrigger = PromotionDiscountUsageTrigger; -function PromotionDiscountUsageTriggerFromString(string) { - if (string === PromotionDiscountUsageTrigger.Transaction) { - return PromotionDiscountUsageTrigger.Transaction; - } - else if (string === PromotionDiscountUsageTrigger.Redeem) { - return PromotionDiscountUsageTrigger.Redeem; - } - return PromotionDiscountUsageTrigger.Transaction; -} -exports.PromotionDiscountUsageTriggerFromString = PromotionDiscountUsageTriggerFromString; -function PromotionDiscountUsageTriggerToString(promotionItemScope) { - return promotionItemScope; -} -exports.PromotionDiscountUsageTriggerToString = PromotionDiscountUsageTriggerToString; diff --git a/lib/classes/models/Promotions/PromotionIdentifier.d.ts b/lib/classes/models/Promotions/PromotionIdentifier.d.ts deleted file mode 100644 index 4e0084d..0000000 --- a/lib/classes/models/Promotions/PromotionIdentifier.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { PromotionIdentifierKey } from './PromotionIdentifierKey'; -declare class PromotionIdentifier { - key: string; - value: string; - constructor(key: PromotionIdentifierKey, value: string); -} -export { PromotionIdentifier }; diff --git a/lib/classes/models/Promotions/PromotionIdentifier.js b/lib/classes/models/Promotions/PromotionIdentifier.js deleted file mode 100644 index adb939d..0000000 --- a/lib/classes/models/Promotions/PromotionIdentifier.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var PromotionIdentifier = /** @class */ (function () { - function PromotionIdentifier(key, value) { - this.key = key; - this.value = value; - } - return PromotionIdentifier; -}()); -exports.PromotionIdentifier = PromotionIdentifier; diff --git a/lib/classes/models/Promotions/PromotionIdentifierKey.d.ts b/lib/classes/models/Promotions/PromotionIdentifierKey.d.ts deleted file mode 100644 index 9d45266..0000000 --- a/lib/classes/models/Promotions/PromotionIdentifierKey.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare enum PromotionIdentifierKey { - Uuid = "UUID", - Code = "CODE" -} -export { PromotionIdentifierKey }; diff --git a/lib/classes/models/Promotions/PromotionIdentifierKey.js b/lib/classes/models/Promotions/PromotionIdentifierKey.js deleted file mode 100644 index a591e15..0000000 --- a/lib/classes/models/Promotions/PromotionIdentifierKey.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var PromotionIdentifierKey; -(function (PromotionIdentifierKey) { - PromotionIdentifierKey["Uuid"] = "UUID"; - PromotionIdentifierKey["Code"] = "CODE"; -})(PromotionIdentifierKey || (PromotionIdentifierKey = {})); -exports.PromotionIdentifierKey = PromotionIdentifierKey; diff --git a/lib/classes/models/Promotions/PromotionItemScope.d.ts b/lib/classes/models/Promotions/PromotionItemScope.d.ts deleted file mode 100644 index 03f4f27..0000000 --- a/lib/classes/models/Promotions/PromotionItemScope.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare enum PromotionItemScope { - LineItem = "LINE_ITEM", - Basket = "BASKET" -} -declare function PromotionItemScopeFromString(string: string): PromotionItemScope; -declare function PromotionItemScopeToString(promotionItemScope: PromotionItemScope): string; -export { PromotionItemScope, PromotionItemScopeFromString, PromotionItemScopeToString }; diff --git a/lib/classes/models/Promotions/PromotionItemScope.js b/lib/classes/models/Promotions/PromotionItemScope.js deleted file mode 100644 index a29c4da..0000000 --- a/lib/classes/models/Promotions/PromotionItemScope.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var PromotionItemScope; -(function (PromotionItemScope) { - PromotionItemScope["LineItem"] = "LINE_ITEM"; - PromotionItemScope["Basket"] = "BASKET"; -})(PromotionItemScope || (PromotionItemScope = {})); -exports.PromotionItemScope = PromotionItemScope; -function PromotionItemScopeFromString(string) { - if (string === PromotionItemScope.LineItem) { - return PromotionItemScope.LineItem; - } - else if (string === PromotionItemScope.Basket) { - return PromotionItemScope.Basket; - } - return PromotionItemScope.LineItem; -} -exports.PromotionItemScopeFromString = PromotionItemScopeFromString; -function PromotionItemScopeToString(promotionItemScope) { - return promotionItemScope; -} -exports.PromotionItemScopeToString = PromotionItemScopeToString; diff --git a/lib/classes/models/Promotions/PromotionResponse.d.ts b/lib/classes/models/Promotions/PromotionResponse.d.ts deleted file mode 100644 index b71bc14..0000000 --- a/lib/classes/models/Promotions/PromotionResponse.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { BaseModel } from '../BaseModel'; -import { IPromotion, Promotion } from './../Promotions/Promotion'; -interface IPromotionResponse { - totalCount: number; - totalPages: number; - page: number; - limit: number; - code: number; - items: Array; -} -declare class PromotionResponse extends BaseModel { - totalCount: number; - totalPages: number; - page: number; - limit: number; - code: number; - items: Array; - constructor(modelObject: IPromotionResponse); -} -export { IPromotionResponse, PromotionResponse }; diff --git a/lib/classes/models/Promotions/PromotionResponse.js b/lib/classes/models/Promotions/PromotionResponse.js deleted file mode 100644 index 68cf6ea..0000000 --- a/lib/classes/models/Promotions/PromotionResponse.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var Promotion_1 = require("./../Promotions/Promotion"); -var PromotionResponse = /** @class */ (function (_super) { - __extends(PromotionResponse, _super); - function PromotionResponse(modelObject) { - var _this = _super.call(this, modelObject) || this; - _this.totalCount = modelObject.totalCount; - _this.totalPages = modelObject.totalPages; - _this.page = modelObject.page; - _this.limit = modelObject.limit; - _this.code = modelObject.code; - _this.items = new Array(); - if (modelObject.items instanceof Array) { - var i = 0; - for (i = 0; i < modelObject.items.length; i++) { - var promotion = new Promotion_1.Promotion(modelObject.items[i]); - _this.items.push(promotion); - } - } - return _this; - } - return PromotionResponse; -}(BaseModel_1.BaseModel)); -exports.PromotionResponse = PromotionResponse; diff --git a/lib/classes/models/Promotions/PromotionStatus.d.ts b/lib/classes/models/Promotions/PromotionStatus.d.ts deleted file mode 100644 index c862cdf..0000000 --- a/lib/classes/models/Promotions/PromotionStatus.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare enum PromotionStatus { - None = "NONE", - Active = "ACTIVE", - Assigned = "ASSIGNED", - Redeemed = "REDEEMED" -} -declare function PromotionStatusFromString(string: string): PromotionStatus; -declare function PromotionStatusToString(promotionStatus: PromotionStatus): string; -export { PromotionStatus, PromotionStatusFromString, PromotionStatusToString }; diff --git a/lib/classes/models/Promotions/PromotionStatus.js b/lib/classes/models/Promotions/PromotionStatus.js deleted file mode 100644 index ac3c930..0000000 --- a/lib/classes/models/Promotions/PromotionStatus.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var PromotionStatus; -(function (PromotionStatus) { - PromotionStatus["None"] = "NONE"; - PromotionStatus["Active"] = "ACTIVE"; - PromotionStatus["Assigned"] = "ASSIGNED"; - PromotionStatus["Redeemed"] = "REDEEMED"; -})(PromotionStatus || (PromotionStatus = {})); -exports.PromotionStatus = PromotionStatus; -function PromotionStatusFromString(string) { - if (string === PromotionStatus.Active) { - return PromotionStatus.Active; - } - else if (string === PromotionStatus.Assigned) { - return PromotionStatus.Assigned; - } - else if (string === PromotionStatus.Redeemed) { - return PromotionStatus.Redeemed; - } - return PromotionStatus.None; -} -exports.PromotionStatusFromString = PromotionStatusFromString; -function PromotionStatusToString(promotionStatus) { - return promotionStatus; -} -exports.PromotionStatusToString = PromotionStatusToString; diff --git a/lib/classes/models/Promotions/PromotionType.d.ts b/lib/classes/models/Promotions/PromotionType.d.ts deleted file mode 100644 index 903cc25..0000000 --- a/lib/classes/models/Promotions/PromotionType.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare enum PromotionType { - Unknown = "UNKNOWN", - MembersOnly = "MEMBERS_ONLY", - Custom = "CUSTOM", - General = "GENERAL", - Handbill = "HANDBILL" -} -declare function PromotionTypeFromString(string: string): PromotionType; -declare function PromotionTypeToString(promotionType: PromotionType): string; -export { PromotionType, PromotionTypeFromString, PromotionTypeToString }; diff --git a/lib/classes/models/Promotions/PromotionType.js b/lib/classes/models/Promotions/PromotionType.js deleted file mode 100644 index 2a1df45..0000000 --- a/lib/classes/models/Promotions/PromotionType.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var PromotionType; -(function (PromotionType) { - PromotionType["Unknown"] = "UNKNOWN"; - PromotionType["MembersOnly"] = "MEMBERS_ONLY"; - PromotionType["Custom"] = "CUSTOM"; - PromotionType["General"] = "GENERAL"; - PromotionType["Handbill"] = "HANDBILL"; -})(PromotionType || (PromotionType = {})); -exports.PromotionType = PromotionType; -function PromotionTypeFromString(string) { - if (string === PromotionType.MembersOnly) { - return PromotionType.MembersOnly; - } - else if (string === PromotionType.Custom) { - return PromotionType.Custom; - } - else if (string === PromotionType.General) { - return PromotionType.General; - } - else if (string === PromotionType.Handbill) { - return PromotionType.Handbill; - } - return PromotionType.Unknown; -} -exports.PromotionTypeFromString = PromotionTypeFromString; -function PromotionTypeToString(promotionType) { - return promotionType; -} -exports.PromotionTypeToString = PromotionTypeToString; diff --git a/lib/classes/models/Token/Token.d.ts b/lib/classes/models/Token/Token.d.ts deleted file mode 100644 index 4fd6044..0000000 --- a/lib/classes/models/Token/Token.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BaseModel } from './../BaseModel'; -import { TokenOrigin } from './TokenOrigin'; -interface IToken { - tokenString: string; - tokenOrigin: string; - expirationDate: number; -} -declare class Token extends BaseModel { - tokenString: string; - tokenOrigin: TokenOrigin; - expirationDate: Date; - constructor(modelObject: IToken); -} -export { Token }; diff --git a/lib/classes/models/Token/Token.js b/lib/classes/models/Token/Token.js deleted file mode 100644 index 18155b6..0000000 --- a/lib/classes/models/Token/Token.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("./../BaseModel"); -var TokenOrigin_1 = require("./TokenOrigin"); -var Token = /** @class */ (function (_super) { - __extends(Token, _super); - function Token(modelObject) { - var _this = _super.call(this, modelObject) || this; - _this.tokenString = modelObject.tokenString; - _this.tokenOrigin = TokenOrigin_1.TokenOriginFromString(modelObject.tokenOrigin); - _this.expirationDate = new Date(modelObject.expirationDate * 1000); - return _this; - } - return Token; -}(BaseModel_1.BaseModel)); -exports.Token = Token; diff --git a/lib/classes/models/Token/TokenOrigin.d.ts b/lib/classes/models/Token/TokenOrigin.d.ts deleted file mode 100644 index 40f924e..0000000 --- a/lib/classes/models/Token/TokenOrigin.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare enum TokenOrigin { - Unknown = "UNKNOWN", - Synerise = "SYNERISE", - Facebook = "FACEBOOK", - Oauth = "OAUTH" -} -declare function TokenOriginFromString(string: string): TokenOrigin; -declare function TokenOriginToString(tokenOrigin: TokenOrigin): string; -export { TokenOrigin, TokenOriginFromString, TokenOriginToString }; diff --git a/lib/classes/models/Token/TokenOrigin.js b/lib/classes/models/Token/TokenOrigin.js deleted file mode 100644 index 55845f5..0000000 --- a/lib/classes/models/Token/TokenOrigin.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var TokenOrigin; -(function (TokenOrigin) { - TokenOrigin["Unknown"] = "UNKNOWN"; - TokenOrigin["Synerise"] = "SYNERISE"; - TokenOrigin["Facebook"] = "FACEBOOK"; - TokenOrigin["Oauth"] = "OAUTH"; -})(TokenOrigin || (TokenOrigin = {})); -exports.TokenOrigin = TokenOrigin; -function TokenOriginFromString(string) { - if (string === TokenOrigin.Synerise) { - return TokenOrigin.Synerise; - } - else if (string === TokenOrigin.Facebook) { - return TokenOrigin.Facebook; - } - else if (string === TokenOrigin.Oauth) { - return TokenOrigin.Oauth; - } - return TokenOrigin.Unknown; -} -exports.TokenOriginFromString = TokenOriginFromString; -function TokenOriginToString(tokenOrigin) { - return tokenOrigin; -} -exports.TokenOriginToString = TokenOriginToString; diff --git a/lib/classes/models/Vouchers/AssignVoucherData.d.ts b/lib/classes/models/Vouchers/AssignVoucherData.d.ts deleted file mode 100644 index 063c7e6..0000000 --- a/lib/classes/models/Vouchers/AssignVoucherData.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { BaseModel } from '../BaseModel'; -interface IAssignVoucherData { - code: string; - expireIn?: number; - redeemAt?: number; - assignedAt?: number; - createdAt: number; - updatedAt: number; -} -declare class AssignVoucherData extends BaseModel { - code: string; - expireIn?: Date; - redeemAt?: Date; - assignedAt?: Date; - createdAt: Date; - updatedAt: Date; - constructor(modelObject: IAssignVoucherData); -} -export { IAssignVoucherData, AssignVoucherData }; diff --git a/lib/classes/models/Vouchers/AssignVoucherData.js b/lib/classes/models/Vouchers/AssignVoucherData.js deleted file mode 100644 index 7380507..0000000 --- a/lib/classes/models/Vouchers/AssignVoucherData.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var AssignVoucherData = /** @class */ (function (_super) { - __extends(AssignVoucherData, _super); - function AssignVoucherData(modelObject) { - var _this = _super.call(this, modelObject) || this; - _this.code = modelObject.code; - if (modelObject.expireIn !== undefined) { - _this.expireIn = new Date(modelObject.expireIn * 1000); - } - if (modelObject.redeemAt !== undefined) { - _this.redeemAt = new Date(modelObject.redeemAt * 1000); - } - if (modelObject.assignedAt !== undefined) { - _this.assignedAt = new Date(modelObject.assignedAt * 1000); - } - _this.createdAt = new Date(modelObject.createdAt * 1000); - _this.updatedAt = new Date(modelObject.updatedAt * 1000); - return _this; - } - return AssignVoucherData; -}(BaseModel_1.BaseModel)); -exports.AssignVoucherData = AssignVoucherData; diff --git a/lib/classes/models/Vouchers/AssignVoucherResponse.d.ts b/lib/classes/models/Vouchers/AssignVoucherResponse.d.ts deleted file mode 100644 index 5a9dbd7..0000000 --- a/lib/classes/models/Vouchers/AssignVoucherResponse.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BaseModel } from '../BaseModel'; -import { IAssignVoucherData, AssignVoucherData } from './../Vouchers/AssignVoucherData'; -interface IAssignVoucherResponse { - message: string; - data: IAssignVoucherData; -} -declare class AssignVoucherResponse extends BaseModel { - message: string; - data: AssignVoucherData; - constructor(modelObject: IAssignVoucherResponse); -} -export { IAssignVoucherResponse, AssignVoucherResponse }; diff --git a/lib/classes/models/Vouchers/AssignVoucherResponse.js b/lib/classes/models/Vouchers/AssignVoucherResponse.js deleted file mode 100644 index 153956f..0000000 --- a/lib/classes/models/Vouchers/AssignVoucherResponse.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var AssignVoucherData_1 = require("./../Vouchers/AssignVoucherData"); -var AssignVoucherResponse = /** @class */ (function (_super) { - __extends(AssignVoucherResponse, _super); - function AssignVoucherResponse(modelObject) { - var _this = _super.call(this, modelObject) || this; - _this.message = modelObject.message; - _this.data = new AssignVoucherData_1.AssignVoucherData(modelObject.data); - return _this; - } - return AssignVoucherResponse; -}(BaseModel_1.BaseModel)); -exports.AssignVoucherResponse = AssignVoucherResponse; diff --git a/lib/classes/models/Vouchers/VoucherCodeStatus.d.ts b/lib/classes/models/Vouchers/VoucherCodeStatus.d.ts deleted file mode 100644 index 5d8e60d..0000000 --- a/lib/classes/models/Vouchers/VoucherCodeStatus.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare enum VoucherCodeStatus { - Unassigned = "UNASSIGNED", - Assigned = "ASSIGNED", - Redeemed = "REDEEMED", - Canceled = "CANCELED" -} -declare function VoucherCodeStatusFromString(string: string): VoucherCodeStatus; -declare function VoucherCodeStatusToString(voucherCodeStatus: VoucherCodeStatus): string; -export { VoucherCodeStatus, VoucherCodeStatusFromString, VoucherCodeStatusToString }; diff --git a/lib/classes/models/Vouchers/VoucherCodeStatus.js b/lib/classes/models/Vouchers/VoucherCodeStatus.js deleted file mode 100644 index dccb547..0000000 --- a/lib/classes/models/Vouchers/VoucherCodeStatus.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var VoucherCodeStatus; -(function (VoucherCodeStatus) { - VoucherCodeStatus["Unassigned"] = "UNASSIGNED"; - VoucherCodeStatus["Assigned"] = "ASSIGNED"; - VoucherCodeStatus["Redeemed"] = "REDEEMED"; - VoucherCodeStatus["Canceled"] = "CANCELED"; -})(VoucherCodeStatus || (VoucherCodeStatus = {})); -exports.VoucherCodeStatus = VoucherCodeStatus; -function VoucherCodeStatusFromString(string) { - if (string === VoucherCodeStatus.Unassigned) { - return VoucherCodeStatus.Unassigned; - } - else if (string === VoucherCodeStatus.Assigned) { - return VoucherCodeStatus.Assigned; - } - else if (string === VoucherCodeStatus.Redeemed) { - return VoucherCodeStatus.Redeemed; - } - else if (string === VoucherCodeStatus.Canceled) { - return VoucherCodeStatus.Canceled; - } - return VoucherCodeStatus.Unassigned; -} -exports.VoucherCodeStatusFromString = VoucherCodeStatusFromString; -function VoucherCodeStatusToString(voucherCodeStatus) { - return voucherCodeStatus; -} -exports.VoucherCodeStatusToString = VoucherCodeStatusToString; diff --git a/lib/classes/models/Vouchers/VoucherCodesData.d.ts b/lib/classes/models/Vouchers/VoucherCodesData.d.ts deleted file mode 100644 index bc23c72..0000000 --- a/lib/classes/models/Vouchers/VoucherCodesData.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { BaseModel } from '../BaseModel'; -interface IVoucherCodesData { - code: string; - status: string; - clientUuid: string; - poolUuid: string; - expireIn?: number; - redeemAt?: number; - assignedAt?: number; - createdAt: number; - updatedAt: number; -} -declare class VoucherCodesData extends BaseModel { - code: string; - status: string; - clientUuid: string; - poolUuid: string; - expireIn?: Date; - redeemAt?: Date; - assignedAt?: Date; - createdAt: Date; - updatedAt: Date; - constructor(modelObject: IVoucherCodesData); -} -export { IVoucherCodesData, VoucherCodesData }; diff --git a/lib/classes/models/Vouchers/VoucherCodesData.js b/lib/classes/models/Vouchers/VoucherCodesData.js deleted file mode 100644 index 3feb98d..0000000 --- a/lib/classes/models/Vouchers/VoucherCodesData.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var VoucherCodeStatus_1 = require("./VoucherCodeStatus"); -var VoucherCodesData = /** @class */ (function (_super) { - __extends(VoucherCodesData, _super); - function VoucherCodesData(modelObject) { - var _this = _super.call(this, modelObject) || this; - _this.code = modelObject.code; - _this.status = VoucherCodeStatus_1.VoucherCodeStatusFromString(modelObject.status); - _this.clientUuid = modelObject.clientUuid; - _this.poolUuid = modelObject.poolUuid; - if (modelObject.expireIn !== undefined) { - _this.expireIn = new Date(modelObject.expireIn * 1000); - } - if (modelObject.redeemAt !== undefined) { - _this.redeemAt = new Date(modelObject.redeemAt * 1000); - } - if (modelObject.assignedAt !== undefined) { - _this.assignedAt = new Date(modelObject.assignedAt * 1000); - } - _this.createdAt = new Date(modelObject.createdAt * 1000); - _this.updatedAt = new Date(modelObject.updatedAt * 1000); - return _this; - } - return VoucherCodesData; -}(BaseModel_1.BaseModel)); -exports.VoucherCodesData = VoucherCodesData; diff --git a/lib/classes/models/Vouchers/VoucherCodesResponse.d.ts b/lib/classes/models/Vouchers/VoucherCodesResponse.d.ts deleted file mode 100644 index 451e71e..0000000 --- a/lib/classes/models/Vouchers/VoucherCodesResponse.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseModel } from '../BaseModel'; -import { IVoucherCodesData, VoucherCodesData } from './VoucherCodesData'; -interface IVoucherCodesResponse { - data: Array; -} -declare class VoucherCodesResponse extends BaseModel { - data: Array; - constructor(modelObject: IVoucherCodesResponse); -} -export { IVoucherCodesResponse, VoucherCodesResponse }; diff --git a/lib/classes/models/Vouchers/VoucherCodesResponse.js b/lib/classes/models/Vouchers/VoucherCodesResponse.js deleted file mode 100644 index cf0b732..0000000 --- a/lib/classes/models/Vouchers/VoucherCodesResponse.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModel_1 = require("../BaseModel"); -var VoucherCodesData_1 = require("./VoucherCodesData"); -var VoucherCodesResponse = /** @class */ (function (_super) { - __extends(VoucherCodesResponse, _super); - function VoucherCodesResponse(modelObject) { - var _this = _super.call(this, modelObject) || this; - _this.data = new Array(); - if (modelObject.data instanceof Array) { - var i = 0; - for (i = 0; i < modelObject.data.length; i++) { - var voucherCodesData = new VoucherCodesData_1.VoucherCodesData(modelObject.data[i]); - _this.data.push(voucherCodesData); - } - } - return _this; - } - return VoucherCodesResponse; -}(BaseModel_1.BaseModel)); -exports.VoucherCodesResponse = VoucherCodesResponse; diff --git a/lib/classes/types/Error.d.ts b/lib/classes/types/Error.d.ts deleted file mode 100644 index 924be97..0000000 --- a/lib/classes/types/Error.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -interface IError { - code: number; - message: string; -} -declare class Error { - code: number; - message: string; - constructor(code: number, message: string); -} -declare class ErrorMapper { - static getErrorInstance(errorObject: IError): Error; -} -declare class ErrorProvider { - static getUnknownError(): Error; - static getModuleConnectorBadParametersError(): Error; -} -export { IError, Error, ErrorMapper, ErrorProvider }; diff --git a/lib/classes/types/Error.js b/lib/classes/types/Error.js deleted file mode 100644 index ca03575..0000000 --- a/lib/classes/types/Error.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var Error = /** @class */ (function () { - function Error(code, message) { - this.code = code; - this.message = message; - } - return Error; -}()); -exports.Error = Error; -var ErrorMapper = /** @class */ (function () { - function ErrorMapper() { - } - ErrorMapper.getErrorInstance = function (errorObject) { - try { - var code = errorObject.code; - var message = errorObject.message; - return new Error(code, message); - } - catch (err) { - return ErrorProvider.getUnknownError(); - } - }; - return ErrorMapper; -}()); -exports.ErrorMapper = ErrorMapper; -var ErrorProvider = /** @class */ (function () { - function ErrorProvider() { - } - ErrorProvider.getUnknownError = function () { - return new Error(10, 'Unknown error has occured'); - }; - ErrorProvider.getModuleConnectorBadParametersError = function () { - return new Error(100, 'There are no required parameters configured in Synerise Module Connector'); - }; - return ErrorProvider; -}()); -exports.ErrorProvider = ErrorProvider; diff --git a/lib/classes/utils/DeviceUtils.d.ts b/lib/classes/utils/DeviceUtils.d.ts deleted file mode 100644 index 6f69728..0000000 --- a/lib/classes/utils/DeviceUtils.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare class DeviceUtils { - static isPlatformIOS(): boolean; - static isPlatformAndroid(): boolean; -} -export { DeviceUtils }; diff --git a/lib/classes/utils/DeviceUtils.js b/lib/classes/utils/DeviceUtils.js deleted file mode 100644 index 2301efc..0000000 --- a/lib/classes/utils/DeviceUtils.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var react_native_1 = require("react-native"); -var DeviceUtils = /** @class */ (function () { - function DeviceUtils() { - } - DeviceUtils.isPlatformIOS = function () { - if (react_native_1.Platform.OS === 'ios') { - return true; - } - else { - return false; - } - }; - DeviceUtils.isPlatformAndroid = function () { - if (react_native_1.Platform.OS === 'android') { - return true; - } - else { - return false; - } - }; - return DeviceUtils; -}()); -exports.DeviceUtils = DeviceUtils; diff --git a/lib/config/constants.d.ts b/lib/config/constants.d.ts deleted file mode 100644 index b572fbe..0000000 --- a/lib/config/constants.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const Constants: {}; -export { Constants }; diff --git a/lib/config/constants.js b/lib/config/constants.js deleted file mode 100644 index 4e5d637..0000000 --- a/lib/config/constants.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var react_native_1 = require("react-native"); -var RNConstants = react_native_1.NativeModules.RNConstants; -var Constants = {}; -exports.Constants = Constants; diff --git a/lib/config/import_events.d.ts b/lib/config/import_events.d.ts deleted file mode 100644 index 63b6632..0000000 --- a/lib/config/import_events.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export { Event } from './../classes/events/Event'; -export { CustomEvent } from './../classes/events/CustomEvent'; -export { LoggedInEvent } from './../classes/events/auth/LoggedInEvent'; -export { LoggedOutEvent } from './../classes/events/auth/LoggedOutEvent'; -export { RecognizeClientEvent } from './../classes/events/auth/RecognizeClientEvent'; -export { RegisteredEvent } from './../classes/events/auth/RegisteredEvent'; -export { UnitPrice } from '../classes/events/cart/UnitPrice'; -export { ProductAddedToCartEvent } from '../classes/events/cart/ProductAddedToCartEvent'; -export { ProductRemovedFromCartEvent } from '../classes/events/cart/ProductRemovedFromCartEvent'; -export { ProductViewedEvent } from '../classes/events/product/ProductViewedEvent'; -export { PushCancelledEvent } from '../classes/events/push/PushCancelledEvent'; -export { PushClickedEvent } from '../classes/events/push/PushClickedEvent'; -export { PushViewedEvent } from '../classes/events/push/PushViewedEvent'; -export { RecommendationClickEvent } from './../classes/events/recommendation/RecommendationClickEvent'; -export { RecommendationSeenEvent } from './../classes/events/recommendation/RecommendationSeenEvent'; -export { ProductAddedToFavouritesEvent } from '../classes/events/product/ProductAddedToFavouritesEvent'; -export { AppearedInLocationEvent } from './../classes/events/other/AppearedInLocationEvent'; -export { HitTimerEvent } from './../classes/events/other/HitTimerEvent'; -export { SearchedEvent } from './../classes/events/other/SearchedEvent'; -export { SharedEvent } from './../classes/events/other/SharedEvent'; -export { VisitedScreenEvent } from './../classes/events/other/VisitedScreenEvent'; diff --git a/lib/config/import_events.js b/lib/config/import_events.js deleted file mode 100644 index 7163f35..0000000 --- a/lib/config/import_events.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var Event_1 = require("./../classes/events/Event"); -exports.Event = Event_1.Event; -var CustomEvent_1 = require("./../classes/events/CustomEvent"); -exports.CustomEvent = CustomEvent_1.CustomEvent; -// AUTH -var LoggedInEvent_1 = require("./../classes/events/auth/LoggedInEvent"); -exports.LoggedInEvent = LoggedInEvent_1.LoggedInEvent; -var LoggedOutEvent_1 = require("./../classes/events/auth/LoggedOutEvent"); -exports.LoggedOutEvent = LoggedOutEvent_1.LoggedOutEvent; -var RecognizeClientEvent_1 = require("./../classes/events/auth/RecognizeClientEvent"); -exports.RecognizeClientEvent = RecognizeClientEvent_1.RecognizeClientEvent; -var RegisteredEvent_1 = require("./../classes/events/auth/RegisteredEvent"); -exports.RegisteredEvent = RegisteredEvent_1.RegisteredEvent; -// CART -var UnitPrice_1 = require("../classes/events/cart/UnitPrice"); -exports.UnitPrice = UnitPrice_1.UnitPrice; -var ProductAddedToCartEvent_1 = require("../classes/events/cart/ProductAddedToCartEvent"); -exports.ProductAddedToCartEvent = ProductAddedToCartEvent_1.ProductAddedToCartEvent; -var ProductRemovedFromCartEvent_1 = require("../classes/events/cart/ProductRemovedFromCartEvent"); -exports.ProductRemovedFromCartEvent = ProductRemovedFromCartEvent_1.ProductRemovedFromCartEvent; -// PRODUCT -var ProductViewedEvent_1 = require("../classes/events/product/ProductViewedEvent"); -exports.ProductViewedEvent = ProductViewedEvent_1.ProductViewedEvent; -// PUSH -var PushCancelledEvent_1 = require("../classes/events/push/PushCancelledEvent"); -exports.PushCancelledEvent = PushCancelledEvent_1.PushCancelledEvent; -var PushClickedEvent_1 = require("../classes/events/push/PushClickedEvent"); -exports.PushClickedEvent = PushClickedEvent_1.PushClickedEvent; -var PushViewedEvent_1 = require("../classes/events/push/PushViewedEvent"); -exports.PushViewedEvent = PushViewedEvent_1.PushViewedEvent; -// RECOMMENDATION -var RecommendationClickEvent_1 = require("./../classes/events/recommendation/RecommendationClickEvent"); -exports.RecommendationClickEvent = RecommendationClickEvent_1.RecommendationClickEvent; -var RecommendationSeenEvent_1 = require("./../classes/events/recommendation/RecommendationSeenEvent"); -exports.RecommendationSeenEvent = RecommendationSeenEvent_1.RecommendationSeenEvent; -// OTHER -var ProductAddedToFavouritesEvent_1 = require("../classes/events/product/ProductAddedToFavouritesEvent"); -exports.ProductAddedToFavouritesEvent = ProductAddedToFavouritesEvent_1.ProductAddedToFavouritesEvent; -var AppearedInLocationEvent_1 = require("./../classes/events/other/AppearedInLocationEvent"); -exports.AppearedInLocationEvent = AppearedInLocationEvent_1.AppearedInLocationEvent; -var HitTimerEvent_1 = require("./../classes/events/other/HitTimerEvent"); -exports.HitTimerEvent = HitTimerEvent_1.HitTimerEvent; -var SearchedEvent_1 = require("./../classes/events/other/SearchedEvent"); -exports.SearchedEvent = SearchedEvent_1.SearchedEvent; -var SharedEvent_1 = require("./../classes/events/other/SharedEvent"); -exports.SharedEvent = SharedEvent_1.SharedEvent; -var VisitedScreenEvent_1 = require("./../classes/events/other/VisitedScreenEvent"); -exports.VisitedScreenEvent = VisitedScreenEvent_1.VisitedScreenEvent; diff --git a/lib/config/import_models.d.ts b/lib/config/import_models.d.ts deleted file mode 100644 index 2992f23..0000000 --- a/lib/config/import_models.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export { IClientAuthContext, ClientAuthContext } from '../classes/models/Client/ClientAuthContext'; -export { IClientOAuthAuthenticationContext, ClientOAuthAuthenticationContext } from './../classes/models/Client/ClientOAuthAuthenticationContext'; -export { IClientFacebookAuthenticationContext, ClientFacebookAuthenticationContext } from './../classes/models/Client/ClientFacebookAuthenticationContext'; -export { IClientAppleSignInAuthenticationContext, ClientAppleSignInAuthenticationContext } from './../classes/models/Client/ClientAppleSignInAuthenticationContext'; -export { ClientAccountInformation } from './../classes/models/Client/ClientAccountInformation'; -export { IClientAccountRegisterContext, ClientAccountRegisterContext } from './../classes/models/Client/ClientAccountRegisterContext'; -export { IClientAccountUpdateContext, ClientAccountUpdateContext } from './../classes/models/Client/ClientAccountUpdateContext'; -export { IClientAgreements, ClientAgreements } from './../classes/models/Client/ClientAgreements'; -export { ClientSex, ClientSexFromString, ClientSexToString } from './../classes/models/Client/ClientSex'; -export { ClientIdentityProvider } from './../classes/models/Client/ClientIdentityProvider'; -export { ClientSessionEndReason, ClientSessionEndReasonFromString, ClientSessionEndReasonToString } from './../classes/models/Client/ClientSessionEndReason'; -export { IClientConditionalAuthResult, ClientConditionalAuthResult } from '../classes/models/Client/ClientConditionalAuthResult'; -export { ClientConditionalAuthStatus } from '../classes/models/Client/ClientConditionalAuthStatus'; -export { PromotionStatus } from './../classes/models/Promotions/PromotionStatus'; -export { PromotionType } from './../classes/models/Promotions/PromotionType'; -export { PromotionDiscountType } from './../classes/models/Promotions/PromotionDiscountType'; -export { PromotionItemScope } from './../classes/models/Promotions/PromotionItemScope'; -export { Promotion, PromotionSortingKey } from './../classes/models/Promotions/Promotion'; -export { PromotionResponse } from './../classes/models/Promotions/PromotionResponse'; -export { PromotionIdentifier } from './../classes/models/Promotions/PromotionIdentifier'; -export { PromotionIdentifierKey } from '../classes/models/Promotions/PromotionIdentifierKey'; -export { IPromotionDiscountTypeDetails, PromotionDiscountTypeDetails } from '../classes/models/Promotions/PromotionDiscountTypeDetails'; -export { IPromotionDetails, PromotionDetails } from './../classes/models/Promotions/PromotionDetails'; -export { IPromotionDiscountStep, PromotionDiscountStep } from '../classes/models/Promotions/PromotionDiscountStep'; -export { IPromotionDiscountModeDetails, PromotionDiscountModeDetails } from '../classes/models/Promotions/PromotionDiscountModeDetails'; -export { RecommendationOptions } from './../classes/models/Content/RecommendationOptions'; -export { RecommendationResponse } from './../classes/models/Content/RecommendationResponse'; -export { Recommendation } from './../classes/models/Content/Recommendation'; -export { ScreenViewAudience } from './../classes/models/Content/ScreenViewAudience'; -export { ScreenViewResponse } from './../classes/models/Content/ScreenViewResponse'; -export { AssignVoucherResponse } from './../classes/models/Vouchers/AssignVoucherResponse'; -export { VoucherCodesResponse } from './../classes/models/Vouchers/VoucherCodesResponse'; -export { AssignVoucherData } from './../classes/models/Vouchers/AssignVoucherData'; -export { VoucherCodesData } from './../classes/models/Vouchers/VoucherCodesData'; -export { VoucherCodeStatus } from './../classes/models/Vouchers/VoucherCodeStatus'; -export { BaseApiQuery, IApiQuerySorting, ApiQuerySortingOrder } from './../classes/api_queries/BaseApiQuery'; -export { PromotionsApiQuery } from './../classes/api_queries/PromotionsApiQuery'; -export { DocumentsApiQuery } from './../classes/api_queries/DocumentsApiQuery'; -export { DocumentsApiQueryType } from './../classes/api_queries/DocumentsApiQueryType'; -export { Token } from './../classes/models/Token/Token'; -export { TokenOrigin, TokenOriginFromString, TokenOriginToString } from './../classes/models/Token/TokenOrigin'; diff --git a/lib/config/import_models.js b/lib/config/import_models.js deleted file mode 100644 index 2ce2e30..0000000 --- a/lib/config/import_models.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -// CLIENT -var ClientAuthContext_1 = require("../classes/models/Client/ClientAuthContext"); -exports.ClientAuthContext = ClientAuthContext_1.ClientAuthContext; -var ClientOAuthAuthenticationContext_1 = require("./../classes/models/Client/ClientOAuthAuthenticationContext"); -exports.ClientOAuthAuthenticationContext = ClientOAuthAuthenticationContext_1.ClientOAuthAuthenticationContext; -var ClientFacebookAuthenticationContext_1 = require("./../classes/models/Client/ClientFacebookAuthenticationContext"); -exports.ClientFacebookAuthenticationContext = ClientFacebookAuthenticationContext_1.ClientFacebookAuthenticationContext; -var ClientAppleSignInAuthenticationContext_1 = require("./../classes/models/Client/ClientAppleSignInAuthenticationContext"); -exports.ClientAppleSignInAuthenticationContext = ClientAppleSignInAuthenticationContext_1.ClientAppleSignInAuthenticationContext; -var ClientAccountInformation_1 = require("./../classes/models/Client/ClientAccountInformation"); -exports.ClientAccountInformation = ClientAccountInformation_1.ClientAccountInformation; -var ClientAccountRegisterContext_1 = require("./../classes/models/Client/ClientAccountRegisterContext"); -exports.ClientAccountRegisterContext = ClientAccountRegisterContext_1.ClientAccountRegisterContext; -var ClientAccountUpdateContext_1 = require("./../classes/models/Client/ClientAccountUpdateContext"); -exports.ClientAccountUpdateContext = ClientAccountUpdateContext_1.ClientAccountUpdateContext; -var ClientAgreements_1 = require("./../classes/models/Client/ClientAgreements"); -exports.ClientAgreements = ClientAgreements_1.ClientAgreements; -var ClientSex_1 = require("./../classes/models/Client/ClientSex"); -exports.ClientSex = ClientSex_1.ClientSex; -exports.ClientSexFromString = ClientSex_1.ClientSexFromString; -exports.ClientSexToString = ClientSex_1.ClientSexToString; -var ClientIdentityProvider_1 = require("./../classes/models/Client/ClientIdentityProvider"); -exports.ClientIdentityProvider = ClientIdentityProvider_1.ClientIdentityProvider; -var ClientSessionEndReason_1 = require("./../classes/models/Client/ClientSessionEndReason"); -exports.ClientSessionEndReason = ClientSessionEndReason_1.ClientSessionEndReason; -exports.ClientSessionEndReasonFromString = ClientSessionEndReason_1.ClientSessionEndReasonFromString; -exports.ClientSessionEndReasonToString = ClientSessionEndReason_1.ClientSessionEndReasonToString; -var ClientConditionalAuthResult_1 = require("../classes/models/Client/ClientConditionalAuthResult"); -exports.ClientConditionalAuthResult = ClientConditionalAuthResult_1.ClientConditionalAuthResult; -var ClientConditionalAuthStatus_1 = require("../classes/models/Client/ClientConditionalAuthStatus"); -exports.ClientConditionalAuthStatus = ClientConditionalAuthStatus_1.ClientConditionalAuthStatus; -// PROMOTIONS -var PromotionStatus_1 = require("./../classes/models/Promotions/PromotionStatus"); -exports.PromotionStatus = PromotionStatus_1.PromotionStatus; -var PromotionType_1 = require("./../classes/models/Promotions/PromotionType"); -exports.PromotionType = PromotionType_1.PromotionType; -var PromotionDiscountType_1 = require("./../classes/models/Promotions/PromotionDiscountType"); -exports.PromotionDiscountType = PromotionDiscountType_1.PromotionDiscountType; -var PromotionItemScope_1 = require("./../classes/models/Promotions/PromotionItemScope"); -exports.PromotionItemScope = PromotionItemScope_1.PromotionItemScope; -var Promotion_1 = require("./../classes/models/Promotions/Promotion"); -exports.Promotion = Promotion_1.Promotion; -exports.PromotionSortingKey = Promotion_1.PromotionSortingKey; -var PromotionResponse_1 = require("./../classes/models/Promotions/PromotionResponse"); -exports.PromotionResponse = PromotionResponse_1.PromotionResponse; -var PromotionIdentifier_1 = require("./../classes/models/Promotions/PromotionIdentifier"); -exports.PromotionIdentifier = PromotionIdentifier_1.PromotionIdentifier; -var PromotionIdentifierKey_1 = require("../classes/models/Promotions/PromotionIdentifierKey"); -exports.PromotionIdentifierKey = PromotionIdentifierKey_1.PromotionIdentifierKey; -var PromotionDiscountTypeDetails_1 = require("../classes/models/Promotions/PromotionDiscountTypeDetails"); -exports.PromotionDiscountTypeDetails = PromotionDiscountTypeDetails_1.PromotionDiscountTypeDetails; -var PromotionDetails_1 = require("./../classes/models/Promotions/PromotionDetails"); -exports.PromotionDetails = PromotionDetails_1.PromotionDetails; -var PromotionDiscountStep_1 = require("../classes/models/Promotions/PromotionDiscountStep"); -exports.PromotionDiscountStep = PromotionDiscountStep_1.PromotionDiscountStep; -var PromotionDiscountModeDetails_1 = require("../classes/models/Promotions/PromotionDiscountModeDetails"); -exports.PromotionDiscountModeDetails = PromotionDiscountModeDetails_1.PromotionDiscountModeDetails; -// CONTENT -var RecommendationOptions_1 = require("./../classes/models/Content/RecommendationOptions"); -exports.RecommendationOptions = RecommendationOptions_1.RecommendationOptions; -var RecommendationResponse_1 = require("./../classes/models/Content/RecommendationResponse"); -exports.RecommendationResponse = RecommendationResponse_1.RecommendationResponse; -var Recommendation_1 = require("./../classes/models/Content/Recommendation"); -exports.Recommendation = Recommendation_1.Recommendation; -var ScreenViewAudience_1 = require("./../classes/models/Content/ScreenViewAudience"); -exports.ScreenViewAudience = ScreenViewAudience_1.ScreenViewAudience; -var ScreenViewResponse_1 = require("./../classes/models/Content/ScreenViewResponse"); -exports.ScreenViewResponse = ScreenViewResponse_1.ScreenViewResponse; -// VOUCHERS -var AssignVoucherResponse_1 = require("./../classes/models/Vouchers/AssignVoucherResponse"); -exports.AssignVoucherResponse = AssignVoucherResponse_1.AssignVoucherResponse; -var VoucherCodesResponse_1 = require("./../classes/models/Vouchers/VoucherCodesResponse"); -exports.VoucherCodesResponse = VoucherCodesResponse_1.VoucherCodesResponse; -var AssignVoucherData_1 = require("./../classes/models/Vouchers/AssignVoucherData"); -exports.AssignVoucherData = AssignVoucherData_1.AssignVoucherData; -var VoucherCodesData_1 = require("./../classes/models/Vouchers/VoucherCodesData"); -exports.VoucherCodesData = VoucherCodesData_1.VoucherCodesData; -var VoucherCodeStatus_1 = require("./../classes/models/Vouchers/VoucherCodeStatus"); -exports.VoucherCodeStatus = VoucherCodeStatus_1.VoucherCodeStatus; -// API QUERIES -var BaseApiQuery_1 = require("./../classes/api_queries/BaseApiQuery"); -exports.BaseApiQuery = BaseApiQuery_1.BaseApiQuery; -exports.ApiQuerySortingOrder = BaseApiQuery_1.ApiQuerySortingOrder; -var PromotionsApiQuery_1 = require("./../classes/api_queries/PromotionsApiQuery"); -exports.PromotionsApiQuery = PromotionsApiQuery_1.PromotionsApiQuery; -var DocumentsApiQuery_1 = require("./../classes/api_queries/DocumentsApiQuery"); -exports.DocumentsApiQuery = DocumentsApiQuery_1.DocumentsApiQuery; -var DocumentsApiQueryType_1 = require("./../classes/api_queries/DocumentsApiQueryType"); -exports.DocumentsApiQueryType = DocumentsApiQueryType_1.DocumentsApiQueryType; -// TOKEN -var Token_1 = require("./../classes/models/Token/Token"); -exports.Token = Token_1.Token; -var TokenOrigin_1 = require("./../classes/models/Token/TokenOrigin"); -exports.TokenOrigin = TokenOrigin_1.TokenOrigin; -exports.TokenOriginFromString = TokenOrigin_1.TokenOriginFromString; -exports.TokenOriginToString = TokenOrigin_1.TokenOriginToString; diff --git a/lib/config/import_types.d.ts b/lib/config/import_types.d.ts deleted file mode 100644 index 54c48b7..0000000 --- a/lib/config/import_types.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { Error } from './../classes/types/Error'; diff --git a/lib/config/import_types.js b/lib/config/import_types.js deleted file mode 100644 index 9781dd0..0000000 --- a/lib/config/import_types.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -// ERROR -var Error_1 = require("./../classes/types/Error"); -exports.Error = Error_1.Error; diff --git a/lib/index.d.ts b/lib/index.d.ts deleted file mode 100644 index d3ee887..0000000 --- a/lib/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './config/constants'; -export * from './config/import_events'; -export * from './config/import_models'; -export * from './config/import_types'; -export { Synerise } from './main/Synerise'; diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 876e29b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./config/constants")); -__export(require("./config/import_events")); -__export(require("./config/import_models")); -__export(require("./config/import_types")); -var Synerise_1 = require("./main/Synerise"); -exports.Synerise = Synerise_1.Synerise; diff --git a/lib/main/Synerise.d.ts b/lib/main/Synerise.d.ts deleted file mode 100644 index 7219af3..0000000 --- a/lib/main/Synerise.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { SettingsModule as Settings, ISettingsOptions } from './modules/SettingsModule'; -import { ClientModule as Client } from './modules/ClientModule'; -import { TrackerModule as Tracker } from './modules/TrackerModule'; -import { NotificationsModule as Notifications } from './modules/NotificationsModule'; -import { InjectorModule as Injector } from './modules/InjectorModule'; -import { PromotionsModule as Promotions } from './modules/PromotionsModule'; -import { ContentModule as Content } from './modules/ContentModule'; -import { IError, Error } from './../classes/types/Error'; -declare class SyneriseInitializer { - private settings?; - constructor(); - static isSyneriseInitialized(): boolean; - static invokeOnReadyCallback(): void; - static invokeOnErrorCallback(errorObject: IError): void; - withClientApiKey(clientApiKey: string): this; - withBaseUrl(baseUrl: string): this; - withDebugModeEnabled(debugModeEnabled: boolean): this; - withCrashHandlingEnabled(crashHandlingEnabled: boolean): this; - withSettings(settings: ISettingsOptions): this; - init(): void; - private setupModules; - private setup; -} -declare class Synerise { - constructor(); - static Initializer: () => SyneriseInitializer; - static isInitialized(): Boolean; - static onReady(callback: () => void): void; - static onError(callback: (error: Error) => void): void; - static changeClientApiKey(clientApiKey: string): void; - static get Settings(): Settings; - static get Client(): Client; - static get Tracker(): Tracker; - static get Notifications(): Notifications; - static get Injector(): Injector; - static get Promotions(): Promotions; - static get Content(): Content; -} -export { Synerise, SyneriseInitializer }; diff --git a/lib/main/Synerise.js b/lib/main/Synerise.js deleted file mode 100644 index 5e8e13c..0000000 --- a/lib/main/Synerise.js +++ /dev/null @@ -1,266 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var react_native_1 = require("react-native"); -var SyneriseModuleConnector_1 = require("./communication/SyneriseModuleConnector"); -var SyneriseModuleEmitter_1 = require("./communication/SyneriseModuleEmitter"); -var SettingsModule_1 = require("./modules/SettingsModule"); -var ClientModule_1 = require("./modules/ClientModule"); -var TrackerModule_1 = require("./modules/TrackerModule"); -var NotificationsModule_1 = require("./modules/NotificationsModule"); -var InjectorModule_1 = require("./modules/InjectorModule"); -var PromotionsModule_1 = require("./modules/PromotionsModule"); -var ContentModule_1 = require("./modules/ContentModule"); -var Error_1 = require("./../classes/types/Error"); -var RNSynerise = react_native_1.NativeModules.RNSynerise; -var ModuleIdentifier; -(function (ModuleIdentifier) { - ModuleIdentifier[ModuleIdentifier["SETTINGS"] = 0] = "SETTINGS"; - ModuleIdentifier[ModuleIdentifier["CLIENT"] = 1] = "CLIENT"; - ModuleIdentifier[ModuleIdentifier["TRACKER"] = 2] = "TRACKER"; - ModuleIdentifier[ModuleIdentifier["NOTIFICATIONS"] = 3] = "NOTIFICATIONS"; - ModuleIdentifier[ModuleIdentifier["INJECTOR"] = 4] = "INJECTOR"; - ModuleIdentifier[ModuleIdentifier["PROMOTIONS"] = 5] = "PROMOTIONS"; - ModuleIdentifier[ModuleIdentifier["CONTENT"] = 6] = "CONTENT"; -})(ModuleIdentifier || (ModuleIdentifier = {})); -function getModuleInstance(module) { - if (module == ModuleIdentifier.SETTINGS) { - return SettingsModule_1.SettingsModule.instance(); - } - if (module == ModuleIdentifier.CLIENT) { - return ClientModule_1.ClientModule.instance(); - } - if (module == ModuleIdentifier.TRACKER) { - return TrackerModule_1.TrackerModule.instance(); - } - if (module == ModuleIdentifier.NOTIFICATIONS) { - return NotificationsModule_1.NotificationsModule.instance(); - } - if (module == ModuleIdentifier.INJECTOR) { - return InjectorModule_1.InjectorModule.instance(); - } - if (module == ModuleIdentifier.PROMOTIONS) { - return PromotionsModule_1.PromotionsModule.instance(); - } - if (module == ModuleIdentifier.CONTENT) { - return ContentModule_1.ContentModule.instance(); - } -} -var modulesToCreate = [ModuleIdentifier.SETTINGS, ModuleIdentifier.CLIENT, ModuleIdentifier.TRACKER, ModuleIdentifier.NOTIFICATIONS, - ModuleIdentifier.INJECTOR, ModuleIdentifier.PROMOTIONS, ModuleIdentifier.CONTENT]; -var SyneriseModuleController = /** @class */ (function () { - function SyneriseModuleController() { - } - SyneriseModuleController.prototype.setupModules = function () { - for (var _i = 0, modulesToCreate_1 = modulesToCreate; _i < modulesToCreate_1.length; _i++) { - var module_1 = modulesToCreate_1[_i]; - var moduleInstance = getModuleInstance(module_1); - this.enableModule(module_1); - this.configureModule(module_1); - } - }; - SyneriseModuleController.prototype.configureModule = function (module) { - this.injectModuleConfiguration({}, module); - }; - SyneriseModuleController.prototype.enableModule = function (module) { - var moduleInstance = getModuleInstance(module); - if (moduleInstance) { - moduleInstance.isActive = true; - } - }; - SyneriseModuleController.prototype.disableModule = function (module) { - var moduleInstance = getModuleInstance(module); - if (moduleInstance) { - moduleInstance.isActive = false; - } - }; - SyneriseModuleController.prototype.injectModuleConfiguration = function (configuration, module) { - var moduleInstance = getModuleInstance(module); - if (moduleInstance) { - moduleInstance.configure(configuration); - } - }; - SyneriseModuleController.prototype.getModuleName = function (moduleIdentifier) { - var moduleName = ModuleIdentifier[moduleIdentifier]; - var moduleNameLowercased = moduleName.toLowerCase(); - var moduleNameNormalized = moduleNameLowercased.charAt(0).toUpperCase() + moduleNameLowercased.slice(1); - return moduleNameNormalized; - }; - SyneriseModuleController.prototype.getModule = function (moduleIdentifier) { - var moduleInstance = getModuleInstance(moduleIdentifier); - if (moduleInstance != undefined && moduleInstance.isAlwaysActive() == true) { - return moduleInstance; - } - if (syneriseInitialized == false) { - console.error("Synerise is not initialized, please use Synerise.Initializer first."); - } - if (moduleInstance != undefined && moduleInstance.isActive == true) { - return moduleInstance; - } - else { - console.error("Synerise " + this.getModuleName(moduleIdentifier) + " module is not available now."); - } - }; - return SyneriseModuleController; -}()); -var onSyneriseReady; -var onSyneriseError; -var SyneriseInitializer = /** @class */ (function () { - function SyneriseInitializer() { - RNSynerise.createInitializer(); - } - SyneriseInitializer.isSyneriseInitialized = function () { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNSynerise.isSyneriseInitialized, []); - }; - SyneriseInitializer.invokeOnReadyCallback = function () { - if (onSyneriseReady !== undefined) { - onSyneriseReady(); - } - }; - SyneriseInitializer.invokeOnErrorCallback = function (errorObject) { - if (onSyneriseError !== undefined) { - var error = Error_1.ErrorMapper.getErrorInstance(errorObject); - onSyneriseError(error); - } - }; - SyneriseInitializer.prototype.withClientApiKey = function (clientApiKey) { - RNSynerise.withClientApiKey(clientApiKey); - return this; - }; - SyneriseInitializer.prototype.withBaseUrl = function (baseUrl) { - RNSynerise.withBaseUrl(baseUrl); - return this; - }; - SyneriseInitializer.prototype.withDebugModeEnabled = function (debugModeEnabled) { - RNSynerise.withDebugModeEnabled(debugModeEnabled); - return this; - }; - SyneriseInitializer.prototype.withCrashHandlingEnabled = function (crashHandlingEnabled) { - RNSynerise.withCrashHandlingEnabled(crashHandlingEnabled); - return this; - }; - SyneriseInitializer.prototype.withSettings = function (settings) { - this.settings = settings; - return this; - }; - SyneriseInitializer.prototype.init = function () { - var _this = this; - if (SyneriseInitializer.isSyneriseInitialized() == true) { - console.warn("Synerise.Initializer.init: Synerise is already initialized. It may be due to React Native Reload."); - this.setup(); - syneriseInitialized = true; - SyneriseInitializer.invokeOnReadyCallback(); - return; - } - if (syneriseInitCalled == true) { - console.warn("Synerise.Initializer.init: already called"); - return; - } - syneriseInitCalled = true; - if (this.settings !== undefined) { - Synerise.Settings.set(this.settings); - } - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNSynerise.INITIALIZATION_SUCCESS_LISTENER_KEY, function () { - _this.setup(); - RNSynerise.syneriseInitialized(); - syneriseInitialized = true; - SyneriseInitializer.invokeOnReadyCallback(); - syneriseInitCalled = false; - }); - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNSynerise.INITIALIZATION_FAILURE_LISTENER_KEY, function (errorObject) { - SyneriseInitializer.invokeOnErrorCallback(errorObject); - syneriseInitCalled = false; - }); - RNSynerise.initializeSynerise(); - }; - SyneriseInitializer.prototype.setupModules = function () { - syneriseModuleController.setupModules(); - }; - SyneriseInitializer.prototype.setup = function () { - this.setupModules(); - }; - return SyneriseInitializer; -}()); -exports.SyneriseInitializer = SyneriseInitializer; -var syneriseModuleController = new SyneriseModuleController(); -var syneriseInitCalled = false; -var syneriseInitialized = false; -var Synerise = /** @class */ (function () { - function Synerise() { - console.warn("Synerise.constructor is not allowed, please use Synerise.Initializer instead."); - } - Synerise.isInitialized = function () { - return SyneriseInitializer.isSyneriseInitialized(); - }; - Synerise.onReady = function (callback) { - onSyneriseReady = callback; - if (syneriseInitialized == true) { - SyneriseInitializer.invokeOnReadyCallback(); - } - }; - Synerise.onError = function (callback) { - onSyneriseError = callback; - }; - Synerise.changeClientApiKey = function (clientApiKey) { - if (SyneriseInitializer.isSyneriseInitialized()) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNSynerise.changeClientApiKey, [clientApiKey]); - } - else { - console.warn("Synerise.changeClientApiKey: Synerise is not initialized, please use Synerise.Initializer first."); - } - }; - Object.defineProperty(Synerise, "Settings", { - get: function () { - return syneriseModuleController.getModule(ModuleIdentifier.SETTINGS); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Synerise, "Client", { - get: function () { - return syneriseModuleController.getModule(ModuleIdentifier.CLIENT); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Synerise, "Tracker", { - get: function () { - return syneriseModuleController.getModule(ModuleIdentifier.TRACKER); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Synerise, "Notifications", { - get: function () { - return syneriseModuleController.getModule(ModuleIdentifier.NOTIFICATIONS); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Synerise, "Injector", { - get: function () { - return syneriseModuleController.getModule(ModuleIdentifier.INJECTOR); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Synerise, "Promotions", { - get: function () { - return syneriseModuleController.getModule(ModuleIdentifier.PROMOTIONS); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Synerise, "Content", { - get: function () { - return syneriseModuleController.getModule(ModuleIdentifier.CONTENT); - }, - enumerable: true, - configurable: true - }); - Synerise.Initializer = function () { - var initializer = new SyneriseInitializer(); - return initializer; - }; - return Synerise; -}()); -exports.Synerise = Synerise; diff --git a/lib/main/communication/SyneriseModuleConnector.d.ts b/lib/main/communication/SyneriseModuleConnector.d.ts deleted file mode 100644 index 7fbbd1a..0000000 --- a/lib/main/communication/SyneriseModuleConnector.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Error } from './../../classes/types/Error'; -import { ModelMapper } from './../../classes/models/BaseModel'; -declare type SyneriseModuleMethodSuccessCallback = (response: any) => void; -declare type SyneriseModuleMethodFailureCallback = (error: Error) => void; -declare class SyneriseModuleConnector { - static invokeMethod(method: Function, args: Array): void; - static invokeMethodWithReturnValue(method: Function, args: Array, modelMapper?: ModelMapper): any; - static invokeMethodWithCallback(method: Function, args: Array, onSuccessCallback: SyneriseModuleMethodSuccessCallback, onFailureCallback: SyneriseModuleMethodFailureCallback, modelMapper?: ModelMapper): void; - static mapResponseObjectToModelClass(modelMapper: ModelMapper, responseObject: object): any; -} -export { SyneriseModuleConnector }; diff --git a/lib/main/communication/SyneriseModuleConnector.js b/lib/main/communication/SyneriseModuleConnector.js deleted file mode 100644 index 9bbb695..0000000 --- a/lib/main/communication/SyneriseModuleConnector.js +++ /dev/null @@ -1,202 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var Error_1 = require("./../../classes/types/Error"); -var SyneriseModuleMethodType; -(function (SyneriseModuleMethodType) { - SyneriseModuleMethodType[SyneriseModuleMethodType["CALLBACK"] = 0] = "CALLBACK"; - SyneriseModuleMethodType[SyneriseModuleMethodType["RETURN_VALUE"] = 1] = "RETURN_VALUE"; - SyneriseModuleMethodType[SyneriseModuleMethodType["ONLY_EXECUTE"] = 2] = "ONLY_EXECUTE"; -})(SyneriseModuleMethodType || (SyneriseModuleMethodType = {})); -var SyneriseModuleMethod = /** @class */ (function () { - function SyneriseModuleMethod(method, args, type) { - this.isFinish = false; - this.isSuccess = false; - this.isFailure = true; - this.response = null; - this.method = method; - this.args = args || []; - this.type = type; - } - SyneriseModuleMethod.prototype.invoke = function () { - this.configure(); - try { - var returnValue = this.method.apply(this, this.args); - this.handleReturnValue(returnValue); - } - catch (error) { - console.error(error); - } - }; - SyneriseModuleMethod.prototype.validateMethod = function (method) { - return method && {}.toString.call(method) === '[object Function]'; - }; - SyneriseModuleMethod.prototype.handleReturnValue = function (returnValue) { - if (this.type == SyneriseModuleMethodType.ONLY_EXECUTE || this.isFinish == true) { - return; - } - if (this.type == SyneriseModuleMethodType.RETURN_VALUE) { - this.handleSuccessData(returnValue); - return; - } - }; - SyneriseModuleMethod.prototype.handleCallback = function (isSuccess, dataObject, errorObject) { - if (isSuccess == true) { - if (this.type == SyneriseModuleMethodType.ONLY_EXECUTE || this.isFinish == true) { - return; - } - if (this.type == SyneriseModuleMethodType.CALLBACK) { - this.handleSuccessData(dataObject); - return; - } - } - else { - this.handleError(errorObject); - } - }; - SyneriseModuleMethod.prototype.getResponse = function () { - return this.response; - }; - SyneriseModuleMethod.prototype.configure = function () { - this.addCallbackIfNeeded(); - }; - SyneriseModuleMethod.prototype.addCallbackIfNeeded = function () { - if (this.type == SyneriseModuleMethodType.CALLBACK) { - var thisObject_1 = this; - var methodCompletionHandler = function (isSuccess, dataObject, errorObject) { - thisObject_1.handleCallback(isSuccess, dataObject, errorObject); - }; - this.args.push(methodCompletionHandler); - } - }; - SyneriseModuleMethod.prototype.handleSuccessData = function (data) { - this.isFinish = true; - this.isSuccess = true; - var response = data == undefined || data == null ? true : data; - this.response = response; - if (this.onSuccess != null) { - this.onSuccess(response); - } - }; - SyneriseModuleMethod.prototype.handleError = function (errorObject) { - this.isFinish = true; - this.isFailure = true; - if (this.onFailure != null) { - var syneriseError = Error_1.ErrorMapper.getErrorInstance(errorObject); - this.onFailure(syneriseError); - } - }; - return SyneriseModuleMethod; -}()); -var SyneriseModuleConnectorWorker = /** @class */ (function () { - function SyneriseModuleConnectorWorker() { - this.moduleMethodInstance = null; - } - SyneriseModuleConnectorWorker.prototype.withMethod = function (method) { - this.method = method; - return this; - }; - SyneriseModuleConnectorWorker.prototype.withArgs = function (args) { - this.args = args || []; - return this; - }; - SyneriseModuleConnectorWorker.prototype.withType = function (type) { - this.type = type; - return this; - }; - SyneriseModuleConnectorWorker.prototype.onSuccess = function (onSuccess) { - this.successCallback = onSuccess; - return this; - }; - SyneriseModuleConnectorWorker.prototype.onFailure = function (onFailure) { - this.failureCallback = onFailure; - return this; - }; - SyneriseModuleConnectorWorker.prototype.execute = function () { - if (this.method == undefined || this.args == undefined || this.type == undefined) { - if (this.failureCallback != undefined) { - var error = Error_1.ErrorProvider.getModuleConnectorBadParametersError(); - this.failureCallback(error); - return null; - } - else { - return null; - } - } - this.moduleMethodInstance = new SyneriseModuleMethod(this.method, this.args, this.type); - var successCallback = this.successCallback; - var failureCallback = this.failureCallback; - this.moduleMethodInstance.onSuccess = function (response) { - if (successCallback != undefined) { - successCallback(response); - } - }; - this.moduleMethodInstance.onFailure = function (error) { - if (failureCallback != undefined) { - failureCallback(error); - } - }; - this.moduleMethodInstance.invoke(); - return this; - }; - SyneriseModuleConnectorWorker.prototype.response = function () { - if (this.moduleMethodInstance != null) { - return this.moduleMethodInstance.getResponse(); - } - return null; - }; - return SyneriseModuleConnectorWorker; -}()); -var SyneriseModuleConnector = /** @class */ (function () { - function SyneriseModuleConnector() { - } - SyneriseModuleConnector.invokeMethod = function (method, args) { - var worker = new SyneriseModuleConnectorWorker() - .withMethod(method) - .withArgs(args) - .withType(SyneriseModuleMethodType.ONLY_EXECUTE) - .execute(); - }; - SyneriseModuleConnector.invokeMethodWithReturnValue = function (method, args, modelMapper) { - var worker = new SyneriseModuleConnectorWorker() - .withMethod(method) - .withArgs(args) - .withType(SyneriseModuleMethodType.RETURN_VALUE) - .execute(); - if (worker != null) { - var response = worker.response(); - if (response != null && response != undefined) { - if (modelMapper != null) { - return SyneriseModuleConnector.mapResponseObjectToModelClass(modelMapper, response); - } - } - return response; - } - return undefined; - }; - SyneriseModuleConnector.invokeMethodWithCallback = function (method, args, onSuccessCallback, onFailureCallback, modelMapper) { - var worker = new SyneriseModuleConnectorWorker() - .withMethod(method) - .withArgs(args) - .withType(SyneriseModuleMethodType.CALLBACK) - .onSuccess(function (response) { - if (onSuccessCallback != null) { - var responseObject = response; - if (modelMapper != null) { - responseObject = SyneriseModuleConnector.mapResponseObjectToModelClass(modelMapper, responseObject); - } - onSuccessCallback(responseObject); - } - }) - .onFailure(function (error) { - if (onFailureCallback != null) { - onFailureCallback(error); - } - }) - .execute(); - }; - SyneriseModuleConnector.mapResponseObjectToModelClass = function (modelMapper, responseObject) { - return modelMapper.getModelInstance(responseObject); - }; - return SyneriseModuleConnector; -}()); -exports.SyneriseModuleConnector = SyneriseModuleConnector; diff --git a/lib/main/communication/SyneriseModuleEmitter.d.ts b/lib/main/communication/SyneriseModuleEmitter.d.ts deleted file mode 100644 index 4820f28..0000000 --- a/lib/main/communication/SyneriseModuleEmitter.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { EventEmitter } from 'react-native'; -declare class SyneriseModuleEmitter { - static getEmitter(): EventEmitter; -} -export { SyneriseModuleEmitter }; diff --git a/lib/main/communication/SyneriseModuleEmitter.js b/lib/main/communication/SyneriseModuleEmitter.js deleted file mode 100644 index ba3ae87..0000000 --- a/lib/main/communication/SyneriseModuleEmitter.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var react_native_1 = require("react-native"); -var SyneriseModuleEmitter = /** @class */ (function () { - function SyneriseModuleEmitter() { - } - SyneriseModuleEmitter.getEmitter = function () { - if (react_native_1.Platform.OS === 'ios') { - return new react_native_1.NativeEventEmitter(react_native_1.NativeModules.RNSyneriseEventEmitter); - } - return react_native_1.DeviceEventEmitter; - }; - return SyneriseModuleEmitter; -}()); -exports.SyneriseModuleEmitter = SyneriseModuleEmitter; diff --git a/lib/main/modules/BaseModule.d.ts b/lib/main/modules/BaseModule.d.ts deleted file mode 100644 index 4f5051b..0000000 --- a/lib/main/modules/BaseModule.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare class BaseModule { - isActive: boolean; - constructor(); - configure(configuration: object): void; - isAlwaysActive(): boolean; -} -export { BaseModule }; diff --git a/lib/main/modules/BaseModule.js b/lib/main/modules/BaseModule.js deleted file mode 100644 index 931721a..0000000 --- a/lib/main/modules/BaseModule.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var BaseModule = /** @class */ (function () { - function BaseModule() { - this.isActive = false; - } - BaseModule.prototype.configure = function (configuration) { }; - BaseModule.prototype.isAlwaysActive = function () { - return false; - }; - return BaseModule; -}()); -exports.BaseModule = BaseModule; diff --git a/lib/main/modules/ClientModule.d.ts b/lib/main/modules/ClientModule.d.ts deleted file mode 100644 index 2d334e5..0000000 --- a/lib/main/modules/ClientModule.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { BaseModule as Module } from './BaseModule'; -import { ClientAccountRegisterContext } from './../../classes/models/Client/ClientAccountRegisterContext'; -import { ClientAccountUpdateContext } from './../../classes/models/Client/ClientAccountUpdateContext'; -import { ClientAccountInformation } from './../../classes/models/Client/ClientAccountInformation'; -import { ClientAuthContext } from '../../classes/models/Client/ClientAuthContext'; -import { ClientOAuthAuthenticationContext } from '../../classes/models/Client/ClientOAuthAuthenticationContext'; -import { ClientFacebookAuthenticationContext } from '../../classes/models/Client/ClientFacebookAuthenticationContext'; -import { ClientAppleSignInAuthenticationContext } from '../../classes/models/Client/ClientAppleSignInAuthenticationContext'; -import { ClientIdentityProvider } from '../../classes/models/Client/ClientIdentityProvider'; -import { ClientSessionEndReason } from '../../classes/models/Client/ClientSessionEndReason'; -import { ClientConditionalAuthResult } from '../../classes/models/Client/ClientConditionalAuthResult'; -import { Token } from './../../classes/models/Token/Token'; -import { Error } from './../../classes/types/Error'; -interface IClientStateChangeListener { - onClientSignedIn?(): void; - onClientSignedOut?(reason: ClientSessionEndReason): void; -} -declare class ClientModule extends Module { - private static _instance; - private listener; - static instance(): ClientModule; - private constructor(); - private configureListeners; - private configureClientSignedInListener; - private configureClientSignedOutListener; - private onClientSignedIn; - private onClientSignedOut; - setClientStateChangeListener(listener: IClientStateChangeListener): void; - registerAccount(context: ClientAccountRegisterContext, onSuccess: () => void, onError: (error: Error) => void): void; - confirmAccount(token: string, onSuccess: () => void, onError: (error: Error) => void): void; - activateAccount(email: string, onSuccess: () => void, onError: (error: Error) => void): void; - signIn(email: string, password: string, onSuccess: () => void, onError: (error: Error) => void): void; - signInConditionally(email: string, password: string, onSuccess: (authResult: ClientConditionalAuthResult) => void, onError: (error: Error) => void): void; - authenticate(token: string, provider: ClientIdentityProvider, context: ClientAuthContext, onSuccess: () => void, onError: (error: Error) => void): void; - authenticateConditionally(token: string, provider: ClientIdentityProvider, context: ClientAuthContext, onSuccess: (authResult: ClientConditionalAuthResult) => void, onError: (error: Error) => void): void; - /** - * @deprecated please use authenticate method with OAuth provider instead - */ - authenticateByOAuth(accessToken: string, context: ClientOAuthAuthenticationContext, onSuccess: () => void, onError: (error: Error) => void): void; - /** - * @deprecated please use authenticateConditionally method with OAuth provider instead - */ - authenticateByOAuthIfRegistered(accessToken: string, authID: string | null, onSuccess: () => void, onError: (error: Error) => void): void; - /** - * @deprecated please use authenticate method with Facebook provider instead - */ - authenticateByFacebook(facebookToken: string, context: ClientFacebookAuthenticationContext, onSuccess: () => void, onError: (error: Error) => void): void; - /** - * @deprecated please use authenticateConditionally method with Facebook provider instead - */ - authenticateByFacebookIfRegistered(facebookToken: string, authID: string | null, onSuccess: () => void, onError: (error: Error) => void): void; - authenticateByAppleSignIn(identityToken: string, context: ClientAppleSignInAuthenticationContext, onSuccess: () => void, onError: (error: Error) => void): void; - authenticateByAppleSignInIfRegistered(identityToken: string, authID: string, onSuccess: () => void, onError: (error: Error) => void): void; - isSignedIn(): boolean; - signOut(): void; - refreshToken(onSuccess: () => void, onError: (error: Error) => void): void; - retrieveToken(onSuccess: (token: Token) => void, onError: (error: Error) => void): void; - getUUID(): string; - regenerateUUID(): void; - regenerateUUIDWithClientIdentifier(clientIdentifier: string): void; - destroySession(): void; - getAccount(onSuccess: (clientAccountInformation: ClientAccountInformation) => void, onError: (error: Error) => void): void; - updateAccount(context: ClientAccountUpdateContext, onSuccess: () => void, onError: (error: Error) => void): void; - requestPasswordReset(email: string, onSuccess: () => void, onError: (error: Error) => void): void; - confirmPasswordReset(password: string, token: string, onSuccess: () => void, onError: (error: Error) => void): void; - changePassword(oldPassword: string, newPassword: string, onSuccess: () => void, onError: (error: Error) => void): void; - requestEmailChange(email: string, password: string | null, externalToken: string | null, authID: string | null, onSuccess: () => void, onError: (error: Error) => void): void; - confirmEmailChange(token: string, newsletterAgreement: Boolean, onSuccess: () => void, onError: (error: Error) => void): void; - requestPhoneUpdate(phone: string, onSuccess: () => void, onError: (error: Error) => void): void; - confirmPhoneUpdate(phone: string, confirmationCode: string, smsAgreement: Boolean, onSuccess: () => void, onError: (error: Error) => void): void; - requestAccountActivationByPin(email: string, onSuccess: () => void, onError: (error: Error) => void): void; - confirmAccountActivationByPin(pinCode: string, email: string, onSuccess: () => void, onError: (error: Error) => void): void; - deleteAccountByIdentityProvider(clientAuthFactor: string, clientIdentityProvider: ClientIdentityProvider, authID: string | null, onSuccess: () => void, onError: (error: Error) => void): void; - deleteAccount(password: string, onSuccess: () => void, onError: (error: Error) => void): void; - deleteAccountByOAuth(accessToken: string, onSuccess: () => void, onError: (error: Error) => void): void; - deleteAccountByFacebook(facebookToken: string, onSuccess: () => void, onError: (error: Error) => void): void; - recognizeAnonymous(email: string | null, customIdentify: string | null, parameters: Record | null): void; -} -export { ClientModule, IClientStateChangeListener }; diff --git a/lib/main/modules/ClientModule.js b/lib/main/modules/ClientModule.js deleted file mode 100644 index 9a87e8b..0000000 --- a/lib/main/modules/ClientModule.js +++ /dev/null @@ -1,199 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var react_native_1 = require("react-native"); -var SyneriseModuleConnector_1 = require("./../communication/SyneriseModuleConnector"); -var BaseModel_1 = require("./../../classes/models/BaseModel"); -var BaseModule_1 = require("./BaseModule"); -var ClientAccountInformation_1 = require("./../../classes/models/Client/ClientAccountInformation"); -var ClientSessionEndReason_1 = require("../../classes/models/Client/ClientSessionEndReason"); -var ClientConditionalAuthResult_1 = require("../../classes/models/Client/ClientConditionalAuthResult"); -var Token_1 = require("./../../classes/models/Token/Token"); -var SyneriseModuleEmitter_1 = require("./../communication/SyneriseModuleEmitter"); -var RNClient = react_native_1.NativeModules.RNClient; -var ClientModule = /** @class */ (function (_super) { - __extends(ClientModule, _super); - function ClientModule() { - var _this = _super.call(this) || this; - _this.onClientSignedIn = function () { - if (_this.listener !== undefined && _this.listener.onClientSignedIn != undefined) { - _this.listener.onClientSignedIn(); - } - }; - _this.onClientSignedOut = function (event) { - if (_this.listener !== undefined && _this.listener.onClientSignedOut != undefined) { - var reason = ClientSessionEndReason_1.ClientSessionEndReasonFromString(event.reason); - _this.listener.onClientSignedOut(reason); - } - }; - _this.configureListeners(); - return _this; - } - ClientModule.instance = function () { - if (this._instance === undefined) { - this._instance = new ClientModule(); - } - return this._instance; - }; - ClientModule.prototype.configureListeners = function () { - this.configureClientSignedInListener(); - this.configureClientSignedOutListener(); - }; - ClientModule.prototype.configureClientSignedInListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNClient.CLIENT_SIGNED_IN_LISTENER_KEY, this.onClientSignedIn); - }; - ClientModule.prototype.configureClientSignedOutListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNClient.CLIENT_SIGNED_OUT_LISTENER_KEY, this.onClientSignedOut); - }; - ClientModule.prototype.setClientStateChangeListener = function (listener) { - this.listener = listener; - }; - ClientModule.prototype.registerAccount = function (context, onSuccess, onError) { - var contextObject = context.toObject(); - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.registerAccount, [contextObject], onSuccess, onError); - }; - ClientModule.prototype.confirmAccount = function (token, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.confirmAccount, [token], onSuccess, onError); - }; - ClientModule.prototype.activateAccount = function (email, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.activateAccount, [email], onSuccess, onError); - }; - ClientModule.prototype.signIn = function (email, password, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.signIn, [email, password], onSuccess, onError); - }; - ClientModule.prototype.signInConditionally = function (email, password, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.signInConditionally, [email, password], onSuccess, onError, BaseModel_1.ModelMapper.make(ClientConditionalAuthResult_1.ClientConditionalAuthResult)); - }; - ClientModule.prototype.authenticate = function (token, provider, context, onSuccess, onError) { - var contextObject = context.toObject(); - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.authenticate, [token, provider, contextObject], onSuccess, onError); - }; - ClientModule.prototype.authenticateConditionally = function (token, provider, context, onSuccess, onError) { - var contextObject = context.toObject(); - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.authenticateConditionally, [token, provider, contextObject], onSuccess, onError, BaseModel_1.ModelMapper.make(ClientConditionalAuthResult_1.ClientConditionalAuthResult)); - }; - /** - * @deprecated please use authenticate method with OAuth provider instead - */ - ClientModule.prototype.authenticateByOAuth = function (accessToken, context, onSuccess, onError) { - var contextObject = context.toObject(); - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.authenticateByOAuth, [accessToken, contextObject], onSuccess, onError); - }; - /** - * @deprecated please use authenticateConditionally method with OAuth provider instead - */ - ClientModule.prototype.authenticateByOAuthIfRegistered = function (accessToken, authID, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.authenticateByOAuthIfRegistered, [accessToken, authID], onSuccess, onError); - }; - /** - * @deprecated please use authenticate method with Facebook provider instead - */ - ClientModule.prototype.authenticateByFacebook = function (facebookToken, context, onSuccess, onError) { - var contextObject = context.toObject(); - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.authenticateByFacebook, [facebookToken, contextObject], onSuccess, onError); - }; - /** - * @deprecated please use authenticateConditionally method with Facebook provider instead - */ - ClientModule.prototype.authenticateByFacebookIfRegistered = function (facebookToken, authID, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.authenticateByFacebookIfRegistered, [facebookToken, authID], onSuccess, onError); - }; - ClientModule.prototype.authenticateByAppleSignIn = function (identityToken, context, onSuccess, onError) { - if (react_native_1.Platform.OS !== 'ios') { - console.error('Synerise.Client.authenticateByAppleSignIn method works on iOS platform only!'); - return; - } - var contextObject = context.toObject(); - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.authenticateByAppleSignIn, [identityToken, contextObject], onSuccess, onError); - }; - ClientModule.prototype.authenticateByAppleSignInIfRegistered = function (identityToken, authID, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.authenticateByAppleSignInIfRegistered, [identityToken, authID], onSuccess, onError); - }; - ClientModule.prototype.isSignedIn = function () { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNClient.isSignedIn, []); - }; - ClientModule.prototype.signOut = function () { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNClient.signOut, []); - }; - ClientModule.prototype.refreshToken = function (onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.refreshToken, [], onSuccess, onError); - }; - ClientModule.prototype.retrieveToken = function (onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.retrieveToken, [], onSuccess, onError, BaseModel_1.ModelMapper.make(Token_1.Token)); - }; - ClientModule.prototype.getUUID = function () { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNClient.getUUID, []); - }; - ClientModule.prototype.regenerateUUID = function () { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNClient.regenerateUUID, []); - }; - ClientModule.prototype.regenerateUUIDWithClientIdentifier = function (clientIdentifier) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNClient.regenerateUUIDWithClientIdentifier, [clientIdentifier]); - }; - ClientModule.prototype.destroySession = function () { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNClient.destroySession, []); - }; - ClientModule.prototype.getAccount = function (onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.getAccount, [], onSuccess, onError, BaseModel_1.ModelMapper.make(ClientAccountInformation_1.ClientAccountInformation)); - }; - ClientModule.prototype.updateAccount = function (context, onSuccess, onError) { - var contextObject = context.toObject(); - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.updateAccount, [contextObject], onSuccess, onError); - }; - ClientModule.prototype.requestPasswordReset = function (email, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.requestPasswordReset, [email], onSuccess, onError); - }; - ClientModule.prototype.confirmPasswordReset = function (password, token, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.confirmPasswordReset, [password, token], onSuccess, onError); - }; - ClientModule.prototype.changePassword = function (oldPassword, newPassword, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.changePassword, [oldPassword, newPassword], onSuccess, onError); - }; - ClientModule.prototype.requestEmailChange = function (email, password, externalToken, authID, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.requestEmailChange, [email, password, externalToken, authID], onSuccess, onError); - }; - ClientModule.prototype.confirmEmailChange = function (token, newsletterAgreement, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.confirmEmailChange, [token, newsletterAgreement], onSuccess, onError); - }; - ClientModule.prototype.requestPhoneUpdate = function (phone, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.requestPhoneUpdate, [phone], onSuccess, onError); - }; - ClientModule.prototype.confirmPhoneUpdate = function (phone, confirmationCode, smsAgreement, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.confirmPhoneUpdate, [phone, confirmationCode, smsAgreement], onSuccess, onError); - }; - ClientModule.prototype.requestAccountActivationByPin = function (email, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.requestAccountActivationByPin, [email], onSuccess, onError); - }; - ClientModule.prototype.confirmAccountActivationByPin = function (pinCode, email, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.confirmAccountActivationByPin, [pinCode, email], onSuccess, onError); - }; - ClientModule.prototype.deleteAccountByIdentityProvider = function (clientAuthFactor, clientIdentityProvider, authID, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.deleteAccountByIdentityProvider, [clientAuthFactor, clientIdentityProvider, authID], onSuccess, onError); - }; - ClientModule.prototype.deleteAccount = function (password, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.deleteAccount, [password], onSuccess, onError); - }; - ClientModule.prototype.deleteAccountByOAuth = function (accessToken, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.deleteAccountByOAuth, [accessToken], onSuccess, onError); - }; - ClientModule.prototype.deleteAccountByFacebook = function (facebookToken, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNClient.deleteAccountByFacebook, [facebookToken], onSuccess, onError); - }; - ClientModule.prototype.recognizeAnonymous = function (email, customIdentify, parameters) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNClient.recognizeAnonymous, [email, customIdentify, parameters]); - }; - return ClientModule; -}(BaseModule_1.BaseModule)); -exports.ClientModule = ClientModule; diff --git a/lib/main/modules/ContentModule.d.ts b/lib/main/modules/ContentModule.d.ts deleted file mode 100644 index 90ce1f7..0000000 --- a/lib/main/modules/ContentModule.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { BaseModule as Module } from './BaseModule'; -import { DocumentsApiQuery } from '../../classes/api_queries/DocumentsApiQuery'; -import { RecommendationOptions } from '../../classes/models/Content/RecommendationOptions'; -import { RecommendationResponse } from '../../classes/models/Content/RecommendationResponse'; -import { Error } from '../..'; -import { ScreenViewResponse } from '../../config/import_models'; -declare class ContentModule extends Module { - private static _instance; - static instance(): ContentModule; - private constructor(); - getDocument(slug: string, onSuccess: (document: Object) => void, onError: (error: Error) => void): void; - getDocuments(apiQuery: DocumentsApiQuery, onSuccess: (documents: Array) => void, onError: (error: Error) => void): void; - getRecommendations(options: RecommendationOptions, onSuccess: (recommendationResponse: RecommendationResponse) => void, onError: (error: Error) => void): void; - getScreenView(onSuccess: (screenViewResponse: ScreenViewResponse) => void, onError: (error: Error) => void): void; -} -export { ContentModule }; diff --git a/lib/main/modules/ContentModule.js b/lib/main/modules/ContentModule.js deleted file mode 100644 index 55fd5b6..0000000 --- a/lib/main/modules/ContentModule.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var react_native_1 = require("react-native"); -var SyneriseModuleConnector_1 = require("../communication/SyneriseModuleConnector"); -var BaseModule_1 = require("./BaseModule"); -var BaseModel_1 = require("../../classes/models/BaseModel"); -var RecommendationResponse_1 = require("../../classes/models/Content/RecommendationResponse"); -var import_models_1 = require("../../config/import_models"); -var RNContent = react_native_1.NativeModules.RNContent; -var ContentModule = /** @class */ (function (_super) { - __extends(ContentModule, _super); - function ContentModule() { - return _super.call(this) || this; - } - ContentModule.instance = function () { - if (this._instance === undefined) { - this._instance = new ContentModule(); - } - return this._instance; - }; - ContentModule.prototype.getDocument = function (slug, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNContent.getDocument, [slug], onSuccess, onError); - }; - ContentModule.prototype.getDocuments = function (apiQuery, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNContent.getDocuments, [apiQuery], onSuccess, onError); - }; - ContentModule.prototype.getRecommendations = function (options, onSuccess, onError) { - var optionsObject = options.toObject(); - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNContent.getRecommendations, [optionsObject], onSuccess, onError, BaseModel_1.ModelMapper.make(RecommendationResponse_1.RecommendationResponse)); - }; - ContentModule.prototype.getScreenView = function (onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNContent.getScreenView, [], onSuccess, onError, BaseModel_1.ModelMapper.make(import_models_1.ScreenViewResponse)); - }; - return ContentModule; -}(BaseModule_1.BaseModule)); -exports.ContentModule = ContentModule; diff --git a/lib/main/modules/InjectorModule.d.ts b/lib/main/modules/InjectorModule.d.ts deleted file mode 100644 index 8de11a5..0000000 --- a/lib/main/modules/InjectorModule.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { BaseModule as Module } from './BaseModule'; -import { Error } from './../../classes/types/Error'; -interface IInjectorListener { - onOpenUrl(url: string): void; - onDeepLink(deepLink: string): void; -} -interface IInjectorBannerListener { - onPresent?(): void; - onHide?(): void; -} -interface IInjectorWalkthroughListener { - onLoad?(): void; - onLoadingError?(error: Error): void; - onPresent?(): void; - onHide?(): void; -} -declare class InjectorModule extends Module { - private static _instance; - private listener; - private bannerListener; - private walkthroughListener; - static instance(): InjectorModule; - private constructor(); - private configureListeners; - private configureMainListener; - private configureBannerListener; - private configureWalkthroughListener; - private configureUrlActionListener; - private configureDeepLinkActionListener; - private configureBannerPresentedListener; - private configureBannerHiddenListener; - private configureWalkthroughLoadedListener; - private configureWalkthroughLoadingErrorListener; - private configureWalkthroughPresentedListener; - private configureWalkthroughHiddenListener; - private onUrlAction; - private onDeepLinkAction; - private onPresentBanner; - private onHideBanner; - private onLoadWalkthrough; - private onLoadingErrorWalkthrough; - private onPresentWalkthrough; - private onHideWalkthrough; - setListener(listener: IInjectorListener): void; - setBannerListener(listener: IInjectorBannerListener): void; - setShouldBannerPresentFlag(shouldPresentBanner: boolean): void; - fetchBanners(onSuccess: (banners: Array) => void, onError: (error: Error) => void): void; - getBanners(): Array; - showBanner(banner: object, markPresented: boolean): void; - setWalkthroughListener(listener: IInjectorWalkthroughListener): void; - getWalkthrough(): void; - showWalkthrough(): void; - isWalkthroughLoaded(): boolean; - isLoadedWalkthroughUnique(): boolean; -} -export { InjectorModule, IInjectorListener }; diff --git a/lib/main/modules/InjectorModule.js b/lib/main/modules/InjectorModule.js deleted file mode 100644 index 40c3496..0000000 --- a/lib/main/modules/InjectorModule.js +++ /dev/null @@ -1,154 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var react_native_1 = require("react-native"); -var BaseModule_1 = require("./BaseModule"); -var SyneriseModuleConnector_1 = require("./../communication/SyneriseModuleConnector"); -var SyneriseModuleEmitter_1 = require("./../communication/SyneriseModuleEmitter"); -var Error_1 = require("./../../classes/types/Error"); -var RNInjector = react_native_1.NativeModules.RNInjector; -var InjectorModule = /** @class */ (function (_super) { - __extends(InjectorModule, _super); - function InjectorModule() { - var _this = _super.call(this) || this; - _this.onUrlAction = function (event) { - if (_this.listener !== undefined) { - _this.listener.onOpenUrl(event.url); - } - }; - _this.onDeepLinkAction = function (event) { - if (_this.listener !== undefined) { - _this.listener.onDeepLink(event.deepLink); - } - }; - _this.onPresentBanner = function () { - if (_this.bannerListener !== undefined && _this.bannerListener.onPresent != undefined) { - _this.bannerListener.onPresent(); - } - }; - _this.onHideBanner = function () { - if (_this.bannerListener !== undefined && _this.bannerListener.onHide != undefined) { - _this.bannerListener.onHide(); - } - }; - _this.onLoadWalkthrough = function () { - if (_this.walkthroughListener !== undefined && _this.walkthroughListener.onLoad != undefined) { - _this.walkthroughListener.onLoad(); - } - }; - _this.onLoadingErrorWalkthrough = function (errorObject) { - if (_this.walkthroughListener !== undefined && _this.walkthroughListener.onLoadingError != undefined) { - var error = Error_1.ErrorMapper.getErrorInstance(errorObject); - _this.walkthroughListener.onLoadingError(error); - } - }; - _this.onPresentWalkthrough = function () { - if (_this.walkthroughListener !== undefined && _this.walkthroughListener.onPresent != undefined) { - _this.walkthroughListener.onPresent(); - } - }; - _this.onHideWalkthrough = function () { - if (_this.walkthroughListener !== undefined && _this.walkthroughListener.onHide != undefined) { - _this.walkthroughListener.onHide(); - } - }; - _this.configureListeners(); - return _this; - } - InjectorModule.instance = function () { - if (this._instance === undefined) { - this._instance = new InjectorModule(); - } - return this._instance; - }; - InjectorModule.prototype.configureListeners = function () { - this.configureMainListener(); - this.configureBannerListener(); - this.configureWalkthroughListener(); - }; - InjectorModule.prototype.configureMainListener = function () { - this.configureUrlActionListener(); - this.configureDeepLinkActionListener(); - }; - InjectorModule.prototype.configureBannerListener = function () { - this.configureBannerPresentedListener(); - this.configureBannerHiddenListener(); - }; - InjectorModule.prototype.configureWalkthroughListener = function () { - this.configureWalkthroughLoadedListener(); - this.configureWalkthroughLoadingErrorListener(); - this.configureWalkthroughPresentedListener(); - this.configureWalkthroughHiddenListener(); - }; - InjectorModule.prototype.configureUrlActionListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNInjector.URL_ACTION_LISTENER_KEY, this.onUrlAction); - }; - InjectorModule.prototype.configureDeepLinkActionListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNInjector.DEEPLINK_ACTION_LISTENER_KEY, this.onDeepLinkAction); - }; - InjectorModule.prototype.configureBannerPresentedListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNInjector.BANNER_PRESENTED_LISTENER_KEY, this.onPresentBanner); - }; - InjectorModule.prototype.configureBannerHiddenListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNInjector.BANNER_HIDDEN_LISTENER_KEY, this.onHideBanner); - }; - InjectorModule.prototype.configureWalkthroughLoadedListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNInjector.WALKTHROUGH_LOADED_LISTENER_KEY, this.onLoadWalkthrough); - }; - InjectorModule.prototype.configureWalkthroughLoadingErrorListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNInjector.WALKTHROUGH_LOADING_ERROR_LISTENER_KEY, this.onLoadingErrorWalkthrough); - }; - InjectorModule.prototype.configureWalkthroughPresentedListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNInjector.WALKTHROUGH_PRESENTED_LISTENER_KEY, this.onPresentWalkthrough); - }; - InjectorModule.prototype.configureWalkthroughHiddenListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNInjector.WALKTHROUGH_HIDDEN_LISTENER_KEY, this.onHideWalkthrough); - }; - InjectorModule.prototype.setListener = function (listener) { - this.listener = listener; - }; - InjectorModule.prototype.setBannerListener = function (listener) { - this.bannerListener = listener; - }; - InjectorModule.prototype.setShouldBannerPresentFlag = function (shouldPresentBanner) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNInjector.setShouldBannerPresentFlag, [shouldPresentBanner]); - }; - InjectorModule.prototype.fetchBanners = function (onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNInjector.fetchBanners, [], onSuccess, onError); - }; - InjectorModule.prototype.getBanners = function () { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNInjector.getBanners, []); - }; - InjectorModule.prototype.showBanner = function (banner, markPresented) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNInjector.showBanner, [banner, markPresented]); - }; - InjectorModule.prototype.setWalkthroughListener = function (listener) { - this.walkthroughListener = listener; - }; - InjectorModule.prototype.getWalkthrough = function () { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNInjector.getWalkthrough, []); - }; - InjectorModule.prototype.showWalkthrough = function () { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNInjector.showWalkthrough, []); - }; - InjectorModule.prototype.isWalkthroughLoaded = function () { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNInjector.isWalkthroughLoaded, []); - }; - InjectorModule.prototype.isLoadedWalkthroughUnique = function () { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNInjector.isLoadedWalkthroughUnique, []); - }; - return InjectorModule; -}(BaseModule_1.BaseModule)); -exports.InjectorModule = InjectorModule; diff --git a/lib/main/modules/NotificationsModule.d.ts b/lib/main/modules/NotificationsModule.d.ts deleted file mode 100644 index c2f328f..0000000 --- a/lib/main/modules/NotificationsModule.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { BaseModule as Module } from './BaseModule'; -import { Error } from './../../classes/types/Error'; -interface INotificationsListener { - onRegistrationToken?(token: string): void; - onRegistrationRequired?(): void; - onNotification(payload: object, actionIdentifier: string | null): void; -} -declare class NotificationsModule extends Module { - private static _instance; - private listener; - static instance(): NotificationsModule; - private constructor(); - private configureListeners; - private configureRegistrationTokenListener; - private configureNotificationListener; - private configureRegistrationRequiredListener; - private onRegistrationToken; - private onNotification; - private onRegistrationRequired; - setListener(listener: INotificationsListener): void; - registerForNotifications(registrationToken: string, mobileAgreement: boolean, onSuccess: () => void, onError: (error: Error) => void): void; - isSyneriseNotification(payload: object): boolean; - isSyneriseSimplePush(payload: object): boolean; - isSyneriseBanner(payload: object): boolean; - isSilentCommand(payload: object): boolean; - isSilentSDKCommand(payload: object): boolean; - isNotificationEncrypted(payload: object): boolean; - decryptNotification(payload: object): object | null; - handleNotification(payload: object, actionIdentifier: string | null): void; -} -export { NotificationsModule, INotificationsListener }; diff --git a/lib/main/modules/NotificationsModule.js b/lib/main/modules/NotificationsModule.js deleted file mode 100644 index f5f2c83..0000000 --- a/lib/main/modules/NotificationsModule.js +++ /dev/null @@ -1,111 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var react_native_1 = require("react-native"); -var BaseModule_1 = require("./BaseModule"); -var SyneriseModuleConnector_1 = require("./../communication/SyneriseModuleConnector"); -var SyneriseModuleEmitter_1 = require("./../communication/SyneriseModuleEmitter"); -var DeviceUtils_1 = require("./../../classes/utils/DeviceUtils"); -var RNNotifications = react_native_1.NativeModules.RNNotifications; -var NotificationsModule = /** @class */ (function (_super) { - __extends(NotificationsModule, _super); - function NotificationsModule() { - var _this = _super.call(this) || this; - _this.onRegistrationToken = function (event) { - if (_this.listener !== undefined) { - if (_this.listener.onRegistrationToken !== undefined) { - _this.listener.onRegistrationToken(event.token); - } - } - }; - _this.onNotification = function (event) { - if (_this.listener !== undefined) { - _this.listener.onNotification(event.payload, event.actionIdentifier); - } - }; - _this.onRegistrationRequired = function () { - if (_this.listener !== undefined && _this.listener.onRegistrationRequired != undefined) { - _this.listener.onRegistrationRequired(); - } - }; - _this.configureListeners(); - return _this; - } - NotificationsModule.instance = function () { - if (this._instance === undefined) { - this._instance = new NotificationsModule(); - } - return this._instance; - }; - NotificationsModule.prototype.configureListeners = function () { - this.configureRegistrationTokenListener(); - this.configureRegistrationRequiredListener(); - this.configureNotificationListener(); - }; - NotificationsModule.prototype.configureRegistrationTokenListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNNotifications.REGISTRATION_TOKEN_LISTENER_KEY, this.onRegistrationToken); - }; - NotificationsModule.prototype.configureNotificationListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNNotifications.NOTIFICATION_LISTENER_KEY, this.onNotification); - }; - NotificationsModule.prototype.configureRegistrationRequiredListener = function () { - SyneriseModuleEmitter_1.SyneriseModuleEmitter.getEmitter().addListener(RNNotifications.REGISTRATION_REQUIRED_LISTENER_KEY, this.onRegistrationRequired); - }; - NotificationsModule.prototype.setListener = function (listener) { - this.listener = listener; - }; - NotificationsModule.prototype.registerForNotifications = function (registrationToken, mobileAgreement, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNNotifications.registerForNotifications, [registrationToken, mobileAgreement], onSuccess, onError); - }; - NotificationsModule.prototype.isSyneriseNotification = function (payload) { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNNotifications.isSyneriseNotification, [payload]); - }; - NotificationsModule.prototype.isSyneriseSimplePush = function (payload) { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNNotifications.isSyneriseSimplePush, [payload]); - }; - NotificationsModule.prototype.isSyneriseBanner = function (payload) { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNNotifications.isSyneriseBanner, [payload]); - }; - NotificationsModule.prototype.isSilentCommand = function (payload) { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNNotifications.isSilentCommand, [payload]); - }; - NotificationsModule.prototype.isSilentSDKCommand = function (payload) { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNNotifications.isSilentSDKCommand, [payload]); - }; - NotificationsModule.prototype.isNotificationEncrypted = function (payload) { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNNotifications.isNotificationEncrypted, [payload]); - }; - NotificationsModule.prototype.decryptNotification = function (payload) { - var decryptedPayloadObject = SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNNotifications.decryptNotification, [payload]); - var decryptionSuccess = decryptedPayloadObject[0]; - var decryptedObject = decryptedPayloadObject[1]; - if (decryptionSuccess == true && decryptedObject !== undefined) { - return decryptedObject; - } - else { - return null; - } - }; - NotificationsModule.prototype.handleNotification = function (payload, actionIdentifier) { - if (DeviceUtils_1.DeviceUtils.isPlatformIOS()) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNNotifications.handleNotification, [payload, actionIdentifier]); - } - else { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNNotifications.handleNotification, [payload]); - } - }; - return NotificationsModule; -}(BaseModule_1.BaseModule)); -exports.NotificationsModule = NotificationsModule; diff --git a/lib/main/modules/PromotionsModule.d.ts b/lib/main/modules/PromotionsModule.d.ts deleted file mode 100644 index abae61a..0000000 --- a/lib/main/modules/PromotionsModule.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { BaseModule as Module } from './BaseModule'; -import { PromotionsApiQuery } from './../../classes/api_queries/PromotionsApiQuery'; -import { PromotionResponse } from './../../classes/models/Promotions/PromotionResponse'; -import { Promotion } from './../../classes/models/Promotions/Promotion'; -import { AssignVoucherResponse } from './../../classes/models/Vouchers/AssignVoucherResponse'; -import { VoucherCodesResponse } from './../../classes/models/Vouchers/VoucherCodesResponse'; -import { Error } from './../../classes/types/Error'; -import { PromotionIdentifier } from '../../config/import_models'; -declare class PromotionsModule extends Module { - private static _instance; - static instance(): PromotionsModule; - private constructor(); - getAllPromotions(onSuccess: (promotionResponse: PromotionResponse) => void, onError: (error: Error) => void): void; - getPromotions(apiQuery: PromotionsApiQuery, onSuccess: (promotionResponse: PromotionResponse) => void, onError: (error: Error) => void): void; - getPromotionByUUID(uuid: string, onSuccess: (promotion: Promotion) => void, onError: (error: Error) => void): void; - getPromotionByCode(code: string, onSuccess: (promotion: Promotion) => void, onError: (error: Error) => void): void; - activatePromotionByUUID(uuid: string, onSuccess: () => void, onError: (error: Error) => void): void; - activatePromotionByCode(code: string, onSuccess: () => void, onError: (error: Error) => void): void; - deactivatePromotionByUUID(uuid: string, onSuccess: () => void, onError: (error: Error) => void): void; - deactivatePromotionByCode(code: string, onSuccess: () => void, onError: (error: Error) => void): void; - activatePromotionsBatch(promotionsIdentifiers: Array, onSuccess: () => void, onError: (error: Error) => void): void; - deactivatePromotionsBatch(promotionsIdentifiers: Array, onSuccess: () => void, onError: (error: Error) => void): void; - getOrAssignVoucher(poolUuid: string, onSuccess: (assignVoucherRespone: AssignVoucherResponse) => void, onError: (error: Error) => void): void; - assignVoucherCode(poolUuid: string, onSuccess: (assignVoucherRespone: AssignVoucherResponse) => void, onError: (error: Error) => void): void; - getAssignedVoucherCodes(onSuccess: (voucherCodesResponse: VoucherCodesResponse) => void, onError: (error: Error) => void): void; -} -export { PromotionsModule }; diff --git a/lib/main/modules/PromotionsModule.js b/lib/main/modules/PromotionsModule.js deleted file mode 100644 index 620c083..0000000 --- a/lib/main/modules/PromotionsModule.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var react_native_1 = require("react-native"); -var SyneriseModuleConnector_1 = require("./../communication/SyneriseModuleConnector"); -var BaseModel_1 = require("./../../classes/models/BaseModel"); -var BaseModule_1 = require("./BaseModule"); -var PromotionResponse_1 = require("./../../classes/models/Promotions/PromotionResponse"); -var Promotion_1 = require("./../../classes/models/Promotions/Promotion"); -var AssignVoucherResponse_1 = require("./../../classes/models/Vouchers/AssignVoucherResponse"); -var VoucherCodesResponse_1 = require("./../../classes/models/Vouchers/VoucherCodesResponse"); -var RNPromotions = react_native_1.NativeModules.RNPromotions; -var PromotionsModule = /** @class */ (function (_super) { - __extends(PromotionsModule, _super); - function PromotionsModule() { - return _super.call(this) || this; - } - PromotionsModule.instance = function () { - if (this._instance === undefined) { - this._instance = new PromotionsModule(); - } - return this._instance; - }; - PromotionsModule.prototype.getAllPromotions = function (onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.getAllPromotions, [], onSuccess, onError, BaseModel_1.ModelMapper.make(PromotionResponse_1.PromotionResponse)); - }; - PromotionsModule.prototype.getPromotions = function (apiQuery, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.getPromotions, [apiQuery], onSuccess, onError, BaseModel_1.ModelMapper.make(PromotionResponse_1.PromotionResponse)); - }; - PromotionsModule.prototype.getPromotionByUUID = function (uuid, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.getPromotionByUUID, [uuid], onSuccess, onError, BaseModel_1.ModelMapper.make(Promotion_1.Promotion)); - }; - PromotionsModule.prototype.getPromotionByCode = function (code, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.getPromotionByCode, [code], onSuccess, onError, BaseModel_1.ModelMapper.make(Promotion_1.Promotion)); - }; - PromotionsModule.prototype.activatePromotionByUUID = function (uuid, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.activatePromotionByUUID, [uuid], onSuccess, onError); - }; - PromotionsModule.prototype.activatePromotionByCode = function (code, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.activatePromotionByCode, [code], onSuccess, onError); - }; - PromotionsModule.prototype.deactivatePromotionByUUID = function (uuid, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.deactivatePromotionByUUID, [uuid], onSuccess, onError); - }; - PromotionsModule.prototype.deactivatePromotionByCode = function (code, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.deactivatePromotionByCode, [code], onSuccess, onError); - }; - PromotionsModule.prototype.activatePromotionsBatch = function (promotionsIdentifiers, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.activatePromotionsBatch, [promotionsIdentifiers], onSuccess, onError); - }; - PromotionsModule.prototype.deactivatePromotionsBatch = function (promotionsIdentifiers, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.deactivatePromotionsBatch, [promotionsIdentifiers], onSuccess, onError); - }; - PromotionsModule.prototype.getOrAssignVoucher = function (poolUuid, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.getOrAssignVoucher, [poolUuid], onSuccess, onError, BaseModel_1.ModelMapper.make(AssignVoucherResponse_1.AssignVoucherResponse)); - }; - PromotionsModule.prototype.assignVoucherCode = function (poolUuid, onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.assignVoucherCode, [poolUuid], onSuccess, onError, BaseModel_1.ModelMapper.make(AssignVoucherResponse_1.AssignVoucherResponse)); - }; - PromotionsModule.prototype.getAssignedVoucherCodes = function (onSuccess, onError) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNPromotions.getAssignedVoucherCodes, [], onSuccess, onError, BaseModel_1.ModelMapper.make(VoucherCodesResponse_1.VoucherCodesResponse)); - }; - return PromotionsModule; -}(BaseModule_1.BaseModule)); -exports.PromotionsModule = PromotionsModule; diff --git a/lib/main/modules/SettingsModule.d.ts b/lib/main/modules/SettingsModule.d.ts deleted file mode 100644 index 77bf2be..0000000 --- a/lib/main/modules/SettingsModule.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { BaseModule as Module } from './BaseModule'; -interface ISettingsOptions { - sdk?: { - enabled?: boolean; - appGroupIdentifier?: string; - keychainGroupIdentifier?: string; - minTokenRefreshInterval?: number; - shouldDestroySessionOnApiKeyChange?: boolean; - }; - tracker?: { - isBackendTimeSyncRequired?: boolean; - minBatchSize?: number; - maxBatchSize?: number; - autoFlushTimeout?: number; - }; - notifications?: { - enabled?: boolean; - encryption?: boolean; - disableInAppAlerts?: boolean; - }; - injector?: { - automatic?: boolean; - }; -} -declare class SettingsModule extends Module { - private static _instance; - sdk: { - enabled: any; - appGroupIdentifier: any; - keychainGroupIdentifier: any; - minTokenRefreshInterval: any; - shouldDestroySessionOnApiKeyChange: any; - }; - tracker: { - isBackendTimeSyncRequired: any; - minBatchSize: any; - maxBatchSize: any; - autoFlushTimeout: any; - }; - notifications: { - enabled: any; - encryption: any; - disableInAppAlerts: any; - }; - injector: { - automatic: any; - }; - static instance(): SettingsModule; - private constructor(); - isAlwaysActive(): boolean; - set(settingsOptions: ISettingsOptions): void; -} -export { ISettingsOptions, SettingsModule }; diff --git a/lib/main/modules/SettingsModule.js b/lib/main/modules/SettingsModule.js deleted file mode 100644 index 10d1ee4..0000000 --- a/lib/main/modules/SettingsModule.js +++ /dev/null @@ -1,182 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var react_native_1 = require("react-native"); -var DeviceUtils_1 = require("./../../classes/utils/DeviceUtils"); -var SyneriseModuleConnector_1 = require("./../communication/SyneriseModuleConnector"); -var BaseModule_1 = require("./BaseModule"); -var RNSettings = react_native_1.NativeModules.RNSettings; -function mapSettingsKeyAndValueForNativeModule(key, value) { - return { - key: key, - value: value, - }; -} -function mapSettingsOptionsForNativeModule(settingsOptions) { - return { - SDK_ENABLED: settingsOptions.sdk && settingsOptions.sdk.enabled, - SDK_APP_GROUP_IDENTIFIER: settingsOptions.sdk && settingsOptions.sdk.appGroupIdentifier, - SDK_KEYCHAIN_GROUP_IDENTIFIER: settingsOptions.sdk && settingsOptions.sdk.keychainGroupIdentifier, - SDK_MIN_TOKEN_REFRESH_INTERVAL: settingsOptions.sdk && settingsOptions.sdk.minTokenRefreshInterval, - SDK_SHOULD_DESTROY_SESSION_ON_API_KEY_CHANGE: settingsOptions.sdk && settingsOptions.sdk.shouldDestroySessionOnApiKeyChange, - TRACKER_IS_BACKEND_TIME_SYNC_REQUIRED: settingsOptions.tracker && settingsOptions.tracker.isBackendTimeSyncRequired, - TRACKER_MIN_BATCH_SIZE: settingsOptions.tracker && settingsOptions.tracker.minBatchSize, - TRACKER_MAX_BATCH_SIZE: settingsOptions.tracker && settingsOptions.tracker.maxBatchSize, - TRACKER_AUTO_FLUSH_TIMEOUT: settingsOptions.tracker && settingsOptions.tracker.autoFlushTimeout, - NOTIFICATIONS_ENABLED: settingsOptions.notifications && settingsOptions.notifications.enabled, - NOTIFICATIONS_ENCRYPTION: settingsOptions.notifications && settingsOptions.notifications.encryption, - NOTIFICATIONS_DISABLE_IN_APP_ALERTS: settingsOptions.notifications && settingsOptions.notifications.disableInAppAlerts, - INJECTOR_AUTOMATIC: settingsOptions.injector && settingsOptions.injector.automatic, - }; -} -function getOne(key) { - return SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithReturnValue(RNSettings.getOne, [key]); -} -function setOne(key, value) { - var settingsOneOption = mapSettingsKeyAndValueForNativeModule(key, value); - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNSettings.setOne, [settingsOneOption]); -} -function setMany(settingsOptions) { - var settingsManyOptions = mapSettingsOptionsForNativeModule(settingsOptions); - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNSettings.setMany, [settingsManyOptions]); -} -var SettingsModule = /** @class */ (function (_super) { - __extends(SettingsModule, _super); - function SettingsModule() { - var _this = _super.call(this) || this; - _this.sdk = { - get enabled() { - return getOne(RNSettings.SDK_ENABLED); - }, - set enabled(value) { - setOne(RNSettings.SDK_ENABLED, value); - }, - get appGroupIdentifier() { - if (DeviceUtils_1.DeviceUtils.isPlatformIOS()) { - return getOne(RNSettings.SDK_APP_GROUP_IDENTIFIER); - } - else { - return null; - } - }, - set appGroupIdentifier(value) { - if (DeviceUtils_1.DeviceUtils.isPlatformIOS()) { - setOne(RNSettings.SDK_APP_GROUP_IDENTIFIER, value); - } - }, - get keychainGroupIdentifier() { - if (DeviceUtils_1.DeviceUtils.isPlatformIOS()) { - return getOne(RNSettings.SDK_KEYCHAIN_GROUP_IDENTIFIER); - } - else { - return null; - } - }, - set keychainGroupIdentifier(value) { - if (DeviceUtils_1.DeviceUtils.isPlatformIOS()) { - setOne(RNSettings.SDK_KEYCHAIN_GROUP_IDENTIFIER, value); - } - }, - get minTokenRefreshInterval() { - return getOne(RNSettings.SDK_MIN_TOKEN_REFRESH_INTERVAL); - }, - set minTokenRefreshInterval(value) { - setOne(RNSettings.SDK_MIN_TOKEN_REFRESH_INTERVAL, value); - }, - get shouldDestroySessionOnApiKeyChange() { - return getOne(RNSettings.SDK_SHOULD_DESTROY_SESSION_ON_API_KEY_CHANGE); - }, - set shouldDestroySessionOnApiKeyChange(value) { - setOne(RNSettings.SDK_SHOULD_DESTROY_SESSION_ON_API_KEY_CHANGE, value); - }, - }; - _this.tracker = { - get isBackendTimeSyncRequired() { - return getOne(RNSettings.TRACKER_IS_BACKEND_TIME_SYNC_REQUIRED); - }, - set isBackendTimeSyncRequired(value) { - setOne(RNSettings.TRACKER_IS_BACKEND_TIME_SYNC_REQUIRED, value); - }, - get minBatchSize() { - return getOne(RNSettings.TRACKER_MIN_BATCH_SIZE); - }, - set minBatchSize(value) { - setOne(RNSettings.TRACKER_MIN_BATCH_SIZE, value); - }, - get maxBatchSize() { - return getOne(RNSettings.TRACKER_MAX_BATCH_SIZE); - }, - set maxBatchSize(value) { - setOne(RNSettings.TRACKER_MAX_BATCH_SIZE, value); - }, - get autoFlushTimeout() { - return getOne(RNSettings.TRACKER_AUTO_FLUSH_TIMEOUT); - }, - set autoFlushTimeout(value) { - setOne(RNSettings.TRACKER_AUTO_FLUSH_TIMEOUT, value); - }, - }; - _this.notifications = { - get enabled() { - return getOne(RNSettings.NOTIFICATIONS_ENABLED); - }, - set enabled(value) { - setOne(RNSettings.NOTIFICATIONS_ENABLED, value); - }, - get encryption() { - return getOne(RNSettings.NOTIFICATIONS_ENCRYPTION); - }, - set encryption(value) { - setOne(RNSettings.NOTIFICATIONS_ENCRYPTION, value); - }, - get disableInAppAlerts() { - if (DeviceUtils_1.DeviceUtils.isPlatformIOS()) { - return getOne(RNSettings.NOTIFICATIONS_DISABLE_IN_APP_ALERTS); - } - else { - return null; - } - }, - set disableInAppAlerts(value) { - if (DeviceUtils_1.DeviceUtils.isPlatformIOS()) { - setOne(RNSettings.NOTIFICATIONS_DISABLE_IN_APP_ALERTS, value); - } - }, - }; - _this.injector = { - get automatic() { - return getOne(RNSettings.INJECTOR_AUTOMATIC); - }, - set automatic(value) { - setOne(RNSettings.INJECTOR_AUTOMATIC, value); - }, - }; - return _this; - } - SettingsModule.instance = function () { - if (this._instance === undefined) { - this._instance = new SettingsModule(); - } - return this._instance; - }; - SettingsModule.prototype.isAlwaysActive = function () { - return true; - }; - SettingsModule.prototype.set = function (settingsOptions) { - setMany(settingsOptions); - }; - return SettingsModule; -}(BaseModule_1.BaseModule)); -exports.SettingsModule = SettingsModule; diff --git a/lib/main/modules/TrackerModule.d.ts b/lib/main/modules/TrackerModule.d.ts deleted file mode 100644 index 8a8832d..0000000 --- a/lib/main/modules/TrackerModule.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BaseModule as Module } from './BaseModule'; -import { Event } from './../../classes/events/Event'; -declare class TrackerModule extends Module { - private static _instance; - static instance(): TrackerModule; - private constructor(); - setCustomIdentifier(identifier: string): void; - setCustomEmail(email: string): void; - send(event: Event): void; - flushEvents(onSuccess: () => void): void; -} -export { TrackerModule }; diff --git a/lib/main/modules/TrackerModule.js b/lib/main/modules/TrackerModule.js deleted file mode 100644 index fc9ff1c..0000000 --- a/lib/main/modules/TrackerModule.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var react_native_1 = require("react-native"); -var SyneriseModuleConnector_1 = require("./../communication/SyneriseModuleConnector"); -var BaseModule_1 = require("./BaseModule"); -var RNTracker = react_native_1.NativeModules.RNTracker; -var TrackerModule = /** @class */ (function (_super) { - __extends(TrackerModule, _super); - function TrackerModule() { - return _super.call(this) || this; - } - TrackerModule.instance = function () { - if (this._instance === undefined) { - this._instance = new TrackerModule(); - } - return this._instance; - }; - TrackerModule.prototype.setCustomIdentifier = function (identifier) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNTracker.setCustomIdentifier, [identifier]); - }; - TrackerModule.prototype.setCustomEmail = function (email) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNTracker.setCustomEmail, [email]); - }; - TrackerModule.prototype.send = function (event) { - var eventObject = event.toObject(); - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethod(RNTracker.send, [eventObject]); - }; - TrackerModule.prototype.flushEvents = function (onSuccess) { - SyneriseModuleConnector_1.SyneriseModuleConnector.invokeMethodWithCallback(RNTracker.flushEvents, [], onSuccess, function (error) { }); - }; - return TrackerModule; -}(BaseModule_1.BaseModule)); -exports.TrackerModule = TrackerModule; diff --git a/package.json b/package.json index 02890d3..0c42b14 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-synerise-sdk", - "version": "0.10.5", + "version": "0.11.0", "description": "React Native wrapper for Synerise SDK", "author": { "name": "Synerise", diff --git a/react-native-synerise-sdk.podspec b/react-native-synerise-sdk.podspec index d173c23..10a821c 100644 --- a/react-native-synerise-sdk.podspec +++ b/react-native-synerise-sdk.podspec @@ -1,8 +1,8 @@ require 'json' -package = JSON.parse(File.read('./package.json')) +package = JSON.parse(File.read('./../package.json')) -SYNERISE_SDK_FRAMEWORK_VERSION = '3.11.2' +SYNERISE_SDK_FRAMEWORK_VERSION = '3.12.0' Pod::Spec.new do |s| s.name = package['name']