@react-pakistan/util-functions 1.25.0 → 1.25.1
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.
|
@@ -25,7 +25,7 @@ export interface UpdateProductArgs {
|
|
|
25
25
|
currency: string;
|
|
26
26
|
description?: string;
|
|
27
27
|
id: string;
|
|
28
|
-
|
|
28
|
+
images?: string[];
|
|
29
29
|
include?: any;
|
|
30
30
|
name: string;
|
|
31
31
|
prisma: PrismaClient;
|
|
@@ -55,7 +55,7 @@ export declare const unitProductById: ({ id, includeProductCategory, includeQuot
|
|
|
55
55
|
* @param {UpdateProductArgs} args - Object containing prisma client, product data, and optional query parameters
|
|
56
56
|
* @returns {Promise<ProductBE>} Created or updated product
|
|
57
57
|
*/
|
|
58
|
-
export declare const updateProduct: ({ buyPrice, currency, description, id,
|
|
58
|
+
export declare const updateProduct: ({ buyPrice, currency, description, id, images, name, prisma, productCategoryId, quantity, ref, salePrice, }: UpdateProductArgs) => Promise<ProductBE>;
|
|
59
59
|
/**
|
|
60
60
|
* Deletes a product by ID
|
|
61
61
|
* @param {DeleteProductArgs} args - Object containing prisma client, product ID, and optional query parameters
|
|
@@ -180,7 +180,7 @@ exports.unitProductById = unitProductById;
|
|
|
180
180
|
*/
|
|
181
181
|
var updateProduct = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
182
182
|
var productData, where, product;
|
|
183
|
-
var buyPrice = _b.buyPrice, currency = _b.currency, description = _b.description, id = _b.id,
|
|
183
|
+
var buyPrice = _b.buyPrice, currency = _b.currency, description = _b.description, id = _b.id, images = _b.images, name = _b.name, prisma = _b.prisma, productCategoryId = _b.productCategoryId, quantity = _b.quantity, ref = _b.ref, salePrice = _b.salePrice;
|
|
184
184
|
return __generator(this, function (_c) {
|
|
185
185
|
switch (_c.label) {
|
|
186
186
|
case 0:
|
|
@@ -199,7 +199,7 @@ var updateProduct = function (_a) { return __awaiter(void 0, [_a], void 0, funct
|
|
|
199
199
|
buyPrice: buyPrice,
|
|
200
200
|
currency: currency,
|
|
201
201
|
description: description || null,
|
|
202
|
-
|
|
202
|
+
images: images || null,
|
|
203
203
|
name: name,
|
|
204
204
|
productCategoryId: productCategoryId,
|
|
205
205
|
quantity: quantity,
|