@react-pakistan/util-functions 1.24.66 → 1.24.68
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 +8 -31
- package/api/stellar-solutions/app-user/index.js +26 -24
- package/api/stellar-solutions/bank/index.d.ts +9 -32
- package/api/stellar-solutions/bank/index.js +19 -25
- package/api/stellar-solutions/branch/index.d.ts +9 -32
- package/api/stellar-solutions/branch/index.js +19 -25
- package/api/stellar-solutions/company/index.d.ts +9 -32
- package/api/stellar-solutions/company/index.js +29 -27
- package/api/stellar-solutions/company-report/index.d.ts +5 -12
- package/api/stellar-solutions/company-report/index.js +23 -16
- package/api/stellar-solutions/contact/index.d.ts +8 -31
- package/api/stellar-solutions/contact/index.js +19 -25
- package/api/stellar-solutions/currency/index.d.ts +8 -31
- package/api/stellar-solutions/currency/index.js +30 -27
- package/api/stellar-solutions/customer/index.d.ts +9 -35
- package/api/stellar-solutions/customer/index.js +31 -30
- package/api/stellar-solutions/expense/index.d.ts +11 -32
- package/api/stellar-solutions/expense/index.js +41 -50
- package/api/stellar-solutions/expense-category/index.d.ts +13 -34
- package/api/stellar-solutions/expense-category/index.js +64 -52
- package/api/stellar-solutions/lead/index.d.ts +35 -19
- package/api/stellar-solutions/lead/index.js +117 -82
- package/api/stellar-solutions/menu-order/index.d.ts +19 -15
- package/api/stellar-solutions/menu-order/index.js +43 -33
- package/api/stellar-solutions/payment/index.d.ts +30 -47
- package/api/stellar-solutions/payment/index.js +64 -65
- package/api/stellar-solutions/payment-mode/index.d.ts +6 -13
- package/api/stellar-solutions/payment-mode/index.js +28 -46
- package/api/stellar-solutions/preference/index.d.ts +11 -9
- package/api/stellar-solutions/preference/index.js +30 -37
- package/api/stellar-solutions/product/index.d.ts +15 -13
- package/api/stellar-solutions/product/index.js +53 -44
- package/api/stellar-solutions/product-category/index.d.ts +10 -13
- package/api/stellar-solutions/product-category/index.js +58 -49
- package/api/stellar-solutions/profile/index.d.ts +6 -5
- package/api/stellar-solutions/profile/index.js +17 -18
- package/api/stellar-solutions/quote-invoice/index.d.ts +41 -31
- package/api/stellar-solutions/quote-invoice/index.js +116 -124
- package/api/stellar-solutions/quote-invoice-report/index.d.ts +7 -14
- package/api/stellar-solutions/quote-invoice-report/index.js +27 -20
- package/api/stellar-solutions/tax/index.d.ts +11 -18
- package/api/stellar-solutions/tax/index.js +49 -40
- package/package.json +1 -1
|
@@ -54,12 +54,11 @@ exports.deleteProductCategory = exports.updateProductCategory = exports.unitProd
|
|
|
54
54
|
* @returns {Promise<[number, Array<ProductCategoryBE>]>} Tuple containing total count and array of product categories
|
|
55
55
|
*/
|
|
56
56
|
var listProductCategory = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
57
|
-
var skip, _c, count,
|
|
58
|
-
var _d
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
switch (_j.label) {
|
|
57
|
+
var include, orderBy, skip, where, _c, count, items;
|
|
58
|
+
var _d;
|
|
59
|
+
var _e = _b.currentPage, currentPage = _e === void 0 ? 1 : _e, _f = _b.includeProducts, includeProducts = _f === void 0 ? false : _f, _g = _b.orderByColumn, orderByColumn = _g === void 0 ? 'createdAt' : _g, _h = _b.orderByDirection, orderByDirection = _h === void 0 ? 'desc' : _h, _j = _b.pageLimit, pageLimit = _j === void 0 ? 10 : _j, prisma = _b.prisma;
|
|
60
|
+
return __generator(this, function (_k) {
|
|
61
|
+
switch (_k.label) {
|
|
63
62
|
case 0:
|
|
64
63
|
if (currentPage < 1) {
|
|
65
64
|
throw new Error('Current page must be greater than or equal to 1');
|
|
@@ -67,22 +66,29 @@ var listProductCategory = function (_a) { return __awaiter(void 0, [_a], void 0,
|
|
|
67
66
|
if (pageLimit < 1) {
|
|
68
67
|
throw new Error('Page limit must be greater than or equal to 1');
|
|
69
68
|
}
|
|
69
|
+
include = {
|
|
70
|
+
products: includeProducts,
|
|
71
|
+
};
|
|
72
|
+
orderBy = (_d = {},
|
|
73
|
+
_d[orderByColumn] = orderByDirection,
|
|
74
|
+
_d);
|
|
70
75
|
skip = (currentPage - 1) * pageLimit;
|
|
71
|
-
|
|
76
|
+
where = {};
|
|
77
|
+
return [4 /*yield*/, prisma.$transaction([
|
|
72
78
|
prisma.productCategory.count({
|
|
73
|
-
where:
|
|
79
|
+
where: where,
|
|
74
80
|
}),
|
|
75
81
|
prisma.productCategory.findMany({
|
|
76
|
-
include: include
|
|
82
|
+
include: include,
|
|
77
83
|
orderBy: orderBy,
|
|
78
84
|
skip: skip,
|
|
79
85
|
take: pageLimit,
|
|
80
|
-
where:
|
|
86
|
+
where: where,
|
|
81
87
|
}),
|
|
82
88
|
])];
|
|
83
89
|
case 1:
|
|
84
|
-
_c =
|
|
85
|
-
return [2 /*return*/, [count,
|
|
90
|
+
_c = _k.sent(), count = _c[0], items = _c[1];
|
|
91
|
+
return [2 /*return*/, [count, items]];
|
|
86
92
|
}
|
|
87
93
|
});
|
|
88
94
|
}); };
|
|
@@ -93,25 +99,26 @@ exports.listProductCategory = listProductCategory;
|
|
|
93
99
|
* @returns {Promise<ProductCategoryBE | null>} Product category or null if not found
|
|
94
100
|
*/
|
|
95
101
|
var unitProductCategoryById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
96
|
-
var productCategory;
|
|
97
|
-
var id = _b.id, _c = _b.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return __generator(this, function (_e) {
|
|
101
|
-
switch (_e.label) {
|
|
102
|
+
var include, where, productCategory;
|
|
103
|
+
var id = _b.id, _c = _b.includeProducts, includeProducts = _c === void 0 ? false : _c, prisma = _b.prisma;
|
|
104
|
+
return __generator(this, function (_d) {
|
|
105
|
+
switch (_d.label) {
|
|
102
106
|
case 0:
|
|
103
107
|
if (!id) {
|
|
104
108
|
throw new Error('Product category ID is required');
|
|
105
109
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
110
|
+
include = {
|
|
111
|
+
products: includeProducts,
|
|
112
|
+
};
|
|
113
|
+
where = {
|
|
114
|
+
id: id,
|
|
115
|
+
};
|
|
109
116
|
return [4 /*yield*/, prisma.productCategory.findUnique({
|
|
110
|
-
include: include
|
|
111
|
-
where:
|
|
117
|
+
include: include,
|
|
118
|
+
where: where,
|
|
112
119
|
})];
|
|
113
120
|
case 1:
|
|
114
|
-
productCategory =
|
|
121
|
+
productCategory = _d.sent();
|
|
115
122
|
return [2 /*return*/, productCategory];
|
|
116
123
|
}
|
|
117
124
|
});
|
|
@@ -123,12 +130,10 @@ exports.unitProductCategoryById = unitProductCategoryById;
|
|
|
123
130
|
* @returns {Promise<ProductCategoryBE>} Created or updated product category
|
|
124
131
|
*/
|
|
125
132
|
var updateProductCategory = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
126
|
-
var productCategoryData, productCategory;
|
|
127
|
-
var description = _b.description, id = _b.id, _c = _b.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
return __generator(this, function (_e) {
|
|
131
|
-
switch (_e.label) {
|
|
133
|
+
var productCategoryData, include, where, productCategory;
|
|
134
|
+
var description = _b.description, id = _b.id, _c = _b.includeProducts, includeProducts = _c === void 0 ? true : _c, name = _b.name, prisma = _b.prisma;
|
|
135
|
+
return __generator(this, function (_d) {
|
|
136
|
+
switch (_d.label) {
|
|
132
137
|
case 0:
|
|
133
138
|
if (!id) {
|
|
134
139
|
throw new Error('Product category ID is required');
|
|
@@ -136,21 +141,24 @@ var updateProductCategory = function (_a) { return __awaiter(void 0, [_a], void
|
|
|
136
141
|
if (!name) {
|
|
137
142
|
throw new Error('Product category name is required');
|
|
138
143
|
}
|
|
139
|
-
if ((queryWhere === null || queryWhere === void 0 ? void 0 : queryWhere.id) && queryWhere.id !== id) {
|
|
140
|
-
throw new Error('ID mismatch between parameter and queryWhere');
|
|
141
|
-
}
|
|
142
144
|
productCategoryData = {
|
|
143
145
|
description: description || null,
|
|
144
146
|
name: name,
|
|
145
147
|
};
|
|
148
|
+
include = {
|
|
149
|
+
products: includeProducts,
|
|
150
|
+
};
|
|
151
|
+
where = {
|
|
152
|
+
id: id,
|
|
153
|
+
};
|
|
146
154
|
return [4 /*yield*/, prisma.productCategory.upsert({
|
|
147
|
-
include: include || null,
|
|
148
|
-
where: __assign({ id: id }, queryWhere),
|
|
149
|
-
update: productCategoryData,
|
|
150
155
|
create: __assign({ id: id }, productCategoryData),
|
|
156
|
+
include: include,
|
|
157
|
+
update: productCategoryData,
|
|
158
|
+
where: where,
|
|
151
159
|
})];
|
|
152
160
|
case 1:
|
|
153
|
-
productCategory =
|
|
161
|
+
productCategory = _d.sent();
|
|
154
162
|
return [2 /*return*/, productCategory];
|
|
155
163
|
}
|
|
156
164
|
});
|
|
@@ -162,25 +170,26 @@ exports.updateProductCategory = updateProductCategory;
|
|
|
162
170
|
* @returns {Promise<ProductCategoryBE>} Deleted product category
|
|
163
171
|
*/
|
|
164
172
|
var deleteProductCategory = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
165
|
-
var productCategory;
|
|
166
|
-
var id = _b.id, _c = _b.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
return __generator(this, function (_e) {
|
|
170
|
-
switch (_e.label) {
|
|
173
|
+
var include, where, productCategory;
|
|
174
|
+
var id = _b.id, _c = _b.includeProducts, includeProducts = _c === void 0 ? true : _c, prisma = _b.prisma;
|
|
175
|
+
return __generator(this, function (_d) {
|
|
176
|
+
switch (_d.label) {
|
|
171
177
|
case 0:
|
|
172
178
|
if (!id) {
|
|
173
179
|
throw new Error('Product category ID is required');
|
|
174
180
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
181
|
+
include = {
|
|
182
|
+
products: includeProducts,
|
|
183
|
+
};
|
|
184
|
+
where = {
|
|
185
|
+
id: id,
|
|
186
|
+
};
|
|
178
187
|
return [4 /*yield*/, prisma.productCategory.delete({
|
|
179
|
-
include: include
|
|
180
|
-
where:
|
|
188
|
+
include: include,
|
|
189
|
+
where: where,
|
|
181
190
|
})];
|
|
182
191
|
case 1:
|
|
183
|
-
productCategory =
|
|
192
|
+
productCategory = _d.sent();
|
|
184
193
|
return [2 /*return*/, productCategory];
|
|
185
194
|
}
|
|
186
195
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ProfileBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
interface GetProfilesArgs {
|
|
4
|
+
orderByColumn?: string;
|
|
5
|
+
orderByDirection?: 'asc' | 'desc';
|
|
4
6
|
prisma: PrismaClient;
|
|
5
7
|
}
|
|
6
8
|
interface GetProfileByIdArgs {
|
|
@@ -13,11 +15,10 @@ interface GetProfileByUserIdArgs {
|
|
|
13
15
|
}
|
|
14
16
|
interface PostProfilesArgs {
|
|
15
17
|
currentPage: number;
|
|
18
|
+
orderByColumn?: string;
|
|
19
|
+
orderByDirection?: 'asc' | 'desc';
|
|
16
20
|
pageLimit: number;
|
|
17
21
|
prisma: PrismaClient;
|
|
18
|
-
queryWhere?: {
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
};
|
|
21
22
|
}
|
|
22
23
|
interface PostProfileArgs {
|
|
23
24
|
avatar?: string;
|
|
@@ -43,7 +44,7 @@ interface DeleteProfileArgs {
|
|
|
43
44
|
* @param {GetProfilesArgs} args - Object containing prisma client
|
|
44
45
|
* @returns {Promise<Array<ProfileBE>>} Array of profiles ordered by creation date (newest first)
|
|
45
46
|
*/
|
|
46
|
-
export declare const getProfiles: ({ prisma, }: GetProfilesArgs) => Promise<Array<ProfileBE>>;
|
|
47
|
+
export declare const getProfiles: ({ orderByColumn, orderByDirection, prisma, }: GetProfilesArgs) => Promise<Array<ProfileBE>>;
|
|
47
48
|
/**
|
|
48
49
|
* Retrieves a profile by its ID
|
|
49
50
|
* @param {GetProfileByIdArgs} args - Object containing prisma client and profile ID
|
|
@@ -61,7 +62,7 @@ export declare const getProfileByUserId: ({ prisma, userId, }: GetProfileByUserI
|
|
|
61
62
|
* @param {PostProfilesArgs} args - Object containing prisma client, pagination, and filtering options
|
|
62
63
|
* @returns {Promise<[number, Array<ProfileBE>]>} Tuple of [total count, profiles array]
|
|
63
64
|
*/
|
|
64
|
-
export declare const postProfiles: ({ currentPage, pageLimit, prisma,
|
|
65
|
+
export declare const postProfiles: ({ currentPage, orderByColumn, orderByDirection, pageLimit, prisma, }: PostProfilesArgs) => Promise<[number, Array<ProfileBE>]>;
|
|
65
66
|
/**
|
|
66
67
|
* Creates a new profile or updates an existing one
|
|
67
68
|
* @param {PostProfileArgs} args - Object containing prisma client and profile data
|
|
@@ -55,16 +55,17 @@ exports.deleteProfile = exports.postProfile = exports.postProfiles = exports.get
|
|
|
55
55
|
*/
|
|
56
56
|
var getProfiles = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
57
57
|
var profiles;
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
var _c;
|
|
59
|
+
var _d = _b.orderByColumn, orderByColumn = _d === void 0 ? 'createdAt' : _d, _e = _b.orderByDirection, orderByDirection = _e === void 0 ? 'desc' : _e, prisma = _b.prisma;
|
|
60
|
+
return __generator(this, function (_f) {
|
|
61
|
+
switch (_f.label) {
|
|
61
62
|
case 0: return [4 /*yield*/, prisma.profile.findMany({
|
|
62
|
-
orderBy: {
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
orderBy: (_c = {},
|
|
64
|
+
_c[orderByColumn] = orderByDirection,
|
|
65
|
+
_c),
|
|
65
66
|
})];
|
|
66
67
|
case 1:
|
|
67
|
-
profiles =
|
|
68
|
+
profiles = _f.sent();
|
|
68
69
|
return [2 /*return*/, profiles];
|
|
69
70
|
}
|
|
70
71
|
});
|
|
@@ -129,9 +130,10 @@ exports.getProfileByUserId = getProfileByUserId;
|
|
|
129
130
|
*/
|
|
130
131
|
var postProfiles = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
131
132
|
var profiles;
|
|
132
|
-
var _c
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
var _c;
|
|
134
|
+
var _d = _b.currentPage, currentPage = _d === void 0 ? 1 : _d, _e = _b.orderByColumn, orderByColumn = _e === void 0 ? 'createdAt' : _e, _f = _b.orderByDirection, orderByDirection = _f === void 0 ? 'desc' : _f, _g = _b.pageLimit, pageLimit = _g === void 0 ? 10 : _g, prisma = _b.prisma;
|
|
135
|
+
return __generator(this, function (_h) {
|
|
136
|
+
switch (_h.label) {
|
|
135
137
|
case 0:
|
|
136
138
|
if (currentPage < 1) {
|
|
137
139
|
throw new Error('Current page must be greater than 0');
|
|
@@ -140,20 +142,17 @@ var postProfiles = function (_a) { return __awaiter(void 0, [_a], void 0, functi
|
|
|
140
142
|
throw new Error('Page limit must be greater than 0');
|
|
141
143
|
}
|
|
142
144
|
return [4 /*yield*/, prisma.$transaction([
|
|
143
|
-
prisma.profile.count(
|
|
144
|
-
where: queryWhere,
|
|
145
|
-
}),
|
|
145
|
+
prisma.profile.count(),
|
|
146
146
|
prisma.profile.findMany({
|
|
147
|
-
orderBy: {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
where: queryWhere,
|
|
147
|
+
orderBy: (_c = {},
|
|
148
|
+
_c[orderByColumn] = orderByDirection,
|
|
149
|
+
_c),
|
|
151
150
|
take: pageLimit,
|
|
152
151
|
skip: (currentPage - 1) * pageLimit,
|
|
153
152
|
}),
|
|
154
153
|
])];
|
|
155
154
|
case 1:
|
|
156
|
-
profiles =
|
|
155
|
+
profiles = _h.sent();
|
|
157
156
|
return [2 /*return*/, profiles];
|
|
158
157
|
}
|
|
159
158
|
});
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
import { QuoteInvoiceBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
|
-
interface
|
|
3
|
+
interface ListQuoteInvoiceArgs {
|
|
4
|
+
currentPage?: number;
|
|
5
|
+
includeCompany?: boolean;
|
|
6
|
+
includeCustomer?: boolean;
|
|
7
|
+
includePayments?: boolean;
|
|
8
|
+
includeProducts?: boolean;
|
|
9
|
+
includeServices?: boolean;
|
|
10
|
+
orderByColumn?: string;
|
|
11
|
+
orderByDirection?: 'asc' | 'desc';
|
|
12
|
+
pageLimit?: number;
|
|
4
13
|
prisma: PrismaClient;
|
|
5
14
|
}
|
|
6
|
-
interface
|
|
15
|
+
interface UnitQuoteInvoiceByIdArgs {
|
|
7
16
|
id: string;
|
|
17
|
+
includeCompany?: boolean;
|
|
18
|
+
includeCustomer?: boolean;
|
|
19
|
+
includePayments?: boolean;
|
|
20
|
+
includeProducts?: boolean;
|
|
21
|
+
includeServices?: boolean;
|
|
8
22
|
prisma: PrismaClient;
|
|
9
23
|
}
|
|
10
|
-
interface
|
|
11
|
-
currentPage: number;
|
|
12
|
-
pageLimit: number;
|
|
13
|
-
prisma: PrismaClient;
|
|
14
|
-
queryWhere?: {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
interface PostQuoteInvoiceArgs {
|
|
24
|
+
interface UpdateQuoteInvoiceArgs {
|
|
19
25
|
address?: string;
|
|
20
26
|
category: string;
|
|
21
27
|
city?: string;
|
|
@@ -30,6 +36,11 @@ interface PostQuoteInvoiceArgs {
|
|
|
30
36
|
expiryDate: string;
|
|
31
37
|
firstName?: string;
|
|
32
38
|
id?: string;
|
|
39
|
+
includeCompany?: boolean;
|
|
40
|
+
includeCustomer?: boolean;
|
|
41
|
+
includePayments?: boolean;
|
|
42
|
+
includeProducts?: boolean;
|
|
43
|
+
includeServices?: boolean;
|
|
33
44
|
invoiceStatus: string;
|
|
34
45
|
lastName?: string;
|
|
35
46
|
mode: 'Create' | 'Edit';
|
|
@@ -48,38 +59,37 @@ interface PostQuoteInvoiceArgs {
|
|
|
48
59
|
total: string;
|
|
49
60
|
}
|
|
50
61
|
interface DeleteQuoteInvoiceArgs {
|
|
51
|
-
prisma: PrismaClient;
|
|
52
62
|
id: string;
|
|
63
|
+
includeCompany?: boolean;
|
|
64
|
+
includeCustomer?: boolean;
|
|
65
|
+
includePayments?: boolean;
|
|
66
|
+
includeProducts?: boolean;
|
|
67
|
+
includeServices?: boolean;
|
|
68
|
+
prisma: PrismaClient;
|
|
53
69
|
}
|
|
54
70
|
/**
|
|
55
|
-
* Retrieves
|
|
56
|
-
* @param {
|
|
57
|
-
* @returns {Promise<Array<QuoteInvoiceBE
|
|
58
|
-
*/
|
|
59
|
-
export declare const getQuotesInvoices: ({ prisma, }: GetQuotesInvoicesArgs) => Promise<Array<QuoteInvoiceBE>>;
|
|
60
|
-
/**
|
|
61
|
-
* Retrieves a quote/invoice by its ID with related data
|
|
62
|
-
* @param {GetQuoteInvoiceByIdArgs} args - Object containing prisma client and quote/invoice ID
|
|
63
|
-
* @returns {Promise<QuoteInvoiceBE | null>} Quote/invoice with related entities or null if not found
|
|
71
|
+
* Retrieves a paginated list of quotes/invoices
|
|
72
|
+
* @param {ListQuoteInvoiceArgs} args - Object containing prisma client, pagination, filtering, and ordering options
|
|
73
|
+
* @returns {Promise<[number, Array<QuoteInvoiceBE>]>} Tuple containing total count and array of quotes/invoices
|
|
64
74
|
*/
|
|
65
|
-
export declare const
|
|
75
|
+
export declare const listQuoteInvoice: ({ currentPage, includeCompany, includeCustomer, includePayments, includeProducts, includeServices, orderByColumn, orderByDirection, pageLimit, prisma, }: ListQuoteInvoiceArgs) => Promise<[number, Array<QuoteInvoiceBE>]>;
|
|
66
76
|
/**
|
|
67
|
-
* Retrieves
|
|
68
|
-
* @param {
|
|
69
|
-
* @returns {Promise<
|
|
77
|
+
* Retrieves a single quote/invoice by its ID
|
|
78
|
+
* @param {UnitQuoteInvoiceByIdArgs} args - Object containing prisma client, quote/invoice ID, and optional query parameters
|
|
79
|
+
* @returns {Promise<QuoteInvoiceBE | null>} Quote/invoice or null if not found
|
|
70
80
|
*/
|
|
71
|
-
export declare const
|
|
81
|
+
export declare const unitQuoteInvoiceById: ({ id, includeCompany, includeCustomer, includePayments, includeProducts, includeServices, prisma, }: UnitQuoteInvoiceByIdArgs) => Promise<QuoteInvoiceBE | null>;
|
|
72
82
|
/**
|
|
73
|
-
* Creates a
|
|
83
|
+
* Creates or updates a quote/invoice
|
|
74
84
|
* Handles complex business logic including customer/company associations and service management
|
|
75
|
-
* @param {
|
|
85
|
+
* @param {UpdateQuoteInvoiceArgs} args - Object containing prisma client, quote/invoice data, and optional query parameters
|
|
76
86
|
* @returns {Promise<QuoteInvoiceBE>} Created or updated quote/invoice
|
|
77
87
|
*/
|
|
78
|
-
export declare const
|
|
88
|
+
export declare const updateQuoteInvoice: ({ address, category, city, companyId, country, currency, customerId, date, discount, discountUnit, email, expiryDate, firstName, id, includeCompany, includeCustomer, includePayments, includeProducts, includeServices, invoiceStatus, lastName, mode, note, phone, prisma, products, quoteStatus, ref, services, subTotal, taxRate, total, }: UpdateQuoteInvoiceArgs) => Promise<QuoteInvoiceBE>;
|
|
79
89
|
/**
|
|
80
90
|
* Deletes a quote/invoice by ID
|
|
81
|
-
* @param {DeleteQuoteInvoiceArgs} args - Object containing prisma client
|
|
91
|
+
* @param {DeleteQuoteInvoiceArgs} args - Object containing prisma client, quote/invoice ID, and optional query parameters
|
|
82
92
|
* @returns {Promise<QuoteInvoiceBE>} Deleted quote/invoice
|
|
83
93
|
*/
|
|
84
|
-
export declare const deleteQuoteInvoice: ({
|
|
94
|
+
export declare const deleteQuoteInvoice: ({ id, includeCompany, includeCustomer, includePayments, includeProducts, includeServices, prisma, }: DeleteQuoteInvoiceArgs) => Promise<QuoteInvoiceBE>;
|
|
85
95
|
export {};
|