http-request-manager 18.10.2 → 18.11.8

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/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ <!-- markdownlint-disable MD013 MD060 -->
2
+
1
3
  # HTTP Request Manager - Angular Library
2
4
 
3
5
  [![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=flat&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
@@ -6,18 +8,19 @@
6
8
 
7
9
  A comprehensive Angular library providing enterprise-grade HTTP request management, state management, real-time communication, and local data persistence.
8
10
 
11
+ This README is the main documentation hub for the library. Detailed service guides live in `src/docs/`, and this page links to the observable/ngrx services for older Angular applications and the signal-based services for newer Angular applications in parallel.
12
+
9
13
  ## 🚀 Features
10
14
 
11
15
  ### Core Capabilities
12
16
 
13
- | Feature | Description | Service |
14
- |---------|-------------|---------|
15
- | **🌐 HTTP Request Management** | Observable-based & Signal-based HTTP services with retry logic, polling, and streaming | [`HTTPManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_MANAGER_README.md) |
16
- | **🔄 State Management** | ComponentStore integration with automatic CRUD state updates | [`HTTPManagerStateService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_STATE_MANAGER_README.md) |
17
- | **💬 Real-Time Communication** | WebSocket messaging with channel-based architecture | [`WebSocketManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WS_MANAGER_README.md) |
18
- | **💾 Data Persistence** | LocalStorage/SessionStorage with encryption & IndexedDB caching | [`LocalStorageManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOCAL_STORAGE_README.md) |
19
- | **🗄️ Database Management** | IndexedDB integration via Dexie.js with Observable API | [`DatabaseManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/DATABASE_README.md) |
20
- | **⚡ Utility Functions** | JSON handling, encryption, headers, and validation | [`UtilsService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/UTILS_README.md) |
17
+ | Feature | Description | Angular 14-18 / Observable + NgRx | Angular 19+ / Signals |
18
+ |---------|-------------|----------------------------------|------------------------|
19
+ | **🌐 HTTP Request Management** | Retry, polling, streaming, file downloads | [`HTTPManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_MANAGER_README.md) | [`HTTPManagerSignalsService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_SINGNALS_MANAGER_README.md) |
20
+ | **🔄 State Management** | CRUD state, persistence, derived state | [`HTTPManagerStateService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_STATE_MANAGER_README.md) and [`StoreStateManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/COMPLETE_API_REFERENCE.md#storestatemanagerservice) | [`StoreStateManagerSignalsService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/STORE_STATE_SIGNALS_README.md) |
21
+ | **💬 Real-Time Communication** | WebSocket channels, tracking, messaging | [`WebSocketManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WS_MANAGER_README.md) and [`WebSocketMessageService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WEBSOCKET_MESSAGE_SERVICE.md) | [`WebSocketSignalsManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WEBSOCKET_SIGNALS_README.md) and [`MessageTrackerSignalsService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/MESSAGE_TRACKER_SIGNALS_README.md) |
22
+ | **💾 Data Persistence** | Local/session storage and offline caching | [`LocalStorageManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOCAL_STORAGE_README.md) and [`DatabaseManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/DATABASE_README.md) | [`LocalStorageSignalsManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOCAL_STORAGE_SIGNALS_README.md) |
23
+ | **⚡ Utility Functions** | JSON handling, encryption, headers, validation | [`UtilsService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/UTILS_README.md) | Uses the same utility layer |
21
24
 
22
25
  ### Key Benefits
23
26
 
@@ -42,15 +45,18 @@ A comprehensive Angular library providing enterprise-grade HTTP request manageme
42
45
  | **🏷️ Channel Architecture** | SYS-, PUB-, MES- channel prefixes | [`WebSocket Guide`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/ADVANCED_WEBSOCKET.md#channels) |
43
46
  | **🔌 Singleton WebSocket** | Single connection across ALL instances | [`WebSocket Guide`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/ADVANCED_WEBSOCKET.md#singleton) |
44
47
  | **✨ Unified Message Service** | Type-safe WebSocket messaging with auto prefixes | [`WebSocket Message Service`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WEBSOCKET_MESSAGE_SERVICE.md) |
48
+ | **🚀 Batch Requests** | Execute multiple HTTP requests with sequential/parallel modes | [`Batch Request Guide`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/BATCH_REQUEST_README.md) |
45
49
 
46
50
  ## 📋 Table of Contents
47
51
 
48
52
  - [Quick Start](#-quick-start)
49
53
  - [Configuration](#️-configuration)
50
54
  - [Services Overview](#-services-overview)
55
+ - [Documentation Paths](#-documentation-paths)
51
56
  - [Architecture](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/ARCHITECTURE.md)
52
57
  - [Interceptors](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/INTERCEPTOR_README.md)
53
58
  - [Advanced Features](#-advanced-features)
59
+ - [Batch Requests](#batch-requests)
54
60
  - [Detailed Documentation](#-detailed-documentation)
55
61
  - [Demo Examples](#-demo-examples)
56
62
  - [Migration Guide](#-migration-guide)
@@ -230,16 +236,32 @@ export class AppModule { }
230
236
 
231
237
  ## 📚 Services Overview
232
238
 
239
+ ### Angular 14-18: Observable + NgRx Services
240
+
233
241
  | Service | Description | Use Case |
234
242
  |---------|-------------|----------|
235
243
  | [`HTTPManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_MANAGER_README.md) | Observable-based HTTP client with retry, polling, streaming | Simple API calls with loading states |
236
- | [`HTTPManagerSignalsService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_SINGNALS_MANAGER_README.md) | Signal-based HTTP client for modern reactive UI | Modern Angular with Signals |
237
- | [`HTTPManagerStateService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_STATE_MANAGER_README.md) | ComponentStore + HTTP + WebSocket + IndexedDB | CRUD with auto state sync & real-time |
238
- | [`WebSocketManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WS_MANAGER_README.md) | Singleton WebSocket connection manager | Real-time messaging & notifications |
239
- | [`WebSocketMessageService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WEBSOCKET_MESSAGE_SERVICE.md) | **NEW** Unified type-safe message sending service | Simplified WebSocket messaging with auto prefixes |
240
- | [`LocalStorageManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOCAL_STORAGE_README.md) | Secure local/session storage with encryption | User preferences, session data |
244
+ | [`HTTPManagerStateService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_STATE_MANAGER_README.md) | ComponentStore + HTTP + WebSocket + IndexedDB | CRUD with auto state sync and real-time updates |
245
+ | [`WebSocketManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WS_MANAGER_README.md) | Singleton WebSocket connection manager | Real-time messaging and notifications |
246
+ | [`WebSocketMessageService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WEBSOCKET_MESSAGE_SERVICE.md) | Unified type-safe message sending service | Simplified WebSocket messaging with auto prefixes |
247
+ | [`LocalStorageManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOCAL_STORAGE_README.md) | Secure local/session storage with encryption | User preferences and session data |
241
248
  | [`DatabaseManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/DATABASE_README.md) | IndexedDB wrapper via Dexie.js | Offline-first data access |
242
249
  | [`StoreStateManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/COMPLETE_API_REFERENCE.md#storestatemanagerservice) | Persistent ComponentStore with localStorage sync | Application state persistence |
250
+
251
+ ### Angular 19+: Signal-Based Services
252
+
253
+ | Service | Description | Use Case |
254
+ |---------|-------------|----------|
255
+ | [`HTTPManagerSignalsService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_SINGNALS_MANAGER_README.md) | Signal-based HTTP client for modern reactive UI | Modern Angular with Signals |
256
+ | [`LocalStorageSignalsManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOCAL_STORAGE_SIGNALS_README.md) | Signal-based local/session storage | Reactive persisted UI state |
257
+ | [`StoreStateManagerSignalsService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/STORE_STATE_SIGNALS_README.md) | Signal-based persistent state service | App state persistence with computed derivations |
258
+ | [`WebSocketSignalsManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WEBSOCKET_SIGNALS_README.md) | Signal-based WebSocket manager | Signal-driven real-time dashboards and messaging |
259
+ | [`MessageTrackerSignalsService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/MESSAGE_TRACKER_SIGNALS_README.md) | Signal-based channel/message tracking | Presence, counters, last-message views |
260
+
261
+ ### Shared Utilities
262
+
263
+ | Service | Description | Use Case |
264
+ |---------|-------------|----------|
243
265
  | [`UtilsService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/UTILS_README.md) | Utilities: encryption, headers, merging, path/query | Helper functions |
244
266
 
245
267
  ### Common Use Cases
@@ -260,6 +282,29 @@ export class AppModule { }
260
282
  | File transfers | `HTTPManagerService` | Download progress tracking |
261
283
  | Live data streams | `HTTPManagerService` | NDJSON, SSE streaming |
262
284
 
285
+ ## 📖 Documentation Paths
286
+
287
+ All detailed service guides live in `src/docs/`. Use this README as the entry point, then choose the track that matches the Angular version in your app.
288
+
289
+ ### Angular 14-18: Observable + NgRx Track
290
+
291
+ | Category | Documentation |
292
+ |----------|---------------|
293
+ | HTTP | [HTTP Manager](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_MANAGER_README.md) |
294
+ | State | [HTTP State Manager](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_STATE_MANAGER_README.md) and [Store State API Reference](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/COMPLETE_API_REFERENCE.md#storestatemanagerservice) |
295
+ | Real-Time | [WebSocket Manager](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WS_MANAGER_README.md) and [WebSocket Message Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WEBSOCKET_MESSAGE_SERVICE.md) |
296
+ | Persistence | [Local Storage](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOCAL_STORAGE_README.md) and [Database](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/DATABASE_README.md) |
297
+
298
+ ### Angular 19+: Signal Track
299
+
300
+ | Category | Documentation |
301
+ |----------|---------------|
302
+ | Overview | [Signal Services Overview](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/SIGNAL_SERVICES_README.md) |
303
+ | HTTP | [HTTP Manager Signals](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_SINGNALS_MANAGER_README.md) |
304
+ | State | [Store State Signals](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/STORE_STATE_SIGNALS_README.md) |
305
+ | Real-Time | [WebSocket Signals](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WEBSOCKET_SIGNALS_README.md) and [Message Tracker Signals](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/MESSAGE_TRACKER_SIGNALS_README.md) |
306
+ | Persistence | [Local Storage Signals](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOCAL_STORAGE_SIGNALS_README.md) |
307
+
263
308
  ## 🏗️ Architecture
264
309
 
265
310
  For detailed system architecture, data flows, and design patterns, see:
@@ -268,7 +313,7 @@ For detailed system architecture, data flows, and design patterns, see:
268
313
 
269
314
  ### System Overview
270
315
 
271
- ```
316
+ ```text
272
317
  ┌─────────────────────────────────────────────────────────────────┐
273
318
  │ Angular Application │
274
319
  ├─────────────────────────────────────────────────────────────────┤
@@ -358,17 +403,35 @@ const customSettings: ErrorSettings = {
358
403
 
359
404
  For in-depth documentation on each service and component, refer to the following detailed guides:
360
405
 
361
- ### Services
406
+ ### Detailed Docs for Angular 14-18
362
407
 
363
408
  | Documentation | Description |
364
409
  |---------------|-------------|
365
410
  | 📖 [HTTP Manager Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_MANAGER_README.md) | Observable-based HTTP client with retry, polling, streaming, and error handling |
366
- | 📖 [HTTP Manager Signals Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_SINGNALS_MANAGER_README.md) | Signal-based HTTP client for modern reactive UI with Angular Signals |
367
411
  | 📖 [HTTP Manager State Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_STATE_MANAGER_README.md) | ComponentStore integration with automatic CRUD state updates and WebSocket sync |
368
412
  | 📖 [WebSocket Manager Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WS_MANAGER_README.md) | WebSocket connection management with channel-based messaging and notifications |
369
413
  | 📖 [Local Storage Manager Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOCAL_STORAGE_README.md) | Secure local/session storage with encryption and expiration |
370
414
  | 📖 [Database Manager Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/DATABASE_README.md) | IndexedDB wrapper via Dexie.js with Observable API for offline-first apps |
371
415
  | 📖 [Store State Manager Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/COMPLETE_API_REFERENCE.md#storestatemanagerservice) | Persistent ComponentStore synchronized with local/session storage |
416
+ | 📖 [WebSocket Message Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WEBSOCKET_MESSAGE_SERVICE.md) | Type-safe WebSocket message sending with channel prefix helpers |
417
+ | 🚀 [Batch Request Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/BATCH_REQUEST_README.md) | Execute multiple HTTP requests with sequential/parallel modes and configurable error handling |
418
+
419
+ ### Detailed Docs for Angular 19+
420
+
421
+ | Documentation | Description |
422
+ |---------------|-------------|
423
+ | 📖 [Signal Services Overview](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/SIGNAL_SERVICES_README.md) | Overview of the signal-based service set and migration guidance |
424
+ | 📖 [HTTP Manager Signals Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_SINGNALS_MANAGER_README.md) | Signal-based HTTP client for modern reactive UI with Angular Signals |
425
+ | 📖 [Local Storage Signals Manager Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOCAL_STORAGE_SIGNALS_README.md) | Signal-based persisted storage patterns |
426
+ | 📖 [Store State Signals Manager Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/STORE_STATE_SIGNALS_README.md) | Signal-based state persistence and computed state |
427
+ | 📖 [WebSocket Signals Manager Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WEBSOCKET_SIGNALS_README.md) | Signal-driven WebSocket connection and subscription management |
428
+ | 📖 [Message Tracker Signals Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/MESSAGE_TRACKER_SIGNALS_README.md) | Signal-based message counting, presence, and channel metadata |
429
+ | 🚀 [Batch Request Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/BATCH_REQUEST_README.md) | Execute multiple HTTP requests with sequential/parallel modes and configurable error handling |
430
+
431
+ ### Shared Services
432
+
433
+ | Documentation | Description |
434
+ |---------------|-------------|
372
435
  | 📖 [Utils Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/UTILS_README.md) | Utility functions for JSON handling, encryption, headers, and validation |
373
436
 
374
437
  ### Core Components
@@ -406,6 +469,7 @@ Located in [`src/lib/http-request-services-demo/`](https://github.com/michelebon
406
469
  ### Demo Features
407
470
 
408
471
  **HTTP Service Demos:**
472
+
409
473
  - ✅ Basic CRUD operations
410
474
  - ✅ File download with progress tracking
411
475
  - ✅ Streaming responses (NDJSON, SSE)
@@ -414,6 +478,7 @@ Located in [`src/lib/http-request-services-demo/`](https://github.com/michelebon
414
478
  - ✅ Error handling with toast notifications
415
479
 
416
480
  **State Management Demos:**
481
+
417
482
  - ✅ ComponentStore integration
418
483
  - ✅ Automatic state updates
419
484
  - ✅ Pagination controls
@@ -422,6 +487,7 @@ Located in [`src/lib/http-request-services-demo/`](https://github.com/michelebon
422
487
  - ✅ Database clear/refresh
423
488
 
424
489
  **WebSocket Demos:**
490
+
425
491
  - ✅ Channel-based messaging (PUB- channels)
426
492
  - ✅ Private state sync (SYS- channels)
427
493
  - ✅ Persistent notifications (MES- channels)
@@ -431,6 +497,7 @@ Located in [`src/lib/http-request-services-demo/`](https://github.com/michelebon
431
497
  - ✅ Multi-room support
432
498
 
433
499
  **Storage Demos:**
500
+
434
501
  - ✅ Encrypted localStorage
435
502
  - ✅ SessionStorage usage
436
503
  - ✅ Expiration management
@@ -452,6 +519,7 @@ Located in [`src/lib/http-request-services-demo/`](https://github.com/michelebon
452
519
  ### Sample Models
453
520
 
454
521
  Demo includes production-ready sample models:
522
+
455
523
  - `User` - User data structures
456
524
  - `ClientInfo` - Client details
457
525
  - `SessionData` - Session management
@@ -463,6 +531,7 @@ Demo includes production-ready sample models:
463
531
  ### From HttpClient to HTTPManagerService
464
532
 
465
533
  **Before:**
534
+
466
535
  ```typescript
467
536
  http.get('api/users').subscribe(users => {
468
537
  this.users = users;
@@ -471,6 +540,7 @@ http.get('api/users').subscribe(users => {
471
540
  ```
472
541
 
473
542
  **After:**
543
+
474
544
  ```typescript
475
545
  httpManager.getRequest(
476
546
  ApiRequest.adapt({ path: ['users'] })
@@ -483,6 +553,7 @@ isLoading$ = this.httpManager.isPending$;
483
553
  ### From Manual State to HTTPManagerStateService
484
554
 
485
555
  **Before:**
556
+
486
557
  ```typescript
487
558
  users: User[] = [];
488
559
  loading = false;
@@ -503,6 +574,7 @@ addUser(user: User) {
503
574
  ```
504
575
 
505
576
  **After:**
577
+
506
578
  ```typescript
507
579
  @Injectable()
508
580
  export class UsersStore extends HTTPManagerStateService<User> {