@lcas58/esmi-api-types 1.0.28 → 1.0.30
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/dist/src/routes/events/events.handlers.d.ts +1 -1
- package/dist/src/routes/events/events.handlers.js +5 -5
- package/dist/src/routes/events/events.index.d.ts +23 -19
- package/dist/src/routes/events/events.routes.d.ts +51 -39
- package/dist/src/routes/events/schemas/event.schemas.d.ts +11 -8
- package/dist/src/routes/groups/groups.handlers.js +53 -12
- package/dist/src/routes/groups/groups.index.d.ts +73 -28
- package/dist/src/routes/groups/groups.routes.d.ts +210 -67
- package/dist/src/routes/groups/schemas/group.schemas.d.ts +82 -19
- package/dist/src/routes/groups/schemas/group.schemas.js +20 -1
- package/dist/src/routes/groups/schemas/index.d.ts +1 -1
- package/dist/src/routes/groups/schemas/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
+
export declare const skillLevelEnum: z.ZodEnum<["beginner", "intermediate", "advanced", "all-levels"]>;
|
|
3
|
+
export declare const vibeEnum: z.ZodEnum<["casual", "competitive", "social", "fitness"]>;
|
|
4
|
+
export declare const activityFrequencyEnum: z.ZodEnum<["weekly", "biweekly", "monthly", "sporadic"]>;
|
|
5
|
+
export declare const tagsSchema: z.ZodArray<z.ZodString, "many">;
|
|
2
6
|
export declare const groupWithRelationsSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
7
|
id: z.ZodString;
|
|
4
8
|
name: z.ZodString;
|
|
5
9
|
slug: z.ZodString;
|
|
6
10
|
description: z.ZodNullable<z.ZodString>;
|
|
7
|
-
|
|
11
|
+
platform: z.ZodNullable<z.ZodString>;
|
|
8
12
|
city: z.ZodNullable<z.ZodString>;
|
|
9
13
|
state: z.ZodNullable<z.ZodString>;
|
|
10
14
|
country: z.ZodString;
|
|
11
15
|
sportId: z.ZodString;
|
|
12
|
-
sourceOrgId: z.ZodNullable<z.ZodString>;
|
|
13
16
|
externalUrl: z.ZodNullable<z.ZodString>;
|
|
14
17
|
createdByUserId: z.ZodNullable<z.ZodString>;
|
|
15
18
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
19
|
+
skillLevel: z.ZodNullable<z.ZodString>;
|
|
20
|
+
vibe: z.ZodNullable<z.ZodString>;
|
|
21
|
+
activityFrequency: z.ZodNullable<z.ZodString>;
|
|
16
22
|
isActive: z.ZodBoolean;
|
|
17
23
|
createdAt: z.ZodDate;
|
|
18
24
|
updatedAt: z.ZodDate;
|
|
@@ -43,6 +49,19 @@ export declare const groupWithRelationsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
43
49
|
id: string;
|
|
44
50
|
name: string;
|
|
45
51
|
}>>;
|
|
52
|
+
skillLevel: z.ZodNullable<z.ZodEnum<["beginner", "intermediate", "advanced", "all-levels"]>>;
|
|
53
|
+
vibe: z.ZodNullable<z.ZodEnum<["casual", "competitive", "social", "fitness"]>>;
|
|
54
|
+
activityFrequency: z.ZodNullable<z.ZodEnum<["weekly", "biweekly", "monthly", "sporadic"]>>;
|
|
55
|
+
tags: z.ZodArray<z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
name: z.ZodString;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
}, {
|
|
62
|
+
id: string;
|
|
63
|
+
name: string;
|
|
64
|
+
}>, "many">;
|
|
46
65
|
_count: z.ZodOptional<z.ZodObject<{
|
|
47
66
|
events: z.ZodNumber;
|
|
48
67
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -54,29 +73,35 @@ export declare const groupWithRelationsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
54
73
|
id: string;
|
|
55
74
|
description: string | null;
|
|
56
75
|
name: string;
|
|
57
|
-
city: string | null;
|
|
58
|
-
state: string | null;
|
|
59
|
-
sportId: string;
|
|
60
76
|
createdAt: Date;
|
|
61
77
|
sport: {
|
|
62
78
|
id: string;
|
|
63
79
|
name: string;
|
|
64
80
|
icon: string | null;
|
|
65
81
|
} | null;
|
|
82
|
+
sportId: string;
|
|
83
|
+
city: string | null;
|
|
84
|
+
state: string | null;
|
|
66
85
|
country: string;
|
|
67
|
-
source: "external" | "internal";
|
|
68
86
|
slug: string;
|
|
69
|
-
|
|
70
|
-
sourceOrgId: string | null;
|
|
87
|
+
platform: string | null;
|
|
71
88
|
externalUrl: string | null;
|
|
72
89
|
updatedAt: Date;
|
|
73
90
|
createdByUserId: string | null;
|
|
74
91
|
imageUrl: string | null;
|
|
92
|
+
skillLevel: "advanced" | "beginner" | "intermediate" | "all-levels" | null;
|
|
93
|
+
vibe: "social" | "casual" | "competitive" | "fitness" | null;
|
|
94
|
+
activityFrequency: "weekly" | "biweekly" | "monthly" | "sporadic" | null;
|
|
95
|
+
isActive: boolean;
|
|
75
96
|
creator: {
|
|
76
97
|
image: string | null;
|
|
77
98
|
id: string;
|
|
78
99
|
name: string;
|
|
79
100
|
} | null;
|
|
101
|
+
tags: {
|
|
102
|
+
id: string;
|
|
103
|
+
name: string;
|
|
104
|
+
}[];
|
|
80
105
|
_count?: {
|
|
81
106
|
events: number;
|
|
82
107
|
} | undefined;
|
|
@@ -84,29 +109,35 @@ export declare const groupWithRelationsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
84
109
|
id: string;
|
|
85
110
|
description: string | null;
|
|
86
111
|
name: string;
|
|
87
|
-
city: string | null;
|
|
88
|
-
state: string | null;
|
|
89
|
-
sportId: string;
|
|
90
112
|
createdAt: Date;
|
|
91
113
|
sport: {
|
|
92
114
|
id: string;
|
|
93
115
|
name: string;
|
|
94
116
|
icon: string | null;
|
|
95
117
|
} | null;
|
|
118
|
+
sportId: string;
|
|
119
|
+
city: string | null;
|
|
120
|
+
state: string | null;
|
|
96
121
|
country: string;
|
|
97
|
-
source: "external" | "internal";
|
|
98
122
|
slug: string;
|
|
99
|
-
|
|
100
|
-
sourceOrgId: string | null;
|
|
123
|
+
platform: string | null;
|
|
101
124
|
externalUrl: string | null;
|
|
102
125
|
updatedAt: Date;
|
|
103
126
|
createdByUserId: string | null;
|
|
104
127
|
imageUrl: string | null;
|
|
128
|
+
skillLevel: "advanced" | "beginner" | "intermediate" | "all-levels" | null;
|
|
129
|
+
vibe: "social" | "casual" | "competitive" | "fitness" | null;
|
|
130
|
+
activityFrequency: "weekly" | "biweekly" | "monthly" | "sporadic" | null;
|
|
131
|
+
isActive: boolean;
|
|
105
132
|
creator: {
|
|
106
133
|
image: string | null;
|
|
107
134
|
id: string;
|
|
108
135
|
name: string;
|
|
109
136
|
} | null;
|
|
137
|
+
tags: {
|
|
138
|
+
id: string;
|
|
139
|
+
name: string;
|
|
140
|
+
}[];
|
|
110
141
|
_count?: {
|
|
111
142
|
events: number;
|
|
112
143
|
} | undefined;
|
|
@@ -115,7 +146,7 @@ export declare const listGroupsQuerySchema: z.ZodObject<{
|
|
|
115
146
|
sportId: z.ZodOptional<z.ZodString>;
|
|
116
147
|
city: z.ZodOptional<z.ZodString>;
|
|
117
148
|
state: z.ZodOptional<z.ZodString>;
|
|
118
|
-
|
|
149
|
+
platform: z.ZodOptional<z.ZodString>;
|
|
119
150
|
search: z.ZodOptional<z.ZodString>;
|
|
120
151
|
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
121
152
|
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -123,16 +154,16 @@ export declare const listGroupsQuerySchema: z.ZodObject<{
|
|
|
123
154
|
limit: number;
|
|
124
155
|
offset: number;
|
|
125
156
|
search?: string | undefined;
|
|
157
|
+
sportId?: string | undefined;
|
|
126
158
|
city?: string | undefined;
|
|
127
159
|
state?: string | undefined;
|
|
128
|
-
|
|
129
|
-
source?: "external" | "internal" | undefined;
|
|
160
|
+
platform?: string | undefined;
|
|
130
161
|
}, {
|
|
131
162
|
search?: string | undefined;
|
|
163
|
+
sportId?: string | undefined;
|
|
132
164
|
city?: string | undefined;
|
|
133
165
|
state?: string | undefined;
|
|
134
|
-
|
|
135
|
-
source?: "external" | "internal" | undefined;
|
|
166
|
+
platform?: string | undefined;
|
|
136
167
|
limit?: number | undefined;
|
|
137
168
|
offset?: number | undefined;
|
|
138
169
|
}>;
|
|
@@ -144,6 +175,10 @@ export declare const createGroupBodySchema: z.ZodObject<{
|
|
|
144
175
|
city: z.ZodOptional<z.ZodString>;
|
|
145
176
|
state: z.ZodOptional<z.ZodString>;
|
|
146
177
|
imageUrl: z.ZodOptional<z.ZodString>;
|
|
178
|
+
skillLevel: z.ZodOptional<z.ZodEnum<["beginner", "intermediate", "advanced", "all-levels"]>>;
|
|
179
|
+
vibe: z.ZodOptional<z.ZodEnum<["casual", "competitive", "social", "fitness"]>>;
|
|
180
|
+
activityFrequency: z.ZodOptional<z.ZodEnum<["weekly", "biweekly", "monthly", "sporadic"]>>;
|
|
181
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
147
182
|
}, "strip", z.ZodTypeAny, {
|
|
148
183
|
name: string;
|
|
149
184
|
sportId: string;
|
|
@@ -152,6 +187,10 @@ export declare const createGroupBodySchema: z.ZodObject<{
|
|
|
152
187
|
state?: string | undefined;
|
|
153
188
|
slug?: string | undefined;
|
|
154
189
|
imageUrl?: string | undefined;
|
|
190
|
+
skillLevel?: "advanced" | "beginner" | "intermediate" | "all-levels" | undefined;
|
|
191
|
+
vibe?: "social" | "casual" | "competitive" | "fitness" | undefined;
|
|
192
|
+
activityFrequency?: "weekly" | "biweekly" | "monthly" | "sporadic" | undefined;
|
|
193
|
+
tags?: string[] | undefined;
|
|
155
194
|
}, {
|
|
156
195
|
name: string;
|
|
157
196
|
sportId: string;
|
|
@@ -160,6 +199,10 @@ export declare const createGroupBodySchema: z.ZodObject<{
|
|
|
160
199
|
state?: string | undefined;
|
|
161
200
|
slug?: string | undefined;
|
|
162
201
|
imageUrl?: string | undefined;
|
|
202
|
+
skillLevel?: "advanced" | "beginner" | "intermediate" | "all-levels" | undefined;
|
|
203
|
+
vibe?: "social" | "casual" | "competitive" | "fitness" | undefined;
|
|
204
|
+
activityFrequency?: "weekly" | "biweekly" | "monthly" | "sporadic" | undefined;
|
|
205
|
+
tags?: string[] | undefined;
|
|
163
206
|
}>;
|
|
164
207
|
export declare const updateGroupBodySchema: z.ZodEffects<z.ZodObject<{
|
|
165
208
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -167,30 +210,50 @@ export declare const updateGroupBodySchema: z.ZodEffects<z.ZodObject<{
|
|
|
167
210
|
city: z.ZodOptional<z.ZodString>;
|
|
168
211
|
state: z.ZodOptional<z.ZodString>;
|
|
169
212
|
imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
213
|
+
skillLevel: z.ZodOptional<z.ZodNullable<z.ZodEnum<["beginner", "intermediate", "advanced", "all-levels"]>>>;
|
|
214
|
+
vibe: z.ZodOptional<z.ZodNullable<z.ZodEnum<["casual", "competitive", "social", "fitness"]>>>;
|
|
215
|
+
activityFrequency: z.ZodOptional<z.ZodNullable<z.ZodEnum<["weekly", "biweekly", "monthly", "sporadic"]>>>;
|
|
216
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
170
217
|
}, "strip", z.ZodTypeAny, {
|
|
171
218
|
description?: string | undefined;
|
|
172
219
|
name?: string | undefined;
|
|
173
220
|
city?: string | undefined;
|
|
174
221
|
state?: string | undefined;
|
|
175
222
|
imageUrl?: string | null | undefined;
|
|
223
|
+
skillLevel?: "advanced" | "beginner" | "intermediate" | "all-levels" | null | undefined;
|
|
224
|
+
vibe?: "social" | "casual" | "competitive" | "fitness" | null | undefined;
|
|
225
|
+
activityFrequency?: "weekly" | "biweekly" | "monthly" | "sporadic" | null | undefined;
|
|
226
|
+
tags?: string[] | null | undefined;
|
|
176
227
|
}, {
|
|
177
228
|
description?: string | undefined;
|
|
178
229
|
name?: string | undefined;
|
|
179
230
|
city?: string | undefined;
|
|
180
231
|
state?: string | undefined;
|
|
181
232
|
imageUrl?: string | null | undefined;
|
|
233
|
+
skillLevel?: "advanced" | "beginner" | "intermediate" | "all-levels" | null | undefined;
|
|
234
|
+
vibe?: "social" | "casual" | "competitive" | "fitness" | null | undefined;
|
|
235
|
+
activityFrequency?: "weekly" | "biweekly" | "monthly" | "sporadic" | null | undefined;
|
|
236
|
+
tags?: string[] | null | undefined;
|
|
182
237
|
}>, {
|
|
183
238
|
description?: string | undefined;
|
|
184
239
|
name?: string | undefined;
|
|
185
240
|
city?: string | undefined;
|
|
186
241
|
state?: string | undefined;
|
|
187
242
|
imageUrl?: string | null | undefined;
|
|
243
|
+
skillLevel?: "advanced" | "beginner" | "intermediate" | "all-levels" | null | undefined;
|
|
244
|
+
vibe?: "social" | "casual" | "competitive" | "fitness" | null | undefined;
|
|
245
|
+
activityFrequency?: "weekly" | "biweekly" | "monthly" | "sporadic" | null | undefined;
|
|
246
|
+
tags?: string[] | null | undefined;
|
|
188
247
|
}, {
|
|
189
248
|
description?: string | undefined;
|
|
190
249
|
name?: string | undefined;
|
|
191
250
|
city?: string | undefined;
|
|
192
251
|
state?: string | undefined;
|
|
193
252
|
imageUrl?: string | null | undefined;
|
|
253
|
+
skillLevel?: "advanced" | "beginner" | "intermediate" | "all-levels" | null | undefined;
|
|
254
|
+
vibe?: "social" | "casual" | "competitive" | "fitness" | null | undefined;
|
|
255
|
+
activityFrequency?: "weekly" | "biweekly" | "monthly" | "sporadic" | null | undefined;
|
|
256
|
+
tags?: string[] | null | undefined;
|
|
194
257
|
}>;
|
|
195
258
|
export declare const groupEventsQuerySchema: z.ZodObject<{
|
|
196
259
|
from: z.ZodOptional<z.ZodDate>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
2
|
import { selectGroupSchema } from "../../../db/schema/index.js";
|
|
3
|
+
export const skillLevelEnum = z.enum(["beginner", "intermediate", "advanced", "all-levels"]);
|
|
4
|
+
export const vibeEnum = z.enum(["casual", "competitive", "social", "fitness"]);
|
|
5
|
+
export const activityFrequencyEnum = z.enum(["weekly", "biweekly", "monthly", "sporadic"]);
|
|
6
|
+
export const tagsSchema = z.array(z.string().max(50)).max(10);
|
|
3
7
|
export const groupWithRelationsSchema = selectGroupSchema.extend({
|
|
4
8
|
sport: z.object({
|
|
5
9
|
id: z.string(),
|
|
@@ -11,6 +15,13 @@ export const groupWithRelationsSchema = selectGroupSchema.extend({
|
|
|
11
15
|
name: z.string(),
|
|
12
16
|
image: z.string().nullable(),
|
|
13
17
|
}).nullable(),
|
|
18
|
+
skillLevel: skillLevelEnum.nullable(),
|
|
19
|
+
vibe: vibeEnum.nullable(),
|
|
20
|
+
activityFrequency: activityFrequencyEnum.nullable(),
|
|
21
|
+
tags: z.array(z.object({
|
|
22
|
+
id: z.string(),
|
|
23
|
+
name: z.string(),
|
|
24
|
+
})),
|
|
14
25
|
_count: z.object({
|
|
15
26
|
events: z.number(),
|
|
16
27
|
}).optional(),
|
|
@@ -19,7 +30,7 @@ export const listGroupsQuerySchema = z.object({
|
|
|
19
30
|
sportId: z.string().optional(),
|
|
20
31
|
city: z.string().optional(),
|
|
21
32
|
state: z.string().optional(),
|
|
22
|
-
|
|
33
|
+
platform: z.string().optional(),
|
|
23
34
|
search: z.string().optional(),
|
|
24
35
|
limit: z.coerce.number().min(1).max(100).optional().default(20),
|
|
25
36
|
offset: z.coerce.number().min(0).optional().default(0),
|
|
@@ -32,6 +43,10 @@ export const createGroupBodySchema = z.object({
|
|
|
32
43
|
city: z.string().max(100).optional(),
|
|
33
44
|
state: z.string().max(50).optional(),
|
|
34
45
|
imageUrl: z.string().url().optional(),
|
|
46
|
+
skillLevel: skillLevelEnum.optional(),
|
|
47
|
+
vibe: vibeEnum.optional(),
|
|
48
|
+
activityFrequency: activityFrequencyEnum.optional(),
|
|
49
|
+
tags: tagsSchema.optional(),
|
|
35
50
|
});
|
|
36
51
|
export const updateGroupBodySchema = z.object({
|
|
37
52
|
name: z.string().min(1).max(255).optional(),
|
|
@@ -39,6 +54,10 @@ export const updateGroupBodySchema = z.object({
|
|
|
39
54
|
city: z.string().max(100).optional(),
|
|
40
55
|
state: z.string().max(50).optional(),
|
|
41
56
|
imageUrl: z.string().url().nullable().optional(),
|
|
57
|
+
skillLevel: skillLevelEnum.nullable().optional(),
|
|
58
|
+
vibe: vibeEnum.nullable().optional(),
|
|
59
|
+
activityFrequency: activityFrequencyEnum.nullable().optional(),
|
|
60
|
+
tags: tagsSchema.nullable().optional(),
|
|
42
61
|
}).refine(data => Object.values(data).some(v => v !== undefined), { message: "At least one field must be provided" });
|
|
43
62
|
export const groupEventsQuerySchema = z.object({
|
|
44
63
|
from: z.coerce.date().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type CreateGroupBody, createGroupBodySchema, groupEventsQuerySchema, type GroupWithRelations, groupWithRelationsSchema, type ListGroupsQuery, listGroupsQuerySchema, type UpdateGroupBody, updateGroupBodySchema, } from "./group.schemas.js";
|
|
1
|
+
export { activityFrequencyEnum, type CreateGroupBody, createGroupBodySchema, groupEventsQuerySchema, type GroupWithRelations, groupWithRelationsSchema, type ListGroupsQuery, listGroupsQuerySchema, skillLevelEnum, tagsSchema, type UpdateGroupBody, updateGroupBodySchema, vibeEnum, } from "./group.schemas.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createGroupBodySchema, groupEventsQuerySchema, groupWithRelationsSchema, listGroupsQuerySchema, updateGroupBodySchema, } from "./group.schemas.js";
|
|
1
|
+
export { activityFrequencyEnum, createGroupBodySchema, groupEventsQuerySchema, groupWithRelationsSchema, listGroupsQuerySchema, skillLevelEnum, tagsSchema, updateGroupBodySchema, vibeEnum, } from "./group.schemas.js";
|