@react-pakistan/util-functions 1.24.97 → 1.24.99
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/api/stellar-solutions/app-user/index.d.ts +9 -9
- package/api/stellar-solutions/app-user/index.js +4 -4
- package/api/stellar-solutions/bank/index.d.ts +9 -9
- package/api/stellar-solutions/bank/index.js +4 -4
- package/api/stellar-solutions/branch/index.d.ts +9 -9
- package/api/stellar-solutions/branch/index.js +4 -4
- package/api/stellar-solutions/company/index.d.ts +9 -9
- package/api/stellar-solutions/company/index.js +4 -4
- package/api/stellar-solutions/company-report/index.d.ts +3 -3
- package/api/stellar-solutions/company-report/index.js +1 -1
- package/api/stellar-solutions/constants.d.ts +9 -0
- package/api/stellar-solutions/constants.js +12 -0
- package/api/stellar-solutions/contact/index.d.ts +9 -9
- package/api/stellar-solutions/contact/index.js +4 -4
- package/api/stellar-solutions/currency/index.d.ts +9 -9
- package/api/stellar-solutions/currency/index.js +4 -4
- package/api/stellar-solutions/customer/index.d.ts +11 -11
- package/api/stellar-solutions/customer/index.js +5 -5
- package/api/stellar-solutions/expense/index.d.ts +9 -9
- package/api/stellar-solutions/expense/index.js +4 -4
- package/api/stellar-solutions/expense-category/index.d.ts +9 -9
- package/api/stellar-solutions/expense-category/index.js +4 -4
- package/api/stellar-solutions/lead/index.d.ts +9 -9
- package/api/stellar-solutions/lead/index.js +4 -4
- package/api/stellar-solutions/menu-order/index.d.ts +9 -9
- package/api/stellar-solutions/menu-order/index.js +4 -4
- package/api/stellar-solutions/payment/index.d.ts +9 -9
- package/api/stellar-solutions/payment/index.js +4 -4
- package/api/stellar-solutions/payment-mode/index.d.ts +9 -9
- package/api/stellar-solutions/payment-mode/index.js +4 -4
- package/api/stellar-solutions/preference/index.d.ts +5 -5
- package/api/stellar-solutions/preference/index.js +2 -2
- package/api/stellar-solutions/product/cache.d.ts +94 -0
- package/api/stellar-solutions/product/cache.js +280 -0
- package/api/stellar-solutions/product/index.d.ts +12 -14
- package/api/stellar-solutions/product/index.js +28 -12
- package/api/stellar-solutions/product-category/cache.d.ts +94 -0
- package/api/stellar-solutions/product-category/cache.js +280 -0
- package/api/stellar-solutions/product-category/index.d.ts +10 -10
- package/api/stellar-solutions/product-category/index.js +19 -4
- package/api/stellar-solutions/profile/index.d.ts +13 -13
- package/api/stellar-solutions/profile/index.js +6 -6
- package/api/stellar-solutions/quote-invoice/index.d.ts +9 -9
- package/api/stellar-solutions/quote-invoice/index.js +4 -4
- package/api/stellar-solutions/quote-invoice-report/index.d.ts +3 -3
- package/api/stellar-solutions/quote-invoice-report/index.js +1 -1
- package/api/stellar-solutions/tax/index.d.ts +9 -9
- package/api/stellar-solutions/tax/index.js +4 -4
- package/api/stellar-solutions/type.d.ts +49 -45
- package/api/stellar-solutions/type.js +6 -1
- package/index.d.ts +6 -5
- package/index.js +6 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExpenseTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListExpenseArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -33,26 +33,26 @@ export interface DeleteExpenseArgs {
|
|
|
33
33
|
/**
|
|
34
34
|
* Retrieves expenses with pagination and filtering
|
|
35
35
|
* @param {ListExpenseArgs} args - Object containing prisma client, pagination, and query options
|
|
36
|
-
* @returns {Promise<[number, Array<
|
|
36
|
+
* @returns {Promise<[number, Array<ExpenseTypeBE>]>} Tuple containing total count and array of expenses
|
|
37
37
|
*/
|
|
38
|
-
export declare const listExpense: ({ currentPage, includeExpenseCategory, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListExpenseArgs) => Promise<[number, Array<
|
|
38
|
+
export declare const listExpense: ({ currentPage, includeExpenseCategory, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListExpenseArgs) => Promise<[number, Array<ExpenseTypeBE>]>;
|
|
39
39
|
/**
|
|
40
40
|
* Retrieves a single expense by ID
|
|
41
41
|
* @param {UnitExpenseByIdArgs} args - Object containing prisma client, expense id, and optional query parameters
|
|
42
|
-
* @returns {Promise<
|
|
42
|
+
* @returns {Promise<ExpenseTypeBE | null>} Expense with optional relations if found, null otherwise
|
|
43
43
|
*/
|
|
44
|
-
export declare const unitExpenseById: ({ id, includeExpenseCategory, prisma, }: UnitExpenseByIdArgs) => Promise<
|
|
44
|
+
export declare const unitExpenseById: ({ id, includeExpenseCategory, prisma, }: UnitExpenseByIdArgs) => Promise<ExpenseTypeBE | null>;
|
|
45
45
|
/**
|
|
46
46
|
* Creates or updates an expense using upsert
|
|
47
47
|
* @param {UpdateExpenseArgs} args - Object containing prisma client and expense data
|
|
48
|
-
* @returns {Promise<
|
|
48
|
+
* @returns {Promise<ExpenseTypeBE>} Created or updated expense
|
|
49
49
|
*/
|
|
50
|
-
export declare const updateExpense: ({ currency, description, expenseCategoryId, id, includeExpenseCategory, name, prisma, ref, total, }: UpdateExpenseArgs) => Promise<
|
|
50
|
+
export declare const updateExpense: ({ currency, description, expenseCategoryId, id, includeExpenseCategory, name, prisma, ref, total, }: UpdateExpenseArgs) => Promise<ExpenseTypeBE>;
|
|
51
51
|
/**
|
|
52
52
|
* Deletes an expense by ID
|
|
53
53
|
* @param {DeleteExpenseArgs} args - Object containing prisma client, expense id, and optional query parameters
|
|
54
|
-
* @returns {Promise<
|
|
54
|
+
* @returns {Promise<ExpenseTypeBE>} Deleted expense
|
|
55
55
|
* @throws {Error} If expense ID is not provided or expense not found
|
|
56
56
|
*/
|
|
57
|
-
export declare const deleteExpense: ({ id, includeExpenseCategory, prisma, }: DeleteExpenseArgs) => Promise<
|
|
57
|
+
export declare const deleteExpense: ({ id, includeExpenseCategory, prisma, }: DeleteExpenseArgs) => Promise<ExpenseTypeBE>;
|
|
58
58
|
export {};
|
|
@@ -61,7 +61,7 @@ var multi_part_search_1 = require("../../../general/multi-part-search");
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves expenses with pagination and filtering
|
|
63
63
|
* @param {ListExpenseArgs} args - Object containing prisma client, pagination, and query options
|
|
64
|
-
* @returns {Promise<[number, Array<
|
|
64
|
+
* @returns {Promise<[number, Array<ExpenseTypeBE>]>} Tuple containing total count and array of expenses
|
|
65
65
|
*/
|
|
66
66
|
var listExpense = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
67
|
var include, orderBy, idSearchQuery, nameSearchQuery, descriptionSearchQuery, refSearchQuery, where, _c, count, items;
|
|
@@ -123,7 +123,7 @@ exports.listExpense = listExpense;
|
|
|
123
123
|
/**
|
|
124
124
|
* Retrieves a single expense by ID
|
|
125
125
|
* @param {UnitExpenseByIdArgs} args - Object containing prisma client, expense id, and optional query parameters
|
|
126
|
-
* @returns {Promise<
|
|
126
|
+
* @returns {Promise<ExpenseTypeBE | null>} Expense with optional relations if found, null otherwise
|
|
127
127
|
*/
|
|
128
128
|
var unitExpenseById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
129
129
|
var include, where, expense;
|
|
@@ -154,7 +154,7 @@ exports.unitExpenseById = unitExpenseById;
|
|
|
154
154
|
/**
|
|
155
155
|
* Creates or updates an expense using upsert
|
|
156
156
|
* @param {UpdateExpenseArgs} args - Object containing prisma client and expense data
|
|
157
|
-
* @returns {Promise<
|
|
157
|
+
* @returns {Promise<ExpenseTypeBE>} Created or updated expense
|
|
158
158
|
*/
|
|
159
159
|
var updateExpense = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
160
160
|
var expenseData, include, where, expense;
|
|
@@ -198,7 +198,7 @@ exports.updateExpense = updateExpense;
|
|
|
198
198
|
/**
|
|
199
199
|
* Deletes an expense by ID
|
|
200
200
|
* @param {DeleteExpenseArgs} args - Object containing prisma client, expense id, and optional query parameters
|
|
201
|
-
* @returns {Promise<
|
|
201
|
+
* @returns {Promise<ExpenseTypeBE>} Deleted expense
|
|
202
202
|
* @throws {Error} If expense ID is not provided or expense not found
|
|
203
203
|
*/
|
|
204
204
|
var deleteExpense = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExpenseCategoryTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListExpenseCategoryArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -28,26 +28,26 @@ export interface DeleteExpenseCategoryArgs {
|
|
|
28
28
|
/**
|
|
29
29
|
* Retrieves expense categories with pagination and filtering
|
|
30
30
|
* @param {ListExpenseCategoryArgs} args - Object containing prisma client, pagination, and query options
|
|
31
|
-
* @returns {Promise<[number, Array<
|
|
31
|
+
* @returns {Promise<[number, Array<ExpenseCategoryTypeBE>]>} Tuple containing total count and array of expense categories
|
|
32
32
|
*/
|
|
33
|
-
export declare const listExpenseCategory: ({ currentPage, includeExpenses, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListExpenseCategoryArgs) => Promise<[number, Array<
|
|
33
|
+
export declare const listExpenseCategory: ({ currentPage, includeExpenses, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListExpenseCategoryArgs) => Promise<[number, Array<ExpenseCategoryTypeBE>]>;
|
|
34
34
|
/**
|
|
35
35
|
* Retrieves a single expense category by ID
|
|
36
36
|
* @param {UnitExpenseCategoryByIdArgs} args - Object containing prisma client, expense category id, and optional query parameters
|
|
37
|
-
* @returns {Promise<
|
|
37
|
+
* @returns {Promise<ExpenseCategoryTypeBE | null>} Expense category with optional relations if found, null otherwise
|
|
38
38
|
*/
|
|
39
|
-
export declare const unitExpenseCategoryById: ({ id, includeExpenses, prisma, }: UnitExpenseCategoryByIdArgs) => Promise<
|
|
39
|
+
export declare const unitExpenseCategoryById: ({ id, includeExpenses, prisma, }: UnitExpenseCategoryByIdArgs) => Promise<ExpenseCategoryTypeBE | null>;
|
|
40
40
|
/**
|
|
41
41
|
* Creates or updates an expense category using upsert
|
|
42
42
|
* @param {UpdateExpenseCategoryArgs} args - Object containing prisma client and expense category data
|
|
43
|
-
* @returns {Promise<
|
|
43
|
+
* @returns {Promise<ExpenseCategoryTypeBE>} Created or updated expense category
|
|
44
44
|
*/
|
|
45
|
-
export declare const updateExpenseCategory: ({ color, description, id, name, prisma, }: UpdateExpenseCategoryArgs) => Promise<
|
|
45
|
+
export declare const updateExpenseCategory: ({ color, description, id, name, prisma, }: UpdateExpenseCategoryArgs) => Promise<ExpenseCategoryTypeBE>;
|
|
46
46
|
/**
|
|
47
47
|
* Deletes an expense category by ID
|
|
48
48
|
* @param {DeleteExpenseCategoryArgs} args - Object containing prisma client, expense category id, and optional query parameters
|
|
49
|
-
* @returns {Promise<
|
|
49
|
+
* @returns {Promise<ExpenseCategoryTypeBE>} Deleted expense category
|
|
50
50
|
* @throws {Error} If expense category ID is not provided or expense category not found
|
|
51
51
|
*/
|
|
52
|
-
export declare const deleteExpenseCategory: ({ id, prisma, }: DeleteExpenseCategoryArgs) => Promise<
|
|
52
|
+
export declare const deleteExpenseCategory: ({ id, prisma, }: DeleteExpenseCategoryArgs) => Promise<ExpenseCategoryTypeBE>;
|
|
53
53
|
export {};
|
|
@@ -61,7 +61,7 @@ var multi_part_search_1 = require("../../../general/multi-part-search");
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves expense categories with pagination and filtering
|
|
63
63
|
* @param {ListExpenseCategoryArgs} args - Object containing prisma client, pagination, and query options
|
|
64
|
-
* @returns {Promise<[number, Array<
|
|
64
|
+
* @returns {Promise<[number, Array<ExpenseCategoryTypeBE>]>} Tuple containing total count and array of expense categories
|
|
65
65
|
*/
|
|
66
66
|
var listExpenseCategory = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
67
|
var include, orderBy, idSearchQuery, nameSearchQuery, descriptionSearchQuery, where, _c, count, items;
|
|
@@ -119,7 +119,7 @@ exports.listExpenseCategory = listExpenseCategory;
|
|
|
119
119
|
/**
|
|
120
120
|
* Retrieves a single expense category by ID
|
|
121
121
|
* @param {UnitExpenseCategoryByIdArgs} args - Object containing prisma client, expense category id, and optional query parameters
|
|
122
|
-
* @returns {Promise<
|
|
122
|
+
* @returns {Promise<ExpenseCategoryTypeBE | null>} Expense category with optional relations if found, null otherwise
|
|
123
123
|
*/
|
|
124
124
|
var unitExpenseCategoryById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
125
125
|
var include, where, expenseCategory;
|
|
@@ -150,7 +150,7 @@ exports.unitExpenseCategoryById = unitExpenseCategoryById;
|
|
|
150
150
|
/**
|
|
151
151
|
* Creates or updates an expense category using upsert
|
|
152
152
|
* @param {UpdateExpenseCategoryArgs} args - Object containing prisma client and expense category data
|
|
153
|
-
* @returns {Promise<
|
|
153
|
+
* @returns {Promise<ExpenseCategoryTypeBE>} Created or updated expense category
|
|
154
154
|
*/
|
|
155
155
|
var updateExpenseCategory = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
156
156
|
var expenseCategoryData, where, expenseCategory;
|
|
@@ -187,7 +187,7 @@ exports.updateExpenseCategory = updateExpenseCategory;
|
|
|
187
187
|
/**
|
|
188
188
|
* Deletes an expense category by ID
|
|
189
189
|
* @param {DeleteExpenseCategoryArgs} args - Object containing prisma client, expense category id, and optional query parameters
|
|
190
|
-
* @returns {Promise<
|
|
190
|
+
* @returns {Promise<ExpenseCategoryTypeBE>} Deleted expense category
|
|
191
191
|
* @throws {Error} If expense category ID is not provided or expense category not found
|
|
192
192
|
*/
|
|
193
193
|
var deleteExpenseCategory = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LeadTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListLeadArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -27,25 +27,25 @@ export interface DeleteLeadArgs {
|
|
|
27
27
|
/**
|
|
28
28
|
* Retrieves a paginated list of leads
|
|
29
29
|
* @param {ListLeadArgs} args - Object containing prisma client, pagination, filtering, and ordering options
|
|
30
|
-
* @returns {Promise<[number, Array<
|
|
30
|
+
* @returns {Promise<[number, Array<LeadTypeBE>]>} Tuple containing total count and array of leads
|
|
31
31
|
*/
|
|
32
|
-
export declare const listLead: ({ currentPage, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListLeadArgs) => Promise<[number, Array<
|
|
32
|
+
export declare const listLead: ({ currentPage, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListLeadArgs) => Promise<[number, Array<LeadTypeBE>]>;
|
|
33
33
|
/**
|
|
34
34
|
* Retrieves a single lead by its ID
|
|
35
35
|
* @param {UnitLeadByIdArgs} args - Object containing prisma client and lead ID
|
|
36
|
-
* @returns {Promise<
|
|
36
|
+
* @returns {Promise<LeadTypeBE | null>} Lead or null if not found
|
|
37
37
|
*/
|
|
38
|
-
export declare const unitLeadById: ({ id, prisma, }: UnitLeadByIdArgs) => Promise<
|
|
38
|
+
export declare const unitLeadById: ({ id, prisma, }: UnitLeadByIdArgs) => Promise<LeadTypeBE | null>;
|
|
39
39
|
/**
|
|
40
40
|
* Updates an existing lead using upsert
|
|
41
41
|
* @param {UpdateLeadArgs} args - Object containing prisma client and lead data
|
|
42
|
-
* @returns {Promise<
|
|
42
|
+
* @returns {Promise<LeadTypeBE>} Updated lead
|
|
43
43
|
*/
|
|
44
|
-
export declare const updateLead: ({ id, notes, prisma, source, status, type, }: UpdateLeadArgs) => Promise<
|
|
44
|
+
export declare const updateLead: ({ id, notes, prisma, source, status, type, }: UpdateLeadArgs) => Promise<LeadTypeBE>;
|
|
45
45
|
/**
|
|
46
46
|
* Deletes a lead by ID
|
|
47
47
|
* @param {DeleteLeadArgs} args - Object containing prisma client and lead ID
|
|
48
|
-
* @returns {Promise<
|
|
48
|
+
* @returns {Promise<LeadTypeBE>} Deleted lead
|
|
49
49
|
*/
|
|
50
|
-
export declare const deleteLead: ({ id, prisma, }: DeleteLeadArgs) => Promise<
|
|
50
|
+
export declare const deleteLead: ({ id, prisma, }: DeleteLeadArgs) => Promise<LeadTypeBE>;
|
|
51
51
|
export {};
|
|
@@ -61,7 +61,7 @@ var multi_part_search_1 = require("../../../general/multi-part-search");
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves a paginated list of leads
|
|
63
63
|
* @param {ListLeadArgs} args - Object containing prisma client, pagination, filtering, and ordering options
|
|
64
|
-
* @returns {Promise<[number, Array<
|
|
64
|
+
* @returns {Promise<[number, Array<LeadTypeBE>]>} Tuple containing total count and array of leads
|
|
65
65
|
*/
|
|
66
66
|
var listLead = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
67
|
var include, orderBy, idSearchQuery, notesSearchQuery, where, _c, count, items;
|
|
@@ -113,7 +113,7 @@ exports.listLead = listLead;
|
|
|
113
113
|
/**
|
|
114
114
|
* Retrieves a single lead by its ID
|
|
115
115
|
* @param {UnitLeadByIdArgs} args - Object containing prisma client and lead ID
|
|
116
|
-
* @returns {Promise<
|
|
116
|
+
* @returns {Promise<LeadTypeBE | null>} Lead or null if not found
|
|
117
117
|
*/
|
|
118
118
|
var unitLeadById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
119
119
|
var include, where, lead;
|
|
@@ -142,7 +142,7 @@ exports.unitLeadById = unitLeadById;
|
|
|
142
142
|
/**
|
|
143
143
|
* Updates an existing lead using upsert
|
|
144
144
|
* @param {UpdateLeadArgs} args - Object containing prisma client and lead data
|
|
145
|
-
* @returns {Promise<
|
|
145
|
+
* @returns {Promise<LeadTypeBE>} Updated lead
|
|
146
146
|
*/
|
|
147
147
|
var updateLead = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
148
148
|
var leadData, where, lead;
|
|
@@ -180,7 +180,7 @@ exports.updateLead = updateLead;
|
|
|
180
180
|
/**
|
|
181
181
|
* Deletes a lead by ID
|
|
182
182
|
* @param {DeleteLeadArgs} args - Object containing prisma client and lead ID
|
|
183
|
-
* @returns {Promise<
|
|
183
|
+
* @returns {Promise<LeadTypeBE>} Deleted lead
|
|
184
184
|
*/
|
|
185
185
|
var deleteLead = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
186
186
|
var where, lead;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MenuOrderTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListMenuOrderArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -28,26 +28,26 @@ export interface DeleteMenuOrderArgs {
|
|
|
28
28
|
/**
|
|
29
29
|
* Retrieves paginated menu orders with count
|
|
30
30
|
* @param {ListMenuOrderArgs} args - Object containing prisma client and pagination parameters
|
|
31
|
-
* @returns {Promise<[number, Array<
|
|
31
|
+
* @returns {Promise<[number, Array<MenuOrderTypeBE>]>} Tuple of total count and menu orders array
|
|
32
32
|
*/
|
|
33
|
-
export declare const listMenuOrder: ({ currentPage, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListMenuOrderArgs) => Promise<[number, Array<
|
|
33
|
+
export declare const listMenuOrder: ({ currentPage, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListMenuOrderArgs) => Promise<[number, Array<MenuOrderTypeBE>]>;
|
|
34
34
|
/**
|
|
35
35
|
* Retrieves a single menu order by ID
|
|
36
36
|
* @param {UnitMenuOrderByIdArgs} args - Object containing prisma client and menu order id
|
|
37
|
-
* @returns {Promise<
|
|
37
|
+
* @returns {Promise<MenuOrderTypeBE | null>} Menu order if found, null otherwise
|
|
38
38
|
*/
|
|
39
|
-
export declare const unitMenuOrderById: ({ id, includePreference, prisma, }: UnitMenuOrderByIdArgs) => Promise<
|
|
39
|
+
export declare const unitMenuOrderById: ({ id, includePreference, prisma, }: UnitMenuOrderByIdArgs) => Promise<MenuOrderTypeBE | null>;
|
|
40
40
|
/**
|
|
41
41
|
* Updates an existing menu order
|
|
42
42
|
* @param {UpdateMenuOrderArgs} args - Object containing prisma client and menu order data
|
|
43
|
-
* @returns {Promise<
|
|
43
|
+
* @returns {Promise<MenuOrderTypeBE>} Updated menu order
|
|
44
44
|
*/
|
|
45
|
-
export declare const updateMenuOrder: ({ id, label, order, preferenceId, prisma, }: UpdateMenuOrderArgs) => Promise<
|
|
45
|
+
export declare const updateMenuOrder: ({ id, label, order, preferenceId, prisma, }: UpdateMenuOrderArgs) => Promise<MenuOrderTypeBE>;
|
|
46
46
|
/**
|
|
47
47
|
* Deletes a menu order by ID
|
|
48
48
|
* @param {DeleteMenuOrderArgs} args - Object containing prisma client and menu order id
|
|
49
|
-
* @returns {Promise<
|
|
49
|
+
* @returns {Promise<MenuOrderTypeBE>} Deleted menu order
|
|
50
50
|
* @throws {Error} If menu order ID is not provided or menu order not found
|
|
51
51
|
*/
|
|
52
|
-
export declare const deleteMenuOrder: ({ id, prisma, }: DeleteMenuOrderArgs) => Promise<
|
|
52
|
+
export declare const deleteMenuOrder: ({ id, prisma, }: DeleteMenuOrderArgs) => Promise<MenuOrderTypeBE>;
|
|
53
53
|
export {};
|
|
@@ -61,7 +61,7 @@ var multi_part_search_1 = require("../../../general/multi-part-search");
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves paginated menu orders with count
|
|
63
63
|
* @param {ListMenuOrderArgs} args - Object containing prisma client and pagination parameters
|
|
64
|
-
* @returns {Promise<[number, Array<
|
|
64
|
+
* @returns {Promise<[number, Array<MenuOrderTypeBE>]>} Tuple of total count and menu orders array
|
|
65
65
|
*/
|
|
66
66
|
var listMenuOrder = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
67
|
var orderBy, idSearchQuery, labelSearchQuery, where, _c, count, items;
|
|
@@ -111,7 +111,7 @@ exports.listMenuOrder = listMenuOrder;
|
|
|
111
111
|
/**
|
|
112
112
|
* Retrieves a single menu order by ID
|
|
113
113
|
* @param {UnitMenuOrderByIdArgs} args - Object containing prisma client and menu order id
|
|
114
|
-
* @returns {Promise<
|
|
114
|
+
* @returns {Promise<MenuOrderTypeBE | null>} Menu order if found, null otherwise
|
|
115
115
|
*/
|
|
116
116
|
var unitMenuOrderById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
117
117
|
var include, where, menuOrder;
|
|
@@ -142,7 +142,7 @@ exports.unitMenuOrderById = unitMenuOrderById;
|
|
|
142
142
|
/**
|
|
143
143
|
* Updates an existing menu order
|
|
144
144
|
* @param {UpdateMenuOrderArgs} args - Object containing prisma client and menu order data
|
|
145
|
-
* @returns {Promise<
|
|
145
|
+
* @returns {Promise<MenuOrderTypeBE>} Updated menu order
|
|
146
146
|
*/
|
|
147
147
|
var updateMenuOrder = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
148
148
|
var menuOrderData, where, menuOrder;
|
|
@@ -177,7 +177,7 @@ exports.updateMenuOrder = updateMenuOrder;
|
|
|
177
177
|
/**
|
|
178
178
|
* Deletes a menu order by ID
|
|
179
179
|
* @param {DeleteMenuOrderArgs} args - Object containing prisma client and menu order id
|
|
180
|
-
* @returns {Promise<
|
|
180
|
+
* @returns {Promise<MenuOrderTypeBE>} Deleted menu order
|
|
181
181
|
* @throws {Error} If menu order ID is not provided or menu order not found
|
|
182
182
|
*/
|
|
183
183
|
var deleteMenuOrder = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PaymentTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListPaymentArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -41,25 +41,25 @@ export interface DeletePaymentArgs {
|
|
|
41
41
|
/**
|
|
42
42
|
* Retrieves a paginated list of payments
|
|
43
43
|
* @param {ListPaymentArgs} args - Object containing prisma client, pagination, filtering, and ordering options
|
|
44
|
-
* @returns {Promise<[number, Array<
|
|
44
|
+
* @returns {Promise<[number, Array<PaymentTypeBE>]>} Tuple containing total count and array of payments
|
|
45
45
|
*/
|
|
46
|
-
export declare const listPayment: ({ currentPage, includePaymentMode, includeQuoteInvoice, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListPaymentArgs) => Promise<[number, Array<
|
|
46
|
+
export declare const listPayment: ({ currentPage, includePaymentMode, includeQuoteInvoice, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListPaymentArgs) => Promise<[number, Array<PaymentTypeBE>]>;
|
|
47
47
|
/**
|
|
48
48
|
* Retrieves a single payment by its ID
|
|
49
49
|
* @param {UnitPaymentByIdArgs} args - Object containing prisma client, payment ID, and optional query parameters
|
|
50
|
-
* @returns {Promise<
|
|
50
|
+
* @returns {Promise<PaymentTypeBE | null>} Payment or null if not found
|
|
51
51
|
*/
|
|
52
|
-
export declare const unitPaymentById: ({ id, includePaymentMode, includeQuoteInvoice, prisma, }: UnitPaymentByIdArgs) => Promise<
|
|
52
|
+
export declare const unitPaymentById: ({ id, includePaymentMode, includeQuoteInvoice, prisma, }: UnitPaymentByIdArgs) => Promise<PaymentTypeBE | null>;
|
|
53
53
|
/**
|
|
54
54
|
* Updates a payment using upsert
|
|
55
55
|
* @param {UpdatePaymentArgs} args - Object containing prisma client and payment data
|
|
56
|
-
* @returns {Promise<
|
|
56
|
+
* @returns {Promise<PaymentTypeBE>} Updated payment
|
|
57
57
|
*/
|
|
58
|
-
export declare const updatePayment: ({ amount, attachment, balance, currency, date, description, id, paymentModeId, paymentType, prisma, quoteInvoiceId, ref, }: UpdatePaymentArgs) => Promise<
|
|
58
|
+
export declare const updatePayment: ({ amount, attachment, balance, currency, date, description, id, paymentModeId, paymentType, prisma, quoteInvoiceId, ref, }: UpdatePaymentArgs) => Promise<PaymentTypeBE>;
|
|
59
59
|
/**
|
|
60
60
|
* Deletes a payment by ID
|
|
61
61
|
* @param {DeletePaymentArgs} args - Object containing prisma client and payment ID
|
|
62
|
-
* @returns {Promise<
|
|
62
|
+
* @returns {Promise<PaymentTypeBE>} Deleted payment
|
|
63
63
|
*/
|
|
64
|
-
export declare const deletePayment: ({ id, prisma, }: DeletePaymentArgs) => Promise<
|
|
64
|
+
export declare const deletePayment: ({ id, prisma, }: DeletePaymentArgs) => Promise<PaymentTypeBE>;
|
|
65
65
|
export {};
|
|
@@ -62,7 +62,7 @@ var type_1 = require("../type");
|
|
|
62
62
|
/**
|
|
63
63
|
* Retrieves a paginated list of payments
|
|
64
64
|
* @param {ListPaymentArgs} args - Object containing prisma client, pagination, filtering, and ordering options
|
|
65
|
-
* @returns {Promise<[number, Array<
|
|
65
|
+
* @returns {Promise<[number, Array<PaymentTypeBE>]>} Tuple containing total count and array of payments
|
|
66
66
|
*/
|
|
67
67
|
var listPayment = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
68
68
|
var include, orderBy, idSearchQuery, descriptionSearchQuery, refSearchQuery, where, _c, count, items;
|
|
@@ -121,7 +121,7 @@ exports.listPayment = listPayment;
|
|
|
121
121
|
/**
|
|
122
122
|
* Retrieves a single payment by its ID
|
|
123
123
|
* @param {UnitPaymentByIdArgs} args - Object containing prisma client, payment ID, and optional query parameters
|
|
124
|
-
* @returns {Promise<
|
|
124
|
+
* @returns {Promise<PaymentTypeBE | null>} Payment or null if not found
|
|
125
125
|
*/
|
|
126
126
|
var unitPaymentById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
127
127
|
var include, where, payment;
|
|
@@ -151,7 +151,7 @@ exports.unitPaymentById = unitPaymentById;
|
|
|
151
151
|
/**
|
|
152
152
|
* Updates a payment using upsert
|
|
153
153
|
* @param {UpdatePaymentArgs} args - Object containing prisma client and payment data
|
|
154
|
-
* @returns {Promise<
|
|
154
|
+
* @returns {Promise<PaymentTypeBE>} Updated payment
|
|
155
155
|
*/
|
|
156
156
|
var updatePayment = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
157
157
|
var paymentData, where, payment;
|
|
@@ -206,7 +206,7 @@ exports.updatePayment = updatePayment;
|
|
|
206
206
|
/**
|
|
207
207
|
* Deletes a payment by ID
|
|
208
208
|
* @param {DeletePaymentArgs} args - Object containing prisma client and payment ID
|
|
209
|
-
* @returns {Promise<
|
|
209
|
+
* @returns {Promise<PaymentTypeBE>} Deleted payment
|
|
210
210
|
*/
|
|
211
211
|
var deletePayment = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
212
212
|
var where, payment;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PaymentModeTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListPaymentModeArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -29,25 +29,25 @@ export interface DeletePaymentModeArgs {
|
|
|
29
29
|
/**
|
|
30
30
|
* Retrieves a paginated list of payment modes
|
|
31
31
|
* @param {ListPaymentModeArgs} args - Object containing prisma client, pagination, filtering, and ordering options
|
|
32
|
-
* @returns {Promise<[number, Array<
|
|
32
|
+
* @returns {Promise<[number, Array<PaymentModeTypeBE>]>} Tuple containing total count and array of payment modes
|
|
33
33
|
*/
|
|
34
|
-
export declare const listPaymentMode: ({ currentPage, includePayments, includePreference, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListPaymentModeArgs) => Promise<[number, Array<
|
|
34
|
+
export declare const listPaymentMode: ({ currentPage, includePayments, includePreference, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListPaymentModeArgs) => Promise<[number, Array<PaymentModeTypeBE>]>;
|
|
35
35
|
/**
|
|
36
36
|
* Retrieves a single payment mode by its ID
|
|
37
37
|
* @param {UnitPaymentModeByIdArgs} args - Object containing prisma client, payment mode ID, and optional query parameters
|
|
38
|
-
* @returns {Promise<
|
|
38
|
+
* @returns {Promise<PaymentModeTypeBE | null>} Payment mode or null if not found
|
|
39
39
|
*/
|
|
40
|
-
export declare const unitPaymentModeById: ({ id, includePayments, includePreference, prisma, }: UnitPaymentModeByIdArgs) => Promise<
|
|
40
|
+
export declare const unitPaymentModeById: ({ id, includePayments, includePreference, prisma, }: UnitPaymentModeByIdArgs) => Promise<PaymentModeTypeBE | null>;
|
|
41
41
|
/**
|
|
42
42
|
* Updates a payment mode's enabled status
|
|
43
43
|
* @param {UpdatePaymentModeArgs} args - Object containing prisma client, payment mode ID, enabled status, and optional query parameters
|
|
44
|
-
* @returns {Promise<
|
|
44
|
+
* @returns {Promise<PaymentModeTypeBE>} Updated payment mode
|
|
45
45
|
*/
|
|
46
|
-
export declare const updatePaymentMode: ({ enabled, isDefault, id, prisma, }: UpdatePaymentModeArgs) => Promise<
|
|
46
|
+
export declare const updatePaymentMode: ({ enabled, isDefault, id, prisma, }: UpdatePaymentModeArgs) => Promise<PaymentModeTypeBE>;
|
|
47
47
|
/**
|
|
48
48
|
* Deletes a payment mode by ID
|
|
49
49
|
* @param {DeletePaymentModeArgs} args - Object containing prisma client, payment mode ID, and optional query parameters
|
|
50
|
-
* @returns {Promise<
|
|
50
|
+
* @returns {Promise<PaymentModeTypeBE>} Deleted payment mode
|
|
51
51
|
*/
|
|
52
|
-
export declare const deletePaymentMode: ({ id, prisma, }: DeletePaymentModeArgs) => Promise<
|
|
52
|
+
export declare const deletePaymentMode: ({ id, prisma, }: DeletePaymentModeArgs) => Promise<PaymentModeTypeBE>;
|
|
53
53
|
export {};
|
|
@@ -50,7 +50,7 @@ var multi_part_search_1 = require("../../../general/multi-part-search");
|
|
|
50
50
|
/**
|
|
51
51
|
* Retrieves a paginated list of payment modes
|
|
52
52
|
* @param {ListPaymentModeArgs} args - Object containing prisma client, pagination, filtering, and ordering options
|
|
53
|
-
* @returns {Promise<[number, Array<
|
|
53
|
+
* @returns {Promise<[number, Array<PaymentModeTypeBE>]>} Tuple containing total count and array of payment modes
|
|
54
54
|
*/
|
|
55
55
|
var listPaymentMode = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
56
56
|
var include, orderBy, idSearchQuery, labelSearchQuery, where, _c, count, items;
|
|
@@ -105,7 +105,7 @@ exports.listPaymentMode = listPaymentMode;
|
|
|
105
105
|
/**
|
|
106
106
|
* Retrieves a single payment mode by its ID
|
|
107
107
|
* @param {UnitPaymentModeByIdArgs} args - Object containing prisma client, payment mode ID, and optional query parameters
|
|
108
|
-
* @returns {Promise<
|
|
108
|
+
* @returns {Promise<PaymentModeTypeBE | null>} Payment mode or null if not found
|
|
109
109
|
*/
|
|
110
110
|
var unitPaymentModeById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
111
111
|
var include, where, paymentMode;
|
|
@@ -135,7 +135,7 @@ exports.unitPaymentModeById = unitPaymentModeById;
|
|
|
135
135
|
/**
|
|
136
136
|
* Updates a payment mode's enabled status
|
|
137
137
|
* @param {UpdatePaymentModeArgs} args - Object containing prisma client, payment mode ID, enabled status, and optional query parameters
|
|
138
|
-
* @returns {Promise<
|
|
138
|
+
* @returns {Promise<PaymentModeTypeBE>} Updated payment mode
|
|
139
139
|
*/
|
|
140
140
|
var updatePaymentMode = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
141
141
|
var where, paymentMode;
|
|
@@ -167,7 +167,7 @@ exports.updatePaymentMode = updatePaymentMode;
|
|
|
167
167
|
/**
|
|
168
168
|
* Deletes a payment mode by ID
|
|
169
169
|
* @param {DeletePaymentModeArgs} args - Object containing prisma client, payment mode ID, and optional query parameters
|
|
170
|
-
* @returns {Promise<
|
|
170
|
+
* @returns {Promise<PaymentModeTypeBE>} Deleted payment mode
|
|
171
171
|
*/
|
|
172
172
|
var deletePaymentMode = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
173
173
|
var where, paymentMode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PreferenceTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListPreferencesArgs {
|
|
4
4
|
orderByColumn?: string;
|
|
@@ -13,13 +13,13 @@ export interface PostPreferenceArgs {
|
|
|
13
13
|
/**
|
|
14
14
|
* Retrieves all preferences
|
|
15
15
|
* @param {ListPreferencesArgs} args - Object containing prisma client and ordering options
|
|
16
|
-
* @returns {Promise<Array<
|
|
16
|
+
* @returns {Promise<Array<PreferenceTypeBE>>} Array of preferences
|
|
17
17
|
*/
|
|
18
|
-
export declare const listPreference: ({ orderByColumn, orderByDirection, prisma, }: ListPreferencesArgs) => Promise<Array<
|
|
18
|
+
export declare const listPreference: ({ orderByColumn, orderByDirection, prisma, }: ListPreferencesArgs) => Promise<Array<PreferenceTypeBE>>;
|
|
19
19
|
/**
|
|
20
20
|
* Updates a preference using upsert
|
|
21
21
|
* @param {PostPreferenceArgs} args - Object containing prisma client, preference ID, and onboarding status
|
|
22
|
-
* @returns {Promise<
|
|
22
|
+
* @returns {Promise<PreferenceTypeBE>} Updated preference
|
|
23
23
|
*/
|
|
24
|
-
export declare const updatePreference: ({ id, onboarding, prisma, }: PostPreferenceArgs) => Promise<
|
|
24
|
+
export declare const updatePreference: ({ id, onboarding, prisma, }: PostPreferenceArgs) => Promise<PreferenceTypeBE>;
|
|
25
25
|
export {};
|
|
@@ -51,7 +51,7 @@ exports.updatePreference = exports.listPreference = void 0;
|
|
|
51
51
|
/**
|
|
52
52
|
* Retrieves all preferences
|
|
53
53
|
* @param {ListPreferencesArgs} args - Object containing prisma client and ordering options
|
|
54
|
-
* @returns {Promise<Array<
|
|
54
|
+
* @returns {Promise<Array<PreferenceTypeBE>>} Array of preferences
|
|
55
55
|
*/
|
|
56
56
|
var listPreference = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
57
57
|
var include, orderBy, where, _c, count, items;
|
|
@@ -80,7 +80,7 @@ exports.listPreference = listPreference;
|
|
|
80
80
|
/**
|
|
81
81
|
* Updates a preference using upsert
|
|
82
82
|
* @param {PostPreferenceArgs} args - Object containing prisma client, preference ID, and onboarding status
|
|
83
|
-
* @returns {Promise<
|
|
83
|
+
* @returns {Promise<PreferenceTypeBE>} Updated preference
|
|
84
84
|
*/
|
|
85
85
|
var updatePreference = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
86
86
|
var preferenceData, where, preference;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ProductTypeBE } from '../type';
|
|
2
|
+
/**
|
|
3
|
+
* Synchronous utility function to get products from cache only
|
|
4
|
+
* Returns cached data immediately if available and fresh, otherwise returns empty array
|
|
5
|
+
* Does not trigger any API calls
|
|
6
|
+
*
|
|
7
|
+
* @returns ProductTypeBE[] - Array of cached products or empty array wrapper ({count, items})
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const products = getCachedProductsSync();
|
|
11
|
+
* if (products.items.length > 0) {
|
|
12
|
+
* console.log(products.items[0].name);
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export declare const getCachedProductsSync: () => {
|
|
16
|
+
count: number;
|
|
17
|
+
items: ProductTypeBE[];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Utility function to get products from cache or fetch from API
|
|
21
|
+
*
|
|
22
|
+
* This function manages a localStorage cache of products with the following logic:
|
|
23
|
+
* - If products exist in cache and are less than 1 day old, return cached version
|
|
24
|
+
* - If products exist but are older than 1 day, fetch fresh data and update cache
|
|
25
|
+
* - If products don't exist in cache, fetch from API and cache them
|
|
26
|
+
*
|
|
27
|
+
* @param searchQuery - Optional search query to filter products
|
|
28
|
+
* @param filters - Optional filters object to apply additional filtering (bypasses cache)
|
|
29
|
+
* @param pageLimit - Number of products to fetch (default: 100)
|
|
30
|
+
* @returns Promise<{count:number, items: ProductTypeBE[]}> - Paged products
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* const products = await getCachedProducts();
|
|
34
|
+
* console.log(products.items[0].name);
|
|
35
|
+
*
|
|
36
|
+
* // With search
|
|
37
|
+
* const filtered = await getCachedProducts('Samsung');
|
|
38
|
+
*
|
|
39
|
+
* // With filters
|
|
40
|
+
* const filteredByCategory = await getCachedProducts(undefined, { productCategoryId: 'cat-123' });
|
|
41
|
+
*/
|
|
42
|
+
export declare const getCachedProducts: (searchQuery?: string, filters?: Record<string, unknown>, pageLimit?: number) => Promise<{
|
|
43
|
+
count: number;
|
|
44
|
+
items: ProductTypeBE[];
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Utility function to get a specific product by ID from cache
|
|
48
|
+
* If not found in cache, returns null (does not trigger API call)
|
|
49
|
+
*
|
|
50
|
+
* @param productId - The ID of the product to retrieve
|
|
51
|
+
* @returns ProductTypeBE | null - The product or null if not found
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* const product = getCachedProductById('prod-123');
|
|
55
|
+
* if (product) {
|
|
56
|
+
* console.log(product.name);
|
|
57
|
+
* }
|
|
58
|
+
*/
|
|
59
|
+
export declare const getCachedProductById: (categoryId: string) => ProductTypeBE | null;
|
|
60
|
+
/**
|
|
61
|
+
* Utility function to invalidate (remove) products from cache
|
|
62
|
+
* Useful when products have been updated and you want to force a refresh
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* invalidateProductsCache();
|
|
66
|
+
* const freshProducts = await getCachedProducts();
|
|
67
|
+
*/
|
|
68
|
+
export declare const invalidateProductsCache: () => void;
|
|
69
|
+
/**
|
|
70
|
+
* Utility function to preload products into cache
|
|
71
|
+
* Useful to call on app initialization or login
|
|
72
|
+
*
|
|
73
|
+
* @returns Promise<{count:number, items: ProductTypeBE[]}> - Array of preloaded products
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* // On app initialization
|
|
77
|
+
* await preloadProducts();
|
|
78
|
+
*/
|
|
79
|
+
export declare const preloadProducts: () => Promise<{
|
|
80
|
+
count: number;
|
|
81
|
+
items: ProductTypeBE[];
|
|
82
|
+
}>;
|
|
83
|
+
/**
|
|
84
|
+
* Utility function to check if products cache is stale
|
|
85
|
+
* Returns true if cache is older than 1 day or doesn't exist
|
|
86
|
+
*
|
|
87
|
+
* @returns boolean - True if cache is stale or doesn't exist
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* if (isProductsCacheStale()) {
|
|
91
|
+
* await getCachedProducts(); // This will fetch fresh data
|
|
92
|
+
* }
|
|
93
|
+
*/
|
|
94
|
+
export declare const isProductsCacheStale: () => boolean;
|