Skip to content

User profile#162

Merged
BRBussy merged 23 commits intomasterfrom
user-profile
Feb 2, 2026
Merged

User profile#162
BRBussy merged 23 commits intomasterfrom
user-profile

Conversation

@12153
Copy link
Copy Markdown
Contributor

@12153 12153 commented Jan 20, 2026

Summary

This PR introduces a new UserProfile service to the IAM domain and makes several improvements to the codebase.

New UserProfile Service

Adds a complete UserProfile management API under meshtrade/iam/user_profile/v1:

Service Methods:

  • UpdateUserProfile - Update profile settings (display name, locale, currencies, etc.)
  • GetUserProfile - Retrieve a profile by its resource name
  • GetUserProfileByUser - Retrieve a profile by the associated user resource name
  • ListUserProfiles - List all accessible user profiles

UserProfile Fields:

  • name - Unique resource identifier (user_profiles/{ULIDv2})
  • owner / owners - Group ownership hierarchy
  • user - Associated user resource reference
  • display_name - User's display name (required)
  • locale - Language/locale preference (BCP 47 format)
  • profile_picture_url - Avatar/profile image URL
  • display_currency / reporting_currency - Currency preferences

New IAM Roles:

  • ROLE_IAM_USER_PROFILE_ADMIN
  • ROLE_IAM_USER_PROFILE_VIEWER

User Model Updates

  • Added MobileNumber message type with value, verified, and reset_reason fields
  • Added mobile_number field to the User message for phone-based MFA and notifications

API Cleanup

  • Removed unused SearchUsers RPC method and related request/response messages from UserService

Doc Generator Improvements

  • Fixed acronym handling in case conversion functions (kebabCase, snakeCase, goPascalCase)
  • CreateAPIUser now correctly becomes create-api-user (not create-a-p-i-user)
  • GetHTTPResponse becomes get-http-response (not get-h-t-t-p-response)
  • Added comprehensive unit tests for case conversion in case_conversion_test.go

Generated Code

Full SDK generation across all targets:

  • Go - Service interfaces, gRPC clients, validation tests, mock implementations
  • Python - Generated modules with proper __init__.py exports
  • TypeScript - ts-node, ts-old, and ts-web packages
  • Java - gRPC service stubs
  • Documentation - MDX API reference pages with Go, Python, and Java examples

Other Changes

  • Fixed MobileNumber typo (was inconsistently cased)
  • Updated baseline-browser-mapping dependency to fix Docusaurus build warning
  • Minor updates to dev/test scripts

Test Plan

  • buf lint passes
  • ./dev/tool.sh all completes successfully
  • Go validation tests pass for new UserProfile service
  • TypeScript builds successfully (yarn build)
  • Documentation site builds (yarn build:docs)
  • Case conversion tests pass

🤖 Generated with Claude Code

Comment thread proto/meshtrade/iam/user_profile/v1/service.proto Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/user_profile.proto
Comment thread proto/meshtrade/iam/user_profile/v1/user_profile.proto Outdated
BRBussy and others added 5 commits January 26, 2026 12:07
- Simplify UserProfile protobuf message by removing FirstName, LastName, and ContactDetails fields
- Update CreateUserProfile to return UserProfile directly instead of response wrapper
- Rename GetMyUserProfile to GetUserProfileByUser for clarity
- Regenerate all language bindings (Go, Python) and documentation examples
- Update service interface and mock implementations

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Comment thread proto/meshtrade/iam/user/v1/user.proto Outdated
Comment thread proto/meshtrade/type/v1/contact_details.proto Outdated
Comment thread ts-web/src/meshtrade/type/v1/date.ts Outdated
Comment thread ts-web/src/meshtrade/index.ts Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/user_profile.proto Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/user_profile.proto Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/user_profile.proto
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto Outdated
12153 and others added 2 commits January 28, 2026 10:42
- Add comprehensive field comments to UserProfile message (user_profile.proto):
  * user: Link to associated user resource
  * local: Locale/language preference (IETF BCP 47 format)
  * profile_picture_url: Avatar image URL
  * display_name: User's display identifier
  * display_currency: Preferred currency for UI display
  * reporting_currency: Currency for financial reporting

- Add field comment to User message (user.proto):
  * mobile_number: Phone number for MFA, notifications, and contact

All comments follow existing documentation style with clear descriptions
of field purpose, expected formats, and business context.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/service.proto Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/user_profile.proto Outdated
Comment thread proto/meshtrade/iam/user_profile/v1/user_profile.proto
12153 and others added 6 commits January 29, 2026 11:13
…onym handling

Proto changes:
- Add required validation on UserProfile.user field with proper format checking
- Add optional BCP 47 validation on UserProfile.locale field
- Add optional URI validation on UserProfile.profile_picture_url field
- Fix typo: MobileNumber.verfied -> MobileNumber.verified
- Remove unused CreateUserProfileRequest message
- Remove unused sorting import from user_profile service

Test changes:
- Remove SearchUsersRequest validation tests (method was removed)
- Add comprehensive validation tests for UserProfile and service requests
- Add tests for locale (BCP 47) and profile_picture_url (URI) validation

Doc generator fixes (protoc-gen-meshdoc):
- Fix kebabCase() to handle acronyms properly (CreateAPIUser -> create-api-user)
- Fix snakeCase() with same acronym handling for consistency
- Add goPascalCase() for Go identifiers (api_user -> APIUser)
- Add comprehensive tests for case conversion functions
- Rename API user doc directories from a-p-i-user to api-user format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add resolutions field to root package.json to force baseline-browser-mapping
to latest version (2.9.19) for all transitive dependencies.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@BRBussy BRBussy merged commit 45f456c into master Feb 2, 2026
@BRBussy BRBussy deleted the user-profile branch February 2, 2026 09:08
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