@jsdev_ninja/core 0.8.56 → 0.9.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.
@@ -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<{
@@ -803,13 +803,13 @@ export declare const OrderSchema: z.ZodObject<{
803
803
  }>;
804
804
  }, "strip", z.ZodTypeAny, {
805
805
  type: "Order";
806
- status: "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "canceled" | "refunded";
806
+ status: "draft" | "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "canceled" | "refunded";
807
807
  date: number;
808
808
  id: string;
809
809
  companyId: string;
810
810
  storeId: string;
811
811
  userId: string;
812
- paymentStatus: "completed" | "pending" | "refunded" | "failed";
812
+ paymentStatus: "completed" | "pending" | "refunded" | "pending_j5" | "failed";
813
813
  cart: {
814
814
  id: string;
815
815
  items: {
@@ -933,13 +933,13 @@ export declare const OrderSchema: z.ZodObject<{
933
933
  createdAt?: number | undefined;
934
934
  }, {
935
935
  type: "Order";
936
- status: "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "canceled" | "refunded";
936
+ status: "draft" | "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "canceled" | "refunded";
937
937
  date: number;
938
938
  id: string;
939
939
  companyId: string;
940
940
  storeId: string;
941
941
  userId: string;
942
- paymentStatus: "completed" | "pending" | "refunded" | "failed";
942
+ paymentStatus: "completed" | "pending" | "refunded" | "pending_j5" | "failed";
943
943
  cart: {
944
944
  id: string;
945
945
  items: {
@@ -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() })),
@@ -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() })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsdev_ninja/core",
3
- "version": "0.8.56",
3
+ "version": "0.9.1",
4
4
  "main": "dist/core.cjs.js",
5
5
  "module": "dist/core.es.js",
6
6
  "types": "dist/index.d.ts",