@jsdev_ninja/core 0.12.9 → 0.12.11

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.
@@ -1,6 +1,5 @@
1
1
  import { z } from "zod";
2
2
  import { ProfileSchema } from "./Profile";
3
- import { ProductSchema } from "./Product";
4
3
  import { notEmptyTextSchema } from "./Atoms";
5
4
  import { CartItemProductSchema } from "./Cart";
6
5
 
@@ -39,7 +38,7 @@ export const OrderSchema = z.object({
39
38
  originalAmount: z.number().positive().optional(), // what client pay
40
39
  actualAmount: z.number().positive().optional(), // what store charge
41
40
  date: z.number(),
42
- deliveryDate: z.coerce.number().optional(),
41
+ deliveryDate: z.coerce.number(),
43
42
  client: ProfileSchema.required({}),
44
43
  nameOnInvoice: z.string().optional(),
45
44
  clientComment: z.string().optional(),
@@ -47,7 +47,7 @@ export const ProductSchema = z.object({
47
47
  categoryIds: z.array(z.string().nonempty()),
48
48
 
49
49
  // @deprecated
50
- categoryList: z.array(CategorySchema),
50
+ categoryList: z.array(CategorySchema).optional(),
51
51
  // @deprecated
52
52
  categories: z.object({
53
53
  lvl0: z.array(z.string()),
@@ -55,9 +55,9 @@ export const ProductSchema = z.object({
55
55
  lvl2: z.array(z.string()),
56
56
  lvl3: z.array(z.string()),
57
57
  lvl4: z.array(z.string()),
58
- }),
58
+ }).optional(),
59
59
  // @deprecated
60
- categoryNames: z.array(z.string()),
60
+ categoryNames: z.array(z.string()).optional(),
61
61
  });
62
62
  export type TProduct = z.infer<typeof ProductSchema>;
63
63
 
@@ -2,7 +2,9 @@ import { z } from "zod";
2
2
  import { AddressSchema } from "./Address";
3
3
  import { notEmptyTextSchema } from "./Atoms";
4
4
 
5
- export const ProfilePaymentTypeSchema = z.enum(["default", "delayed"]);
5
+ export const ProfilePaymentTypeSchema = z.enum(["default", "delayed"], {
6
+ description: "delayed is J5 transaction",
7
+ });
6
8
  export type TProfilePaymentType = z.infer<typeof ProfilePaymentTypeSchema>;
7
9
 
8
10
  export const ProfileSchema = z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsdev_ninja/core",
3
- "version": "0.12.9",
3
+ "version": "0.12.11",
4
4
  "main": "dist/core.cjs.js",
5
5
  "module": "dist/core.es.js",
6
6
  "types": "dist/index.d.ts",