From e39c39143e2d30ff19c636482f20d9ed505feb4e Mon Sep 17 00:00:00 2001 From: Hadas Hirt Date: Sun, 17 May 2026 12:20:02 +0300 Subject: [PATCH 01/12] Fix updateMe docs: clarify only custom fields are updatable, list read-only platform fields --- src/modules/auth.types.ts | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index eff26212..080427db 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -136,25 +136,18 @@ export interface AuthModule { me(): Promise; /** - * Updates the current authenticated user's information. + * Updates the current authenticated user's custom profile fields. * - * Only the fields included in the data object will be updated. - * Commonly updated fields include `full_name` and custom profile fields. + * Only custom fields defined in your User entity schema can be updated. + * Platform-managed fields (`id`, `email`, `full_name`, `created_date`, + * `updated_date`, `app_id`, `is_verified`, `is_service`, `disabled`, and `role`) + * are read-only and cannot be changed with this method. * - * @param data - Object containing the fields to update. + * @param data - Object containing the custom fields to update. * @returns Promise resolving to the updated user data. * * @example * ```typescript - * // Update specific fields - * const updatedUser = await base44.auth.updateMe({ - * full_name: 'John Doe' - * }); - * console.log(`Updated user: ${updatedUser.full_name}`); - * ``` - * - * @example - * ```typescript * // Update custom fields defined in your User entity * await base44.auth.updateMe({ * bio: 'Software developer', @@ -164,7 +157,7 @@ export interface AuthModule { * ``` */ updateMe( - data: Partial> + data: Record ): Promise; /** From 2ad3286ba10c13da7b4235f3614cce84867aa80e Mon Sep 17 00:00:00 2001 From: Hadas Hirt Date: Sun, 17 May 2026 12:24:17 +0300 Subject: [PATCH 02/12] Remove parentheses from updateMe description --- src/modules/auth.types.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index 080427db..5cde7c91 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -139,9 +139,9 @@ export interface AuthModule { * Updates the current authenticated user's custom profile fields. * * Only custom fields defined in your User entity schema can be updated. - * Platform-managed fields (`id`, `email`, `full_name`, `created_date`, - * `updated_date`, `app_id`, `is_verified`, `is_service`, `disabled`, and `role`) - * are read-only and cannot be changed with this method. + * The following platform-managed fields are read-only and cannot be changed + * with this method: `id`, `email`, `full_name`, `created_date`, `updated_date`, + * `app_id`, `is_verified`, `is_service`, `disabled`, and `role`. * * @param data - Object containing the custom fields to update. * @returns Promise resolving to the updated user data. From 3f344902f8ec9ccd0766ef3e223371eecac2777b Mon Sep 17 00:00:00 2001 From: Hadas Hirt Date: Sun, 17 May 2026 12:29:05 +0300 Subject: [PATCH 03/12] Link 'User entity schema' to docs page --- src/modules/auth.types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index 5cde7c91..5f1992fb 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -138,7 +138,7 @@ export interface AuthModule { /** * Updates the current authenticated user's custom profile fields. * - * Only custom fields defined in your User entity schema can be updated. + * Only custom fields defined in your [User entity schema](https://docs.base44.com/developers/backend/resources/entities/user-schema) can be updated. * The following platform-managed fields are read-only and cannot be changed * with this method: `id`, `email`, `full_name`, `created_date`, `updated_date`, * `app_id`, `is_verified`, `is_service`, `disabled`, and `role`. From d421b4fc3e91fc74275d9fb6270acf22e0551609 Mon Sep 17 00:00:00 2001 From: Hadas Hirt Date: Sun, 17 May 2026 14:42:04 +0300 Subject: [PATCH 04/12] Clarify updateMe: role is updatable, fix read-only field list --- src/modules/auth.types.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index 5f1992fb..4fa0fc63 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -136,22 +136,22 @@ export interface AuthModule { me(): Promise; /** - * Updates the current authenticated user's custom profile fields. + * Updates fields on the current authenticated user's profile. * - * Only custom fields defined in your [User entity schema](https://docs.base44.com/developers/backend/resources/entities/user-schema) can be updated. - * The following platform-managed fields are read-only and cannot be changed - * with this method: `id`, `email`, `full_name`, `created_date`, `updated_date`, - * `app_id`, `is_verified`, `is_service`, `disabled`, and `role`. + * You can update `role` and any custom fields defined in your + * [User entity schema](https://docs.base44.com/developers/backend/resources/entities/user-schema). + * The following fields are read-only and cannot be changed with this method: + * `id`, `email`, `full_name`, `created_date`, `updated_date`, and `created_by`. * - * @param data - Object containing the custom fields to update. + * @param data - Object containing the fields to update. * @returns Promise resolving to the updated user data. * * @example * ```typescript - * // Update custom fields defined in your User entity + * // Update role and custom fields defined in your User entity * await base44.auth.updateMe({ + * role: 'admin', * bio: 'Software developer', - * phone: '+1234567890', * preferences: { theme: 'dark' } * }); * ``` From 2062e15efbefe378630dc493347bd874632c0968 Mon Sep 17 00:00:00 2001 From: Hadas Hirt Date: Sun, 17 May 2026 14:43:35 +0300 Subject: [PATCH 05/12] Note that role must match an option defined in the User entity schema --- src/modules/auth.types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index 4fa0fc63..be37d866 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -140,6 +140,7 @@ export interface AuthModule { * * You can update `role` and any custom fields defined in your * [User entity schema](https://docs.base44.com/developers/backend/resources/entities/user-schema). + * The `role` value must match one of the options defined in your User entity schema. * The following fields are read-only and cannot be changed with this method: * `id`, `email`, `full_name`, `created_date`, `updated_date`, and `created_by`. * From 6cddcc8dac797f1b8634403d5dcca6b215e24056 Mon Sep 17 00:00:00 2001 From: Hadas Hirt Date: Sun, 17 May 2026 14:44:51 +0300 Subject: [PATCH 06/12] Restore original opening line for updateMe description --- src/modules/auth.types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index be37d866..d919926e 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -136,7 +136,7 @@ export interface AuthModule { me(): Promise; /** - * Updates fields on the current authenticated user's profile. + * Updates the current authenticated user's information. * * You can update `role` and any custom fields defined in your * [User entity schema](https://docs.base44.com/developers/backend/resources/entities/user-schema). From efce24491cd8277ffd4b99fa2912c206255c23ea Mon Sep 17 00:00:00 2001 From: Hadas Hirt Date: Sun, 17 May 2026 14:49:15 +0300 Subject: [PATCH 07/12] Replace cannot with can't --- src/modules/auth.types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index d919926e..59b45611 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -141,7 +141,7 @@ export interface AuthModule { * You can update `role` and any custom fields defined in your * [User entity schema](https://docs.base44.com/developers/backend/resources/entities/user-schema). * The `role` value must match one of the options defined in your User entity schema. - * The following fields are read-only and cannot be changed with this method: + * The following fields are read-only and can't be changed with this method: * `id`, `email`, `full_name`, `created_date`, `updated_date`, and `created_by`. * * @param data - Object containing the fields to update. From d971cb08f45bc66df3c52fcc6d4ad8bc78a20d7f Mon Sep 17 00:00:00 2001 From: Hadas Hirt Date: Sun, 17 May 2026 14:51:07 +0300 Subject: [PATCH 08/12] Use Note component for read-only fields callout --- src/modules/auth.types.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index 59b45611..48ecaf4c 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -141,8 +141,10 @@ export interface AuthModule { * You can update `role` and any custom fields defined in your * [User entity schema](https://docs.base44.com/developers/backend/resources/entities/user-schema). * The `role` value must match one of the options defined in your User entity schema. + * * The following fields are read-only and can't be changed with this method: * `id`, `email`, `full_name`, `created_date`, `updated_date`, and `created_by`. + * * * @param data - Object containing the fields to update. * @returns Promise resolving to the updated user data. From 92ee3715ede4804b8870b9ccf3a02ce6b21c3c1e Mon Sep 17 00:00:00 2001 From: Hadas Hirt Date: Sun, 17 May 2026 15:13:47 +0300 Subject: [PATCH 09/12] Simplify role options wording in updateMe JSDoc --- src/modules/auth.types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index 48ecaf4c..ffacbb88 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -140,7 +140,7 @@ export interface AuthModule { * * You can update `role` and any custom fields defined in your * [User entity schema](https://docs.base44.com/developers/backend/resources/entities/user-schema). - * The `role` value must match one of the options defined in your User entity schema. + * The `role` value must match one of the defined options. * * The following fields are read-only and can't be changed with this method: * `id`, `email`, `full_name`, `created_date`, `updated_date`, and `created_by`. From 44874b909b2dc08c490ea41855af3a158d620eac Mon Sep 17 00:00:00 2001 From: hadashirt Date: Sun, 17 May 2026 15:27:37 +0300 Subject: [PATCH 10/12] Update src/modules/auth.types.ts Co-authored-by: Sam --- src/modules/auth.types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index ffacbb88..e74020fc 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -139,7 +139,7 @@ export interface AuthModule { * Updates the current authenticated user's information. * * You can update `role` and any custom fields defined in your - * [User entity schema](https://docs.base44.com/developers/backend/resources/entities/user-schema). + * User entity schema. * The `role` value must match one of the defined options. * * The following fields are read-only and can't be changed with this method: From 26542d3f4a95a66b911627b402d430782f979426 Mon Sep 17 00:00:00 2001 From: hadashirt Date: Sun, 17 May 2026 15:27:51 +0300 Subject: [PATCH 11/12] Update src/modules/auth.types.ts Co-authored-by: Sam --- src/modules/auth.types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index e74020fc..c8d98182 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -138,7 +138,7 @@ export interface AuthModule { /** * Updates the current authenticated user's information. * - * You can update `role` and any custom fields defined in your + * You can update `role` and any [custom fields](/developers/backend/resources/entities/user-schema#custom-fields) defined in your * User entity schema. * The `role` value must match one of the defined options. * From da9295f3e9e27a8729c4bba1de3e00ffca7bfe2f Mon Sep 17 00:00:00 2001 From: Hadas Hirt Date: Sun, 17 May 2026 15:30:51 +0300 Subject: [PATCH 12/12] Fix role values in updateMe JSDoc: must be 'user' or 'admin' --- src/modules/auth.types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index c8d98182..13b04cb1 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -140,7 +140,7 @@ export interface AuthModule { * * You can update `role` and any [custom fields](/developers/backend/resources/entities/user-schema#custom-fields) defined in your * User entity schema. - * The `role` value must match one of the defined options. + * The `role` value must be either `'user'` or `'admin'`. * * The following fields are read-only and can't be changed with this method: * `id`, `email`, `full_name`, `created_date`, `updated_date`, and `created_by`.