mp-front-cli 0.0.47 → 0.0.49

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.
@@ -0,0 +1,56 @@
1
+ import { CustomEncrypter } from "./custom-encrypter";
2
+ interface ISetRedisStateParams<T> {
3
+ /**
4
+ * ``idApi``
5
+ * ID to get url
6
+ */
7
+ idApi: string;
8
+ /**
9
+ * ``idData``
10
+ * ID to get data
11
+ */
12
+ idData: string;
13
+ /**
14
+ * ``body``
15
+ * Data to save on Redis, you need convert a JSON object to string
16
+ */
17
+ body: T;
18
+ /**
19
+ * ``expire``
20
+ * Expire time on minutes
21
+ */
22
+ expire: number;
23
+ /**
24
+ * ``encrypted``
25
+ * Define if the body will be saved encrypted or plain text
26
+ */
27
+ encrypted?: boolean;
28
+ /**
29
+ * ``refresh``
30
+ * Define if the data will be refreshed
31
+ */
32
+ refresh?: string;
33
+ }
34
+ export declare class RedisCacheHandler<T> extends CustomEncrypter {
35
+ private readonly REDIS_HOST;
36
+ private readonly REDIS_PORT;
37
+ private readonly REDIS_USER;
38
+ private readonly REDIS_PASS;
39
+ private readonly initClient;
40
+ private getRootNode;
41
+ private getEntryPoint;
42
+ private setEntryPoint;
43
+ private getSubNode;
44
+ private setSubNode;
45
+ getRedisState<T>(idApi: string, idData: string): Promise<{
46
+ sha: string;
47
+ data: T;
48
+ }>;
49
+ setRedisState({ idApi, idData, body, expire, encrypted, refresh, }: ISetRedisStateParams<T>): Promise<string>;
50
+ statusHost<T>(): Promise<T>;
51
+ killRedis(): void;
52
+ deleteKey(key: string): void;
53
+ ttl(key: string, time: number): void;
54
+ }
55
+ export {};
56
+ //# sourceMappingURL=custom-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-cache.d.ts","sourceRoot":"","sources":["../../../src/core/utils/custom-cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAMpD,UAAU,oBAAoB,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