@lcas58/esmi-api-types 1.0.27 → 1.0.29

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.
@@ -6,4 +6,4 @@ export declare const discover: AppRouteHandler<DiscoverRoute>;
6
6
  export declare const discoverExternal: AppRouteHandler<DiscoverExternalRoute>;
7
7
  export declare const saveExternal: AppRouteHandler<SaveExternalRoute>;
8
8
  export declare const chat: AppRouteHandler<ChatRoute>;
9
- export declare const chatStream: (c: Parameters<AppRouteHandler<ChatRoute>>[0]) => Promise<Response>;
9
+ export declare function chatStream(c: Parameters<AppRouteHandler<ChatRoute>>[0]): Promise<Response>;
@@ -47,7 +47,7 @@ export const list = async (c) => {
47
47
  if (locations.length === 0) {
48
48
  return c.json([], HttpStatusCodes.OK);
49
49
  }
50
- const locationIds = locations.map((l) => l.id);
50
+ const locationIds = locations.map(l => l.id);
51
51
  whereConditions.push(isNotNull(event.locationId));
52
52
  whereConditions.push(inArray(event.locationId, locationIds));
53
53
  }
@@ -67,7 +67,7 @@ export const list = async (c) => {
67
67
  if (locations.length === 0) {
68
68
  return c.json([], HttpStatusCodes.OK);
69
69
  }
70
- const locationIds = locations.map((l) => l.id);
70
+ const locationIds = locations.map(l => l.id);
71
71
  whereConditions.push(isNotNull(event.locationId));
72
72
  whereConditions.push(inArray(event.locationId, locationIds));
73
73
  }
@@ -176,7 +176,7 @@ export const discoverExternal = async (c) => {
176
176
  // Step 4: Cache results (only if non-empty)
177
177
  if (results.length > 0) {
178
178
  await setCachedDiscovery(kv, cacheKey, results);
179
- await markUrlsSeen(kv, seenKey, results.map((e) => e.url));
179
+ await markUrlsSeen(kv, seenKey, results.map(e => e.url));
180
180
  }
181
181
  const filtered = filterByDateRange(results, body.from, body.to);
182
182
  console.log(`[discover] agent returned ${results.length} events, returning ${filtered.length} in range for ${cacheKey}`);
@@ -230,7 +230,7 @@ export const chat = async (c) => {
230
230
  });
231
231
  return c.json(result, HttpStatusCodes.OK);
232
232
  };
