http-request-manager 0.0.2 → 0.0.20
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 +262 -13
- package/esm2022/http-request-manager.mjs +5 -0
- package/esm2022/lib/interceptors/credentials.interceptor.mjs +14 -0
- package/esm2022/lib/interceptors/index.mjs +5 -0
- package/esm2022/lib/interceptors/models/error-settings.model.mjs +10 -0
- package/esm2022/lib/interceptors/request-error.interceptor.mjs +49 -0
- package/esm2022/lib/interceptors/request-header.interceptor.mjs +41 -0
- package/esm2022/lib/models/data-type.enum.mjs +7 -0
- package/esm2022/lib/models/database-storage.model.mjs +10 -0
- package/esm2022/lib/models/index.mjs +4 -0
- package/esm2022/lib/models/retry-options.model.mjs +10 -0
- package/esm2022/lib/services/index.mjs +6 -0
- package/esm2022/lib/services/local-storage-manager-service/index.mjs +3 -0
- package/esm2022/lib/services/local-storage-manager-service/local-storage-manager.service.mjs +275 -0
- package/esm2022/lib/services/local-storage-manager-service/models/global-store-options.model.mjs +13 -0
- package/esm2022/lib/services/local-storage-manager-service/models/index.mjs +7 -0
- package/esm2022/lib/services/local-storage-manager-service/models/setting-options.model.mjs +13 -0
- package/esm2022/lib/services/local-storage-manager-service/models/storage-data.model.mjs +10 -0
- package/esm2022/lib/services/local-storage-manager-service/models/storage-option-settings.model.mjs +13 -0
- package/esm2022/lib/services/local-storage-manager-service/models/storage-option.model.mjs +12 -0
- package/esm2022/lib/services/local-storage-manager-service/models/storage-type.enum.mjs +7 -0
- package/esm2022/lib/services/request-manager-services/http-manager.service.mjs +172 -0
- package/esm2022/lib/services/request-manager-services/index.mjs +5 -0
- package/esm2022/lib/services/request-manager-services/request.service.mjs +159 -0
- package/esm2022/lib/services/request-manager-services/rxjs-operators/countdown.mjs +9 -0
- package/esm2022/lib/services/request-manager-services/rxjs-operators/delay-retry.mjs +8 -0
- package/esm2022/lib/services/request-manager-services/rxjs-operators/index.mjs +5 -0
- package/esm2022/lib/services/request-manager-services/rxjs-operators/request-polling.mjs +14 -0
- package/esm2022/lib/services/request-manager-services/rxjs-operators/request-streaming.mjs +19 -0
- package/esm2022/lib/services/request-manager-state-service/http-manager-state.store.mjs +299 -0
- package/esm2022/lib/services/request-manager-state-service/index.mjs +3 -0
- package/esm2022/lib/services/request-manager-state-service/models/api-request.model.mjs +20 -0
- package/esm2022/lib/services/request-manager-state-service/models/index.mjs +3 -0
- package/esm2022/lib/services/request-manager-state-service/models/request-options.model.mjs +10 -0
- package/esm2022/lib/services/utils/app.service.mjs +20 -0
- package/esm2022/lib/services/utils/encryption/asymmetrical-encryption.service.mjs +186 -0
- package/esm2022/lib/services/utils/encryption/encryption-test.service.mjs +35 -0
- package/esm2022/lib/services/utils/encryption/index.mjs +4 -0
- package/esm2022/lib/services/utils/encryption/random.mjs +52 -0
- package/esm2022/lib/services/utils/encryption/symmetrical-encryption.service.mjs +77 -0
- package/esm2022/lib/services/utils/headers.service.mjs +21 -0
- package/esm2022/lib/services/utils/index.mjs +6 -0
- package/esm2022/lib/services/utils/path-query.service.mjs +53 -0
- package/esm2022/lib/services/utils/utils.service.mjs +134 -0
- package/esm2022/public-api.mjs +7 -0
- package/fesm2022/http-request-manager.mjs +1715 -0
- package/fesm2022/http-request-manager.mjs.map +1 -0
- package/http-request-manager-0.0.20.tgz +0 -0
- package/index.d.ts +5 -0
- package/lib/interceptors/credentials.interceptor.d.ts +8 -0
- package/lib/interceptors/index.d.ts +4 -0
- package/lib/interceptors/models/error-settings.model.d.ts +10 -0
- package/lib/interceptors/request-error.interceptor.d.ts +10 -0
- package/lib/interceptors/request-header.interceptor.d.ts +15 -0
- package/lib/models/data-type.enum.d.ts +5 -0
- package/lib/models/database-storage.model.d.ts +10 -0
- package/lib/models/index.d.ts +3 -0
- package/lib/models/retry-options.model.d.ts +10 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/local-storage-manager-service/index.d.ts +2 -0
- package/lib/services/local-storage-manager-service/local-storage-manager.service.d.ts +81 -0
- package/lib/services/local-storage-manager-service/models/global-store-options.model.d.ts +15 -0
- package/lib/services/local-storage-manager-service/models/index.d.ts +6 -0
- package/lib/services/local-storage-manager-service/models/setting-options.model.d.ts +15 -0
- package/lib/services/local-storage-manager-service/models/storage-data.model.d.ts +10 -0
- package/lib/services/local-storage-manager-service/models/storage-option-settings.model.d.ts +15 -0
- package/lib/services/local-storage-manager-service/models/storage-option.model.d.ts +13 -0
- package/lib/services/local-storage-manager-service/models/storage-type.enum.d.ts +5 -0
- package/lib/services/request-manager-services/http-manager.service.d.ts +35 -0
- package/lib/services/request-manager-services/index.d.ts +3 -0
- package/lib/services/request-manager-services/request.service.d.ts +27 -0
- package/lib/services/request-manager-services/rxjs-operators/countdown.d.ts +2 -0
- package/lib/services/request-manager-services/rxjs-operators/delay-retry.d.ts +2 -0
- package/lib/services/request-manager-services/rxjs-operators/index.d.ts +4 -0
- package/lib/services/request-manager-services/rxjs-operators/request-polling.d.ts +7 -0
- package/lib/services/request-manager-services/rxjs-operators/request-streaming.d.ts +2 -0
- package/lib/services/request-manager-state-service/http-manager-state.store.d.ts +55 -0
- package/lib/services/request-manager-state-service/index.d.ts +2 -0
- package/lib/services/request-manager-state-service/models/api-request.model.d.ts +25 -0
- package/lib/services/request-manager-state-service/models/index.d.ts +2 -0
- package/lib/services/request-manager-state-service/models/request-options.model.d.ts +10 -0
- package/lib/services/utils/app.service.d.ts +8 -0
- package/lib/services/utils/encryption/asymmetrical-encryption.service.d.ts +17 -0
- package/lib/services/utils/encryption/encryption-test.service.d.ts +10 -0
- package/lib/services/utils/encryption/index.d.ts +3 -0
- package/lib/services/utils/encryption/random.d.ts +7 -0
- package/lib/services/utils/encryption/symmetrical-encryption.service.d.ts +14 -0
- package/lib/services/utils/headers.service.d.ts +10 -0
- package/lib/services/utils/index.d.ts +5 -0
- package/lib/services/utils/path-query.service.d.ts +11 -0
- package/lib/services/utils/utils.service.d.ts +24 -0
- package/package.json +17 -3
- package/public-api.d.ts +3 -0
- package/ng-package.json +0 -7
- package/src/lib/http-request-manager.component.spec.ts +0 -21
- package/src/lib/http-request-manager.component.ts +0 -15
- package/src/lib/http-request-manager.module.ts +0 -16
- package/src/lib/http-request-manager.service.spec.ts +0 -16
- package/src/lib/http-request-manager.service.ts +0 -9
- package/src/public-api.ts +0 -7
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface StorageDataInterface {
|
|
2
|
+
id?: string;
|
|
3
|
+
data?: any;
|
|
4
|
+
}
|
|
5
|
+
export declare class StorageData implements StorageDataInterface {
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
data?: any;
|
|
8
|
+
constructor(id?: string | undefined, data?: any);
|
|
9
|
+
static adapt(item?: any): StorageData;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StorageType } from "./storage-type.enum";
|
|
2
|
+
export interface StorageOptionSettingsInterface {
|
|
3
|
+
storage?: StorageType;
|
|
4
|
+
expires?: number;
|
|
5
|
+
expiresIn?: string;
|
|
6
|
+
encrypted?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class StorageOptionSettings implements StorageOptionSettingsInterface {
|
|
9
|
+
storage: StorageType;
|
|
10
|
+
expires?: number | undefined;
|
|
11
|
+
expiresIn?: string | undefined;
|
|
12
|
+
encrypted?: boolean | undefined;
|
|
13
|
+
constructor(storage?: StorageType, expires?: number | undefined, expiresIn?: string | undefined, encrypted?: boolean | undefined);
|
|
14
|
+
static adapt(item?: any): StorageOptionSettings;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StorageOptionSettings } from "./storage-option-settings.model";
|
|
2
|
+
export interface StorageOptionInterface {
|
|
3
|
+
id?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
options?: StorageOptionSettings;
|
|
6
|
+
}
|
|
7
|
+
export declare class StorageOption implements StorageOptionInterface {
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
name: string;
|
|
10
|
+
options?: StorageOptionSettings | undefined;
|
|
11
|
+
constructor(id?: string | undefined, name?: string, options?: StorageOptionSettings | undefined);
|
|
12
|
+
static adapt(item?: any): StorageOption;
|
|
13
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ApiRequest } from '../request-manager-state-service/models/api-request.model';
|
|
4
|
+
import { RequestService } from './request.service';
|
|
5
|
+
import { ToastMessageService } from 'toast-message-display';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class HTTPManagerService<T> extends RequestService {
|
|
8
|
+
toastMessage: ToastMessageService;
|
|
9
|
+
ng_injector: Injector;
|
|
10
|
+
private countdown;
|
|
11
|
+
countdown$: Observable<number>;
|
|
12
|
+
private error;
|
|
13
|
+
error$: Observable<boolean>;
|
|
14
|
+
private data;
|
|
15
|
+
data$: Observable<any>;
|
|
16
|
+
private polling$;
|
|
17
|
+
constructor();
|
|
18
|
+
getRequest<T>(options: ApiRequest, params?: any[]): Observable<any>;
|
|
19
|
+
postRequest<T extends {
|
|
20
|
+
id?: number | string;
|
|
21
|
+
}>(data: T, options: ApiRequest, params?: any[]): Observable<any>;
|
|
22
|
+
putRequest<T extends {
|
|
23
|
+
id?: number | string;
|
|
24
|
+
}>(data: T, options: ApiRequest, params?: any[]): Observable<any>;
|
|
25
|
+
deleteRequest<T>(options: ApiRequest, params?: any[]): Observable<any>;
|
|
26
|
+
downloadRequest<T>(options: ApiRequest, params?: any[]): Observable<any>;
|
|
27
|
+
private createObservable;
|
|
28
|
+
private createRequest;
|
|
29
|
+
private prepareRequestData;
|
|
30
|
+
private handleError;
|
|
31
|
+
private handleErrorWithSnackBar;
|
|
32
|
+
private stopPolling;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HTTPManagerService<any>, never>;
|
|
34
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HTTPManagerService<any>>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
2
|
+
import { ApiRequest } from '../request-manager-state-service/models/api-request.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class RequestService {
|
|
5
|
+
private http;
|
|
6
|
+
private pathQueryService;
|
|
7
|
+
private headersService;
|
|
8
|
+
isPending: BehaviorSubject<boolean>;
|
|
9
|
+
isPending$: Observable<boolean>;
|
|
10
|
+
progress: BehaviorSubject<number>;
|
|
11
|
+
progress$: Observable<number>;
|
|
12
|
+
getRecordRequest<T>(options: ApiRequest): Observable<T>;
|
|
13
|
+
createRecordRequest<T>(options: ApiRequest, data: any): Observable<T>;
|
|
14
|
+
updateRecordRequest<T>(options: ApiRequest, data: any): Observable<T>;
|
|
15
|
+
deleteRecordRequest<T>(options: ApiRequest): Observable<T>;
|
|
16
|
+
private buildUrlPath;
|
|
17
|
+
private buildHeaders;
|
|
18
|
+
private buildCombinedHeaders;
|
|
19
|
+
private request;
|
|
20
|
+
downloadFileRequest(options: ApiRequest): Observable<any>;
|
|
21
|
+
private handleFinalize;
|
|
22
|
+
private downloadFile;
|
|
23
|
+
private createFileType;
|
|
24
|
+
private combineHeaders;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RequestService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RequestService>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* @param pollInterval
|
|
4
|
+
* @param stopCondition$
|
|
5
|
+
* @param isPending$
|
|
6
|
+
*/
|
|
7
|
+
export declare function requestPolling<T>(pollInterval: number, stopCondition$: Observable<any>, isPending$: BehaviorSubject<boolean>): (source: Observable<T>) => Observable<T>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ComponentStore } from '@ngrx/component-store';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { DatabaseStorage } from '../../models/database-storage.model';
|
|
4
|
+
import { HTTPManagerService, DataType } from '../request-manager-services';
|
|
5
|
+
import { ApiRequest, RequestOptions } from './models';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export interface APIStateManagerData<T> {
|
|
8
|
+
data: T[];
|
|
9
|
+
dataObject: T | null;
|
|
10
|
+
}
|
|
11
|
+
export declare class HTTPManagerStateService<T extends {
|
|
12
|
+
id: number;
|
|
13
|
+
}> extends ComponentStore<APIStateManagerData<T>> {
|
|
14
|
+
private apiOptions;
|
|
15
|
+
private dataType;
|
|
16
|
+
private database?;
|
|
17
|
+
httpManagerService: HTTPManagerService<any>;
|
|
18
|
+
error$: Observable<boolean>;
|
|
19
|
+
isPending$: Observable<boolean>;
|
|
20
|
+
private page;
|
|
21
|
+
page$: Observable<number>;
|
|
22
|
+
private totalPages;
|
|
23
|
+
totalPages$: Observable<number>;
|
|
24
|
+
private percentage;
|
|
25
|
+
percentage$: Observable<number>;
|
|
26
|
+
private hasDatabase;
|
|
27
|
+
streamedResponse: never[];
|
|
28
|
+
constructor(apiOptions: ApiRequest, dataType: DataType | undefined, database?: DatabaseStorage | undefined);
|
|
29
|
+
setApiRequestOptions(apiOptions: ApiRequest, dataType?: DataType, database?: DatabaseStorage): void;
|
|
30
|
+
get apiRequestOptions(): ApiRequest;
|
|
31
|
+
initStorage(): void;
|
|
32
|
+
initializeState(data: any): void;
|
|
33
|
+
readonly data$: Observable<T | T[] | null>;
|
|
34
|
+
readonly selectRecord$: (id: number) => Observable<T | T[] | null>;
|
|
35
|
+
private readonly resetData$;
|
|
36
|
+
private readonly setData$;
|
|
37
|
+
private updateArrayState;
|
|
38
|
+
private readonly addData$;
|
|
39
|
+
private readonly deleteData$;
|
|
40
|
+
private readonly updateData$;
|
|
41
|
+
readonly clearRecords: (observableOrValue?: void | Observable<void> | undefined) => import("rxjs").Subscription;
|
|
42
|
+
readonly refreshData: (observableOrValue?: void | Observable<void> | undefined) => import("rxjs").Subscription;
|
|
43
|
+
readonly fetchRecords: (options?: RequestOptions) => ((observableOrValue?: any) => import("rxjs").Subscription) | ((observableOrValue: any) => import("rxjs").Subscription);
|
|
44
|
+
readonly createRecord: (data: any | null, options?: RequestOptions) => ((observableOrValue?: any) => import("rxjs").Subscription) | ((observableOrValue: any) => import("rxjs").Subscription);
|
|
45
|
+
readonly updateRecord: (data: any | null, options?: RequestOptions) => ((observableOrValue?: any) => import("rxjs").Subscription) | ((observableOrValue: any) => import("rxjs").Subscription);
|
|
46
|
+
readonly deleteRecord: (options?: RequestOptions) => ((observableOrValue?: any) => import("rxjs").Subscription) | ((observableOrValue: any) => import("rxjs").Subscription);
|
|
47
|
+
readonly createStream: (data: any | null, options?: RequestOptions) => ((observableOrValue?: any) => import("rxjs").Subscription) | ((observableOrValue: any) => import("rxjs").Subscription);
|
|
48
|
+
readonly fetchStream: (options?: RequestOptions) => ((observableOrValue?: any) => import("rxjs").Subscription) | ((observableOrValue: any) => import("rxjs").Subscription);
|
|
49
|
+
private fetchPaginationCancel$;
|
|
50
|
+
readonly fetchPaginationRecords: (size?: number, options?: RequestOptions) => ((observableOrValue?: any) => import("rxjs").Subscription) | ((observableOrValue: any) => import("rxjs").Subscription);
|
|
51
|
+
private isEmpty;
|
|
52
|
+
private updateRequestOptions;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HTTPManagerStateService<any>, never>;
|
|
54
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HTTPManagerStateService<any>>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RetryOptions } from "../../request-manager-services";
|
|
2
|
+
export interface ApiRequestInterface {
|
|
3
|
+
server: string;
|
|
4
|
+
path: any[];
|
|
5
|
+
headers: any;
|
|
6
|
+
adapter?: any;
|
|
7
|
+
mapper?: any;
|
|
8
|
+
polling?: number;
|
|
9
|
+
retry: RetryOptions;
|
|
10
|
+
stream?: boolean;
|
|
11
|
+
displayError: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class ApiRequest implements ApiRequestInterface {
|
|
14
|
+
server: string;
|
|
15
|
+
path: any[];
|
|
16
|
+
headers: {};
|
|
17
|
+
adapter?: any;
|
|
18
|
+
mapper?: any;
|
|
19
|
+
polling?: number | undefined;
|
|
20
|
+
retry: RetryOptions;
|
|
21
|
+
stream: boolean;
|
|
22
|
+
displayError: boolean;
|
|
23
|
+
constructor(server?: string, path?: any[], headers?: {}, adapter?: any, mapper?: any, polling?: number | undefined, retry?: RetryOptions, stream?: boolean, displayError?: boolean);
|
|
24
|
+
static adapt(item?: any): ApiRequest;
|
|
25
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface RequestOptionsInterface {
|
|
2
|
+
path: any[];
|
|
3
|
+
headers: any;
|
|
4
|
+
}
|
|
5
|
+
export declare class RequestOptions implements RequestOptionsInterface {
|
|
6
|
+
path: any[];
|
|
7
|
+
headers: {};
|
|
8
|
+
constructor(path?: any[], headers?: {});
|
|
9
|
+
static adapt(item?: any): RequestOptions;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AsymmetricalEncryptionService {
|
|
4
|
+
constructor();
|
|
5
|
+
generateKeyPair(modulusLength?: number): Observable<CryptoKeyPair>;
|
|
6
|
+
encryptData(publicKey: CryptoKey, data: string): Observable<string>;
|
|
7
|
+
decryptData(privateKey: CryptoKey, encryptedData: string): Observable<string>;
|
|
8
|
+
pemToArrayBuffer(pem: string): ArrayBuffer;
|
|
9
|
+
base64ToArrayBuffer(base64: string): ArrayBuffer;
|
|
10
|
+
arrayBufferToBase64(buffer: ArrayBuffer): string;
|
|
11
|
+
base64ToPEM(base64Key: string, publicKey?: boolean): string;
|
|
12
|
+
pemToCryptoKey(pem: string, algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[], format?: any): Observable<CryptoKey>;
|
|
13
|
+
testGenerateKeys(): Observable<string>;
|
|
14
|
+
testDecryptionWithKeys(): Observable<string>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AsymmetricalEncryptionService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AsymmetricalEncryptionService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class EncryptionTestService {
|
|
3
|
+
constructor();
|
|
4
|
+
private isBase64;
|
|
5
|
+
private isHexadecimal;
|
|
6
|
+
private hasHighEntropy;
|
|
7
|
+
isEncrypted(str: string): boolean;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EncryptionTestService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EncryptionTestService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const Random: () => number;
|
|
2
|
+
export declare const RandomNumber: (min: number, max: number) => number;
|
|
3
|
+
export declare const RandomNumbers: (min: number, max: number, length: number) => number[];
|
|
4
|
+
export declare const RandomNumbersUnique: (min: number, max: number, length: number) => number[];
|
|
5
|
+
export declare const RandomStr: () => string;
|
|
6
|
+
export declare const RandomSignature: () => number;
|
|
7
|
+
export declare const UUID: () => `${string}-${string}-${string}-${string}-${string}`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class SymmetricalEncryptionService {
|
|
3
|
+
appID: string;
|
|
4
|
+
private appService;
|
|
5
|
+
constructor();
|
|
6
|
+
generateCipherKey(): string;
|
|
7
|
+
encrypt(str: any, key?: string): string | undefined;
|
|
8
|
+
decrypt(str: string, key?: string): string | undefined;
|
|
9
|
+
createSignature(url: string, len?: number): string;
|
|
10
|
+
normalizeURL(url: string): string;
|
|
11
|
+
generateSignature(url: string): string;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SymmetricalEncryptionService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SymmetricalEncryptionService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HttpHeaders } from '@angular/common/http';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class HeadersService {
|
|
4
|
+
headers: {};
|
|
5
|
+
generateHeaders(headers?: Record<string, string>): {
|
|
6
|
+
headers: HttpHeaders;
|
|
7
|
+
};
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeadersService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HeadersService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class PathQueryService {
|
|
3
|
+
buildAPIPath(server: string | string[], params?: any[] | any): string;
|
|
4
|
+
private buildRestPath;
|
|
5
|
+
private buildQueryPath;
|
|
6
|
+
private cleanUrlPath;
|
|
7
|
+
private isObject;
|
|
8
|
+
private removeEmptyParams;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PathQueryService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PathQueryService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class UtilsService {
|
|
4
|
+
http: HttpClient;
|
|
5
|
+
constructor();
|
|
6
|
+
isString(x: string | number): boolean;
|
|
7
|
+
isObject(obj: any): boolean;
|
|
8
|
+
JSONToString(value: any): any;
|
|
9
|
+
stringToJSON(value: string): any;
|
|
10
|
+
isJSON(str: any): boolean;
|
|
11
|
+
getValueByProp(obj: any, prop: string): any;
|
|
12
|
+
objectsEqual(x: any, y: any): boolean;
|
|
13
|
+
getJSON(file: string): import("rxjs").Observable<Object>;
|
|
14
|
+
get today(): number;
|
|
15
|
+
base32ToHex(base32: string): string;
|
|
16
|
+
binaryToHex(binary: string): string;
|
|
17
|
+
expires(str?: string): number | undefined;
|
|
18
|
+
hasExpired(expiryDate: number): boolean;
|
|
19
|
+
hasExpiry(setting: any): boolean;
|
|
20
|
+
expiresIn(expiryDate: number): number | undefined;
|
|
21
|
+
lc: (str: string) => string;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UtilsService, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UtilsService>;
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "http-request-manager",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"author": "Michele Bonifacio",
|
|
5
5
|
"company": "wavecoders",
|
|
6
6
|
"description": "This is a test package",
|
|
@@ -24,10 +24,24 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@angular/common": "^16.2.0",
|
|
27
|
-
"@angular/core": "^16.2.0"
|
|
27
|
+
"@angular/core": "^16.2.0",
|
|
28
|
+
"toast-message-display": "^1.0.0"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"tslib": "^2.3.0"
|
|
31
32
|
},
|
|
32
|
-
"sideEffects": false
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"module": "fesm2022/http-request-manager.mjs",
|
|
35
|
+
"typings": "index.d.ts",
|
|
36
|
+
"exports": {
|
|
37
|
+
"./package.json": {
|
|
38
|
+
"default": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
".": {
|
|
41
|
+
"types": "./index.d.ts",
|
|
42
|
+
"esm2022": "./esm2022/http-request-manager.mjs",
|
|
43
|
+
"esm": "./esm2022/http-request-manager.mjs",
|
|
44
|
+
"default": "./fesm2022/http-request-manager.mjs"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
33
47
|
}
|
package/public-api.d.ts
ADDED
package/ng-package.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { HttpRequestManagerComponent } from './http-request-manager.component';
|
|
4
|
-
|
|
5
|
-
describe('HttpRequestManagerComponent', () => {
|
|
6
|
-
let component: HttpRequestManagerComponent;
|
|
7
|
-
let fixture: ComponentFixture<HttpRequestManagerComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [HttpRequestManagerComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(HttpRequestManagerComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { HttpRequestManagerComponent } from './http-request-manager.component';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
@NgModule({
|
|
7
|
-
declarations: [
|
|
8
|
-
HttpRequestManagerComponent
|
|
9
|
-
],
|
|
10
|
-
imports: [
|
|
11
|
-
],
|
|
12
|
-
exports: [
|
|
13
|
-
HttpRequestManagerComponent
|
|
14
|
-
]
|
|
15
|
-
})
|
|
16
|
-
export class HttpRequestManagerModule { }
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { HttpRequestManagerService } from './http-request-manager.service';
|
|
4
|
-
|
|
5
|
-
describe('HttpRequestManagerService', () => {
|
|
6
|
-
let service: HttpRequestManagerService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(HttpRequestManagerService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|
package/src/public-api.ts
DELETED
package/tsconfig.lib.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
-
{
|
|
3
|
-
"extends": "../../tsconfig.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"outDir": "../../out-tsc/lib",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"declarationMap": true,
|
|
8
|
-
"inlineSources": true,
|
|
9
|
-
"types": []
|
|
10
|
-
},
|
|
11
|
-
"exclude": [
|
|
12
|
-
"**/*.spec.ts"
|
|
13
|
-
]
|
|
14
|
-
}
|
package/tsconfig.lib.prod.json
DELETED
package/tsconfig.spec.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
-
{
|
|
3
|
-
"extends": "../../tsconfig.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"outDir": "../../out-tsc/spec",
|
|
6
|
-
"types": [
|
|
7
|
-
"jasmine"
|
|
8
|
-
]
|
|
9
|
-
},
|
|
10
|
-
"include": [
|
|
11
|
-
"**/*.spec.ts",
|
|
12
|
-
"**/*.d.ts"
|
|
13
|
-
]
|
|
14
|
-
}
|