Add phone_number support to the createAUser request body#34
Open
jeong-hasang wants to merge 1 commit into
Open
Add phone_number support to the createAUser request body#34jeong-hasang wants to merge 1 commit into
jeong-hasang wants to merge 1 commit into
Conversation
4e768ae to
65337c9
Compare
CreateAUserRequest 모델에 phoneNumber(wire: phone_number) optional 필드를 추가하여 POST /v3/users 요청 body에 전화번호를 전송할 수 있도록 한다. map 기반 직렬화라 모델만 수정하면 상위 계층은 자동 반영된다. - models/CreateAUserRequest.ts, src/api/generated/models/CreateAUserRequest.ts: phoneNumber 프로퍼티 + attributeTypeMap에 phone_number 엔트리 (2벌 동기화) - UserApi.md: createAUser 예제에 phoneNumber 반영 - tests/integration/user.test.ts: pre-existing lastSeenAt 단언 버그(요청이 set한 값과 단언 -1 불일치) 수정 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
65337c9 to
2bd9b45
Compare
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.
The business-messaging user-information docs state that
phone_numbercan be sent in the request body ofPOST https://api-{application_id}.sendbird.com/v3/users, and registering a phone number does work in practice. However,UserApi.createAUsercannot acceptphone_number, so it is impossible to set it on a user through sendbird-platform-sdk.To allow registering a phone number on a Sendbird user via sendbird-platform-sdk, this adds an optional
phoneNumber(wire:phone_number) field to theCreateAUserRequestmodel so the phone number can be sent in thePOST /v3/usersrequest body.Why the
lastSeenAtfix is includedSendbird enforces a global uniqueness constraint on phone_number that persists even after the user is deleted, making stable repeated test runs difficult with the current test approach. End-to-end behavior was verified manually against a live app.
lastSeenAt fix included
The existing
createAUsertest had an incorrect assertion for lastSeenAt, causing it to fail. Fixed to match the value actually sent in the request.CHANGELOG / version
CHANGELOGand thepackage.jsonversion are intentionally left untouched. If a CHANGELOG entry or a version bump should be part of this PR, please comment with the target version and I will add it along with a CHANGELOG entry.