@jsdev_ninja/core 0.9.0 → 0.10.0

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.
@@ -106,6 +106,7 @@ export declare const CartSchema: z.ZodObject<{
106
106
  }>, "many">;
107
107
  created_at: z.ZodNumber;
108
108
  updated_at: z.ZodNumber;
109
+ categoryIds: z.ZodArray<z.ZodString, "many">;
109
110
  categoryList: z.ZodArray<z.ZodType<{
110
111
  id: string;
111
112
  companyId: string;
@@ -224,6 +225,7 @@ export declare const CartSchema: z.ZodObject<{
224
225
  }[];
225
226
  created_at: number;
226
227
  updated_at: number;
228
+ categoryIds: string[];
227
229
  categoryList: ({
228
230
  id: string;
229
231
  companyId: string;
@@ -308,6 +310,7 @@ export declare const CartSchema: z.ZodObject<{
308
310
  }[];
309
311
  created_at: number;
310
312
  updated_at: number;
313
+ categoryIds: string[];
311
314
  categoryList: ({
312
315
  id: string;
313
316
  companyId: string;
@@ -395,6 +398,7 @@ export declare const CartSchema: z.ZodObject<{
395
398
  }[];
396
399
  created_at: number;
397
400
  updated_at: number;
401
+ categoryIds: string[];
398
402
  categoryList: ({
399
403
  id: string;
400
404
  companyId: string;
@@ -482,6 +486,7 @@ export declare const CartSchema: z.ZodObject<{
482
486
  }[];
483
487
  created_at: number;
484
488
  updated_at: number;
489
+ categoryIds: string[];
485
490
  categoryList: ({
486
491
  id: string;
487
492
  companyId: string;
@@ -577,6 +582,7 @@ export declare const CartSchema: z.ZodObject<{
577
582
  }[];
578
583
  created_at: number;
579
584
  updated_at: number;
585
+ categoryIds: string[];
580
586
  categoryList: ({
581
587
  id: string;
582
588
  companyId: string;
@@ -672,6 +678,7 @@ export declare const CartSchema: z.ZodObject<{
672
678
  }[];
673
679
  created_at: number;
674
680
  updated_at: number;
681
+ categoryIds: string[];
675
682
  categoryList: ({
676
683
  id: string;
677
684
  companyId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Cart.d.ts","sourceRoot":"","sources":["../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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAarB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
@@ -5,8 +5,8 @@ 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<["pending", "processing", "in_delivery", "delivered", "canceled", "completed", "refunded"]>;
9
- paymentStatus: z.ZodEnum<["pending", "completed", "failed", "refunded"]>;
8
+ status: z.ZodEnum<["draft", "pending", "processing", "in_delivery", "delivered", "canceled", "completed", "refunded"]>;
9
+ paymentStatus: z.ZodEnum<["pending", "pending_j5", "completed", "failed", "refunded"]>;
10
10
  cart: z.ZodObject<{
11
11
  id: z.ZodString;
12
12
  items: z.ZodArray<z.ZodObject<{
@@ -109,6 +109,7 @@ export declare const OrderSchema: z.ZodObject<{
109
109
  }>, "many">;
110
110
  created_at: z.ZodNumber;
111
111
  updated_at: z.ZodNumber;
112
+ categoryIds: z.ZodArray<z.ZodString, "many">;
112
113
  categoryList: z.ZodArray<z.ZodType<{
113
114
  id: string;
114
115
  companyId: string;
@@ -227,6 +228,7 @@ export declare const OrderSchema: z.ZodObject<{
227
228
  }[];
228
229
  created_at: number;
229
230
  updated_at: number;
231
+ categoryIds: string[];
230
232
  categoryList: ({
231
233
  id: string;
232
234
  companyId: string;
@@ -311,6 +313,7 @@ export declare const OrderSchema: z.ZodObject<{
311
313
  }[];
312
314
  created_at: number;
313
315
  updated_at: number;
316
+ categoryIds: string[];
314
317
  categoryList: ({
315
318
  id: string;
316
319
  companyId: string;
@@ -398,6 +401,7 @@ export declare const OrderSchema: z.ZodObject<{
398
401
  }[];
399
402
  created_at: number;
400
403
  updated_at: number;
404
+ categoryIds: string[];
401
405
  categoryList: ({
402
406
  id: string;
403
407
  companyId: string;
@@ -485,6 +489,7 @@ export declare const OrderSchema: z.ZodObject<{
485
489
  }[];
486
490
  created_at: number;
487
491
  updated_at: number;
492
+ categoryIds: string[];
488
493
  categoryList: ({
489
494
  id: string;
490
495
  companyId: string;
@@ -578,6 +583,7 @@ export declare const OrderSchema: z.ZodObject<{
578
583
  }[];
579
584
  created_at: number;
580
585
  updated_at: number;
586
+ categoryIds: string[];
581
587
  categoryList: ({
582
588
  id: string;
583
589
  companyId: string;
@@ -671,6 +677,7 @@ export declare const OrderSchema: z.ZodObject<{
671
677
  }[];
672
678
  created_at: number;
673
679
  updated_at: number;
680
+ categoryIds: string[];
674
681
  categoryList: ({
675
682
  id: string;
676
683
  companyId: string;
@@ -803,13 +810,13 @@ export declare const OrderSchema: z.ZodObject<{
803
810
  }>;
804
811
  }, "strip", z.ZodTypeAny, {
805
812
  type: "Order";
806
- status: "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "canceled" | "refunded";
813
+ status: "draft" | "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "canceled" | "refunded";
807
814
  date: number;
808
815
  id: string;
809
816
  companyId: string;
810
817
  storeId: string;
811
818
  userId: string;
812
- paymentStatus: "completed" | "pending" | "refunded" | "failed";
819
+ paymentStatus: "completed" | "pending" | "refunded" | "pending_j5" | "failed";
813
820
  cart: {
814
821
  id: string;
815
822
  items: {
@@ -862,6 +869,7 @@ export declare const OrderSchema: z.ZodObject<{
862
869
  }[];
863
870
  created_at: number;
864
871
  updated_at: number;
872
+ categoryIds: string[];
865
873
  categoryList: ({
866
874
  id: string;
867
875
  companyId: string;
@@ -933,13 +941,13 @@ export declare const OrderSchema: z.ZodObject<{
933
941
  createdAt?: number | undefined;
934
942
  }, {
935
943
  type: "Order";
936
- status: "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "canceled" | "refunded";
944
+ status: "draft" | "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "canceled" | "refunded";
937
945
  date: number;
938
946
  id: string;
939
947
  companyId: string;
940
948
  storeId: string;
941
949
  userId: string;
942
- paymentStatus: "completed" | "pending" | "refunded" | "failed";
950
+ paymentStatus: "completed" | "pending" | "refunded" | "pending_j5" | "failed";
943
951
  cart: {
944
952
  id: string;
945
953
  items: {
@@ -992,6 +1000,7 @@ export declare const OrderSchema: z.ZodObject<{
992
1000
  }[];
993
1001
  created_at: number;
994
1002
  updated_at: number;
1003
+ categoryIds: string[];
995
1004
  categoryList: ({
996
1005
  id: string;
997
1006
  companyId: string;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BtB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -15,15 +15,16 @@ export const OrderSchema = z.object({
15
15
  storeId: notEmptyTextSchema,
16
16
  userId: notEmptyTextSchema,
17
17
  status: z.enum([
18
- "pending",
19
- "processing",
20
- "in_delivery",
18
+ "draft", // before payment
19
+ "pending", // after payment
20
+ "processing", // after admin approve
21
+ "in_delivery", //
21
22
  "delivered",
22
23
  "canceled",
23
24
  "completed",
24
25
  "refunded",
25
26
  ]),
26
- paymentStatus: z.enum(["pending", "completed", "failed", "refunded"]), //todo check if hyp support partial refund
27
+ paymentStatus: z.enum(["pending", "pending_j5", "completed", "failed", "refunded"]), //todo check if hyp support partial refund
27
28
  cart: z.object({
28
29
  id: z.string(),
29
30
  items: z.array(z.object({ product: ProductSchema, amount: z.number() })),
@@ -98,6 +98,7 @@ export declare const ProductSchema: z.ZodObject<{
98
98
  }>, "many">;
99
99
  created_at: z.ZodNumber;
100
100
  updated_at: z.ZodNumber;
101
+ categoryIds: z.ZodArray<z.ZodString, "many">;
101
102
  categoryList: z.ZodArray<z.ZodType<{
102
103
  id: string;
103
104
  companyId: string;
@@ -216,6 +217,7 @@ export declare const ProductSchema: z.ZodObject<{
216
217
  }[];
217
218
  created_at: number;
218
219
  updated_at: number;
220
+ categoryIds: string[];
219
221
  categoryList: ({
220
222
  id: string;
221
223
  companyId: string;
@@ -300,6 +302,7 @@ export declare const ProductSchema: z.ZodObject<{
300
302
  }[];
301
303
  created_at: number;
302
304
  updated_at: number;
305
+ categoryIds: string[];
303
306
  categoryList: ({
304
307
  id: string;
305
308
  companyId: string;
@@ -436,6 +439,7 @@ export declare const NewProductSchema: z.ZodObject<z.objectUtil.extendShape<{
436
439
  }>, "many">;
437
440
  created_at: z.ZodNumber;
438
441
  updated_at: z.ZodNumber;
442
+ categoryIds: z.ZodArray<z.ZodString, "many">;
439
443
  categoryList: z.ZodArray<z.ZodType<{
440
444
  id: string;
441
445
  companyId: string;
@@ -556,6 +560,7 @@ export declare const NewProductSchema: z.ZodObject<z.objectUtil.extendShape<{
556
560
  }[];
557
561
  created_at: number;
558
562
  updated_at: number;
563
+ categoryIds: string[];
559
564
  categoryList: ({
560
565
  id: string;
561
566
  companyId: string;
@@ -641,6 +646,7 @@ export declare const NewProductSchema: z.ZodObject<z.objectUtil.extendShape<{
641
646
  }[];
642
647
  created_at: number;
643
648
  updated_at: number;
649
+ categoryIds: string[];
644
650
  categoryList: ({
645
651
  id: string;
646
652
  companyId: string;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkDxB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CAAC,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE3B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -41,8 +41,10 @@ export const ProductSchema = z.object({
41
41
  ingredients: z.array(LocaleSchema),
42
42
  created_at: z.number(),
43
43
  updated_at: z.number(),
44
+ categoryIds: z.array(z.string().nonempty()),
45
+ // @deprecated
44
46
  categoryList: z.array(CategorySchema),
45
- // generated
47
+ // @deprecated
46
48
  categories: z.object({
47
49
  lvl0: z.array(z.string()),
48
50
  lvl1: z.array(z.string()),
@@ -50,6 +52,7 @@ export const ProductSchema = z.object({
50
52
  lvl3: z.array(z.string()),
51
53
  lvl4: z.array(z.string()),
52
54
  }),
55
+ // @deprecated
53
56
  categoryNames: z.array(z.string()),
54
57
  });
55
58
  export const NewProductSchema = ProductSchema.extend({
@@ -18,15 +18,16 @@ export const OrderSchema = z.object({
18
18
  storeId: notEmptyTextSchema,
19
19
  userId: notEmptyTextSchema,
20
20
  status: z.enum([
21
- "pending",
22
- "processing",
23
- "in_delivery",
21
+ "draft", // before payment
22
+ "pending", // after payment
23
+ "processing", // after admin approve
24
+ "in_delivery", //
24
25
  "delivered",
25
26
  "canceled",
26
27
  "completed",
27
28
  "refunded",
28
29
  ]),
29
- paymentStatus: z.enum(["pending", "completed", "failed", "refunded"]), //todo check if hyp support partial refund
30
+ paymentStatus: z.enum(["pending", "pending_j5", "completed", "failed", "refunded"]), //todo check if hyp support partial refund
30
31
  cart: z.object({
31
32
  id: z.string(),
32
33
  items: z.array(z.object({ product: ProductSchema, amount: z.number() })),
@@ -43,9 +43,11 @@ export const ProductSchema = z.object({
43
43
  ingredients: z.array(LocaleSchema),
44
44
  created_at: z.number(),
45
45
  updated_at: z.number(),
46
+ categoryIds: z.array(z.string().nonempty()),
46
47
 
48
+ // @deprecated
47
49
  categoryList: z.array(CategorySchema),
48
- // generated
50
+ // @deprecated
49
51
  categories: z.object({
50
52
  lvl0: z.array(z.string()),
51
53
  lvl1: z.array(z.string()),
@@ -53,6 +55,7 @@ export const ProductSchema = z.object({
53
55
  lvl3: z.array(z.string()),
54
56
  lvl4: z.array(z.string()),
55
57
  }),
58
+ // @deprecated
56
59
  categoryNames: z.array(z.string()),
57
60
  });
58
61
  export type TProduct = z.infer<typeof ProductSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsdev_ninja/core",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "main": "dist/core.cjs.js",
5
5
  "module": "dist/core.es.js",
6
6
  "types": "dist/index.d.ts",