@base44-preview/sdk 0.8.18-pr.117.353547f → 0.8.18-pr.117.7c9cdfc

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.
@@ -4,8 +4,6 @@
4
4
  export type RealtimeEventType = "create" | "update" | "delete";
5
5
  /**
6
6
  * Payload received when a realtime event occurs.
7
- *
8
- * @typeParam T - The entity type for the data field. Defaults to `any`.
9
7
  */
10
8
  export interface RealtimeEvent<T = any> {
11
9
  /** The type of change that occurred */
@@ -19,8 +17,6 @@ export interface RealtimeEvent<T = any> {
19
17
  }
20
18
  /**
21
19
  * Callback function invoked when a realtime event occurs.
22
- *
23
- * @typeParam T - The entity type for the event data. Defaults to `any`.
24
20
  */
25
21
  export type RealtimeCallback<T = any> = (event: RealtimeEvent<T>) => void;
26
22
  /**
@@ -41,13 +37,11 @@ export interface DeleteManyResult {
41
37
  }
42
38
  /**
43
39
  * Result returned when importing entities from a file.
44
- *
45
- * @typeParam T - The entity type for imported records. Defaults to `any`.
46
40
  */
47
41
  export interface ImportResult<T = any> {
48
42
  /** Status of the import operation */
49
43
  status: "success" | "error";
50
- /** Details message, e.g., "Successfully imported 3 entities with RLS enforcement" */
44
+ /** Details message */
51
45
  details: string | null;
52
46
  /** Array of created entity objects when successful, or null on error */
53
47
  output: T[] | null;
@@ -57,8 +51,6 @@ export interface ImportResult<T = any> {
57
51
  *
58
52
  * Supports ascending (no prefix or `'+'`) and descending (`'-'`) sorting.
59
53
  *
60
- * @typeParam T - The entity type to derive sortable fields from.
61
- *
62
54
  * @example
63
55
  * ```typescript
64
56
  * // Ascending sort (default)
@@ -80,8 +72,6 @@ export interface EntityTypeRegistry {
80
72
  * Entity handler providing CRUD operations for a specific entity type.
81
73
  *
82
74
  * Each entity in the app gets a handler with these methods for managing data.
83
- *
84
- * @typeParam T - The entity type. Defaults to `any` for backward compatibility.
85
75
  */
86
76
  export interface EntityHandler<T = any> {
87
77
  /**
@@ -92,12 +82,11 @@ export interface EntityHandler<T = any> {
92
82
  *
93
83
  * **Note:** The maximum limit is 5,000 items per request.
94
84
  *
95
- * @typeParam K - The fields to include in the response. Defaults to all fields.
96
85
  * @param sort - Sort parameter, such as `'-created_date'` for descending. Defaults to `'-created_date'`.
97
86
  * @param limit - Maximum number of results to return. Defaults to `50`.
98
87
  * @param skip - Number of results to skip for pagination. Defaults to `0`.
99
88
  * @param fields - Array of field names to include in the response. Defaults to all fields.
100
- * @returns Promise resolving to an array of records with selected fields.
89
+ * @returns Promise resolving to an array of records.
101
90
  *
102
91
  * @example
103
92
  * ```typescript
@@ -133,7 +122,6 @@ export interface EntityHandler<T = any> {
133
122
  *
134
123
  * **Note:** The maximum limit is 5,000 items per request.
135
124
  *
136
- * @typeParam K - The fields to include in the response. Defaults to all fields.
137
125
  * @param query - Query object with field-value pairs. Each key should be a field name
138
126
  * from your entity schema, and each value is the criteria to match. Records matching all
139
127
  * specified criteria are returned. Field names are case-sensitive.
@@ -141,7 +129,7 @@ export interface EntityHandler<T = any> {
141
129
  * @param limit - Maximum number of results to return. Defaults to `50`.
142
130
  * @param skip - Number of results to skip for pagination. Defaults to `0`.
143
131
  * @param fields - Array of field names to include in the response. Defaults to all fields.
144
- * @returns Promise resolving to an array of filtered records with selected fields.
132
+ * @returns Promise resolving to an array of filtered records.
145
133
  *
146
134
  * @example
147
135
  * ```typescript
@@ -313,7 +301,7 @@ export interface EntityHandler<T = any> {
313
301
  * The file format should match your entity structure. Requires a browser environment and can't be used in the backend.
314
302
  *
315
303
  * @param file - File object to import.
316
- * @returns Promise resolving to the import result containing status, details, and created records.
304
+ * @returns Promise resolving to the import result.
317
305
  *
318
306
  * @example
319
307
  * ```typescript
@@ -322,8 +310,8 @@ export interface EntityHandler<T = any> {
322
310
  * const file = event.target.files?.[0];
323
311
  * if (file) {
324
312
  * const result = await base44.entities.MyEntity.importEntities(file);
325
- * if (result.status === 'success' && result.output) {
326
- * console.log(`Imported ${result.output.length} records`);
313
+ * if (result.status === 'success') {
314
+ * console.log(`Imported ${result.output?.length} records`);
327
315
  * }
328
316
  * }
329
317
  * };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.18-pr.117.353547f",
3
+ "version": "0.8.18-pr.117.7c9cdfc",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",