medusa-plugin-statistics 0.1.1 → 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.
@@ -1,44 +1,26 @@
1
1
  import { z } from '@medusajs/framework/zod';
2
2
  export declare const AdminGetStatistics: z.ZodObject<{
3
- period: z.ZodDefault<z.ZodOptional<z.ZodEnum<["today", "week", "month"]>>>;
3
+ period: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
4
+ today: "today";
5
+ week: "week";
6
+ month: "month";
7
+ }>>>;
4
8
  start_date: z.ZodOptional<z.ZodString>;
5
9
  end_date: z.ZodOptional<z.ZodString>;
6
- }, "strip", z.ZodTypeAny, {
7
- period: "today" | "week" | "month";
8
- start_date?: string | undefined;
9
- end_date?: string | undefined;
10
- }, {
11
- period?: "today" | "week" | "month" | undefined;
12
- start_date?: string | undefined;
13
- end_date?: string | undefined;
14
- }>;
10
+ }, z.core.$strip>;
15
11
  export type AdminGetStatisticsType = z.infer<typeof AdminGetStatistics>;
16
12
  export declare const AdminRecalculateStatistics: z.ZodObject<{
17
13
  date: z.ZodOptional<z.ZodString>;
18
- }, "strip", z.ZodTypeAny, {
19
- date?: string | undefined;
20
- }, {
21
- date?: string | undefined;
22
- }>;
14
+ }, z.core.$strip>;
23
15
  export type AdminRecalculateStatisticsType = z.infer<typeof AdminRecalculateStatistics>;
24
16
  export declare const AdminGetRecentOrders: z.ZodObject<{
25
- limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
26
- }, "strip", z.ZodTypeAny, {
27
- limit: number;
28
- }, {
29
- limit?: number | undefined;
30
- }>;
17
+ limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
18
+ }, z.core.$strip>;
31
19
  export type AdminGetRecentOrdersType = z.infer<typeof AdminGetRecentOrders>;
32
20
  export declare const AdminGetLowStock: z.ZodObject<{
33
- threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
34
- limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
35
- }, "strip", z.ZodTypeAny, {
36
- limit: number;
37
- threshold: number;
38
- }, {
39
- limit?: number | undefined;
40
- threshold?: number | undefined;
41
- }>;
21
+ threshold: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
22
+ limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
23
+ }, z.core.$strip>;
42
24
  export type AdminGetLowStockType = z.infer<typeof AdminGetLowStock>;
43
25
  export declare const AdminSaveStatisticsLayout: z.ZodObject<{
44
26
  layout: z.ZodArray<z.ZodObject<{
@@ -48,38 +30,6 @@ export declare const AdminSaveStatisticsLayout: z.ZodObject<{
48
30
  w: z.ZodNumber;
49
31
  h: z.ZodNumber;
50
32
  visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
51
- }, "strip", z.ZodTypeAny, {
52
- widget_id: string;
53
- x: number;
54
- y: number;
55
- w: number;
56
- h: number;
57
- visible: boolean;
58
- }, {
59
- widget_id: string;
60
- x: number;
61
- y: number;
62
- w: number;
63
- h: number;
64
- visible?: boolean | undefined;
65
- }>, "many">;
66
- }, "strip", z.ZodTypeAny, {
67
- layout: {
68
- widget_id: string;
69
- x: number;
70
- y: number;
71
- w: number;
72
- h: number;
73
- visible: boolean;
74
- }[];
75
- }, {
76
- layout: {
77
- widget_id: string;
78
- x: number;
79
- y: number;
80
- w: number;
81
- h: number;
82
- visible?: boolean | undefined;
83
- }[];
84
- }>;
33
+ }, z.core.$strip>>;
34
+ }, z.core.$strip>;
85
35
  export type AdminSaveStatisticsLayoutType = z.infer<typeof AdminSaveStatisticsLayout>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "medusa-plugin-statistics",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Dashboard statistics plugin for Medusa v2 with daily aggregation and customizable widgets",
5
5
  "author": "Lacey Pevey",
6
6
  "license": "MIT",
@@ -57,40 +57,38 @@
57
57
  "test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --detectOpenHandles --forceExit"
58
58
  },
59
59
  "dependencies": {
60
- "react-grid-layout": "^2.2.3",
61
- "recharts": "^2.15.3"
60
+ "react-grid-layout": "2.2.3",
61
+ "recharts": "2.15.3"
62
62
  },
63
63
  "devDependencies": {
64
- "@medusajs/admin-sdk": "2.13.6",
65
- "@medusajs/cli": "2.13.6",
66
- "@medusajs/framework": "2.13.6",
67
- "@medusajs/icons": "2.13.6",
68
- "@medusajs/ui": "4.0.25",
69
- "@swc/core": "^1.7.28",
70
- "@swc/jest": "^0.2.39",
71
- "@types/jest": "^30.0.0",
72
- "@types/node": "^20.0.0",
73
- "@types/react": "^18.3.2",
74
- "@types/react-dom": "^18.2.25",
75
- "@types/react-grid-layout": "^2.1.0",
76
- "jest": "^29.7.0",
77
- "prop-types": "^15.8.1",
78
- "react": "^18.2.0",
79
- "react-dom": "^18.2.0",
80
- "ts-node": "^10.9.2",
81
- "typescript": "^5.6.2",
82
- "vite": "^5.2.11",
83
- "yalc": "^1.0.0-pre.53"
64
+ "@medusajs/admin-sdk": "2.14.2",
65
+ "@medusajs/cli": "2.14.2",
66
+ "@medusajs/framework": "2.14.2",
67
+ "@medusajs/icons": "2.14.2",
68
+ "@medusajs/ui": "4.1.9",
69
+ "@swc/core": "1.7.28",
70
+ "@swc/jest": "0.2.39",
71
+ "@types/jest": "30.0.0",
72
+ "@types/node": "20.0.0",
73
+ "@types/react": "18.3.2",
74
+ "@types/react-dom": "18.2.25",
75
+ "@types/react-grid-layout": "2.1.0",
76
+ "jest": "29.7.0",
77
+ "prop-types": "15.8.1",
78
+ "react": "18.3.1",
79
+ "react-dom": "18.3.1",
80
+ "ts-node": "10.9.2",
81
+ "typescript": "5.6.2",
82
+ "vite": "5.4.14",
83
+ "yalc": "1.0.0-pre.53"
84
84
  },
85
85
  "peerDependencies": {
86
- "@medusajs/framework": "2.13.6",
87
- "@medusajs/js-sdk": "2.13.6",
88
- "@medusajs/medusa": "2.13.6"
89
- },
90
- "resolutions": {
91
- "zod": "3.25.76"
86
+ "@medusajs/framework": "2.14.2",
87
+ "@medusajs/js-sdk": "2.14.2",
88
+ "@medusajs/medusa": "2.14.2"
92
89
  },
93
90
  "engines": {
94
91
  "node": ">=20"
95
- }
96
- }
92
+ },
93
+ "gitHead": "35f16164d0d17e6281b2801a9f1eb355b5035571"
94
+ }