@lcas58/esmi-api-types 1.0.28 → 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;
@@ -71,23 +72,24 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
71
72
  output: {
72
73
  metadata: any;
73
74
  id: string;
75
+ description: string | null;
74
76
  title: string;
75
- sportId: string;
76
77
  createdAt: string;
77
78
  sport: {
78
79
  id: string;
79
80
  name: string;
80
81
  icon: string | null;
81
82
  } | null;
83
+ sportId: string;
82
84
  startsAt: string;
83
85
  endsAt: string | null;
84
86
  timezone: string;
85
87
  location: {
86
88
  id: string;
87
89
  name: string;
90
+ formattedAddress: string;
88
91
  city: string | null;
89
92
  state: string | null;
90
- formattedAddress: string;
91
93
  latitude: number | null;
92
94
  longitude: number | null;
93
95
  } | null;
@@ -128,9 +130,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
128
130
  $post: {
129
131
  input: {
130
132
  json: {
133
+ sportId: string;
131
134
  city: string;
132
135
  state: string;
133
- sportId: string;
134
136
  from?: string | undefined;
135
137
  to?: string | undefined;
136
138
  refresh?: boolean | undefined;
@@ -139,23 +141,24 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
139
141
  output: {
140
142
  metadata: any;
141
143
  id: string;
144
+ description: string | null;
142
145
  title: string;
143
- sportId: string;
144
146
  createdAt: string;
145
147
  sport: {
146
148
  id: string;
147
149
  name: string;
148
150
  icon: string | null;
149
151
  } | null;
152
+ sportId: string;
150
153
  startsAt: string;
151
154
  endsAt: string | null;
152
155
  timezone: string;
153
156
  location: {
154
157
  id: string;
155
158
  name: string;
159
+ formattedAddress: string;
156
160
  city: string | null;
157
161
  state: string | null;
158
- formattedAddress: string;
159
162
  latitude: number | null;
160
163
  longitude: number | null;
161
164
  } | null;
@@ -181,9 +184,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
181
184
  } | {
182
185
  input: {
183
186
  json: {
187
+ sportId: string;
184
188
  city: string;
185
189
  state: string;
186
- sportId: string;
187
190
  from?: string | undefined;
188
191
  to?: string | undefined;
189
192
  refresh?: boolean | undefined;
@@ -201,9 +204,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
201
204
  $post: {
202
205
  input: {
203
206
  json: {
207
+ sportId: string;
204
208
  city: string;
205
209
  state: string;
206
- sportId: string;
207
210
  from?: string | undefined;
208
211
  to?: string | undefined;
209
212
  refresh?: boolean | undefined;
@@ -217,9 +220,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
217
220
  } | {
218
221
  input: {
219
222
  json: {
223
+ sportId: string;
220
224
  city: string;
221
225
  state: string;
222
- sportId: string;
223
226
  from?: string | undefined;
224
227
  to?: string | undefined;
225
228
  refresh?: boolean | undefined;
@@ -248,8 +251,6 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
248
251
  $post: {
249
252
  input: {
250
253
  json: {
251
- city: string;
252
- state: string;
253
254
  events: {
254
255
  url: string;
255
256
  id: string;
@@ -264,28 +265,31 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
264
265
  description?: string | undefined;
265
266
  endsAt?: string | undefined;
266
267
  }[];
268
+ city: string;
269
+ state: string;
267
270
  };
268
271
  };
269
272
  output: {
270
273
  metadata: any;
271
274
  id: string;
275
+ description: string | null;
272
276
  title: string;
273
- sportId: string;
274
277
  createdAt: string;
275
278
  sport: {
276
279
  id: string;
277
280
  name: string;
278
281
  icon: string | null;
279
282
  } | null;
283
+ sportId: string;
280
284
  startsAt: string;
281
285
  endsAt: string | null;
282
286
  timezone: string;
283
287
  location: {
284
288
  id: string;
285
289
  name: string;
290
+ formattedAddress: string;
286
291
  city: string | null;
287
292
  state: string | null;
288
- formattedAddress: string;
289
293
  latitude: number | null;
290
294
  longitude: number | null;
291
295
  } | null;
@@ -311,8 +315,6 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
311
315
  } | {
312
316
  input: {
313
317
  json: {
314
- city: string;
315
- state: string;
316
318
  events: {
317
319
  url: string;
318
320
  id: string;
@@ -327,6 +329,8 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
327
329
  description?: string | undefined;
328
330
  endsAt?: string | undefined;
329
331
  }[];
332
+ city: string;
333
+ state: string;
330
334
  };
331
335
  };
332
336
  output: {
@@ -342,9 +346,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
342
346
  input: {
343
347
  json: {
344
348
  message: string;
349
+ sportId: string;
345
350
  city: string;
346
351
  state: string;
347
- sportId: string;
348
352
  sportName: string;
349
353
  history?: {
350
354
  content: string;
@@ -362,9 +366,9 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
362
366
  input: {
363
367
  json: {
364
368
  message: string;
369
+ sportId: string;
365
370
  city: string;
366
371
  state: string;
367
- sportId: string;
368
372
  sportName: string;
369
373
  history?: {
370
374
  content: string;