@jsdev_ninja/core 0.10.6 → 0.10.8
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/dist/core.cjs.js +1 -1
- package/dist/core.cjs.js.map +1 -1
- package/dist/core.es.js +2 -1
- package/dist/core.es.js.map +1 -1
- package/dist/core.umd.js +1 -1
- package/dist/core.umd.js.map +1 -1
- package/dist/entities/Cart.d.ts +7 -0
- package/dist/entities/Cart.d.ts.map +1 -1
- package/dist/entities/Order.d.ts +12 -3
- package/dist/entities/Order.d.ts.map +1 -1
- package/dist/entities/Order.js +1 -1
- package/dist/entities/Product.d.ts +6 -0
- package/dist/entities/Product.d.ts.map +1 -1
- package/dist/entities/Product.js +1 -0
- package/lib/entities/Order.ts +1 -1
- package/lib/entities/Product.ts +1 -0
- package/package.json +1 -1
package/dist/entities/Cart.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ export declare const CartSchema: z.ZodObject<{
|
|
|
60
60
|
value: number;
|
|
61
61
|
type: "number" | "percent" | "none";
|
|
62
62
|
}>;
|
|
63
|
+
isDiscountable: z.ZodOptional<z.ZodBoolean>;
|
|
63
64
|
weight: z.ZodObject<{
|
|
64
65
|
value: z.ZodNumber;
|
|
65
66
|
unit: z.ZodEnum<["kg", "gram", "none"]>;
|
|
@@ -261,6 +262,7 @@ export declare const CartSchema: z.ZodObject<{
|
|
|
261
262
|
categoryNames: string[];
|
|
262
263
|
purchasePrice?: number | undefined;
|
|
263
264
|
profitPercentage?: number | undefined;
|
|
265
|
+
isDiscountable?: boolean | undefined;
|
|
264
266
|
}, {
|
|
265
267
|
type: "Product";
|
|
266
268
|
id: string;
|
|
@@ -346,6 +348,7 @@ export declare const CartSchema: z.ZodObject<{
|
|
|
346
348
|
categoryNames: string[];
|
|
347
349
|
purchasePrice?: number | undefined;
|
|
348
350
|
profitPercentage?: number | undefined;
|
|
351
|
+
isDiscountable?: boolean | undefined;
|
|
349
352
|
}>;
|
|
350
353
|
amount: z.ZodNumber;
|
|
351
354
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -434,6 +437,7 @@ export declare const CartSchema: z.ZodObject<{
|
|
|
434
437
|
categoryNames: string[];
|
|
435
438
|
purchasePrice?: number | undefined;
|
|
436
439
|
profitPercentage?: number | undefined;
|
|
440
|
+
isDiscountable?: boolean | undefined;
|
|
437
441
|
};
|
|
438
442
|
amount: number;
|
|
439
443
|
}, {
|
|
@@ -522,6 +526,7 @@ export declare const CartSchema: z.ZodObject<{
|
|
|
522
526
|
categoryNames: string[];
|
|
523
527
|
purchasePrice?: number | undefined;
|
|
524
528
|
profitPercentage?: number | undefined;
|
|
529
|
+
isDiscountable?: boolean | undefined;
|
|
525
530
|
};
|
|
526
531
|
amount: number;
|
|
527
532
|
}>, "many">;
|
|
@@ -618,6 +623,7 @@ export declare const CartSchema: z.ZodObject<{
|
|
|
618
623
|
categoryNames: string[];
|
|
619
624
|
purchasePrice?: number | undefined;
|
|
620
625
|
profitPercentage?: number | undefined;
|
|
626
|
+
isDiscountable?: boolean | undefined;
|
|
621
627
|
};
|
|
622
628
|
amount: number;
|
|
623
629
|
}[];
|
|
@@ -714,6 +720,7 @@ export declare const CartSchema: z.ZodObject<{
|
|
|
714
720
|
categoryNames: string[];
|
|
715
721
|
purchasePrice?: number | undefined;
|
|
716
722
|
profitPercentage?: number | undefined;
|
|
723
|
+
isDiscountable?: boolean | undefined;
|
|
717
724
|
};
|
|
718
725
|
amount: number;
|
|
719
726
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cart.d.ts","sourceRoot":"","sources":["../../lib/entities/Cart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"Cart.d.ts","sourceRoot":"","sources":["../../lib/entities/Cart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAarB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
package/dist/entities/Order.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
5
5
|
companyId: z.ZodString;
|
|
6
6
|
storeId: z.ZodString;
|
|
7
7
|
userId: z.ZodString;
|
|
8
|
-
status: z.ZodEnum<["draft", "pending", "processing", "in_delivery", "delivered", "
|
|
8
|
+
status: z.ZodEnum<["draft", "pending", "processing", "in_delivery", "delivered", "cancelled", "completed", "refunded"]>;
|
|
9
9
|
paymentStatus: z.ZodEnum<["pending", "pending_j5", "completed", "failed", "refunded"]>;
|
|
10
10
|
cart: z.ZodObject<{
|
|
11
11
|
id: z.ZodString;
|
|
@@ -63,6 +63,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
63
63
|
value: number;
|
|
64
64
|
type: "number" | "percent" | "none";
|
|
65
65
|
}>;
|
|
66
|
+
isDiscountable: z.ZodOptional<z.ZodBoolean>;
|
|
66
67
|
weight: z.ZodObject<{
|
|
67
68
|
value: z.ZodNumber;
|
|
68
69
|
unit: z.ZodEnum<["kg", "gram", "none"]>;
|
|
@@ -264,6 +265,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
264
265
|
categoryNames: string[];
|
|
265
266
|
purchasePrice?: number | undefined;
|
|
266
267
|
profitPercentage?: number | undefined;
|
|
268
|
+
isDiscountable?: boolean | undefined;
|
|
267
269
|
}, {
|
|
268
270
|
type: "Product";
|
|
269
271
|
id: string;
|
|
@@ -349,6 +351,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
349
351
|
categoryNames: string[];
|
|
350
352
|
purchasePrice?: number | undefined;
|
|
351
353
|
profitPercentage?: number | undefined;
|
|
354
|
+
isDiscountable?: boolean | undefined;
|
|
352
355
|
}>;
|
|
353
356
|
amount: z.ZodNumber;
|
|
354
357
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -437,6 +440,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
437
440
|
categoryNames: string[];
|
|
438
441
|
purchasePrice?: number | undefined;
|
|
439
442
|
profitPercentage?: number | undefined;
|
|
443
|
+
isDiscountable?: boolean | undefined;
|
|
440
444
|
};
|
|
441
445
|
amount: number;
|
|
442
446
|
}, {
|
|
@@ -525,6 +529,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
525
529
|
categoryNames: string[];
|
|
526
530
|
purchasePrice?: number | undefined;
|
|
527
531
|
profitPercentage?: number | undefined;
|
|
532
|
+
isDiscountable?: boolean | undefined;
|
|
528
533
|
};
|
|
529
534
|
amount: number;
|
|
530
535
|
}>, "many">;
|
|
@@ -619,6 +624,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
619
624
|
categoryNames: string[];
|
|
620
625
|
purchasePrice?: number | undefined;
|
|
621
626
|
profitPercentage?: number | undefined;
|
|
627
|
+
isDiscountable?: boolean | undefined;
|
|
622
628
|
};
|
|
623
629
|
amount: number;
|
|
624
630
|
}[];
|
|
@@ -713,6 +719,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
713
719
|
categoryNames: string[];
|
|
714
720
|
purchasePrice?: number | undefined;
|
|
715
721
|
profitPercentage?: number | undefined;
|
|
722
|
+
isDiscountable?: boolean | undefined;
|
|
716
723
|
};
|
|
717
724
|
amount: number;
|
|
718
725
|
}[];
|
|
@@ -813,7 +820,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
813
820
|
}>;
|
|
814
821
|
}, "strip", z.ZodTypeAny, {
|
|
815
822
|
type: "Order";
|
|
816
|
-
status: "draft" | "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "
|
|
823
|
+
status: "draft" | "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "cancelled" | "refunded";
|
|
817
824
|
date: number;
|
|
818
825
|
id: string;
|
|
819
826
|
companyId: string;
|
|
@@ -908,6 +915,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
908
915
|
categoryNames: string[];
|
|
909
916
|
purchasePrice?: number | undefined;
|
|
910
917
|
profitPercentage?: number | undefined;
|
|
918
|
+
isDiscountable?: boolean | undefined;
|
|
911
919
|
};
|
|
912
920
|
amount: number;
|
|
913
921
|
}[];
|
|
@@ -945,7 +953,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
945
953
|
createdAt?: number | undefined;
|
|
946
954
|
}, {
|
|
947
955
|
type: "Order";
|
|
948
|
-
status: "draft" | "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "
|
|
956
|
+
status: "draft" | "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "cancelled" | "refunded";
|
|
949
957
|
date: number;
|
|
950
958
|
id: string;
|
|
951
959
|
companyId: string;
|
|
@@ -1040,6 +1048,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
1040
1048
|
categoryNames: string[];
|
|
1041
1049
|
purchasePrice?: number | undefined;
|
|
1042
1050
|
profitPercentage?: number | undefined;
|
|
1051
|
+
isDiscountable?: boolean | undefined;
|
|
1043
1052
|
};
|
|
1044
1053
|
amount: number;
|
|
1045
1054
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../lib/entities/Order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../lib/entities/Order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BtB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/entities/Order.js
CHANGED
|
@@ -52,6 +52,7 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
52
52
|
value: number;
|
|
53
53
|
type: "number" | "percent" | "none";
|
|
54
54
|
}>;
|
|
55
|
+
isDiscountable: z.ZodOptional<z.ZodBoolean>;
|
|
55
56
|
weight: z.ZodObject<{
|
|
56
57
|
value: z.ZodNumber;
|
|
57
58
|
unit: z.ZodEnum<["kg", "gram", "none"]>;
|
|
@@ -253,6 +254,7 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
253
254
|
categoryNames: string[];
|
|
254
255
|
purchasePrice?: number | undefined;
|
|
255
256
|
profitPercentage?: number | undefined;
|
|
257
|
+
isDiscountable?: boolean | undefined;
|
|
256
258
|
}, {
|
|
257
259
|
type: "Product";
|
|
258
260
|
id: string;
|
|
@@ -338,6 +340,7 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
338
340
|
categoryNames: string[];
|
|
339
341
|
purchasePrice?: number | undefined;
|
|
340
342
|
profitPercentage?: number | undefined;
|
|
343
|
+
isDiscountable?: boolean | undefined;
|
|
341
344
|
}>;
|
|
342
345
|
export type TProduct = z.infer<typeof ProductSchema>;
|
|
343
346
|
export declare const NewProductSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
@@ -393,6 +396,7 @@ export declare const NewProductSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
393
396
|
value: number;
|
|
394
397
|
type: "number" | "percent" | "none";
|
|
395
398
|
}>;
|
|
399
|
+
isDiscountable: z.ZodOptional<z.ZodBoolean>;
|
|
396
400
|
weight: z.ZodObject<{
|
|
397
401
|
value: z.ZodNumber;
|
|
398
402
|
unit: z.ZodEnum<["kg", "gram", "none"]>;
|
|
@@ -596,6 +600,7 @@ export declare const NewProductSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
596
600
|
categoryNames: string[];
|
|
597
601
|
purchasePrice?: number | undefined;
|
|
598
602
|
profitPercentage?: number | undefined;
|
|
603
|
+
isDiscountable?: boolean | undefined;
|
|
599
604
|
image?: File | undefined;
|
|
600
605
|
}, {
|
|
601
606
|
type: "Product";
|
|
@@ -682,6 +687,7 @@ export declare const NewProductSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
682
687
|
categoryNames: string[];
|
|
683
688
|
purchasePrice?: number | undefined;
|
|
684
689
|
profitPercentage?: number | undefined;
|
|
690
|
+
isDiscountable?: boolean | undefined;
|
|
685
691
|
image?: File | undefined;
|
|
686
692
|
}>;
|
|
687
693
|
export type TNewProduct = z.infer<typeof NewProductSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Product.d.ts","sourceRoot":"","sources":["../../lib/entities/Product.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"Product.d.ts","sourceRoot":"","sources":["../../lib/entities/Product.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDxB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE3B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
package/dist/entities/Product.js
CHANGED
|
@@ -25,6 +25,7 @@ export const ProductSchema = z.object({
|
|
|
25
25
|
type: z.enum(["number", "percent", "none"]),
|
|
26
26
|
value: z.number(),
|
|
27
27
|
}),
|
|
28
|
+
isDiscountable: z.boolean({ description: "included in store discounts" }).optional(),
|
|
28
29
|
weight: z.object({
|
|
29
30
|
value: z.number(),
|
|
30
31
|
unit: z.enum(["kg", "gram", "none"]),
|
package/lib/entities/Order.ts
CHANGED
package/lib/entities/Product.ts
CHANGED
|
@@ -27,6 +27,7 @@ export const ProductSchema = z.object({
|
|
|
27
27
|
type: z.enum(["number", "percent", "none"]),
|
|
28
28
|
value: z.number(),
|
|
29
29
|
}),
|
|
30
|
+
isDiscountable: z.boolean({ description: "included in store discounts" }).optional(),
|
|
30
31
|
weight: z.object({
|
|
31
32
|
value: z.number(),
|
|
32
33
|
unit: z.enum(["kg", "gram", "none"]),
|