@base44-preview/sdk 0.8.28-pr.174.7df2520 → 0.8.28-pr.174.b0d6645
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -126,22 +126,23 @@ export interface AuthModule {
|
|
|
126
126
|
*/
|
|
127
127
|
me(): Promise<User>;
|
|
128
128
|
/**
|
|
129
|
-
* Updates the current authenticated user's
|
|
129
|
+
* Updates fields on the current authenticated user's profile.
|
|
130
130
|
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
131
|
+
* You can update `role` and any custom fields defined in your
|
|
132
|
+
* [User entity schema](https://docs.base44.com/developers/backend/resources/entities/user-schema).
|
|
133
|
+
* The `role` value must match one of the options defined in your User entity schema.
|
|
134
|
+
* The following fields are read-only and cannot be changed with this method:
|
|
135
|
+
* `id`, `email`, `full_name`, `created_date`, `updated_date`, and `created_by`.
|
|
135
136
|
*
|
|
136
|
-
* @param data - Object containing the
|
|
137
|
+
* @param data - Object containing the fields to update.
|
|
137
138
|
* @returns Promise resolving to the updated user data.
|
|
138
139
|
*
|
|
139
140
|
* @example
|
|
140
141
|
* ```typescript
|
|
141
|
-
* // Update custom fields defined in your User entity
|
|
142
|
+
* // Update role and custom fields defined in your User entity
|
|
142
143
|
* await base44.auth.updateMe({
|
|
144
|
+
* role: 'admin',
|
|
143
145
|
* bio: 'Software developer',
|
|
144
|
-
* phone: '+1234567890',
|
|
145
146
|
* preferences: { theme: 'dark' }
|
|
146
147
|
* });
|
|
147
148
|
* ```
|