http-request-manager 18.12.1 → 18.13.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
@@ -17,10 +17,10 @@ This README is the main documentation hub for the library. Detailed service guid
17
17
  | Feature | Description | Angular 14-18 / Observable + NgRx | Angular 19+ / Signals |
18
18
  |---------|-------------|----------------------------------|------------------------|
19
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) |
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/STORE_STATE_MANAGER_README.md) | [`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), [`WebSocketMessageService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WEBSOCKET_MESSAGE_SERVICE.md), and [`MessageTrackerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/MESSAGE_TRACKER_README.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
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 |
23
+ | **⚡ Utility Functions** | JSON handling, encryption, headers, validation, logging | [`UtilsService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/UTILS_README.md), [`Encryption`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/ENCRYPTION_README.md), [`Logger`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOGGER_README.md) | Uses the same utility layer |
24
24
 
25
25
  ### Key Benefits
26
26
 
@@ -35,18 +35,20 @@ This README is the main documentation hub for the library. Detailed service guid
35
35
 
36
36
  | Feature | Description | Learn More |
37
37
  |---------|-------------|------------|
38
- | **🔐 Enterprise Encryption** | AES symmetric + RSA asymmetric encryption | [`Encryption Utils`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/UTILS_README.md#encryption) |
38
+ | **🔐 Enterprise Encryption** | AES symmetric + RSA asymmetric encryption | [`Encryption Utils`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/ENCRYPTION_README.md) |
39
39
  | **📡 Streaming Support** | NDJSON & Server-Sent Events (SSE) | [`HTTP Manager`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_MANAGER_README.md#streaming) |
40
40
  | **📄 File Downloads** | Progress tracking for large files | [`HTTP Manager`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_MANAGER_README.md#file-downloads) |
41
41
  | **📤 File Uploads** | Multi-file upload with progress, validation, and form-data config | [`Upload Request`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/UPLOAD_REQUEST_README.md) |
42
42
  | **📊 Pagination** | Built-in pagination with page tracking | [`HTTP State Manager`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_STATE_MANAGER_README.md#pagination) |
43
43
  | **🔔 Smart Notifications** | Persistent notifications with DB storage | [`WebSocket Guide`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/ADVANCED_WEBSOCKET.md#notifications) |
44
44
  | **👥 Presence Tracking** | Real-time user presence by channel | [`WebSocket Guide`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/ADVANCED_WEBSOCKET.md#presence) |
45
- | **🔄 Message Replay** | Automatic message history on reconnect | [`WebSocket Guide`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/ADVANCED_WEBSOCKET.md#message-replay) |
45
+ | **🔄 Message Replay** | Automatic message history on reconnect | [`WebSocket Guide`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/ADVANCED_WEBSOCKET.md#message-replay) and [`Message Tracker`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/MESSAGE_TRACKER_README.md) |
46
46
  | **🏷️ 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) |
47
47
  | **🔌 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) |
48
48
  | **✨ 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) |
49
49
  | **🚀 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) |
50
+ | **📝 Message Tracking** | Guaranteed delivery with gap detection | [`Message Tracker`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/MESSAGE_TRACKER_README.md) |
51
+ | **🔍 Debug Logging** | Context-aware logging with dev/prod modes | [`Logger Service`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOGGER_README.md) |
50
52
 
51
53
  ## 📋 Table of Contents
52
54
 
@@ -246,11 +248,12 @@ export class AppModule { }
246
248
  |---------|-------------|----------|
247
249
  | [`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 |
248
250
  | [`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 |
251
+ | [`StoreStateManagerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/STORE_STATE_MANAGER_README.md) | Persistent ComponentStore with localStorage sync | Application state persistence |
249
252
  | [`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 |
250
253
  | [`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 |
254
+ | [`MessageTrackerService`](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/MESSAGE_TRACKER_README.md) | Guaranteed message delivery with gap detection | Message tracking and reconnection sync |
251
255
  | [`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 |
252
256
  | [`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 |
253
- | [`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 |
254
257
 
255
258
  ### Angular 19+: Signal-Based Services
256
259
 
@@ -295,9 +298,11 @@ All detailed service guides live in `src/docs/`. Use this README as the entry po
295
298
  | Category | Documentation |
296
299
  |----------|---------------|
297
300
  | HTTP | [HTTP Manager](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/HTTP_MANAGER_README.md) |
298
- | 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) |
299
- | 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) |
301
+ | 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 Manager](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/STORE_STATE_MANAGER_README.md) |
302
+ | Real-Time | [WebSocket Manager](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WS_MANAGER_README.md), [WebSocket Message Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/WEBSOCKET_MESSAGE_SERVICE.md), and [Message Tracker](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/MESSAGE_TRACKER_README.md) |
300
303
  | 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) |
304
+ | Utilities | [Utils](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/UTILS_README.md), [Encryption](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/ENCRYPTION_README.md), [Logger](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOGGER_README.md) |
305
+ | Reference | [Models](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/MODELS_README.md), [Complete API Reference](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/COMPLETE_API_REFERENCE.md) |
301
306
 
302
307
  ### Angular 19+: Signal Track
303
308
 
@@ -413,12 +418,17 @@ For in-depth documentation on each service and component, refer to the following
413
418
  |---------------|-------------|
414
419
  | 📖 [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 |
415
420
  | 📖 [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 |
421
+ | 📖 [Store State Manager Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/STORE_STATE_MANAGER_README.md) | Persistent ComponentStore synchronized with local/session storage |
416
422
  | 📖 [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 |
423
+ | 📖 [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 |
424
+ | 📖 [Message Tracker Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/MESSAGE_TRACKER_README.md) | Guaranteed message delivery with gap detection and reconnection sync |
417
425
  | 📖 [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 |
418
426
  | 📖 [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 |
419
- | 📖 [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 |
420
- | 📖 [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 |
421
427
  | 🚀 [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 |
428
+ | 📤 [Upload Request Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/UPLOAD_REQUEST_README.md) | Multi-file upload with progress tracking, validation, and form-data configuration |
429
+ | 🔐 [Encryption Utils](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/ENCRYPTION_README.md) | AES symmetric and RSA asymmetric encryption utilities |
430
+ | 📝 [Logger Service](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/LOGGER_README.md) | Context-aware logging with automatic dev/prod mode detection |
431
+ | 📚 [Models Reference](https://github.com/micheleboni/npm-angular/tree/main/projects/http-request-manager/src/docs/MODELS_README.md) | Complete reference for all data models and configuration interfaces |
422
432
 
423
433
  ### Detailed Docs for Angular 19+
424
434
 
@@ -4916,6 +4916,16 @@ class WSOptions {
4916
4916
  }
4917
4917
  }
4918
4918
 
4919
+ class OperationResultModel {
4920
+ constructor(success = false, operation = 'UPDATE') {
4921
+ this.success = success;
4922
+ this.operation = operation;
4923
+ }
4924
+ static adapt(item) {
4925
+ return new OperationResultModel(item?.success ?? false, item?.operation || 'UPDATE');
4926
+ }
4927
+ }
4928
+
4919
4929
  class ObjectMergerService {
4920
4930
  constructor(configOptions) {
4921
4931
  this.configOptions = configOptions;
@@ -6084,6 +6094,8 @@ class HTTPManagerStateService extends ComponentStore {
6084
6094
  this.logger = inject(LoggerService);
6085
6095
  this.error$ = this.httpManagerService.error$;
6086
6096
  this.isPending$ = this.httpManagerService.isPending$.pipe(delay(1));
6097
+ this.operationSuccess = new BehaviorSubject(null);
6098
+ this.operationSuccess$ = this.operationSuccess.asObservable();
6087
6099
  // PAGINATION
6088
6100
  this.page = new BehaviorSubject(0);
6089
6101
  this.page$ = this.page.asObservable();
@@ -6592,6 +6604,7 @@ class HTTPManagerStateService extends ComponentStore {
6592
6604
  .pipe(tap((data) => {
6593
6605
  data = (!data) ? (this.dataType === DataType.ARRAY) ? [] : {} : data;
6594
6606
  this.addData$(data);
6607
+ this.operationSuccess.next(OperationResultModel.adapt({ success: true, operation: 'CREATE' }));
6595
6608
  // Always call wsCommunication - it will queue if not connected
6596
6609
  this.wsCommunication('CREATE', [...options?.path || [], data.id]);
6597
6610
  }), concatMap((data) => {
@@ -6609,6 +6622,7 @@ class HTTPManagerStateService extends ComponentStore {
6609
6622
  .pipe(tap((data) => {
6610
6623
  data = (!data) ? (this.dataType === DataType.ARRAY) ? [] : {} : data;
6611
6624
  this.updateData$(data);
6625
+ this.operationSuccess.next(OperationResultModel.adapt({ success: true, operation: 'UPDATE' }));
6612
6626
  // Always call wsCommunication - it will queue if not connected
6613
6627
  this.wsCommunication('UPDATE', [...options?.path || []]);
6614
6628
  }), concatMap((data) => {
@@ -6626,6 +6640,7 @@ class HTTPManagerStateService extends ComponentStore {
6626
6640
  .pipe(tap((data) => {
6627
6641
  data = (!data) ? (this.dataType === DataType.ARRAY) ? [] : {} : data;
6628
6642
  this.deleteData$(data);
6643
+ this.operationSuccess.next(OperationResultModel.adapt({ success: true, operation: 'DELETE' }));
6629
6644
  // Always call wsCommunication - it will queue if not connected
6630
6645
  this.wsCommunication('DELETE', [...options?.path || []]);
6631
6646
  }), concatMap((data) => {
@@ -7269,6 +7284,20 @@ class StateStorageOptions {
7269
7284
  }
7270
7285
  }
7271
7286
 
7287
+ class StateOperationResult {
7288
+ constructor(success = false, operation = 'UPDATE', key, value, timestamp = Date.now(), error) {
7289
+ this.success = success;
7290
+ this.operation = operation;
7291
+ this.key = key;
7292
+ this.value = value;
7293
+ this.timestamp = timestamp;
7294
+ this.error = error;
7295
+ }
7296
+ static adapt(item) {
7297
+ return new StateOperationResult(item?.success ?? false, item?.operation || 'UPDATE', item?.key, item?.value, item?.timestamp || Date.now(), item?.error);
7298
+ }
7299
+ }
7300
+
7272
7301
  class StoreStateManagerService extends ComponentStore {
7273
7302
  constructor(options = StateStorageOptions.adapt()) {
7274
7303
  super(StoreStateManagerService.init(options));
@@ -7277,6 +7306,8 @@ class StoreStateManagerService extends ComponentStore {
7277
7306
  this.subscriptions = new Subscription;
7278
7307
  this.settings = null;
7279
7308
  this.isRestoring = false;
7309
+ this.operationResult = new BehaviorSubject(null);
7310
+ this.operationResult$ = this.operationResult.asObservable();
7280
7311
  // Selectors
7281
7312
  this.data$ = this.select((state) => {
7282
7313
  const model = this.options.model;
@@ -7323,6 +7354,67 @@ class StoreStateManagerService extends ComponentStore {
7323
7354
  data: state
7324
7355
  });
7325
7356
  }
7357
+ createRecord(key, value) {
7358
+ try {
7359
+ this.updateData({ [key]: value });
7360
+ this.operationResult.next(StateOperationResult.adapt({
7361
+ success: true,
7362
+ operation: 'CREATE',
7363
+ key,
7364
+ value,
7365
+ }));
7366
+ }
7367
+ catch (error) {
7368
+ this.operationResult.next(StateOperationResult.adapt({
7369
+ success: false,
7370
+ operation: 'CREATE',
7371
+ key,
7372
+ error: error?.message || 'Create failed',
7373
+ }));
7374
+ }
7375
+ }
7376
+ updateRecord(key, value) {
7377
+ try {
7378
+ this.updateData({ [key]: value });
7379
+ this.operationResult.next(StateOperationResult.adapt({
7380
+ success: true,
7381
+ operation: 'UPDATE',
7382
+ key,
7383
+ value,
7384
+ }));
7385
+ }
7386
+ catch (error) {
7387
+ this.operationResult.next(StateOperationResult.adapt({
7388
+ success: false,
7389
+ operation: 'UPDATE',
7390
+ key,
7391
+ error: error?.message || 'Update failed',
7392
+ }));
7393
+ }
7394
+ }
7395
+ deleteRecord(key) {
7396
+ try {
7397
+ const currentState = this.get();
7398
+ if (currentState && key in currentState) {
7399
+ const { [key]: removed, ...rest } = currentState;
7400
+ this.setState(rest);
7401
+ this.updateState(rest);
7402
+ }
7403
+ this.operationResult.next(StateOperationResult.adapt({
7404
+ success: true,
7405
+ operation: 'DELETE',
7406
+ key,
7407
+ }));
7408
+ }
7409
+ catch (error) {
7410
+ this.operationResult.next(StateOperationResult.adapt({
7411
+ success: false,
7412
+ operation: 'DELETE',
7413
+ key,
7414
+ error: error?.message || 'Delete failed',
7415
+ }));
7416
+ }
7417
+ }
7326
7418
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StoreStateManagerService, deps: [{ token: StateStorageOptions }], target: i0.ɵɵFactoryTarget.Injectable }); }
7327
7419
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StoreStateManagerService, providedIn: 'root' }); }
7328
7420
  }
@@ -7339,6 +7431,8 @@ class StoreStateManagerSignalsService {
7339
7431
  this.state = signal(null);
7340
7432
  this.isRestoring = false;
7341
7433
  this.settings = null;
7434
+ this.operationResultSignal = signal(null);
7435
+ this.operationResult = this.operationResultSignal.asReadonly();
7342
7436
  // Public readonly signals for consumers
7343
7437
  this.data = this.state.asReadonly();
7344
7438
  // Computed signal for transformed data
@@ -7402,6 +7496,67 @@ class StoreStateManagerSignalsService {
7402
7496
  this.state.set(newState);
7403
7497
  this.updateState(newState);
7404
7498
  }
7499
+ createRecord(key, value) {
7500
+ try {
7501
+ this.updateData({ [key]: value });
7502
+ this.operationResultSignal.set(StateOperationResult.adapt({
7503
+ success: true,
7504
+ operation: 'CREATE',
7505
+ key,
7506
+ value,
7507
+ }));
7508
+ }
7509
+ catch (error) {
7510
+ this.operationResultSignal.set(StateOperationResult.adapt({
7511
+ success: false,
7512
+ operation: 'CREATE',
7513
+ key,
7514
+ error: error?.message || 'Create failed',
7515
+ }));
7516
+ }
7517
+ }
7518
+ updateRecord(key, value) {
7519
+ try {
7520
+ this.updateData({ [key]: value });
7521
+ this.operationResultSignal.set(StateOperationResult.adapt({
7522
+ success: true,
7523
+ operation: 'UPDATE',
7524
+ key,
7525
+ value,
7526
+ }));
7527
+ }
7528
+ catch (error) {
7529
+ this.operationResultSignal.set(StateOperationResult.adapt({
7530
+ success: false,
7531
+ operation: 'UPDATE',
7532
+ key,
7533
+ error: error?.message || 'Update failed',
7534
+ }));
7535
+ }
7536
+ }
7537
+ deleteRecord(key) {
7538
+ try {
7539
+ const currentState = this.state();
7540
+ if (currentState && key in currentState) {
7541
+ const { [key]: removed, ...rest } = currentState;
7542
+ this.state.set(rest);
7543
+ this.updateState(rest);
7544
+ }
7545
+ this.operationResultSignal.set(StateOperationResult.adapt({
7546
+ success: true,
7547
+ operation: 'DELETE',
7548
+ key,
7549
+ }));
7550
+ }
7551
+ catch (error) {
7552
+ this.operationResultSignal.set(StateOperationResult.adapt({
7553
+ success: false,
7554
+ operation: 'DELETE',
7555
+ key,
7556
+ error: error?.message || 'Delete failed',
7557
+ }));
7558
+ }
7559
+ }
7405
7560
  resetState() {
7406
7561
  if (!this.settings)
7407
7562
  return;
@@ -11608,5 +11763,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
11608
11763
  * Generated bundle index. Do not edit.
11609
11764
  */
11610
11765
 
11611
- export { ApiRequest, AppService, AsymmetricalEncryptionService, BatchOptions, BatchResult, CONFIG_SETTINGS_TOKEN, ChannelType, ConfigHTTPOptions, ConfigOptions, DataType, DatabaseDataDemoComponent, DatabaseManagerService, DatabaseStorage, DbService, ErrorDisplaySettings, GlobalStoreOptions, HTTPManagerService, HTTPManagerSignalsService, HTTPManagerStateService, HeadersService, HttpRequestManagerModule, HttpRequestServicesDemoComponent, InvalidFileInfoModel, LocalStorageDemoComponent, LocalStorageManagerService, LocalStorageOptions, LocalStorageSignalsDemoComponent, LocalStorageSignalsManagerService, LoggerService, NotificationMessage, PathQueryService, PublicMessage, Random, RandomHSLColor, RandomHexColor, RandomNumber, RandomNumbers, RandomNumbersUnique, RandomPaletteColor, RandomSignature, RandomStr, RandomVisibleColor, RequestErrorInterceptor, RequestHeadersInterceptor, RequestManagerDemoComponent, RequestManagerStateDemoComponent, RequestOptions, RequestService, RequestSignalsService, RetryOptions, SettingOptions, StateMessage, StateStorageOptions, StorageData, StorageOption, StorageType, StoreStateManagerService, StoreStateManagerSignalsService, StoreStateSignalsDemoComponent, StreamType, SymmetricalEncryptionService, TableSchemaDef, UUID, UUID_STR, UploadDemoComponent, UploadValidationErrorModel, UserData, UtilsService, WSOptions, WebSocketMessageService, WithCredentialsInterceptor, calculateBatchProgress, countdown, createChannelName, delayedRetry, isErrorState, isPendingState, isSuccessState, requestPolling, requestStreaming, streamAI, streamAuto, streamEvents, streamJSON, streamNDJSON };
11766
+ export { ApiRequest, AppService, AsymmetricalEncryptionService, BatchOptions, BatchResult, CONFIG_SETTINGS_TOKEN, ChannelType, ConfigHTTPOptions, ConfigOptions, DataType, DatabaseDataDemoComponent, DatabaseManagerService, DatabaseStorage, DbService, ErrorDisplaySettings, GlobalStoreOptions, HTTPManagerService, HTTPManagerSignalsService, HTTPManagerStateService, HeadersService, HttpRequestManagerModule, HttpRequestServicesDemoComponent, InvalidFileInfoModel, LocalStorageDemoComponent, LocalStorageManagerService, LocalStorageOptions, LocalStorageSignalsDemoComponent, LocalStorageSignalsManagerService, LoggerService, NotificationMessage, OperationResultModel, PathQueryService, PublicMessage, Random, RandomHSLColor, RandomHexColor, RandomNumber, RandomNumbers, RandomNumbersUnique, RandomPaletteColor, RandomSignature, RandomStr, RandomVisibleColor, RequestErrorInterceptor, RequestHeadersInterceptor, RequestManagerDemoComponent, RequestManagerStateDemoComponent, RequestOptions, RequestService, RequestSignalsService, RetryOptions, SettingOptions, StateMessage, StateOperationResult, StateStorageOptions, StorageData, StorageOption, StorageType, StoreStateManagerService, StoreStateManagerSignalsService, StoreStateSignalsDemoComponent, StreamType, SymmetricalEncryptionService, TableSchemaDef, UUID, UUID_STR, UploadDemoComponent, UploadValidationErrorModel, UserData, UtilsService, WSOptions, WebSocketMessageService, WithCredentialsInterceptor, calculateBatchProgress, countdown, createChannelName, delayedRetry, isErrorState, isPendingState, isSuccessState, requestPolling, requestStreaming, streamAI, streamAuto, streamEvents, streamJSON, streamNDJSON };
11612
11767
  //# sourceMappingURL=http-request-manager.mjs.map