feat(IT-Wallet): [SIW-4177] Track third channel credentials#8082
feat(IT-Wallet): [SIW-4177] Track third channel credentials#8082riccardosacco99 wants to merge 10 commits into
Conversation
…hird-party credential status
… credential property handling
…update third-party credential handling
…Revoked and updateOfflineAccessReason functions
PR Title Validation for conventional commit type✅ All good! PR title follows the conventional commit type. |
Jira Pull Request LinkThis Pull Request refers to Jira issues: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8082 +/- ##
=======================================
Coverage 62.32% 62.33%
=======================================
Files 1954 1954
Lines 36943 36960 +17
Branches 6166 6168 +2
=======================================
+ Hits 23026 23040 +14
- Misses 12553 12555 +2
- Partials 1364 1365 +1
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR extends the IT Wallet analytics property set by adding a new Mixpanel aggregate property, ITW_THIRD_PARTY_CREDENTIAL, and ensures it is kept in sync both as a Profile Property and a Super Property. The new property summarizes whether the user has any third-party/catalogue credentials and whether at least one of them is currently valid, excluding PID and historical L2 credentials.
Changes:
- Introduced the
ITW_THIRD_PARTY_CREDENTIALMixpanel property with valuesnot_available | valid | not_validand added it to ITW base properties. - Implemented aggregate computation logic (filtering out PID and L2 credentials) and ensured it updates on full analytics sync, wallet revoked reset, and credential store/remove events.
- Added unit tests covering aggregate computation and profile/super-property update flows, including saga handler updates.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| apps/main-app/ts/features/itwallet/analytics/utils/types.ts | Adds the ItwThirdPartyCredentials union type used by the new property. |
| apps/main-app/ts/features/itwallet/analytics/saga/credentialAnalyticsHandlers.ts | Recomputes and syncs the aggregate property on credential store/remove operations. |
| apps/main-app/ts/features/itwallet/analytics/saga/tests/credentialAnalyticsHandlers.test.ts | Updates saga tests to validate the new aggregate-property updater behavior. |
| apps/main-app/ts/features/itwallet/analytics/properties/propertyUpdaters.ts | Adds updateThirdPartyCredentialProperty and resets the new property on wallet revoked. |
| apps/main-app/ts/features/itwallet/analytics/properties/propertyTypes.ts | Extends analytics property typings to include ITW_THIRD_PARTY_CREDENTIAL. |
| apps/main-app/ts/features/itwallet/analytics/properties/basePropertyBuilder.ts | Implements buildThirdPartyCredentialProperty and wires it into base property building. |
| apps/main-app/ts/features/itwallet/analytics/properties/tests/propertyUpdaters.test.ts | Adds test coverage for syncing the new property to Profile and Super properties. |
| apps/main-app/ts/features/itwallet/analytics/properties/tests/basePropertyBuilder.test.ts | Adds unit tests for the aggregate property calculation (not_available, valid, not_valid, L2 exclusion). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
60f41b8 to
aa870e5
Compare
Short description
This PR adds the new IT Wallet Mixpanel property
ITW_THIRD_PARTY_CREDENTIAL, tracked both as a Super Property and a Profile Property. The property summarizes whether the user owns at least one credential obtained through the third-party/catalogue channel and whether at least one of those credentials is currently valid.List of changes proposed in this pull request
ITW_THIRD_PARTY_CREDENTIALto IT Wallet analytics base properties.not_availablewhen no third-party/catalogue credential is present.validwhen at least one third-party/catalogue credential is valid.not_validwhen third-party/catalogue credentials are present but none are valid.not_availablewhen wallet analytics properties are reset.