medusa-plugin-ratings 0.1.0 → 0.2.0
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/.medusa/server/src/api/validators.d.ts +31 -109
- package/.medusa/server/src/api/validators.js +3 -3
- package/.medusa/server/src/modules/review/models/review-activity.d.ts +1 -1
- package/.medusa/server/src/modules/review/models/review.d.ts +1 -1
- package/.medusa/server/src/modules/review/service.d.ts +5 -18
- package/package.json +25 -24
|
@@ -2,143 +2,65 @@ import { z } from '@medusajs/framework/zod';
|
|
|
2
2
|
export type AdminGetReviewsType = z.infer<typeof AdminGetReviews>;
|
|
3
3
|
export declare const AdminGetReviews: z.ZodObject<{
|
|
4
4
|
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
5
|
+
offset: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
6
|
+
limit: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
8
7
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
9
|
-
with_deleted: z.
|
|
10
|
-
} & {
|
|
8
|
+
with_deleted: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
|
|
11
9
|
q: z.ZodOptional<z.ZodString>;
|
|
12
|
-
status: z.ZodOptional<z.ZodEnum<
|
|
10
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
pending: "pending";
|
|
12
|
+
approved: "approved";
|
|
13
|
+
rejected: "rejected";
|
|
14
|
+
}>>;
|
|
13
15
|
product_id: z.ZodOptional<z.ZodString>;
|
|
14
16
|
customer_id: z.ZodOptional<z.ZodString>;
|
|
15
|
-
},
|
|
16
|
-
limit: number;
|
|
17
|
-
offset: number;
|
|
18
|
-
q?: string | undefined;
|
|
19
|
-
status?: "pending" | "approved" | "rejected" | undefined;
|
|
20
|
-
product_id?: string | undefined;
|
|
21
|
-
customer_id?: string | undefined;
|
|
22
|
-
fields?: string | undefined;
|
|
23
|
-
order?: string | undefined;
|
|
24
|
-
with_deleted?: boolean | undefined;
|
|
25
|
-
}, {
|
|
26
|
-
limit?: unknown;
|
|
27
|
-
offset?: unknown;
|
|
28
|
-
q?: string | undefined;
|
|
29
|
-
status?: "pending" | "approved" | "rejected" | undefined;
|
|
30
|
-
product_id?: string | undefined;
|
|
31
|
-
customer_id?: string | undefined;
|
|
32
|
-
fields?: string | undefined;
|
|
33
|
-
order?: string | undefined;
|
|
34
|
-
with_deleted?: unknown;
|
|
35
|
-
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
36
18
|
export type AdminGetReviewType = z.infer<typeof AdminGetReview>;
|
|
37
19
|
export declare const AdminGetReview: z.ZodObject<{
|
|
38
20
|
fields: z.ZodOptional<z.ZodString>;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
21
|
+
offset: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
22
|
+
limit: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
42
23
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
43
|
-
with_deleted: z.
|
|
44
|
-
},
|
|
45
|
-
offset: number;
|
|
46
|
-
limit: number;
|
|
47
|
-
order?: string | undefined;
|
|
48
|
-
fields?: string | undefined;
|
|
49
|
-
with_deleted?: boolean | undefined;
|
|
50
|
-
}, {
|
|
51
|
-
order?: string | undefined;
|
|
52
|
-
fields?: string | undefined;
|
|
53
|
-
offset?: unknown;
|
|
54
|
-
limit?: unknown;
|
|
55
|
-
with_deleted?: unknown;
|
|
56
|
-
}>;
|
|
24
|
+
with_deleted: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
57
26
|
export type AdminUpdateReviewType = z.infer<typeof AdminUpdateReview>;
|
|
58
27
|
export declare const AdminUpdateReview: z.ZodObject<{
|
|
59
|
-
status: z.ZodOptional<z.ZodEnum<
|
|
28
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
pending: "pending";
|
|
30
|
+
approved: "approved";
|
|
31
|
+
rejected: "rejected";
|
|
32
|
+
}>>;
|
|
60
33
|
title: z.ZodOptional<z.ZodString>;
|
|
61
34
|
body: z.ZodOptional<z.ZodString>;
|
|
62
35
|
rating: z.ZodOptional<z.ZodNumber>;
|
|
63
36
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
64
|
-
},
|
|
65
|
-
status?: "pending" | "approved" | "rejected" | undefined;
|
|
66
|
-
title?: string | undefined;
|
|
67
|
-
body?: string | undefined;
|
|
68
|
-
rating?: number | undefined;
|
|
69
|
-
metadata?: Record<string, unknown> | undefined;
|
|
70
|
-
}, {
|
|
71
|
-
status?: "pending" | "approved" | "rejected" | undefined;
|
|
72
|
-
title?: string | undefined;
|
|
73
|
-
body?: string | undefined;
|
|
74
|
-
rating?: number | undefined;
|
|
75
|
-
metadata?: Record<string, unknown> | undefined;
|
|
76
|
-
}>;
|
|
37
|
+
}, z.core.$strip>;
|
|
77
38
|
export type AdminDeleteReviewsType = z.infer<typeof AdminDeleteReviews>;
|
|
78
39
|
export declare const AdminDeleteReviews: z.ZodObject<{
|
|
79
|
-
ids: z.ZodArray<z.ZodString
|
|
80
|
-
},
|
|
81
|
-
ids: string[];
|
|
82
|
-
}, {
|
|
83
|
-
ids: string[];
|
|
84
|
-
}>;
|
|
40
|
+
ids: z.ZodArray<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>;
|
|
85
42
|
export type AdminApproveReviewActionType = z.infer<typeof AdminApproveReviewAction>;
|
|
86
43
|
export declare const AdminApproveReviewAction: z.ZodObject<{
|
|
87
|
-
ids: z.ZodArray<z.ZodString
|
|
88
|
-
},
|
|
89
|
-
ids: string[];
|
|
90
|
-
}, {
|
|
91
|
-
ids: string[];
|
|
92
|
-
}>;
|
|
44
|
+
ids: z.ZodArray<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>;
|
|
93
46
|
export type AdminRejectReviewActionType = z.infer<typeof AdminRejectReviewAction>;
|
|
94
47
|
export declare const AdminRejectReviewAction: z.ZodObject<{
|
|
95
|
-
ids: z.ZodArray<z.ZodString
|
|
96
|
-
},
|
|
97
|
-
ids: string[];
|
|
98
|
-
}, {
|
|
99
|
-
ids: string[];
|
|
100
|
-
}>;
|
|
48
|
+
ids: z.ZodArray<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>;
|
|
101
50
|
export type StoreCreateReviewType = z.infer<typeof StoreCreateReview>;
|
|
102
51
|
export declare const StoreCreateReview: z.ZodObject<{
|
|
103
52
|
rating: z.ZodNumber;
|
|
104
53
|
title: z.ZodOptional<z.ZodString>;
|
|
105
54
|
body: z.ZodString;
|
|
106
55
|
author_name: z.ZodString;
|
|
107
|
-
author_email: z.ZodOptional<z.
|
|
56
|
+
author_email: z.ZodOptional<z.ZodEmail>;
|
|
108
57
|
order_id: z.ZodOptional<z.ZodString>;
|
|
109
|
-
},
|
|
110
|
-
body: string;
|
|
111
|
-
rating: number;
|
|
112
|
-
author_name: string;
|
|
113
|
-
title?: string | undefined;
|
|
114
|
-
author_email?: string | undefined;
|
|
115
|
-
order_id?: string | undefined;
|
|
116
|
-
}, {
|
|
117
|
-
body: string;
|
|
118
|
-
rating: number;
|
|
119
|
-
author_name: string;
|
|
120
|
-
title?: string | undefined;
|
|
121
|
-
author_email?: string | undefined;
|
|
122
|
-
order_id?: string | undefined;
|
|
123
|
-
}>;
|
|
58
|
+
}, z.core.$strip>;
|
|
124
59
|
export type StoreGetReviewsType = z.infer<typeof StoreGetReviews>;
|
|
125
60
|
export declare const StoreGetReviews: z.ZodObject<{
|
|
126
61
|
fields: z.ZodOptional<z.ZodString>;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
62
|
+
offset: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
63
|
+
limit: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
130
64
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
131
|
-
with_deleted: z.
|
|
132
|
-
},
|
|
133
|
-
offset: number;
|
|
134
|
-
limit: number;
|
|
135
|
-
order?: string | undefined;
|
|
136
|
-
fields?: string | undefined;
|
|
137
|
-
with_deleted?: boolean | undefined;
|
|
138
|
-
}, {
|
|
139
|
-
order?: string | undefined;
|
|
140
|
-
fields?: string | undefined;
|
|
141
|
-
offset?: unknown;
|
|
142
|
-
limit?: unknown;
|
|
143
|
-
with_deleted?: unknown;
|
|
144
|
-
}>;
|
|
65
|
+
with_deleted: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
@@ -15,7 +15,7 @@ exports.AdminUpdateReview = zod_1.z.object({
|
|
|
15
15
|
title: zod_1.z.string().optional(),
|
|
16
16
|
body: zod_1.z.string().optional(),
|
|
17
17
|
rating: zod_1.z.number().min(1).max(5).optional(),
|
|
18
|
-
metadata: zod_1.z.record(zod_1.z.unknown()).optional()
|
|
18
|
+
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional()
|
|
19
19
|
});
|
|
20
20
|
exports.AdminDeleteReviews = zod_1.z.object({
|
|
21
21
|
ids: zod_1.z.array(zod_1.z.string()).min(1)
|
|
@@ -31,8 +31,8 @@ exports.StoreCreateReview = zod_1.z.object({
|
|
|
31
31
|
title: zod_1.z.string().optional(),
|
|
32
32
|
body: zod_1.z.string().min(1, 'Review body is required'),
|
|
33
33
|
author_name: zod_1.z.string().min(1, 'Author name is required'),
|
|
34
|
-
author_email: zod_1.z.
|
|
34
|
+
author_email: zod_1.z.email().optional(),
|
|
35
35
|
order_id: zod_1.z.string().optional()
|
|
36
36
|
});
|
|
37
37
|
exports.StoreGetReviews = (0, validators_1.createFindParams)({ limit: 20, offset: 0 });
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9hcGkvdmFsaWRhdG9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxpREFBMkM7QUFDM0Msc0VBQXdFO0FBRzNELFFBQUEsZUFBZSxHQUFHLElBQUEsNkJBQWdCLEVBQUMsRUFBRSxLQUFLLEVBQUUsRUFBRSxFQUFFLE1BQU0sRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDLE1BQU0sQ0FBQztJQUNoRixDQUFDLEVBQUUsT0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUN4QixNQUFNLEVBQUUsT0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLFNBQVMsRUFBRSxVQUFVLEVBQUUsVUFBVSxDQUFDLENBQUMsQ0FBQyxRQUFRLEVBQUU7SUFDOUQsVUFBVSxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDakMsV0FBVyxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxRQUFRL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import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
23
23
|
customer_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
24
24
|
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
25
|
-
activity: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder
|
|
25
|
+
activity: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<any>, "review_activity">>;
|
|
26
26
|
}>, "review">, undefined>;
|
|
27
27
|
}>, "review_activity">;
|
|
@@ -21,6 +21,6 @@ export declare const Review: import("@medusajs/framework/utils").DmlEntity<impor
|
|
|
21
21
|
user_id: import("@medusajs/framework/utils").TextProperty;
|
|
22
22
|
note: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
23
23
|
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
24
|
-
review: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder
|
|
24
|
+
review: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<any>, "review">, undefined>;
|
|
25
25
|
}>, "review_activity">>;
|
|
26
26
|
}>, "review">;
|
|
@@ -22,7 +22,7 @@ declare const ReviewService_base: import("@medusajs/framework/utils").MedusaServ
|
|
|
22
22
|
user_id: import("@medusajs/framework/utils").TextProperty;
|
|
23
23
|
note: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
24
24
|
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
25
|
-
review: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder
|
|
25
|
+
review: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<any>, "review">, undefined>;
|
|
26
26
|
}>, "review_activity">>;
|
|
27
27
|
}>, "review">;
|
|
28
28
|
readonly ReviewActivity: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
@@ -31,20 +31,7 @@ declare const ReviewService_base: import("@medusajs/framework/utils").MedusaServ
|
|
|
31
31
|
user_id: import("@medusajs/framework/utils").TextProperty;
|
|
32
32
|
note: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
33
33
|
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
34
|
-
review: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<
|
|
35
|
-
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
36
|
-
status: import("@medusajs/framework/utils").EnumProperty<typeof ReviewStatus>;
|
|
37
|
-
rating: import("@medusajs/framework/utils").NumberProperty;
|
|
38
|
-
title: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
39
|
-
body: import("@medusajs/framework/utils").TextProperty;
|
|
40
|
-
author_name: import("@medusajs/framework/utils").TextProperty;
|
|
41
|
-
author_email: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
42
|
-
product_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
43
|
-
order_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
44
|
-
customer_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
45
|
-
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
46
|
-
activity: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "review_activity">>;
|
|
47
|
-
}>, "review">, undefined>;
|
|
34
|
+
review: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<any>, "review">, undefined>;
|
|
48
35
|
}>, "review_activity">;
|
|
49
36
|
}>>;
|
|
50
37
|
export declare class ReviewService extends ReviewService_base {
|
|
@@ -69,7 +56,7 @@ export declare class ReviewService extends ReviewService_base {
|
|
|
69
56
|
user_id: string;
|
|
70
57
|
note: string | null;
|
|
71
58
|
metadata: Record<string, unknown> | null;
|
|
72
|
-
review:
|
|
59
|
+
review: any;
|
|
73
60
|
created_at: Date;
|
|
74
61
|
updated_at: Date;
|
|
75
62
|
deleted_at: Date | null;
|
|
@@ -97,7 +84,7 @@ export declare class ReviewService extends ReviewService_base {
|
|
|
97
84
|
user_id: string;
|
|
98
85
|
note: string | null;
|
|
99
86
|
metadata: Record<string, unknown> | null;
|
|
100
|
-
review:
|
|
87
|
+
review: any;
|
|
101
88
|
created_at: Date;
|
|
102
89
|
updated_at: Date;
|
|
103
90
|
deleted_at: Date | null;
|
|
@@ -125,7 +112,7 @@ export declare class ReviewService extends ReviewService_base {
|
|
|
125
112
|
order_id: string | null;
|
|
126
113
|
customer_id: string | null;
|
|
127
114
|
metadata: Record<string, unknown> | null;
|
|
128
|
-
activity:
|
|
115
|
+
activity: any[];
|
|
129
116
|
created_at: Date;
|
|
130
117
|
updated_at: Date;
|
|
131
118
|
deleted_at: Date | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "medusa-plugin-ratings",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Product review and rating plugin for Medusa v2 with moderation workflow",
|
|
5
5
|
"author": "Lacey Pevey",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,32 +57,33 @@
|
|
|
57
57
|
"test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --detectOpenHandles --forceExit"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@medusajs/admin-sdk": "2.
|
|
61
|
-
"@medusajs/cli": "2.
|
|
62
|
-
"@medusajs/framework": "2.
|
|
63
|
-
"@medusajs/icons": "2.
|
|
64
|
-
"@medusajs/ui": "4.
|
|
65
|
-
"@swc/core": "
|
|
66
|
-
"@swc/jest": "
|
|
67
|
-
"@types/jest": "
|
|
68
|
-
"@types/node": "
|
|
69
|
-
"@types/react": "
|
|
70
|
-
"@types/react-dom": "
|
|
71
|
-
"jest": "
|
|
72
|
-
"prop-types": "
|
|
73
|
-
"react": "
|
|
74
|
-
"react-dom": "
|
|
75
|
-
"ts-node": "
|
|
76
|
-
"typescript": "
|
|
77
|
-
"vite": "
|
|
78
|
-
"yalc": "
|
|
60
|
+
"@medusajs/admin-sdk": "2.14.2",
|
|
61
|
+
"@medusajs/cli": "2.14.2",
|
|
62
|
+
"@medusajs/framework": "2.14.2",
|
|
63
|
+
"@medusajs/icons": "2.14.2",
|
|
64
|
+
"@medusajs/ui": "4.1.9",
|
|
65
|
+
"@swc/core": "1.7.28",
|
|
66
|
+
"@swc/jest": "0.2.39",
|
|
67
|
+
"@types/jest": "30.0.0",
|
|
68
|
+
"@types/node": "20.0.0",
|
|
69
|
+
"@types/react": "18.3.2",
|
|
70
|
+
"@types/react-dom": "18.2.25",
|
|
71
|
+
"jest": "29.7.0",
|
|
72
|
+
"prop-types": "15.8.1",
|
|
73
|
+
"react": "18.3.1",
|
|
74
|
+
"react-dom": "18.3.1",
|
|
75
|
+
"ts-node": "10.9.2",
|
|
76
|
+
"typescript": "5.6.2",
|
|
77
|
+
"vite": "5.4.14",
|
|
78
|
+
"yalc": "1.0.0-pre.53"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@medusajs/framework": "2.
|
|
82
|
-
"@medusajs/js-sdk": "2.
|
|
83
|
-
"@medusajs/medusa": "2.
|
|
81
|
+
"@medusajs/framework": "2.14.2",
|
|
82
|
+
"@medusajs/js-sdk": "2.14.2",
|
|
83
|
+
"@medusajs/medusa": "2.14.2"
|
|
84
84
|
},
|
|
85
85
|
"engines": {
|
|
86
86
|
"node": ">=20"
|
|
87
|
-
}
|
|
87
|
+
},
|
|
88
|
+
"gitHead": "35f16164d0d17e6281b2801a9f1eb355b5035571"
|
|
88
89
|
}
|