@stuartshay/otel-types 1.0.64 → 1.0.80
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/index.d.ts +360 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4,6 +4,366 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export type paths = {
|
|
7
|
+
"/api/distance/calculate": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
get?: never;
|
|
15
|
+
put?: never;
|
|
16
|
+
/**
|
|
17
|
+
* Start distance calculation job.
|
|
18
|
+
* @description Start an async distance calculation job for a specific date. The job will
|
|
19
|
+
* calculate distances from home location (40.736097°N, 74.039373°W) for all
|
|
20
|
+
* location data points on that date.
|
|
21
|
+
*
|
|
22
|
+
* Returns a job_id that can be used to poll for status and results.
|
|
23
|
+
*/
|
|
24
|
+
post: {
|
|
25
|
+
parameters: {
|
|
26
|
+
query?: never;
|
|
27
|
+
header?: never;
|
|
28
|
+
path?: never;
|
|
29
|
+
cookie?: never;
|
|
30
|
+
};
|
|
31
|
+
requestBody: {
|
|
32
|
+
content: {
|
|
33
|
+
"application/json": {
|
|
34
|
+
/**
|
|
35
|
+
* Format: date
|
|
36
|
+
* @description Date in YYYY-MM-DD format
|
|
37
|
+
* @example 2026-01-25
|
|
38
|
+
*/
|
|
39
|
+
date: string;
|
|
40
|
+
/**
|
|
41
|
+
* @description Optional device identifier to filter locations (empty = all devices)
|
|
42
|
+
* @example iphone_stuart
|
|
43
|
+
*/
|
|
44
|
+
device_id?: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
responses: {
|
|
49
|
+
/** @description Job created successfully */
|
|
50
|
+
202: {
|
|
51
|
+
headers: {
|
|
52
|
+
[name: string]: unknown;
|
|
53
|
+
};
|
|
54
|
+
content: {
|
|
55
|
+
"*/*": {
|
|
56
|
+
/** @example b4eaed9f-2b3d-43cb-9cb2-4d7313343369 */
|
|
57
|
+
job_id?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Format: date-time
|
|
60
|
+
* @example 2026-01-25T15:24:54.545Z
|
|
61
|
+
*/
|
|
62
|
+
queued_at?: string;
|
|
63
|
+
/** @example queued */
|
|
64
|
+
status?: string;
|
|
65
|
+
/** @example /api/distance/jobs/b4eaed9f-2b3d-43cb-9cb2-4d7313343369 */
|
|
66
|
+
status_url?: string;
|
|
67
|
+
/** @example 0af7651916cd43dd8448eb211c80319c */
|
|
68
|
+
trace_id?: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
/** @description Invalid request parameters */
|
|
73
|
+
400: {
|
|
74
|
+
headers: {
|
|
75
|
+
[name: string]: unknown;
|
|
76
|
+
};
|
|
77
|
+
content: {
|
|
78
|
+
"*/*": {
|
|
79
|
+
error?: {
|
|
80
|
+
/** @example VALIDATION_ERROR */
|
|
81
|
+
code?: string;
|
|
82
|
+
/** @example Invalid date format. Expected YYYY-MM-DD */
|
|
83
|
+
message?: string;
|
|
84
|
+
};
|
|
85
|
+
trace_id?: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
/** @description Distance service unavailable */
|
|
90
|
+
503: {
|
|
91
|
+
headers: {
|
|
92
|
+
[name: string]: unknown;
|
|
93
|
+
};
|
|
94
|
+
content: {
|
|
95
|
+
"*/*": {
|
|
96
|
+
error?: {
|
|
97
|
+
/** @example SERVICE_UNAVAILABLE */
|
|
98
|
+
code?: string;
|
|
99
|
+
message?: string;
|
|
100
|
+
};
|
|
101
|
+
trace_id?: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
delete?: never;
|
|
108
|
+
options?: never;
|
|
109
|
+
head?: never;
|
|
110
|
+
patch?: never;
|
|
111
|
+
trace?: never;
|
|
112
|
+
};
|
|
113
|
+
"/api/distance/download/{filename}": {
|
|
114
|
+
parameters: {
|
|
115
|
+
query?: never;
|
|
116
|
+
header?: never;
|
|
117
|
+
path?: never;
|
|
118
|
+
cookie?: never;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Download CSV result file.
|
|
122
|
+
* @description Download a distance calculation result CSV file.
|
|
123
|
+
*
|
|
124
|
+
* CSV format:
|
|
125
|
+
* - timestamp, device_id, latitude, longitude, distance_from_home_km, accuracy, battery, velocity
|
|
126
|
+
* - Summary footer with total/max/min distances
|
|
127
|
+
*
|
|
128
|
+
* Security: Validates filename to prevent path traversal attacks.
|
|
129
|
+
*/
|
|
130
|
+
get: {
|
|
131
|
+
parameters: {
|
|
132
|
+
query?: never;
|
|
133
|
+
header?: never;
|
|
134
|
+
path: {
|
|
135
|
+
/**
|
|
136
|
+
* @description CSV filename (must start with 'distance_' and end with '.csv')
|
|
137
|
+
* @example distance_20260125_iphone_stuart.csv
|
|
138
|
+
*/
|
|
139
|
+
filename: string;
|
|
140
|
+
};
|
|
141
|
+
cookie?: never;
|
|
142
|
+
};
|
|
143
|
+
requestBody?: never;
|
|
144
|
+
responses: {
|
|
145
|
+
/** @description CSV file */
|
|
146
|
+
200: {
|
|
147
|
+
headers: {
|
|
148
|
+
/** @example attachment; filename=distance_20260125.csv */
|
|
149
|
+
"Content-Disposition"?: string;
|
|
150
|
+
/** @example text/csv */
|
|
151
|
+
"Content-Type"?: string;
|
|
152
|
+
[name: string]: unknown;
|
|
153
|
+
};
|
|
154
|
+
content?: never;
|
|
155
|
+
};
|
|
156
|
+
/** @description Invalid filename */
|
|
157
|
+
400: {
|
|
158
|
+
headers: {
|
|
159
|
+
[name: string]: unknown;
|
|
160
|
+
};
|
|
161
|
+
content?: never;
|
|
162
|
+
};
|
|
163
|
+
/** @description File not found */
|
|
164
|
+
404: {
|
|
165
|
+
headers: {
|
|
166
|
+
[name: string]: unknown;
|
|
167
|
+
};
|
|
168
|
+
content?: never;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
put?: never;
|
|
173
|
+
post?: never;
|
|
174
|
+
delete?: never;
|
|
175
|
+
options?: never;
|
|
176
|
+
head?: never;
|
|
177
|
+
patch?: never;
|
|
178
|
+
trace?: never;
|
|
179
|
+
};
|
|
180
|
+
"/api/distance/jobs": {
|
|
181
|
+
parameters: {
|
|
182
|
+
query?: never;
|
|
183
|
+
header?: never;
|
|
184
|
+
path?: never;
|
|
185
|
+
cookie?: never;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* List distance calculation jobs.
|
|
189
|
+
* @description List distance calculation jobs with optional filtering and pagination.
|
|
190
|
+
*
|
|
191
|
+
* Query parameters allow filtering by status, date, device_id and pagination control.
|
|
192
|
+
*/
|
|
193
|
+
get: {
|
|
194
|
+
parameters: {
|
|
195
|
+
query?: {
|
|
196
|
+
/** @description Filter by job status */
|
|
197
|
+
status?: "queued" | "processing" | "completed" | "failed";
|
|
198
|
+
/**
|
|
199
|
+
* @description Filter by calculation date (YYYY-MM-DD)
|
|
200
|
+
* @example 2026-01-25
|
|
201
|
+
*/
|
|
202
|
+
date?: string;
|
|
203
|
+
/**
|
|
204
|
+
* @description Filter by device identifier
|
|
205
|
+
* @example iphone_stuart
|
|
206
|
+
*/
|
|
207
|
+
device_id?: string;
|
|
208
|
+
/** @description Maximum number of results */
|
|
209
|
+
limit?: number;
|
|
210
|
+
/** @description Pagination offset */
|
|
211
|
+
offset?: number;
|
|
212
|
+
};
|
|
213
|
+
header?: never;
|
|
214
|
+
path?: never;
|
|
215
|
+
cookie?: never;
|
|
216
|
+
};
|
|
217
|
+
requestBody?: never;
|
|
218
|
+
responses: {
|
|
219
|
+
/** @description Jobs retrieved successfully */
|
|
220
|
+
200: {
|
|
221
|
+
headers: {
|
|
222
|
+
[name: string]: unknown;
|
|
223
|
+
};
|
|
224
|
+
content: {
|
|
225
|
+
"*/*": {
|
|
226
|
+
jobs?: {
|
|
227
|
+
/** Format: date-time */
|
|
228
|
+
completed_at?: string;
|
|
229
|
+
date?: string;
|
|
230
|
+
device_id?: string;
|
|
231
|
+
job_id?: string;
|
|
232
|
+
/** Format: date-time */
|
|
233
|
+
queued_at?: string;
|
|
234
|
+
status?: string;
|
|
235
|
+
}[];
|
|
236
|
+
/** @example 50 */
|
|
237
|
+
limit?: number;
|
|
238
|
+
/** @example 50 */
|
|
239
|
+
next_offset?: number | null;
|
|
240
|
+
/** @example 0 */
|
|
241
|
+
offset?: number;
|
|
242
|
+
/** @example 42 */
|
|
243
|
+
total_count?: number;
|
|
244
|
+
trace_id?: string;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
/** @description Invalid query parameters */
|
|
249
|
+
400: {
|
|
250
|
+
headers: {
|
|
251
|
+
[name: string]: unknown;
|
|
252
|
+
};
|
|
253
|
+
content?: never;
|
|
254
|
+
};
|
|
255
|
+
/** @description Distance service unavailable */
|
|
256
|
+
503: {
|
|
257
|
+
headers: {
|
|
258
|
+
[name: string]: unknown;
|
|
259
|
+
};
|
|
260
|
+
content?: never;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
put?: never;
|
|
265
|
+
post?: never;
|
|
266
|
+
delete?: never;
|
|
267
|
+
options?: never;
|
|
268
|
+
head?: never;
|
|
269
|
+
patch?: never;
|
|
270
|
+
trace?: never;
|
|
271
|
+
};
|
|
272
|
+
"/api/distance/jobs/{job_id}": {
|
|
273
|
+
parameters: {
|
|
274
|
+
query?: never;
|
|
275
|
+
header?: never;
|
|
276
|
+
path?: never;
|
|
277
|
+
cookie?: never;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* Get job status and results.
|
|
281
|
+
* @description Retrieve the status and results of a distance calculation job.
|
|
282
|
+
*
|
|
283
|
+
* Status values:
|
|
284
|
+
* - queued: Job is waiting to be processed
|
|
285
|
+
* - processing: Job is currently running
|
|
286
|
+
* - completed: Job finished successfully (includes result)
|
|
287
|
+
* - failed: Job failed (includes error_message)
|
|
288
|
+
*/
|
|
289
|
+
get: {
|
|
290
|
+
parameters: {
|
|
291
|
+
query?: never;
|
|
292
|
+
header?: never;
|
|
293
|
+
path: {
|
|
294
|
+
/**
|
|
295
|
+
* @description Job UUID
|
|
296
|
+
* @example b4eaed9f-2b3d-43cb-9cb2-4d7313343369
|
|
297
|
+
*/
|
|
298
|
+
job_id: string;
|
|
299
|
+
};
|
|
300
|
+
cookie?: never;
|
|
301
|
+
};
|
|
302
|
+
requestBody?: never;
|
|
303
|
+
responses: {
|
|
304
|
+
/** @description Job status retrieved successfully */
|
|
305
|
+
200: {
|
|
306
|
+
headers: {
|
|
307
|
+
[name: string]: unknown;
|
|
308
|
+
};
|
|
309
|
+
content: {
|
|
310
|
+
"*/*": {
|
|
311
|
+
/** Format: date-time */
|
|
312
|
+
completed_at?: string;
|
|
313
|
+
error_message?: string;
|
|
314
|
+
job_id?: string;
|
|
315
|
+
/** Format: date-time */
|
|
316
|
+
queued_at?: string;
|
|
317
|
+
result?: {
|
|
318
|
+
/** @example /api/distance/download/distance_20260125_iphone_stuart.csv */
|
|
319
|
+
csv_download_url?: string;
|
|
320
|
+
/** @example 2026-01-25 */
|
|
321
|
+
date?: string;
|
|
322
|
+
/** @example iphone_stuart */
|
|
323
|
+
device_id?: string;
|
|
324
|
+
/** @example 0.31 */
|
|
325
|
+
max_distance_km?: number;
|
|
326
|
+
/** @example 0.001 */
|
|
327
|
+
min_distance_km?: number;
|
|
328
|
+
/** @example 252 */
|
|
329
|
+
processing_time_ms?: number;
|
|
330
|
+
/** @example 19.44 */
|
|
331
|
+
total_distance_km?: number;
|
|
332
|
+
/** @example 1464 */
|
|
333
|
+
total_locations?: number;
|
|
334
|
+
};
|
|
335
|
+
/** Format: date-time */
|
|
336
|
+
started_at?: string;
|
|
337
|
+
/** @enum {string} */
|
|
338
|
+
status?: "queued" | "processing" | "completed" | "failed";
|
|
339
|
+
trace_id?: string;
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
/** @description Job not found */
|
|
344
|
+
404: {
|
|
345
|
+
headers: {
|
|
346
|
+
[name: string]: unknown;
|
|
347
|
+
};
|
|
348
|
+
content?: never;
|
|
349
|
+
};
|
|
350
|
+
/** @description Distance service unavailable */
|
|
351
|
+
503: {
|
|
352
|
+
headers: {
|
|
353
|
+
[name: string]: unknown;
|
|
354
|
+
};
|
|
355
|
+
content?: never;
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
put?: never;
|
|
360
|
+
post?: never;
|
|
361
|
+
delete?: never;
|
|
362
|
+
options?: never;
|
|
363
|
+
head?: never;
|
|
364
|
+
patch?: never;
|
|
365
|
+
trace?: never;
|
|
366
|
+
};
|
|
7
367
|
"/chain": {
|
|
8
368
|
parameters: {
|
|
9
369
|
query?: never;
|