feat: ShareAccountWithDimo (account-level permission requests)#105
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
ShareAccountWithDimoto the SDK — the account-level analog ofShareVehiclesWithDimo. It opens the login app atACCOUNT_MANAGERand requests an account-level SACD grant (personal documents) instead of vehicle permissions.Part of a 3-repo feature (build order): transactions@0.3.2 → dimo-login app → this SDK → auto-demo.
Changes
enums/events.enums.ts:SHARE_ACCOUNT_DATA. EntryState:ACCOUNT_MANAGER.components/ShareAccountWithDimo.tsx: new button (drops vehicle props). Emits payload{ eventType:'SHARE_ACCOUNT_DATA', permissionTemplateId?, expirationDate?, utm, permissions(binary)? }, entryStateACCOUNT_MANAGER.utils/eventHandler.ts: forwardSHARE_ACCOUNT_DATA; surfaceaccountGranted+transactionHashon thetransactionResponsesuccess path (parity withsharedVehicles).types:AuthDatagainsaccountGranted?,transactionHash?.index.ts: exportShareAccountWithDimo.Reviewer notes
tsc --noEmittypecheck asserting the public surface +AuthDatashape, aligned with the existing tsc/webpack toolchain. A true DOM render assertion would require adding a jest/jsdom stack (separate decision).permissionsprop typing:Permissionsenum value for raw data is'RAW_DATA', not'GetRawData'. Consumers passing['GetRawData']get an all-zeros binary. Harmless for the account flow (dimo-login hardcodes[Permission.GetRawData]), but worth aligning the consumer-facing enum docs.🤖 Generated with Claude Code