@base44-preview/sdk 0.8.50-pr.290.25880e1 → 0.8.50-pr.290.5c5f362
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.
|
@@ -950,10 +950,6 @@ type DynamicEntitiesModule = {
|
|
|
950
950
|
* - **Anonymous or User authentication** (`base44.entities`): Access is scoped to the current user's permissions. Anonymous users can only access public entities, while authenticated users can access entities they have permission to view or modify.
|
|
951
951
|
* - **Service role authentication** (`base44.asServiceRole.entities`): Operations bypass entity access rules and field-level security entirely. Can read and write any record in any entity.
|
|
952
952
|
*
|
|
953
|
-
* ## Read and write denial
|
|
954
|
-
*
|
|
955
|
-
* A row-level security rule that denies a read doesn't raise an error. `list()` and `filter()` return an empty result, indistinguishable from a query that matched nothing. A denied `create()`, `update()`, or `delete()` throws instead, with an HTTP 403 status.
|
|
956
|
-
*
|
|
957
953
|
* ## Entity Handlers
|
|
958
954
|
*
|
|
959
955
|
* An entity handler is the object you get when you access an entity through `base44.entities.EntityName`. Every entity in your app automatically gets a handler with CRUD methods for managing records.
|
|
@@ -968,6 +964,17 @@ type DynamicEntitiesModule = {
|
|
|
968
964
|
*
|
|
969
965
|
* Regular users can only read and update their own user record. With service role authentication, you can read, update, and delete any user. You can't create users using the entities module. Instead, use the functions of the {@link AuthModule | auth module} to invite or register new users.
|
|
970
966
|
*
|
|
967
|
+
* ## Denied reads and writes
|
|
968
|
+
*
|
|
969
|
+
* Denied reads behave as if the data doesn't exist, so they don't reveal
|
|
970
|
+
* what's there. Denied writes throw, so a blocked change never fails silently.
|
|
971
|
+
*
|
|
972
|
+
* | Operation | When a rule denies it |
|
|
973
|
+
* | --- | --- |
|
|
974
|
+
* | `list()`, `filter()` | Returns an empty result, the same as if nothing matched. No error is thrown. |
|
|
975
|
+
* | `get()` | Throws a not-found error (HTTP 404), whether or not the record exists. |
|
|
976
|
+
* | `create()`, `update()` | Throws a permission error (HTTP 403). |
|
|
977
|
+
*
|
|
971
978
|
* ## Generated Types
|
|
972
979
|
*
|
|
973
980
|
* If you're working in a TypeScript project, you can generate types from your entity schemas to get autocomplete and type checking on all entity methods. See the [Dynamic Types](/developers/references/sdk/getting-started/dynamic-types) guide to get started.
|