http-request-manager 18.5.9 → 18.5.11

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.5.9",
3
+ "version": "18.5.11",
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",
@@ -12,6 +12,7 @@ import { TranslateService } from '@ngx-translate/core';
12
12
  import * as _angular_forms from '@angular/forms';
13
13
  import { FormBuilder, FormArray, FormControl } from '@angular/forms';
14
14
  import { DataSource } from '@angular/cdk/collections';
15
+ import * as http_request_manager from 'http-request-manager';
15
16
  import * as i4 from '@angular/common';
16
17
  import * as i7 from '@angular/material/button';
17
18
  import * as i18 from '@angular/material/tabs';
@@ -213,44 +214,23 @@ declare class ChannelInfo implements ChannelInfoInterface {
213
214
  static adapt(item?: any): ChannelInfo;
214
215
  }
215
216
 
217
+ interface WSUserInterface {
218
+ sessionId: string;
219
+ content: any;
220
+ }
221
+ declare class WSUser implements WSUserInterface {
222
+ sessionId: string;
223
+ content: any;
224
+ constructor(sessionId: string, content: any);
225
+ static adapt(item?: any): WSUser;
226
+ }
227
+
216
228
  declare enum CommunicationType {
217
229
  MESSAGE = 0,
218
230
  ALERT = 1,
219
231
  OTHER = 2
220
232
  }
221
233
 
222
- interface ChannelMessageInterface {
223
- fromUser: string | null;
224
- toUser: string | null;
225
- content: string | null;
226
- issued: Date;
227
- type: CommunicationType;
228
- }
229
- declare class ChannelMessage implements ChannelMessageInterface {
230
- fromUser: string | null;
231
- toUser: string | null;
232
- content: string | null;
233
- issued: Date;
234
- type: CommunicationType;
235
- constructor(fromUser?: string | null, toUser?: string | null, content?: string | null, issued?: Date, type?: CommunicationType);
236
- static adapt(item?: any): ChannelMessage;
237
- }
238
-
239
- interface UserMessageInterface {
240
- fromUser: any;
241
- toUser?: any;
242
- content?: string;
243
- issued?: Date;
244
- }
245
- declare class UserMessage implements UserMessageInterface {
246
- fromUser: any;
247
- toUser?: any;
248
- content?: string | undefined;
249
- issued?: Date | undefined;
250
- constructor(fromUser: any, toUser?: any, content?: string | undefined, issued?: Date | undefined);
251
- static adapt(item?: any): UserMessage;
252
- }
253
-
254
234
  interface DatabaseStorageInterface {
255
235
  table: string;
256
236
  expiresIn: string;
@@ -273,17 +253,6 @@ declare class RequestOptions implements RequestOptionsInterface {
273
253
  static adapt(item?: any): RequestOptions;
274
254
  }
275
255
 
276
- interface WSUserInterface {
277
- id: string;
278
- adapter?: Function;
279
- }
280
- declare class WSUser implements WSUserInterface {
281
- id: string;
282
- adapter?: Function | undefined;
283
- constructor(id?: string, adapter?: Function | undefined);
284
- static adapt(item?: any): WSUser;
285
- }
286
-
287
256
  interface TableSchemaDefInterface {
288
257
  table: string;
289
258
  schema: string;
@@ -351,6 +320,23 @@ declare class DatabaseManagerService extends DbService {
351
320
  static ɵprov: i0.ɵɵInjectableDeclaration<DatabaseManagerService>;
352
321
  }
353
322
 
323
+ interface ChannelMessageInterface {
324
+ sessionId: string;
325
+ content: any;
326
+ message: string;
327
+ users: WSUser[];
328
+ issued: number;
329
+ }
330
+ declare class ChannelMessage implements ChannelMessageInterface {
331
+ sessionId: string;
332
+ content: any;
333
+ message: string;
334
+ users: WSUser[];
335
+ issued: number;
336
+ constructor(sessionId: string, content: any, message?: string, users?: WSUser[], issued?: number);
337
+ static adapt(item?: any): ChannelMessage;
338
+ }
339
+
354
340
  interface APIStateManagerData<T> {
355
341
  data: T[];
356
342
  dataObject: T | null;
@@ -378,6 +364,7 @@ declare class HTTPManagerStateService<T extends {
378
364
  private maxRetries;
379
365
  private retryDelay;
380
366
  private shouldRetry;
367
+ private databaseOptions?;
381
368
  private wsRetryAttempts;
382
369
  wsRetryAttempts$: Observable<number>;
383
370
  private wsNextRetry;
@@ -387,16 +374,16 @@ declare class HTTPManagerStateService<T extends {
387
374
  private userList;
388
375
  userList$: Observable<any[]>;
389
376
  private user;
390
- user$: Observable<any>;
377
+ user$: Observable<WSUser | null>;
391
378
  private communicationMessages;
392
- communicationMessages$: Observable<UserMessage[]>;
379
+ communicationMessages$: Observable<any[]>;
393
380
  private latestCommunicationMessages;
394
- latestCommunicationMessages$: Observable<UserMessage | null>;
381
+ latestCommunicationMessages$: Observable<any>;
395
382
  private userAction;
396
383
  userAction$: Observable<any>;
397
384
  channels: ChannelInfo[];
398
385
  channelList: string[];
399
- messages: any[];
386
+ messages: WSUser[];
400
387
  wsConnection: boolean;
401
388
  wsOptions: WSOptions;
402
389
  status$: Observable<boolean>;
@@ -404,7 +391,7 @@ declare class HTTPManagerStateService<T extends {
404
391
  setApiRequestOptions(apiOptions?: ApiRequest, dataType?: DataType, database?: DatabaseStorage): void;
405
392
  private setupConnectionStatus;
406
393
  readonly initWS: (observableOrValue: WSOptions | Observable<WSOptions>) => Subscription;
407
- appendMessages(message: UserMessage): void;
394
+ appendMessages(message: any): void;
408
395
  latestMessage(): void;
409
396
  clearMessages(): void;
410
397
  get ApiRequestOptions(): ApiRequest;
@@ -427,7 +414,7 @@ declare class HTTPManagerStateService<T extends {
427
414
  readonly createStream: (data: any | null, options?: RequestOptions) => ((observableOrValue?: any) => Subscription) | ((observableOrValue: any) => Subscription);
428
415
  readonly fetchStream: (options?: RequestOptions) => ((observableOrValue?: any) => Subscription) | ((observableOrValue: any) => Subscription);
429
416
  private wsCommunication;
430
- wsMessaging(message: ChannelMessage, channel?: string): void;
417
+ wsMessaging(message: ChannelMessage, channels?: string[]): void;
431
418
  private isEmpty;
432
419
  private updateRequestOptions;
433
420
  static ɵfac: i0.ɵɵFactoryDeclaration<HTTPManagerStateService<any>, never>;
@@ -1478,29 +1465,12 @@ declare class RequestManagerWsDemoComponent implements OnInit {
1478
1465
  wsServer: string;
1479
1466
  jwtToken: string;
1480
1467
  user: any;
1481
- user$: Observable<any>;
1482
- users$: Observable<any[]>;
1468
+ user$: Observable<WSUser | null>;
1483
1469
  attempts$: Observable<number>;
1484
1470
  nextRetry$: Observable<number>;
1485
1471
  connectionStatus$: Observable<boolean>;
1486
- messages: _angular_forms.FormGroup<{
1487
- [x: string]: FormControl<unknown>;
1488
- }>;
1489
- get toUser(): FormControl;
1490
- get content(): FormControl;
1491
- get isValid(): boolean;
1492
- data$: Observable<any>;
1493
1472
  isPending$: Observable<boolean>;
1494
- fromMe: (user: string, fromUser: string) => boolean;
1495
- communicationMessages$: Observable<UserMessage[]>;
1496
- latestCommunicationMessages$: Observable<UserMessage | null>;
1497
- chat$: Observable<{
1498
- user: any;
1499
- messages: any[];
1500
- } | any>;
1501
1473
  ngOnInit(): void;
1502
- onSendMessage(): void;
1503
- onSendAlert(): void;
1504
1474
  static ɵfac: i0.ɵɵFactoryDeclaration<RequestManagerWsDemoComponent, never>;
1505
1475
  static ɵcmp: i0.ɵɵComponentDeclaration<RequestManagerWsDemoComponent, "app-request-manager-ws-demo", never, { "server": { "alias": "server"; "required": false; }; "wsServer": { "alias": "wsServer"; "required": false; }; "jwtToken": { "alias": "jwtToken"; "required": false; }; "user": { "alias": "user"; "required": false; }; }, {}, never, never, false, never>;
1506
1476
  }
@@ -1587,7 +1557,7 @@ declare class WsDataControlComponent implements OnInit {
1587
1557
  jwtToken: string;
1588
1558
  user: any;
1589
1559
  stateDataRequestService: StateDataRequestService;
1590
- user$: rxjs.Observable<any>;
1560
+ user$: rxjs.Observable<http_request_manager.WSUser | null>;
1591
1561
  users$: rxjs.Observable<any[]>;
1592
1562
  userAction$: rxjs.Observable<any>;
1593
1563
  data$: rxjs.Observable<any>;
@@ -1608,23 +1578,24 @@ declare class WsMessagingComponent implements OnInit {
1608
1578
  user: any;
1609
1579
  fb: FormBuilder;
1610
1580
  stateRequestServiceDemo: StateRequestServiceDemo;
1611
- user$: Observable<any>;
1581
+ user$: Observable<WSUser | null>;
1612
1582
  users$: Observable<any[]>;
1613
1583
  data$: Observable<any>;
1614
1584
  messages: _angular_forms.FormGroup<{
1615
- [x: string]: FormControl<unknown>;
1585
+ toUsers: FormControl<WSUser[] | null>;
1586
+ content: FormControl<string | null>;
1616
1587
  }>;
1617
- get toUser(): FormControl;
1588
+ get toUsers(): FormControl;
1618
1589
  get content(): FormControl;
1619
1590
  get isValid(): boolean;
1620
- communicationMessages$: Observable<UserMessage[]>;
1621
- latestCommunicationMessages$: Observable<UserMessage | null>;
1591
+ communicationMessages$: Observable<any[]>;
1592
+ latestCommunicationMessages$: Observable<any>;
1622
1593
  chat$: Observable<{
1623
1594
  user: any;
1624
1595
  messages: any[];
1625
1596
  } | any>;
1626
1597
  ngOnInit(): void;
1627
- onSendMessage(): void;
1598
+ onSendMessage(user: WSUser): void;
1628
1599
  onSendAlert(): void;
1629
1600
  static ɵfac: i0.ɵɵFactoryDeclaration<WsMessagingComponent, never>;
1630
1601
  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; }; }, {}, never, never, false, never>;
@@ -1729,5 +1700,5 @@ declare class HttpRequestManagerModule {
1729
1700
  static ɵinj: i0.ɵɵInjectorDeclaration<HttpRequestManagerModule>;
1730
1701
  }
1731
1702
 
1732
- export { ApiRequest, AppService, AsymmetricalEncryptionService, CONFIG_SETTINGS_TOKEN, ChannelInfo, ChannelMessage, CommunicationType, ConfigHTTPOptions, ConfigOptions, DataType, DatabaseDataDemoComponent, DatabaseManagerService, DatabaseStorage, DbService, ErrorDisplaySettings, GlobalStoreOptions, HTTPManagerService, HTTPManagerSignalsService, HTTPManagerStateService, HeadersService, HttpRequestManagerModule, HttpRequestServicesDemoComponent, LocalStorageDemoComponent, LocalStorageManagerService, LocalStorageOptions, LocalStorageSignalsManagerService, PathQueryService, Random, RandomNumber, RandomNumbers, RandomNumbersUnique, RandomSignature, RandomStr, RequestErrorInterceptor, RequestHeadersInterceptor, RequestManagerDemoComponent, RequestManagerStateDemoComponent, RequestOptions, RequestService, RequestSignalsService, RetryOptions, SettingOptions, StateStorageOptions, StorageData, StorageOption, StorageType, StoreStateManagerService, SymmetricalEncryptionService, TableSchemaDef, UUID, UUID_STR, UserMessage, UtilsService, WSOptions, WSUser, WebsocketService, WithCredentialsInterceptor, countdown, delayedRetry, requestPolling, requestStreaming };
1733
- export type { APIStateManagerData, ApiRequestInterface, ChannelInfoInterface, ChannelMessageInterface, ConfigHTTPOptionsInterface, ConfigOptionsInterface, DatabaseStorageInterface, ErrorDisplaySettingsInterface, GlobalStoreOptionsInterface, LocalStorageOptionsInterface, RequestOptionsInterface, RetryOptionsInterface, SettingOptionsInterface, State, StateStorageOptionsInterface, StateStoreManagerData, StorageDataInterface, StorageOptionInterface, TableRecord, TableSchemaDefInterface, UserMessageInterface, WSOptionsInterface, WSUserInterface };
1703
+ export { ApiRequest, AppService, AsymmetricalEncryptionService, CONFIG_SETTINGS_TOKEN, ChannelInfo, CommunicationType, ConfigHTTPOptions, ConfigOptions, DataType, DatabaseDataDemoComponent, DatabaseManagerService, DatabaseStorage, DbService, ErrorDisplaySettings, GlobalStoreOptions, HTTPManagerService, HTTPManagerSignalsService, HTTPManagerStateService, HeadersService, HttpRequestManagerModule, HttpRequestServicesDemoComponent, LocalStorageDemoComponent, LocalStorageManagerService, LocalStorageOptions, LocalStorageSignalsManagerService, PathQueryService, Random, RandomNumber, RandomNumbers, RandomNumbersUnique, RandomSignature, RandomStr, RequestErrorInterceptor, RequestHeadersInterceptor, RequestManagerDemoComponent, RequestManagerStateDemoComponent, RequestOptions, RequestService, RequestSignalsService, RetryOptions, SettingOptions, StateStorageOptions, StorageData, StorageOption, StorageType, StoreStateManagerService, SymmetricalEncryptionService, TableSchemaDef, UUID, UUID_STR, UtilsService, WSOptions, WSUser, WebsocketService, WithCredentialsInterceptor, countdown, delayedRetry, requestPolling, requestStreaming };
1704
+ export type { APIStateManagerData, ApiRequestInterface, ChannelInfoInterface, ConfigHTTPOptionsInterface, ConfigOptionsInterface, DatabaseStorageInterface, ErrorDisplaySettingsInterface, GlobalStoreOptionsInterface, LocalStorageOptionsInterface, RequestOptionsInterface, RetryOptionsInterface, SettingOptionsInterface, State, StateStorageOptionsInterface, StateStoreManagerData, StorageDataInterface, StorageOptionInterface, TableRecord, TableSchemaDefInterface, WSOptionsInterface, WSUserInterface };
Binary file