@stuartshay/otel-graphql-types 1.0.0 → 1.0.94

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.
Files changed (3) hide show
  1. package/index.d.ts +246 -0
  2. package/package.json +1 -1
  3. package/schema.graphql +809 -4
package/schema.graphql CHANGED
@@ -6,234 +6,812 @@ scalar DateTime
6
6
  # -------------------------------------------------------
7
7
  # Common Types
8
8
  # -------------------------------------------------------
9
+ """
10
+ Pagination metadata for paginated list responses.
11
+ """
9
12
  type PaginationInfo {
13
+ """
14
+ Total number of items matching the query
15
+ """
10
16
  total: Int!
17
+ """
18
+ Maximum number of items per page
19
+ """
11
20
  limit: Int!
21
+ """
22
+ Number of items skipped from the start
23
+ """
12
24
  offset: Int!
13
25
  }
14
26
 
15
27
  # -------------------------------------------------------
16
28
  # Health
17
29
  # -------------------------------------------------------
30
+ """
31
+ Service health status.
32
+ """
18
33
  type HealthStatus {
34
+ """
35
+ Service health status (healthy or unhealthy)
36
+ """
19
37
  status: String!
38
+ """
39
+ Application version from VERSION file
40
+ """
20
41
  version: String!
21
42
  }
22
43
 
44
+ """
45
+ Service readiness status including database connectivity.
46
+ """
23
47
  type ReadyStatus {
48
+ """
49
+ Service readiness status
50
+ """
24
51
  status: String!
52
+ """
53
+ Database connection status
54
+ """
25
55
  database: String
56
+ """
57
+ Application version from VERSION file
58
+ """
26
59
  version: String
27
60
  }
28
61
 
29
62
  # -------------------------------------------------------
30
63
  # Locations (OwnTracks)
31
64
  # -------------------------------------------------------
65
+ """
66
+ GPS location recorded by the OwnTracks mobile app.
67
+ """
32
68
  type Location {
69
+ """
70
+ Unique location record identifier
71
+ """
33
72
  id: Int!
73
+ """
74
+ OwnTracks device identifier (e.g. iphone_stuart)
75
+ """
34
76
  device_id: String!
77
+ """
78
+ Two-character tracker ID set in the OwnTracks app
79
+ """
35
80
  tid: String
81
+ """
82
+ GPS latitude in decimal degrees (WGS 84)
83
+ """
36
84
  latitude: Float!
85
+ """
86
+ GPS longitude in decimal degrees (WGS 84)
87
+ """
37
88
  longitude: Float!
89
+ """
90
+ Horizontal accuracy of the GPS fix in meters
91
+ """
38
92
  accuracy: Float
93
+ """
94
+ Altitude above sea level in meters
95
+ """
39
96
  altitude: Float
97
+ """
98
+ Device velocity in km/h at time of report
99
+ """
40
100
  velocity: Float
101
+ """
102
+ Device battery level as a percentage (0-100)
103
+ """
41
104
  battery: Int
105
+ """
106
+ Battery charging state (0=unknown, 1=unplugged, 2=charging, 3=full)
107
+ """
42
108
  battery_status: Int
109
+ """
110
+ Network connection type (w=WiFi, m=mobile)
111
+ """
43
112
  connection_type: String
113
+ """
114
+ What triggered this location report (p=ping, c=circular, t=timer)
115
+ """
44
116
  trigger: String
117
+ """
118
+ UTC timestamp when the device recorded the location
119
+ """
45
120
  timestamp: DateTime!
121
+ """
122
+ UTC timestamp when the record was inserted into the database
123
+ """
46
124
  created_at: String
47
125
  }
48
126
 
