@base44-preview/sdk 0.8.18-pr.117.203ff32 → 0.8.18-pr.117.353547f

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.
@@ -57,6 +57,8 @@ export interface ImportResult<T = any> {
57
57
  *
58
58
  * Supports ascending (no prefix or `'+'`) and descending (`'-'`) sorting.
59
59
  *
60
+ * @typeParam T - The entity type to derive sortable fields from.
61
+ *
60
62
  * @example
61
63
  * ```typescript
62
64
  * // Ascending sort (default)
@@ -78,6 +80,8 @@ export interface EntityTypeRegistry {
78
80
  * Entity handler providing CRUD operations for a specific entity type.
79
81
  *
80
82
  * 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.
81
85
  */
82
86
  export interface EntityHandler<T = any> {
83
87
  /**
@@ -93,7 +97,7 @@ export interface EntityHandler<T = any> {
93
97
  * @param limit - Maximum number of results to return. Defaults to `50`.
94
98
  * @param skip - Number of results to skip for pagination. Defaults to `0`.
95
99
  * @param fields - Array of field names to include in the response. Defaults to all fields.
96
- * @returns Promise resolving to an array of records.
100
+ * @returns Promise resolving to an array of records with selected fields.
97
101
  *
98
102
  * @example
99
103
  * ```typescript
@@ -137,7 +141,7 @@ export interface EntityHandler<T = any> {
137
141
  * @param limit - Maximum number of results to return. Defaults to `50`.
138
142
  * @param skip - Number of results to skip for pagination. Defaults to `0`.
139
143
  * @param fields - Array of field names to include in the response. Defaults to all fields.
140
- * @returns Promise resolving to an array of filtered records.
144
+ * @returns Promise resolving to an array of filtered records with selected fields.
141
145
  *
142
146
  * @example
143
147
  * ```typescript
@@ -309,7 +313,7 @@ export interface EntityHandler<T = any> {
309
313
  * The file format should match your entity structure. Requires a browser environment and can't be used in the backend.
310
314
  *
311
315
  * @param file - File object to import.
312
- * @returns Promise resolving to the import result.
316
+ * @returns Promise resolving to the import result containing status, details, and created records.
313
317
  *
314
318
  * @example
315
319
  * ```typescript
@@ -318,8 +322,8 @@ export interface EntityHandler<T = any> {
318
322
  * const file = event.target.files?.[0];
319
323
  * if (file) {
320
324
  * const result = await base44.entities.MyEntity.importEntities(file);
321
- * if (result.status === 'success') {
322
- * console.log(`Imported ${result.output?.length} records`);
325
+ * if (result.status === 'success' && result.output) {
326
+ * console.log(`Imported ${result.output.length} records`);
323
327
  * }
324
328
  * }
325
329
  * };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.18-pr.117.203ff32",
3
+ "version": "0.8.18-pr.117.353547f",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",