@base44-preview/sdk 0.8.27-pr.171.bb56537 → 0.8.28-pr.174.6992378
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.
- package/dist/modules/auth.types.d.ts +10 -14
- package/package.json +1 -1
|
@@ -128,32 +128,28 @@ export interface AuthModule {
|
|
|
128
128
|
/**
|
|
129
129
|
* Updates the current authenticated user's information.
|
|
130
130
|
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
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
|
+
* <Note>
|
|
135
|
+
* The following fields are read-only and can't be changed with this method:
|
|
136
|
+
* `id`, `email`, `full_name`, `created_date`, `updated_date`, and `created_by`.
|
|
137
|
+
* </Note>
|
|
133
138
|
*
|
|
134
139
|
* @param data - Object containing the fields to update.
|
|
135
140
|
* @returns Promise resolving to the updated user data.
|
|
136
141
|
*
|
|
137
142
|
* @example
|
|
138
143
|
* ```typescript
|
|
139
|
-
* // Update
|
|
140
|
-
* const updatedUser = await base44.auth.updateMe({
|
|
141
|
-
* full_name: 'John Doe'
|
|
142
|
-
* });
|
|
143
|
-
* console.log(`Updated user: ${updatedUser.full_name}`);
|
|
144
|
-
* ```
|
|
145
|
-
*
|
|
146
|
-
* @example
|
|
147
|
-
* ```typescript
|
|
148
|
-
* // Update custom fields defined in your User entity
|
|
144
|
+
* // Update role and custom fields defined in your User entity
|
|
149
145
|
* await base44.auth.updateMe({
|
|
146
|
+
* role: 'admin',
|
|
150
147
|
* bio: 'Software developer',
|
|
151
|
-
* phone: '+1234567890',
|
|
152
148
|
* preferences: { theme: 'dark' }
|
|
153
149
|
* });
|
|
154
150
|
* ```
|
|
155
151
|
*/
|
|
156
|
-
updateMe(data:
|
|
152
|
+
updateMe(data: Record<string, any>): Promise<User>;
|
|
157
153
|
/**
|
|
158
154
|
* Redirects the user to the app's login page.
|
|
159
155
|
*
|