127
+ """
128
+ Full location detail including the original OwnTracks JSON payload.
129
+ """
49
130
  type LocationDetail {
131
+ """
132
+ Unique location record identifier
133
+ """
50
134
  id: Int!
135
+ """
136
+ OwnTracks device identifier (e.g. iphone_stuart)
137
+ """
51
138
  device_id: String!
139
+ """
140
+ Two-character tracker ID set in the OwnTracks app
141
+ """
52
142
  tid: String
143
+ """
144
+ GPS latitude in decimal degrees (WGS 84)
145
+ """
53
146
  latitude: Float!
147
+ """
148
+ GPS longitude in decimal degrees (WGS 84)
149
+ """
54
150
  longitude: Float!
151
+ """
152
+ Horizontal accuracy of the GPS fix in meters
153
+ """
55
154
  accuracy: Float
155
+ """
156
+ Altitude above sea level in meters
157
+ """
56
158
  altitude: Float
159
+ """
160
+ Device velocity in km/h at time of report
161
+ """
57
162
  velocity: Float
163
+ """
164
+ Device battery level as a percentage (0-100)
165
+ """
58
166
  battery: Int
167
+ """
168
+ Battery charging state (0=unknown, 1=unplugged, 2=charging, 3=full)
169
+ """
59
170
  battery_status: Int
171
+ """
172
+ Network connection type (w=WiFi, m=mobile)
173
+ """
60
174
  connection_type: String
175
+ """
176
+ What triggered this location report (p=ping, c=circular, t=timer)
177
+ """
61
178
  trigger: String
179
+ """
180
+ UTC timestamp when the device recorded the location
181
+ """
62
182
  timestamp: DateTime!
183
+ """
184
+ UTC timestamp when the record was inserted into the database
185
+ """
63
186
  created_at: String
187
+ """
188
+ Original OwnTracks JSON payload as received from the MQTT broker
189
+ """
64
190
  raw_payload: JSON
65
191
  }
66
192
 
67
193
  scalar JSON
68
194
 
195
+ """
196
+ Paginated list of OwnTracks location records.
197
+ """
69
198
  type LocationConnection {
199
+ """
200
+ List of location items in the current page
201
+ """
70
202
  items: [Location!]!
203
+ """
204
+ Total number of items matching the query
205
+ """
71
206
  total: Int!
207
+ """
208
+ Maximum number of items per page
209
+ """
72
210
  limit: Int!
211
+ """
212
+ Number of items skipped from the start
213
+ """
73
214
  offset: Int!
74
215
  }
75
216
 
217
+ """
218
+ Distinct OwnTracks device identifier.
219
+ """
76
220
  type DeviceInfo {
221
+ """
222
+ OwnTracks device identifier
223
+ """
77
224
  device_id: String!
78
225
  }
79
226
 
227
+ """
228
+ Aggregate location count with optional filter context.
229
+ """
80
230
  type LocationCount {
231
+ """
232
+ Total number of location records matching the filter
233
+ """
81
234
  count: Int!
235
+ """
236
+ Date filter applied (YYYY-MM-DD), if any
237
+ """
82
238
  date: String
239
+ """
240
+ Device ID filter applied, if any
241
+ """
83
242
  device_id: String
84
243
  }
85
244
 
86
245
  # -------------------------------------------------------
87
246
  # Garmin
88
247
  # -------------------------------------------------------
