UserProfile
Profile
ユーザーの公開プロフィールを管理する Sub-Feature
概要
User.Profile はユーザーの公開プロフィールの作成・取得・更新を担当する。サブフィーチャーとして Private(非公開プロフィール)を持つ。
API
Handler
| 関数 | 説明 |
|---|---|
findProfileByUserId(client, userId) | ユーザー ID からプロフィールを取得 |
updateProfile(client, userId, input) | プロフィールを更新 |
Service
| 関数 | 説明 |
|---|---|
createProfile(client, input) | プロフィールを作成 |
findProfileByUserId(client, userId) | プロフィールを取得 |
updateProfile(client, userId, input) | プロフィールを更新 |
Schema
| スキーマ | 型 | 説明 |
|---|---|---|
ProfileSchema | Profile | プロフィール |
CreateProfileInputSchema | CreateProfileInput | 作成入力 |
UpdateProfileInputSchema | UpdateProfileInput | 更新入力 |
サブフィーチャー
- Private — 非公開プロフィール管理
使用例
import { User } from "@unitto/features";
const profile = await User.Profile.Handler.findProfileByUserId(client, userId);
await User.Profile.Handler.updateProfile(client, userId, {
displayName: "新しい表示名",
});