@jsdev_ninja/core 0.11.1 → 0.11.3
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 +974 -877
- 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 +1 -2
- package/dist/entities/Cart.d.ts.map +1 -1
- package/dist/entities/Cart.js +1 -1
- package/dist/entities/Order.d.ts +21 -0
- package/dist/entities/Order.d.ts.map +1 -1
- package/dist/entities/Order.js +2 -2
- package/dist/entities/Store.d.ts +3 -0
- package/dist/entities/Store.d.ts.map +1 -1
- package/dist/entities/Store.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/lib/entities/Store.ts +2 -0
- package/lib/index.tsx +1 -0
- package/package.json +1 -1
package/dist/entities/Cart.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
declare const CartItemProductSchema: z.ZodObject<{
|
|
2
|
+
export declare const CartItemProductSchema: z.ZodObject<{
|
|
3
3
|
product: z.ZodObject<{
|
|
4
4
|
type: z.ZodLiteral<"Product">;
|
|
5
5
|
storeId: z.ZodString;
|
|
@@ -1275,5 +1275,4 @@ export declare const CartSchema: z.ZodObject<{
|
|
|
1275
1275
|
}[];
|
|
1276
1276
|
}>;
|
|
1277
1277
|
export type TCart = z.infer<typeof CartSchema>;
|
|
1278
|
-
export {};
|
|
1279
1278
|
//# sourceMappingURL=Cart.d.ts.map
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQrB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
package/dist/entities/Cart.js
CHANGED
package/dist/entities/Order.d.ts
CHANGED
|
@@ -353,6 +353,9 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
353
353
|
profitPercentage?: number | undefined;
|
|
354
354
|
isDiscountable?: boolean | undefined;
|
|
355
355
|
}>;
|
|
356
|
+
originalPrice: z.ZodOptional<z.ZodNumber>;
|
|
357
|
+
finalPrice: z.ZodOptional<z.ZodNumber>;
|
|
358
|
+
finalDiscount: z.ZodOptional<z.ZodNumber>;
|
|
356
359
|
amount: z.ZodNumber;
|
|
357
360
|
}, "strip", z.ZodTypeAny, {
|
|
358
361
|
product: {
|
|
@@ -443,6 +446,9 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
443
446
|
isDiscountable?: boolean | undefined;
|
|
444
447
|
};
|
|
445
448
|
amount: number;
|
|
449
|
+
originalPrice?: number | undefined;
|
|
450
|
+
finalPrice?: number | undefined;
|
|
451
|
+
finalDiscount?: number | undefined;
|
|
446
452
|
}, {
|
|
447
453
|
product: {
|
|
448
454
|
type: "Product";
|
|
@@ -532,6 +538,9 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
532
538
|
isDiscountable?: boolean | undefined;
|
|
533
539
|
};
|
|
534
540
|
amount: number;
|
|
541
|
+
originalPrice?: number | undefined;
|
|
542
|
+
finalPrice?: number | undefined;
|
|
543
|
+
finalDiscount?: number | undefined;
|
|
535
544
|
}>, "many">;
|
|
536
545
|
cartDiscount: z.ZodNumber;
|
|
537
546
|
cartTotal: z.ZodNumber;
|
|
@@ -627,6 +636,9 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
627
636
|
isDiscountable?: boolean | undefined;
|
|
628
637
|
};
|
|
629
638
|
amount: number;
|
|
639
|
+
originalPrice?: number | undefined;
|
|
640
|
+
finalPrice?: number | undefined;
|
|
641
|
+
finalDiscount?: number | undefined;
|
|
630
642
|
}[];
|
|
631
643
|
cartDiscount: number;
|
|
632
644
|
cartTotal: number;
|
|
@@ -722,6 +734,9 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
722
734
|
isDiscountable?: boolean | undefined;
|
|
723
735
|
};
|
|
724
736
|
amount: number;
|
|
737
|
+
originalPrice?: number | undefined;
|
|
738
|
+
finalPrice?: number | undefined;
|
|
739
|
+
finalDiscount?: number | undefined;
|
|
725
740
|
}[];
|
|
726
741
|
cartDiscount: number;
|
|
727
742
|
cartTotal: number;
|
|
@@ -918,6 +933,9 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
918
933
|
isDiscountable?: boolean | undefined;
|
|
919
934
|
};
|
|
920
935
|
amount: number;
|
|
936
|
+
originalPrice?: number | undefined;
|
|
937
|
+
finalPrice?: number | undefined;
|
|
938
|
+
finalDiscount?: number | undefined;
|
|
921
939
|
}[];
|
|
922
940
|
cartDiscount: number;
|
|
923
941
|
cartTotal: number;
|
|
@@ -1051,6 +1069,9 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
1051
1069
|
isDiscountable?: boolean | undefined;
|
|
1052
1070
|
};
|
|
1053
1071
|
amount: number;
|
|
1072
|
+
originalPrice?: number | undefined;
|
|
1073
|
+
finalPrice?: number | undefined;
|
|
1074
|
+
finalDiscount?: number | undefined;
|
|
1054
1075
|
}[];
|
|
1055
1076
|
cartDiscount: number;
|
|
1056
1077
|
cartTotal: number;
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../lib/entities/Order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BtB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/entities/Order.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ProfileSchema } from "./Profile";
|
|
3
|
-
import { ProductSchema } from "./Product";
|
|
4
3
|
import { notEmptyTextSchema } from "./Atoms";
|
|
4
|
+
import { CartItemProductSchema } from "./Cart";
|
|
5
5
|
// pending - order created / by user
|
|
6
6
|
// processing order accepted by store by admin
|
|
7
7
|
// delivered - order delivered by admin
|
|
@@ -27,7 +27,7 @@ export const OrderSchema = z.object({
|
|
|
27
27
|
paymentStatus: z.enum(["pending", "pending_j5", "completed", "failed", "refunded"]), //todo check if hyp support partial refund
|
|
28
28
|
cart: z.object({
|
|
29
29
|
id: z.string(),
|
|
30
|
-
items: z.array(
|
|
30
|
+
items: z.array(CartItemProductSchema),
|
|
31
31
|
cartDiscount: z.number(),
|
|
32
32
|
cartTotal: z.number(),
|
|
33
33
|
cartVat: z.number(),
|
package/dist/entities/Store.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ declare const StoreSchema: z.ZodObject<{
|
|
|
9
9
|
paymentType: z.ZodEnum<["external", "j5"]>;
|
|
10
10
|
allowAnonymousClients: z.ZodBoolean;
|
|
11
11
|
isVatIncludedInPrice: z.ZodBoolean;
|
|
12
|
+
clientTypes: z.ZodArray<z.ZodEnum<["individual", "company"]>, "many">;
|
|
12
13
|
}, "strip", z.ZodTypeAny, {
|
|
13
14
|
id: string;
|
|
14
15
|
companyId: string;
|
|
@@ -19,6 +20,7 @@ declare const StoreSchema: z.ZodObject<{
|
|
|
19
20
|
logoUrl: string;
|
|
20
21
|
allowAnonymousClients: boolean;
|
|
21
22
|
isVatIncludedInPrice: boolean;
|
|
23
|
+
clientTypes: ("company" | "individual")[];
|
|
22
24
|
}, {
|
|
23
25
|
id: string;
|
|
24
26
|
companyId: string;
|
|
@@ -29,6 +31,7 @@ declare const StoreSchema: z.ZodObject<{
|
|
|
29
31
|
logoUrl: string;
|
|
30
32
|
allowAnonymousClients: boolean;
|
|
31
33
|
isVatIncludedInPrice: boolean;
|
|
34
|
+
clientTypes: ("company" | "individual")[];
|
|
32
35
|
}>;
|
|
33
36
|
export type TStore = z.infer<typeof StoreSchema>;
|
|
34
37
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../lib/entities/Store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../lib/entities/Store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWf,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/entities/Store.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
const clientTypesSchema = z.enum(["individual", "company"]);
|
|
2
3
|
const StoreSchema = z.object({
|
|
3
4
|
id: z.string(),
|
|
4
5
|
companyId: z.string(),
|
|
@@ -9,4 +10,5 @@ const StoreSchema = z.object({
|
|
|
9
10
|
paymentType: z.enum(["external", "j5"]),
|
|
10
11
|
allowAnonymousClients: z.boolean(),
|
|
11
12
|
isVatIncludedInPrice: z.boolean(),
|
|
13
|
+
clientTypes: z.array(clientTypesSchema),
|
|
12
14
|
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.tsx"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.tsx"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
package/lib/entities/Store.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
+
const clientTypesSchema = z.enum(["individual", "company"]);
|
|
3
4
|
const StoreSchema = z.object({
|
|
4
5
|
id: z.string(),
|
|
5
6
|
companyId: z.string(),
|
|
@@ -10,5 +11,6 @@ const StoreSchema = z.object({
|
|
|
10
11
|
paymentType: z.enum(["external", "j5"]),
|
|
11
12
|
allowAnonymousClients: z.boolean(),
|
|
12
13
|
isVatIncludedInPrice: z.boolean(),
|
|
14
|
+
clientTypes: z.array(clientTypesSchema),
|
|
13
15
|
});
|
|
14
16
|
export type TStore = z.infer<typeof StoreSchema>;
|
package/lib/index.tsx
CHANGED