diff --git a/packages/example/lib/home_screen.dart b/packages/example/lib/home_screen.dart index 23312af..56012d9 100644 --- a/packages/example/lib/home_screen.dart +++ b/packages/example/lib/home_screen.dart @@ -49,8 +49,14 @@ class HomeScreenState extends State { gzip: false, recordScreenViews: true, collectDeviceId: false); - WebConfig wc = - WebConfig(autoSessionTracking: true, sessionTimeoutInMillis: 10000); + WebConfig wc = WebConfig( + storage: StorageOpts(type: StorageType.localStorage, entries: { + UserSessionKey.anonymousId: + StorageEntry(type: StorageType.cookieStorage) + }), + lockIntegrationsVersion: true, + lockPluginsVersion: true, + ); RudderConfigBuilder builder = RudderConfigBuilder(); builder ..withFactory(RudderIntegrationKochavaFlutter()) diff --git a/packages/example/pubspec.lock b/packages/example/pubspec.lock index 1ce544a..6bae738 100644 --- a/packages/example/pubspec.lock +++ b/packages/example/pubspec.lock @@ -236,26 +236,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -284,18 +284,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -366,98 +366,98 @@ packages: path: "../integrations/rudder_integration_adjust_flutter" relative: true source: path - version: "1.2.2" + version: "1.3.0" rudder_integration_amplitude_flutter: dependency: "direct main" description: path: "../integrations/rudder_integration_amplitude_flutter" relative: true source: path - version: "1.2.2" + version: "1.3.0" rudder_integration_appcenter_flutter: dependency: "direct main" description: path: "../integrations/rudder_integration_appcenter_flutter" relative: true source: path - version: "1.3.2" + version: "1.4.0" rudder_integration_appsflyer_flutter: dependency: "direct main" description: path: "../integrations/rudder_integration_appsflyer_flutter" relative: true source: path - version: "1.1.12" + version: "1.1.13" rudder_integration_braze_flutter: dependency: "direct main" description: path: "../integrations/rudder_integration_braze_flutter" relative: true source: path - version: "1.2.2" + version: "1.3.0" rudder_integration_firebase_flutter: dependency: "direct main" description: path: "../integrations/rudder_integration_firebase_flutter" relative: true source: path - version: "2.2.2" + version: "2.3.0" rudder_integration_kochava_flutter: dependency: "direct main" description: path: "../integrations/rudder_integration_kochava_flutter" relative: true source: path - version: "1.1.3" + version: "1.2.0" rudder_integration_leanplum_flutter: dependency: "direct main" description: path: "../integrations/rudder_integration_leanplum_flutter" relative: true source: path - version: "1.2.2" + version: "1.3.0" rudder_plugin_android: dependency: "direct overridden" description: path: "../plugins/rudder_plugin_android" relative: true source: path - version: "2.8.0" + version: "2.9.0" rudder_plugin_db_encryption: dependency: "direct main" description: path: "../plugins/rudder_plugin_db_encryption" relative: true source: path - version: "1.0.6" + version: "1.1.0" rudder_plugin_ios: dependency: "direct overridden" description: path: "../plugins/rudder_plugin_ios" relative: true source: path - version: "2.8.1" + version: "2.9.0" rudder_plugin_web: dependency: "direct overridden" description: path: "../plugins/rudder_plugin_web" relative: true source: path - version: "2.7.0" + version: "2.8.0" rudder_sdk_flutter: dependency: "direct main" description: path: "../plugins/rudder_plugin" relative: true source: path - version: "2.9.2" + version: "2.10.0" rudder_sdk_flutter_platform_interface: dependency: "direct overridden" description: path: "../plugins/rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" sky_engine: dependency: transitive description: flutter @@ -507,10 +507,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -539,10 +539,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -568,4 +568,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=3.2.0-0 <4.0.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/integrations/rudder_integration_adjust_flutter/pubspec.lock b/packages/integrations/rudder_integration_adjust_flutter/pubspec.lock index fdc4330..9ec2ffc 100644 --- a/packages/integrations/rudder_integration_adjust_flutter/pubspec.lock +++ b/packages/integrations/rudder_integration_adjust_flutter/pubspec.lock @@ -220,26 +220,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -268,18 +268,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -350,35 +350,35 @@ packages: path: "../../plugins/rudder_plugin_android" relative: true source: path - version: "2.8.0" + version: "2.9.0" rudder_plugin_ios: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_ios" relative: true source: path - version: "2.8.1" + version: "2.9.0" rudder_plugin_web: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_web" relative: true source: path - version: "2.7.0" + version: "2.8.0" rudder_sdk_flutter: dependency: "direct main" description: path: "../../plugins/rudder_plugin" relative: true source: path - version: "2.9.2" + version: "2.10.0" rudder_sdk_flutter_platform_interface: dependency: "direct main" description: path: "../../plugins/rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" sky_engine: dependency: transitive description: flutter @@ -428,10 +428,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -460,10 +460,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -489,5 +489,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=2.5.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/integrations/rudder_integration_amplitude_flutter/pubspec.lock b/packages/integrations/rudder_integration_amplitude_flutter/pubspec.lock index fdc4330..9ec2ffc 100644 --- a/packages/integrations/rudder_integration_amplitude_flutter/pubspec.lock +++ b/packages/integrations/rudder_integration_amplitude_flutter/pubspec.lock @@ -220,26 +220,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -268,18 +268,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -350,35 +350,35 @@ packages: path: "../../plugins/rudder_plugin_android" relative: true source: path - version: "2.8.0" + version: "2.9.0" rudder_plugin_ios: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_ios" relative: true source: path - version: "2.8.1" + version: "2.9.0" rudder_plugin_web: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_web" relative: true source: path - version: "2.7.0" + version: "2.8.0" rudder_sdk_flutter: dependency: "direct main" description: path: "../../plugins/rudder_plugin" relative: true source: path - version: "2.9.2" + version: "2.10.0" rudder_sdk_flutter_platform_interface: dependency: "direct main" description: path: "../../plugins/rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" sky_engine: dependency: transitive description: flutter @@ -428,10 +428,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -460,10 +460,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -489,5 +489,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=2.5.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/integrations/rudder_integration_appcenter_flutter/pubspec.lock b/packages/integrations/rudder_integration_appcenter_flutter/pubspec.lock index fdf3c38..89f6cc7 100644 --- a/packages/integrations/rudder_integration_appcenter_flutter/pubspec.lock +++ b/packages/integrations/rudder_integration_appcenter_flutter/pubspec.lock @@ -220,26 +220,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -268,18 +268,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -350,35 +350,35 @@ packages: path: "../../plugins/rudder_plugin_android" relative: true source: path - version: "2.8.0" + version: "2.9.0" rudder_plugin_ios: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_ios" relative: true source: path - version: "2.8.1" + version: "2.9.0" rudder_plugin_web: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_web" relative: true source: path - version: "2.7.0" + version: "2.8.0" rudder_sdk_flutter: dependency: "direct main" description: path: "../../plugins/rudder_plugin" relative: true source: path - version: "2.9.2" + version: "2.10.0" rudder_sdk_flutter_platform_interface: dependency: "direct main" description: path: "../../plugins/rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" sky_engine: dependency: transitive description: flutter @@ -428,10 +428,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -460,10 +460,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -489,5 +489,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=2.5.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/integrations/rudder_integration_braze_flutter/pubspec.lock b/packages/integrations/rudder_integration_braze_flutter/pubspec.lock index fdc4330..9ec2ffc 100644 --- a/packages/integrations/rudder_integration_braze_flutter/pubspec.lock +++ b/packages/integrations/rudder_integration_braze_flutter/pubspec.lock @@ -220,26 +220,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -268,18 +268,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -350,35 +350,35 @@ packages: path: "../../plugins/rudder_plugin_android" relative: true source: path - version: "2.8.0" + version: "2.9.0" rudder_plugin_ios: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_ios" relative: true source: path - version: "2.8.1" + version: "2.9.0" rudder_plugin_web: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_web" relative: true source: path - version: "2.7.0" + version: "2.8.0" rudder_sdk_flutter: dependency: "direct main" description: path: "../../plugins/rudder_plugin" relative: true source: path - version: "2.9.2" + version: "2.10.0" rudder_sdk_flutter_platform_interface: dependency: "direct main" description: path: "../../plugins/rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" sky_engine: dependency: transitive description: flutter @@ -428,10 +428,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -460,10 +460,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -489,5 +489,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=2.5.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/integrations/rudder_integration_firebase_flutter/pubspec.lock b/packages/integrations/rudder_integration_firebase_flutter/pubspec.lock index fdc4330..9ec2ffc 100644 --- a/packages/integrations/rudder_integration_firebase_flutter/pubspec.lock +++ b/packages/integrations/rudder_integration_firebase_flutter/pubspec.lock @@ -220,26 +220,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -268,18 +268,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -350,35 +350,35 @@ packages: path: "../../plugins/rudder_plugin_android" relative: true source: path - version: "2.8.0" + version: "2.9.0" rudder_plugin_ios: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_ios" relative: true source: path - version: "2.8.1" + version: "2.9.0" rudder_plugin_web: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_web" relative: true source: path - version: "2.7.0" + version: "2.8.0" rudder_sdk_flutter: dependency: "direct main" description: path: "../../plugins/rudder_plugin" relative: true source: path - version: "2.9.2" + version: "2.10.0" rudder_sdk_flutter_platform_interface: dependency: "direct main" description: path: "../../plugins/rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" sky_engine: dependency: transitive description: flutter @@ -428,10 +428,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -460,10 +460,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -489,5 +489,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=2.5.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/integrations/rudder_integration_kochava_flutter/pubspec.lock b/packages/integrations/rudder_integration_kochava_flutter/pubspec.lock index ba4319a..a59b5fa 100644 --- a/packages/integrations/rudder_integration_kochava_flutter/pubspec.lock +++ b/packages/integrations/rudder_integration_kochava_flutter/pubspec.lock @@ -220,26 +220,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -268,18 +268,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -350,35 +350,35 @@ packages: path: "../../plugins/rudder_plugin_android" relative: true source: path - version: "2.8.0" + version: "2.9.0" rudder_plugin_ios: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_ios" relative: true source: path - version: "2.8.1" + version: "2.9.0" rudder_plugin_web: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_web" relative: true source: path - version: "2.7.0" + version: "2.8.0" rudder_sdk_flutter: dependency: "direct main" description: path: "../../plugins/rudder_plugin" relative: true source: path - version: "2.9.2" + version: "2.10.0" rudder_sdk_flutter_platform_interface: dependency: "direct main" description: path: "../../plugins/rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" sky_engine: dependency: transitive description: flutter @@ -428,10 +428,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -460,10 +460,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -489,5 +489,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=2.5.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/integrations/rudder_integration_leanplum_flutter/pubspec.lock b/packages/integrations/rudder_integration_leanplum_flutter/pubspec.lock index fdc4330..9ec2ffc 100644 --- a/packages/integrations/rudder_integration_leanplum_flutter/pubspec.lock +++ b/packages/integrations/rudder_integration_leanplum_flutter/pubspec.lock @@ -220,26 +220,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -268,18 +268,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -350,35 +350,35 @@ packages: path: "../../plugins/rudder_plugin_android" relative: true source: path - version: "2.8.0" + version: "2.9.0" rudder_plugin_ios: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_ios" relative: true source: path - version: "2.8.1" + version: "2.9.0" rudder_plugin_web: dependency: "direct overridden" description: path: "../../plugins/rudder_plugin_web" relative: true source: path - version: "2.7.0" + version: "2.8.0" rudder_sdk_flutter: dependency: "direct main" description: path: "../../plugins/rudder_plugin" relative: true source: path - version: "2.9.2" + version: "2.10.0" rudder_sdk_flutter_platform_interface: dependency: "direct main" description: path: "../../plugins/rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" sky_engine: dependency: transitive description: flutter @@ -428,10 +428,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -460,10 +460,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -489,5 +489,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=2.5.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/plugins/rudder_plugin/pubspec.lock b/packages/plugins/rudder_plugin/pubspec.lock index cc8b336..a667ecf 100644 --- a/packages/plugins/rudder_plugin/pubspec.lock +++ b/packages/plugins/rudder_plugin/pubspec.lock @@ -220,26 +220,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -268,18 +268,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -350,28 +350,28 @@ packages: path: "../rudder_plugin_android" relative: true source: path - version: "2.8.0" + version: "2.9.0" rudder_plugin_ios: dependency: "direct main" description: path: "../rudder_plugin_ios" relative: true source: path - version: "2.8.1" + version: "2.9.0" rudder_plugin_web: dependency: "direct main" description: path: "../rudder_plugin_web" relative: true source: path - version: "2.7.0" + version: "2.8.0" rudder_sdk_flutter_platform_interface: dependency: "direct main" description: path: "../rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" sky_engine: dependency: transitive description: flutter @@ -421,10 +421,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -453,10 +453,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -482,5 +482,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=2.0.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/plugins/rudder_plugin_android/pubspec.lock b/packages/plugins/rudder_plugin_android/pubspec.lock index 587a85e..cff09dd 100644 --- a/packages/plugins/rudder_plugin_android/pubspec.lock +++ b/packages/plugins/rudder_plugin_android/pubspec.lock @@ -207,26 +207,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -255,18 +255,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -337,7 +337,7 @@ packages: path: "../rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" sky_engine: dependency: transitive description: flutter @@ -387,10 +387,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -419,10 +419,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -448,5 +448,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=2.0.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/plugins/rudder_plugin_interface/lib/platform.dart b/packages/plugins/rudder_plugin_interface/lib/platform.dart index 9e37826..b3b6dde 100644 --- a/packages/plugins/rudder_plugin_interface/lib/platform.dart +++ b/packages/plugins/rudder_plugin_interface/lib/platform.dart @@ -11,3 +11,4 @@ export 'src/models/rudder_integration.dart'; export 'src/models/rudder_option.dart'; export 'src/models/rudder_property.dart'; export 'src/models/rudder_traits.dart'; +export 'src/models/web_config_interfaces/index.dart'; diff --git a/packages/plugins/rudder_plugin_interface/lib/src/constants.dart b/packages/plugins/rudder_plugin_interface/lib/src/constants.dart index 9443aaf..071553e 100644 --- a/packages/plugins/rudder_plugin_interface/lib/src/constants.dart +++ b/packages/plugins/rudder_plugin_interface/lib/src/constants.dart @@ -50,21 +50,4 @@ class Constants { static const DataResidencyServer DEFAULT_DATA_RESIDENCY_SERVER = DataResidencyServer.US; - - //web load integration - static const bool DEFAULT_LOAD_INTEGRATION = true; - static const bool DEFAULT_SECURE_COOKIE = false; - static const bool DEFAULT_USE_BEACON = false; - static const int DEFAULT_MAX_RETRY_DELAY = 360000; - static const int DEFAULT_MIN_RETRY_DELAY = 1000; - static const int DEFAULT_BACK_OFF_FACTOR = 2; - static const int DEFAULT_MAX_ATTEMPTS = 10; - static const int DEFAULT_MAX_ITEMS = 100; - - //BEACON - static const int DEFAULT_BEACON_FLUSH_QUEUE_INTERVAL = 600000; - static const int DEFAULT_BEACON_MAX_ITEMS = 10; - - static const String DEFAULT_DESTINATION_SDK_BASE_URL = - "https://cdn.rudderlabs.com/v1.1/js-integrations"; } diff --git a/packages/plugins/rudder_plugin_interface/lib/src/models/rudder_config.dart b/packages/plugins/rudder_plugin_interface/lib/src/models/rudder_config.dart index 297bd4c..f9c6633 100644 --- a/packages/plugins/rudder_plugin_interface/lib/src/models/rudder_config.dart +++ b/packages/plugins/rudder_plugin_interface/lib/src/models/rudder_config.dart @@ -39,11 +39,8 @@ class RudderConfig { ) { RudderLogger.init(logLevel); _dataPlaneUrl = dataPlaneUrl; - //web integrations, QueueOpts, BeaconQueueOpts and CookieConsentManager initialization + final Map queueOpts = {}; - final Map beaconOpts = {}; - final Map cookieConsent = {}; - final Map sessionOpts = {}; if (Utils.isEmpty(dataPlaneUrl)) { RudderLogger.logError( @@ -152,51 +149,80 @@ class RudderConfig { if (webConfig != null) { _webConfigMap["secureCookie"] = webConfig.secureCookie; _webConfigMap["loadIntegration"] = webConfig.loadIntegration; - queueOpts["maxRetryDelay"] = webConfig.maxRetryDelay - .clamp(Constants.DEFAULT_MIN_RETRY_DELAY, - Constants.DEFAULT_MAX_RETRY_DELAY) - .toString(); - queueOpts["minRetryDelay"] = webConfig.minRetryDelay - .clamp(Constants.DEFAULT_MIN_RETRY_DELAY, - Constants.DEFAULT_MAX_RETRY_DELAY) - .toString(); - queueOpts["backoffFactor"] = - webConfig.backoffFactor.clamp(0, 10).toString(); - queueOpts["maxAttempts"] = webConfig.maxAttempts.clamp(0, 100).toString(); - queueOpts["maxItems"] = webConfig.maxItems.clamp(1, 1000).toString(); - _webConfigMap["queueOptions"] = queueOpts; - _webConfigMap["useBeacon"] = webConfig.useBeacon; + _webConfigMap["lockIntegrationsVersion"] = + webConfig.lockIntegrationsVersion; + _webConfigMap["lockPluginsVersion"] = webConfig.lockPluginsVersion; + _webConfigMap["polyfillIfRequired"] = webConfig.polyfillIfRequired; + _webConfigMap["useGlobalIntegrationsConfigInEvents"] = + webConfig.useGlobalIntegrationsConfigInEvents; + _webConfigMap["bufferDataPlaneEventsUntilReady"] = + webConfig.bufferDataPlaneEventsUntilReady; + _webConfigMap["dataPlaneEventsBufferTimeout"] = + webConfig.dataPlaneEventsBufferTimeout; + _webConfigMap["useServerSideCookies"] = webConfig.useServerSideCookies; + _webConfigMap["sendAdblockPage"] = webConfig.sendAdblockPage; + _webConfigMap["sameDomainCookiesOnly"] = webConfig.sameDomainCookiesOnly; + + if (webConfig.queueOptions != null) { + _webConfigMap["queueOptions"] = webConfig.queueOptions?.toMap(); + } //beacon queue opts if available - if (webConfig.useBeacon) { - beaconOpts["maxItems"] = - webConfig.maxBeaconItems.clamp(1, 1000).toString(); - beaconOpts["flushQueueInterval"] = - webConfig.beaconFlushQueueInterval.clamp(1, 60000).toString(); - _webConfigMap["beaconQueueOpts"] = beaconOpts; + if (webConfig.useBeacon != null && webConfig.beaconQueueOptions != null) { + _webConfigMap["beaconQueueOptions"] = + webConfig.beaconQueueOptions?.toMap(); } - // cookie consent - if (webConfig.cookieConsentManagers != null) { - webConfig.cookieConsentManagers?.forEach((key, value) { - cookieConsent[key] = {"enabled": true}; - }); - _webConfigMap["cookieConsentManager"] = cookieConsent; + // consent manager + if (webConfig.consentManagement != null) { + _webConfigMap["consentManagement"] = + webConfig.consentManagement?.toMap(); } - if (Utils.isValidUrl(webConfig.destSDKBaseURL)) { + if (webConfig.sessions != null) { + _webConfigMap["sessions"] = webConfig.sessions?.toMap(); + } + if (webConfig.destSDKBaseURL != null) { _webConfigMap["destSDKBaseURL"] = webConfig.destSDKBaseURL; - } else { - RudderLogger.logWarn("Dest SDK Base Url is not valid, using default"); - _webConfigMap["destSDKBaseUrl"] = - Constants.DEFAULT_DESTINATION_SDK_BASE_URL; } - sessionOpts['autoTrack'] = webConfig.autoSessionTracking; - if (webConfig.sessionTimeoutInMillis < 0) { - RudderLogger.logError("invalid sessionTimeoutInMillis. Set to default"); - sessionOpts['timeout'] = Constants.DEFAULT_SESSION_TIMEOUT_WEB; - } else { - sessionOpts['timeout'] = webConfig.sessionTimeoutInMillis; + if (webConfig.pluginsSDKBaseURL != null) { + _webConfigMap["pluginsSDKBaseURL"] = webConfig.pluginsSDKBaseURL; + } + if (webConfig.storage != null) { + _webConfigMap["storage"] = webConfig.storage?.toMap(); + } + if (webConfig.destinationsQueueOpts != null) { + _webConfigMap["destinationsQueueOpts"] = + webConfig.destinationsQueueOpts?.toMap(); + } + if (webConfig.anonymousIdOptions != null) { + _webConfigMap["anonymousIdOptions"] = + webConfig.anonymousIdOptions?.toMap(); + } + if (webConfig.onLoaded != null) { + _webConfigMap["onLoaded"] = webConfig.onLoaded; + } + if (webConfig.sendAdblockPageOptions != null) { + _webConfigMap["sendAdblockPageOptions"] = + webConfig.sendAdblockPageOptions?.toMap(); + } + if (webConfig.plugins != null) { + _webConfigMap["plugins"] = webConfig.plugins; + } + if (webConfig.polyfillURL != null) { + _webConfigMap["polyfillURL"] = webConfig.polyfillURL; + } + if (webConfig.preConsent != null) { + _webConfigMap["preConsent"] = webConfig.preConsent?.toMap(); + } + if (webConfig.externalAnonymousIdCookieName != null) { + _webConfigMap["externalAnonymousIdCookieName"] = + webConfig.externalAnonymousIdCookieName; + } + if (webConfig.dataServiceEndpoint != null) { + _webConfigMap["dataServiceEndpoint"] = webConfig.dataServiceEndpoint; + } + if (webConfig.uaChTrackLevel != null) { + _webConfigMap["uaChTrackLevel"] = webConfig.uaChTrackLevel?.value; } - _webConfigMap["sessions"] = sessionOpts; } } diff --git a/packages/plugins/rudder_plugin_interface/lib/src/models/rudder_web_config.dart b/packages/plugins/rudder_plugin_interface/lib/src/models/rudder_web_config.dart index 1df91fe..a965e78 100644 --- a/packages/plugins/rudder_plugin_interface/lib/src/models/rudder_web_config.dart +++ b/packages/plugins/rudder_plugin_interface/lib/src/models/rudder_web_config.dart @@ -1,104 +1,188 @@ -import '../constants.dart'; +import './web_config_interfaces/index.dart'; class WebConfig { ///web default true - final bool _loadIntegration; + final bool? _loadIntegration; ///web default false - final bool _secureCookie; + final bool? _secureCookie; - /// web default 3_60_000 - final int _maxRetryDelay; + final QueueOpts? _queueOptions; - ///web default 1_000 - final int _minRetryDelay; + ///web default false + final bool? _useBeacon; - ///web back off factor default 2 - final int _backoffFactor; + final BeaconQueueOpts? _beaconQueueOptions; - /// web default 10 - final int _maxAttempts; + final String? _destSDKBaseURL; - /// web default 100 - final int _maxItems; + final SessionOpts? _sessions; - ///web default false - final bool _useBeacon; + /// @param pluginsSDKBaseURL (base url to fetch plugins from) + final String? _pluginsSDKBaseURL; + + /// default false + final bool? _lockIntegrationsVersion; + + /// default false + final bool? _lockPluginsVersion; + + /// default false + final bool? _polyfillIfRequired; + + final StorageOpts? _storage; + + final DestinationsQueueOpts? _destinationsQueueOpts; + + final AnonymousIdOptions? _anonymousIdOptions; + + final OnLoadedCallback? _onLoaded; + + final UaChTrackLevel? _uaChTrackLevel; + + final bool? _sendAdblockPage; + + final ApiOptions? _sendAdblockPageOptions; + + final List? _plugins; + + final String? _polyfillURL; + + final bool? _useGlobalIntegrationsConfigInEvents; + + final bool? _bufferDataPlaneEventsUntilReady; - ///utilised only if _useBeacon is true - final int _maxBeaconItems; + final int? _dataPlaneEventsBufferTimeout; - ///utilised only if _useBeacon is true - final int _beaconFlushQueueInterval; + final PreConsentOptions? _preConsent; - ///web default https://cdn.rudderlabs.com/v1.1/js-integrations - final String _destSDKBaseURL; + final ConsentManagementOptions? _consentManagement; - ///cookie consent managers, e.g ("oneTrust", true), default empty - final Map? _cookieConsentManagers; + final bool? _sameDomainCookiesOnly; - /// @param autoSessionTracking whether to track session automatically - final bool _autoSessionTracking; + final String? _externalAnonymousIdCookieName; - /// @param sessionTimeoutInMillis (duration of inactivity of session in milliseconds) - final int _sessionTimeoutInMillis; + final bool? _useServerSideCookies; + + final String? _dataServiceEndpoint; WebConfig( - {loadIntegration = Constants.DEFAULT_LOAD_INTEGRATION, - secureCookie = Constants.DEFAULT_SECURE_COOKIE, - useBeacon = Constants.DEFAULT_USE_BEACON, - maxRetryDelay = Constants.DEFAULT_MAX_RETRY_DELAY, - minRetryDelay = Constants.DEFAULT_MIN_RETRY_DELAY, - backoffFactor = Constants.DEFAULT_BACK_OFF_FACTOR, - maxAttempts = Constants.DEFAULT_MAX_ATTEMPTS, - maxItems = Constants.DEFAULT_MAX_ITEMS, - maxBeaconItems = Constants.DEFAULT_BEACON_MAX_ITEMS, - int beaconFlushQueueInterval = - Constants.DEFAULT_BEACON_FLUSH_QUEUE_INTERVAL, - destSDKBaseURL = Constants.DEFAULT_DESTINATION_SDK_BASE_URL, - autoSessionTracking = Constants.AUTO_SESSION_TRACKING, - sessionTimeoutInMillis = Constants.DEFAULT_SESSION_TIMEOUT_WEB, - Map? cookieConsentManagers}) + {loadIntegration, + secureCookie, + useBeacon, + lockIntegrationsVersion, + lockPluginsVersion, + polyfillIfRequired, + uaChTrackLevel, + useGlobalIntegrationsConfigInEvents, + bufferDataPlaneEventsUntilReady, + dataPlaneEventsBufferTimeout, + useServerSideCookies, + destSDKBaseURL, + pluginsSDKBaseURL, + storage, + destinationsQueueOpts, + anonymousIdOptions, + onLoaded, + sendAdblockPage, + sendAdblockPageOptions, + plugins, + polyfillURL, + preConsent, + consentManagement, + sameDomainCookiesOnly, + externalAnonymousIdCookieName, + dataServiceEndpoint, + queueOptions, + beaconQueueOptions, + sessions}) : _loadIntegration = loadIntegration, _secureCookie = secureCookie, _useBeacon = useBeacon, - _maxRetryDelay = maxRetryDelay, - _minRetryDelay = minRetryDelay, - _backoffFactor = backoffFactor, - _maxAttempts = maxAttempts, - _maxItems = maxItems, - _maxBeaconItems = maxBeaconItems, - _beaconFlushQueueInterval = beaconFlushQueueInterval, _destSDKBaseURL = destSDKBaseURL, - _autoSessionTracking = autoSessionTracking, - _sessionTimeoutInMillis = sessionTimeoutInMillis, - _cookieConsentManagers = cookieConsentManagers; + _sessions = sessions, + _pluginsSDKBaseURL = pluginsSDKBaseURL, + _lockIntegrationsVersion = lockIntegrationsVersion, + _lockPluginsVersion = lockPluginsVersion, + _polyfillIfRequired = polyfillIfRequired, + _storage = storage, + _destinationsQueueOpts = destinationsQueueOpts, + _anonymousIdOptions = anonymousIdOptions, + _onLoaded = onLoaded, + _uaChTrackLevel = uaChTrackLevel, + _sendAdblockPage = sendAdblockPage, + _sendAdblockPageOptions = sendAdblockPageOptions, + _plugins = plugins, + _polyfillURL = polyfillURL, + _useGlobalIntegrationsConfigInEvents = + useGlobalIntegrationsConfigInEvents, + _bufferDataPlaneEventsUntilReady = bufferDataPlaneEventsUntilReady, + _dataPlaneEventsBufferTimeout = dataPlaneEventsBufferTimeout, + _preConsent = preConsent, + _consentManagement = consentManagement, + _sameDomainCookiesOnly = sameDomainCookiesOnly, + _externalAnonymousIdCookieName = externalAnonymousIdCookieName, + _useServerSideCookies = useServerSideCookies, + _dataServiceEndpoint = dataServiceEndpoint, + _queueOptions = queueOptions, + _beaconQueueOptions = beaconQueueOptions; + + String? get destSDKBaseURL => _destSDKBaseURL; + + bool? get useBeacon => _useBeacon; + + bool? get lockIntegrationsVersion => _lockIntegrationsVersion; + + bool? get lockPluginsVersion => _lockPluginsVersion; + + bool? get polyfillIfRequired => _polyfillIfRequired; + + bool? get secureCookie => _secureCookie; + + bool? get loadIntegration => _loadIntegration; + + SessionOpts? get sessions => _sessions; + + String? get pluginsSDKBaseURL => _pluginsSDKBaseURL; + + StorageOpts? get storage => _storage; + + DestinationsQueueOpts? get destinationsQueueOpts => _destinationsQueueOpts; + + AnonymousIdOptions? get anonymousIdOptions => _anonymousIdOptions; + + OnLoadedCallback? get onLoaded => _onLoaded; + + UaChTrackLevel? get uaChTrackLevel => _uaChTrackLevel; + + bool? get sendAdblockPage => _sendAdblockPage; - String get destSDKBaseURL => _destSDKBaseURL; + ApiOptions? get sendAdblockPageOptions => _sendAdblockPageOptions; - bool get useBeacon => _useBeacon; + List? get plugins => _plugins; - bool get secureCookie => _secureCookie; + String? get polyfillURL => _polyfillURL; - bool get loadIntegration => _loadIntegration; + bool? get useGlobalIntegrationsConfigInEvents => + _useGlobalIntegrationsConfigInEvents; - Map? get cookieConsentManagers => _cookieConsentManagers; + bool? get bufferDataPlaneEventsUntilReady => _bufferDataPlaneEventsUntilReady; - int get beaconFlushQueueInterval => _beaconFlushQueueInterval; + int? get dataPlaneEventsBufferTimeout => _dataPlaneEventsBufferTimeout; - int get maxBeaconItems => _maxBeaconItems; + PreConsentOptions? get preConsent => _preConsent; - int get maxItems => _maxItems; + ConsentManagementOptions? get consentManagement => _consentManagement; - int get maxAttempts => _maxAttempts; + bool? get sameDomainCookiesOnly => _sameDomainCookiesOnly; - int get backoffFactor => _backoffFactor; + String? get externalAnonymousIdCookieName => _externalAnonymousIdCookieName; - int get minRetryDelay => _minRetryDelay; + bool? get useServerSideCookies => _useServerSideCookies; - int get maxRetryDelay => _maxRetryDelay; + String? get dataServiceEndpoint => _dataServiceEndpoint; - bool get autoSessionTracking => _autoSessionTracking; + QueueOpts? get queueOptions => _queueOptions; - int get sessionTimeoutInMillis => _sessionTimeoutInMillis; + BeaconQueueOpts? get beaconQueueOptions => _beaconQueueOptions; } diff --git a/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/anonymous_id_opts.dart b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/anonymous_id_opts.dart new file mode 100644 index 0000000..d3b6348 --- /dev/null +++ b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/anonymous_id_opts.dart @@ -0,0 +1,31 @@ +class AutoCapture { + final bool? enabled; + final String? source; + + AutoCapture({ + this.enabled, + this.source, + }); + + // Method to convert AutoCapture object to a Map + Map toMap() { + return { + 'enabled': enabled, + 'source': source, + }; + } +} + +class AnonymousIdOptions { + final AutoCapture? autoCapture; + + AnonymousIdOptions({this.autoCapture}); + + // Method to convert AnonymousIdOptions object to a Map + Map toMap() { + return { + 'autoCapture': + autoCapture?.toMap(), // Convert autoCapture to a map if not null + }; + } +} diff --git a/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/api_opts.dart b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/api_opts.dart new file mode 100644 index 0000000..4846739 --- /dev/null +++ b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/api_opts.dart @@ -0,0 +1,80 @@ +class ApiObject { + final Map properties; + + ApiObject({required this.properties}); + + // Method to convert ApiObject to a Map + Map toMap() { + return properties; + } +} + +class DestinationIntgConfig { + final bool? flag; + final ApiObject? apiObject; + + DestinationIntgConfig({this.flag, this.apiObject}); + + // Method to convert DestinationIntgConfig to a Map + Map toMap() { + if (flag != null) { + return {'flag': flag}; + } else if (apiObject != null) { + return {'apiObject': apiObject!.toMap()}; + } else { + return {}; + } + } +} + +class IntegrationOpts { + final bool? all; + final Map? dynamicConfigs; + + IntegrationOpts({this.all, this.dynamicConfigs}); + + // Method to convert IntegrationOpts to a Map + Map toMap() { + final map = { + 'All': all, + }; + + // Add dynamic keys from dynamicConfigs + if (dynamicConfigs != null) { + map.addAll( + dynamicConfigs!.map((key, value) => MapEntry(key, value.toMap()))); + } + + return map; + } +} + +class ApiOptions { + final IntegrationOpts? integrations; + final String? anonymousId; + final String? originalTimestamp; + final Map? additionalProperties; + + ApiOptions({ + this.integrations, + this.anonymousId, + this.originalTimestamp, + this.additionalProperties, + }); + + // Method to convert ApiOptions to a Map + Map toMap() { + final map = { + 'integrations': integrations?.toMap(), + 'anonymousId': anonymousId, + 'originalTimestamp': originalTimestamp, + }; + + // Add dynamic additional properties + if (additionalProperties != null) { + map.addAll(additionalProperties!); + } + + return map; + } +} diff --git a/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/beacon_queue_opts.dart b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/beacon_queue_opts.dart new file mode 100644 index 0000000..c318566 --- /dev/null +++ b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/beacon_queue_opts.dart @@ -0,0 +1,14 @@ +class BeaconQueueOpts { + final int? maxItems; + final int? flushQueueInterval; + + BeaconQueueOpts({this.maxItems, this.flushQueueInterval}); + + // Method to convert the BeaconQueueOpts object to a Map + Map toMap() { + return { + 'maxItems': maxItems, + 'flushQueueInterval': flushQueueInterval, + }; + } +} diff --git a/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/consent_opts.dart b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/consent_opts.dart new file mode 100644 index 0000000..ecab8f6 --- /dev/null +++ b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/consent_opts.dart @@ -0,0 +1,84 @@ +enum DeliveryType { + immediate, + buffer, +} + +enum StorageStrategy { + none, + session, + anonymousId, +} + +enum ConsentManagementProvider { + oneTrust, + ketch, + custom, +} + +class PreConsentStorageOptions { + final StorageStrategy strategy; + + PreConsentStorageOptions({required this.strategy}); + + Map toMap() { + return { + 'strategy': strategy.name, // Convert enum to string + }; + } +} + +class PreConsentEventsOptions { + final DeliveryType delivery; + + PreConsentEventsOptions({required this.delivery}); + + Map toMap() { + return { + 'delivery': delivery.name, // Convert enum to string + }; + } +} + +class PreConsentOptions { + final bool enabled; + final PreConsentStorageOptions? storage; + final PreConsentEventsOptions? events; + + PreConsentOptions({ + required this.enabled, + this.storage, + this.events, + }); + + Map toMap() { + return { + 'enabled': enabled, + 'storage': storage?.toMap(), + 'events': events?.toMap(), + }; + } +} + +class ConsentManagementOptions { + final bool? enabled; + final ConsentManagementProvider? provider; + final List? allowedConsentIds; + final List? deniedConsentIds; + + ConsentManagementOptions({ + this.enabled, + this.provider, + this.allowedConsentIds, + this.deniedConsentIds, + }); + + // Convert ConsentManagementOptions to a Map + Map toMap() { + return { + 'enabled': enabled, + 'provider': provider?.name, // Convert enum to string + 'allowedConsentIds': allowedConsentIds, + 'deniedConsentIds': deniedConsentIds, + }; + } +} diff --git a/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/destinations_queue_opts.dart b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/destinations_queue_opts.dart new file mode 100644 index 0000000..dd8b592 --- /dev/null +++ b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/destinations_queue_opts.dart @@ -0,0 +1,12 @@ +class DestinationsQueueOpts { + final int? maxItems; + + DestinationsQueueOpts({this.maxItems}); + + // Method to convert the DestinationsQueueOpts object to a Map + Map toMap() { + return { + 'maxItems': maxItems, + }; + } +} diff --git a/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/index.dart b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/index.dart new file mode 100644 index 0000000..31a343c --- /dev/null +++ b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/index.dart @@ -0,0 +1,9 @@ +export 'anonymous_id_opts.dart'; +export 'api_opts.dart'; +export 'beacon_queue_opts.dart'; +export 'consent_opts.dart'; +export 'destinations_queue_opts.dart'; +export 'queue_opts.dart'; +export 'session_opts.dart'; +export 'storage_opts.dart'; +export 'load_opts.dart'; diff --git a/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/load_opts.dart b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/load_opts.dart new file mode 100644 index 0000000..e7af5d1 --- /dev/null +++ b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/load_opts.dart @@ -0,0 +1,28 @@ +typedef OnLoadedCallback = void Function(dynamic analytics); + +enum PluginName { + BeaconQueue, + CustomConsentManager, + DeviceModeDestinations, + DeviceModeTransformation, + ErrorReporting, + ExternalAnonymousId, + GoogleLinker, + KetchConsentManager, + NativeDestinationQueue, + OneTrustConsentManager, + StorageEncryption, + StorageEncryptionLegacy, + StorageMigrator, + XhrQueue, +} + +enum UaChTrackLevel { + none('none'), + defaultLevel('default'), + full('full'); + + final String value; + + const UaChTrackLevel(this.value); +} diff --git a/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/queue_opts.dart b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/queue_opts.dart new file mode 100644 index 0000000..c8ad04f --- /dev/null +++ b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/queue_opts.dart @@ -0,0 +1,60 @@ +class BatchOpts { + final bool enabled; + final int? maxItems; + final int? maxSize; + final int? flushInterval; + + BatchOpts({ + required this.enabled, + this.maxItems, + this.maxSize, + this.flushInterval, + }); + + // Method to convert the BatchOpts object to a Map + Map toMap() { + return { + 'enabled': enabled, + 'maxItems': maxItems, + 'maxSize': maxSize, + 'flushInterval': flushInterval, + }; + } +} + +class QueueOpts { + final int? maxRetryDelay; + final int? minRetryDelay; + final double? backoffFactor; + final double? backoffJitter; + final int? maxAttempts; + final int? maxItems; + final BatchOpts? batch; + final double? timerScaleFactor; + + QueueOpts({ + this.maxRetryDelay, + this.minRetryDelay, + this.backoffFactor, + this.backoffJitter, + this.maxAttempts, + this.maxItems, + this.batch, + this.timerScaleFactor, + }); + + // Method to convert QueueOpts object to a Map + Map toMap() { + return { + 'maxRetryDelay': maxRetryDelay, + 'minRetryDelay': minRetryDelay, + 'backoffFactor': backoffFactor, + 'backoffJitter': backoffJitter, + 'maxAttempts': maxAttempts, + 'maxItems': maxItems, + 'batch': + batch?.toMap(), // Convert the batch object to a map if it's not null + 'timerScaleFactor': timerScaleFactor, + }; + } +} diff --git a/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/session_opts.dart b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/session_opts.dart new file mode 100644 index 0000000..c4e97de --- /dev/null +++ b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/session_opts.dart @@ -0,0 +1,14 @@ +class SessionOpts { + final bool? autoTrack; + final int? timeout; + + SessionOpts({this.autoTrack, this.timeout}); + + // Method to convert the SessionOpts object to a Map + Map toMap() { + return { + 'autoTrack': autoTrack, + 'timeout': timeout, + }; + } +} diff --git a/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/storage_opts.dart b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/storage_opts.dart new file mode 100644 index 0000000..a07a3f6 --- /dev/null +++ b/packages/plugins/rudder_plugin_interface/lib/src/models/web_config_interfaces/storage_opts.dart @@ -0,0 +1,112 @@ +// Define the StorageType enum +enum StorageType { + cookieStorage, + localStorage, + memoryStorage, + sessionStorage, + none, +} + +enum UserSessionKey { + userId, + userTraits, + anonymousId, + groupId, + groupTraits, + initialReferrer, + initialReferringDomain, + sessionInfo, + authToken, +} + +enum StorageEncryptionVersion { + legacy, + v3, +} + +// Define the StorageEntry class +class StorageEntry { + final StorageType type; + + StorageEntry({required this.type}); + + // Method to convert the StorageEntry object to a Map + Map toMap() { + return { + 'type': type.toString().split('.').last, + }; + } +} + +// Define the StorageEncryption class +class StorageEncryption { + final StorageEncryptionVersion version; + + StorageEncryption({required this.version}); + + // Method to convert the StorageEncryption object to a Map + Map toMap() { + return { + 'version': version.toString().split('.').last, + }; + } +} + +class CookieOptions { + final int? maxage; + final DateTime? expires; + final String? path; + final String? domain; + final String? samesite; + final bool? secure; + + CookieOptions({ + this.maxage, + this.expires, + this.path, + this.domain, + this.samesite, + this.secure, + }); + + // Method to convert the CookieOptions object to a Map + Map toMap() { + return { + 'maxage': maxage, + 'expires': expires?.toIso8601String(), + 'path': path, + 'domain': domain, + 'samesite': samesite, + 'secure': secure, + }; + } +} + +// Define the StorageOpts class +class StorageOpts { + final StorageEncryption? encryption; + final bool? migrate; + final StorageType? type; + final CookieOptions? cookie; + final Map? entries; + + StorageOpts({ + this.encryption, + this.migrate, + this.type, + this.cookie, + this.entries, + }); + + // Method to convert the StorageOpts object to a Map + Map toMap() { + return { + 'encryption': encryption?.toMap(), + 'migrate': migrate, + 'type': type?.toString().split('.').last, // Convert enum to string + 'cookie': cookie?.toMap(), + 'entries': entries?.map((key, value) => + MapEntry(key.toString().split('.').last, value.toMap())), + }; + } +} diff --git a/packages/plugins/rudder_plugin_interface/pubspec.lock b/packages/plugins/rudder_plugin_interface/pubspec.lock index 134708c..4b0535c 100644 --- a/packages/plugins/rudder_plugin_interface/pubspec.lock +++ b/packages/plugins/rudder_plugin_interface/pubspec.lock @@ -207,26 +207,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -255,18 +255,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -380,10 +380,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -412,10 +412,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -441,5 +441,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=2.0.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/plugins/rudder_plugin_interface/test/src/models/rudder_config_test.dart b/packages/plugins/rudder_plugin_interface/test/src/models/rudder_config_test.dart index 705dd8d..2cbe2a3 100644 --- a/packages/plugins/rudder_plugin_interface/test/src/models/rudder_config_test.dart +++ b/packages/plugins/rudder_plugin_interface/test/src/models/rudder_config_test.dart @@ -11,10 +11,88 @@ void main() { final MobileConfig mobileConfig = MobileConfig( dbCountThreshold: 400, sleepTimeOut: 5000, configRefreshInterval: 20); final WebConfig webConfig = WebConfig( - maxAttempts: 12, - maxRetryDelay: 1300, - destSDKBaseURL: "https://api.com", - cookieConsentManagers: {"oneTrust": false}); + storage: StorageOpts( + encryption: StorageEncryption(version: StorageEncryptionVersion.v3), + migrate: true, + type: StorageType.sessionStorage, + cookie: CookieOptions( + maxage: 1000, + path: "/", + domain: "example.com", + samesite: "Lax", + secure: true, + ), + entries: { + UserSessionKey.anonymousId: + StorageEntry(type: StorageType.cookieStorage), + UserSessionKey.userId: + StorageEntry(type: StorageType.cookieStorage), + UserSessionKey.userTraits: + StorageEntry(type: StorageType.localStorage), + UserSessionKey.sessionInfo: + StorageEntry(type: StorageType.memoryStorage), + UserSessionKey.groupId: StorageEntry(type: StorageType.none), + UserSessionKey.groupTraits: StorageEntry(type: StorageType.none), + UserSessionKey.initialReferrer: + StorageEntry(type: StorageType.cookieStorage), + UserSessionKey.initialReferringDomain: + StorageEntry(type: StorageType.cookieStorage), + }), + lockIntegrationsVersion: true, + lockPluginsVersion: true, + destSDKBaseURL: "https://api.com", + pluginsSDKBaseURL: "https://api.com/plugins/", + queueOptions: QueueOpts( + maxRetryDelay: 5 * 60 * 1000, + minRetryDelay: 1000, + backoffFactor: 2, + backoffJitter: 0.1, + maxAttempts: 5, + maxItems: 10, + batch: BatchOpts( + enabled: true, maxItems: 5, maxSize: 1000, flushInterval: 1000), + timerScaleFactor: 1.5), + useBeacon: true, + beaconQueueOptions: + BeaconQueueOpts(maxItems: 2, flushQueueInterval: 5000), + sessions: SessionOpts(autoTrack: true, timeout: 2 * 60 * 1000), + uaChTrackLevel: UaChTrackLevel.defaultLevel, + plugins: [PluginName.BeaconQueue, PluginName.DeviceModeDestinations], + loadIntegration: true, + secureCookie: false, + polyfillIfRequired: true, + destinationsQueueOpts: DestinationsQueueOpts(maxItems: 10), + useGlobalIntegrationsConfigInEvents: true, + bufferDataPlaneEventsUntilReady: true, + dataPlaneEventsBufferTimeout: 1000, + useServerSideCookies: false, + anonymousIdOptions: AnonymousIdOptions( + autoCapture: AutoCapture(enabled: true, source: "source")), + onLoaded: (analytics) => {analytics.setAnonymousId("123")}, + sendAdblockPage: true, + sendAdblockPageOptions: ApiOptions( + additionalProperties: { + "key1": "value1", + "key2": 12345, + }, + ), + preConsent: PreConsentOptions( + enabled: true, + events: PreConsentEventsOptions(delivery: DeliveryType.immediate), + storage: + PreConsentStorageOptions(strategy: StorageStrategy.anonymousId), + ), + consentManagement: ConsentManagementOptions( + enabled: true, + provider: ConsentManagementProvider.oneTrust, + allowedConsentIds: ["consent1", "consent2"], + deniedConsentIds: ["consent3", "consent4"], + ), + polyfillURL: "https://dummy-polyfill.com", + sameDomainCookiesOnly: false, + externalAnonymousIdCookieName: "external_anonymous_id", + dataServiceEndpoint: "https://data-service.com", + ); final List factories = [ create(() {}, "1"), @@ -46,12 +124,50 @@ void main() { expect(mobileMap["sleepTimeOut"], equals(mobileConfig.sleepTimeOut)); expect(webMap["configUrl"], equals("$configUrl/")); + expect(webMap["storage"], isA()); + expect(webMap["storage"], equals(webConfig.storage?.toMap())); expect(webMap["queueOptions"], isA()); - expect(webMap["destSDKBaseURL"], webConfig.destSDKBaseURL); - - final Map queueOpts = webMap["queueOptions"]; - expect(queueOpts["maxRetryDelay"], webConfig.maxRetryDelay.toString()); - expect(queueOpts["maxAttempts"], webConfig.maxAttempts.toString()); + expect(webMap["queueOptions"], equals(webConfig.queueOptions?.toMap())); + expect(webMap["destSDKBaseURL"], equals(webConfig.destSDKBaseURL)); + expect(webMap["pluginsSDKBaseURL"], equals(webConfig.pluginsSDKBaseURL)); + expect(webMap["lockIntegrationsVersion"], + equals(webConfig.lockIntegrationsVersion)); + expect(webMap["lockPluginsVersion"], equals(webConfig.lockPluginsVersion)); + expect(webMap["useBeacon"], equals(webConfig.useBeacon)); + expect(webMap["beaconQueueOptions"], + equals(webConfig.beaconQueueOptions?.toMap())); + expect(webMap["sessions"], equals(webConfig.sessions?.toMap())); + expect(webMap["uaChTrackLevel"], equals(webConfig.uaChTrackLevel?.value)); + expect(webMap["plugins"], equals(webConfig.plugins)); + expect(webMap["loadIntegration"], equals(webConfig.loadIntegration)); + expect(webMap["secureCookie"], equals(webConfig.secureCookie)); + expect(webMap["polyfillIfRequired"], equals(webConfig.polyfillIfRequired)); + expect(webMap["destinationsQueueOpts"], + equals(webConfig.destinationsQueueOpts?.toMap())); + expect(webMap["useGlobalIntegrationsConfigInEvents"], + equals(webConfig.useGlobalIntegrationsConfigInEvents)); + expect(webMap["bufferDataPlaneEventsUntilReady"], + equals(webConfig.bufferDataPlaneEventsUntilReady)); + expect(webMap["dataPlaneEventsBufferTimeout"], + equals(webConfig.dataPlaneEventsBufferTimeout)); + expect( + webMap["useServerSideCookies"], equals(webConfig.useServerSideCookies)); + expect(webMap["anonymousIdOptions"], + equals(webConfig.anonymousIdOptions?.toMap())); + expect(webMap["onLoaded"], isNotNull); + expect(webMap["sendAdblockPage"], equals(webConfig.sendAdblockPage)); + expect(webMap["sendAdblockPageOptions"], + equals(webConfig.sendAdblockPageOptions?.toMap())); + expect(webMap["preConsent"], equals(webConfig.preConsent?.toMap())); + expect(webMap["consentManagement"], + equals(webConfig.consentManagement?.toMap())); + expect(webMap["polyfillURL"], equals(webConfig.polyfillURL)); + expect(webMap["sameDomainCookiesOnly"], + equals(webConfig.sameDomainCookiesOnly)); + expect(webMap["externalAnonymousIdCookieName"], + equals(webConfig.externalAnonymousIdCookieName)); + expect( + webMap["dataServiceEndpoint"], equals(webConfig.dataServiceEndpoint)); }); test('data residency value is properly set', () { diff --git a/packages/plugins/rudder_plugin_ios/pubspec.lock b/packages/plugins/rudder_plugin_ios/pubspec.lock index 587a85e..cff09dd 100644 --- a/packages/plugins/rudder_plugin_ios/pubspec.lock +++ b/packages/plugins/rudder_plugin_ios/pubspec.lock @@ -207,26 +207,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -255,18 +255,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -337,7 +337,7 @@ packages: path: "../rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" sky_engine: dependency: transitive description: flutter @@ -387,10 +387,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -419,10 +419,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -448,5 +448,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=2.0.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/plugins/rudder_plugin_web/pubspec.lock b/packages/plugins/rudder_plugin_web/pubspec.lock index 797dceb..e80cb35 100644 --- a/packages/plugins/rudder_plugin_web/pubspec.lock +++ b/packages/plugins/rudder_plugin_web/pubspec.lock @@ -220,26 +220,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -268,18 +268,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" package_config: dependency: transitive description: @@ -350,7 +350,7 @@ packages: path: "../rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" sky_engine: dependency: transitive description: flutter @@ -400,10 +400,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -432,10 +432,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -461,5 +461,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=2.0.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/pubspec.lock b/pubspec.lock index 664ea06..31429e2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -343,18 +343,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" mime: dependency: transitive description: @@ -481,91 +481,91 @@ packages: path: "packages/integrations/rudder_integration_adjust_flutter" relative: true source: path - version: "1.2.2" + version: "1.3.0" rudder_integration_amplitude_flutter: dependency: "direct main" description: path: "packages/integrations/rudder_integration_amplitude_flutter" relative: true source: path - version: "1.2.2" + version: "1.3.0" rudder_integration_appcenter_flutter: dependency: "direct main" description: path: "packages/integrations/rudder_integration_appcenter_flutter" relative: true source: path - version: "1.3.2" + version: "1.4.0" rudder_integration_appsflyer_flutter: dependency: "direct main" description: path: "packages/integrations/rudder_integration_appsflyer_flutter" relative: true source: path - version: "1.1.12" + version: "1.1.13" rudder_integration_braze_flutter: dependency: "direct main" description: path: "packages/integrations/rudder_integration_braze_flutter" relative: true source: path - version: "1.2.2" + version: "1.3.0" rudder_integration_firebase_flutter: dependency: "direct main" description: path: "packages/integrations/rudder_integration_firebase_flutter" relative: true source: path - version: "2.2.2" + version: "2.3.0" rudder_integration_kochava_flutter: dependency: "direct main" description: path: "packages/integrations/rudder_integration_kochava_flutter" relative: true source: path - version: "1.1.3" + version: "1.2.0" rudder_integration_leanplum_flutter: dependency: "direct main" description: path: "packages/integrations/rudder_integration_leanplum_flutter" relative: true source: path - version: "1.2.2" + version: "1.3.0" rudder_plugin_android: dependency: "direct overridden" description: path: "packages/plugins/rudder_plugin_android" relative: true source: path - version: "2.8.0" + version: "2.9.0" rudder_plugin_ios: dependency: "direct overridden" description: path: "packages/plugins/rudder_plugin_ios" relative: true source: path - version: "2.8.1" + version: "2.9.0" rudder_plugin_web: dependency: "direct overridden" description: path: "packages/plugins/rudder_plugin_web" relative: true source: path - version: "2.7.0" + version: "2.8.0" rudder_sdk_flutter: dependency: "direct main" description: path: "packages/plugins/rudder_plugin" relative: true source: path - version: "2.9.2" + version: "2.10.0" rudder_sdk_flutter_platform_interface: dependency: "direct overridden" description: path: "packages/plugins/rudder_plugin_interface" relative: true source: path - version: "2.8.0" + version: "2.9.0" shelf: dependency: transitive description: @@ -780,4 +780,4 @@ packages: source: hosted version: "1.0.3" sdks: - dart: ">=3.2.0-0 <4.0.0" + dart: ">=3.3.0-0 <4.0.0"