http-request-manager 18.9.6 → 18.10.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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "http-request-manager",
3
- "version": "18.9.6",
3
+ "version": "18.10.0",
4
4
  "homepage": "https://wavecoders.ca",
5
5
  "author": "Mike Bonifacio <wavecoders@gmail.com> (http://wavecoders@gmail.com/)",
6
6
  "description": "This is an Angular Module containing Components/Services using Material",
@@ -4,34 +4,34 @@ import * as i0 from '@angular/core';
4
4
  import { InjectionToken, OnDestroy, Injector, OnInit, EventEmitter, ModuleWithProviders } from '@angular/core';
5
5
  import { ComponentStore } from '@ngrx/component-store';
6
6
  import { HttpClient, HttpHeaders, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
7
- import * as i16 from 'toast-message-display';
7
+ import * as i17 from 'toast-message-display';
8
8
  import { ToastMessageDisplayService } from 'toast-message-display';
9
9
  import Dexie, { Table } from 'dexie';
10
- import * as i33 from '@ngx-translate/core';
10
+ import * as i34 from '@ngx-translate/core';
11
11
  import { TranslateService } from '@ngx-translate/core';
12
12
  import * as _angular_forms from '@angular/forms';
13
- import { FormBuilder, FormArray, FormControl } from '@angular/forms';
13
+ import { FormArray, FormBuilder, FormControl } from '@angular/forms';
14
14
  import { DataSource } from '@angular/cdk/collections';
15
15
  import * as http_request_manager from 'http-request-manager';
16
16
  import * as i4 from '@angular/common';
17
17
  import * as i7 from '@angular/material/button';
18
- import * as i19 from '@angular/material/tabs';
19
- import * as i20 from '@angular/material/select';
20
- import * as i21 from '@angular/material/chips';
21
- import * as i22 from '@angular/material/menu';
18
+ import * as i20 from '@angular/material/tabs';
19
+ import * as i21 from '@angular/material/select';
20
+ import * as i22 from '@angular/material/chips';
21
+ import * as i23 from '@angular/material/menu';
22
22
  import * as i5 from '@angular/material/icon';
23
- import * as i24 from '@angular/material/table';
24
- import * as i25 from '@angular/material/button-toggle';
25
- import * as i26 from '@angular/material/autocomplete';
26
- import * as i27 from '@angular/material/progress-bar';
27
- import * as i28 from '@angular/material/slide-toggle';
28
- import * as i29 from '@angular/material/divider';
29
- import * as i30 from '@angular/material/form-field';
30
- import * as i31 from '@angular/material/input';
31
- import * as i32 from '@angular/material/toolbar';
32
- import * as i34 from '@angular/material/sidenav';
33
- import * as i35 from '@angular/material/datepicker';
34
- import * as i36 from '@angular/material/core';
23
+ import * as i25 from '@angular/material/table';
24
+ import * as i26 from '@angular/material/button-toggle';
25
+ import * as i27 from '@angular/material/autocomplete';
26
+ import * as i28 from '@angular/material/progress-bar';
27
+ import * as i29 from '@angular/material/slide-toggle';
28
+ import * as i30 from '@angular/material/divider';
29
+ import * as i31 from '@angular/material/form-field';
30
+ import * as i32 from '@angular/material/input';
31
+ import * as i33 from '@angular/material/toolbar';
32
+ import * as i35 from '@angular/material/sidenav';
33
+ import * as i36 from '@angular/material/datepicker';
34
+ import * as i37 from '@angular/material/core';
35
35
  import { ThemePalette } from '@angular/material/core';
36
36
  import * as i6 from '@angular/material/progress-spinner';
37
37
  import { ProgressSpinnerMode } from '@angular/material/progress-spinner';
@@ -442,6 +442,7 @@ declare class HTTPManagerStateService<T extends {
442
442
  private userAction;
443
443
  userAction$: Observable<any>;
444
444
  private static wsCommunicationQueue;
445
+ private ownSessionId;
445
446
  wsOptions: WSOptions;
446
447
  connectionStatus$: Observable<boolean>;
447
448
  constructor(apiOptions: ApiRequest, dataType: DataType | undefined, database?: DatabaseStorage);
@@ -806,6 +807,12 @@ declare class WebSocketManagerService {
806
807
  * @param channel - Channel name
807
808
  */
808
809
  unsubscribeFromNotificationChannel(channel: string): void;
810
+ /**
811
+ * Send notification to channel
812
+ * @param channel - Channel name (should include MES- prefix)
813
+ * @param content - Notification content
814
+ */
815
+ sendNotification(channel: string, content: any): void;
809
816
  /**
810
817
  * Check if WebSocket connection is currently open
811
818
  * @returns true if connected, false otherwise
@@ -1208,6 +1215,10 @@ declare class HTTPManagerService<T> extends RequestService {
1208
1215
  * Unsubscribe from notification channel
1209
1216
  */
1210
1217
  unsubscribeFromNotificationChannel(channel: string): void;
1218
+ /**
1219
+ * Send notification to channel
1220
+ */
1221
+ sendNotification(channel: string, content: any): void;
1211
1222
  getRequest<T>(options?: ApiRequest, params?: any[]): Observable<T>;
1212
1223
  postRequest<T extends {
1213
1224
  id?: number | string;
@@ -1611,6 +1622,157 @@ declare class RequestErrorInterceptor implements HttpInterceptor {
1611
1622
  static ɵprov: i0.ɵɵInjectableDeclaration<RequestErrorInterceptor>;
1612
1623
  }
1613
1624
 
1625
+ interface ClientInfoInterface$2 {
1626
+ domain: string;
1627
+ service: string;
1628
+ id: number;
1629
+ name: string;
1630
+ }
1631
+ declare class ClientInfo$2 implements ClientInfoInterface$2 {
1632
+ domain: string;
1633
+ service: string;
1634
+ id: number;
1635
+ name: string;
1636
+ constructor(domain?: string, service?: string, id?: number, name?: string);
1637
+ static adapt(item?: any): ClientInfo$2;
1638
+ }
1639
+
1640
+ interface ClientInfoMapperInterface$2 {
1641
+ id: number;
1642
+ first_name: string;
1643
+ last_name: string;
1644
+ email: string;
1645
+ }
1646
+ declare class ClientInfoMapper$2 implements ClientInfoMapperInterface$2 {
1647
+ id: number;
1648
+ first_name: string;
1649
+ last_name: string;
1650
+ email: string;
1651
+ constructor(id?: number, first_name?: string, last_name?: string, email?: string);
1652
+ static adapt(item?: any): ClientInfoMapper$2;
1653
+ }
1654
+
1655
+ interface AIPromptInterface$2 {
1656
+ response: string;
1657
+ }
1658
+ declare class AIPrompt$2 implements AIPromptInterface$2 {
1659
+ response: string;
1660
+ constructor(response?: string);
1661
+ static adapt(item?: any): AIPrompt$2;
1662
+ }
1663
+
1664
+ declare class RequestManagerBasicDemoComponent implements OnInit {
1665
+ server: string;
1666
+ adapter?: Function;
1667
+ mapper?: Function;
1668
+ displayedColumns: string[];
1669
+ getColumnsFromData(data: any[]): string[];
1670
+ updateDisplayedColumns(data: any[]): void;
1671
+ isObject(value: any): boolean;
1672
+ private fb;
1673
+ private toastMessage;
1674
+ questionControl: _angular_forms.FormControl<string | null>;
1675
+ httpManagerService: HTTPManagerService<any>;
1676
+ isPending$: Observable<boolean>;
1677
+ countdown$: Observable<number>;
1678
+ GET_error$: BehaviorSubject<string>;
1679
+ POST_error$: BehaviorSubject<string>;
1680
+ PUT_error$: BehaviorSubject<string>;
1681
+ DELETE_error$: BehaviorSubject<string>;
1682
+ STREAM_error$: BehaviorSubject<string>;
1683
+ STREAM_AI_error$: BehaviorSubject<string>;
1684
+ GET$?: Observable<any>;
1685
+ POST$?: Observable<any>;
1686
+ PUT$?: Observable<any>;
1687
+ DELETE$?: Observable<any>;
1688
+ STREAM$?: Observable<any>;
1689
+ STREAM_AI$?: Observable<any>;
1690
+ requestParams: {
1691
+ GET: ApiRequest;
1692
+ POST: ApiRequest;
1693
+ PUT: ApiRequest;
1694
+ DELETE: ApiRequest;
1695
+ STREAM: ApiRequest;
1696
+ };
1697
+ streamTypes: {
1698
+ id: string;
1699
+ value: string;
1700
+ }[];
1701
+ streamType: string;
1702
+ failedState: any;
1703
+ pollingState: any;
1704
+ downloadRequest: ApiRequest;
1705
+ sampleClientData: {
1706
+ id: number;
1707
+ name: string;
1708
+ domain: string;
1709
+ service: string;
1710
+ spiffe: string;
1711
+ secret: string;
1712
+ created: number;
1713
+ modified: number;
1714
+ icon: string;
1715
+ imageFile: string;
1716
+ email: string;
1717
+ };
1718
+ requestForm: _angular_forms.FormGroup<{
1719
+ path: _angular_forms.FormControl<string | null>;
1720
+ headers: FormArray<_angular_forms.FormControl<unknown>>;
1721
+ adapter: _angular_forms.FormControl<null>;
1722
+ mapper: _angular_forms.FormControl<null>;
1723
+ retry: _angular_forms.FormGroup<{
1724
+ times: _angular_forms.FormControl<number | null>;
1725
+ delay: _angular_forms.FormControl<number | null>;
1726
+ }>;
1727
+ polling: _angular_forms.FormControl<number | null>;
1728
+ }>;
1729
+ AIType: number;
1730
+ sampleAdaptors: ({
1731
+ label: string;
1732
+ value: typeof ClientInfo$2.adapt;
1733
+ } | {
1734
+ label: string;
1735
+ value: typeof AIPrompt$2.adapt;
1736
+ })[];
1737
+ sampleMappers: ({
1738
+ label: string;
1739
+ value: typeof ClientInfoMapper$2.adapt;
1740
+ } | {
1741
+ label: string;
1742
+ value: typeof AIPrompt$2.adapt;
1743
+ })[];
1744
+ get retry(): {
1745
+ times: number | null;
1746
+ delay: number | null;
1747
+ } | undefined;
1748
+ get headers(): FormArray;
1749
+ get isValid(): boolean;
1750
+ hasId: (arr: any[]) => boolean;
1751
+ props: (adapter: any) => any;
1752
+ arrayObjectsToObjects: (arr: any[]) => any;
1753
+ constructor();
1754
+ ngOnInit(): void;
1755
+ onStreamType(type: string): void;
1756
+ addHeader(): void;
1757
+ removeHeader(index: number): void;
1758
+ compileRequest(): {
1759
+ apiOptions: ApiRequest;
1760
+ path: string[];
1761
+ };
1762
+ onGetRequest(): void;
1763
+ onCreateRequest(): void;
1764
+ onUpdateRequest(): void;
1765
+ onDeleteRequest(): void;
1766
+ onStreamPostRequest(): void;
1767
+ onStreamRequest(): void;
1768
+ onDownloadCompleted(): void;
1769
+ onDownloadFailed(err: string): void;
1770
+ errorHandling(err: any, type: string): void;
1771
+ onSelectAIType(type: number): void;
1772
+ static ɵfac: i0.ɵɵFactoryDeclaration<RequestManagerBasicDemoComponent, never>;
1773
+ static ɵcmp: i0.ɵɵComponentDeclaration<RequestManagerBasicDemoComponent, "app-request-manager-basic-demo", never, {}, {}, never, never, false, never>;
1774
+ }
1775
+
1614
1776
  declare class HttpRequestServicesDemoComponent implements OnInit {
1615
1777
  private configOptions?;
1616
1778
  wsServer: string;
@@ -1638,6 +1800,12 @@ declare class HttpRequestServicesDemoComponent implements OnInit {
1638
1800
  divider: boolean;
1639
1801
  disabled: boolean;
1640
1802
  new?: undefined;
1803
+ } | {
1804
+ name: string;
1805
+ value: string;
1806
+ divider: boolean;
1807
+ new?: undefined;
1808
+ disabled?: undefined;
1641
1809
  })[];
1642
1810
  selectedService: string;
1643
1811
  injectionOptions?: ConfigOptions;
@@ -2526,17 +2694,13 @@ declare class WsMessagingComponent implements OnInit, OnDestroy {
2526
2694
  /**
2527
2695
  * Handle chip toggle for subscribe/unsubscribe
2528
2696
  */
2529
- onChipToggle(channel: string, event: any): void;
2697
+ onChipToggle(event: any, channel: string): void;
2530
2698
  /**
2531
2699
  * Check if currently subscribed to a channel
2532
2700
  * Compares display names (without PUB- prefix)
2533
2701
  */
2534
2702
  isSubscribed(channel: string, subscribedChannels: string[]): boolean;
2535
- /**
2536
- * Handle chip click - toggle subscription state
2537
- */
2538
- onChipClick(channel: string, subscribedChannels: string[]): void;
2539
- onSendMessage(user: WSUser): void;
2703
+ onSendMessage(): void;
2540
2704
  static ɵfac: i0.ɵɵFactoryDeclaration<WsMessagingComponent, never>;
2541
2705
  static ɵcmp: i0.ɵɵComponentDeclaration<WsMessagingComponent, "app-ws-messaging", never, { "server": { "alias": "server"; "required": false; }; "wsServer": { "alias": "wsServer"; "required": false; }; "jwtToken": { "alias": "jwtToken"; "required": false; }; "user": { "alias": "user"; "required": false; }; "path": { "alias": "path"; "required": false; }; }, {}, never, never, false, never>;
2542
2706
  }
@@ -2719,7 +2883,7 @@ declare class FileDownloaderModule {
2719
2883
  declare class HttpRequestManagerModule {
2720
2884
  static forRoot(config?: ConfigOptions): ModuleWithProviders<HttpRequestManagerModule>;
2721
2885
  static ɵfac: i0.ɵɵFactoryDeclaration<HttpRequestManagerModule, never>;
2722
- static ɵmod: i0.ɵɵNgModuleDeclaration<HttpRequestManagerModule, [typeof HttpRequestServicesDemoComponent, typeof RequestManagerStateDemoComponent, typeof RequestManagerDemoComponent, typeof RequestSignalsManagerDemoComponent, typeof LocalStorageDemoComponent, typeof LocalStorageSignalsDemoComponent, typeof RequestManagerWsDemoComponent, typeof StoreStateManagerDemoComponent, typeof DatabaseDataDemoComponent, typeof WsDataControlComponent, typeof WsMessagingComponent, typeof WsNotificationsComponent, typeof WsAiMessagingComponent, typeof WsChatsComponent], [typeof i4.CommonModule, typeof i16.ToastMessageDisplayModule, typeof _angular_forms.FormsModule, typeof _angular_forms.ReactiveFormsModule, typeof i7.MatButtonModule, typeof i19.MatTabsModule, typeof i20.MatSelectModule, typeof i21.MatChipsModule, typeof i22.MatMenuModule, typeof i5.MatIconModule, typeof i24.MatTableModule, typeof i25.MatButtonToggleModule, typeof i26.MatAutocompleteModule, typeof i27.MatProgressBarModule, typeof i28.MatSlideToggleModule, typeof i29.MatDividerModule, typeof i30.MatFormFieldModule, typeof i31.MatInputModule, typeof i32.MatToolbarModule, typeof i28.MatSlideToggleModule, typeof i33.TranslateModule, typeof i34.MatSidenavModule, typeof i35.MatDatepickerModule, typeof i36.MatNativeDateModule, typeof FileDownloaderModule], [typeof HttpRequestServicesDemoComponent]>;
2886
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HttpRequestManagerModule, [typeof RequestManagerBasicDemoComponent, typeof HttpRequestServicesDemoComponent, typeof RequestManagerStateDemoComponent, typeof RequestManagerDemoComponent, typeof RequestSignalsManagerDemoComponent, typeof LocalStorageDemoComponent, typeof LocalStorageSignalsDemoComponent, typeof RequestManagerWsDemoComponent, typeof StoreStateManagerDemoComponent, typeof DatabaseDataDemoComponent, typeof WsDataControlComponent, typeof WsMessagingComponent, typeof WsNotificationsComponent, typeof WsAiMessagingComponent, typeof WsChatsComponent], [typeof i4.CommonModule, typeof i17.ToastMessageDisplayModule, typeof _angular_forms.FormsModule, typeof _angular_forms.ReactiveFormsModule, typeof i7.MatButtonModule, typeof i20.MatTabsModule, typeof i21.MatSelectModule, typeof i22.MatChipsModule, typeof i23.MatMenuModule, typeof i5.MatIconModule, typeof i25.MatTableModule, typeof i26.MatButtonToggleModule, typeof i27.MatAutocompleteModule, typeof i28.MatProgressBarModule, typeof i29.MatSlideToggleModule, typeof i30.MatDividerModule, typeof i31.MatFormFieldModule, typeof i32.MatInputModule, typeof i33.MatToolbarModule, typeof i29.MatSlideToggleModule, typeof i34.TranslateModule, typeof i35.MatSidenavModule, typeof i36.MatDatepickerModule, typeof i37.MatNativeDateModule, typeof FileDownloaderModule], [typeof HttpRequestServicesDemoComponent]>;
2723
2887
  static ɵinj: i0.ɵɵInjectorDeclaration<HttpRequestManagerModule>;
2724
2888
  }
2725
2889
 
Binary file