[MOB-9999] Aggregate user update event gets deleted#469
Conversation
mprew97
left a comment
There was a problem hiding this comment.
Let's hold on pushing this one in until after Beta. Want ample time to test this functionality.
…feature/MOB-9999-aggregated-user-update-event-gets-deleted
| newDataObject: Record< | ||
| any /* eslint-disable-line @typescript-eslint/no-explicit-any */, | ||
| any /* eslint-disable-line @typescript-eslint/no-explicit-any */ | ||
| > |
There was a problem hiding this comment.
Do we really have no idea what the data obj is supposed to look like?
There was a problem hiding this comment.
(here and lines 314-317)
| dataFields: { | ||
| preferred_car_models: 'Honda', | ||
| country: 'Japan' | ||
| }, | ||
| eventType: 'user' |
There was a problem hiding this comment.
There's a lot of repetition of mock data (here as well as the Subaru data). Could we use constants where appropriate?
There was a problem hiding this comment.
I notice there's a good deal of repetition here... might be an opportunity to create a helper function or something to handle a lot of the repeated code.
There was a problem hiding this comment.
Also noticing repetition in the other test files, recommend helper functions to reduce DRY
There was a problem hiding this comment.
yeah good callout. i will get that fixed up 👍
There was a problem hiding this comment.
For posterity, handling this in a follow-up PR.
* Integrate AUT feature (#301) * merge fork repo code and implement anon session * resolve test cases failure * call API for getting criteria * track anon event and purchase * track anon update cart and user * write test cases * resolve test cases failure for autjorization * modify anonymous manager class * modify test cases * update the lock files * implement criteria completion checker * implement user merge and set config * set config * Complete AUT feature * Resolve review comments * implement test case for merge user * unit test case for anon user event tracking * test case for criteria completion checker * resolve build failure * resolve build failure * resolve review comments * remove circular dependency * remove lock file * resolve review comments * Add user object to trackanonsession and create user after live/valid criteria met (#346) * aut changes * pushed files temporarily * some updates for AUT fixes * updates * Criteria bugs fixed * Criteria bugs fixed * Criteria bugs fixed * Criteria bugs fixed * event test undo * Update events.ts * updateuser changes * updates * more fixes and updates * Authorization test file fixed * Fixed destination email case * Sync events in case of anon user not created and developer tries to call setUserId/setEmail * Handle updateCart flow separately for Anon event and when syncing data * Fixed all the test file with authorixation and annon user event manager * Fixed JWT case * removed logs and did some improvements * fixed some circular dependencies * keep current identity of anon user if merge fails * logic changes for criteria * Simple min match works * Not check event again when matched criteria * Fixed event stored in local as it is and remove criteria id when sync * remove criteria id from events if not available in criteria list when refresh * JWT changes added in example * Authorization changes pushed * Authorization test fxed * Fixed comments * Create new AUT example * Update setUserId * webpack updated * Fixed test files * remove criteria from utils * Test file is fixed and criteria matched * Remove logs * Revert Users and Commerce changes * Fixed import circular dependency * Fixed circular dependancy * Update imports * Reverted eventform * Fixed circular dependency * more fixes * Update webpack.config.js * fixed some suggestions * Fixed comment * Fixed single item matches code (#410) * Fixed single item matches code * Fixed comments * added more unit tests, bug fixes --------- Co-authored-by: hardikmashru <hardikmashru@iterable.com> * Add merge param (#414) * Fixed single item matches code * Fixed comments * Add merge parameter to the setEmail/setUserId function * added unit tests for merge and did some improvements * Fixed comments --------- Co-authored-by: hardikmashru <hardikmashru@iterable.com> * MOB 8960 (#415) * Fixed single item matches code * Fixed comments * added more unit tests, bug fixes * Not combinator implemented * evaluateEvent added not combinator * minMatch changes revert * minMatch implemented * complex criteria tests, not combinator, evaluateFieldLogic fix --------- Co-authored-by: hardikmashru <hardikmashru@iterable.com> * Isset purchase update fix (#416) * Fixed single item matches code * Fixed comments * added more unit tests, bug fixes * Not combinator implemented * evaluateEvent added not combinator * minMatch changes revert * minMatch implemented * complex criteria tests, not combinator, evaluateFieldLogic fix * Isset fix and unit tests * update cart and custom event fix, unit tests * little changes * doesItemMatchQueries fix * isset fail & min-max tests, * Replace for loop with array methods * added sampleTest1 * Set type annotations for issetCheck --------- Co-authored-by: hardikmashru <hardikmashru@iterable.com> * Fixed bools needs to be string (#422) * MOB-9055: Resolve nested criteria match issue (#423) * MOB-9055: Resolve nested criteria match issue * converted an array operator as opposed to a for-loop * MOB-9138: Resolves DoesNotEqual criteria match issue (#426) * Merge branch 'main' into AUT_main 2606561 * revert back eslint rule * Resolve path related error * [MOB-9258] fixed nested IsSet matching (#427) * Fixed scenario where a IsSet criteria is on the object and there is also a IsSet criteria on the nested json * remove unnecessary method call for never happen scenario * revert back eslint rule --------- Co-authored-by: hani <hani.vora@iterable.com> * MOB-9305: fixed events createdAt timeStamps (#431) * MOB-9168: Written automated unit tests against Combination logic with Event Type (#429) * MOB-8824: Added limitation to event storage (#430) * MOB-8824: Added limitation to event storage * fix: build issue * Nested custom event check related change (#432) * MOB 9328 - Verify AUT works with JWT (#437) * implement code for generate JWT token * revert back the eslint rule * MOB 9149 - Sample app object updates not formatted properly (#438) * resolve nested criteria obj error * modify test case * MOB-9308: supports nested field types (#439) * MOB-9308: supports nested field types * fix: linting issue * MOB-9081: Written automated unit tests for different field types and … (#436) * MOB-9081: Written automated unit tests for different field types and comparator types * made criterias to be re-usable * fully supports comparison for data in Array data with all comparator types (#444) * MOB 9328 add JWT in response (#441) * added line for pass JWT to response * revert back code for server side revert back the code for generate JWT server side as per review comment * revert eslint rule * updated nested field logic (#445) * updated nested field logic * Resolved typo * resolved conflicts * MOB-9145: support isOneOf and isNotOneOf comparator (#446) * fully supports comparison for data in Array data with all comparator types * MOB-9145: support isOneOf and isNotOneOf comparator * fix: trailing spaces issue * [MOB-9522]: Fix JWT UserID Support (#452) * [DOCS-4818] EUDC instructions update (#428) * EUDC instructions update * Formatting * Bump braces from 3.0.2 to 3.0.3 (#406) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](micromatch/braces@3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ws from 7.5.9 to 7.5.10 (#409) Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 7.5.10. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](websockets/ws@7.5.9...7.5.10) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump axios from 1.6.2 to 1.7.4 (#433) Bumps [axios](https://github.com/axios/axios) from 1.6.2 to 1.7.4. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.6.2...v1.7.4) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump postcss from 8.3.11 to 8.4.31 (#235) * Bump postcss from 8.3.11 to 8.4.31 Bumps [postcss](https://github.com/postcss/postcss) from 8.3.11 to 8.4.31. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](postcss/postcss@8.3.11...8.4.31) --- updated-dependencies: - dependency-name: postcss dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * fix spaces --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mitch Prewitt <44011584+mprew97@users.noreply.github.com> * Bump braces from 3.0.2 to 3.0.3 in /example (#434) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](micromatch/braces@3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump requirejs from 2.3.6 to 2.3.7 (#435) Bumps [requirejs](https://github.com/jrburke/r.js) from 2.3.6 to 2.3.7. - [Commits](requirejs/r.js@2.3.6...2.3.7) --- updated-dependencies: - dependency-name: requirejs dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump micromatch from 4.0.5 to 4.0.8 in /example (#447) Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8. - [Release notes](https://github.com/micromatch/micromatch/releases) - [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md) - [Commits](micromatch/micromatch@4.0.5...4.0.8) --- updated-dependencies: - dependency-name: micromatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mitch Prewitt <44011584+mprew97@users.noreply.github.com> * update version for release (#448) * Bump webpack from 5.76.0 to 5.94.0 (#443) Bumps [webpack](https://github.com/webpack/webpack) from 5.76.0 to 5.94.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v5.76.0...v5.94.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * EUDC -> EDC (#449) * fix jwt generator for userid * some cleanup and fixes * unused imports * fix build * revert, outside of scope * test not needed --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Brad Umbaugh <brad.umbaugh@iterable.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [MOB-9505] rename merge parameter (#450) * [MOB-9505] rename merge parameter * fix ci failure and resolved comment * fix: ci failure and merged AUT_main changes * MOB-9307 Add test to validate object created by custom event and user update api calls (#455) * [MOB-9402] update user should not be a separate call (#453) * [MOB-9402] update user should not be a separate call * feat: test cases update user should not be a separate call * [MOB-9568] update "criterias" to "criteriaSets" (#456) * [MOB-9578] implements identity resolution (#458) * MOB-9650 Added support for nested criteria match a.b.c (#457) * MOB-9650 Added support for nested criteria match a.b.c * fix: removed updatecart from nested criteria * [MOB-9652] support for nested JSON array (#459) * MOB-9650 Added support for nested criteria match a.b.c * fix: removed updatecart from nested criteria * [MOB-9652] support for nested JSON array * [MOB-9652] customEvent test case for nested JSON array * [MOB-9168] Automated unit tests against complex criteria (#461) * [MOB-9168] Automated unit tests against complex criteria * [MOB-9168] Automated unit tests against complex criteria * [MOB-9639] Added handler for notifying customer app of a newly created anon userid (#460) * [MOB-9578] implements identity resolution * [MOB-9639] Added handler for notifying customer app of a newly created anon userid * moved onAnonUserCreated in identityResolution * [MOB-9640] Keep AUT off until concent to track is granted (#462) * [MOB-9640] Keep AUT off until concent to track is granted * rename concent to consent * fixed eslint issue * added consent support for with-jwt config * [MOB-9899]: Add Auth Checks Before API Calls (#463) * AUT bug bash settings * block api calls if typeOfAuth not set * auth checks and tests * branch fix reversions * fix most of tests --------- Co-authored-by: jyu115 <justin.yu@iterable.com> * [MOB-9955]: Allow IdentityResolution Overrides and Move onAnonUserCreated in Config (#464) * shuffle onAnonUserCreated * allow identity resolution overrides on setEmail/setUserId * fix replay issue with JWT (#465) * [MOB-9954]: fix userMergeScenario test (#466) * fix replay issue with JWT * fix spec * [MOB-9954]: Fix Circular Dependency and Clean Up Auth Checks on API Calls (#467) * fix replay issue with JWT * fix spec * move initialize check over * add type of auth util * clean up auth checks and circular deps * add getter * fix * lets see * add additional endpoints * rename (#470) * [MOB-9703] Added support for fetching new JWT prior to calling merge (#468) * prettify code * [MOB-9703] Added support for fetching new JWT prior to calling merge * moved JWT to localstorage * fix circular deps * [MOB-9970] anonymous criteria should match for nested values (#472) * [MOB-10064] single primitive array bug fix (#473) * [MOB-9970] anonymous criteria should match for nested values * [MOB-10064] single primitive array bug fix * [MOB-10086]: Minor AUT Code Cleanup/Renaming (#474) * cleanup * rename * [MOB-10091]: AUT Pre-Bash Updates (#475) * update var, some error cleanup in sample app * remove endpoint from list * fix spec * remove md file (#477) * add method to clear anon data (#480) * add new messsage to rejection (#479) * [MOB-10123]: Clear Anon Data When Replay is False (#478) * clear anon data on user initialization * clear anon data even if replay is false * update tests * oop * Update authorization.ts * update release version (#481) * [MOB-9999] Aggregate user update event gets deleted (#469) * prettify code * [MOB-9703] Added support for fetching new JWT prior to calling merge * [MOB-9999] Aggregate user update event gets deleted * missed this * fix up tests and issues * update types * update types some more * forgot to commit this --------- Co-authored-by: mitch prewitt <mitch.prewitt@iterable.com> * [MOB-11736]: UUA Test Cleanup (#519) * prettify code * [MOB-9703] Added support for fetching new JWT prior to calling merge * [MOB-9999] Aggregate user update event gets deleted * missed this * fix up tests and issues * update types * update types some more * forgot to commit this * update and cleanup UUA tests --------- Co-authored-by: Darshan Parmar <darshan.parmar@iterable.com> * [MOB-11714]: rename anonymous -> unknown (#520) * rename anonymous -> unknown * accidentally got deleted * Update authorization.ts * [MOB-11679]: consent logging implementation (#521) * consent loggimg impl draft * remove consent check and cleanup some * test fixes and additional cleanup * rework a bit * fix specs * [MOB-11737]: Resolve Main Branch Conflicts with UUA Branch (#522) * bump version (#482) * [MOB-11001] adding codecov to web-sdk (#487) * [MOB-11346] exposing baseIterableRequest (#489) * [MOB-11346] exposing baseIterableRequest * Update README.md Co-authored-by: lauren-mulkern <104173927+lauren-mulkern@users.noreply.github.com> * Update README.md Co-authored-by: lauren-mulkern <104173927+lauren-mulkern@users.noreply.github.com> * [MOB-11346] adding example for readme --------- Co-authored-by: lauren-mulkern <104173927+lauren-mulkern@users.noreply.github.com> * [MOB-11441] Bump axios dependency version (#494) * [MOB-11441] Bump axios version * [MOB-11441] Bump axios version in react app * [MOB-11449] Upgrade jest dependency (#496) * [MOB-11449] Upgrade jest dependency in react sample app * [MOB-11449] Upgrade jest dependency in sample app * [MOB-11449] Upgrade jest dependency req * [MOB-11443] Bump express dependency version (#495) * [MOB-11443] Bump express dependency version * [MOB-11443] Bump express dependency version in sample app * [MOB-11443] Bump express dependency version in react sample app * [MOB-11443] Remove expess from package.json * [MOB-11427] Add maxWidth to getInAppMessages payload (#491) * [MOB-11427] Add maxWidth to getinappmessages payload * [MOB-11427] Include ESLint as workspace formatter * Revert "[MOB-11427] Include ESLint as workspace formatter" This reverts commit 63639ea. * [MOB-11427] Update tests and refactor * [MOB-11427] Add test * [MOB-11427] Update README * [MOB-11439] Upgrade Web SDK version to v1.2.0 (#499) * [MOB-11487] Upgrade webpack dependency (#500) * [MOB-11503] Fix eslint errors on vanilla JS sample app (#501) * [MOB-11503] Fix lint formatting errors on axios post request params * [MOB-11503] Cleanup * [MOB-11503] Reorder imports * [MOB-11503] Support login email in env * [MOB-11524] Support non-JWT requests in react sample app (#505) * [MOB-11524] Add USE_JWT to env example * [MOB-11524] Add lint exception for sample app * [MOB-11524] Support non-JWT requests in react sample app * [MOB-11524] Fix init * [MOB-11524] Use await * [MOB-11524] Set auth token for non-jwt logins after a logout * [MOB-11524] Set auth token for non-jwt logins after a logout * [MOB-11524] Create helper fn * [MOB-11524] Undo autoformat * [MOB-11524] Resolve linter error * [MOB-11507] Upgrade webpack-dev-server and node (#502) * [MOB-11507] Upgrade webpack-dev-server * [MOB-11507] Upgrade webpack-dev-server in /react-example * [MOB-11507] Upgrade webpack-dev-server in /example * [MOB-11507] Update env comments * [MOB-11507] Update node engine requirement * [MOB-11507] Upgrade webpack-cli * [MOB-11507] Upgrade webpack-cli in /example * [MOB-11507] Remove iterable from dependencies in /react-example * [MOB-11507] Upgrade webpack-cli in /react-example * [MOB-11507] Update node in ci config * [MOB-11507] Update lint config * [MOB-11507] Update README * [MOB-11616] Resolve Remaining Vulnerable Security Dependencies (#508) * [MOB-11616] Resolve braces vulnerability * [MOB-11616] Resolve micromatch vulnerability * [MOB-11616] Resolve babel runtime vulnerability * [MOB-11554] Resolve lint warnings (#506) * [MOB-11554] Resolve lint warnings in Users * [MOB-11554] Resolve lint warnings in Commerce * [MOB-11554] Resolve lint warnings in EventsForm * [MOB-11554] Resolve lint warnings in EmbeddedMsgsImpressionTracker * [MOB-11554] Resolve lint warnings in EmbeddedMsgs * [MOB-11554] Resolve lint warnings in EmbeddedForm * [MOB-11554] Clean up lint disables * [MOB-11618] Dedupe lockfiles (#509) * [MOB-11618] Dedupe lockfiles * [MOB-11618] Reinstall * [MOB-11575] Bump version to v2.0.0 (#510) * [MOB-11701] Test Publish (#514) * [MOB-11702] Add .nvmrc config to project (#513) * [MOB-11702] Add .nvmrc config to project * [MOB-11702] Add newline * [MOB-11702] Remove comments * [MOB-11716] Add build steps to publish workflow (#517) * [MOB-11717] Update version to v2.1.0 (#518) * fix UUA and base functionality * fix linting errors * fix up tests * update tests (WIP) * add new test suite to cover UUA logic on auth --------- Co-authored-by: Geoff Kim <67926468+Geoff-at-iterable@users.noreply.github.com> Co-authored-by: lauren-mulkern <104173927+lauren-mulkern@users.noreply.github.com> Co-authored-by: Paul Jung <paul.jung@iterable.com> * [MOB-11879]: export and readme updates for UUA (#523) * export and readme updates * remove comments * more updates * fix specs * prettier fix * fix comp errors * fix user profile updates for UUA (#525) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Hani Vora <150109181+hani-iterable@users.noreply.github.com> Co-authored-by: hardikmashru <hardikmashru@iterable.com> Co-authored-by: darshan-iterable <darshan.parmar@iterable.com> Co-authored-by: hani <hani.vora@iterable.com> Co-authored-by: Mitch Prewitt <44011584+mprew97@users.noreply.github.com> Co-authored-by: Brad Umbaugh <brad.umbaugh@iterable.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: jyu115 <justin.yu@iterable.com> Co-authored-by: mitch prewitt <mitch.prewitt@iterable.com> Co-authored-by: Geoff Kim <67926468+Geoff-at-iterable@users.noreply.github.com> Co-authored-by: lauren-mulkern <104173927+lauren-mulkern@users.noreply.github.com> Co-authored-by: Paul Jung <paul.jung@iterable.com>
JIRA Ticket(s) if any
Description
aggregated user update event gets deleted
Test Steps
Video attached to the ticket, See a JIRA ticket for the video