@stuartshay/otel-graphql-types 1.0.0
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/README.md +49 -0
- package/index.d.ts +359 -0
- package/package.json +37 -0
- package/schema.graphql +330 -0
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# @stuartshay/otel-graphql-types
|
|
2
|
+
|
|
3
|
+
TypeScript types auto-generated from the otel-data-gateway GraphQL schema.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @stuartshay/otel-graphql-types
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Import Types
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { Location, GarminActivity, LocationConnection } from '@stuartshay/otel-graphql-types';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Use Schema for Client Codegen
|
|
20
|
+
|
|
21
|
+
The package includes `schema.graphql` for use with `@graphql-codegen/cli` in
|
|
22
|
+
client applications:
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
// codegen.ts
|
|
26
|
+
import type { CodegenConfig } from '@graphql-codegen/cli';
|
|
27
|
+
|
|
28
|
+
const config: CodegenConfig = {
|
|
29
|
+
schema: 'node_modules/@stuartshay/otel-graphql-types/schema.graphql',
|
|
30
|
+
documents: 'src/graphql/**/*.ts',
|
|
31
|
+
generates: {
|
|
32
|
+
'src/__generated__/graphql.ts': {
|
|
33
|
+
plugins: ['typescript', 'typescript-operations', 'typescript-react-apollo'],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default config;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Generation
|
|
42
|
+
|
|
43
|
+
Types are auto-generated from the GraphQL SDL schema using
|
|
44
|
+
`@graphql-codegen/typescript`. Do not edit `index.d.ts` manually.
|
|
45
|
+
|
|
46
|
+
## Related Packages
|
|
47
|
+
|
|
48
|
+
- [`@stuartshay/otel-data-types`](https://www.npmjs.com/package/@stuartshay/otel-data-types) —
|
|
49
|
+
REST API types (OpenAPI-generated)
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
export type Maybe<T> = T | null;
|
|
2
|
+
export type InputMaybe<T> = Maybe<T>;
|
|
3
|
+
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
|
4
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
|
|
5
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
|
|
6
|
+
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
|
|
7
|
+
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
|
|
8
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
9
|
+
export interface Scalars {
|
|
10
|
+
ID: { input: string; output: string; }
|
|
11
|
+
String: { input: string; output: string; }
|
|
12
|
+
Boolean: { input: boolean; output: boolean; }
|
|
13
|
+
Int: { input: number; output: number; }
|
|
14
|
+
Float: { input: number; output: number; }
|
|
15
|
+
DateTime: { input: string; output: string; }
|
|
16
|
+
JSON: { input: Record<string, unknown>; output: Record<string, unknown>; }
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface DailyActivitySummary {
|
|
20
|
+
__typename?: 'DailyActivitySummary';
|
|
21
|
+
activity_date?: Maybe<Scalars['String']['output']>;
|
|
22
|
+
avg_accuracy?: Maybe<Scalars['Float']['output']>;
|
|
23
|
+
avg_heart_rate?: Maybe<Scalars['Int']['output']>;
|
|
24
|
+
garmin_activities?: Maybe<Scalars['Int']['output']>;
|
|
25
|
+
garmin_sport?: Maybe<Scalars['String']['output']>;
|
|
26
|
+
max_battery?: Maybe<Scalars['Int']['output']>;
|
|
27
|
+
min_battery?: Maybe<Scalars['Int']['output']>;
|
|
28
|
+
owntracks_device?: Maybe<Scalars['String']['output']>;
|
|
29
|
+
owntracks_points?: Maybe<Scalars['Int']['output']>;
|
|
30
|
+
total_calories?: Maybe<Scalars['Int']['output']>;
|
|
31
|
+
total_distance_km?: Maybe<Scalars['Float']['output']>;
|
|
32
|
+
total_duration_seconds?: Maybe<Scalars['Float']['output']>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface DeviceInfo {
|
|
36
|
+
__typename?: 'DeviceInfo';
|
|
37
|
+
device_id: Scalars['String']['output'];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface DistanceResult {
|
|
41
|
+
__typename?: 'DistanceResult';
|
|
42
|
+
distance_meters: Scalars['Float']['output'];
|
|
43
|
+
from_lat: Scalars['Float']['output'];
|
|
44
|
+
from_lon: Scalars['Float']['output'];
|
|
45
|
+
to_lat: Scalars['Float']['output'];
|
|
46
|
+
to_lon: Scalars['Float']['output'];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface GarminActivity {
|
|
50
|
+
__typename?: 'GarminActivity';
|
|
51
|
+
activity_id: Scalars['String']['output'];
|
|
52
|
+
avg_cadence?: Maybe<Scalars['Int']['output']>;
|
|
53
|
+
avg_heart_rate?: Maybe<Scalars['Int']['output']>;
|
|
54
|
+
avg_pace?: Maybe<Scalars['Float']['output']>;
|
|
55
|
+
avg_speed_kmh?: Maybe<Scalars['Float']['output']>;
|
|
56
|
+
avg_temperature_c?: Maybe<Scalars['Int']['output']>;
|
|
57
|
+
calories?: Maybe<Scalars['Int']['output']>;
|
|
58
|
+
created_at?: Maybe<Scalars['String']['output']>;
|
|
59
|
+
device_manufacturer?: Maybe<Scalars['String']['output']>;
|
|
60
|
+
distance_km?: Maybe<Scalars['Float']['output']>;
|
|
61
|
+
duration_seconds?: Maybe<Scalars['Float']['output']>;
|
|
62
|
+
end_time?: Maybe<Scalars['String']['output']>;
|
|
63
|
+
max_cadence?: Maybe<Scalars['Int']['output']>;
|
|
64
|
+
max_heart_rate?: Maybe<Scalars['Int']['output']>;
|
|
65
|
+
max_speed_kmh?: Maybe<Scalars['Float']['output']>;
|
|
66
|
+
max_temperature_c?: Maybe<Scalars['Int']['output']>;
|
|
67
|
+
min_temperature_c?: Maybe<Scalars['Int']['output']>;
|
|
68
|
+
sport: Scalars['String']['output'];
|
|
69
|
+
start_time?: Maybe<Scalars['String']['output']>;
|
|
70
|
+
sub_sport?: Maybe<Scalars['String']['output']>;
|
|
71
|
+
total_ascent_m?: Maybe<Scalars['Float']['output']>;
|
|
72
|
+
total_descent_m?: Maybe<Scalars['Float']['output']>;
|
|
73
|
+
total_distance?: Maybe<Scalars['Float']['output']>;
|
|
74
|
+
total_elapsed_time?: Maybe<Scalars['Float']['output']>;
|
|
75
|
+
total_timer_time?: Maybe<Scalars['Float']['output']>;
|
|
76
|
+
track_point_count?: Maybe<Scalars['Int']['output']>;
|
|
77
|
+
uploaded_at?: Maybe<Scalars['String']['output']>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface GarminActivityConnection {
|
|
81
|
+
__typename?: 'GarminActivityConnection';
|
|
82
|
+
items: Array<GarminActivity>;
|
|
83
|
+
limit: Scalars['Int']['output'];
|
|
84
|
+
offset: Scalars['Int']['output'];
|
|
85
|
+
total: Scalars['Int']['output'];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface GarminTrackPoint {
|
|
89
|
+
__typename?: 'GarminTrackPoint';
|
|
90
|
+
activity_id: Scalars['String']['output'];
|
|
91
|
+
altitude?: Maybe<Scalars['Float']['output']>;
|
|
92
|
+
cadence?: Maybe<Scalars['Int']['output']>;
|
|
93
|
+
created_at?: Maybe<Scalars['String']['output']>;
|
|
94
|
+
distance_from_start_km?: Maybe<Scalars['Float']['output']>;
|
|
95
|
+
heart_rate?: Maybe<Scalars['Int']['output']>;
|
|
96
|
+
id: Scalars['Int']['output'];
|
|
97
|
+
latitude: Scalars['Float']['output'];
|
|
98
|
+
longitude: Scalars['Float']['output'];
|
|
99
|
+
speed_kmh?: Maybe<Scalars['Float']['output']>;
|
|
100
|
+
temperature_c?: Maybe<Scalars['Float']['output']>;
|
|
101
|
+
timestamp: Scalars['DateTime']['output'];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface GarminTrackPointConnection {
|
|
105
|
+
__typename?: 'GarminTrackPointConnection';
|
|
106
|
+
items: Array<GarminTrackPoint>;
|
|
107
|
+
limit: Scalars['Int']['output'];
|
|
108
|
+
offset: Scalars['Int']['output'];
|
|
109
|
+
total: Scalars['Int']['output'];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface HealthStatus {
|
|
113
|
+
__typename?: 'HealthStatus';
|
|
114
|
+
status: Scalars['String']['output'];
|
|
115
|
+
version: Scalars['String']['output'];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface Location {
|
|
119
|
+
__typename?: 'Location';
|
|
120
|
+
accuracy?: Maybe<Scalars['Float']['output']>;
|
|
121
|
+
altitude?: Maybe<Scalars['Float']['output']>;
|
|
122
|
+
battery?: Maybe<Scalars['Int']['output']>;
|
|
123
|
+
battery_status?: Maybe<Scalars['Int']['output']>;
|
|
124
|
+
connection_type?: Maybe<Scalars['String']['output']>;
|
|
125
|
+
created_at?: Maybe<Scalars['String']['output']>;
|
|
126
|
+
device_id: Scalars['String']['output'];
|
|
127
|
+
id: Scalars['Int']['output'];
|
|
128
|
+
latitude: Scalars['Float']['output'];
|
|
129
|
+
longitude: Scalars['Float']['output'];
|
|
130
|
+
tid?: Maybe<Scalars['String']['output']>;
|
|
131
|
+
timestamp: Scalars['DateTime']['output'];
|
|
132
|
+
trigger?: Maybe<Scalars['String']['output']>;
|
|
133
|
+
velocity?: Maybe<Scalars['Float']['output']>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface LocationConnection {
|
|
137
|
+
__typename?: 'LocationConnection';
|
|
138
|
+
items: Array<Location>;
|
|
139
|
+
limit: Scalars['Int']['output'];
|
|
140
|
+
offset: Scalars['Int']['output'];
|
|
141
|
+
total: Scalars['Int']['output'];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface LocationCount {
|
|
145
|
+
__typename?: 'LocationCount';
|
|
146
|
+
count: Scalars['Int']['output'];
|
|
147
|
+
date?: Maybe<Scalars['String']['output']>;
|
|
148
|
+
device_id?: Maybe<Scalars['String']['output']>;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface LocationDetail {
|
|
152
|
+
__typename?: 'LocationDetail';
|
|
153
|
+
accuracy?: Maybe<Scalars['Float']['output']>;
|
|
154
|
+
altitude?: Maybe<Scalars['Float']['output']>;
|
|
155
|
+
battery?: Maybe<Scalars['Int']['output']>;
|
|
156
|
+
battery_status?: Maybe<Scalars['Int']['output']>;
|
|
157
|
+
connection_type?: Maybe<Scalars['String']['output']>;
|
|
158
|
+
created_at?: Maybe<Scalars['String']['output']>;
|
|
159
|
+
device_id: Scalars['String']['output'];
|
|
160
|
+
id: Scalars['Int']['output'];
|
|
161
|
+
latitude: Scalars['Float']['output'];
|
|
162
|
+
longitude: Scalars['Float']['output'];
|
|
163
|
+
raw_payload?: Maybe<Scalars['JSON']['output']>;
|
|
164
|
+
tid?: Maybe<Scalars['String']['output']>;
|
|
165
|
+
timestamp: Scalars['DateTime']['output'];
|
|
166
|
+
trigger?: Maybe<Scalars['String']['output']>;
|
|
167
|
+
velocity?: Maybe<Scalars['Float']['output']>;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface NearbyPoint {
|
|
171
|
+
__typename?: 'NearbyPoint';
|
|
172
|
+
distance_meters: Scalars['Float']['output'];
|
|
173
|
+
id: Scalars['Int']['output'];
|
|
174
|
+
latitude: Scalars['Float']['output'];
|
|
175
|
+
longitude: Scalars['Float']['output'];
|
|
176
|
+
source: Scalars['String']['output'];
|
|
177
|
+
timestamp: Scalars['DateTime']['output'];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface PaginationInfo {
|
|
181
|
+
__typename?: 'PaginationInfo';
|
|
182
|
+
limit: Scalars['Int']['output'];
|
|
183
|
+
offset: Scalars['Int']['output'];
|
|
184
|
+
total: Scalars['Int']['output'];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export interface Query {
|
|
188
|
+
__typename?: 'Query';
|
|
189
|
+
calculateDistance: DistanceResult;
|
|
190
|
+
dailySummary: Array<DailyActivitySummary>;
|
|
191
|
+
devices: Array<DeviceInfo>;
|
|
192
|
+
garminActivities: GarminActivityConnection;
|
|
193
|
+
garminActivity?: Maybe<GarminActivity>;
|
|
194
|
+
garminSports: Array<SportInfo>;
|
|
195
|
+
garminTrackPoints: GarminTrackPointConnection;
|
|
196
|
+
health: HealthStatus;
|
|
197
|
+
location?: Maybe<LocationDetail>;
|
|
198
|
+
locationCount: LocationCount;
|
|
199
|
+
locations: LocationConnection;
|
|
200
|
+
nearbyPoints: Array<NearbyPoint>;
|
|
201
|
+
ready: ReadyStatus;
|
|
202
|
+
referenceLocation?: Maybe<ReferenceLocation>;
|
|
203
|
+
referenceLocations: Array<ReferenceLocation>;
|
|
204
|
+
unifiedGps: UnifiedGpsConnection;
|
|
205
|
+
withinReference: WithinReferenceResult;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
export interface QueryCalculateDistanceArgs {
|
|
210
|
+
from_lat: Scalars['Float']['input'];
|
|
211
|
+
from_lon: Scalars['Float']['input'];
|
|
212
|
+
to_lat: Scalars['Float']['input'];
|
|
213
|
+
to_lon: Scalars['Float']['input'];
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
export interface QueryDailySummaryArgs {
|
|
218
|
+
date_from?: InputMaybe<Scalars['String']['input']>;
|
|
219
|
+
date_to?: InputMaybe<Scalars['String']['input']>;
|
|
220
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
export interface QueryGarminActivitiesArgs {
|
|
225
|
+
date_from?: InputMaybe<Scalars['String']['input']>;
|
|
226
|
+
date_to?: InputMaybe<Scalars['String']['input']>;
|
|
227
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
228
|
+
offset?: InputMaybe<Scalars['Int']['input']>;
|
|
229
|
+
order?: InputMaybe<SortOrder>;
|
|
230
|
+
sort?: InputMaybe<Scalars['String']['input']>;
|
|
231
|
+
sport?: InputMaybe<Scalars['String']['input']>;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
export interface QueryGarminActivityArgs {
|
|
236
|
+
activity_id: Scalars['String']['input'];
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
export interface QueryGarminTrackPointsArgs {
|
|
241
|
+
activity_id: Scalars['String']['input'];
|
|
242
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
243
|
+
offset?: InputMaybe<Scalars['Int']['input']>;
|
|
244
|
+
order?: InputMaybe<SortOrder>;
|
|
245
|
+
simplify?: InputMaybe<Scalars['Float']['input']>;
|
|
246
|
+
sort?: InputMaybe<Scalars['String']['input']>;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
export interface QueryLocationArgs {
|
|
251
|
+
id: Scalars['Int']['input'];
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
export interface QueryLocationCountArgs {
|
|
256
|
+
date?: InputMaybe<Scalars['String']['input']>;
|
|
257
|
+
device_id?: InputMaybe<Scalars['String']['input']>;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
export interface QueryLocationsArgs {
|
|
262
|
+
date_from?: InputMaybe<Scalars['String']['input']>;
|
|
263
|
+
date_to?: InputMaybe<Scalars['String']['input']>;
|
|
264
|
+
device_id?: InputMaybe<Scalars['String']['input']>;
|
|
265
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
266
|
+
offset?: InputMaybe<Scalars['Int']['input']>;
|
|
267
|
+
order?: InputMaybe<SortOrder>;
|
|
268
|
+
sort?: InputMaybe<Scalars['String']['input']>;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
export interface QueryNearbyPointsArgs {
|
|
273
|
+
lat: Scalars['Float']['input'];
|
|
274
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
275
|
+
lon: Scalars['Float']['input'];
|
|
276
|
+
radius_meters?: InputMaybe<Scalars['Float']['input']>;
|
|
277
|
+
source?: InputMaybe<Scalars['String']['input']>;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
export interface QueryReferenceLocationArgs {
|
|
282
|
+
id: Scalars['Int']['input'];
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
export interface QueryUnifiedGpsArgs {
|
|
287
|
+
date_from?: InputMaybe<Scalars['String']['input']>;
|
|
288
|
+
date_to?: InputMaybe<Scalars['String']['input']>;
|
|
289
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
290
|
+
offset?: InputMaybe<Scalars['Int']['input']>;
|
|
291
|
+
order?: InputMaybe<SortOrder>;
|
|
292
|
+
source?: InputMaybe<Scalars['String']['input']>;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
export interface QueryWithinReferenceArgs {
|
|
297
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
298
|
+
name: Scalars['String']['input'];
|
|
299
|
+
source?: InputMaybe<Scalars['String']['input']>;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface ReadyStatus {
|
|
303
|
+
__typename?: 'ReadyStatus';
|
|
304
|
+
database?: Maybe<Scalars['String']['output']>;
|
|
305
|
+
status: Scalars['String']['output'];
|
|
306
|
+
version?: Maybe<Scalars['String']['output']>;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export interface ReferenceLocation {
|
|
310
|
+
__typename?: 'ReferenceLocation';
|
|
311
|
+
created_at?: Maybe<Scalars['String']['output']>;
|
|
312
|
+
description?: Maybe<Scalars['String']['output']>;
|
|
313
|
+
id: Scalars['Int']['output'];
|
|
314
|
+
latitude: Scalars['Float']['output'];
|
|
315
|
+
longitude: Scalars['Float']['output'];
|
|
316
|
+
name: Scalars['String']['output'];
|
|
317
|
+
radius_meters: Scalars['Float']['output'];
|
|
318
|
+
updated_at?: Maybe<Scalars['String']['output']>;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export type SortOrder =
|
|
322
|
+
| 'asc'
|
|
323
|
+
| 'desc';
|
|
324
|
+
|
|
325
|
+
export interface SportInfo {
|
|
326
|
+
__typename?: 'SportInfo';
|
|
327
|
+
activity_count: Scalars['Int']['output'];
|
|
328
|
+
sport: Scalars['String']['output'];
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface UnifiedGpsConnection {
|
|
332
|
+
__typename?: 'UnifiedGpsConnection';
|
|
333
|
+
items: Array<UnifiedGpsPoint>;
|
|
334
|
+
limit: Scalars['Int']['output'];
|
|
335
|
+
offset: Scalars['Int']['output'];
|
|
336
|
+
total: Scalars['Int']['output'];
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export interface UnifiedGpsPoint {
|
|
340
|
+
__typename?: 'UnifiedGpsPoint';
|
|
341
|
+
accuracy?: Maybe<Scalars['Float']['output']>;
|
|
342
|
+
battery?: Maybe<Scalars['Int']['output']>;
|
|
343
|
+
created_at?: Maybe<Scalars['String']['output']>;
|
|
344
|
+
heart_rate?: Maybe<Scalars['Int']['output']>;
|
|
345
|
+
identifier: Scalars['String']['output'];
|
|
346
|
+
latitude: Scalars['Float']['output'];
|
|
347
|
+
longitude: Scalars['Float']['output'];
|
|
348
|
+
source: Scalars['String']['output'];
|
|
349
|
+
speed_kmh?: Maybe<Scalars['Float']['output']>;
|
|
350
|
+
timestamp: Scalars['DateTime']['output'];
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export interface WithinReferenceResult {
|
|
354
|
+
__typename?: 'WithinReferenceResult';
|
|
355
|
+
points: Array<NearbyPoint>;
|
|
356
|
+
radius_meters: Scalars['Float']['output'];
|
|
357
|
+
reference_name: Scalars['String']['output'];
|
|
358
|
+
total_points: Scalars['Int']['output'];
|
|
359
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stuartshay/otel-graphql-types",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "TypeScript types for otel-data-gateway — Auto-generated from GraphQL schema",
|
|
5
|
+
"types": "index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./index.d.ts"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"index.d.ts",
|
|
13
|
+
"schema.graphql",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"prepublishOnly": "echo 'Types should be generated before publishing'"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"otel-data-gateway",
|
|
21
|
+
"graphql",
|
|
22
|
+
"typescript",
|
|
23
|
+
"types",
|
|
24
|
+
"apollo-server"
|
|
25
|
+
],
|
|
26
|
+
"author": "Stuart Shay",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/stuartshay/otel-data-gateway.git",
|
|
31
|
+
"directory": "packages/graphql-types"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/stuartshay/otel-data-gateway/tree/master/packages/graphql-types",
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/schema.graphql
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
# -------------------------------------------------------
|
|
2
|
+
# Scalars
|
|
3
|
+
# -------------------------------------------------------
|
|
4
|
+
scalar DateTime
|
|
5
|
+
|
|
6
|
+
# -------------------------------------------------------
|
|
7
|
+
# Common Types
|
|
8
|
+
# -------------------------------------------------------
|
|
9
|
+
type PaginationInfo {
|
|
10
|
+
total: Int!
|
|
11
|
+
limit: Int!
|
|
12
|
+
offset: Int!
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
# -------------------------------------------------------
|
|
16
|
+
# Health
|
|
17
|
+
# -------------------------------------------------------
|
|
18
|
+
type HealthStatus {
|
|
19
|
+
status: String!
|
|
20
|
+
version: String!
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type ReadyStatus {
|
|
24
|
+
status: String!
|
|
25
|
+
database: String
|
|
26
|
+
version: String
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# -------------------------------------------------------
|
|
30
|
+
# Locations (OwnTracks)
|
|
31
|
+
# -------------------------------------------------------
|
|
32
|
+
type Location {
|
|
33
|
+
id: Int!
|
|
34
|
+
device_id: String!
|
|
35
|
+
tid: String
|
|
36
|
+
latitude: Float!
|
|
37
|
+
longitude: Float!
|
|
38
|
+
accuracy: Float
|
|
39
|
+
altitude: Float
|
|
40
|
+
velocity: Float
|
|
41
|
+
battery: Int
|
|
42
|
+
battery_status: Int
|
|
43
|
+
connection_type: String
|
|
44
|
+
trigger: String
|
|
45
|
+
timestamp: DateTime!
|
|
46
|
+
created_at: String
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type LocationDetail {
|
|
50
|
+
id: Int!
|
|
51
|
+
device_id: String!
|
|
52
|
+
tid: String
|
|
53
|
+
latitude: Float!
|
|
54
|
+
longitude: Float!
|
|
55
|
+
accuracy: Float
|
|
56
|
+
altitude: Float
|
|
57
|
+
velocity: Float
|
|
58
|
+
battery: Int
|
|
59
|
+
battery_status: Int
|
|
60
|
+
connection_type: String
|
|
61
|
+
trigger: String
|
|
62
|
+
timestamp: DateTime!
|
|
63
|
+
created_at: String
|
|
64
|
+
raw_payload: JSON
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
scalar JSON
|
|
68
|
+
|
|
69
|
+
type LocationConnection {
|
|
70
|
+
items: [Location!]!
|
|
71
|
+
total: Int!
|
|
72
|
+
limit: Int!
|
|
73
|
+
offset: Int!
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
type DeviceInfo {
|
|
77
|
+
device_id: String!
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
type LocationCount {
|
|
81
|
+
count: Int!
|
|
82
|
+
date: String
|
|
83
|
+
device_id: String
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
# -------------------------------------------------------
|
|
87
|
+
# Garmin
|
|
88
|
+
# -------------------------------------------------------
|
|
89
|
+
type GarminActivity {
|
|
90
|
+
activity_id: String!
|
|
91
|
+
sport: String!
|
|
92
|
+
sub_sport: String
|
|
93
|
+
start_time: String
|
|
94
|
+
end_time: String
|
|
95
|
+
distance_km: Float
|
|
96
|
+
duration_seconds: Float
|
|
97
|
+
avg_heart_rate: Int
|
|
98
|
+
max_heart_rate: Int
|
|
99
|
+
avg_cadence: Int
|
|
100
|
+
max_cadence: Int
|
|
101
|
+
calories: Int
|
|
102
|
+
avg_speed_kmh: Float
|
|
103
|
+
max_speed_kmh: Float
|
|
104
|
+
total_ascent_m: Float
|
|
105
|
+
total_descent_m: Float
|
|
106
|
+
total_distance: Float
|
|
107
|
+
avg_pace: Float
|
|
108
|
+
device_manufacturer: String
|
|
109
|
+
avg_temperature_c: Int
|
|
110
|
+
min_temperature_c: Int
|
|
111
|
+
max_temperature_c: Int
|
|
112
|
+
total_elapsed_time: Float
|
|
113
|
+
total_timer_time: Float
|
|
114
|
+
created_at: String
|
|
115
|
+
uploaded_at: String
|
|
116
|
+
track_point_count: Int
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
type GarminActivityConnection {
|
|
120
|
+
items: [GarminActivity!]!
|
|
121
|
+
total: Int!
|
|
122
|
+
limit: Int!
|
|
123
|
+
offset: Int!
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
type GarminTrackPoint {
|
|
127
|
+
id: Int!
|
|
128
|
+
activity_id: String!
|
|
129
|
+
latitude: Float!
|
|
130
|
+
longitude: Float!
|
|
131
|
+
timestamp: DateTime!
|
|
132
|
+
altitude: Float
|
|
133
|
+
distance_from_start_km: Float
|
|
134
|
+
speed_kmh: Float
|
|
135
|
+
heart_rate: Int
|
|
136
|
+
cadence: Int
|
|
137
|
+
temperature_c: Float
|
|
138
|
+
created_at: String
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
type GarminTrackPointConnection {
|
|
142
|
+
items: [GarminTrackPoint!]!
|
|
143
|
+
total: Int!
|
|
144
|
+
limit: Int!
|
|
145
|
+
offset: Int!
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
type SportInfo {
|
|
149
|
+
sport: String!
|
|
150
|
+
activity_count: Int!
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
# -------------------------------------------------------
|
|
154
|
+
# Unified GPS
|
|
155
|
+
# -------------------------------------------------------
|
|
156
|
+
type UnifiedGpsPoint {
|
|
157
|
+
source: String!
|
|
158
|
+
identifier: String!
|
|
159
|
+
latitude: Float!
|
|
160
|
+
longitude: Float!
|
|
161
|
+
timestamp: DateTime!
|
|
162
|
+
accuracy: Float
|
|
163
|
+
battery: Int
|
|
164
|
+
speed_kmh: Float
|
|
165
|
+
heart_rate: Int
|
|
166
|
+
created_at: String
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
type UnifiedGpsConnection {
|
|
170
|
+
items: [UnifiedGpsPoint!]!
|
|
171
|
+
total: Int!
|
|
172
|
+
limit: Int!
|
|
173
|
+
offset: Int!
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
type DailyActivitySummary {
|
|
177
|
+
activity_date: String
|
|
178
|
+
owntracks_device: String
|
|
179
|
+
owntracks_points: Int
|
|
180
|
+
min_battery: Int
|
|
181
|
+
max_battery: Int
|
|
182
|
+
avg_accuracy: Float
|
|
183
|
+
garmin_sport: String
|
|
184
|
+
garmin_activities: Int
|
|
185
|
+
total_distance_km: Float
|
|
186
|
+
total_duration_seconds: Float
|
|
187
|
+
avg_heart_rate: Int
|
|
188
|
+
total_calories: Int
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
# -------------------------------------------------------
|
|
192
|
+
# Reference Locations
|
|
193
|
+
# -------------------------------------------------------
|
|
194
|
+
type ReferenceLocation {
|
|
195
|
+
id: Int!
|
|
196
|
+
name: String!
|
|
197
|
+
latitude: Float!
|
|
198
|
+
longitude: Float!
|
|
199
|
+
radius_meters: Float!
|
|
200
|
+
description: String
|
|
201
|
+
created_at: String
|
|
202
|
+
updated_at: String
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
# -------------------------------------------------------
|
|
206
|
+
# Spatial
|
|
207
|
+
# -------------------------------------------------------
|
|
208
|
+
type NearbyPoint {
|
|
209
|
+
source: String!
|
|
210
|
+
id: Int!
|
|
211
|
+
latitude: Float!
|
|
212
|
+
longitude: Float!
|
|
213
|
+
distance_meters: Float!
|
|
214
|
+
timestamp: DateTime!
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
type DistanceResult {
|
|
218
|
+
distance_meters: Float!
|
|
219
|
+
from_lat: Float!
|
|
220
|
+
from_lon: Float!
|
|
221
|
+
to_lat: Float!
|
|
222
|
+
to_lon: Float!
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
type WithinReferenceResult {
|
|
226
|
+
reference_name: String!
|
|
227
|
+
radius_meters: Float!
|
|
228
|
+
total_points: Int!
|
|
229
|
+
points: [NearbyPoint!]!
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
# -------------------------------------------------------
|
|
233
|
+
# Enums
|
|
234
|
+
# -------------------------------------------------------
|
|
235
|
+
enum SortOrder {
|
|
236
|
+
asc
|
|
237
|
+
desc
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
# -------------------------------------------------------
|
|
241
|
+
# Queries
|
|
242
|
+
# -------------------------------------------------------
|
|
243
|
+
type Query {
|
|
244
|
+
# Health
|
|
245
|
+
health: HealthStatus!
|
|
246
|
+
ready: ReadyStatus!
|
|
247
|
+
|
|
248
|
+
# Locations
|
|
249
|
+
locations(
|
|
250
|
+
device_id: String
|
|
251
|
+
date_from: String
|
|
252
|
+
date_to: String
|
|
253
|
+
limit: Int
|
|
254
|
+
offset: Int
|
|
255
|
+
sort: String
|
|
256
|
+
order: SortOrder
|
|
257
|
+
): LocationConnection!
|
|
258
|
+
|
|
259
|
+
location(id: Int!): LocationDetail
|
|
260
|
+
|
|
261
|
+
devices: [DeviceInfo!]!
|
|
262
|
+
|
|
263
|
+
locationCount(date: String, device_id: String): LocationCount!
|
|
264
|
+
|
|
265
|
+
# Garmin
|
|
266
|
+
garminActivities(
|
|
267
|
+
sport: String
|
|
268
|
+
date_from: String
|
|
269
|
+
date_to: String
|
|
270
|
+
limit: Int
|
|
271
|
+
offset: Int
|
|
272
|
+
sort: String
|
|
273
|
+
order: SortOrder
|
|
274
|
+
): GarminActivityConnection!
|
|
275
|
+
|
|
276
|
+
garminActivity(activity_id: String!): GarminActivity
|
|
277
|
+
|
|
278
|
+
garminTrackPoints(
|
|
279
|
+
activity_id: String!
|
|
280
|
+
limit: Int
|
|
281
|
+
offset: Int
|
|
282
|
+
sort: String
|
|
283
|
+
order: SortOrder
|
|
284
|
+
simplify: Float
|
|
285
|
+
): GarminTrackPointConnection!
|
|
286
|
+
|
|
287
|
+
garminSports: [SportInfo!]!
|
|
288
|
+
|
|
289
|
+
# Unified GPS
|
|
290
|
+
unifiedGps(
|
|
291
|
+
source: String
|
|
292
|
+
date_from: String
|
|
293
|
+
date_to: String
|
|
294
|
+
limit: Int
|
|
295
|
+
offset: Int
|
|
296
|
+
order: SortOrder
|
|
297
|
+
): UnifiedGpsConnection!
|
|
298
|
+
|
|
299
|
+
dailySummary(
|
|
300
|
+
date_from: String
|
|
301
|
+
date_to: String
|
|
302
|
+
limit: Int
|
|
303
|
+
): [DailyActivitySummary!]!
|
|
304
|
+
|
|
305
|
+
# Reference Locations
|
|
306
|
+
referenceLocations: [ReferenceLocation!]!
|
|
307
|
+
referenceLocation(id: Int!): ReferenceLocation
|
|
308
|
+
|
|
309
|
+
# Spatial
|
|
310
|
+
nearbyPoints(
|
|
311
|
+
lat: Float!
|
|
312
|
+
lon: Float!
|
|
313
|
+
radius_meters: Float
|
|
314
|
+
source: String
|
|
315
|
+
limit: Int
|
|
316
|
+
): [NearbyPoint!]!
|
|
317
|
+
|
|
318
|
+
calculateDistance(
|
|
319
|
+
from_lat: Float!
|
|
320
|
+
from_lon: Float!
|
|
321
|
+
to_lat: Float!
|
|
322
|
+
to_lon: Float!
|
|
323
|
+
): DistanceResult!
|
|
324
|
+
|
|
325
|
+
withinReference(
|
|
326
|
+
name: String!
|
|
327
|
+
source: String
|
|
328
|
+
limit: Int
|
|
329
|
+
): WithinReferenceResult!
|
|
330
|
+
}
|