@base44-preview/sdk 0.8.56-pr.352.b15ea38 → 0.8.56-pr.353.656b952

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.
@@ -50,7 +50,7 @@ export interface RegisterParams {
50
50
  email: string;
51
51
  /** User's password. */
52
52
  password: string;
53
- /** Has no effect. Base44 doesn't verify Turnstile tokens for app users. */
53
+ /** Optional {@link https://developers.cloudflare.com/turnstile/ | Cloudflare Turnstile CAPTCHA token} for bot protection. */
54
54
  turnstile_token?: string | null;
55
55
  /** Optional {@link https://docs.base44.com/Getting-Started/Referral-program | referral code} from an existing user. */
56
56
  referral_code?: string | null;
@@ -137,11 +137,6 @@ export interface AuthModule {
137
137
  * You can update any [custom fields](/developers/backend/resources/entities/user-schema#custom-fields)
138
138
  * defined in your User entity schema.
139
139
  *
140
- * [Field-level security](/developers/backend/resources/entities/security#field-level-security-fls)
141
- * `write` rules on custom User fields also apply to this method. If `data` includes a field
142
- * the user isn't allowed to write, the call throws a permission error and no fields are
143
- * updated.
144
- *
145
140
  * Updating `role` requires editor access on the app.
146
141
  *
147
142
  * <Note>
@@ -279,7 +274,7 @@ export interface AuthModule {
279
274
  *
280
275
  * @param email - User's email address.
281
276
  * @param password - User's password.
282
- * @param turnstileToken - Has no effect. Base44 doesn't verify Turnstile tokens for app users.
277
+ * @param turnstileToken - Optional {@link https://developers.cloudflare.com/turnstile/ | Cloudflare Turnstile CAPTCHA token} for bot protection.
283
278
  * @returns Promise resolving to login response with access token and user data.
284
279
  * @throws Error if the email and password combination is invalid or the user is not registered.
285
280
  *
@@ -81,7 +81,7 @@ export interface ConnectorApiRequest {
81
81
  export interface ConnectorApiResponse<T = unknown> {
82
82
  /** `true` only when the upstream API returned a 2xx status. Proxy and upstream errors are `false`. */
83
83
  success: boolean;
84
- /** How far the call progressed. Only `not_sent` proves the provider did not execute it. */
84
+ /** How far the call progressed. */
85
85
  phase: ConnectorApiResponsePhase;
86
86
  /** The upstream HTTP status code, or `null` when no response was received. */
87
87
  status: number | null;
@@ -684,11 +684,7 @@ export interface EntityHandler<T = any> {
684
684
  /**
685
685
  * Deletes a single record by ID.
686
686
  *
687
- * The record moves to the entity's trash. To restore it or delete it permanently,
688
- * use **Recently deleted** in the [Data tab](/Building-your-app/Managing-your-app-data)
689
- * or the [Restore entity record](/api-reference/restore-entity-record) and
690
- * [Permanently delete entity record](/api-reference/permanently-delete-entity-record)
691
- * endpoints.
687
+ * Permanently removes a record from the database.
692
688
  *
693
689
  * @param id - The unique identifier of the record to delete.
694
690
  * @returns Promise resolving to the deletion result.
@@ -704,12 +700,7 @@ export interface EntityHandler<T = any> {
704
700
  /**
705
701
  * Deletes multiple records matching a query.
706
702
  *
707
- * The matching records move to the entity's trash. To restore them or delete them
708
- * permanently, use **Recently deleted** in the
709
- * [Data tab](/Building-your-app/Managing-your-app-data) or the
710
- * [Restore entity records](/api-reference/restore-entity-records) and
711
- * [Permanently delete entity record](/api-reference/permanently-delete-entity-record)
712
- * endpoints.
703
+ * Permanently removes all records that match the provided query.
713
704
  *
714
705
  * This isn't a transaction. Each record is deleted on its own, so if the call
715
706
  * fails partway, the records already deleted stay deleted. Learn more about
@@ -767,8 +758,6 @@ export interface EntityHandler<T = any> {
767
758
  * example, filter by `status: 'pending'` when setting status to `'processed'`.
768
759
  *
769
760
  * Each matching record is updated on its own, and the call isn't a transaction.
770
- * All the update operators in a call, such as `$set`, `$inc`, and `$push`, are
771
- * applied to each record in a single write.
772
761
  * To claim one record safely, so that only one of 2 users acting at the same
773
762
  * time succeeds, pass that record's `id` as a plain value plus the conditions
774
763
  * that must still be true, then check `updated` in the response. The conditions
@@ -851,20 +840,6 @@ export interface EntityHandler<T = any> {
851
840
  * // Someone else claimed it first, or it was no longer open
852
841
  * }
853
842
  * ```
854
- *
855
- * @example
856
- * ```typescript
857
- * // Save only if the record hasn't changed
858
- * // `version` is a number field defined in the Document schema.
859
- * // The edit is saved only if the record is still at the version this user loaded.
860
- * const result = await base44.entities.Document.updateMany(
861
- * { id: doc.id, version: doc.version },
862
- * { $set: { body: newBody }, $inc: { version: 1 } }
863
- * );
864
- * if (result.updated === 0) {
865
- * // Someone else saved a change first. Reload the record and try again.
866
- * }
867
- * ```
868
843
  */
869
844
  updateMany(query: Partial<T>, data: Record<string, Record<string, any>>): Promise<UpdateManyResult>;
870
845
  /**
@@ -1142,7 +1117,7 @@ type DynamicEntitiesModule = {
1142
1117
  *
1143
1118
  * Every app includes a built-in `User` entity that stores user account information. This entity has special security rules that can't be changed.
1144
1119
  *
1145
- * Regular users can only read and update their own user record. With service role authentication, you can read and update any user, and remove any user except the app owner. A removed user moves to **Recently deleted** for 30 days, where an app editor can restore them, and is then deleted permanently. 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.
1120
+ * 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.
1146
1121
  *
1147
1122
  * ## Generated Types
1148
1123
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.56-pr.352.b15ea38",
3
+ "version": "0.8.56-pr.353.656b952",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",