248
+ """
249
+ Summary of a Garmin Connect activity parsed from a FIT file.
250
+ """
89
251
  type GarminActivity {
252
+ """
253
+ Garmin Connect activity identifier
254
+ """
90
255
  activity_id: String!
256
+ """
257
+ Primary sport type (e.g. cycling, running)
258
+ """
91
259
  sport: String!
260
+ """
261
+ Sub-sport classification (e.g. road, trail)
262
+ """
92
263
  sub_sport: String
264
+ """
265
+ Activity start time in UTC
266
+ """
93
267
  start_time: String
268
+ """
269
+ Activity end time in UTC
270
+ """
94
271
  end_time: String
272
+ """
273
+ Total distance in kilometres
274
+ """
95
275
  distance_km: Float
276
+ """
277
+ Active duration in seconds (excludes pauses)
278
+ """
96
279
  duration_seconds: Float
280
+ """
281
+ Average heart rate in beats per minute
282
+ """
97
283
  avg_heart_rate: Int
284
+ """
285
+ Maximum heart rate in beats per minute
286
+ """
98
287
  max_heart_rate: Int
288
+ """
289
+ Average cadence in RPM
290
+ """
99
291
  avg_cadence: Int
292
+ """
293
+ Maximum cadence in RPM
294
+ """
100
295
  max_cadence: Int
296
+ """
297
+ Total calories burned
298
+ """
101
299
  calories: Int
300
+ """
301
+ Average speed in km/h
302
+ """
102
303
  avg_speed_kmh: Float
304
+ """
305
+ Maximum speed in km/h
306
+ """
103
307
  max_speed_kmh: Float
308
+ """
309
+ Total elevation gain in meters
310
+ """
104
311
  total_ascent_m: Float
312
+ """
313
+ Total elevation loss in meters
314
+ """
105
315
  total_descent_m: Float
316
+ """
317
+ Raw total distance in meters from FIT file
318
+ """
106
319
  total_distance: Float
320
+ """
321
+ Average pace in minutes per kilometre
322
+ """
107
323
  avg_pace: Float
324
+ """
325
+ Device manufacturer (e.g. garmin)
326
+ """
108
327
  device_manufacturer: String
328
+ """
329
+ Average ambient temperature in degrees C
330
+ """
109
331
  avg_temperature_c: Int
332
+ """
333
+ Minimum ambient temperature in degrees C
334
+ """
110
335
  min_temperature_c: Int
336
+ """
337
+ Maximum ambient temperature in degrees C
338
+ """
111
339
  max_temperature_c: Int
340
+ """
341
+ Total elapsed time in seconds (includes pauses)
342
+ """
112
343
  total_elapsed_time: Float
344
+ """
345
+ Total timer time in seconds (active recording)
346
+ """
113
347
  total_timer_time: Float
348
+ """
349
+ UTC timestamp when the record was inserted
350
+ """
114
351
  created_at: String
352
+ """
353
+ UTC timestamp when the FIT file was uploaded
354
+ """
115
355
  uploaded_at: String
356
+ """
357
+ Number of GPS track points in this activity
358
+ """
116
359
  track_point_count: Int
117
360
  }
118
361
 
362
+ """
363
+ Paginated list of Garmin activities.
364
+ """
119
365
  type GarminActivityConnection {
366
+ """
367
+ List of Garmin activity items in the current page
368
+ """
120
369
  items: [GarminActivity!]!
370
+ """
371
+ Total number of items matching the query
372
+ """
121
373
  total: Int!
374
+ """
375
+ Maximum number of items per page
376
+ """
122
377
  limit: Int!
378
+ """
379
+ Number of items skipped from the start
380
+ """
123
381
  offset: Int!
124
382
  }
125
383
 
384
+ """
385
+ Individual GPS track point within a Garmin activity.
386
+ """
126
387
  type GarminTrackPoint {
388
+ """
389
+ Unique track point record identifier
390
+ """
127
391
  id: Int!
392
+ """
393
+ Parent Garmin activity identifier
394
+ """
128
395
  activity_id: String!
396
+ """
397
+ GPS latitude in decimal degrees (WGS 84)
398
+ """
129
399
  latitude: Float!
400
+ """
401
+ GPS longitude in decimal degrees (WGS 84)
402
+ """
130
403
  longitude: Float!
404
+ """
405
+ UTC timestamp of the track point recording
406
+ """
131
407
  timestamp: DateTime!
408
+ """
409
+ Elevation above sea level in meters
410
+ """
132
411
  altitude: Float
412
+ """
413
+ Cumulative distance from activity start in km
414
+ """
133
415
  distance_from_start_km: Float
416
+ """
417
+ Instantaneous speed in km/h
418
+ """
134
419
  speed_kmh: Float
420
+ """
421
+ Heart rate in beats per minute
422
+ """
135
423
  heart_rate: Int
424
+ """
425
+ Pedal/step cadence in RPM
426
+ """
136
427
  cadence: Int
428
+ """
429
+ Ambient temperature in degrees C
430
+ """
137
431
  temperature_c: Float
432
+ """
433
+ UTC timestamp when the record was inserted
434
+ """
138
435
  created_at: String
139
436
  }
