Skip to content

feat: ShareAccountWithDimo (account-level permission requests)#105

Merged
zer0stars merged 6 commits into
mainfrom
feat/share-account-with-dimo
Jun 15, 2026
Merged

feat: ShareAccountWithDimo (account-level permission requests)#105
zer0stars merged 6 commits into
mainfrom
feat/share-account-with-dimo

Conversation

@zer0stars

Copy link
Copy Markdown
Member

What

Adds ShareAccountWithDimo to the SDK — the account-level analog of ShareVehiclesWithDimo. It opens the login app at ACCOUNT_MANAGER and 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)? }, entryState ACCOUNT_MANAGER.
  • utils/eventHandler.ts: forward SHARE_ACCOUNT_DATA; surface accountGranted + transactionHash on the transactionResponse success path (parity with sharedVehicles).
  • types: AuthData gains accountGranted?, transactionHash?.
  • index.ts: export ShareAccountWithDimo.

Reviewer notes

  • No JS test runner exists in this repo (CLAUDE.md: "No tests exist for the SDK itself"). The B4 smoke test is therefore a tsc --noEmit typecheck asserting the public surface + AuthData shape, aligned with the existing tsc/webpack toolchain. A true DOM render assertion would require adding a jest/jsdom stack (separate decision).
  • permissions prop typing: Permissions enum 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

@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
login-with-dimo Ready Ready Preview, Comment Jun 15, 2026 7:58pm

Request Review

@zer0stars zer0stars merged commit 048fe38 into main Jun 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant