http-request-manager 18.7.2 → 18.7.3
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.7.
|
|
3
|
+
"version": "18.7.3",
|
|
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",
|
|
@@ -338,6 +338,24 @@ declare class ChannelMessage implements ChannelMessageInterface {
|
|
|
338
338
|
static adapt(item?: any): ChannelMessage;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
+
/**
|
|
342
|
+
* Channel type enum for different communication purposes
|
|
343
|
+
* - STATE: Private channels for state synchronization
|
|
344
|
+
* - MESSAGE: Messaging/communication channels
|
|
345
|
+
* - NOTIFICATION: Notification/broadcast channels
|
|
346
|
+
*/
|
|
347
|
+
declare enum ChannelType {
|
|
348
|
+
STATE = "SYS",
|
|
349
|
+
MESSAGE = "MES",
|
|
350
|
+
NOTIFICATION = "PUB"
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Utility function to create prefixed channel name
|
|
354
|
+
* @param channelType - The type of channel
|
|
355
|
+
* @param channelName - The base channel name
|
|
356
|
+
* @returns Prefixed channel name (e.g., 'SYS-USERS123')
|
|
357
|
+
*/
|
|
358
|
+
declare function createChannelName(channelType: ChannelType, channelName: string): string;
|
|
341
359
|
interface APIStateManagerData<T> {
|
|
342
360
|
data: T[];
|
|
343
361
|
dataObject: T | null;
|
|
@@ -399,6 +417,18 @@ declare class HTTPManagerStateService<T extends {
|
|
|
399
417
|
wsOptions: WSOptions;
|
|
400
418
|
connectionStatus$: Observable<boolean>;
|
|
401
419
|
constructor(apiOptions: ApiRequest, dataType: DataType | undefined, database?: DatabaseStorage | undefined);
|
|
420
|
+
/**
|
|
421
|
+
* Add appropriate prefix to a channel name if not already present
|
|
422
|
+
*/
|
|
423
|
+
private prefixChannel;
|
|
424
|
+
/**
|
|
425
|
+
* Remove any known prefix from a channel name
|
|
426
|
+
*/
|
|
427
|
+
private stripChannelPrefix;
|
|
428
|
+
/**
|
|
429
|
+
* Get the base channel name without prefix (for display/user reference)
|
|
430
|
+
*/
|
|
431
|
+
getBaseChannelName(channel: string): string;
|
|
402
432
|
setApiRequestOptions(apiOptions?: ApiRequest, dataType?: DataType, database?: DatabaseStorage): void;
|
|
403
433
|
private setupConnectionStatus;
|
|
404
434
|
readonly initWS: (observableOrValue: WSOptions | Observable<WSOptions>) => rxjs.Subscription;
|
|
@@ -425,9 +455,26 @@ declare class HTTPManagerStateService<T extends {
|
|
|
425
455
|
readonly createStream: (data: any | null, options?: RequestOptions) => ((observableOrValue?: any) => rxjs.Subscription) | ((observableOrValue: any) => rxjs.Subscription);
|
|
426
456
|
readonly fetchStream: (options?: RequestOptions) => ((observableOrValue?: any) => rxjs.Subscription) | ((observableOrValue: any) => rxjs.Subscription);
|
|
427
457
|
private wsCommunication;
|
|
458
|
+
/**
|
|
459
|
+
* Send a message to channel(s)
|
|
460
|
+
* @param message - The message content
|
|
461
|
+
* @param channels - Optional array of channel names (MES- prefix added automatically)
|
|
462
|
+
* Use 'allChannels' to broadcast to all
|
|
463
|
+
*/
|
|
428
464
|
wsMessaging(message: ChannelMessage, channels?: string[]): void;
|
|
429
465
|
/**
|
|
430
|
-
* Subscribe to a
|
|
466
|
+
* Subscribe to a messaging channel
|
|
467
|
+
* @param channel - Base channel name (MES- prefix added automatically)
|
|
468
|
+
*/
|
|
469
|
+
subscribeToMessageChannel(channel: string): void;
|
|
470
|
+
/**
|
|
471
|
+
* Unsubscribe from a messaging channel
|
|
472
|
+
* @param channel - Base channel name (MES- prefix added automatically)
|
|
473
|
+
*/
|
|
474
|
+
unsubscribeFromMessageChannel(channel: string): void;
|
|
475
|
+
/**
|
|
476
|
+
* Subscribe to a single channel (no automatic prefix)
|
|
477
|
+
* Use subscribeToMessageChannel() for MES- prefixed channels
|
|
431
478
|
*/
|
|
432
479
|
subscribeToChannel(channel: string): void;
|
|
433
480
|
/**
|
|
@@ -464,6 +511,7 @@ declare class HTTPManagerStateService<T extends {
|
|
|
464
511
|
getUsersInChannel(channel: string): void;
|
|
465
512
|
/**
|
|
466
513
|
* Create a notification channel on the server
|
|
514
|
+
* @param channel - Base channel name (PUB- prefix added automatically)
|
|
467
515
|
*/
|
|
468
516
|
createNotificationChannel(channel: string): void;
|
|
469
517
|
/**
|
|
@@ -477,6 +525,7 @@ declare class HTTPManagerStateService<T extends {
|
|
|
477
525
|
getTodaysNotificationChannels(): void;
|
|
478
526
|
/**
|
|
479
527
|
* Subscribe to a notification channel with optional date filters
|
|
528
|
+
* @param channel - Base channel name (PUB- prefix added automatically)
|
|
480
529
|
*/
|
|
481
530
|
subscribeToNotificationChannel(channel: string, options?: {
|
|
482
531
|
startEpoch?: number;
|
|
@@ -484,10 +533,12 @@ declare class HTTPManagerStateService<T extends {
|
|
|
484
533
|
}, user?: any): void;
|
|
485
534
|
/**
|
|
486
535
|
* Unsubscribe from a notification channel
|
|
536
|
+
* @param channel - Base channel name (PUB- prefix added automatically)
|
|
487
537
|
*/
|
|
488
538
|
unsubscribeFromNotificationChannel(channel: string): void;
|
|
489
539
|
/**
|
|
490
540
|
* Send a notification to a channel
|
|
541
|
+
* @param channel - Base channel name (PUB- prefix added automatically)
|
|
491
542
|
*/
|
|
492
543
|
sendNotification(channel: string, content: any): void;
|
|
493
544
|
private isEmpty;
|
|
@@ -2091,5 +2142,5 @@ declare class HttpRequestManagerModule {
|
|
|
2091
2142
|
static ɵinj: i0.ɵɵInjectorDeclaration<HttpRequestManagerModule>;
|
|
2092
2143
|
}
|
|
2093
2144
|
|
|
2094
|
-
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 };
|
|
2145
|
+
export { ApiRequest, AppService, AsymmetricalEncryptionService, CONFIG_SETTINGS_TOKEN, ChannelInfo, ChannelType, 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, createChannelName, delayedRetry, requestPolling, requestStreaming };
|
|
2095
2146
|
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
|