140
437
 
438
+ """
439
+ Paginated list of Garmin track points.
440
+ """
141
441
  type GarminTrackPointConnection {
442
+ """
443
+ List of track point items in the current page
444
+ """
142
445
  items: [GarminTrackPoint!]!
446
+ """
447
+ Total number of items matching the query
448
+ """
143
449
  total: Int!
450
+ """
451
+ Maximum number of items per page
452
+ """
144
453
  limit: Int!
454
+ """
455
+ Number of items skipped from the start
456
+ """
145
457
  offset: Int!
146
458
  }
147
459
 
460
+ """
461
+ Sport type with its activity count.
462
+ """
148
463
  type SportInfo {
464
+ """
465
+ Sport type name (e.g. cycling, running)
466
+ """
149
467
  sport: String!
468
+ """
469
+ Number of activities for this sport
470
+ """
150
471
  activity_count: Int!
151
472
  }
152
473
 
474
+ """
475
+ Lightweight track point optimised for time-series chart rendering.
476
+ """
477
+ type GarminChartPoint {
478
+ """
479
+ UTC timestamp of the data point
480
+ """
481
+ timestamp: DateTime!
482
+ """
483
+ Elevation above sea level in meters
484
+ """
485
+ altitude: Float
486
+ """
487
+ Cumulative distance from activity start in km
488
+ """
489
+ distance_from_start_km: Float
490
+ """
491
+ Instantaneous speed in km/h
492
+ """
493
+ speed_kmh: Float
494
+ """
495
+ Heart rate in beats per minute
496
+ """
497
+ heart_rate: Int
498
+ """
499
+ Pedal/step cadence in RPM
500
+ """
501
+ cadence: Int
502
+ """
503
+ Ambient temperature in degrees C
504
+ """
505
+ temperature_c: Float
506
+ """
507
+ GPS latitude in decimal degrees (WGS 84)
508
+ """
509
+ latitude: Float!
510
+ """
511
+ GPS longitude in decimal degrees (WGS 84)
512
+ """
513
+ longitude: Float!
514
+ }
515
+
153
516
  # -------------------------------------------------------
154
517
  # Unified GPS
155
518
  # -------------------------------------------------------
519
+ """
520
+ Single GPS data point from the unified view combining OwnTracks and Garmin sources.
521
+ """
156
522
  type UnifiedGpsPoint {
523
+ """
524
+ Data source: 'owntracks' or 'garmin'
525
+ """
157
526
  source: String!
527
+ """
528
+ Device or activity identifier from the source
529
+ """
158
530
  identifier: String!
531
+ """
532
+ GPS latitude in decimal degrees (WGS 84)
533
+ """
159
534
  latitude: Float!
535
+ """
536
+ GPS longitude in decimal degrees (WGS 84)
537
+ """
160
538
  longitude: Float!
539
+ """
540
+ UTC timestamp of the GPS recording
541
+ """
161
542
  timestamp: DateTime!
543
+ """
544
+ Horizontal GPS accuracy in meters (OwnTracks only)
545
+ """
162
546
  accuracy: Float
547
+ """
548
+ Device battery percentage (OwnTracks only)
549
+ """
163
550
  battery: Int
551
+ """
552
+ Instantaneous speed in km/h (Garmin only)
553
+ """
164
554
  speed_kmh: Float
555
+ """
556
+ Heart rate in BPM (Garmin only)
557
+ """
165
558
  heart_rate: Int
559
+ """
560
+ UTC timestamp when the record was inserted
561
+ """
166
562
  created_at: String
167
563
  }
168
564
 
565
+ """
566
+ Paginated list of unified GPS data points.
567
+ """
169
568
  type UnifiedGpsConnection {
569
+ """
570
+ List of unified GPS items in the current page
571
+ """
170
572
  items: [UnifiedGpsPoint!]!
573
+ """
574
+ Total number of items matching the query
575
+ """
171
576
  total: Int!
577
+ """
578
+ Maximum number of items per page
579
+ """
172
580
  limit: Int!
581
+ """
582
+ Number of items skipped from the start
583
+ """
173
584
  offset: Int!
174
585
  }
175
586
 
587
+ """
588
+ Per-day aggregate combining OwnTracks location stats and Garmin activity metrics.
589
+ """
176
590
  type DailyActivitySummary {
591
+ """
592
+ Calendar date in YYYY-MM-DD format
593
+ """
177
594
  activity_date: String
595
+ """
596
+ OwnTracks device that reported data for this day
597
+ """
178
598
  owntracks_device: String
599
+ """
600
+ Number of OwnTracks GPS points recorded
601
+ """
179
602
  owntracks_points: Int
603
+ """
604
+ Lowest device battery percentage observed
605
+ """
180
606
  min_battery: Int
607
+ """
608
+ Highest device battery percentage observed
609
+ """
181
610
  max_battery: Int
611
+ """
612
+ Mean horizontal GPS accuracy in meters
613
+ """
182
614
  avg_accuracy: Float
615
+ """
616
+ Garmin sport type for activities on this day
617
+ """
183
618
  garmin_sport: String
619
+ """
620
+ Number of Garmin activities recorded
621
+ """
184
622
  garmin_activities: Int
623
+ """
624
+ Combined Garmin activity distance in km
625
+ """
185
626
  total_distance_km: Float
627
+ """
628
+ Combined Garmin activity duration in seconds
629
+ """
186
630
  total_duration_seconds: Float
631
+ """
632
+ Mean heart rate across Garmin activities in BPM
633
+ """
187
634
  avg_heart_rate: Int
635
+ """
636
+ Total calories burned across Garmin activities
637
+ """
188
638
  total_calories: Int
189
639
  }
190
640
 
191
641
  # -------------------------------------------------------
192
642
  # Reference Locations
193
643
  # -------------------------------------------------------
644
+ """
645
+ Named geographic reference point used for spatial queries (e.g. home, office).
646
+ """
194
647
  type ReferenceLocation {
648
+ """
649
+ Unique reference location identifier
650
+ """
195
651
  id: Int!
652
+ """
653
+ Short, unique name for the location (e.g. home, office)
654
+ """
196
655
  name: String!
656
+ """
657
+ GPS latitude in decimal degrees (WGS 84)
658
+ """
197
659
  latitude: Float!
660
+ """
661
+ GPS longitude in decimal degrees (WGS 84)
662
+ """
198
663
  longitude: Float!
664
+ """
665
+ Geofence radius in meters for proximity queries
666
+ """
199
667
  radius_meters: Float!
668
+ """
669
+ Optional human-readable description of the location
670
+ """
200
671
  description: String
672
+ """
673
+ UTC timestamp when the record was created
674
+ """
201
675
  created_at: String
676
+ """
677
+ UTC timestamp when the record was last updated
678
+ """
202
679
  updated_at: String
203
680
  }
204
681
 
205
682
  # -------------------------------------------------------
206
683
  # Spatial
207
684
  # -------------------------------------------------------
685
+ """
686
+ GPS point found within a spatial proximity search.
687
+ """
208
688
  type NearbyPoint {
689
+ """
690
+ Data source: 'owntracks' or 'garmin'
691
+ """
209
692
  source: String!
693
+ """
694
+ Record identifier in the source table
695
+ """
210
696
  id: Int!
697
+ """
698
+ GPS latitude in decimal degrees (WGS 84)
699
+ """
211
700
  latitude: Float!
701
+ """
702
+ GPS longitude in decimal degrees (WGS 84)
703
+ """
212
704
  longitude: Float!
705
+ """
706
+ Distance from the search center point in meters
707
+ """
213
708
  distance_meters: Float!
709
+ """
710
+ UTC timestamp of the GPS recording
711
+ """
214
712
  timestamp: DateTime!
215
713
  }
216
714
 