233
- export const chatStream = async (c) => {
233
+ export async function chatStream(c) {
234
234
  const rawBody = await c.req.json();
235
235
  const parsed = chatRequestSchema.safeParse(rawBody);
236
236
  if (!parsed.success) {
@@ -263,4 +263,4 @@ export const chatStream = async (c) => {
263
263
  await stream.writeSSE({ data: JSON.stringify({ type: "done" }) });
264
264
  }
265
265
  });
266
- };
266
+ }
@@ -3,9 +3,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
3
3
  $get: {
4
4
  input: {
5
5
  query: {
6
+ sportId?: string | string[] | undefined;
6
7
  city?: string | string[] | undefined;
7
8
  state?: string | string[] | undefined;
8
- sportId?: string | string[] | undefined;
9
9
  latitude?: string | string[] | undefined;
10
10
  longitude?: string | string[] | undefined;
11
11
  source?: string | string[] | undefined;
@@ -19,23 +19,24 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
19
19
  output: {
20
20
  metadata: any;
21
21
  id: string;
22
+ description: string | null;
22
23
  title: string;
23
- sportId: string;
24
24
  createdAt: string;
25
25
  sport: {
26
26
  id: string;
27
27
  name: string;
28
28
  icon: string | null;
29
29
  } | null;
30
+ sportId: string;
30
31
  startsAt: string;
31
32
  endsAt: string | null;
32
33
  timezone: string;
33
34
  location: {
34
35
  id: string;
35
36
  name: string;
37
+ formattedAddress: string;
36
38
  city: string | null;
37
39
  state: string | null;
38
- formattedAddress: string;
39
40
  latitude: number | null;
40
41
  longitude: number | null;
41
42
  } | null;
@@ -44,6 +45,7 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
44
45
  source: "external" | "community";
45
46
  thumbnailUrl: string | null;
46
47
  createdByUserId: string | null;
48
+ groupId: string | null;
47
49
  creator: {
48
50
  image: string | null;
49
51
  id: string;
@@ -70,23 +72,24 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
70
72
  output: {
71
73
  metadata: any;
72
74
  id: string;
75
+ description: string | null;
73
76
  title: string;
74
- sportId: string;
75
77
  createdAt: string;
76
78
  sport: {
77
79
  id: string;
78
80
  name: string;
79
81
  icon: string | null;
80
82
  } | null;
83
+ sportId: string;
81
84
  startsAt: string;
82
85
  endsAt: string | null;
83
86
  timezone: string;
84
87
  location: {
85
88
  id: string;
86
89
  name: string;
90
+ formattedAddress: string;
87
91
  city: string | null;
88
92
  state: string | null;
89
- formattedAddress: string;
90
93
  latitude: number | null;
91
94
  longitude: number | null;
92
95
  } | null;
@@ -95,6 +98,7 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
95
98
  source: "external" | "community";
96
99
  thumbnailUrl: string | null;
97
100
  createdByUserId: string | null;
101
+ groupId: string | null;
98
102
  creator: {
99
103
  image: string | null;
100
104
  id: string;
@@ -126,9 +130,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
126
130
  $post: {
127
131
  input: {
128
132
  json: {
133
+ sportId: string;
129
134
  city: string;
130
135
  state: string;
131
- sportId: string;
132
136
  from?: string | undefined;
133
137
  to?: string | undefined;
134
138
  refresh?: boolean | undefined;
@@ -137,23 +141,24 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
137
141
  output: {
138
142
  metadata: any;
139
143
  id: string;
144
+ description: string | null;
140
145
  title: string;
141
- sportId: string;
142
146
  createdAt: string;
143
147
  sport: {
144
148
  id: string;
145
149
  name: string;
146
150
  icon: string | null;
147
151
  } | null;
152
+ sportId: string;
148
153
  startsAt: string;
149
154
  endsAt: string | null;
150
155
  timezone: string;
151
156
  location: {
152
157
  id: string;
153
158
  name: string;
159
+ formattedAddress: string;
154
160
  city: string | null;
155
161
  state: string | null;
156
- formattedAddress: string;
157
162
  latitude: number | null;
158
163
  longitude: number | null;
159
164
  } | null;
@@ -162,6 +167,7 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
162
167
  source: "external" | "community";
163
168
  thumbnailUrl: string | null;
164
169
  createdByUserId: string | null;
170
+ groupId: string | null;
165
171
  creator: {
166
172
  image: string | null;
167
173
  id: string;
@@ -178,9 +184,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
178
184
  } | {
179
185
  input: {
180
186
  json: {
187
+ sportId: string;
181
188
  city: string;
182
189
  state: string;
183
- sportId: string;
184
190
  from?: string | undefined;
185
191
  to?: string | undefined;
186
192
  refresh?: boolean | undefined;
@@ -198,9 +204,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
198
204
  $post: {
199
205
  input: {
200
206
  json: {
207
+ sportId: string;
201
208
  city: string;
202
209
  state: string;
203
- sportId: string;
204
210
  from?: string | undefined;
205
211
  to?: string | undefined;
206
212
  refresh?: boolean | undefined;
@@ -214,9 +220,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
214
220
  } | {
215
221
  input: {
216
222
  json: {
223
+ sportId: string;
217
224
  city: string;
218
225
  state: string;
219
- sportId: string;
220
226
  from?: string | undefined;
221
227
  to?: string | undefined;
222
228
  refresh?: boolean | undefined;
@@ -245,8 +251,6 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
245
251
  $post: {
246
252
  input: {
247
253
  json: {
248
- city: string;
249
- state: string;
250
254
  events: {
251
255
  url: string;
252
256
  id: string;
@@ -261,28 +265,31 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
261
265
  description?: string | undefined;
262
266
  endsAt?: string | undefined;
263
267
  }[];
268
+ city: string;
269
+ state: string;
264
270
  };
265
271
  };
266
272
  output: {
267
273
  metadata: any;
268
274
  id: string;
275
+ description: string | null;
269
276
  title: string;
270
- sportId: string;
271
277
  createdAt: string;
272
278
  sport: {
273
279
  id: string;
274
280
  name: string;
275
281
  icon: string | null;
276
282
  } | null;
283
+ sportId: string;
277
284
  startsAt: string;
278
285
  endsAt: string | null;
279
286
  timezone: string;
280
287
  location: {
281
288
  id: string;
282
289
  name: string;
290
+ formattedAddress: string;
283
291
  city: string | null;
284
292
  state: string | null;
285
- formattedAddress: string;
286
293
  latitude: number | null;
287
294
  longitude: number | null;
288
295
  } | null;
@@ -291,6 +298,7 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
291
298
  source: "external" | "community";
292
299
  thumbnailUrl: string | null;
293
300
  createdByUserId: string | null;
301
+ groupId: string | null;
294
302
  creator: {
295
303
  image: string | null;
296
304
  id: string;
@@ -307,8 +315,6 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
307
315
  } | {
308
316
  input: {
309
317
  json: {
310
- city: string;
311
- state: string;
312
318
  events: {
313
319
  url: string;
314
320
  id: string;
@@ -323,6 +329,8 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
323
329
  description?: string | undefined;
324
330
  endsAt?: string | undefined;
325
331
  }[];
332
+ city: string;
333
+ state: string;
326
334
  };
327
335
  };
328
336
  output: {
@@ -338,9 +346,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
338
346
  input: {
339
347
  json: {
340
348
  message: string;
349
+ sportId: string;
341
350
  city: string;
342
351
  state: string;
343
- sportId: string;
344
352
  sportName: string;
345
353
  history?: {
346
354
  content: string;
@@ -358,9 +366,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
358
366
  input: {
359
367
  json: {
360
368
  message: string;
369
+ sportId: string;
361
370
  city: string;
362
371
  state: string;
363
- sportId: string;
364
372
  sportName: string;
365
373
  history?: {
366
374
  content: string;