@base44-preview/sdk 0.8.50-pr.290.e7ccb0e → 0.8.50-pr.292.d7cb5e4

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.
@@ -341,9 +341,6 @@ export interface EntityHandler<T = any> {
341
341
  * and records deleted between pages never shift the boundary. `skip` is kept
342
342
  * for existing code and is deprecated for loops.
343
343
  *
344
- * **Note:** Returns an empty result if a row-level security rule denies
345
- * this call. See {@link EntitiesModule | Denied reads and writes}.
346
- *
347
344
  * @typeParam K - The fields to include in the response. Defaults to all fields.
348
345
  * @param sort - Sort parameter, such as `'-created_date'` for descending. Defaults to `'-created_date'`.
349
346
  * @param limit - Maximum number of results to return. Defaults to `5000`.
@@ -409,9 +406,6 @@ export interface EntityHandler<T = any> {
409
406
  * and records deleted between pages never shift the boundary. `skip` is kept
410
407
  * for existing code and is deprecated for loops.
411
408
  *
412
- * **Note:** Returns an empty result if a row-level security rule denies
413
- * this call. See {@link EntitiesModule | Denied reads and writes}.
414
- *
415
409
  * @typeParam K - The fields to include in the response. Defaults to all fields.
416
410
  * @param query - Query object with field-value pairs. Each key should be a field name
417
411
  * from your entity schema, and each value is the criteria to match. Records matching all
@@ -532,10 +526,6 @@ export interface EntityHandler<T = any> {
532
526
  *
533
527
  * Retrieves a specific record using its unique identifier.
534
528
  *
535
- * **Note:** Throws a not-found error, whether or not the record exists,
536
- * if a row-level security rule denies this call. See
537
- * {@link EntitiesModule | Denied reads and writes}.
538
- *
539
529
  * @param id - The unique identifier of the record.
540
530
  * @returns Promise resolving to the record.
541
531
  *
@@ -552,9 +542,6 @@ export interface EntityHandler<T = any> {
552
542
  *
553
543
  * Creates a new record with the provided data.
554
544
  *
555
- * **Note:** Throws a permission error if a row-level security rule
556
- * denies this call. See {@link EntitiesModule | Denied reads and writes}.
557
- *
558
545
  * @param data - Object containing the record data.
559
546
  * @returns Promise resolving to the created record.
560
547
  *
@@ -581,9 +568,6 @@ export interface EntityHandler<T = any> {
581
568
  * To update multiple specific records with different data each, use
582
569
  * {@linkcode bulkUpdate | bulkUpdate()}.
583
570
  *
584
- * **Note:** Throws a permission error if a row-level security rule
585
- * denies this call. See {@link EntitiesModule | Denied reads and writes}.
586
- *
587
571
  * @param id - The unique identifier of the record to update.
588
572
  * @param data - Object containing the fields to update.
589
573
  * @returns Promise resolving to the updated record.
@@ -980,17 +964,6 @@ type DynamicEntitiesModule = {
980
964
  *
981
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.
982
966
  *
983
- * ## Denied reads and writes
984
- *
985
- * Denied reads behave as if the data doesn't exist, so they don't reveal
986
- * what's there. Denied writes throw, so a blocked change never fails silently.
987
- *
988
- * | Operation | When a rule denies it |
989
- * | --- | --- |
990
- * | `list()`, `filter()` | Returns an empty result, the same as if nothing matched. No error is thrown. |
991
- * | `get()` | Throws a not-found error (HTTP 404), whether or not the record exists. |
992
- * | `create()`, `update()` | Throws a permission error (HTTP 403). |
993
- *
994
967
  * ## Generated Types
995
968
  *
996
969
  * 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.
@@ -11,9 +11,11 @@ function initializeSocket(config, handlers) {
11
11
  const resolvedToken = (_a = config.token) !== null && _a !== void 0 ? _a : getAccessToken();
12
12
  const query = {
13
13
  app_id: config.appId,
14
- token: resolvedToken,
15
14
  };
16
- if (!resolvedToken) {
15
+ if (resolvedToken) {
16
+ query.token = resolvedToken;
17
+ }
18
+ else {
17
19
  query.anonymous_id = getAnalyticsSessionId();
18
20
  }
19
21
  const socket = io(config.serverUrl, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.50-pr.290.e7ccb0e",
3
+ "version": "0.8.50-pr.292.d7cb5e4",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",