715
+ """
716
+ Geodesic distance calculation result between two geographic points.
717
+ """
217
718
  type DistanceResult {
719
+ """
720
+ Geodesic distance between the two points in meters
721
+ """
218
722
  distance_meters: Float!
723
+ """
724
+ Origin latitude in decimal degrees
725
+ """
219
726
  from_lat: Float!
727
+ """
728
+ Origin longitude in decimal degrees
729
+ """
220
730
  from_lon: Float!
731
+ """
732
+ Destination latitude in decimal degrees
733
+ """
221
734
  to_lat: Float!
735
+ """
736
+ Destination longitude in decimal degrees
737
+ """
222
738
  to_lon: Float!
223
739
  }
224
740
 
741
+ """
742
+ GPS points found within a named reference location's geofence radius.
743
+ """
225
744
  type WithinReferenceResult {
745
+ """
746
+ Name of the reference location searched
747
+ """
226
748
  reference_name: String!
749
+ """
750
+ Geofence radius used for the search in meters
751
+ """
227
752
  radius_meters: Float!
753
+ """
754
+ Number of GPS points found within the radius
755
+ """
228
756
  total_points: Int!
757
+ """
758
+ GPS points within the radius, sorted by distance
759
+ """
229
760
  points: [NearbyPoint!]!
230
761
  }
231
762
 
763
+ """
764
+ Result payload returned when triggering an on-demand Garmin sync.
765
+ """
766
+ type GarminSyncTriggerResult {
767
+ """
768
+ Sync trigger status (e.g. accepted, conflict, bad_request, error)
769
+ """
770
+ status: String!
771
+ """
772
+ Human-readable status message from upstream sync service
773
+ """
774
+ message: String!
775
+ """
776
+ True when a new sync run was accepted and triggered
777
+ """
778
+ accepted: Boolean!
779
+ """
780
+ UTC timestamp when sync was triggered
781
+ """
782
+ triggered_at: String
783
+ """
784
+ UTC timestamp when an already-running sync started
785
+ """
786
+ started_at: String
787
+ """
788
+ Effective sync window in hours
789
+ """
790
+ window_hours: Int
791
+ """
792
+ Window start timestamp computed by upstream service, when available
793
+ """
794
+ window_start: String
795
+ """
796
+ Effective lookback value, when provided
797
+ """
798
+ lookback: Int
799
+ }
800
+
232
801
  # -------------------------------------------------------
233
802
  # Enums
234
803
  # -------------------------------------------------------
804
+ """
805
+ Sort direction for query results.
806
+ """
235
807
  enum SortOrder {
808
+ """
809
+ Ascending order (oldest first, A-Z)
810
+ """
236
811
  asc
812
+ """
813
+ Descending order (newest first, Z-A)
814
+ """
237
815
  desc
238
816
  }
239
817
 
