http-request-manager 18.7.31 β 18.9.0
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
|
@@ -12,12 +12,12 @@ A comprehensive Angular library providing enterprise-grade HTTP request manageme
|
|
|
12
12
|
|
|
13
13
|
| Feature | Description | Service |
|
|
14
14
|
|---------|-------------|---------|
|
|
15
|
-
| **π HTTP Request Management** | Observable-based & Signal-based HTTP services with retry logic, polling, and streaming | [`HTTPManagerService`](HTTP_MANAGER_README.md) |
|
|
16
|
-
| **π State Management** | ComponentStore integration with automatic CRUD state updates | [`HTTPManagerStateService`](HTTP_STATE_MANAGER_README.md) |
|
|
17
|
-
| **π¬ Real-Time Communication** | WebSocket messaging with channel-based architecture | [`WebSocketService`](WS_MANAGER_README.md) |
|
|
18
|
-
| **πΎ Data Persistence** | LocalStorage/SessionStorage with encryption & IndexedDB caching | [`LocalStorageManagerService`](LOCAL_STORAGE_README.md) |
|
|
19
|
-
| **ποΈ Database Management** | IndexedDB integration via Dexie.js with Observable API | [`DatabaseManagerService`](DATABASE_README.md) |
|
|
20
|
-
| **β‘ Utility Functions** | JSON handling, encryption, headers, and validation | [`UtilsService`](UTILS_README.md) |
|
|
15
|
+
| **π HTTP Request Management** | Observable-based & Signal-based HTTP services with retry logic, polling, and streaming | [`HTTPManagerService`](./src/docs/HTTP_MANAGER_README.md) |
|
|
16
|
+
| **π State Management** | ComponentStore integration with automatic CRUD state updates | [`HTTPManagerStateService`](./src/docs/HTTP_STATE_MANAGER_README.md) |
|
|
17
|
+
| **π¬ Real-Time Communication** | WebSocket messaging with channel-based architecture | [`WebSocketService`](./src/docs/WS_MANAGER_README.md) |
|
|
18
|
+
| **πΎ Data Persistence** | LocalStorage/SessionStorage with encryption & IndexedDB caching | [`LocalStorageManagerService`](./src/docs/LOCAL_STORAGE_README.md) |
|
|
19
|
+
| **ποΈ Database Management** | IndexedDB integration via Dexie.js with Observable API | [`DatabaseManagerService`](./src/docs/DATABASE_README.md) |
|
|
20
|
+
| **β‘ Utility Functions** | JSON handling, encryption, headers, and validation | [`UtilsService`](./src/docs/UTILS_README.md) |
|
|
21
21
|
|
|
22
22
|
### Key Benefits
|
|
23
23
|
|
|
@@ -89,6 +89,9 @@ import { HTTPManagerService, ApiRequest } from 'http-request-manager';
|
|
|
89
89
|
selector: 'app-users',
|
|
90
90
|
template: `
|
|
91
91
|
<div *ngIf="isLoading$ | async">Loading...</div>
|
|
92
|
+
<div *ngIf="error$ | async as error" class="error">
|
|
93
|
+
Error: {{ error.message }}
|
|
94
|
+
</div>
|
|
92
95
|
<div *ngFor="let user of data$ | async">
|
|
93
96
|
{{ user.name }}
|
|
94
97
|
</div>
|
|
@@ -99,6 +102,7 @@ export class UsersComponent {
|
|
|
99
102
|
|
|
100
103
|
data$ = this.httpManager.data$;
|
|
101
104
|
isLoading$ = this.httpManager.isPending$;
|
|
105
|
+
error$ = this.httpManager.error$;
|
|
102
106
|
|
|
103
107
|
ngOnInit() {
|
|
104
108
|
this.httpManager.getRequest(
|
|
@@ -212,14 +216,14 @@ export class AppModule { }
|
|
|
212
216
|
|
|
213
217
|
| Service | Description | Use Case |
|
|
214
218
|
|---------|-------------|----------|
|
|
215
|
-
| [`HTTPManagerService`](HTTP_MANAGER_README.md) | Observable-based HTTP client | Simple API calls with loading states |
|
|
216
|
-
| [`HTTPManagerSignalsService`](HTTP_SINGNALS_MANAGER_README.md) | Signal-based HTTP client | Modern reactive UI with Angular Signals |
|
|
217
|
-
| [`HTTPManagerStateService`](HTTP_STATE_MANAGER_README.md) | ComponentStore with HTTP & WebSocket | CRUD operations with auto state sync |
|
|
218
|
-
| [`WebSocketService`](WS_MANAGER_README.md) | WebSocket connection management | Real-time messaging and notifications |
|
|
219
|
-
| [`LocalStorageManagerService`](LOCAL_STORAGE_README.md) | Secure local storage | User preferences, session data |
|
|
220
|
-
| [`DatabaseManagerService`](DATABASE_README.md) | IndexedDB wrapper | Offline-first data access |
|
|
221
|
-
| [`StoreStateManagerService`](STORE_STATE_MANAGER_README.md) | Persistent ComponentStore | Application state persistence |
|
|
222
|
-
| [`UtilsService`](UTILS_README.md) | Utility functions | JSON handling, encryption, headers, and conversions |
|
|
219
|
+
| [`HTTPManagerService`](./src/docs/HTTP_MANAGER_README.md) | Observable-based HTTP client | Simple API calls with loading states |
|
|
220
|
+
| [`HTTPManagerSignalsService`](./src/docs/HTTP_SINGNALS_MANAGER_README.md) | Signal-based HTTP client | Modern reactive UI with Angular Signals |
|
|
221
|
+
| [`HTTPManagerStateService`](./src/docs/HTTP_STATE_MANAGER_README.md) | ComponentStore with HTTP & WebSocket | CRUD operations with auto state sync |
|
|
222
|
+
| [`WebSocketService`](./src/docs/WS_MANAGER_README.md) | WebSocket connection management | Real-time messaging and notifications |
|
|
223
|
+
| [`LocalStorageManagerService`](./src/docs/LOCAL_STORAGE_README.md) | Secure local storage | User preferences, session data |
|
|
224
|
+
| [`DatabaseManagerService`](./src/docs/DATABASE_README.md) | IndexedDB wrapper | Offline-first data access |
|
|
225
|
+
| [`StoreStateManagerService`](./src/docs/STORE_STATE_MANAGER_README.md) | Persistent ComponentStore | Application state persistence |
|
|
226
|
+
| [`UtilsService`](./src/docs/UTILS_README.md) | Utility functions | JSON handling, encryption, headers, and conversions |
|
|
223
227
|
|
|
224
228
|
### Common Use Cases
|
|
225
229
|
|
|
@@ -244,44 +248,44 @@ For detailed system architecture, data flows, and design patterns, see:
|
|
|
244
248
|
|
|
245
249
|
```
|
|
246
250
|
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
247
|
-
β Angular Application
|
|
251
|
+
β Angular Application β
|
|
248
252
|
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
|
249
|
-
β ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββββ
|
|
250
|
-
β β Components β β Components β β Components β
|
|
251
|
-
β β (Signals) β β (Observables) β β (State Store) β
|
|
252
|
-
β βββββββββ¬βββββββββ βββββββββ¬βββββββββ ββββββββββ¬ββββββββββ
|
|
253
|
-
β β β β
|
|
254
|
-
β βΌ βΌ βΌ
|
|
255
|
-
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββ
|
|
256
|
-
β βHTTPManager β βHTTPManager β βHTTPManager β
|
|
257
|
-
β βSignalsServiceβ βService β βStateService β
|
|
258
|
-
β ββββββββ¬ββββββββ ββββββββ¬ββββββββ ββββββββββ¬ββββββββββ
|
|
259
|
-
β β β β
|
|
260
|
-
β βββββββββββββββββββββ΄βββββββββββββββββββββββ
|
|
261
|
-
β β
|
|
262
|
-
β βΌ
|
|
253
|
+
β ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββββ β
|
|
254
|
+
β β Components β β Components β β Components β β
|
|
255
|
+
β β (Signals) β β (Observables) β β (State Store) β β
|
|
256
|
+
β βββββββββ¬βββββββββ βββββββββ¬βββββββββ ββββββββββ¬ββββββββββ β
|
|
257
|
+
β β β β β
|
|
258
|
+
β βΌ βΌ βΌ β
|
|
259
|
+
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββ β
|
|
260
|
+
β βHTTPManager β βHTTPManager β βHTTPManager β β
|
|
261
|
+
β βSignalsServiceβ βService β βStateService β β
|
|
262
|
+
β ββββββββ¬ββββββββ ββββββββ¬ββββββββ ββββββββββ¬ββββββββββ β
|
|
263
|
+
β β β β β
|
|
264
|
+
β βββββββββββββββββββββ΄βββββββββββββββββββββββ β
|
|
265
|
+
β β β
|
|
266
|
+
β βΌ β
|
|
263
267
|
β βββββββββββββββββββ β
|
|
264
268
|
β β HttpClient β β
|
|
265
269
|
β β (Angular) β β
|
|
266
270
|
β ββββββββββ¬βββββββββ β
|
|
267
|
-
β β
|
|
268
|
-
|
|
269
|
-
β β
|
|
271
|
+
β β β
|
|
272
|
+
βββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ€
|
|
273
|
+
β β β
|
|
270
274
|
β ββββββββββββββββββββββββββββΌβββββββββββββββββββββββ β
|
|
271
275
|
β β Storage Layer β β
|
|
272
276
|
β ββββββββββββββββββββββββββββΌβββββββββββββββββββββββ€ β
|
|
273
|
-
β β ββββββββββββββββββ β
|
|
274
|
-
β β βLocalStorage β β βIndexedDB
|
|
275
|
-
β β βManager Service β β β(Dexie.js)
|
|
276
|
-
β β ββββββββββββββββββ β
|
|
277
|
+
β β ββββββββββββββββββ β βββββββββββββββ β β
|
|
278
|
+
β β βLocalStorage β β βIndexedDB β β β
|
|
279
|
+
β β βManager Service β β β(Dexie.js) β β β
|
|
280
|
+
β β ββββββββββββββββββ β βββββββββββββββ β β
|
|
277
281
|
β ββββββββββββββββββββββββββββΌβββββββββββββββββββββββ β
|
|
278
|
-
β β
|
|
282
|
+
β β β
|
|
279
283
|
β ββββββββββββββββββββββββββββΌβββββββββββββββββββββββ β
|
|
280
284
|
β β WebSocket Layer β β
|
|
281
285
|
β ββββββββββββββββββββββββββββΌβββββββββββββββββββββββ€ β
|
|
282
|
-
β β βββββββββββββββββββββββββββββββββββββββ
|
|
283
|
-
β β β WebsocketService β
|
|
284
|
-
β β βββββββββββββββββββββββββββββββββββββββ
|
|
286
|
+
β β βββββββββββββββββββββββββββββββββββββββ β β
|
|
287
|
+
β β β WebsocketService β β β
|
|
288
|
+
β β βββββββββββββββββββββββββββββββββββββββ β β
|
|
285
289
|
β βββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
286
290
|
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
287
291
|
```
|
|
@@ -290,7 +294,7 @@ For detailed system architecture, data flows, and design patterns, see:
|
|
|
290
294
|
|
|
291
295
|
The library provides several HTTP interceptors that are automatically configured:
|
|
292
296
|
|
|
293
|
-
π **[Interceptors Documentation](INTERCEPTOR_README.md)**
|
|
297
|
+
π **[Interceptors Documentation](./src/docs/INTERCEPTOR_README.md)**
|
|
294
298
|
|
|
295
299
|
### Available Interceptors
|
|
296
300
|
|