@mountaya/client 0.0.0-stage → 0.1.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/CHANGELOG.md +104 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +1260 -2
- package/dist/admin/index.cjs +3521 -0
- package/dist/admin/index.cjs.map +1 -0
- package/dist/admin/index.d.cts +1070 -0
- package/dist/admin/index.d.ts +1070 -0
- package/dist/admin/index.js +301 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/browser.cjs +8073 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.cts +106 -0
- package/dist/browser.d.ts +106 -0
- package/dist/browser.js +53 -0
- package/dist/browser.js.map +1 -0
- package/dist/chunk-BM526BHG.js +342 -0
- package/dist/chunk-BM526BHG.js.map +1 -0
- package/dist/chunk-D2YEVTG7.js +327 -0
- package/dist/chunk-D2YEVTG7.js.map +1 -0
- package/dist/chunk-OHKVUREN.js +3500 -0
- package/dist/chunk-OHKVUREN.js.map +1 -0
- package/dist/chunk-TDTK2L5H.js +3842 -0
- package/dist/chunk-TDTK2L5H.js.map +1 -0
- package/dist/coreOperations.gen-BMYPoBbz.d.ts +1760 -0
- package/dist/coreOperations.gen-BxX5xRxw.d.cts +1760 -0
- package/dist/errors-B-GqAtQv.d.cts +75960 -0
- package/dist/errors-B-GqAtQv.d.ts +75960 -0
- package/dist/events/index.cjs +1972 -0
- package/dist/events/index.cjs.map +1 -0
- package/dist/events/index.d.cts +781 -0
- package/dist/events/index.d.ts +781 -0
- package/dist/events/index.js +826 -0
- package/dist/events/index.js.map +1 -0
- package/dist/index.cjs +8072 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +76 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/dist/operations.gen-CvTyzKNF.d.cts +3993 -0
- package/dist/operations.gen-DUD406TV.d.ts +3993 -0
- package/package.json +127 -4
- package/src/admin/index.ts +47 -0
- package/src/admin/rules/mountayaAdmin.ts +102 -0
- package/src/browser.ts +232 -0
- package/src/core/engines/sessionToken.ts +870 -0
- package/src/core/rules/auth.ts +1017 -0
- package/src/core/rules/clientHeader.ts +28 -0
- package/src/core/rules/dates.ts +200 -0
- package/src/core/rules/decode.ts +154 -0
- package/src/core/rules/envelope.ts +41 -0
- package/src/core/rules/errors.ts +1486 -0
- package/src/core/rules/graphql.ts +576 -0
- package/src/core/rules/headerValue.ts +42 -0
- package/src/core/rules/idempotencyKey.ts +64 -0
- package/src/core/rules/nullMask.ts +127 -0
- package/src/core/rules/nullMasks.gen.ts +416 -0
- package/src/core/rules/paginate.ts +316 -0
- package/src/core/rules/rateLimit.ts +507 -0
- package/src/core/rules/redaction.ts +219 -0
- package/src/core/rules/resourceRef.ts +110 -0
- package/src/core/rules/responseBody.ts +492 -0
- package/src/core/rules/retry.ts +386 -0
- package/src/core/rules/selection.ts +416 -0
- package/src/core/rules/sessionAnswer.ts +90 -0
- package/src/core/rules/sessionSchedule.ts +131 -0
- package/src/core/rules/sessionWait.ts +112 -0
- package/src/core/rules/transport.ts +2386 -0
- package/src/core/rules/version.gen.ts +16 -0
- package/src/core/rules/webAddress.ts +165 -0
- package/src/core/rules/webAddresses.gen.ts +30 -0
- package/src/data/operations.gen.ts +603 -0
- package/src/data/schema.gen.ts +8078 -0
- package/src/data/selection.gen.ts +472 -0
- package/src/events/index.ts +67 -0
- package/src/events/rules/agent.ts +439 -0
- package/src/events/rules/collab.ts +554 -0
- package/src/events/rules/collabNulls.gen.ts +17 -0
- package/src/events/rules/eventStream.ts +94 -0
- package/src/events/rules/openSseStream.ts +594 -0
- package/src/events/rules/sse.ts +349 -0
- package/src/index.ts +231 -0
- package/src/rest/adminOperations.gen.ts +70 -0
- package/src/rest/adminResources.gen.ts +136 -0
- package/src/rest/coreOperations.gen.ts +74 -0
- package/src/rest/coreResources.gen.ts +244 -0
- package/src/rest/dates.gen.ts +217 -0
- package/src/rest/operations.gen.ts +4341 -0
- package/src/rest/resources.gen.ts +369 -0
- package/src/rest/schema.gen.ts +56840 -0
- package/src/tiles/operations.gen.ts +206 -0
- package/src/tiles/schema.gen.ts +8408 -0
- package/src/webhooks/rules/constructWebhookEvent.ts +482 -0
- package/src/webhooks/rules/webhookEvent.ts +38 -0
- package/src/webhooks/rules/webhookEvents.gen.ts +732 -0
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// The selectable field tree of each Data API operation, generated from the Data API
|
|
4
|
+
// operation catalog the Mountaya platform builds from the SDL, not from the SDL itself.
|
|
5
|
+
// The catalog carries the depth-bounded tree the server prints each operation's full
|
|
6
|
+
// document from, which is what this file has to agree with.
|
|
7
|
+
//
|
|
8
|
+
// A leaf is `true`; a composite is a nested tree. This is the shape `select` is checked
|
|
9
|
+
// against, so it is also the definition of what counts as a leaf: the GeoJSON scalar is
|
|
10
|
+
// an object on the wire and a leaf here, which a tree derived from the result type could
|
|
11
|
+
// not express.
|
|
12
|
+
//
|
|
13
|
+
// The SDL is authored in mountaya/schemas (graphql/data); edit it there, not here.
|
|
14
|
+
|
|
15
|
+
import type { Selection } from "../core/rules/selection.js";
|
|
16
|
+
|
|
17
|
+
/** The selectable fields of `analyzeGeometry`. */
|
|
18
|
+
export const analyzeGeometryFields = {
|
|
19
|
+
analysis: {
|
|
20
|
+
elevation: {
|
|
21
|
+
altitude: { max: true, min: true },
|
|
22
|
+
ascent: true,
|
|
23
|
+
descent: true,
|
|
24
|
+
gradient: { max: true, min: true },
|
|
25
|
+
},
|
|
26
|
+
elevations: true,
|
|
27
|
+
slopeInfo: { fromIndex: true, toIndex: true, value: true },
|
|
28
|
+
speedInfo: { fromIndex: true, toIndex: true, value: true },
|
|
29
|
+
surfaceInfo: { fromIndex: true, toIndex: true, value: true },
|
|
30
|
+
trailDifficultyInfo: { fromIndex: true, toIndex: true, value: true },
|
|
31
|
+
wayTypeInfo: { fromIndex: true, toIndex: true, value: true },
|
|
32
|
+
advisories: {
|
|
33
|
+
tollway: true,
|
|
34
|
+
restrictedAccess: true,
|
|
35
|
+
tollwayInfo: { fromIndex: true, toIndex: true, value: true },
|
|
36
|
+
roadAccessInfo: { fromIndex: true, toIndex: true, values: true },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
duration: true,
|
|
40
|
+
} as const;
|
|
41
|
+
|
|
42
|
+
/** A `select` for `analyzeGeometry`. */
|
|
43
|
+
export type AnalyzeGeometrySelection = Selection<typeof analyzeGeometryFields>;
|
|
44
|
+
|
|
45
|
+
/** The selectable fields of `directions`. */
|
|
46
|
+
export const directionsFields = {
|
|
47
|
+
routes: {
|
|
48
|
+
distance: true,
|
|
49
|
+
duration: true,
|
|
50
|
+
elevation: {
|
|
51
|
+
altitude: { max: true, min: true },
|
|
52
|
+
ascent: true,
|
|
53
|
+
descent: true,
|
|
54
|
+
gradient: { max: true, min: true },
|
|
55
|
+
},
|
|
56
|
+
geometry: true,
|
|
57
|
+
analysis: {
|
|
58
|
+
elevation: {
|
|
59
|
+
altitude: { max: true, min: true },
|
|
60
|
+
ascent: true,
|
|
61
|
+
descent: true,
|
|
62
|
+
gradient: { max: true, min: true },
|
|
63
|
+
},
|
|
64
|
+
elevations: true,
|
|
65
|
+
slopeInfo: { fromIndex: true, toIndex: true, value: true },
|
|
66
|
+
speedInfo: { fromIndex: true, toIndex: true, value: true },
|
|
67
|
+
surfaceInfo: { fromIndex: true, toIndex: true, value: true },
|
|
68
|
+
trailDifficultyInfo: { fromIndex: true, toIndex: true, value: true },
|
|
69
|
+
wayTypeInfo: { fromIndex: true, toIndex: true, value: true },
|
|
70
|
+
advisories: {
|
|
71
|
+
tollway: true,
|
|
72
|
+
restrictedAccess: true,
|
|
73
|
+
tollwayInfo: { fromIndex: true, toIndex: true, value: true },
|
|
74
|
+
roadAccessInfo: { fromIndex: true, toIndex: true, values: true },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
avoidance: true,
|
|
78
|
+
summary: true,
|
|
79
|
+
steps: {
|
|
80
|
+
fromIndex: true,
|
|
81
|
+
toIndex: true,
|
|
82
|
+
type: true,
|
|
83
|
+
name: true,
|
|
84
|
+
distance: true,
|
|
85
|
+
duration: true,
|
|
86
|
+
exitNumber: true,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
} as const;
|
|
90
|
+
|
|
91
|
+
/** A `select` for `directions`. */
|
|
92
|
+
export type DirectionsSelection = Selection<typeof directionsFields>;
|
|
93
|
+
|
|
94
|
+
/** The selectable fields of `exportItinerary`. */
|
|
95
|
+
export const exportItineraryFields = {
|
|
96
|
+
url: true,
|
|
97
|
+
filename: true,
|
|
98
|
+
format: true,
|
|
99
|
+
expiresAt: true,
|
|
100
|
+
} as const;
|
|
101
|
+
|
|
102
|
+
/** A `select` for `exportItinerary`. */
|
|
103
|
+
export type ExportItinerarySelection = Selection<typeof exportItineraryFields>;
|
|
104
|
+
|
|
105
|
+
/** The selectable fields of `geocode`. */
|
|
106
|
+
export const geocodeFields = {
|
|
107
|
+
count: true,
|
|
108
|
+
places: {
|
|
109
|
+
osm: { id: true, type: true, key: true, value: true },
|
|
110
|
+
name: true,
|
|
111
|
+
label: true,
|
|
112
|
+
layer: true,
|
|
113
|
+
category: true,
|
|
114
|
+
point: true,
|
|
115
|
+
bounds: true,
|
|
116
|
+
country: true,
|
|
117
|
+
countryName: true,
|
|
118
|
+
region: true,
|
|
119
|
+
county: true,
|
|
120
|
+
city: true,
|
|
121
|
+
postcode: true,
|
|
122
|
+
street: true,
|
|
123
|
+
houseNumber: true,
|
|
124
|
+
},
|
|
125
|
+
} as const;
|
|
126
|
+
|
|
127
|
+
/** A `select` for `geocode`. */
|
|
128
|
+
export type GeocodeSelection = Selection<typeof geocodeFields>;
|
|
129
|
+
|
|
130
|
+
/** The selectable fields of `isochrones`. */
|
|
131
|
+
export const isochronesFields = {
|
|
132
|
+
isochrones: { value: true, area: true, reachFactor: true, center: true, geometry: true },
|
|
133
|
+
} as const;
|
|
134
|
+
|
|
135
|
+
/** A `select` for `isochrones`. */
|
|
136
|
+
export type IsochronesSelection = Selection<typeof isochronesFields>;
|
|
137
|
+
|
|
138
|
+
/** The selectable fields of `itinerary`. */
|
|
139
|
+
export const itineraryFields = {
|
|
140
|
+
id: true,
|
|
141
|
+
name: true,
|
|
142
|
+
description: true,
|
|
143
|
+
activitySlug: true,
|
|
144
|
+
distance: true,
|
|
145
|
+
ascent: true,
|
|
146
|
+
isPrivate: true,
|
|
147
|
+
organizationId: true,
|
|
148
|
+
segments: {
|
|
149
|
+
id: true,
|
|
150
|
+
name: true,
|
|
151
|
+
description: true,
|
|
152
|
+
position: true,
|
|
153
|
+
groupId: true,
|
|
154
|
+
distance: true,
|
|
155
|
+
duration: true,
|
|
156
|
+
ascent: true,
|
|
157
|
+
descent: true,
|
|
158
|
+
altitude: { max: true, min: true },
|
|
159
|
+
gradient: { max: true, min: true },
|
|
160
|
+
geometry: true,
|
|
161
|
+
},
|
|
162
|
+
waypoints: {
|
|
163
|
+
id: true,
|
|
164
|
+
name: true,
|
|
165
|
+
description: true,
|
|
166
|
+
position: true,
|
|
167
|
+
point: true,
|
|
168
|
+
amenities: true,
|
|
169
|
+
timing: { cutoffAt: true, stopDuration: true },
|
|
170
|
+
contact: {
|
|
171
|
+
website: true,
|
|
172
|
+
phone: true,
|
|
173
|
+
email: true,
|
|
174
|
+
address: true,
|
|
175
|
+
openingHours: true,
|
|
176
|
+
bookingUrl: true,
|
|
177
|
+
},
|
|
178
|
+
media: { photos: { url: true, caption: true }, links: { label: true, url: true } },
|
|
179
|
+
properties: { key: true, label: true, value: true, format: true },
|
|
180
|
+
},
|
|
181
|
+
groups: { id: true, name: true, color: true, speed: true },
|
|
182
|
+
segmentCount: true,
|
|
183
|
+
waypointCount: true,
|
|
184
|
+
groupCount: true,
|
|
185
|
+
} as const;
|
|
186
|
+
|
|
187
|
+
/** A `select` for `itinerary`. */
|
|
188
|
+
export type ItinerarySelection = Selection<typeof itineraryFields>;
|
|
189
|
+
|
|
190
|
+
/** The selectable fields of `matrix`. */
|
|
191
|
+
export const matrixFields = { durations: true, distances: true } as const;
|
|
192
|
+
|
|
193
|
+
/** A `select` for `matrix`. */
|
|
194
|
+
export type MatrixSelection = Selection<typeof matrixFields>;
|
|
195
|
+
|
|
196
|
+
/** The selectable fields of `pois`. */
|
|
197
|
+
export const poisFields = {
|
|
198
|
+
count: true,
|
|
199
|
+
pois: {
|
|
200
|
+
osm: { id: true, type: true, key: true, value: true },
|
|
201
|
+
name: true,
|
|
202
|
+
category: true,
|
|
203
|
+
point: true,
|
|
204
|
+
elevation: true,
|
|
205
|
+
tags: { key: true, value: true },
|
|
206
|
+
distanceMeters: true,
|
|
207
|
+
country: true,
|
|
208
|
+
countryName: true,
|
|
209
|
+
region: true,
|
|
210
|
+
city: true,
|
|
211
|
+
},
|
|
212
|
+
} as const;
|
|
213
|
+
|
|
214
|
+
/** A `select` for `pois`. */
|
|
215
|
+
export type PoisSelection = Selection<typeof poisFields>;
|
|
216
|
+
|
|
217
|
+
/** The selectable fields of `reverseGeocode`. */
|
|
218
|
+
export const reverseGeocodeFields = {
|
|
219
|
+
point: true,
|
|
220
|
+
places: {
|
|
221
|
+
osm: { id: true, type: true, key: true, value: true },
|
|
222
|
+
name: true,
|
|
223
|
+
label: true,
|
|
224
|
+
layer: true,
|
|
225
|
+
category: true,
|
|
226
|
+
point: true,
|
|
227
|
+
bounds: true,
|
|
228
|
+
country: true,
|
|
229
|
+
countryName: true,
|
|
230
|
+
region: true,
|
|
231
|
+
county: true,
|
|
232
|
+
city: true,
|
|
233
|
+
postcode: true,
|
|
234
|
+
street: true,
|
|
235
|
+
houseNumber: true,
|
|
236
|
+
},
|
|
237
|
+
count: true,
|
|
238
|
+
} as const;
|
|
239
|
+
|
|
240
|
+
/** A `select` for `reverseGeocode`. */
|
|
241
|
+
export type ReverseGeocodeSelection = Selection<typeof reverseGeocodeFields>;
|
|
242
|
+
|
|
243
|
+
/** The selectable fields of `search`. */
|
|
244
|
+
export const searchFields = {
|
|
245
|
+
query: true,
|
|
246
|
+
language: true,
|
|
247
|
+
targets: {
|
|
248
|
+
places: true,
|
|
249
|
+
pois: true,
|
|
250
|
+
ways: true,
|
|
251
|
+
itineraries: true,
|
|
252
|
+
collections: true,
|
|
253
|
+
zones: true,
|
|
254
|
+
},
|
|
255
|
+
places: {
|
|
256
|
+
count: true,
|
|
257
|
+
places: {
|
|
258
|
+
osm: { id: true, type: true, key: true, value: true },
|
|
259
|
+
name: true,
|
|
260
|
+
label: true,
|
|
261
|
+
layer: true,
|
|
262
|
+
category: true,
|
|
263
|
+
point: true,
|
|
264
|
+
bounds: true,
|
|
265
|
+
country: true,
|
|
266
|
+
countryName: true,
|
|
267
|
+
region: true,
|
|
268
|
+
county: true,
|
|
269
|
+
city: true,
|
|
270
|
+
postcode: true,
|
|
271
|
+
street: true,
|
|
272
|
+
houseNumber: true,
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
pois: {
|
|
276
|
+
count: true,
|
|
277
|
+
pois: {
|
|
278
|
+
osm: { id: true, type: true, key: true, value: true },
|
|
279
|
+
name: true,
|
|
280
|
+
category: true,
|
|
281
|
+
point: true,
|
|
282
|
+
elevation: true,
|
|
283
|
+
tags: { key: true, value: true },
|
|
284
|
+
distanceMeters: true,
|
|
285
|
+
country: true,
|
|
286
|
+
countryName: true,
|
|
287
|
+
region: true,
|
|
288
|
+
city: true,
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
ways: {
|
|
292
|
+
count: true,
|
|
293
|
+
ways: {
|
|
294
|
+
osm: { id: true, type: true, key: true, value: true },
|
|
295
|
+
name: true,
|
|
296
|
+
highway: true,
|
|
297
|
+
surface: true,
|
|
298
|
+
sacScale: true,
|
|
299
|
+
point: true,
|
|
300
|
+
bounds: true,
|
|
301
|
+
coordinates: true,
|
|
302
|
+
activityCompatible: true,
|
|
303
|
+
country: true,
|
|
304
|
+
countryName: true,
|
|
305
|
+
region: true,
|
|
306
|
+
city: true,
|
|
307
|
+
},
|
|
308
|
+
activityApplied: true,
|
|
309
|
+
},
|
|
310
|
+
itineraries: {
|
|
311
|
+
count: true,
|
|
312
|
+
itineraries: {
|
|
313
|
+
id: true,
|
|
314
|
+
name: true,
|
|
315
|
+
description: true,
|
|
316
|
+
distance: true,
|
|
317
|
+
ascent: true,
|
|
318
|
+
activitySlug: true,
|
|
319
|
+
start: true,
|
|
320
|
+
bounds: true,
|
|
321
|
+
isPrivate: true,
|
|
322
|
+
organizationId: true,
|
|
323
|
+
score: true,
|
|
324
|
+
matchedField: true,
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
collections: {
|
|
328
|
+
count: true,
|
|
329
|
+
collections: {
|
|
330
|
+
id: true,
|
|
331
|
+
name: true,
|
|
332
|
+
description: true,
|
|
333
|
+
count: { itineraries: true, zones: true },
|
|
334
|
+
bounds: true,
|
|
335
|
+
isPrivate: true,
|
|
336
|
+
organizationId: true,
|
|
337
|
+
score: true,
|
|
338
|
+
matchedField: true,
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
zones: {
|
|
342
|
+
count: true,
|
|
343
|
+
zones: {
|
|
344
|
+
id: true,
|
|
345
|
+
name: true,
|
|
346
|
+
description: true,
|
|
347
|
+
level: true,
|
|
348
|
+
mode: true,
|
|
349
|
+
point: true,
|
|
350
|
+
bounds: true,
|
|
351
|
+
isPrivate: true,
|
|
352
|
+
organizationId: true,
|
|
353
|
+
score: true,
|
|
354
|
+
matchedField: true,
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
errors: { target: true, code: true, message: true },
|
|
358
|
+
} as const;
|
|
359
|
+
|
|
360
|
+
/** A `select` for `search`. */
|
|
361
|
+
export type SearchSelection = Selection<typeof searchFields>;
|
|
362
|
+
|
|
363
|
+
/** The selectable fields of `suggestions`. */
|
|
364
|
+
export const suggestionsFields = {
|
|
365
|
+
routes: {
|
|
366
|
+
distance: true,
|
|
367
|
+
duration: true,
|
|
368
|
+
elevation: {
|
|
369
|
+
altitude: { max: true, min: true },
|
|
370
|
+
ascent: true,
|
|
371
|
+
descent: true,
|
|
372
|
+
gradient: { max: true, min: true },
|
|
373
|
+
},
|
|
374
|
+
geometry: true,
|
|
375
|
+
analysis: {
|
|
376
|
+
elevation: {
|
|
377
|
+
altitude: { max: true, min: true },
|
|
378
|
+
ascent: true,
|
|
379
|
+
descent: true,
|
|
380
|
+
gradient: { max: true, min: true },
|
|
381
|
+
},
|
|
382
|
+
elevations: true,
|
|
383
|
+
slopeInfo: { fromIndex: true, toIndex: true, value: true },
|
|
384
|
+
speedInfo: { fromIndex: true, toIndex: true, value: true },
|
|
385
|
+
surfaceInfo: { fromIndex: true, toIndex: true, value: true },
|
|
386
|
+
trailDifficultyInfo: { fromIndex: true, toIndex: true, value: true },
|
|
387
|
+
wayTypeInfo: { fromIndex: true, toIndex: true, value: true },
|
|
388
|
+
advisories: {
|
|
389
|
+
tollway: true,
|
|
390
|
+
restrictedAccess: true,
|
|
391
|
+
tollwayInfo: { fromIndex: true, toIndex: true, value: true },
|
|
392
|
+
roadAccessInfo: { fromIndex: true, toIndex: true, values: true },
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
summary: true,
|
|
396
|
+
steps: {
|
|
397
|
+
fromIndex: true,
|
|
398
|
+
toIndex: true,
|
|
399
|
+
type: true,
|
|
400
|
+
name: true,
|
|
401
|
+
distance: true,
|
|
402
|
+
duration: true,
|
|
403
|
+
exitNumber: true,
|
|
404
|
+
},
|
|
405
|
+
seed: true,
|
|
406
|
+
},
|
|
407
|
+
} as const;
|
|
408
|
+
|
|
409
|
+
/** A `select` for `suggestions`. */
|
|
410
|
+
export type SuggestionsSelection = Selection<typeof suggestionsFields>;
|
|
411
|
+
|
|
412
|
+
/** The selectable fields of `terrainGrid`. */
|
|
413
|
+
export const terrainGridFields = {
|
|
414
|
+
count: true,
|
|
415
|
+
coveredCount: true,
|
|
416
|
+
zoom: true,
|
|
417
|
+
resolutionMeters: true,
|
|
418
|
+
cols: true,
|
|
419
|
+
rows: true,
|
|
420
|
+
cells: {
|
|
421
|
+
point: true,
|
|
422
|
+
elevation: true,
|
|
423
|
+
slope: true,
|
|
424
|
+
aspect: true,
|
|
425
|
+
aspectOctant: true,
|
|
426
|
+
steepnessBand: true,
|
|
427
|
+
distanceMeters: true,
|
|
428
|
+
},
|
|
429
|
+
} as const;
|
|
430
|
+
|
|
431
|
+
/** A `select` for `terrainGrid`. */
|
|
432
|
+
export type TerrainGridSelection = Selection<typeof terrainGridFields>;
|
|
433
|
+
|
|
434
|
+
/** The selectable fields of `terrainProfile`. */
|
|
435
|
+
export const terrainProfileFields = {
|
|
436
|
+
count: true,
|
|
437
|
+
coveredCount: true,
|
|
438
|
+
zoom: true,
|
|
439
|
+
resolutionMeters: true,
|
|
440
|
+
samples: {
|
|
441
|
+
point: true,
|
|
442
|
+
elevation: true,
|
|
443
|
+
slope: true,
|
|
444
|
+
aspect: true,
|
|
445
|
+
aspectOctant: true,
|
|
446
|
+
steepnessBand: true,
|
|
447
|
+
distanceMeters: true,
|
|
448
|
+
},
|
|
449
|
+
} as const;
|
|
450
|
+
|
|
451
|
+
/** A `select` for `terrainProfile`. */
|
|
452
|
+
export type TerrainProfileSelection = Selection<typeof terrainProfileFields>;
|
|
453
|
+
|
|
454
|
+
/** The selectable fields of `terrainSamples`. */
|
|
455
|
+
export const terrainSamplesFields = {
|
|
456
|
+
count: true,
|
|
457
|
+
coveredCount: true,
|
|
458
|
+
zoom: true,
|
|
459
|
+
resolutionMeters: true,
|
|
460
|
+
samples: {
|
|
461
|
+
point: true,
|
|
462
|
+
elevation: true,
|
|
463
|
+
slope: true,
|
|
464
|
+
aspect: true,
|
|
465
|
+
aspectOctant: true,
|
|
466
|
+
steepnessBand: true,
|
|
467
|
+
distanceMeters: true,
|
|
468
|
+
},
|
|
469
|
+
} as const;
|
|
470
|
+
|
|
471
|
+
/** A `select` for `terrainSamples`. */
|
|
472
|
+
export type TerrainSamplesSelection = Selection<typeof terrainSamplesFields>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Server-Sent Events half of talking to Mountaya: a frame parser that turns a
|
|
3
|
+
* `text/event-stream` byte stream into decoded records, a reader that drives a `Response` body
|
|
4
|
+
* through it frame by frame, and an opener that wires those over a fetch the caller supplies,
|
|
5
|
+
* with resume and abort.
|
|
6
|
+
*
|
|
7
|
+
* It lives in this package, beside the transport, because a stream is a request to Mountaya and
|
|
8
|
+
* the credential contract for one is not a second thing. `MountayaTransport.applyAuth` exists
|
|
9
|
+
* for exactly this call: which header a share token rides in, that a session token accompanies
|
|
10
|
+
* a publishable key rather than replacing it, that a cookie credential asks for the cookie. The
|
|
11
|
+
* seam and the stream opener that uses it belong in one package for that reason: a host that
|
|
12
|
+
* rebuilds either half gets one that agrees with this one until one of them learns something.
|
|
13
|
+
*
|
|
14
|
+
* It is a SEPARATE ENTRY rather than part of the root barrel, and both halves of that matter. A
|
|
15
|
+
* consumer reading REST and GraphQL pays nothing for a stream reader they never open, which a
|
|
16
|
+
* `transport.stream()` convenience could not preserve: a class method referencing an import is
|
|
17
|
+
* not something a bundler drops. And a consumer who does open one reaches for
|
|
18
|
+
* `@mountaya/client/events` rather than for a second package with its own version.
|
|
19
|
+
*
|
|
20
|
+
* The reader itself publishes no vocabulary: `decode` returns the caller's own type, `onFrame`
|
|
21
|
+
* decides what is terminal, and the resume cursor is the caller's to keep, from each frame's id and
|
|
22
|
+
* each position `onLastEventId` reports. What sits beside it are the two vocabularies the CONTRACT
|
|
23
|
+
* declares, a collaboration stream's frame kinds and an agent run's events, each as a transport
|
|
24
|
+
* that binds them to a client. Those are not the reader growing an opinion: they are generated
|
|
25
|
+
* types plus the policy a generated type cannot state, and a consumer driving either feed would
|
|
26
|
+
* otherwise transcribe both by hand.
|
|
27
|
+
*
|
|
28
|
+
* A reconnection POLICY is not published, and that is the line. Each transport reports how a
|
|
29
|
+
* stream failed and whether reopening could help; deciding to reopen, and when, belongs to the
|
|
30
|
+
* session above it.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
export type {
|
|
34
|
+
AgentEvent,
|
|
35
|
+
AgentInput,
|
|
36
|
+
AgentStreamCloseReason,
|
|
37
|
+
AgentStreamFrame,
|
|
38
|
+
AgentStreamHandlers,
|
|
39
|
+
AgentSubscribeOptions,
|
|
40
|
+
AgentTransport,
|
|
41
|
+
AgentWriteOptions,
|
|
42
|
+
} from "./rules/agent.js";
|
|
43
|
+
export {
|
|
44
|
+
agentTerminalEventTypes,
|
|
45
|
+
createAgentTransport,
|
|
46
|
+
decodeAgentFrame,
|
|
47
|
+
} from "./rules/agent.js";
|
|
48
|
+
export type {
|
|
49
|
+
CollabDurableChange,
|
|
50
|
+
CollabEvent,
|
|
51
|
+
CollabSignal,
|
|
52
|
+
CollabSignalResult,
|
|
53
|
+
CollabStreamCloseReason,
|
|
54
|
+
CollabStreamErrorOptions,
|
|
55
|
+
CollabStreamFrame,
|
|
56
|
+
CollabStreamHandlers,
|
|
57
|
+
CollabStreamResource,
|
|
58
|
+
CollabSubscribeOptions,
|
|
59
|
+
CollabTransport,
|
|
60
|
+
} from "./rules/collab.js";
|
|
61
|
+
export { createCollabTransport, decodeCollabFrame } from "./rules/collab.js";
|
|
62
|
+
export type { EventStreamOutcome, FrameHandler } from "./rules/eventStream.js";
|
|
63
|
+
export { readEventStream } from "./rules/eventStream.js";
|
|
64
|
+
export type { OpenSseStreamOptions } from "./rules/openSseStream.js";
|
|
65
|
+
export { openSseStream } from "./rules/openSseStream.js";
|
|
66
|
+
export type { SseFrame } from "./rules/sse.js";
|
|
67
|
+
export { MAX_SSE_BUFFER_CHARS, SseBufferOverflowError, SseFrameParser } from "./rules/sse.js";
|