@jsdev_ninja/core 0.8.50 → 0.8.51
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.
- package/dist/core.cjs.js +1 -1
- package/dist/core.cjs.js.map +1 -0
- package/dist/core.es.js +3422 -0
- package/dist/core.es.js.map +1 -0
- package/dist/core.umd.js +2 -0
- package/dist/core.umd.js.map +1 -0
- package/dist/entities/Address.d.ts +28 -0
- package/dist/entities/Address.d.ts.map +1 -0
- package/dist/entities/Address.js +10 -0
- package/dist/entities/Atoms.d.ts +5 -0
- package/dist/entities/Atoms.d.ts.map +1 -0
- package/dist/entities/Atoms.js +5 -0
- package/dist/entities/Cart.d.ts +715 -0
- package/dist/entities/Cart.d.ts.map +1 -0
- package/dist/entities/Cart.js +14 -0
- package/dist/entities/Category.d.ts +103 -0
- package/dist/entities/Category.d.ts.map +1 -0
- package/dist/entities/Category.js +20 -0
- package/dist/entities/Company.d.ts +48 -0
- package/dist/entities/Company.d.ts.map +1 -0
- package/dist/entities/Company.js +12 -0
- package/dist/entities/FavoriteProduct.d.ts +25 -0
- package/dist/entities/FavoriteProduct.d.ts.map +1 -0
- package/dist/entities/FavoriteProduct.js +9 -0
- package/dist/entities/Locale.d.ts +22 -0
- package/dist/entities/Locale.d.ts.map +1 -0
- package/dist/entities/Locale.js +6 -0
- package/dist/entities/Order.d.ts +1084 -0
- package/dist/entities/Order.d.ts.map +1 -0
- package/dist/entities/Order.js +38 -0
- package/dist/entities/Payment.d.ts +368 -0
- package/dist/entities/Payment.d.ts.map +1 -0
- package/dist/entities/Payment.js +108 -0
- package/dist/entities/Product.d.ts +1000 -0
- package/dist/entities/Product.d.ts.map +1 -0
- package/dist/entities/Product.js +64 -0
- package/dist/entities/Profile.d.ts +102 -0
- package/dist/entities/Profile.d.ts.map +1 -0
- package/dist/entities/Profile.js +45 -0
- package/dist/entities/Store.d.ts +62 -0
- package/dist/entities/Store.d.ts.map +1 -0
- package/dist/entities/Store.js +20 -0
- package/dist/entities/index.d.ts +13 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +12 -0
- package/dist/firebase-api/index.d.ts +37 -0
- package/dist/firebase-api/index.d.ts.map +1 -0
- package/dist/firebase-api/index.js +23 -0
- package/dist/hypPaymentService/index.d.ts +33 -0
- package/dist/hypPaymentService/index.d.ts.map +1 -0
- package/dist/hypPaymentService/index.js +100 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -0
- package/dist/tsconfig.node.tsbuildinfo +1 -0
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/dist/vite.config.js +25 -0
- package/lib/entities/Order.ts +3 -1
- package/package.json +1 -1
|
@@ -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.ZodEnum<["he"]>;
|
|
10
|
+
value: z.ZodString;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
value: string;
|
|
13
|
+
lang: "he";
|
|
14
|
+
}, {
|
|
15
|
+
value: string;
|
|
16
|
+
lang: "he";
|
|
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
|
+
value: string;
|
|
26
|
+
lang: "he";
|
|
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
|
+
value: string;
|
|
37
|
+
lang: "he";
|
|
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.ZodEnum<["he"]>;
|
|
57
|
+
value: z.ZodString;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
value: string;
|
|
60
|
+
lang: "he";
|
|
61
|
+
}, {
|
|
62
|
+
value: string;
|
|
63
|
+
lang: "he";
|
|
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
|
+
value: string;
|
|
78
|
+
lang: "he";
|
|
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
|
+
value: string;
|
|
92
|
+
lang: "he";
|
|
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,48 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CompanySchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
websiteDomains: z.ZodArray<z.ZodString, "many">;
|
|
6
|
+
owner: z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
emails: z.ZodObject<{
|
|
9
|
+
mainEmail: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
mainEmail: string;
|
|
12
|
+
}, {
|
|
13
|
+
mainEmail: string;
|
|
14
|
+
}>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
name: string;
|
|
17
|
+
emails: {
|
|
18
|
+
mainEmail: string;
|
|
19
|
+
};
|
|
20
|
+
}, {
|
|
21
|
+
name: string;
|
|
22
|
+
emails: {
|
|
23
|
+
mainEmail: string;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
websiteDomains: string[];
|
|
30
|
+
owner: {
|
|
31
|
+
name: string;
|
|
32
|
+
emails: {
|
|
33
|
+
mainEmail: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}, {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
websiteDomains: string[];
|
|
40
|
+
owner: {
|
|
41
|
+
name: string;
|
|
42
|
+
emails: {
|
|
43
|
+
mainEmail: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
47
|
+
export type TCompany = z.infer<typeof CompanySchema>;
|
|
48
|
+
//# sourceMappingURL=Company.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Company.d.ts","sourceRoot":"","sources":["../../lib/entities/Company.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUxB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const FavoriteProductSchema: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"FavoriteProduct">;
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
companyId: z.ZodString;
|
|
6
|
+
storeId: z.ZodString;
|
|
7
|
+
userId: z.ZodString;
|
|
8
|
+
productId: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
type: "FavoriteProduct";
|
|
11
|
+
id: string;
|
|
12
|
+
companyId: string;
|
|
13
|
+
storeId: string;
|
|
14
|
+
userId: string;
|
|
15
|
+
productId: string;
|
|
16
|
+
}, {
|
|
17
|
+
type: "FavoriteProduct";
|
|
18
|
+
id: string;
|
|
19
|
+
companyId: string;
|
|
20
|
+
storeId: string;
|
|
21
|
+
userId: string;
|
|
22
|
+
productId: string;
|
|
23
|
+
}>;
|
|
24
|
+
export type TFavoriteProduct = z.infer<typeof FavoriteProductSchema>;
|
|
25
|
+
//# sourceMappingURL=FavoriteProduct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FavoriteProduct.d.ts","sourceRoot":"","sources":["../../lib/entities/FavoriteProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;EAOhC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const FavoriteProductSchema = z.object({
|
|
3
|
+
type: z.literal("FavoriteProduct"),
|
|
4
|
+
id: z.string().uuid(),
|
|
5
|
+
companyId: z.string().uuid(),
|
|
6
|
+
storeId: z.string().uuid(),
|
|
7
|
+
userId: z.string().uuid(),
|
|
8
|
+
productId: z.string().uuid(),
|
|
9
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const LocaleSchema: z.ZodObject<{
|
|
3
|
+
lang: z.ZodEnum<["he"]>;
|
|
4
|
+
value: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
value: string;
|
|
7
|
+
lang: "he";
|
|
8
|
+
}, {
|
|
9
|
+
value: string;
|
|
10
|
+
lang: "he";
|
|
11
|
+
}>;
|
|
12
|
+
export declare const LocaleValueSchema: z.ZodArray<z.ZodObject<{
|
|
13
|
+
lang: z.ZodEnum<["he"]>;
|
|
14
|
+
value: z.ZodString;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
value: string;
|
|
17
|
+
lang: "he";
|
|
18
|
+
}, {
|
|
19
|
+
value: string;
|
|
20
|
+
lang: "he";
|
|
21
|
+
}>, "many">;
|
|
22
|
+
//# 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;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;WAAwB,CAAC"}
|