@reor/tripper-api-client 0.0.2 → 0.0.3
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createLocation, createLocationType, deleteLocationType, get, getLocationsWithinBoundingBox, getLocationTypeById, getLocationTypes, type Options, updateLocationTypeIcon, updateLocationTypeName } from './sdk.gen';
|
|
2
|
-
export type { ClientOptions, CreateLocationData, CreateLocationError, CreateLocationErrors, CreateLocationRequest, CreateLocationResponse, CreateLocationResponses, CreateLocationTypeData, CreateLocationTypeError, CreateLocationTypeErrors, CreateLocationTypeRequest, CreateLocationTypeResponse, CreateLocationTypeResponses, DeleteLocationTypeData, DeleteLocationTypeError, DeleteLocationTypeErrors, DeleteLocationTypeResponse, DeleteLocationTypeResponses, GetData, GetLocationsWithinBoundingBoxData, GetLocationsWithinBoundingBoxError, GetLocationsWithinBoundingBoxErrors, GetLocationsWithinBoundingBoxResponse, GetLocationsWithinBoundingBoxResponses, GetLocationTypeByIdData, GetLocationTypeByIdErrors, GetLocationTypeByIdResponse, GetLocationTypeByIdResponses, GetLocationTypesData, GetLocationTypesErrors, GetLocationTypesResponse, GetLocationTypesResponses, GetResponse, GetResponses, JsonElement, LocationResponse, LocationTypeResponse, LocationTypeSummaryResponse, ProblemDetails, UpdateLocationTypeIconData, UpdateLocationTypeIconError, UpdateLocationTypeIconErrors, UpdateLocationTypeIconRequest, UpdateLocationTypeIconResponse, UpdateLocationTypeIconResponses, UpdateLocationTypeNameData, UpdateLocationTypeNameError, UpdateLocationTypeNameErrors, UpdateLocationTypeNameRequest, UpdateLocationTypeNameResponse, UpdateLocationTypeNameResponses } from './types.gen';
|
|
1
|
+
export { createLocation, createLocationType, deleteLocationType, get, getLocationsWithinBoundingBox, getLocationTypeById, getLocationTypes, getRouteById, getRoutesWithinBoundingBox, getRouteTrack, type Options, updateLocationTypeIcon, updateLocationTypeName, uploadRoute } from './sdk.gen';
|
|
2
|
+
export type { ClientOptions, CreateLocationData, CreateLocationError, CreateLocationErrors, CreateLocationRequest, CreateLocationResponse, CreateLocationResponses, CreateLocationTypeData, CreateLocationTypeError, CreateLocationTypeErrors, CreateLocationTypeRequest, CreateLocationTypeResponse, CreateLocationTypeResponses, DeleteLocationTypeData, DeleteLocationTypeError, DeleteLocationTypeErrors, DeleteLocationTypeResponse, DeleteLocationTypeResponses, GetData, GetLocationsWithinBoundingBoxData, GetLocationsWithinBoundingBoxError, GetLocationsWithinBoundingBoxErrors, GetLocationsWithinBoundingBoxResponse, GetLocationsWithinBoundingBoxResponses, GetLocationTypeByIdData, GetLocationTypeByIdErrors, GetLocationTypeByIdResponse, GetLocationTypeByIdResponses, GetLocationTypesData, GetLocationTypesErrors, GetLocationTypesResponse, GetLocationTypesResponses, GetResponse, GetResponses, GetRouteByIdData, GetRouteByIdErrors, GetRouteByIdResponse, GetRouteByIdResponses, GetRoutesWithinBoundingBoxData, GetRoutesWithinBoundingBoxError, GetRoutesWithinBoundingBoxErrors, GetRoutesWithinBoundingBoxResponse, GetRoutesWithinBoundingBoxResponses, GetRouteTrackData, GetRouteTrackErrors, GetRouteTrackResponse, GetRouteTrackResponses, IFormFile, JsonElement, LocationResponse, LocationTypeResponse, LocationTypeSummaryResponse, ProblemDetails, RouteDetailsResponse, RouteSummaryResponse, RouteTrackResponse, RouteUploadRequest, UpdateLocationTypeIconData, UpdateLocationTypeIconError, UpdateLocationTypeIconErrors, UpdateLocationTypeIconRequest, UpdateLocationTypeIconResponse, UpdateLocationTypeIconResponses, UpdateLocationTypeNameData, UpdateLocationTypeNameError, UpdateLocationTypeNameErrors, UpdateLocationTypeNameRequest, UpdateLocationTypeNameResponse, UpdateLocationTypeNameResponses, UploadRouteData, UploadRouteError, UploadRouteErrors, UploadRouteResponse, UploadRouteResponses } from './types.gen';
|
package/dist/generated/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateLocationTypeName = exports.updateLocationTypeIcon = exports.getLocationTypes = exports.getLocationTypeById = exports.getLocationsWithinBoundingBox = exports.get = exports.deleteLocationType = exports.createLocationType = exports.createLocation = void 0;
|
|
4
|
+
exports.uploadRoute = exports.updateLocationTypeName = exports.updateLocationTypeIcon = exports.getRouteTrack = exports.getRoutesWithinBoundingBox = exports.getRouteById = exports.getLocationTypes = exports.getLocationTypeById = exports.getLocationsWithinBoundingBox = exports.get = exports.deleteLocationType = exports.createLocationType = exports.createLocation = void 0;
|
|
5
5
|
var sdk_gen_1 = require("./sdk.gen");
|
|
6
6
|
Object.defineProperty(exports, "createLocation", { enumerable: true, get: function () { return sdk_gen_1.createLocation; } });
|
|
7
7
|
Object.defineProperty(exports, "createLocationType", { enumerable: true, get: function () { return sdk_gen_1.createLocationType; } });
|
|
@@ -10,5 +10,9 @@ Object.defineProperty(exports, "get", { enumerable: true, get: function () { ret
|
|
|
10
10
|
Object.defineProperty(exports, "getLocationsWithinBoundingBox", { enumerable: true, get: function () { return sdk_gen_1.getLocationsWithinBoundingBox; } });
|
|
11
11
|
Object.defineProperty(exports, "getLocationTypeById", { enumerable: true, get: function () { return sdk_gen_1.getLocationTypeById; } });
|
|
12
12
|
Object.defineProperty(exports, "getLocationTypes", { enumerable: true, get: function () { return sdk_gen_1.getLocationTypes; } });
|
|
13
|
+
Object.defineProperty(exports, "getRouteById", { enumerable: true, get: function () { return sdk_gen_1.getRouteById; } });
|
|
14
|
+
Object.defineProperty(exports, "getRoutesWithinBoundingBox", { enumerable: true, get: function () { return sdk_gen_1.getRoutesWithinBoundingBox; } });
|
|
15
|
+
Object.defineProperty(exports, "getRouteTrack", { enumerable: true, get: function () { return sdk_gen_1.getRouteTrack; } });
|
|
13
16
|
Object.defineProperty(exports, "updateLocationTypeIcon", { enumerable: true, get: function () { return sdk_gen_1.updateLocationTypeIcon; } });
|
|
14
17
|
Object.defineProperty(exports, "updateLocationTypeName", { enumerable: true, get: function () { return sdk_gen_1.updateLocationTypeName; } });
|
|
18
|
+
Object.defineProperty(exports, "uploadRoute", { enumerable: true, get: function () { return sdk_gen_1.uploadRoute; } });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { CreateLocationData, CreateLocationErrors, CreateLocationResponses, CreateLocationTypeData, CreateLocationTypeErrors, CreateLocationTypeResponses, DeleteLocationTypeData, DeleteLocationTypeErrors, DeleteLocationTypeResponses, GetData, GetLocationsWithinBoundingBoxData, GetLocationsWithinBoundingBoxErrors, GetLocationsWithinBoundingBoxResponses, GetLocationTypeByIdData, GetLocationTypeByIdErrors, GetLocationTypeByIdResponses, GetLocationTypesData, GetLocationTypesErrors, GetLocationTypesResponses, GetResponses, UpdateLocationTypeIconData, UpdateLocationTypeIconErrors, UpdateLocationTypeIconResponses, UpdateLocationTypeNameData, UpdateLocationTypeNameErrors, UpdateLocationTypeNameResponses } from './types.gen';
|
|
1
|
+
import { type Client, type Options as Options2, type TDataShape } from './client';
|
|
2
|
+
import type { CreateLocationData, CreateLocationErrors, CreateLocationResponses, CreateLocationTypeData, CreateLocationTypeErrors, CreateLocationTypeResponses, DeleteLocationTypeData, DeleteLocationTypeErrors, DeleteLocationTypeResponses, GetData, GetLocationsWithinBoundingBoxData, GetLocationsWithinBoundingBoxErrors, GetLocationsWithinBoundingBoxResponses, GetLocationTypeByIdData, GetLocationTypeByIdErrors, GetLocationTypeByIdResponses, GetLocationTypesData, GetLocationTypesErrors, GetLocationTypesResponses, GetResponses, GetRouteByIdData, GetRouteByIdErrors, GetRouteByIdResponses, GetRoutesWithinBoundingBoxData, GetRoutesWithinBoundingBoxErrors, GetRoutesWithinBoundingBoxResponses, GetRouteTrackData, GetRouteTrackErrors, GetRouteTrackResponses, UpdateLocationTypeIconData, UpdateLocationTypeIconErrors, UpdateLocationTypeIconResponses, UpdateLocationTypeNameData, UpdateLocationTypeNameErrors, UpdateLocationTypeNameResponses, UploadRouteData, UploadRouteErrors, UploadRouteResponses } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -62,3 +62,27 @@ export declare const updateLocationTypeName: <ThrowOnError extends boolean = fal
|
|
|
62
62
|
* Changes the icon identifier (e.g. "house" or "boat") of the specified location type.
|
|
63
63
|
*/
|
|
64
64
|
export declare const updateLocationTypeIcon: <ThrowOnError extends boolean = false>(options: Options<UpdateLocationTypeIconData, ThrowOnError>) => import("./client").RequestResult<UpdateLocationTypeIconResponses, UpdateLocationTypeIconErrors, ThrowOnError, "fields">;
|
|
65
|
+
/**
|
|
66
|
+
* Get routes within a bounding box
|
|
67
|
+
*
|
|
68
|
+
* Returns routes owned by the authenticated user that intersect the supplied WGS84 bounding box.
|
|
69
|
+
*/
|
|
70
|
+
export declare const getRoutesWithinBoundingBox: <ThrowOnError extends boolean = false>(options: Options<GetRoutesWithinBoundingBoxData, ThrowOnError>) => import("./client").RequestResult<GetRoutesWithinBoundingBoxResponses, GetRoutesWithinBoundingBoxErrors, ThrowOnError, "fields">;
|
|
71
|
+
/**
|
|
72
|
+
* Upload a route file
|
|
73
|
+
*
|
|
74
|
+
* Parses and stores a route file (GPX only for now) owned by the authenticated user.
|
|
75
|
+
*/
|
|
76
|
+
export declare const uploadRoute: <ThrowOnError extends boolean = false>(options: Options<UploadRouteData, ThrowOnError>) => import("./client").RequestResult<UploadRouteResponses, UploadRouteErrors, ThrowOnError, "fields">;
|
|
77
|
+
/**
|
|
78
|
+
* Get route details
|
|
79
|
+
*
|
|
80
|
+
* Returns the details and calculated metrics of a route owned by the authenticated user, excluding track points.
|
|
81
|
+
*/
|
|
82
|
+
export declare const getRouteById: <ThrowOnError extends boolean = false>(options: Options<GetRouteByIdData, ThrowOnError>) => import("./client").RequestResult<GetRouteByIdResponses, GetRouteByIdErrors, ThrowOnError, "fields">;
|
|
83
|
+
/**
|
|
84
|
+
* Get a route's track
|
|
85
|
+
*
|
|
86
|
+
* Returns the id, name, GeoJSON track, and point count of a route owned by the authenticated user.
|
|
87
|
+
*/
|
|
88
|
+
export declare const getRouteTrack: <ThrowOnError extends boolean = false>(options: Options<GetRouteTrackData, ThrowOnError>) => import("./client").RequestResult<GetRouteTrackResponses, GetRouteTrackErrors, ThrowOnError, "fields">;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateLocationTypeIcon = exports.updateLocationTypeName = exports.getLocationTypeById = exports.deleteLocationType = exports.createLocationType = exports.getLocationTypes = exports.createLocation = exports.getLocationsWithinBoundingBox = exports.get = void 0;
|
|
4
|
+
exports.getRouteTrack = exports.getRouteById = exports.uploadRoute = exports.getRoutesWithinBoundingBox = exports.updateLocationTypeIcon = exports.updateLocationTypeName = exports.getLocationTypeById = exports.deleteLocationType = exports.createLocationType = exports.getLocationTypes = exports.createLocation = exports.getLocationsWithinBoundingBox = exports.get = void 0;
|
|
5
|
+
const client_1 = require("./client");
|
|
5
6
|
const client_gen_1 = require("./client.gen");
|
|
6
7
|
const get = (options) => (options?.client ?? client_gen_1.client).get({
|
|
7
8
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -113,3 +114,52 @@ const updateLocationTypeIcon = (options) => (options.client ?? client_gen_1.clie
|
|
|
113
114
|
}
|
|
114
115
|
});
|
|
115
116
|
exports.updateLocationTypeIcon = updateLocationTypeIcon;
|
|
117
|
+
/**
|
|
118
|
+
* Get routes within a bounding box
|
|
119
|
+
*
|
|
120
|
+
* Returns routes owned by the authenticated user that intersect the supplied WGS84 bounding box.
|
|
121
|
+
*/
|
|
122
|
+
const getRoutesWithinBoundingBox = (options) => (options.client ?? client_gen_1.client).get({
|
|
123
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
124
|
+
url: '/route',
|
|
125
|
+
...options
|
|
126
|
+
});
|
|
127
|
+
exports.getRoutesWithinBoundingBox = getRoutesWithinBoundingBox;
|
|
128
|
+
/**
|
|
129
|
+
* Upload a route file
|
|
130
|
+
*
|
|
131
|
+
* Parses and stores a route file (GPX only for now) owned by the authenticated user.
|
|
132
|
+
*/
|
|
133
|
+
const uploadRoute = (options) => (options.client ?? client_gen_1.client).post({
|
|
134
|
+
...client_1.formDataBodySerializer,
|
|
135
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
136
|
+
url: '/upload/route',
|
|
137
|
+
...options,
|
|
138
|
+
headers: {
|
|
139
|
+
'Content-Type': null,
|
|
140
|
+
...options.headers
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
exports.uploadRoute = uploadRoute;
|
|
144
|
+
/**
|
|
145
|
+
* Get route details
|
|
146
|
+
*
|
|
147
|
+
* Returns the details and calculated metrics of a route owned by the authenticated user, excluding track points.
|
|
148
|
+
*/
|
|
149
|
+
const getRouteById = (options) => (options.client ?? client_gen_1.client).get({
|
|
150
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
151
|
+
url: '/route/{id}',
|
|
152
|
+
...options
|
|
153
|
+
});
|
|
154
|
+
exports.getRouteById = getRouteById;
|
|
155
|
+
/**
|
|
156
|
+
* Get a route's track
|
|
157
|
+
*
|
|
158
|
+
* Returns the id, name, GeoJSON track, and point count of a route owned by the authenticated user.
|
|
159
|
+
*/
|
|
160
|
+
const getRouteTrack = (options) => (options.client ?? client_gen_1.client).get({
|
|
161
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
162
|
+
url: '/route/{id}/track',
|
|
163
|
+
...options
|
|
164
|
+
});
|
|
165
|
+
exports.getRouteTrack = getRouteTrack;
|
|
@@ -10,6 +10,7 @@ export type CreateLocationTypeRequest = {
|
|
|
10
10
|
name: string;
|
|
11
11
|
icon: string;
|
|
12
12
|
};
|
|
13
|
+
export type IFormFile = Blob | File;
|
|
13
14
|
export type JsonElement = unknown;
|
|
14
15
|
export type LocationResponse = {
|
|
15
16
|
id: string;
|
|
@@ -38,6 +39,34 @@ export type ProblemDetails = {
|
|
|
38
39
|
detail?: null | string;
|
|
39
40
|
instance?: null | string;
|
|
40
41
|
};
|
|
42
|
+
export type RouteDetailsResponse = {
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
originalFileName: string;
|
|
46
|
+
originalFileSourceFormat: string;
|
|
47
|
+
totalDistanceMeters: number | string;
|
|
48
|
+
totalDisplacementMeters: number | string;
|
|
49
|
+
totalDurationSeconds: number | string;
|
|
50
|
+
createdAt: string;
|
|
51
|
+
updatedAt: string;
|
|
52
|
+
};
|
|
53
|
+
export type RouteSummaryResponse = {
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
};
|
|
59
|
+
export type RouteTrackResponse = {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
geometry: JsonElement;
|
|
63
|
+
pointCount: number | string;
|
|
64
|
+
};
|
|
65
|
+
export type RouteUploadRequest = {
|
|
66
|
+
file?: IFormFile;
|
|
67
|
+
name?: string;
|
|
68
|
+
extension?: null | string;
|
|
69
|
+
};
|
|
41
70
|
export type UpdateLocationTypeIconRequest = {
|
|
42
71
|
icon: string;
|
|
43
72
|
};
|
|
@@ -284,3 +313,110 @@ export type UpdateLocationTypeIconResponses = {
|
|
|
284
313
|
200: LocationTypeResponse;
|
|
285
314
|
};
|
|
286
315
|
export type UpdateLocationTypeIconResponse = UpdateLocationTypeIconResponses[keyof UpdateLocationTypeIconResponses];
|
|
316
|
+
export type GetRoutesWithinBoundingBoxData = {
|
|
317
|
+
body?: never;
|
|
318
|
+
path?: never;
|
|
319
|
+
query: {
|
|
320
|
+
minLongitude: number | string;
|
|
321
|
+
minLatitude: number | string;
|
|
322
|
+
maxLongitude: number | string;
|
|
323
|
+
maxLatitude: number | string;
|
|
324
|
+
};
|
|
325
|
+
url: '/route';
|
|
326
|
+
};
|
|
327
|
+
export type GetRoutesWithinBoundingBoxErrors = {
|
|
328
|
+
/**
|
|
329
|
+
* Bad Request
|
|
330
|
+
*/
|
|
331
|
+
400: ProblemDetails;
|
|
332
|
+
/**
|
|
333
|
+
* Unauthorized
|
|
334
|
+
*/
|
|
335
|
+
401: unknown;
|
|
336
|
+
};
|
|
337
|
+
export type GetRoutesWithinBoundingBoxError = GetRoutesWithinBoundingBoxErrors[keyof GetRoutesWithinBoundingBoxErrors];
|
|
338
|
+
export type GetRoutesWithinBoundingBoxResponses = {
|
|
339
|
+
/**
|
|
340
|
+
* OK
|
|
341
|
+
*/
|
|
342
|
+
200: Array<RouteSummaryResponse>;
|
|
343
|
+
};
|
|
344
|
+
export type GetRoutesWithinBoundingBoxResponse = GetRoutesWithinBoundingBoxResponses[keyof GetRoutesWithinBoundingBoxResponses];
|
|
345
|
+
export type UploadRouteData = {
|
|
346
|
+
body: RouteUploadRequest;
|
|
347
|
+
path?: never;
|
|
348
|
+
query?: never;
|
|
349
|
+
url: '/upload/route';
|
|
350
|
+
};
|
|
351
|
+
export type UploadRouteErrors = {
|
|
352
|
+
/**
|
|
353
|
+
* Bad Request
|
|
354
|
+
*/
|
|
355
|
+
400: ProblemDetails;
|
|
356
|
+
/**
|
|
357
|
+
* Unauthorized
|
|
358
|
+
*/
|
|
359
|
+
401: unknown;
|
|
360
|
+
/**
|
|
361
|
+
* Service Unavailable
|
|
362
|
+
*/
|
|
363
|
+
503: ProblemDetails;
|
|
364
|
+
};
|
|
365
|
+
export type UploadRouteError = UploadRouteErrors[keyof UploadRouteErrors];
|
|
366
|
+
export type UploadRouteResponses = {
|
|
367
|
+
/**
|
|
368
|
+
* Created
|
|
369
|
+
*/
|
|
370
|
+
201: RouteSummaryResponse;
|
|
371
|
+
};
|
|
372
|
+
export type UploadRouteResponse = UploadRouteResponses[keyof UploadRouteResponses];
|
|
373
|
+
export type GetRouteByIdData = {
|
|
374
|
+
body?: never;
|
|
375
|
+
path: {
|
|
376
|
+
id: string;
|
|
377
|
+
};
|
|
378
|
+
query?: never;
|
|
379
|
+
url: '/route/{id}';
|
|
380
|
+
};
|
|
381
|
+
export type GetRouteByIdErrors = {
|
|
382
|
+
/**
|
|
383
|
+
* Unauthorized
|
|
384
|
+
*/
|
|
385
|
+
401: unknown;
|
|
386
|
+
/**
|
|
387
|
+
* Not Found
|
|
388
|
+
*/
|
|
389
|
+
404: unknown;
|
|
390
|
+
};
|
|
391
|
+
export type GetRouteByIdResponses = {
|
|
392
|
+
/**
|
|
393
|
+
* OK
|
|
394
|
+
*/
|
|
395
|
+
200: RouteDetailsResponse;
|
|
396
|
+
};
|
|
397
|
+
export type GetRouteByIdResponse = GetRouteByIdResponses[keyof GetRouteByIdResponses];
|
|
398
|
+
export type GetRouteTrackData = {
|
|
399
|
+
body?: never;
|
|
400
|
+
path: {
|
|
401
|
+
id: string;
|
|
402
|
+
};
|
|
403
|
+
query?: never;
|
|
404
|
+
url: '/route/{id}/track';
|
|
405
|
+
};
|
|
406
|
+
export type GetRouteTrackErrors = {
|
|
407
|
+
/**
|
|
408
|
+
* Unauthorized
|
|
409
|
+
*/
|
|
410
|
+
401: unknown;
|
|
411
|
+
/**
|
|
412
|
+
* Not Found
|
|
413
|
+
*/
|
|
414
|
+
404: unknown;
|
|
415
|
+
};
|
|
416
|
+
export type GetRouteTrackResponses = {
|
|
417
|
+
/**
|
|
418
|
+
* OK
|
|
419
|
+
*/
|
|
420
|
+
200: RouteTrackResponse;
|
|
421
|
+
};
|
|
422
|
+
export type GetRouteTrackResponse = GetRouteTrackResponses[keyof GetRouteTrackResponses];
|