http-request-manager 18.7.13 → 18.7.14
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 +1282 -223
- package/fesm2022/http-request-manager.mjs +2371 -2297
- package/fesm2022/http-request-manager.mjs.map +1 -1
- package/http-request-manager-18.7.14.tgz +0 -0
- package/package.json +1 -1
- package/types/http-request-manager.d.ts +46 -31
- package/http-request-manager-18.7.13.tgz +0 -0
|
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.14",
|
|
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",
|
|
@@ -248,28 +248,6 @@ declare class WSUser implements WSUserInterface {
|
|
|
248
248
|
static adapt(item?: any): WSUser;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
interface ChannelMessageDataInterface {
|
|
252
|
-
channel: string;
|
|
253
|
-
users: WSUser[];
|
|
254
|
-
}
|
|
255
|
-
declare class ChannelMessageData implements ChannelMessageDataInterface {
|
|
256
|
-
channel: string;
|
|
257
|
-
users: WSUser[];
|
|
258
|
-
constructor(channel: string, users?: WSUser[]);
|
|
259
|
-
static adapt(item?: any): ChannelMessageData;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
interface ChannelMessageInterface {
|
|
263
|
-
sessionId: any;
|
|
264
|
-
content: any;
|
|
265
|
-
}
|
|
266
|
-
declare class ChannelMessage implements ChannelMessageInterface {
|
|
267
|
-
sessionId: any;
|
|
268
|
-
content: any;
|
|
269
|
-
constructor(sessionId?: any, content?: any);
|
|
270
|
-
static adapt(item?: any): ChannelMessage;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
251
|
declare enum CommunicationType {
|
|
274
252
|
MESSAGE = 0,
|
|
275
253
|
ALERT = 1,
|
|
@@ -365,6 +343,17 @@ declare class DatabaseManagerService extends DbService {
|
|
|
365
343
|
static ɵprov: i0.ɵɵInjectableDeclaration<DatabaseManagerService>;
|
|
366
344
|
}
|
|
367
345
|
|
|
346
|
+
interface ChannelMessageInterface {
|
|
347
|
+
sessionId: any;
|
|
348
|
+
content: any;
|
|
349
|
+
}
|
|
350
|
+
declare class ChannelMessage implements ChannelMessageInterface {
|
|
351
|
+
sessionId: any;
|
|
352
|
+
content: any;
|
|
353
|
+
constructor(sessionId?: any, content?: any);
|
|
354
|
+
static adapt(item?: any): ChannelMessage;
|
|
355
|
+
}
|
|
356
|
+
|
|
368
357
|
/**
|
|
369
358
|
* Channel type enum for different communication purposes
|
|
370
359
|
* - STATE: Private channels for state synchronization (SYS- prefix)
|
|
@@ -646,13 +635,25 @@ declare class RequestService extends WebsocketService {
|
|
|
646
635
|
progress: BehaviorSubject<number>;
|
|
647
636
|
progress$: Observable<number>;
|
|
648
637
|
getRecordRequest<T>(options: ApiRequest): Observable<T>;
|
|
638
|
+
getRecordRequest<T>(options: ApiRequest): Observable<T>;
|
|
639
|
+
getRecordRequest<T>(options: ApiRequest & {
|
|
640
|
+
stream: true;
|
|
641
|
+
}): Observable<T[]>;
|
|
642
|
+
createRecordRequest<T>(options: ApiRequest, data: any): Observable<T>;
|
|
643
|
+
createRecordRequest<T>(options: ApiRequest & {
|
|
644
|
+
stream: true;
|
|
645
|
+
}, data: any): Observable<T[]>;
|
|
649
646
|
createRecordRequest<T>(options: ApiRequest, data: any): Observable<T>;
|
|
647
|
+
createRecordRequest<T>(options: ApiRequest & {
|
|
648
|
+
stream: true;
|
|
649
|
+
}, data: any): Observable<T[]>;
|
|
650
650
|
updateRecordRequest<T>(options: ApiRequest, data: any): Observable<T>;
|
|
651
651
|
deleteRecordRequest<T>(options: ApiRequest): Observable<T>;
|
|
652
652
|
private buildUrlPath;
|
|
653
653
|
private buildHeaders;
|
|
654
654
|
private buildCombinedHeaders;
|
|
655
655
|
private request;
|
|
656
|
+
private requestStreaming;
|
|
656
657
|
downloadFileRequest(options: ApiRequest): Observable<any>;
|
|
657
658
|
private handleFinalize;
|
|
658
659
|
private downloadFile;
|
|
@@ -838,10 +839,24 @@ declare function requestPolling<T>(pollInterval: number, stopCondition$: Observa
|
|
|
838
839
|
|
|
839
840
|
interface StreamConfig {
|
|
840
841
|
streamType: StreamType;
|
|
841
|
-
|
|
842
|
+
}
|
|
843
|
+
interface StreamEvent<T = any> {
|
|
844
|
+
type: 'progress' | 'complete' | 'data';
|
|
845
|
+
data: T;
|
|
846
|
+
metadata?: {
|
|
847
|
+
timestamp: Date;
|
|
848
|
+
streamType: StreamType;
|
|
849
|
+
contentLength?: number;
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
interface ParsingResult<T = any> {
|
|
853
|
+
success: boolean;
|
|
854
|
+
data?: T[];
|
|
855
|
+
error?: string;
|
|
842
856
|
}
|
|
843
857
|
/**
|
|
844
858
|
* COMPREHENSIVE REQUEST STREAMING OPERATOR - FULLY ABSTRACTED
|
|
859
|
+
* Refactored for better type safety and memory management
|
|
845
860
|
*
|
|
846
861
|
* Single function that handles ALL streaming formats without hardcoded assumptions:
|
|
847
862
|
* - JSON format (Individual JSON objects)
|
|
@@ -854,15 +869,15 @@ interface StreamConfig {
|
|
|
854
869
|
* this.http.get(url, options).pipe(requestStreaming()).subscribe(data => {...})
|
|
855
870
|
* this.http.get(url, options).pipe(requestStreaming({ streamType: StreamType.NDJSON })).subscribe(data => {...})
|
|
856
871
|
*/
|
|
857
|
-
declare function requestStreaming(config?: StreamConfig): OperatorFunction<any,
|
|
872
|
+
declare function requestStreaming<T = any>(config?: StreamConfig): OperatorFunction<any, T[]>;
|
|
858
873
|
/**
|
|
859
874
|
* Convenience functions for common use cases
|
|
860
875
|
*/
|
|
861
|
-
declare function streamJSON(): OperatorFunction<any,
|
|
862
|
-
declare function streamNDJSON(): OperatorFunction<any,
|
|
863
|
-
declare function streamAI(): OperatorFunction<any,
|
|
864
|
-
declare function streamEvents(): OperatorFunction<any,
|
|
865
|
-
declare function streamAuto(): OperatorFunction<any,
|
|
876
|
+
declare function streamJSON<T = any>(): OperatorFunction<any, T[]>;
|
|
877
|
+
declare function streamNDJSON<T = any>(): OperatorFunction<any, T[]>;
|
|
878
|
+
declare function streamAI<T = any>(): OperatorFunction<any, T[]>;
|
|
879
|
+
declare function streamEvents<T = any>(): OperatorFunction<any, T[]>;
|
|
880
|
+
declare function streamAuto<T = any>(): OperatorFunction<any, T[]>;
|
|
866
881
|
|
|
867
882
|
interface State {
|
|
868
883
|
localStores: StorageData[];
|
|
@@ -2251,5 +2266,5 @@ declare class HttpRequestManagerModule {
|
|
|
2251
2266
|
static ɵinj: i0.ɵɵInjectorDeclaration<HttpRequestManagerModule>;
|
|
2252
2267
|
}
|
|
2253
2268
|
|
|
2254
|
-
export { ApiRequest, AppService, AsymmetricalEncryptionService, CONFIG_SETTINGS_TOKEN, ChannelInfo,
|
|
2255
|
-
export type { APIStateManagerData, ApiRequestInterface, ChannelInfoInterface,
|
|
2269
|
+
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, RandomHSLColor, RandomHexColor, RandomNumber, RandomNumbers, RandomNumbersUnique, RandomPaletteColor, RandomSignature, RandomStr, RandomVisibleColor, RequestErrorInterceptor, RequestHeadersInterceptor, RequestManagerDemoComponent, RequestManagerStateDemoComponent, RequestOptions, RequestService, RequestSignalsService, RetryOptions, SettingOptions, StateStorageOptions, StorageData, StorageOption, StorageType, StoreStateManagerService, StreamType, SymmetricalEncryptionService, TableSchemaDef, UUID, UUID_STR, UtilsService, WSOptions, WSUser, WebsocketService, WithCredentialsInterceptor, countdown, createChannelName, delayedRetry, requestPolling, requestStreaming, streamAI, streamAuto, streamEvents, streamJSON, streamNDJSON };
|
|
2270
|
+
export type { APIStateManagerData, ApiRequestInterface, ChannelInfoInterface, ConfigHTTPOptionsInterface, ConfigOptionsInterface, DatabaseStorageInterface, ErrorDisplaySettingsInterface, GlobalStoreOptionsInterface, LocalStorageOptionsInterface, ParsingResult, RequestOptionsInterface, RetryOptionsInterface, SettingOptionsInterface, State, StateStorageOptionsInterface, StateStoreManagerData, StorageDataInterface, StorageOptionInterface, StreamConfig, StreamEvent, TableRecord, TableSchemaDefInterface, WSOptionsInterface, WSUserInterface };
|
|
Binary file
|