@conversokit/shared 0.1.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.
Files changed (47) hide show
  1. package/LICENSE +201 -0
  2. package/dist/compliance.d.ts +22 -0
  3. package/dist/compliance.d.ts.map +1 -0
  4. package/dist/compliance.js +15 -0
  5. package/dist/index.d.ts +15 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +14 -0
  8. package/dist/mock/availability.d.ts +3 -0
  9. package/dist/mock/availability.d.ts.map +1 -0
  10. package/dist/mock/availability.js +34 -0
  11. package/dist/mock/cart.d.ts +4 -0
  12. package/dist/mock/cart.d.ts.map +1 -0
  13. package/dist/mock/cart.js +16 -0
  14. package/dist/mock/dashboard.d.ts +6 -0
  15. package/dist/mock/dashboard.d.ts.map +1 -0
  16. package/dist/mock/dashboard.js +51 -0
  17. package/dist/mock/leadForm.d.ts +3 -0
  18. package/dist/mock/leadForm.d.ts.map +1 -0
  19. package/dist/mock/leadForm.js +53 -0
  20. package/dist/mock/products.d.ts +3 -0
  21. package/dist/mock/products.d.ts.map +1 -0
  22. package/dist/mock/products.js +29 -0
  23. package/dist/mock/travel.d.ts +6 -0
  24. package/dist/mock/travel.d.ts.map +1 -0
  25. package/dist/mock/travel.js +105 -0
  26. package/dist/schemas/booking.d.ts +116 -0
  27. package/dist/schemas/booking.d.ts.map +1 -0
  28. package/dist/schemas/booking.js +30 -0
  29. package/dist/schemas/commerce.d.ts +184 -0
  30. package/dist/schemas/commerce.d.ts.map +1 -0
  31. package/dist/schemas/commerce.js +25 -0
  32. package/dist/schemas/dashboard.d.ts +197 -0
  33. package/dist/schemas/dashboard.d.ts.map +1 -0
  34. package/dist/schemas/dashboard.js +31 -0
  35. package/dist/schemas/leadgen.d.ts +181 -0
  36. package/dist/schemas/leadgen.d.ts.map +1 -0
  37. package/dist/schemas/leadgen.js +33 -0
  38. package/dist/schemas/travel.d.ts +266 -0
  39. package/dist/schemas/travel.d.ts.map +1 -0
  40. package/dist/schemas/travel.js +51 -0
  41. package/dist/tool.d.ts +45 -0
  42. package/dist/tool.d.ts.map +1 -0
  43. package/dist/tool.js +3 -0
  44. package/dist/widget-config.d.ts +37 -0
  45. package/dist/widget-config.d.ts.map +1 -0
  46. package/dist/widget-config.js +5 -0
  47. package/package.json +36 -0