@@ -242,89 +820,316 @@ enum SortOrder {
242
820
  # -------------------------------------------------------
243
821
  type Query {
244
822
  # Health
823
+ """
824
+ Get service health status.
825
+ """
245
826
  health: HealthStatus!
827
+ """
828
+ Get service readiness status including database connectivity.
829
+ """
246
830
  ready: ReadyStatus!
247
831
 
248
832
  # Locations
833
+ """
834
+ Retrieve a paginated list of OwnTracks location records.
835
+ """
249
836
  locations(
837
+ """
838
+ Filter by OwnTracks device identifier
839
+ """
250
840
  device_id: String
841
+ """
842
+ Start date filter (YYYY-MM-DD or ISO 8601)
843
+ """
251
844
  date_from: String
845
+ """
846
+ End date filter (YYYY-MM-DD or ISO 8601)
847
+ """
252
848
  date_to: String
849
+ """
850
+ Maximum number of items to return per page
851
+ """
253
852
  limit: Int
853
+ """
854
+ Number of items to skip for pagination
855
+ """
254
856
  offset: Int
857
+ """
858
+ Field name to sort by
859
+ """
255
860
  sort: String
861
+ """
862
+ Sort direction
863
+ """
256
864
  order: SortOrder
257
865
  ): LocationConnection!
258
866
 
259
- location(id: Int!): LocationDetail
867
+ """
868
+ Retrieve a single location by its ID, including raw payload.
869
+ """
870
+ location(
871
+ """
872
+ Unique location record identifier
873
+ """
874
+ id: Int!
875
+ ): LocationDetail
260
876
 
877
+ """
878
+ List all distinct OwnTracks device identifiers.
879
+ """
261
880
  devices: [DeviceInfo!]!
262
881
 
263
- locationCount(date: String, device_id: String): LocationCount!
882
+ """
883
+ Get aggregate count of location records with optional filters.
884
+ """
885
+ locationCount(
886
+ """
887
+ Filter by date (YYYY-MM-DD)
888
+ """
889
+ date: String
890
+ """
891
+ Filter by device identifier
892
+ """
893
+ device_id: String
894
+ ): LocationCount!
264
895
 
265
896
  # Garmin
897
+ """
898
+ Retrieve a paginated list of Garmin activities.
899
+ """
266
900
  garminActivities(
901
+ """
902
+ Filter by sport type (e.g. cycling, running)
903
+ """
267
904
  sport: String
905
+ """
906
+ Start date filter (YYYY-MM-DD or ISO 8601)
907
+ """
268
908
  date_from: String
909
+ """
910
+ End date filter (YYYY-MM-DD or ISO 8601)
911
+ """
269
912
  date_to: String
913
+ """
914
+ Maximum number of items to return per page
915
+ """
270
916
  limit: Int
917
+ """
918
+ Number of items to skip for pagination
919
+ """
271
920
  offset: Int
921
+ """
922
+ Field name to sort by
923
+ """
272
924
  sort: String
925
+ """
926
+ Sort direction
927
+ """
273
928
  order: SortOrder
274
929
  ): GarminActivityConnection!
275
930
 
276
- garminActivity(activity_id: String!): GarminActivity
931
+ """
932
+ Retrieve a single Garmin activity by its ID.
933
+ """
934
+ garminActivity(
935
+ """
936
+ Garmin Connect activity identifier
937
+ """
938
+ activity_id: String!
939
+ ): GarminActivity
277
940
 
941
+ """
942
+ Retrieve paginated GPS track points for a Garmin activity.
943
+ """
278
944
  garminTrackPoints(
945
+ """
946
+ Garmin Connect activity identifier
947
+ """
279
948
  activity_id: String!
949
+ """
950
+ Maximum number of items to return per page
951
+ """
280
952
  limit: Int
953
+ """
954
+ Number of items to skip for pagination
955
+ """
281
956
  offset: Int
957
+ """
958
+ Field name to sort by
959
+ """
282
960
  sort: String
961
+ """
962
+ Sort direction
963
+ """
283
964
  order: SortOrder
965
+ """
966
+ Simplification tolerance for track point reduction
967
+ """
284
968
  simplify: Float
285
969
  ): GarminTrackPointConnection!
286
970
 
971
+ """
972
+ List all distinct sport types with activity counts.
973
+ """
287
974
  garminSports: [SportInfo!]!
288
975
 
976
+ """
977
+ Retrieve chart-optimised track points for a Garmin activity.
978
+ """
979
+ garminChartData(
980
+ """
981
+ Garmin Connect activity identifier
982
+ """
983
+ activity_id: String!
984
+ ): [GarminChartPoint!]!
985
+
289
986
  # Unified GPS
987
+ """
988
+ Retrieve a paginated list of unified GPS points from all sources.
989
+ """
290
990
  unifiedGps(
991
+ """
992
+ Filter by data source: 'owntracks' or 'garmin'
993
+ """
291
994
  source: String
995
+ """
996
+ Start date filter (YYYY-MM-DD or ISO 8601)
997
+ """
292
998
  date_from: String
999
+ """
1000
+ End date filter (YYYY-MM-DD or ISO 8601)
1001
+ """
293
1002
  date_to: String
1003
+ """
1004
+ Maximum number of items to return per page
1005
+ """
294
1006
  limit: Int
1007
+ """
1008
+ Number of items to skip for pagination
1009
+ """
295
1010
  offset: Int
1011
+ """
1012
+ Sort direction
1013
+ """
296
1014
  order: SortOrder
297
1015
  ): UnifiedGpsConnection!
298
1016
 
1017
+ """
1018
+ Retrieve daily activity summaries combining OwnTracks and Garmin data.
1019
+ """
299
1020
  dailySummary(
1021
+ """
1022
+ Start date filter (YYYY-MM-DD or ISO 8601)
1023
+ """
300
1024
  date_from: String
1025
+ """
1026
+ End date filter (YYYY-MM-DD or ISO 8601)
1027
+ """
301
1028
  date_to: String
1029
+ """
1030
+ Maximum number of days to return
1031
+ """
302
1032
  limit: Int
303
1033
  ): [DailyActivitySummary!]!
304
1034
 
305
1035
  # Reference Locations
1036
+ """
1037
+ List all named reference locations.
1038
+ """
306
1039
  referenceLocations: [ReferenceLocation!]!
307
- referenceLocation(id: Int!): ReferenceLocation
1040
+ """
1041
+ Retrieve a single reference location by its ID.
1042
+ """
1043
+ referenceLocation(
1044
+ """
1045
+ Unique reference location identifier
1046
+ """
1047
+ id: Int!
1048
+ ): ReferenceLocation
308
1049
 
309
1050
  # Spatial
1051
+ """
1052
+ Find GPS points within a radius of a geographic coordinate.
1053
+ """
310
1054
  nearbyPoints(
1055
+ """
1056
+ Center point latitude in decimal degrees
1057
+ """
311
1058
  lat: Float!
1059
+ """
1060
+ Center point longitude in decimal degrees
1061
+ """
312
1062
  lon: Float!
1063
+ """
1064
+ Search radius in meters
1065
+ """
313
1066
  radius_meters: Float
1067
+ """
1068
+ Filter by data source: 'owntracks' or 'garmin'
1069
+ """
314
1070
  source: String
1071
+ """
1072
+ Maximum number of points to return
1073
+ """
315
1074
  limit: Int
316
1075
  ): [NearbyPoint!]!
317
1076
 
1077
+ """
1078
+ Calculate the geodesic distance between two geographic points.
1079
+ """
318
1080
  calculateDistance(
1081
+ """
1082
+ Origin latitude in decimal degrees
1083
+ """
319
1084
  from_lat: Float!
1085
+ """
1086
+ Origin longitude in decimal degrees
1087
+ """
320
1088
  from_lon: Float!
1089
+ """
1090
+ Destination latitude in decimal degrees
1091
+ """
321
1092
  to_lat: Float!
1093
+ """
1094
+ Destination longitude in decimal degrees
1095
+ """
322
1096
  to_lon: Float!
323
1097
  ): DistanceResult!
324
1098
 
1099
+ """
1100
+ Find GPS points within a named reference location's geofence.
1101
+ """
325
1102
  withinReference(
1103
+ """
1104
+ Name of the reference location to search within
1105
+ """
326
1106
  name: String!
1107
+ """
1108
+ Filter by data source: 'owntracks' or 'garmin'
1109
+ """
327
1110
  source: String
1111
+ """
1112
+ Maximum number of points to return
1113
+ """
328
1114
  limit: Int
329
1115
  ): WithinReferenceResult!
330
1116
  }
1117
+
1118
+ # -------------------------------------------------------
1119
+ # Mutations
1120
+ # -------------------------------------------------------
1121
+ type Mutation {
1122
+ """
1123
+ Trigger an on-demand Garmin sync in the upstream API.
1124
+ """
1125
+ triggerGarminSync(
1126
+ """
1127
+ Optional sync window in hours. Preferred over lookback.
1128
+ """
1129
+ window_hours: Int
1130
+ """
1131
+ Optional legacy lookback value.
1132
+ """
1133
+ lookback: Int
1134
+ ): GarminSyncTriggerResult!
1135
+ }