@react-pakistan/util-functions 1.25.30 → 1.25.32

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.
@@ -23,19 +23,29 @@
23
23
  * - Single Item Cache Functions
24
24
  * - Cache Utilities
25
25
  */
26
- interface CacheConfig {
26
+ export interface CacheConfig {
27
27
  cacheKey: string;
28
28
  apiUrl: string;
29
29
  expirationMs?: number;
30
30
  responseKey?: string;
31
31
  params?: Record<string, unknown>;
32
32
  }
33
- interface GetCachedDataOptions {
33
+ export interface GetCachedDataOptions {
34
34
  config: CacheConfig;
35
35
  params?: Record<string, unknown>;
36
36
  headers?: Record<string, string>;
37
37
  }
38
- interface ListResponse<T> {
38
+ export interface CachedData<T> {
39
+ items: Record<string, T>;
40
+ cachedAt: string;
41
+ count: number;
42
+ currentPage?: number;
43
+ }
44
+ export interface CachedSingleData<T> {
45
+ item: T;
46
+ cachedAt: string;
47
+ }
48
+ export interface ListResponse<T> {
39
49
  count: number;
40
50
  items: T[];
41
51
  currentPage?: number;
@@ -158,4 +168,3 @@ export declare const preloadCache: <T>(config: CacheConfig) => Promise<ListRespo
158
168
  * }
159
169
  */
160
170
  export declare const isCacheStale: (cacheKey: string, expirationMs?: number) => boolean;
161
- export {};
package/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from './api/stellar-solutions/branch';
4
4
  export * from './api/stellar-solutions/company-report';
5
5
  export * from './api/stellar-solutions/company';
6
6
  export * from './api/stellar-solutions/constants';
7
+ export * from './api/stellar-solutions/constants';
7
8
  export * from './api/stellar-solutions/contact';
8
9
  export * from './api/stellar-solutions/currency';
9
10
  export * from './api/stellar-solutions/customer';
@@ -20,6 +21,7 @@ export * from './api/stellar-solutions/profile';
20
21
  export * from './api/stellar-solutions/quote-invoice-report';
21
22
  export * from './api/stellar-solutions/quote-invoice';
22
23
  export * from './api/stellar-solutions/tax';
24
+ export * from './api/stellar-solutions/type';
23
25
  export * from './constants';
24
26
  export * from './general';
25
27
  export * from './hooks';
package/index.js CHANGED
@@ -20,6 +20,7 @@ __exportStar(require("./api/stellar-solutions/branch"), exports);
20
20
  __exportStar(require("./api/stellar-solutions/company-report"), exports);
21
21
  __exportStar(require("./api/stellar-solutions/company"), exports);
22
22
  __exportStar(require("./api/stellar-solutions/constants"), exports);
23
+ __exportStar(require("./api/stellar-solutions/constants"), exports);
23
24
  __exportStar(require("./api/stellar-solutions/contact"), exports);
24
25
  __exportStar(require("./api/stellar-solutions/currency"), exports);
25
26
  __exportStar(require("./api/stellar-solutions/customer"), exports);
@@ -36,6 +37,7 @@ __exportStar(require("./api/stellar-solutions/profile"), exports);
36
37
  __exportStar(require("./api/stellar-solutions/quote-invoice-report"), exports);
37
38
  __exportStar(require("./api/stellar-solutions/quote-invoice"), exports);
38
39
  __exportStar(require("./api/stellar-solutions/tax"), exports);
40
+ __exportStar(require("./api/stellar-solutions/type"), exports);
39
41
  __exportStar(require("./constants"), exports);
40
42
  __exportStar(require("./general"), exports);
41
43
  __exportStar(require("./hooks"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.25.30",
3
+ "version": "1.25.32",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {