@jsdev_ninja/core 0.11.5 → 0.11.7

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.
@@ -6,7 +6,7 @@ export declare const OrderSchema: z.ZodObject<{
6
6
  storeId: z.ZodString;
7
7
  userId: z.ZodString;
8
8
  status: z.ZodEnum<["draft", "pending", "processing", "in_delivery", "delivered", "cancelled", "completed", "refunded"]>;
9
- paymentStatus: z.ZodEnum<["pending", "pending_j5", "completed", "failed", "refunded"]>;
9
+ paymentStatus: z.ZodEnum<["pending", "pending_j5", "external", "completed", "failed", "refunded"]>;
10
10
  cart: z.ZodObject<{
11
11
  id: z.ZodString;
12
12
  items: z.ZodArray<z.ZodObject<{
@@ -844,7 +844,7 @@ export declare const OrderSchema: z.ZodObject<{
844
844
  companyId: string;
845
845
  storeId: string;
846
846
  userId: string;
847
- paymentStatus: "completed" | "pending" | "refunded" | "pending_j5" | "failed";
847
+ paymentStatus: "completed" | "pending" | "refunded" | "pending_j5" | "external" | "failed";
848
848
  cart: {
849
849
  id: string;
850
850
  items: {
@@ -981,7 +981,7 @@ export declare const OrderSchema: z.ZodObject<{
981
981
  companyId: string;
982
982
  storeId: string;
983
983
  userId: string;
984
- paymentStatus: "completed" | "pending" | "refunded" | "pending_j5" | "failed";
984
+ paymentStatus: "completed" | "pending" | "refunded" | "pending_j5" | "external" | "failed";
985
985
  cart: {
986
986
  id: string;
987
987
  items: {
@@ -24,7 +24,7 @@ export const OrderSchema = z.object({
24
24
  "completed",
25
25
  "refunded",
26
26
  ]),
27
- paymentStatus: z.enum(["pending", "pending_j5", "completed", "failed", "refunded"]), //todo check if hyp support partial refund
27
+ paymentStatus: z.enum(["pending", "pending_j5", "external", "completed", "failed", "refunded"]), //todo check if hyp support partial refund
28
28
  cart: z.object({
29
29
  id: z.string(),
30
30
  items: z.array(CartItemProductSchema),
@@ -35,7 +35,7 @@ export const OrderSchema = z.object({
35
35
  originalAmount: z.number().positive().optional(), // what client pay
36
36
  actualAmount: z.number().positive().optional(), // what store charge
37
37
  date: z.number(),
38
- deliveryDate: z.number().optional(),
38
+ deliveryDate: z.coerce.number().optional(),
39
39
  createdAt: z.number().optional(),
40
40
  client: ProfileSchema.required({}),
41
41
  });
@@ -10,6 +10,8 @@ declare const StoreSchema: z.ZodObject<{
10
10
  allowAnonymousClients: z.ZodBoolean;
11
11
  isVatIncludedInPrice: z.ZodBoolean;
12
12
  clientTypes: z.ZodArray<z.ZodEnum<["individual", "company"]>, "many">;
13
+ minimumOrder: z.ZodOptional<z.ZodNumber>;
14
+ freeOrderPrice: z.ZodOptional<z.ZodNumber>;
13
15
  }, "strip", z.ZodTypeAny, {
14
16
  id: string;
15
17
  companyId: string;
@@ -21,6 +23,8 @@ declare const StoreSchema: z.ZodObject<{
21
23
  allowAnonymousClients: boolean;
22
24
  isVatIncludedInPrice: boolean;
23
25
  clientTypes: ("company" | "individual")[];
26
+ minimumOrder?: number | undefined;
27
+ freeOrderPrice?: number | undefined;
24
28
  }, {
25
29
  id: string;
26
30
  companyId: string;
@@ -32,6 +36,8 @@ declare const StoreSchema: z.ZodObject<{
32
36
  allowAnonymousClients: boolean;
33
37
  isVatIncludedInPrice: boolean;
34
38
  clientTypes: ("company" | "individual")[];
39
+ minimumOrder?: number | undefined;
40
+ freeOrderPrice?: number | undefined;
35
41
  }>;
36
42
  export type TStore = z.infer<typeof StoreSchema>;
37
43
  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;AAGxB,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWf,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaf,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -11,4 +11,6 @@ const StoreSchema = z.object({
11
11
  allowAnonymousClients: z.boolean(),
12
12
  isVatIncludedInPrice: z.boolean(),
13
13
  clientTypes: z.array(clientTypesSchema),
14
+ minimumOrder: z.number().optional(),
15
+ freeOrderPrice: z.number().optional(),
14
16
  });
@@ -28,7 +28,7 @@ export const OrderSchema = z.object({
28
28
  "completed",
29
29
  "refunded",
30
30
  ]),
31
- paymentStatus: z.enum(["pending", "pending_j5", "completed", "failed", "refunded"]), //todo check if hyp support partial refund
31
+ paymentStatus: z.enum(["pending", "pending_j5", "external", "completed", "failed", "refunded"]), //todo check if hyp support partial refund
32
32
  cart: z.object({
33
33
  id: z.string(),
34
34
  items: z.array(CartItemProductSchema),
@@ -39,7 +39,7 @@ export const OrderSchema = z.object({
39
39
  originalAmount: z.number().positive().optional(), // what client pay
40
40
  actualAmount: z.number().positive().optional(), // what store charge
41
41
  date: z.number(),
42
- deliveryDate: z.number().optional(),
42
+ deliveryDate: z.coerce.number().optional(),
43
43
  createdAt: z.number().optional(),
44
44
  client: ProfileSchema.required({}),
45
45
  });
@@ -12,5 +12,7 @@ const StoreSchema = z.object({
12
12
  allowAnonymousClients: z.boolean(),
13
13
  isVatIncludedInPrice: z.boolean(),
14
14
  clientTypes: z.array(clientTypesSchema),
15
+ minimumOrder: z.number().optional(),
16
+ freeOrderPrice: z.number().optional(),
15
17
  });
16
18
  export type TStore = z.infer<typeof StoreSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsdev_ninja/core",
3
- "version": "0.11.5",
3
+ "version": "0.11.7",
4
4
  "main": "dist/core.cjs.js",
5
5
  "module": "dist/core.es.js",
6
6
  "types": "dist/index.d.ts",