@jsdev_ninja/core 0.8.33 → 0.8.35

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.
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+
3
+ export const CompanySchema = z.object({
4
+ id: z.string(),
5
+ name: z.string(),
6
+ websiteDomains: z.array(z.string()),
7
+ owner: z.object({
8
+ name: z.string(),
9
+ emails: z.object({
10
+ mainEmail: z.string(),
11
+ }),
12
+ }),
13
+ });
14
+
15
+ export type TCompany = z.infer<typeof CompanySchema>;
@@ -16,7 +16,15 @@ export const OrderSchema = z.object({
16
16
  companyId: z.string(),
17
17
  storeId: z.string(),
18
18
  userId: z.string(),
19
- status: z.enum(["pending", "processing", "delivered", "canceled", "completed", "refunded"]),
19
+ status: z.enum([
20
+ "pending",
21
+ "processing",
22
+ "in_delivery",
23
+ "delivered",
24
+ "canceled",
25
+ "completed",
26
+ "refunded",
27
+ ]),
20
28
  paymentStatus: z.enum(["pending", "completed", "failed", "refunded"]),
21
29
  cart: z.object({
22
30
  id: z.string(),
@@ -17,4 +17,10 @@ const StoreSchema = z.object({
17
17
  .optional(),
18
18
  });
19
19
 
20
+ // private sub collection
21
+ export const StorePrivateSchema = z.object({
22
+ storeEmail: z.string().email(),
23
+ });
24
+
20
25
  export type TStore = z.infer<typeof StoreSchema>;
26
+ export type TStorePrivate = z.infer<typeof StorePrivateSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsdev_ninja/core",
3
- "version": "0.8.33",
3
+ "version": "0.8.35",
4
4
  "main": "dist/core.cjs.js",
5
5
  "module": "dist/core.es.js",
6
6
  "types": "dist/index.d.ts",