@jsdev_ninja/core 0.7.5 → 0.7.6
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/package.json +5 -1
- package/dist/core.cjs.js.map +0 -1
- package/dist/core.es.js +0 -3037
- package/dist/core.es.js.map +0 -1
- package/dist/core.umd.js +0 -2
- package/dist/core.umd.js.map +0 -1
- package/dist/entities/Address.d.ts +0 -28
- package/dist/entities/Address.d.ts.map +0 -1
- package/dist/entities/Address.js +0 -10
- package/dist/entities/Cart.d.ts +0 -715
- package/dist/entities/Cart.d.ts.map +0 -1
- package/dist/entities/Cart.js +0 -14
- package/dist/entities/Category.d.ts +0 -103
- package/dist/entities/Category.d.ts.map +0 -1
- package/dist/entities/Category.js +0 -20
- package/dist/entities/Locale.d.ts +0 -12
- package/dist/entities/Locale.d.ts.map +0 -1
- package/dist/entities/Locale.js +0 -5
- package/dist/entities/Order.d.ts +0 -1118
- package/dist/entities/Order.d.ts.map +0 -1
- package/dist/entities/Order.js +0 -30
- package/dist/entities/Payment.d.ts +0 -30
- package/dist/entities/Payment.d.ts.map +0 -1
- package/dist/entities/Payment.js +0 -12
- package/dist/entities/Product.d.ts +0 -1000
- package/dist/entities/Product.d.ts.map +0 -1
- package/dist/entities/Product.js +0 -64
- package/dist/entities/Profile.d.ts +0 -102
- package/dist/entities/Profile.d.ts.map +0 -1
- package/dist/entities/Profile.js +0 -45
- package/dist/entities/index.d.ts +0 -6
- package/dist/entities/index.d.ts.map +0 -1
- package/dist/entities/index.js +0 -5
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -1
- package/dist/tsconfig.app.tsbuildinfo +0 -1
- package/dist/tsconfig.node.tsbuildinfo +0 -1
- package/dist/vite.config.d.ts +0 -3
- package/dist/vite.config.d.ts.map +0 -1
- package/dist/vite.config.js +0 -25
- package/eslint.config.js +0 -28
- package/index.html +0 -13
- package/src/App.css +0 -42
- package/src/App.tsx +0 -35
- package/src/assets/react.svg +0 -1
- package/src/index.css +0 -68
- package/src/main.tsx +0 -3
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.app.json +0 -19
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -26
- package/vite.config.ts +0 -27
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../lib/entities/Order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBtB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/entities/Order.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { AddressSchema } from "./Address";
|
|
3
|
-
import { ProfileSchema } from "./Profile";
|
|
4
|
-
import { ProductSchema } from "./Product";
|
|
5
|
-
// pending - order created / by user
|
|
6
|
-
// processing order accepted by store by admin
|
|
7
|
-
// delivered - order delivered by admin
|
|
8
|
-
// canceled - order canceled by user/admin
|
|
9
|
-
// completed - order paid by admin
|
|
10
|
-
// type PaymentStatus = "pending" | "completed" | "failed" | "refunded" | "partially_refunded";
|
|
11
|
-
// type PaymentMethod = "credit_card" | "paypal" | "bank_transfer" | "cash_on_delivery";
|
|
12
|
-
export const OrderSchema = z.object({
|
|
13
|
-
type: z.literal("Order"),
|
|
14
|
-
id: z.string(),
|
|
15
|
-
companyId: z.string(),
|
|
16
|
-
storeId: z.string(),
|
|
17
|
-
userId: z.string(),
|
|
18
|
-
status: z.enum(["pending", "processing", "delivered", "canceled", "completed", "refunded"]),
|
|
19
|
-
cart: z.object({
|
|
20
|
-
id: z.string(),
|
|
21
|
-
items: z.array(z.object({ product: ProductSchema, amount: z.number() })),
|
|
22
|
-
cartTotal: z.number(),
|
|
23
|
-
cartDiscount: z.number(),
|
|
24
|
-
cartVat: z.number(),
|
|
25
|
-
}),
|
|
26
|
-
date: z.number(),
|
|
27
|
-
deliveryDate: z.number().optional(),
|
|
28
|
-
client: ProfileSchema,
|
|
29
|
-
address: AddressSchema,
|
|
30
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const PaymentSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodString;
|
|
4
|
-
orderId: z.ZodString;
|
|
5
|
-
amount: z.ZodNumber;
|
|
6
|
-
method: z.ZodEnum<["credit_card", "paypal", "bank_transfer"]>;
|
|
7
|
-
status: z.ZodDefault<z.ZodEnum<["pending", "completed", "failed"]>>;
|
|
8
|
-
transactionId: z.ZodOptional<z.ZodString>;
|
|
9
|
-
createdAt: z.ZodDefault<z.ZodDate>;
|
|
10
|
-
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
status: "pending" | "completed" | "failed";
|
|
13
|
-
id: string;
|
|
14
|
-
amount: number;
|
|
15
|
-
orderId: string;
|
|
16
|
-
method: "credit_card" | "paypal" | "bank_transfer";
|
|
17
|
-
createdAt: Date;
|
|
18
|
-
transactionId?: string | undefined;
|
|
19
|
-
updatedAt?: Date | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
id: string;
|
|
22
|
-
amount: number;
|
|
23
|
-
orderId: string;
|
|
24
|
-
method: "credit_card" | "paypal" | "bank_transfer";
|
|
25
|
-
status?: "pending" | "completed" | "failed" | undefined;
|
|
26
|
-
transactionId?: string | undefined;
|
|
27
|
-
createdAt?: Date | undefined;
|
|
28
|
-
updatedAt?: Date | undefined;
|
|
29
|
-
}>;
|
|
30
|
-
//# sourceMappingURL=Payment.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Payment.d.ts","sourceRoot":"","sources":["../../lib/entities/Payment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;EASxB,CAAC"}
|
package/dist/entities/Payment.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
// 7. Payment Schema
|
|
3
|
-
export const PaymentSchema = z.object({
|
|
4
|
-
id: z.string().uuid(),
|
|
5
|
-
orderId: z.string().uuid(), // Reference to Order ID
|
|
6
|
-
amount: z.number().positive({ message: "Amount must be a positive number." }),
|
|
7
|
-
method: z.enum(["credit_card", "paypal", "bank_transfer"]),
|
|
8
|
-
status: z.enum(["pending", "completed", "failed"]).default("pending"),
|
|
9
|
-
transactionId: z.string().optional(),
|
|
10
|
-
createdAt: z.date().default(new Date()),
|
|
11
|
-
updatedAt: z.date().optional(),
|
|
12
|
-
});
|