@pubflow/core 0.3.0 → 0.3.1

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.3.1] - 2025-10-25
6
+
7
+ ### Added
8
+ - Added `PubflowConfig` as type alias for `PubflowInstanceConfig` (backward compatibility)
9
+ - Added `validateOnStartup` field to `SessionConfig` interface (React Native support)
10
+ - Added alternative field names to `PaginationMeta` interface:
11
+ - `page` (alternative to `currentPage`)
12
+ - `limit` (alternative to `perPage`)
13
+ - `total` (alternative to `totalItems`)
14
+ - `hasMore` (React Native compatibility)
15
+
16
+ ### Changed
17
+ - Made all `PaginationMeta` fields optional for maximum flexibility
18
+ - Updated documentation to reflect both naming conventions
19
+
20
+ ### Fixed
21
+ - Fixed TypeScript compilation errors in `@pubflow/react-native` package
22
+ - Fixed missing exports for React Native compatibility
23
+
5
24
  ## [0.3.0] - 2025-10-25
6
25
 
7
26
  ### Added
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export * from './config';
12
12
  export * from './schema/validator';
13
13
  export * from './storage/adapter';
14
14
  export type { User, SessionConfig, StorageConfig, PubflowInstanceConfig, PaginationMeta } from './types';
15
+ export type { PubflowInstanceConfig as PubflowConfig } from './types';
15
16
  export type { LoginCredentials, LoginResult, SessionValidationResult, SessionRefreshResult, RegistrationData, RegistrationResult, PasswordResetRequestData, PasswordResetData, AuthResponse, SessionResponse, ValidationResponse, RefreshResponse } from './auth/types';
16
17
  export { ApiClient } from './api/client';
17
18
  export { AuthService } from './auth/service';
package/dist/types.d.ts CHANGED
@@ -135,6 +135,10 @@ export interface SessionConfig {
135
135
  * Whether to validate session automatically
136
136
  */
137
137
  autoValidate?: boolean;
138
+ /**
139
+ * Whether to validate session on startup (React Native)
140
+ */
141
+ validateOnStartup?: boolean;
138
142
  /**
139
143
  * Session validation interval in milliseconds
140
144
  */
@@ -204,22 +208,46 @@ export interface PubflowInstanceConfig {
204
208
  }
205
209
  /**
206
210
  * Pagination metadata
211
+ *
212
+ * @version 0.3.1 - Made all fields optional for maximum flexibility
213
+ *
214
+ * Supports multiple naming conventions:
215
+ * - Standard: currentPage, totalPages, totalItems, perPage
216
+ * - Alternative: page, limit, total, hasMore (React Native compatibility)
217
+ *
218
+ * At least one set of fields should be provided.
207
219
  */
208
220
  export interface PaginationMeta {
209
221
  /**
210
- * Current page number
222
+ * Current page number (standard format)
223
+ */
224
+ currentPage?: number;
225
+ /**
226
+ * Current page number (alternative format - React Native)
211
227
  */
212
- currentPage: number;
228
+ page?: number;
213
229
  /**
214
230
  * Total number of pages
215
231
  */
216
- totalPages: number;
232
+ totalPages?: number;
233
+ /**
234
+ * Total number of items (standard format)
235
+ */
236
+ totalItems?: number;
237
+ /**
238
+ * Total number of items (alternative format - React Native)
239
+ */
240
+ total?: number;
241
+ /**
242
+ * Number of items per page (standard format)
243
+ */
244
+ perPage?: number;
217
245
  /**
218
- * Total number of items
246
+ * Number of items per page (alternative format - React Native)
219
247
  */
220
- totalItems: number;
248
+ limit?: number;
221
249
  /**
222
- * Number of items per page
250
+ * Whether there are more pages available (React Native)
223
251
  */
224
- perPage: number;
252
+ hasMore?: boolean;
225
253
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pubflow/core",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Core functionality for Pubflow framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",