@lcas58/esmi-api-types 1.0.26 → 1.0.27
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.js +20 -4
- package/dist/src/routes/events/events.index.d.ts +22 -19
- package/dist/src/routes/events/events.routes.d.ts +48 -39
- package/dist/src/routes/events/schemas/event.schemas.d.ts +17 -8
- package/dist/src/routes/events/schemas/event.schemas.js +3 -0
- package/package.json +1 -1
- package/dist/src/routes/events/discover.handlers.d.ts +0 -3
- package/dist/src/routes/events/discover.handlers.js +0 -15
- package/dist/src/routes/events/discover.index.d.ts +0 -72
- package/dist/src/routes/events/discover.index.js +0 -6
- package/dist/src/routes/events/discover.routes.d.ts +0 -333
- package/dist/src/routes/events/discover.routes.js +0 -26
- package/dist/src/routes/leagues/leagues.handlers.d.ts +0 -3
- package/dist/src/routes/leagues/leagues.handlers.js +0 -50
- package/dist/src/routes/leagues/leagues.index.d.ts +0 -53
- package/dist/src/routes/leagues/leagues.index.js +0 -6
- package/dist/src/routes/leagues/leagues.routes.d.ts +0 -137
- package/dist/src/routes/leagues/leagues.routes.js +0 -47
- package/dist/src/routes/organizations/organizations.handlers.d.ts +0 -74
- package/dist/src/routes/organizations/organizations.handlers.js +0 -485
- package/dist/src/routes/organizations/organizations.index.d.ts +0 -517
- package/dist/src/routes/organizations/organizations.index.js +0 -12
- package/dist/src/routes/organizations/organizations.routes.d.ts +0 -1236
- package/dist/src/routes/organizations/organizations.routes.js +0 -137
- package/dist/src/routes/organizations/tasks.test.d.ts +0 -0
- package/dist/src/routes/organizations/tasks.test.js +0 -181
- package/dist/src/routes/tags/tags.handlers.d.ts +0 -3
- package/dist/src/routes/tags/tags.handlers.js +0 -15
- package/dist/src/routes/tags/tags.index.d.ts +0 -24
- package/dist/src/routes/tags/tags.index.js +0 -6
- package/dist/src/routes/tags/tags.routes.d.ts +0 -68
- package/dist/src/routes/tags/tags.routes.js +0 -25
|
@@ -9,24 +9,33 @@ export declare const list: {
|
|
|
9
9
|
source: z.ZodOptional<z.ZodEnum<["external", "community"]>>;
|
|
10
10
|
city: z.ZodOptional<z.ZodString>;
|
|
11
11
|
state: z.ZodOptional<z.ZodString>;
|
|
12
|
+
latitude: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
longitude: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
radius: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
12
15
|
from: z.ZodOptional<z.ZodDate>;
|
|
13
16
|
to: z.ZodOptional<z.ZodDate>;
|
|
14
17
|
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
15
18
|
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
16
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
radius: number;
|
|
17
21
|
limit: number;
|
|
18
22
|
offset: number;
|
|
19
|
-
sportId?: string | undefined;
|
|
20
23
|
city?: string | undefined;
|
|
21
24
|
state?: string | undefined;
|
|
25
|
+
sportId?: string | undefined;
|
|
26
|
+
latitude?: number | undefined;
|
|
27
|
+
longitude?: number | undefined;
|
|
22
28
|
source?: "external" | "community" | undefined;
|
|
23
29
|
from?: Date | undefined;
|
|
24
30
|
to?: Date | undefined;
|
|
25
31
|
}, {
|
|
26
|
-
sportId?: string | undefined;
|
|
27
32
|
city?: string | undefined;
|
|
28
33
|
state?: string | undefined;
|
|
34
|
+
sportId?: string | undefined;
|
|
35
|
+
latitude?: number | undefined;
|
|
36
|
+
longitude?: number | undefined;
|
|
29
37
|
source?: "external" | "community" | undefined;
|
|
38
|
+
radius?: number | undefined;
|
|
30
39
|
from?: Date | undefined;
|
|
31
40
|
to?: Date | undefined;
|
|
32
41
|
limit?: number | undefined;
|
|
@@ -124,17 +133,17 @@ export declare const list: {
|
|
|
124
133
|
}, "strip", z.ZodTypeAny, {
|
|
125
134
|
id: string;
|
|
126
135
|
name: string;
|
|
127
|
-
formattedAddress: string;
|
|
128
136
|
city: string | null;
|
|
129
137
|
state: string | null;
|
|
138
|
+
formattedAddress: string;
|
|
130
139
|
latitude: number | null;
|
|
131
140
|
longitude: number | null;
|
|
132
141
|
}, {
|
|
133
142
|
id: string;
|
|
134
143
|
name: string;
|
|
135
|
-
formattedAddress: string;
|
|
136
144
|
city: string | null;
|
|
137
145
|
state: string | null;
|
|
146
|
+
formattedAddress: string;
|
|
138
147
|
latitude: number | null;
|
|
139
148
|
longitude: number | null;
|
|
140
149
|
}>>;
|
|
@@ -192,22 +201,22 @@ export declare const list: {
|
|
|
192
201
|
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
193
202
|
id: string;
|
|
194
203
|
title: string;
|
|
204
|
+
sportId: string;
|
|
195
205
|
createdAt: Date;
|
|
196
206
|
sport: {
|
|
197
207
|
id: string;
|
|
198
208
|
name: string;
|
|
199
209
|
icon: string | null;
|
|
200
210
|
} | null;
|
|
201
|
-
sportId: string;
|
|
202
211
|
startsAt: Date;
|
|
203
212
|
endsAt: Date | null;
|
|
204
213
|
timezone: string;
|
|
205
214
|
location: {
|
|
206
215
|
id: string;
|
|
207
216
|
name: string;
|
|
208
|
-
formattedAddress: string;
|
|
209
217
|
city: string | null;
|
|
210
218
|
state: string | null;
|
|
219
|
+
formattedAddress: string;
|
|
211
220
|
latitude: number | null;
|
|
212
221
|
longitude: number | null;
|
|
213
222
|
} | null;
|
|
@@ -254,22 +263,22 @@ export declare const list: {
|
|
|
254
263
|
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
255
264
|
id: string;
|
|
256
265
|
title: string;
|
|
266
|
+
sportId: string;
|
|
257
267
|
createdAt: Date;
|
|
258
268
|
sport: {
|
|
259
269
|
id: string;
|
|
260
270
|
name: string;
|
|
261
271
|
icon: string | null;
|
|
262
272
|
} | null;
|
|
263
|
-
sportId: string;
|
|
264
273
|
startsAt: Date;
|
|
265
274
|
endsAt: Date | null;
|
|
266
275
|
timezone: string;
|
|
267
276
|
location: {
|
|
268
277
|
id: string;
|
|
269
278
|
name: string;
|
|
270
|
-
formattedAddress: string;
|
|
271
279
|
city: string | null;
|
|
272
280
|
state: string | null;
|
|
281
|
+
formattedAddress: string;
|
|
273
282
|
latitude: number | null;
|
|
274
283
|
longitude: number | null;
|
|
275
284
|
} | null;
|
|
@@ -401,17 +410,17 @@ export declare const getOne: {
|
|
|
401
410
|
}, "strip", z.ZodTypeAny, {
|
|
402
411
|
id: string;
|
|
403
412
|
name: string;
|
|
404
|
-
formattedAddress: string;
|
|
405
413
|
city: string | null;
|
|
406
414
|
state: string | null;
|
|
415
|
+
formattedAddress: string;
|
|
407
416
|
latitude: number | null;
|
|
408
417
|
longitude: number | null;
|
|
409
418
|
}, {
|
|
410
419
|
id: string;
|
|
411
420
|
name: string;
|
|
412
|
-
formattedAddress: string;
|
|
413
421
|
city: string | null;
|
|
414
422
|
state: string | null;
|
|
423
|
+
formattedAddress: string;
|
|
415
424
|
latitude: number | null;
|
|
416
425
|
longitude: number | null;
|
|
417
426
|
}>>;
|
|
@@ -469,22 +478,22 @@ export declare const getOne: {
|
|
|
469
478
|
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
470
479
|
id: string;
|
|
471
480
|
title: string;
|
|
481
|
+
sportId: string;
|
|
472
482
|
createdAt: Date;
|
|
473
483
|
sport: {
|
|
474
484
|
id: string;
|
|
475
485
|
name: string;
|
|
476
486
|
icon: string | null;
|
|
477
487
|
} | null;
|
|
478
|
-
sportId: string;
|
|
479
488
|
startsAt: Date;
|
|
480
489
|
endsAt: Date | null;
|
|
481
490
|
timezone: string;
|
|
482
491
|
location: {
|
|
483
492
|
id: string;
|
|
484
493
|
name: string;
|
|
485
|
-
formattedAddress: string;
|
|
486
494
|
city: string | null;
|
|
487
495
|
state: string | null;
|
|
496
|
+
formattedAddress: string;
|
|
488
497
|
latitude: number | null;
|
|
489
498
|
longitude: number | null;
|
|
490
499
|
} | null;
|
|
@@ -531,22 +540,22 @@ export declare const getOne: {
|
|
|
531
540
|
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
532
541
|
id: string;
|
|
533
542
|
title: string;
|
|
543
|
+
sportId: string;
|
|
534
544
|
createdAt: Date;
|
|
535
545
|
sport: {
|
|
536
546
|
id: string;
|
|
537
547
|
name: string;
|
|
538
548
|
icon: string | null;
|
|
539
549
|
} | null;
|
|
540
|
-
sportId: string;
|
|
541
550
|
startsAt: Date;
|
|
542
551
|
endsAt: Date | null;
|
|
543
552
|
timezone: string;
|
|
544
553
|
location: {
|
|
545
554
|
id: string;
|
|
546
555
|
name: string;
|
|
547
|
-
formattedAddress: string;
|
|
548
556
|
city: string | null;
|
|
549
557
|
state: string | null;
|
|
558
|
+
formattedAddress: string;
|
|
550
559
|
latitude: number | null;
|
|
551
560
|
longitude: number | null;
|
|
552
561
|
} | null;
|
|
@@ -596,16 +605,16 @@ export declare const discoverRequestSchema: z.ZodObject<{
|
|
|
596
605
|
to: z.ZodOptional<z.ZodString>;
|
|
597
606
|
refresh: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
598
607
|
}, "strip", z.ZodTypeAny, {
|
|
599
|
-
sportId: string;
|
|
600
608
|
city: string;
|
|
601
609
|
state: string;
|
|
610
|
+
sportId: string;
|
|
602
611
|
refresh: boolean;
|
|
603
612
|
from?: string | undefined;
|
|
604
613
|
to?: string | undefined;
|
|
605
614
|
}, {
|
|
606
|
-
sportId: string;
|
|
607
615
|
city: string;
|
|
608
616
|
state: string;
|
|
617
|
+
sportId: string;
|
|
609
618
|
from?: string | undefined;
|
|
610
619
|
to?: string | undefined;
|
|
611
620
|
refresh?: boolean | undefined;
|
|
@@ -628,16 +637,16 @@ export declare const discover: {
|
|
|
628
637
|
to: z.ZodOptional<z.ZodString>;
|
|
629
638
|
refresh: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
630
639
|
}, "strip", z.ZodTypeAny, {
|
|
631
|
-
sportId: string;
|
|
632
640
|
city: string;
|
|
633
641
|
state: string;
|
|
642
|
+
sportId: string;
|
|
634
643
|
refresh: boolean;
|
|
635
644
|
from?: string | undefined;
|
|
636
645
|
to?: string | undefined;
|
|
637
646
|
}, {
|
|
638
|
-
sportId: string;
|
|
639
647
|
city: string;
|
|
640
648
|
state: string;
|
|
649
|
+
sportId: string;
|
|
641
650
|
from?: string | undefined;
|
|
642
651
|
to?: string | undefined;
|
|
643
652
|
refresh?: boolean | undefined;
|
|
@@ -738,17 +747,17 @@ export declare const discover: {
|
|
|
738
747
|
}, "strip", z.ZodTypeAny, {
|
|
739
748
|
id: string;
|
|
740
749
|
name: string;
|
|
741
|
-
formattedAddress: string;
|
|
742
750
|
city: string | null;
|
|
743
751
|
state: string | null;
|
|
752
|
+
formattedAddress: string;
|
|
744
753
|
latitude: number | null;
|
|
745
754
|
longitude: number | null;
|
|
746
755
|
}, {
|
|
747
756
|
id: string;
|
|
748
757
|
name: string;
|
|
749
|
-
formattedAddress: string;
|
|
750
758
|
city: string | null;
|
|
751
759
|
state: string | null;
|
|
760
|
+
formattedAddress: string;
|
|
752
761
|
latitude: number | null;
|
|
753
762
|
longitude: number | null;
|
|
754
763
|
}>>;
|
|
@@ -806,22 +815,22 @@ export declare const discover: {
|
|
|
806
815
|
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
807
816
|
id: string;
|
|
808
817
|
title: string;
|
|
818
|
+
sportId: string;
|
|
809
819
|
createdAt: Date;
|
|
810
820
|
sport: {
|
|
811
821
|
id: string;
|
|
812
822
|
name: string;
|
|
813
823
|
icon: string | null;
|
|
814
824
|
} | null;
|
|
815
|
-
sportId: string;
|
|
816
825
|
startsAt: Date;
|
|
817
826
|
endsAt: Date | null;
|
|
818
827
|
timezone: string;
|
|
819
828
|
location: {
|
|
820
829
|
id: string;
|
|
821
830
|
name: string;
|
|
822
|
-
formattedAddress: string;
|
|
823
831
|
city: string | null;
|
|
824
832
|
state: string | null;
|
|
833
|
+
formattedAddress: string;
|
|
825
834
|
latitude: number | null;
|
|
826
835
|
longitude: number | null;
|
|
827
836
|
} | null;
|
|
@@ -868,22 +877,22 @@ export declare const discover: {
|
|
|
868
877
|
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
869
878
|
id: string;
|
|
870
879
|
title: string;
|
|
880
|
+
sportId: string;
|
|
871
881
|
createdAt: Date;
|
|
872
882
|
sport: {
|
|
873
883
|
id: string;
|
|
874
884
|
name: string;
|
|
875
885
|
icon: string | null;
|
|
876
886
|
} | null;
|
|
877
|
-
sportId: string;
|
|
878
887
|
startsAt: Date;
|
|
879
888
|
endsAt: Date | null;
|
|
880
889
|
timezone: string;
|
|
881
890
|
location: {
|
|
882
891
|
id: string;
|
|
883
892
|
name: string;
|
|
884
|
-
formattedAddress: string;
|
|
885
893
|
city: string | null;
|
|
886
894
|
state: string | null;
|
|
895
|
+
formattedAddress: string;
|
|
887
896
|
latitude: number | null;
|
|
888
897
|
longitude: number | null;
|
|
889
898
|
} | null;
|
|
@@ -943,16 +952,16 @@ export declare const discoverExternal: {
|
|
|
943
952
|
to: z.ZodOptional<z.ZodString>;
|
|
944
953
|
refresh: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
945
954
|
}, "strip", z.ZodTypeAny, {
|
|
946
|
-
sportId: string;
|
|
947
955
|
city: string;
|
|
948
956
|
state: string;
|
|
957
|
+
sportId: string;
|
|
949
958
|
refresh: boolean;
|
|
950
959
|
from?: string | undefined;
|
|
951
960
|
to?: string | undefined;
|
|
952
961
|
}, {
|
|
953
|
-
sportId: string;
|
|
954
962
|
city: string;
|
|
955
963
|
state: string;
|
|
964
|
+
sportId: string;
|
|
956
965
|
from?: string | undefined;
|
|
957
966
|
to?: string | undefined;
|
|
958
967
|
refresh?: boolean | undefined;
|
|
@@ -1082,6 +1091,8 @@ export declare const saveExternal: {
|
|
|
1082
1091
|
city: z.ZodString;
|
|
1083
1092
|
state: z.ZodString;
|
|
1084
1093
|
}, "strip", z.ZodTypeAny, {
|
|
1094
|
+
city: string;
|
|
1095
|
+
state: string;
|
|
1085
1096
|
events: {
|
|
1086
1097
|
url: string;
|
|
1087
1098
|
id: string;
|
|
@@ -1096,9 +1107,9 @@ export declare const saveExternal: {
|
|
|
1096
1107
|
description?: string | undefined;
|
|
1097
1108
|
endsAt?: string | undefined;
|
|
1098
1109
|
}[];
|
|
1110
|
+
}, {
|
|
1099
1111
|
city: string;
|
|
1100
1112
|
state: string;
|
|
1101
|
-
}, {
|
|
1102
1113
|
events: {
|
|
1103
1114
|
url: string;
|
|
1104
1115
|
id: string;
|
|
@@ -1113,8 +1124,6 @@ export declare const saveExternal: {
|
|
|
1113
1124
|
description?: string | undefined;
|
|
1114
1125
|
endsAt?: string | undefined;
|
|
1115
1126
|
}[];
|
|
1116
|
-
city: string;
|
|
1117
|
-
state: string;
|
|
1118
1127
|
}>;
|
|
1119
1128
|
};
|
|
1120
1129
|
};
|
|
@@ -1212,17 +1221,17 @@ export declare const saveExternal: {
|
|
|
1212
1221
|
}, "strip", z.ZodTypeAny, {
|
|
1213
1222
|
id: string;
|
|
1214
1223
|
name: string;
|
|
1215
|
-
formattedAddress: string;
|
|
1216
1224
|
city: string | null;
|
|
1217
1225
|
state: string | null;
|
|
1226
|
+
formattedAddress: string;
|
|
1218
1227
|
latitude: number | null;
|
|
1219
1228
|
longitude: number | null;
|
|
1220
1229
|
}, {
|
|
1221
1230
|
id: string;
|
|
1222
1231
|
name: string;
|
|
1223
|
-
formattedAddress: string;
|
|
1224
1232
|
city: string | null;
|
|
1225
1233
|
state: string | null;
|
|
1234
|
+
formattedAddress: string;
|
|
1226
1235
|
latitude: number | null;
|
|
1227
1236
|
longitude: number | null;
|
|
1228
1237
|
}>>;
|
|
@@ -1280,22 +1289,22 @@ export declare const saveExternal: {
|
|
|
1280
1289
|
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
1281
1290
|
id: string;
|
|
1282
1291
|
title: string;
|
|
1292
|
+
sportId: string;
|
|
1283
1293
|
createdAt: Date;
|
|
1284
1294
|
sport: {
|
|
1285
1295
|
id: string;
|
|
1286
1296
|
name: string;
|
|
1287
1297
|
icon: string | null;
|
|
1288
1298
|
} | null;
|
|
1289
|
-
sportId: string;
|
|
1290
1299
|
startsAt: Date;
|
|
1291
1300
|
endsAt: Date | null;
|
|
1292
1301
|
timezone: string;
|
|
1293
1302
|
location: {
|
|
1294
1303
|
id: string;
|
|
1295
1304
|
name: string;
|
|
1296
|
-
formattedAddress: string;
|
|
1297
1305
|
city: string | null;
|
|
1298
1306
|
state: string | null;
|
|
1307
|
+
formattedAddress: string;
|
|
1299
1308
|
latitude: number | null;
|
|
1300
1309
|
longitude: number | null;
|
|
1301
1310
|
} | null;
|
|
@@ -1342,22 +1351,22 @@ export declare const saveExternal: {
|
|
|
1342
1351
|
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
1343
1352
|
id: string;
|
|
1344
1353
|
title: string;
|
|
1354
|
+
sportId: string;
|
|
1345
1355
|
createdAt: Date;
|
|
1346
1356
|
sport: {
|
|
1347
1357
|
id: string;
|
|
1348
1358
|
name: string;
|
|
1349
1359
|
icon: string | null;
|
|
1350
1360
|
} | null;
|
|
1351
|
-
sportId: string;
|
|
1352
1361
|
startsAt: Date;
|
|
1353
1362
|
endsAt: Date | null;
|
|
1354
1363
|
timezone: string;
|
|
1355
1364
|
location: {
|
|
1356
1365
|
id: string;
|
|
1357
1366
|
name: string;
|
|
1358
|
-
formattedAddress: string;
|
|
1359
1367
|
city: string | null;
|
|
1360
1368
|
state: string | null;
|
|
1369
|
+
formattedAddress: string;
|
|
1361
1370
|
latitude: number | null;
|
|
1362
1371
|
longitude: number | null;
|
|
1363
1372
|
} | null;
|
|
@@ -1418,9 +1427,9 @@ export declare const chatRequestSchema: z.ZodObject<{
|
|
|
1418
1427
|
enableWebSearch: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1419
1428
|
}, "strip", z.ZodTypeAny, {
|
|
1420
1429
|
message: string;
|
|
1421
|
-
sportId: string;
|
|
1422
1430
|
city: string;
|
|
1423
1431
|
state: string;
|
|
1432
|
+
sportId: string;
|
|
1424
1433
|
sportName: string;
|
|
1425
1434
|
enableWebSearch: boolean;
|
|
1426
1435
|
history?: {
|
|
@@ -1429,9 +1438,9 @@ export declare const chatRequestSchema: z.ZodObject<{
|
|
|
1429
1438
|
}[] | undefined;
|
|
1430
1439
|
}, {
|
|
1431
1440
|
message: string;
|
|
1432
|
-
sportId: string;
|
|
1433
1441
|
city: string;
|
|
1434
1442
|
state: string;
|
|
1443
|
+
sportId: string;
|
|
1435
1444
|
sportName: string;
|
|
1436
1445
|
history?: {
|
|
1437
1446
|
content: string;
|
|
@@ -1543,9 +1552,9 @@ export declare const chat: {
|
|
|
1543
1552
|
enableWebSearch: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1544
1553
|
}, "strip", z.ZodTypeAny, {
|
|
1545
1554
|
message: string;
|
|
1546
|
-
sportId: string;
|
|
1547
1555
|
city: string;
|
|
1548
1556
|
state: string;
|
|
1557
|
+
sportId: string;
|
|
1549
1558
|
sportName: string;
|
|
1550
1559
|
enableWebSearch: boolean;
|
|
1551
1560
|
history?: {
|
|
@@ -1554,9 +1563,9 @@ export declare const chat: {
|
|
|
1554
1563
|
}[] | undefined;
|
|
1555
1564
|
}, {
|
|
1556
1565
|
message: string;
|
|
1557
|
-
sportId: string;
|
|
1558
1566
|
city: string;
|
|
1559
1567
|
state: string;
|
|
1568
|
+
sportId: string;
|
|
1560
1569
|
sportName: string;
|
|
1561
1570
|
history?: {
|
|
1562
1571
|
content: string;
|
|
@@ -86,17 +86,17 @@ export declare const eventWithRelationsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
86
86
|
}, "strip", z.ZodTypeAny, {
|
|
87
87
|
id: string;
|
|
88
88
|
name: string;
|
|
89
|
-
formattedAddress: string;
|
|
90
89
|
city: string | null;
|
|
91
90
|
state: string | null;
|
|
91
|
+
formattedAddress: string;
|
|
92
92
|
latitude: number | null;
|
|
93
93
|
longitude: number | null;
|
|
94
94
|
}, {
|
|
95
95
|
id: string;
|
|
96
96
|
name: string;
|
|
97
|
-
formattedAddress: string;
|
|
98
97
|
city: string | null;
|
|
99
98
|
state: string | null;
|
|
99
|
+
formattedAddress: string;
|
|
100
100
|
latitude: number | null;
|
|
101
101
|
longitude: number | null;
|
|
102
102
|
}>>;
|
|
@@ -154,22 +154,22 @@ export declare const eventWithRelationsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
154
154
|
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
155
155
|
id: string;
|
|
156
156
|
title: string;
|
|
157
|
+
sportId: string;
|
|
157
158
|
createdAt: Date;
|
|
158
159
|
sport: {
|
|
159
160
|
id: string;
|
|
160
161
|
name: string;
|
|
161
162
|
icon: string | null;
|
|
162
163
|
} | null;
|
|
163
|
-
sportId: string;
|
|
164
164
|
startsAt: Date;
|
|
165
165
|
endsAt: Date | null;
|
|
166
166
|
timezone: string;
|
|
167
167
|
location: {
|
|
168
168
|
id: string;
|
|
169
169
|
name: string;
|
|
170
|
-
formattedAddress: string;
|
|
171
170
|
city: string | null;
|
|
172
171
|
state: string | null;
|
|
172
|
+
formattedAddress: string;
|
|
173
173
|
latitude: number | null;
|
|
174
174
|
longitude: number | null;
|
|
175
175
|
} | null;
|
|
@@ -216,22 +216,22 @@ export declare const eventWithRelationsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
216
216
|
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
217
217
|
id: string;
|
|
218
218
|
title: string;
|
|
219
|
+
sportId: string;
|
|
219
220
|
createdAt: Date;
|
|
220
221
|
sport: {
|
|
221
222
|
id: string;
|
|
222
223
|
name: string;
|
|
223
224
|
icon: string | null;
|
|
224
225
|
} | null;
|
|
225
|
-
sportId: string;
|
|
226
226
|
startsAt: Date;
|
|
227
227
|
endsAt: Date | null;
|
|
228
228
|
timezone: string;
|
|
229
229
|
location: {
|
|
230
230
|
id: string;
|
|
231
231
|
name: string;
|
|
232
|
-
formattedAddress: string;
|
|
233
232
|
city: string | null;
|
|
234
233
|
state: string | null;
|
|
234
|
+
formattedAddress: string;
|
|
235
235
|
latitude: number | null;
|
|
236
236
|
longitude: number | null;
|
|
237
237
|
} | null;
|
|
@@ -256,24 +256,33 @@ export declare const listEventsQuerySchema: z.ZodObject<{
|
|
|
256
256
|
source: z.ZodOptional<z.ZodEnum<["external", "community"]>>;
|
|
257
257
|
city: z.ZodOptional<z.ZodString>;
|
|
258
258
|
state: z.ZodOptional<z.ZodString>;
|
|
259
|
+
latitude: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
longitude: z.ZodOptional<z.ZodNumber>;
|
|
261
|
+
radius: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
259
262
|
from: z.ZodOptional<z.ZodDate>;
|
|
260
263
|
to: z.ZodOptional<z.ZodDate>;
|
|
261
264
|
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
262
265
|
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
263
266
|
}, "strip", z.ZodTypeAny, {
|
|
267
|
+
radius: number;
|
|
264
268
|
limit: number;
|
|
265
269
|
offset: number;
|
|
266
|
-
sportId?: string | undefined;
|
|
267
270
|
city?: string | undefined;
|
|
268
271
|
state?: string | undefined;
|
|
272
|
+
sportId?: string | undefined;
|
|
273
|
+
latitude?: number | undefined;
|
|
274
|
+
longitude?: number | undefined;
|
|
269
275
|
source?: "external" | "community" | undefined;
|
|
270
276
|
from?: Date | undefined;
|
|
271
277
|
to?: Date | undefined;
|
|
272
278
|
}, {
|
|
273
|
-
sportId?: string | undefined;
|
|
274
279
|
city?: string | undefined;
|
|
275
280
|
state?: string | undefined;
|
|
281
|
+
sportId?: string | undefined;
|
|
282
|
+
latitude?: number | undefined;
|
|
283
|
+
longitude?: number | undefined;
|
|
276
284
|
source?: "external" | "community" | undefined;
|
|
285
|
+
radius?: number | undefined;
|
|
277
286
|
from?: Date | undefined;
|
|
278
287
|
to?: Date | undefined;
|
|
279
288
|
limit?: number | undefined;
|
|
@@ -31,6 +31,9 @@ export const listEventsQuerySchema = z.object({
|
|
|
31
31
|
source: z.enum(["external", "community"]).optional(),
|
|
32
32
|
city: z.string().optional(),
|
|
33
33
|
state: z.string().optional(),
|
|
34
|
+
latitude: z.coerce.number().min(-90).max(90).optional(),
|
|
35
|
+
longitude: z.coerce.number().min(-180).max(180).optional(),
|
|
36
|
+
radius: z.coerce.number().min(1).max(100).optional().default(30),
|
|
34
37
|
from: z.coerce.date().optional(),
|
|
35
38
|
to: z.coerce.date().optional(),
|
|
36
39
|
limit: z.coerce.number().min(1).max(100).optional().default(20),
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as HttpStatusCodes from "stoker/http-status-codes";
|
|
2
|
-
import { runDiscoveryAgent } from "../../agent/runner.js";
|
|
3
|
-
import { createDb } from "../../db/index.js";
|
|
4
|
-
export const discover = async (c) => {
|
|
5
|
-
const body = c.req.valid("json");
|
|
6
|
-
const { db } = createDb(c.env);
|
|
7
|
-
const events = await runDiscoveryAgent(c.env, db, {
|
|
8
|
-
sportId: body.sportId,
|
|
9
|
-
city: body.city,
|
|
10
|
-
state: body.state,
|
|
11
|
-
from: body.from,
|
|
12
|
-
to: body.to,
|
|
13
|
-
});
|
|
14
|
-
return c.json(events, HttpStatusCodes.OK);
|
|
15
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shared/index.js").AppBindings, {
|
|
2
|
-
"/events/discover": {
|
|
3
|
-
$post: {
|
|
4
|
-
input: {
|
|
5
|
-
json: {
|
|
6
|
-
sportId: string;
|
|
7
|
-
city: string;
|
|
8
|
-
state: string;
|
|
9
|
-
from?: string | undefined;
|
|
10
|
-
to?: string | undefined;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
output: {
|
|
14
|
-
metadata: any;
|
|
15
|
-
id: string;
|
|
16
|
-
title: string;
|
|
17
|
-
createdAt: string;
|
|
18
|
-
sport: {
|
|
19
|
-
id: string;
|
|
20
|
-
name: string;
|
|
21
|
-
icon: string | null;
|
|
22
|
-
} | null;
|
|
23
|
-
sportId: string;
|
|
24
|
-
startsAt: string;
|
|
25
|
-
endsAt: string | null;
|
|
26
|
-
timezone: string;
|
|
27
|
-
location: {
|
|
28
|
-
id: string;
|
|
29
|
-
name: string;
|
|
30
|
-
formattedAddress: string;
|
|
31
|
-
city: string | null;
|
|
32
|
-
state: string | null;
|
|
33
|
-
latitude: number | null;
|
|
34
|
-
longitude: number | null;
|
|
35
|
-
} | null;
|
|
36
|
-
locationId: string | null;
|
|
37
|
-
externalLinkId: string | null;
|
|
38
|
-
source: "external" | "community";
|
|
39
|
-
thumbnailUrl: string | null;
|
|
40
|
-
createdByUserId: string | null;
|
|
41
|
-
creator: {
|
|
42
|
-
image: string | null;
|
|
43
|
-
id: string;
|
|
44
|
-
name: string;
|
|
45
|
-
} | null;
|
|
46
|
-
externalLink: {
|
|
47
|
-
url: string;
|
|
48
|
-
id: string;
|
|
49
|
-
domain: string;
|
|
50
|
-
} | null;
|
|
51
|
-
}[];
|
|
52
|
-
outputFormat: "text" | "json";
|
|
53
|
-
status: 200;
|
|
54
|
-
} | {
|
|
55
|
-
input: {
|
|
56
|
-
json: {
|
|
57
|
-
sportId: string;
|
|
58
|
-
city: string;
|
|
59
|
-
state: string;
|
|
60
|
-
from?: string | undefined;
|
|
61
|
-
to?: string | undefined;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
output: {
|
|
65
|
-
message: string;
|
|
66
|
-
};
|
|
67
|
-
outputFormat: "text" | "json";
|
|
68
|
-
status: 401;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
}, "/">;
|
|
72
|
-
export default router;
|