@@ -0,0 +1,116 @@
1
+ import { z } from 'zod';
2
+ export declare const timeSlotSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ startsAt: z.ZodString;
5
+ endsAt: z.ZodString;
6
+ available: z.ZodDefault<z.ZodBoolean>;
7
+ price: z.ZodOptional<z.ZodString>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ id: string;
10
+ startsAt: string;
11
+ endsAt: string;
12
+ available: boolean;
13
+ price?: string | undefined;
14
+ }, {
15
+ id: string;
16
+ startsAt: string;
17
+ endsAt: string;
18
+ price?: string | undefined;
19
+ available?: boolean | undefined;
20
+ }>;
21
+ export type TimeSlot = z.infer<typeof timeSlotSchema>;
22
+ export declare const availabilitySchema: z.ZodObject<{
23
+ resourceId: z.ZodString;
24
+ resourceName: z.ZodOptional<z.ZodString>;
25
+ date: z.ZodString;
26
+ slots: z.ZodArray<z.ZodObject<{
27
+ id: z.ZodString;
28
+ startsAt: z.ZodString;
29
+ endsAt: z.ZodString;
30
+ available: z.ZodDefault<z.ZodBoolean>;
31
+ price: z.ZodOptional<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ id: string;
34
+ startsAt: string;
35
+ endsAt: string;
36
+ available: boolean;
37
+ price?: string | undefined;
38
+ }, {
39
+ id: string;
40
+ startsAt: string;
41
+ endsAt: string;
42
+ price?: string | undefined;
43
+ available?: boolean | undefined;
44
+ }>, "many">;
45
+ }, "strip", z.ZodTypeAny, {
46
+ date: string;
47
+ resourceId: string;
48
+ slots: {
49
+ id: string;
50
+ startsAt: string;
51
+ endsAt: string;
52
+ available: boolean;
53
+ price?: string | undefined;
54
+ }[];
55
+ resourceName?: string | undefined;
56
+ }, {
57
+ date: string;
58
+ resourceId: string;
59
+ slots: {
60
+ id: string;
61
+ startsAt: string;
62
+ endsAt: string;
63
+ price?: string | undefined;
64
+ available?: boolean | undefined;
65
+ }[];
66
+ resourceName?: string | undefined;
67
+ }>;
68
+ export type Availability = z.infer<typeof availabilitySchema>;
69
+ export declare const reservationSchema: z.ZodObject<{
70
+ id: z.ZodString;
71
+ resourceId: z.ZodString;
72
+ resourceName: z.ZodOptional<z.ZodString>;
73
+ slotId: z.ZodString;
74
+ startsAt: z.ZodString;
75
+ endsAt: z.ZodString;
76
+ status: z.ZodEnum<["confirmed", "pending", "cancelled"]>;
77
+ customer: z.ZodOptional<z.ZodObject<{
78
+ name: z.ZodString;
79
+ email: z.ZodOptional<z.ZodString>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ name: string;
82
+ email?: string | undefined;
83
+ }, {
84
+ name: string;
85
+ email?: string | undefined;
86
+ }>>;
87
+ notes: z.ZodOptional<z.ZodString>;
88
+ }, "strip", z.ZodTypeAny, {
89
+ status: "confirmed" | "pending" | "cancelled";
90
+ id: string;
91
+ startsAt: string;
92
+ endsAt: string;
93
+ resourceId: string;
94
+ slotId: string;
95
+ resourceName?: string | undefined;
96
+ customer?: {
97
+ name: string;
98
+ email?: string | undefined;
99
+ } | undefined;
100
+ notes?: string | undefined;
101
+ }, {
102
+ status: "confirmed" | "pending" | "cancelled";
103
+ id: string;
104
+ startsAt: string;
105
+ endsAt: string;
106
+ resourceId: string;
107
+ slotId: string;
108
+ resourceName?: string | undefined;
109
+ customer?: {
110
+ name: string;
111
+ email?: string | undefined;
112
+ } | undefined;
113
+ notes?: string | undefined;
114
+ }>;
115
+ export type Reservation = z.infer<typeof reservationSchema>;
116
+ //# sourceMappingURL=booking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"booking.d.ts","sourceRoot":"","sources":["../../src/schemas/booking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;EAMzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ export const timeSlotSchema = z.object({
3
+ id: z.string(),
4
+ startsAt: z.string(),
5
+ endsAt: z.string(),
6
+ available: z.boolean().default(true),
7
+ price: z.string().optional()
8
+ });
9
+ export const availabilitySchema = z.object({
10
+ resourceId: z.string(),
11
+ resourceName: z.string().optional(),
12
+ date: z.string(),
13
+ slots: z.array(timeSlotSchema)
14
+ });
15
+ export const reservationSchema = z.object({
16
+ id: z.string(),
17
+ resourceId: z.string(),
18
+ resourceName: z.string().optional(),
19
+ slotId: z.string(),
20
+ startsAt: z.string(),
21
+ endsAt: z.string(),
22
+ status: z.enum(['confirmed', 'pending', 'cancelled']),
23
+ customer: z
24
+ .object({
25
+ name: z.string(),
26
+ email: z.string().email().optional()
27
+ })
28
+ .optional(),
29
+ notes: z.string().optional()
30
+ });
@@ -0,0 +1,184 @@
1
+ import { z } from 'zod';
2
+ export declare const productSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ title: z.ZodString;
5
+ subtitle: z.ZodOptional<z.ZodString>;
6
+ imageUrl: z.ZodOptional<z.ZodString>;
7
+ price: z.ZodOptional<z.ZodString>;
8
+ badge: z.ZodOptional<z.ZodString>;
9
+ rating: z.ZodOptional<z.ZodNumber>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ id: string;
12
+ title: string;
13
+ subtitle?: string | undefined;
14
+ imageUrl?: string | undefined;
15
+ price?: string | undefined;
16
+ badge?: string | undefined;
17
+ rating?: number | undefined;
18
+ }, {
19
+ id: string;
20
+ title: string;
21
+ subtitle?: string | undefined;
22
+ imageUrl?: string | undefined;
23
+ price?: string | undefined;
24
+ badge?: string | undefined;
25
+ rating?: number | undefined;
26
+ }>;
27
+ export type Product = z.infer<typeof productSchema>;
28
+ export declare const cartItemSchema: z.ZodObject<{
29
+ id: z.ZodString;
30
+ title: z.ZodString;
31
+ subtitle: z.ZodOptional<z.ZodString>;
32
+ imageUrl: z.ZodOptional<z.ZodString>;
33
+ price: z.ZodOptional<z.ZodString>;
34
+ badge: z.ZodOptional<z.ZodString>;
35
+ rating: z.ZodOptional<z.ZodNumber>;
36
+ } & {
37
+ quantity: z.ZodNumber;
38
+ }, "strip", z.ZodTypeAny, {
39
+ id: string;
40
+ title: string;
41
+ quantity: number;
42
+ subtitle?: string | undefined;
43
+ imageUrl?: string | undefined;
44
+ price?: string | undefined;
45
+ badge?: string | undefined;
46
+ rating?: number | undefined;
47
+ }, {
48
+ id: string;
49
+ title: string;
50
+ quantity: number;
51
+ subtitle?: string | undefined;
52
+ imageUrl?: string | undefined;
53
+ price?: string | undefined;
54
+ badge?: string | undefined;
55
+ rating?: number | undefined;
56
+ }>;
57
+ export type CartItem = z.infer<typeof cartItemSchema>;
58
+ export declare const cartSchema: z.ZodObject<{
59
+ items: z.ZodArray<z.ZodObject<{
60
+ id: z.ZodString;
61
+ title: z.ZodString;
62
+ subtitle: z.ZodOptional<z.ZodString>;
63
+ imageUrl: z.ZodOptional<z.ZodString>;
64
+ price: z.ZodOptional<z.ZodString>;
65
+ badge: z.ZodOptional<z.ZodString>;
66
+ rating: z.ZodOptional<z.ZodNumber>;
67
+ } & {
68
+ quantity: z.ZodNumber;
69
+ }, "strip", z.ZodTypeAny, {
70
+ id: string;
71
+ title: string;
72
+ quantity: number;
73
+ subtitle?: string | undefined;
74
+ imageUrl?: string | undefined;
75
+ price?: string | undefined;
76
+ badge?: string | undefined;
77
+ rating?: number | undefined;
78
+ }, {
79
+ id: string;
80
+ title: string;
81
+ quantity: number;
82
+ subtitle?: string | undefined;
83
+ imageUrl?: string | undefined;
84
+ price?: string | undefined;
85
+ badge?: string | undefined;
86
+ rating?: number | undefined;
87
+ }>, "many">;
88
+ currency: z.ZodDefault<z.ZodString>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ items: {
91
+ id: string;
92
+ title: string;
93
+ quantity: number;
94
+ subtitle?: string | undefined;
95
+ imageUrl?: string | undefined;
96
+ price?: string | undefined;
97
+ badge?: string | undefined;
98
+ rating?: number | undefined;
99
+ }[];
100
+ currency: string;
101
+ }, {
102
+ items: {
103
+ id: string;
104
+ title: string;
105
+ quantity: number;
106
+ subtitle?: string | undefined;
107
+ imageUrl?: string | undefined;
108
+ price?: string | undefined;
109
+ badge?: string | undefined;
110
+ rating?: number | undefined;
111
+ }[];
112
+ currency?: string | undefined;
113
+ }>;
114
+ export type Cart = z.infer<typeof cartSchema>;
115
+ export declare const checkoutSummarySchema: z.ZodObject<{
116
+ items: z.ZodArray<z.ZodObject<{
117
+ id: z.ZodString;
118
+ title: z.ZodString;
119
+ subtitle: z.ZodOptional<z.ZodString>;
120
+ imageUrl: z.ZodOptional<z.ZodString>;
121
+ price: z.ZodOptional<z.ZodString>;
122
+ badge: z.ZodOptional<z.ZodString>;
123
+ rating: z.ZodOptional<z.ZodNumber>;
124
+ } & {
125
+ quantity: z.ZodNumber;
126
+ }, "strip", z.ZodTypeAny, {
127
+ id: string;
128
+ title: string;
129
+ quantity: number;
130
+ subtitle?: string | undefined;
131
+ imageUrl?: string | undefined;
132
+ price?: string | undefined;
133
+ badge?: string | undefined;
134
+ rating?: number | undefined;
135
+ }, {
136
+ id: string;
137
+ title: string;
138
+ quantity: number;
139
+ subtitle?: string | undefined;
140
+ imageUrl?: string | undefined;
141
+ price?: string | undefined;
142
+ badge?: string | undefined;
143
+ rating?: number | undefined;
144
+ }>, "many">;
145
+ subtotal: z.ZodString;
146
+ taxes: z.ZodOptional<z.ZodString>;
147
+ shipping: z.ZodOptional<z.ZodString>;
148
+ total: z.ZodString;
149
+ currency: z.ZodDefault<z.ZodString>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ items: {
152
+ id: string;
153
+ title: string;
154
+ quantity: number;
155
+ subtitle?: string | undefined;
156
+ imageUrl?: string | undefined;
157
+ price?: string | undefined;
158
+ badge?: string | undefined;
159
+ rating?: number | undefined;
160
+ }[];
161
+ currency: string;
162
+ subtotal: string;
163
+ total: string;
164
+ taxes?: string | undefined;
165
+ shipping?: string | undefined;
166
+ }, {
167
+ items: {
168
+ id: string;
169
+ title: string;
170
+ quantity: number;
171
+ subtitle?: string | undefined;
172
+ imageUrl?: string | undefined;
173
+ price?: string | undefined;
174
+ badge?: string | undefined;
175
+ rating?: number | undefined;
176
+ }[];
177
+ subtotal: string;
178
+ total: string;
179
+ currency?: string | undefined;
180
+ taxes?: string | undefined;
181
+ shipping?: string | undefined;
182
+ }>;
183
+ export type CheckoutSummary = z.infer<typeof checkoutSummarySchema>;
184
+ //# sourceMappingURL=commerce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commerce.d.ts","sourceRoot":"","sources":["../../src/schemas/commerce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;EAQxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGrB,CAAC;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ export const productSchema = z.object({
3
+ id: z.string(),
4
+ title: z.string(),
5
+ subtitle: z.string().optional(),
6
+ imageUrl: z.string().url().optional(),
7
+ price: z.string().optional(),
8
+ badge: z.string().optional(),
9
+ rating: z.number().min(0).max(5).optional()
10
+ });
11
+ export const cartItemSchema = productSchema.extend({
12
+ quantity: z.number().int().min(1)
13
+ });
14
+ export const cartSchema = z.object({
15
+ items: z.array(cartItemSchema),
16
+ currency: z.string().default('USD')
17
+ });
18
+ export const checkoutSummarySchema = z.object({
19
+ items: z.array(cartItemSchema),
20
+ subtotal: z.string(),
21
+ taxes: z.string().optional(),
22
+ shipping: z.string().optional(),
23
+ total: z.string(),
24
+ currency: z.string().default('USD')
25
+ });
@@ -0,0 +1,197 @@
1
+ import { z } from 'zod';
2
+ export declare const kpiSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ label: z.ZodString;
5
+ value: z.ZodString;
6
+ delta: z.ZodOptional<z.ZodNumber>;
7
+ trend: z.ZodOptional<z.ZodEnum<["up", "down", "flat"]>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ value: string;
10
+ id: string;
11
+ label: string;
12
+ delta?: number | undefined;
13
+ trend?: "flat" | "up" | "down" | undefined;
14
+ }, {
15
+ value: string;
16
+ id: string;
17
+ label: string;
18
+ delta?: number | undefined;
19
+ trend?: "flat" | "up" | "down" | undefined;
20
+ }>;
21
+ export type KPI = z.infer<typeof kpiSchema>;
22
+ export declare const trendPointSchema: z.ZodObject<{
23
+ t: z.ZodString;
24
+ v: z.ZodNumber;
25
+ }, "strip", z.ZodTypeAny, {
26
+ t: string;
27
+ v: number;
28
+ }, {
29
+ t: string;
30
+ v: number;
31
+ }>;
32
+ export type TrendPoint = z.infer<typeof trendPointSchema>;
33
+ export declare const trendSeriesSchema: z.ZodObject<{
34
+ label: z.ZodString;
35
+ points: z.ZodArray<z.ZodObject<{
36
+ t: z.ZodString;
37
+ v: z.ZodNumber;
38
+ }, "strip", z.ZodTypeAny, {
39
+ t: string;
40
+ v: number;
41
+ }, {
42
+ t: string;
43
+ v: number;
44
+ }>, "many">;
45
+ }, "strip", z.ZodTypeAny, {
46
+ label: string;
47
+ points: {
48
+ t: string;
49
+ v: number;
50
+ }[];
51
+ }, {
52
+ label: string;
53
+ points: {
54
+ t: string;
55
+ v: number;
56
+ }[];
57
+ }>;
58
+ export type TrendSeries = z.infer<typeof trendSeriesSchema>;
59
+ export declare const analyticsPanelSchema: z.ZodObject<{
60
+ title: z.ZodString;
61
+ totals: z.ZodArray<z.ZodObject<{
62
+ id: z.ZodString;
63
+ label: z.ZodString;
64
+ value: z.ZodString;
65
+ delta: z.ZodOptional<z.ZodNumber>;
66
+ trend: z.ZodOptional<z.ZodEnum<["up", "down", "flat"]>>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ value: string;
69
+ id: string;
70
+ label: string;
71
+ delta?: number | undefined;
72
+ trend?: "flat" | "up" | "down" | undefined;
73
+ }, {
74
+ value: string;
75
+ id: string;
76
+ label: string;
77
+ delta?: number | undefined;
78
+ trend?: "flat" | "up" | "down" | undefined;
79
+ }>, "many">;
80
+ series: z.ZodOptional<z.ZodArray<z.ZodObject<{
81
+ label: z.ZodString;
82
+ points: z.ZodArray<z.ZodObject<{
83
+ t: z.ZodString;
84
+ v: z.ZodNumber;
85
+ }, "strip", z.ZodTypeAny, {
86
+ t: string;
87
+ v: number;
88
+ }, {
89
+ t: string;
90
+ v: number;
91
+ }>, "many">;
92
+ }, "strip", z.ZodTypeAny, {
93
+ label: string;
94
+ points: {
95
+ t: string;
96
+ v: number;
97
+ }[];
98
+ }, {
99
+ label: string;
100
+ points: {
101
+ t: string;
102
+ v: number;
103
+ }[];
104
+ }>, "many">>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ title: string;
107
+ totals: {
108
+ value: string;
109
+ id: string;
110
+ label: string;
111
+ delta?: number | undefined;
112
+ trend?: "flat" | "up" | "down" | undefined;
113
+ }[];
114
+ series?: {
115
+ label: string;
116
+ points: {
117
+ t: string;
118
+ v: number;
119
+ }[];
120
+ }[] | undefined;
121
+ }, {
122
+ title: string;
123
+ totals: {
124
+ value: string;
125
+ id: string;
126
+ label: string;
127
+ delta?: number | undefined;
128
+ trend?: "flat" | "up" | "down" | undefined;
129
+ }[];
130
+ series?: {
131
+ label: string;
132
+ points: {
133
+ t: string;
134
+ v: number;
135
+ }[];
136
+ }[] | undefined;
137
+ }>;
138
+ export type AnalyticsPanel = z.infer<typeof analyticsPanelSchema>;
139
+ export declare const alertSchema: z.ZodObject<{
140
+ id: z.ZodString;
141
+ severity: z.ZodEnum<["info", "warning", "critical"]>;
142
+ message: z.ZodString;
143
+ createdAt: z.ZodString;
144
+ source: z.ZodOptional<z.ZodString>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ message: string;
147
+ id: string;
148
+ severity: "info" | "warning" | "critical";
149
+ createdAt: string;
150
+ source?: string | undefined;
151
+ }, {
152
+ message: string;
153
+ id: string;
154
+ severity: "info" | "warning" | "critical";
155
+ createdAt: string;
156
+ source?: string | undefined;
157
+ }>;
158
+ export type Alert = z.infer<typeof alertSchema>;
159
+ export declare const alertFeedSchema: z.ZodObject<{
160
+ alerts: z.ZodArray<z.ZodObject<{
161
+ id: z.ZodString;
162
+ severity: z.ZodEnum<["info", "warning", "critical"]>;
163
+ message: z.ZodString;
164
+ createdAt: z.ZodString;
165
+ source: z.ZodOptional<z.ZodString>;
166
+ }, "strip", z.ZodTypeAny, {
167
+ message: string;
168
+ id: string;
169
+ severity: "info" | "warning" | "critical";
170
+ createdAt: string;
171
+ source?: string | undefined;
172
+ }, {
173
+ message: string;
174
+ id: string;
175
+ severity: "info" | "warning" | "critical";
176
+ createdAt: string;
177
+ source?: string | undefined;
178
+ }>, "many">;
179
+ }, "strip", z.ZodTypeAny, {
180
+ alerts: {
181
+ message: string;
182
+ id: string;
183
+ severity: "info" | "warning" | "critical";
184
+ createdAt: string;
185
+ source?: string | undefined;
186
+ }[];
187
+ }, {
188
+ alerts: {
189
+ message: string;
190
+ id: string;
191
+ severity: "info" | "warning" | "critical";
192
+ createdAt: string;
193
+ source?: string | undefined;
194
+ }[];
195
+ }>;
196
+ export type AlertFeed = z.infer<typeof alertFeedSchema>;
197
+ //# sourceMappingURL=dashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/schemas/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;EAMpB,CAAC;AAEH,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAE5C,eAAO,MAAM,gBAAgB;;;;;;;;;EAG3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;EAG5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;EAMtB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ export const kpiSchema = z.object({
3
+ id: z.string(),
4
+ label: z.string(),
5
+ value: z.string(),
6
+ delta: z.number().optional(),
7
+ trend: z.enum(['up', 'down', 'flat']).optional()
8
+ });
9
+ export const trendPointSchema = z.object({
10
+ t: z.string(),
11
+ v: z.number()
12
+ });
13
+ export const trendSeriesSchema = z.object({
14
+ label: z.string(),
15
+ points: z.array(trendPointSchema)
16
+ });
17
+ export const analyticsPanelSchema = z.object({
18
+ title: z.string(),
19
+ totals: z.array(kpiSchema),
20
+ series: z.array(trendSeriesSchema).optional()
21
+ });
22
+ export const alertSchema = z.object({
23
+ id: z.string(),
24
+ severity: z.enum(['info', 'warning', 'critical']),
25
+ message: z.string(),
26
+ createdAt: z.string(),
27
+ source: z.string().optional()
28
+ });
29
+ export const alertFeedSchema = z.object({
30
+ alerts: z.array(alertSchema)
31
+ });