@jsdev_ninja/core 0.11.0 → 0.11.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.
- package/dist/core.cjs.js +1 -1
- package/dist/core.cjs.js.map +1 -1
- package/dist/core.es.js +38 -37
- package/dist/core.es.js.map +1 -1
- package/dist/core.umd.js +1 -1
- package/dist/core.umd.js.map +1 -1
- package/dist/entities/Cart.d.ts +550 -0
- package/dist/entities/Cart.d.ts.map +1 -1
- package/dist/entities/Cart.js +8 -4
- package/lib/entities/Cart.ts +11 -6
- package/lib/entities/Order.ts +2 -1
- package/package.json +1 -1
package/dist/core.es.js
CHANGED
|
@@ -2967,7 +2967,7 @@ var i = /* @__PURE__ */ Object.freeze({
|
|
|
2967
2967
|
quotelessJson: Ye,
|
|
2968
2968
|
ZodError: Z
|
|
2969
2969
|
});
|
|
2970
|
-
const k = i.string().min(1, { message: "שדה חובה" }),
|
|
2970
|
+
const k = i.string().min(1, { message: "שדה חובה" }), dr = i.string().regex(/^\d+$/, "Must be a numeric string"), rr = i.object({
|
|
2971
2971
|
country: k,
|
|
2972
2972
|
city: k,
|
|
2973
2973
|
street: k,
|
|
@@ -2978,7 +2978,7 @@ const k = i.string().min(1, { message: "שדה חובה" }), or = i.string().reg
|
|
|
2978
2978
|
}), J = i.object({
|
|
2979
2979
|
lang: i.enum(["he"]),
|
|
2980
2980
|
value: i.string()
|
|
2981
|
-
}),
|
|
2981
|
+
}), cr = i.array(J), qe = i.object({
|
|
2982
2982
|
id: i.string().min(1),
|
|
2983
2983
|
companyId: i.string().min(1),
|
|
2984
2984
|
storeId: i.string().min(1),
|
|
@@ -2988,7 +2988,7 @@ const k = i.string().min(1, { message: "שדה חובה" }), or = i.string().reg
|
|
|
2988
2988
|
depth: i.number()
|
|
2989
2989
|
}), Oe = qe.extend({
|
|
2990
2990
|
children: i.lazy(() => Oe.array())
|
|
2991
|
-
}),
|
|
2991
|
+
}), ur = qe.extend({
|
|
2992
2992
|
index: i.number(),
|
|
2993
2993
|
depth: i.number(),
|
|
2994
2994
|
collapsed: i.boolean().optional(),
|
|
@@ -3046,33 +3046,34 @@ const k = i.string().min(1, { message: "שדה חובה" }), or = i.string().reg
|
|
|
3046
3046
|
}),
|
|
3047
3047
|
// @deprecated
|
|
3048
3048
|
categoryNames: i.array(i.string())
|
|
3049
|
-
}),
|
|
3049
|
+
}), lr = je.extend({
|
|
3050
3050
|
image: i.instanceof(File).optional()
|
|
3051
|
-
}),
|
|
3051
|
+
}), nr = i.object({
|
|
3052
|
+
product: je,
|
|
3053
|
+
originalPrice: i.number().optional(),
|
|
3054
|
+
finalPrice: i.number().optional(),
|
|
3055
|
+
finalDiscount: i.number().optional(),
|
|
3056
|
+
amount: i.number().int().positive({ message: "Quantity must be a positive integer." })
|
|
3057
|
+
}), fr = i.object({
|
|
3052
3058
|
type: i.literal("Cart"),
|
|
3053
3059
|
id: i.string().uuid(),
|
|
3054
3060
|
companyId: i.string().uuid(),
|
|
3055
3061
|
storeId: i.string().uuid(),
|
|
3056
3062
|
userId: i.string().uuid(),
|
|
3057
3063
|
status: i.enum(["active", "draft", "completed"]),
|
|
3058
|
-
items: i.array(
|
|
3059
|
-
|
|
3060
|
-
product: je,
|
|
3061
|
-
amount: i.number().int().positive({ message: "Quantity must be a positive integer." })
|
|
3062
|
-
})
|
|
3063
|
-
)
|
|
3064
|
-
}), fr = i.object({
|
|
3064
|
+
items: i.array(nr)
|
|
3065
|
+
}), hr = i.object({
|
|
3065
3066
|
id: i.string(),
|
|
3066
3067
|
name: i.string(),
|
|
3067
3068
|
websiteDomains: i.array(i.string())
|
|
3068
|
-
}),
|
|
3069
|
+
}), mr = i.object({
|
|
3069
3070
|
type: i.literal("FavoriteProduct"),
|
|
3070
3071
|
id: i.string().uuid(),
|
|
3071
3072
|
companyId: i.string().uuid(),
|
|
3072
3073
|
storeId: i.string().uuid(),
|
|
3073
3074
|
userId: i.string().uuid(),
|
|
3074
3075
|
productId: i.string().uuid()
|
|
3075
|
-
}), Je = i.enum(["default", "delayed"]),
|
|
3076
|
+
}), Je = i.enum(["default", "delayed"]), sr = i.object({
|
|
3076
3077
|
type: i.literal("Profile"),
|
|
3077
3078
|
id: k,
|
|
3078
3079
|
companyId: k,
|
|
@@ -3088,7 +3089,7 @@ const k = i.string().min(1, { message: "שדה חובה" }), or = i.string().reg
|
|
|
3088
3089
|
lastActivityDate: i.number(),
|
|
3089
3090
|
paymentType: Je
|
|
3090
3091
|
});
|
|
3091
|
-
function
|
|
3092
|
+
function pr() {
|
|
3092
3093
|
return {
|
|
3093
3094
|
type: "Profile",
|
|
3094
3095
|
id: "",
|
|
@@ -3114,7 +3115,7 @@ function mr() {
|
|
|
3114
3115
|
paymentType: Je.Values.default
|
|
3115
3116
|
};
|
|
3116
3117
|
}
|
|
3117
|
-
const
|
|
3118
|
+
const yr = i.object({
|
|
3118
3119
|
type: i.literal("Order"),
|
|
3119
3120
|
id: k,
|
|
3120
3121
|
companyId: k,
|
|
@@ -3150,7 +3151,7 @@ const pr = i.object({
|
|
|
3150
3151
|
date: i.number(),
|
|
3151
3152
|
deliveryDate: i.number().optional(),
|
|
3152
3153
|
createdAt: i.number().optional(),
|
|
3153
|
-
client:
|
|
3154
|
+
client: sr.required({})
|
|
3154
3155
|
});
|
|
3155
3156
|
i.object({
|
|
3156
3157
|
id: i.string(),
|
|
@@ -3164,7 +3165,7 @@ i.object({
|
|
|
3164
3165
|
allowAnonymousClients: i.boolean(),
|
|
3165
3166
|
isVatIncludedInPrice: i.boolean()
|
|
3166
3167
|
});
|
|
3167
|
-
const Se = i.string().min(1),
|
|
3168
|
+
const Se = i.string().min(1), gr = i.object({
|
|
3168
3169
|
type: i.literal("Discount"),
|
|
3169
3170
|
storeId: Se,
|
|
3170
3171
|
companyId: Se,
|
|
@@ -3179,10 +3180,10 @@ const Se = i.string().min(1), yr = i.object({
|
|
|
3179
3180
|
discountPrice: i.number().positive()
|
|
3180
3181
|
})
|
|
3181
3182
|
])
|
|
3182
|
-
}),
|
|
3183
|
+
}), ar = {
|
|
3183
3184
|
stores: "STORES",
|
|
3184
3185
|
companies: "COMPANIES"
|
|
3185
|
-
},
|
|
3186
|
+
}, ir = {
|
|
3186
3187
|
products: "products",
|
|
3187
3188
|
profiles: "profiles",
|
|
3188
3189
|
cart: "cart",
|
|
@@ -3193,9 +3194,9 @@ const Se = i.string().min(1), yr = i.object({
|
|
|
3193
3194
|
payments: "payments",
|
|
3194
3195
|
settings: "settings",
|
|
3195
3196
|
discounts: "discounts"
|
|
3196
|
-
},
|
|
3197
|
-
systemCollections:
|
|
3198
|
-
storeCollections:
|
|
3197
|
+
}, or = {
|
|
3198
|
+
systemCollections: ar,
|
|
3199
|
+
storeCollections: ir,
|
|
3199
3200
|
// for client
|
|
3200
3201
|
getPath: ({
|
|
3201
3202
|
companyId: r,
|
|
@@ -3205,28 +3206,28 @@ const Se = i.string().min(1), yr = i.object({
|
|
|
3205
3206
|
}) => `${r}/${e}/${t}${n ? `/${n}` : ""}`,
|
|
3206
3207
|
// for backend
|
|
3207
3208
|
getDocPath: (r) => `{companyId}/{storeId}/${r}/{id}`
|
|
3208
|
-
},
|
|
3209
|
-
firestore:
|
|
3209
|
+
}, vr = {
|
|
3210
|
+
firestore: or
|
|
3210
3211
|
};
|
|
3211
3212
|
export {
|
|
3212
3213
|
rr as AddressSchema,
|
|
3213
3214
|
qe as BaseCategorySchema,
|
|
3214
|
-
|
|
3215
|
+
fr as CartSchema,
|
|
3215
3216
|
Oe as CategorySchema,
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3217
|
+
hr as CompanySchema,
|
|
3218
|
+
gr as DiscountSchema,
|
|
3219
|
+
mr as FavoriteProductSchema,
|
|
3220
|
+
vr as FirebaseAPI,
|
|
3220
3221
|
J as LocaleSchema,
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3222
|
+
cr as LocaleValueSchema,
|
|
3223
|
+
lr as NewProductSchema,
|
|
3224
|
+
yr as OrderSchema,
|
|
3224
3225
|
je as ProductSchema,
|
|
3225
3226
|
Je as ProfilePaymentTypeSchema,
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3227
|
+
sr as ProfileSchema,
|
|
3228
|
+
ur as TFlattenCategorySchema,
|
|
3229
|
+
pr as createEmptyProfile,
|
|
3229
3230
|
k as notEmptyTextSchema,
|
|
3230
|
-
|
|
3231
|
+
dr as numericTextSchema
|
|
3231
3232
|
};
|
|
3232
3233
|
//# sourceMappingURL=core.es.js.map
|