@jsdev_ninja/core 0.7.6 → 0.7.62

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.
Files changed (53) hide show
  1. package/dist/core.cjs.js.map +1 -0
  2. package/dist/core.es.js +3037 -0
  3. package/dist/core.es.js.map +1 -0
  4. package/dist/core.umd.js +2 -0
  5. package/dist/core.umd.js.map +1 -0
  6. package/dist/entities/Address.d.ts +28 -0
  7. package/dist/entities/Address.d.ts.map +1 -0
  8. package/dist/entities/Address.js +10 -0
  9. package/dist/entities/Cart.d.ts +715 -0
  10. package/dist/entities/Cart.d.ts.map +1 -0
  11. package/dist/entities/Cart.js +14 -0
  12. package/dist/entities/Category.d.ts +103 -0
  13. package/dist/entities/Category.d.ts.map +1 -0
  14. package/dist/entities/Category.js +20 -0
  15. package/dist/entities/Locale.d.ts +12 -0
  16. package/dist/entities/Locale.d.ts.map +1 -0
  17. package/dist/entities/Locale.js +5 -0
  18. package/dist/entities/Order.d.ts +1118 -0
  19. package/dist/entities/Order.d.ts.map +1 -0
  20. package/dist/entities/Order.js +30 -0
  21. package/dist/entities/Payment.d.ts +30 -0
  22. package/dist/entities/Payment.d.ts.map +1 -0
  23. package/dist/entities/Payment.js +12 -0
  24. package/dist/entities/Product.d.ts +1000 -0
  25. package/dist/entities/Product.d.ts.map +1 -0
  26. package/dist/entities/Product.js +64 -0
  27. package/dist/entities/Profile.d.ts +102 -0
  28. package/dist/entities/Profile.d.ts.map +1 -0
  29. package/dist/entities/Profile.js +45 -0
  30. package/dist/entities/index.d.ts +6 -0
  31. package/dist/entities/index.d.ts.map +1 -0
  32. package/dist/entities/index.js +5 -0
  33. package/dist/index.d.ts +2 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +1 -0
  36. package/dist/tsconfig.app.tsbuildinfo +1 -0
  37. package/dist/tsconfig.node.tsbuildinfo +1 -0
  38. package/dist/vite.config.d.ts +3 -0
  39. package/dist/vite.config.d.ts.map +1 -0
  40. package/dist/vite.config.js +25 -0
  41. package/eslint.config.js +28 -0
  42. package/index.html +13 -0
  43. package/package.json +1 -6
  44. package/src/App.css +42 -0
  45. package/src/App.tsx +35 -0
  46. package/src/assets/react.svg +1 -0
  47. package/src/index.css +68 -0
  48. package/src/main.tsx +3 -0
  49. package/src/vite-env.d.ts +1 -0
  50. package/tsconfig.app.json +19 -0
  51. package/tsconfig.json +7 -0
  52. package/tsconfig.node.json +26 -0
  53. package/vite.config.ts +27 -0
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+ import { ProductSchema } from "./Product";
3
+ export const CartSchema = z.object({
4
+ type: z.literal("Cart"),
5
+ id: z.string().uuid(),
6
+ companyId: z.string().uuid(),
7
+ storeId: z.string().uuid(),
8
+ userId: z.string().uuid(),
9
+ status: z.enum(["active", "draft", "completed"]),
10
+ items: z.array(z.object({
11
+ product: ProductSchema,
12
+ amount: z.number().int().positive({ message: "Quantity must be a positive integer." }),
13
+ })),
14
+ });
@@ -0,0 +1,103 @@
1
+ import { z } from "zod";
2
+ export declare const BaseCategorySchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ companyId: z.ZodString;
5
+ storeId: z.ZodString;
6
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ tag: z.ZodString;
8
+ locales: z.ZodArray<z.ZodObject<{
9
+ lang: z.ZodString;
10
+ value: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ lang: string;
13
+ value: string;
14
+ }, {
15
+ lang: string;
16
+ value: string;
17
+ }>, "many">;
18
+ depth: z.ZodNumber;
19
+ }, "strip", z.ZodTypeAny, {
20
+ id: string;
21
+ companyId: string;
22
+ storeId: string;
23
+ tag: string;
24
+ locales: {
25
+ lang: string;
26
+ value: string;
27
+ }[];
28
+ depth: number;
29
+ parentId?: string | null | undefined;
30
+ }, {
31
+ id: string;
32
+ companyId: string;
33
+ storeId: string;
34
+ tag: string;
35
+ locales: {
36
+ lang: string;
37
+ value: string;
38
+ }[];
39
+ depth: number;
40
+ parentId?: string | null | undefined;
41
+ }>;
42
+ type Category = z.infer<typeof BaseCategorySchema> & {
43
+ children: Category[];
44
+ };
45
+ export declare const CategorySchema: z.ZodType<Category>;
46
+ export type TCategory = z.infer<typeof BaseCategorySchema> & {
47
+ children: TCategory[];
48
+ };
49
+ export declare const TFlattenCategorySchema: z.ZodObject<z.objectUtil.extendShape<{
50
+ id: z.ZodString;
51
+ companyId: z.ZodString;
52
+ storeId: z.ZodString;
53
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ tag: z.ZodString;
55
+ locales: z.ZodArray<z.ZodObject<{
56
+ lang: z.ZodString;
57
+ value: z.ZodString;
58
+ }, "strip", z.ZodTypeAny, {
59
+ lang: string;
60
+ value: string;
61
+ }, {
62
+ lang: string;
63
+ value: string;
64
+ }>, "many">;
65
+ depth: z.ZodNumber;
66
+ }, {
67
+ index: z.ZodNumber;
68
+ depth: z.ZodNumber;
69
+ collapsed: z.ZodOptional<z.ZodBoolean>;
70
+ children: z.ZodArray<z.ZodType<Category, z.ZodTypeDef, Category>, "many">;
71
+ }>, "strip", z.ZodTypeAny, {
72
+ id: string;
73
+ companyId: string;
74
+ storeId: string;
75
+ tag: string;
76
+ locales: {
77
+ lang: string;
78
+ value: string;
79
+ }[];
80
+ depth: number;
81
+ children: Category[];
82
+ index: number;
83
+ parentId?: string | null | undefined;
84
+ collapsed?: boolean | undefined;
85
+ }, {
86
+ id: string;
87
+ companyId: string;
88
+ storeId: string;
89
+ tag: string;
90
+ locales: {
91
+ lang: string;
92
+ value: string;
93
+ }[];
94
+ depth: number;
95
+ children: Category[];
96
+ index: number;
97
+ parentId?: string | null | undefined;
98
+ collapsed?: boolean | undefined;
99
+ }>;
100
+ export type TFlattenCategory = z.infer<typeof TFlattenCategorySchema>;
101
+ export type TNewCategory = Omit<TCategory, "id">;
102
+ export {};
103
+ //# sourceMappingURL=Category.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Category.d.ts","sourceRoot":"","sources":["../../lib/entities/Category.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ7B,CAAC;AAEH,KAAK,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GAAG;IACpD,QAAQ,EAAE,QAAQ,EAAE,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAE7C,CAAC;AAGH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GAAG;IAC5D,QAAQ,EAAE,SAAS,EAAE,CAAC;CACtB,CAAC;AACF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { z } from "zod";
2
+ import { LocaleSchema } from "./Locale";
3
+ export const BaseCategorySchema = z.object({
4
+ id: z.string().min(1),
5
+ companyId: z.string().min(1),
6
+ storeId: z.string().min(1),
7
+ parentId: z.string().nullish(),
8
+ tag: z.string().min(1),
9
+ locales: z.array(LocaleSchema),
10
+ depth: z.number(),
11
+ });
12
+ export const CategorySchema = BaseCategorySchema.extend({
13
+ children: z.lazy(() => CategorySchema.array()),
14
+ });
15
+ export const TFlattenCategorySchema = BaseCategorySchema.extend({
16
+ index: z.number(),
17
+ depth: z.number(),
18
+ collapsed: z.boolean().optional(),
19
+ children: z.array(CategorySchema),
20
+ });
@@ -0,0 +1,12 @@
1
+ import { z } from "zod";
2
+ export declare const LocaleSchema: z.ZodObject<{
3
+ lang: z.ZodString;
4
+ value: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ lang: string;
7
+ value: string;
8
+ }, {
9
+ lang: string;
10
+ value: string;
11
+ }>;
12
+ //# sourceMappingURL=Locale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Locale.d.ts","sourceRoot":"","sources":["../../lib/entities/Locale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,YAAY;;;;;;;;;EAGvB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { z } from "zod";
2
+ export const LocaleSchema = z.object({
3
+ lang: z.string().min(1),
4
+ value: z.string().min(1),
5
+ });