Skip to content

refactor: Add Shared prefix to models shared with iOS to workaround Swift namespacing limitation#154

Merged
LouisCAD merged 1 commit intomainfrom
rename-shared-models
Apr 30, 2026
Merged

refactor: Add Shared prefix to models shared with iOS to workaround Swift namespacing limitation#154
LouisCAD merged 1 commit intomainfrom
rename-shared-models

Conversation

@LouisCAD
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 30, 2026 13:21
@LouisCAD LouisCAD enabled auto-merge April 30, 2026 13:21
Copy link
Copy Markdown
Member

@lebojo lebojo left a comment

Choose a reason for hiding this comment

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

🌮

@sonarqubecloud
Copy link
Copy Markdown

@LouisCAD LouisCAD merged commit 07835b8 into main Apr 30, 2026
12 checks passed
@LouisCAD LouisCAD deleted the rename-shared-models branch April 30, 2026 13:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR renames several migration/user-profile related models in the shared KMP library to use a Shared* prefix, addressing Swift/Kotlin-Native namespacing limitations and aligning the Android app + internal library code with the new names.

Changes:

  • Renamed shared migration models (e.g., ApiTokenSharedApiToken, UserProfileSharedUserProfile, SecuritySharedSecurity, etc.).
  • Updated internal multiplatform-lib request/manager code to use the renamed models.
  • Updated Android app integration code (MigrationUtils, DI bridge) to match the new types.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
multiplatform-lib/src/commonMain/kotlin/network/interfaces/AuthenticatorBridge.kt Updates bridge API surface to use SharedApiToken / SharedUserProfile.
multiplatform-lib/src/commonMain/kotlin/models/migration/SharedApiToken.kt Renames the migration token model to SharedApiToken.
multiplatform-lib/src/commonMain/kotlin/models/migration/user/SharedUserProfile.kt Renames the migration user profile model to SharedUserProfile and updates embedded token type.
multiplatform-lib/src/commonMain/kotlin/models/migration/user/preferences/Preferences.kt Switches preference fields to the renamed Shared* preference/security models.
multiplatform-lib/src/commonMain/kotlin/models/migration/user/preferences/SharedPreferenceTemplate.kt Renames preference base type to SharedPreferenceTemplate.
multiplatform-lib/src/commonMain/kotlin/models/migration/user/preferences/SharedCountry.kt Renames Country to SharedCountry and updates base class.
multiplatform-lib/src/commonMain/kotlin/models/migration/user/preferences/SharedLanguage.kt Renames Language to SharedLanguage and updates base class.
multiplatform-lib/src/commonMain/kotlin/models/migration/user/preferences/SharedOrganizationPreference.kt Renames OrganizationPreference to SharedOrganizationPreference.
multiplatform-lib/src/commonMain/kotlin/models/migration/user/preferences/SharedTimeZone.kt Renames TimeZone to SharedTimeZone and updates base class.
multiplatform-lib/src/commonMain/kotlin/models/migration/user/preferences/security/SharedSecurity.kt Renames Security to SharedSecurity and updates auth-devices element type.
multiplatform-lib/src/commonMain/kotlin/models/migration/user/preferences/security/SharedAuthDevices.kt Renames AuthDevices to SharedAuthDevices.
multiplatform-lib/src/commonMain/kotlin/internal/requests/AuthenticatorRequest.kt Updates user-profile API response typing to SharedUserProfile.
multiplatform-lib/src/commonMain/kotlin/internal/managers/MigrationManager.kt Updates migration flow to pass/construct SharedApiToken.
multiplatform-lib/src/commonMain/kotlin/internal/managers/AuthenticatorManager.kt Updates authentication result typing/construction to SharedApiToken.
multiplatform-lib/src/commonMain/kotlin/internal/MigrationAuthentication.kt Updates sealed authentication model to carry SharedApiToken.
app/src/main/kotlin/com/infomaniak/auth/utils/MigrationUtils.kt Updates mapping utilities to accept/convert the renamed shared models.
app/src/main/kotlin/com/infomaniak/auth/di/ApplicationModule.kt Updates DI bridge implementation to accept SharedUserProfile and use SharedApiToken aliasing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants