Skip to content

[_]: feat/update-sdk#52

Merged
larryrider merged 2 commits intomasterfrom
feat/update-sdk
May 7, 2026
Merged

[_]: feat/update-sdk#52
larryrider merged 2 commits intomasterfrom
feat/update-sdk

Conversation

@larryrider
Copy link
Copy Markdown
Contributor

  • Upgrades internxt dependencies
  • Updates imports to use specific mail types from @internxt/sdk

@larryrider larryrider self-assigned this May 7, 2026
@larryrider larryrider requested a review from xabg2 as a code owner May 7, 2026 09:07
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR upgrades the Internxt SDK from v1.15.12 to v1.16.0 with coordinated API changes. The main change is renaming the Mail export to MailApi in the SDK service layer. All mail-related types are consolidated to import from @internxt/sdk/dist/mail/types instead of the package root. OAuth type definitions are reformatted for consistency, and all affected tests and utilities are updated to reflect these changes.

Changes

SDK Version Upgrade and Mail API Refactor

Layer / File(s) Summary
Dependencies
package.json
Update @internxt/sdk to ^1.16.0, @internxt/eslint-config-internxt to ^2.1.0, and @internxt/prettier-config from GitHub reference to ^2.0.1.
SDK Service API
src/services/sdk/index.ts
SdkManager.getMail() return type changes from Mail to MailApi; SDK import and client factory call updated to MailApi.client(...).
OAuth Type Definitions
src/types/oauth/index.ts
Add LoginCredentials interface with user, newToken, and mnemonic fields; refactor WebAuthParams, WebAuthMessage, and WebAuthConfig with consistent semicolon syntax; condense WEB_AUTH_VALID_ORIGINS to single-line as const.
Mail Service
src/services/sdk/mail/index.ts, src/services/sdk/mail/mail.service.test.ts
Type imports redirected from @internxt/sdk to @internxt/sdk/dist/mail/types for all mail-related request/response types.
Mail Store API
src/store/api/mail/index.ts, src/store/api/mail/mail.api.test.ts
EmailListResponse, ListEmailsQuery, MailAccountKeysResponse, and MailboxResponse types imported from @internxt/sdk/dist/mail/types.
Identity Setup Components
src/features/identity-setup/components/SelectMailInput.tsx, src/features/identity-setup/components/UpdateEmail.tsx, src/features/identity-setup/index.tsx
EmailDomainsResponse and SetupMailAccountPayload type imports updated to @internxt/sdk/dist/mail/types.
Mail Hooks and Components
src/hooks/mail/useEmailSearch.tsx, src/hooks/mail/useEmailSearch.test.tsx, src/hooks/mail/useMailSelection.ts, src/hooks/mail/useUnreadByMailbox.ts, src/hooks/mail/useUnreadByMailbox.test.ts, src/features/mail/components/tray/search/components/list/index.tsx
All mail type imports (SearchFiltersQuery, EmailListResponse, MailboxResponse, EmailResponse) consolidated to @internxt/sdk/dist/mail/types.
Test Utilities and Helpers
src/test-utils/fixtures.ts, src/utils/format-emails/index.ts, src/services/user/user.service.test.ts
Test fixture and utility imports updated to @internxt/sdk/dist/mail/types; user service test mock formatting simplified to single-line calls.
SDK Service Tests
src/services/sdk/sdk.service.test.ts
SdkManager tests updated to mock MailApi instead of Mail; mock export mapping and assertions reflect MailApi.client invocation with proper security and unauthorized callback handling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • xabg2
  • jzunigax2
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'feat/update-sdk' is vague and generic, using non-descriptive terminology that doesn't convey meaningful information about the specific changes (dependency upgrades and import path updates). Consider a more descriptive title such as 'Update SDK dependencies and mail type imports' to better reflect the actual changes in the changeset.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description accurately relates to the changeset, covering both main aspects: dependency upgrades and updates to import paths for mail types.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/update-sdk

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/hooks/mail/useMailSelection.ts`:
- Line 2: The import of EmailListResponse in useMailSelection.ts uses an
internal deep path (`@internxt/sdk/dist/mail/types`); replace it with the SDK's
public export for that type (e.g., import { EmailListResponse } from the SDK's
documented public module) by checking the SDK's package.json exports or docs and
updating the import to the official public path, or if the SDK doesn't expose it
publicly, create a local type alias/interface for EmailListResponse and import
that instead.

In `@src/types/oauth/index.ts`:
- Around line 14-18: The WebAuthMessage type allows invalid combinations;
replace it with a discriminated union using the discriminator
WEB_AUTH_MESSAGE_TYPES so SUCCESS messages have type:
WEB_AUTH_MESSAGE_TYPES.SUCCESS and a required payload: WebAuthParams (no error),
and ERROR messages have type: WEB_AUTH_MESSAGE_TYPES.ERROR and a required error:
string (no payload). Update the WebAuthMessage declaration to a union of those
two specific shapes (referencing WebAuthMessage, WEB_AUTH_MESSAGE_TYPES, and
WebAuthParams) so the compiler enforces correct payload/error pairing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9c734e33-e4c4-46dd-a267-10f4b6499340

📥 Commits

Reviewing files that changed from the base of the PR and between c03073c and 09d0204.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (20)
  • package.json
  • src/features/identity-setup/components/SelectMailInput.tsx
  • src/features/identity-setup/components/UpdateEmail.tsx
  • src/features/identity-setup/index.tsx
  • src/features/mail/components/tray/search/components/list/index.tsx
  • src/hooks/mail/useEmailSearch.test.tsx
  • src/hooks/mail/useEmailSearch.tsx
  • src/hooks/mail/useMailSelection.ts
  • src/hooks/mail/useUnreadByMailbox.test.ts
  • src/hooks/mail/useUnreadByMailbox.ts
  • src/services/sdk/index.ts
  • src/services/sdk/mail/index.ts
  • src/services/sdk/mail/mail.service.test.ts
  • src/services/sdk/sdk.service.test.ts
  • src/services/user/user.service.test.ts
  • src/store/api/mail/index.ts
  • src/store/api/mail/mail.api.test.ts
  • src/test-utils/fixtures.ts
  • src/types/oauth/index.ts
  • src/utils/format-emails/index.ts

Comment thread src/hooks/mail/useMailSelection.ts
Comment thread src/types/oauth/index.ts
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 7, 2026

Deploying mail-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 09d0204
Status: ✅  Deploy successful!
Preview URL: https://851f41fa.mail-web-ea0.pages.dev
Branch Preview URL: https://feat-update-sdk.mail-web-ea0.pages.dev

View logs

@larryrider larryrider merged commit 1b5d8d4 into master May 7, 2026
6 checks passed
@larryrider larryrider deleted the feat/update-sdk branch May 7, 2026 09:52
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.

2 participants