@volant-autonomy/via-sdk 1.3556.1 → 1.3583.1
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 +1 -1
- package/dist/direct.d.ts +0 -64
- package/dist/index.cjs.d.ts +7 -0
- package/dist/index.cjs.js +908 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.d.ts +7 -0
- package/dist/index.esm.js +903 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/volant-schema.d.ts +28 -187
- package/package.json +15 -4
- package/dist/client.js +0 -21
- package/dist/composite.js +0 -104
- package/dist/direct.js +0 -507
- package/dist/docstringTransformer.d.ts +0 -3
- package/dist/docstringTransformer.js +0 -194
- package/dist/fetch.js +0 -201
- package/dist/index.js +0 -22
- package/dist/types.js +0 -19
- package/dist/utils.js +0 -59
- package/dist/volant-schema.js +0 -6
package/dist/composite.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Composite = void 0;
|
|
13
|
-
const types_1 = require("./types");
|
|
14
|
-
class Composite {
|
|
15
|
-
constructor(direct) {
|
|
16
|
-
this.direct = direct;
|
|
17
|
-
}
|
|
18
|
-
/// flightplans
|
|
19
|
-
upsertFlightplan(args, id) {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
if (id) {
|
|
22
|
-
return this.direct.modifyDraftFlightplan(id, args);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
return this.direct.createDraftFlightplan(args);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
getAllDraftFlightplans() {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
return this.direct.getAllFlightplans({ 'filter[state]': ['Draft'] });
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
getAllClosedFlightplans() {
|
|
35
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
return this.direct.getAllFlightplans({ 'filter[state]': ['Closed'] });
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
getAllPendingFlightplans() {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
return this.direct.getAllFlightplans({ 'filter[state]': ['Pending'] });
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
getAllAcceptedFlightplans() {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
return this.direct.getAllFlightplans({ 'filter[state]': ['Accepted'] });
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
// TODO: make error 409 more obvious, as it is different
|
|
50
|
-
attemptAcceptFlightplan(id) {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
return this.direct.changeFlightplanState(id, 'Accepted');
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
attemptTemporalDeconfliction(id_1) {
|
|
56
|
-
return __awaiter(this, arguments, void 0, function* (id, timeInterval = 60) {
|
|
57
|
-
const startTimeDeconflictArgs = {
|
|
58
|
-
time_interval: timeInterval
|
|
59
|
-
};
|
|
60
|
-
const { data, error } = yield this.direct.getFlightplanDeconflictedStartTime(id, startTimeDeconflictArgs);
|
|
61
|
-
if (error) {
|
|
62
|
-
return { error };
|
|
63
|
-
}
|
|
64
|
-
return this.direct.modifyDraftFlightplan(id, data.attributes);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
/// pathing tasks
|
|
68
|
-
/** Handles creating and polling a pathing task for you */
|
|
69
|
-
doPathingTask(args) {
|
|
70
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
var _a, _b;
|
|
72
|
-
const { error, data } = yield this.direct.createPathingTask(args);
|
|
73
|
-
if (error) {
|
|
74
|
-
return { error };
|
|
75
|
-
}
|
|
76
|
-
const id = data.id;
|
|
77
|
-
while (true) {
|
|
78
|
-
const { data, error } = yield this.direct.getPathingTask(id);
|
|
79
|
-
if (error) {
|
|
80
|
-
return { error };
|
|
81
|
-
}
|
|
82
|
-
switch (data.meta.state) {
|
|
83
|
-
case 'queued':
|
|
84
|
-
yield (0, types_1.sleep)(500);
|
|
85
|
-
continue;
|
|
86
|
-
case 'in-progress':
|
|
87
|
-
yield (0, types_1.sleep)(50);
|
|
88
|
-
continue;
|
|
89
|
-
case 'successful':
|
|
90
|
-
if ((_a = data.attributes) === null || _a === void 0 ? void 0 : _a.waypoints) {
|
|
91
|
-
return { data: (_b = data.attributes) === null || _b === void 0 ? void 0 : _b.waypoints };
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
throw new Error(`endpoint did not return waypoints ${data}`); // TODO:
|
|
95
|
-
}
|
|
96
|
-
case 'failed':
|
|
97
|
-
// TODO: this is bad, do this better.
|
|
98
|
-
return { error: data.meta.error_code };
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
exports.Composite = Composite;
|
package/dist/direct.js
DELETED
|
@@ -1,507 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Direct = void 0;
|
|
13
|
-
class Direct {
|
|
14
|
-
constructor(fetcher) {
|
|
15
|
-
this.fetcher = fetcher;
|
|
16
|
-
}
|
|
17
|
-
/// flightplans
|
|
18
|
-
getAllFlightplans(args, opts) {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const resp = yield this.fetcher.GET('/flightplans/', { query: args }, opts);
|
|
21
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
22
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((flightplan) => flightplan.data) });
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
return resp;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
createDraftFlightplan(args, opts) {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
const resp = yield this.fetcher.POST('/flightplans/', { body: args }, opts);
|
|
32
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
33
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
34
|
-
}
|
|
35
|
-
return resp;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
modifyDraftFlightplan(id, args, opts) {
|
|
39
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
const resp = yield this.fetcher.PUT('/flightplans/{flightplan_id}', { body: args, path: { flightplan_id: id } }, opts);
|
|
41
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
42
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
43
|
-
}
|
|
44
|
-
return resp;
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
getFlightplan(id, opts) {
|
|
48
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
const resp = yield this.fetcher.GET('/flightplans/{flightplan_id}', { path: { flightplan_id: id } }, opts);
|
|
50
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
51
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
52
|
-
}
|
|
53
|
-
return resp;
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
// FIXME: this name is poor
|
|
57
|
-
getFlightplanWaypointsDetailed(id, opts) {
|
|
58
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
const resp = yield this.fetcher.GET('/flightplans/{flightplan_id}/waypoints_detail', { path: { flightplan_id: id } }, opts);
|
|
60
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
61
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
62
|
-
}
|
|
63
|
-
return resp;
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
getFlightplanStatistics(id, opts) {
|
|
67
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
const resp = yield this.fetcher.GET('/flightplans/{flightplan_id}/statistics', { path: { flightplan_id: id } }, opts);
|
|
69
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
70
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
71
|
-
}
|
|
72
|
-
return resp;
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
getFlightplanVolumes(id, opts) {
|
|
76
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
const resp = yield this.fetcher.GET('/flightplans/{flightplan_id}/volumes', { path: { flightplan_id: id } }, opts);
|
|
78
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
79
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
80
|
-
}
|
|
81
|
-
return resp;
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
// TODO: make a wrapper for this which updates the existing flightplan to have this new start time
|
|
85
|
-
getFlightplanDeconflictedStartTime(id, args, opts) {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
const resp = yield this.fetcher.GET('/flightplans/{flightplan_id}/start_time_deconflict', { path: { flightplan_id: id }, query: args }, opts);
|
|
88
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
89
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
90
|
-
}
|
|
91
|
-
return resp;
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
changeFlightplanState(id, state, opts) {
|
|
95
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
const resp = yield this.fetcher.POST('/flightplans/{flightplan_id}/state', { path: { flightplan_id: id }, body: { state } }, opts);
|
|
97
|
-
if (!resp.error && resp.aborted === false) {
|
|
98
|
-
return Object.assign(Object.assign({}, resp), { data: true });
|
|
99
|
-
}
|
|
100
|
-
return resp;
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
// TODO: use `args` instead of fileFormat
|
|
104
|
-
getFlightplanAsFile(id, opts) {
|
|
105
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
const resp = yield this.fetcher.GET('/flightplans/{flightplan_id}/content', { path: { flightplan_id: id }, header: { accept: 'application/vnd.google-earth.kml+xml' } }, Object.assign(Object.assign({}, opts), { parseAs: 'blob' }));
|
|
107
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
108
|
-
return Object.assign(Object.assign({}, resp), { data: { file: resp.data, fileName: resp.response.headers.get('filename') } });
|
|
109
|
-
}
|
|
110
|
-
return resp;
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
/// airspace constraints
|
|
114
|
-
createAirspaceConstraint(args, opts) {
|
|
115
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
-
const resp = yield this.fetcher.POST('/airspace_constraints/', { body: args }, opts);
|
|
117
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
118
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
119
|
-
}
|
|
120
|
-
return resp;
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
getAllAirspaceConstraints(opts) {
|
|
124
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
-
const resp = yield this.fetcher.GET('/airspace_constraints/', {}, opts);
|
|
126
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
127
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((constraint) => constraint.data) });
|
|
128
|
-
}
|
|
129
|
-
return resp;
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
getAirspaceConstraint(id, opts) {
|
|
133
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
-
const resp = yield this.fetcher.GET('/airspace_constraints/{airspace_constraint_id}', { path: { airspace_constraint_id: id } }, opts);
|
|
135
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
136
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
137
|
-
}
|
|
138
|
-
return resp;
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
modifyAirspaceConstraint(id, args, opts) {
|
|
142
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
-
const resp = yield this.fetcher.PUT('/airspace_constraints/{airspace_constraint_id}', { path: { airspace_constraint_id: id }, body: args }, opts);
|
|
144
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
145
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
146
|
-
}
|
|
147
|
-
return resp;
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
changeAirspaceConstraintState(id, state, opts) {
|
|
151
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
-
const resp = yield this.fetcher.POST('/airspace_constraints/{airspace_constraints_id}/state', { path: { airspace_constraints_id: id }, body: { state } }, opts);
|
|
153
|
-
if (!resp.error && resp.aborted === false) {
|
|
154
|
-
return Object.assign(Object.assign({}, resp), { data: true });
|
|
155
|
-
}
|
|
156
|
-
return resp;
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
/// pathing tasks
|
|
160
|
-
createPathingTask(args, opts) {
|
|
161
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
-
const resp = yield this.fetcher.POST('/pathing_tasks/', { body: args }, opts);
|
|
163
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
164
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
165
|
-
}
|
|
166
|
-
return resp;
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
getPathingTask(id, opts) {
|
|
170
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
-
const resp = yield this.fetcher.GET('/pathing_tasks/{pathing_task_id}', { path: { pathing_task_id: id } }, opts);
|
|
172
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
173
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
174
|
-
}
|
|
175
|
-
return resp;
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
/// aircraft
|
|
179
|
-
getAllAircraft(opts) {
|
|
180
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
-
const resp = yield this.fetcher.GET('/aircraft/', {}, opts);
|
|
182
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
183
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((aircraft) => aircraft.data) });
|
|
184
|
-
}
|
|
185
|
-
return resp;
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
getAircraft(id, opts) {
|
|
189
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
-
const resp = yield this.fetcher.GET('/aircraft/{aircraft_id}', { path: { aircraft_id: id } }, opts);
|
|
191
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
192
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
193
|
-
}
|
|
194
|
-
return resp;
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
/// charts
|
|
198
|
-
getAllCharts(opts) {
|
|
199
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
200
|
-
const resp = yield this.fetcher.GET('/charts/', {}, opts);
|
|
201
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
202
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((chart) => chart.data) });
|
|
203
|
-
}
|
|
204
|
-
return resp;
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
getChart(id, opts) {
|
|
208
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
209
|
-
const resp = yield this.fetcher.GET('/charts/{chart_id}', { path: { chart_id: id } }, opts);
|
|
210
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
211
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
212
|
-
}
|
|
213
|
-
return resp;
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
/// risk assessment
|
|
217
|
-
getSailV2_5(args, opts) {
|
|
218
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
219
|
-
const resp = yield this.fetcher.GET('/risk_assessment/sora/v2.5/sail', { query: args }, opts);
|
|
220
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
221
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
222
|
-
}
|
|
223
|
-
return resp;
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
calculateResidualArcV2_5(args, opts) {
|
|
227
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
228
|
-
const resp = yield this.fetcher.POST('/risk_assessment/sora/v2.5/residual_arc', { body: args }, opts);
|
|
229
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
230
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
231
|
-
}
|
|
232
|
-
return resp;
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
getAllArcsV2_5(opts) {
|
|
236
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
237
|
-
const resp = yield this.fetcher.GET('/risk_assessment/sora/v2.5/air_risk_classifications', {}, opts);
|
|
238
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
239
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((arc) => arc.data) });
|
|
240
|
-
}
|
|
241
|
-
return resp;
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
getArcV2_5(args, opts) {
|
|
245
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
246
|
-
const resp = yield this.fetcher.GET('/risk_assessment/sora/v2.5/air_risk_classifications/{arc_id}', { path: args }, opts);
|
|
247
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
248
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
249
|
-
}
|
|
250
|
-
return resp;
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
generateSoraReportV2_5(args, opts) {
|
|
254
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
-
const resp = yield this.fetcher.POST('/risk_assessment/sora/v2.5/report', { body: args }, opts);
|
|
256
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
257
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
258
|
-
}
|
|
259
|
-
return resp;
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
generateSoraSemanticModelVolumesV2_5(args, opts) {
|
|
263
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
264
|
-
const resp = yield this.fetcher.POST('/risk_assessment/sora/v2.5/semantic_model_volumes', { body: args }, opts);
|
|
265
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
266
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
267
|
-
}
|
|
268
|
-
return resp;
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
getAllArcsUk(opts) {
|
|
272
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
273
|
-
const resp = yield this.fetcher.GET('/risk_assessment/sora/uk/air_risk_classifications', {}, opts);
|
|
274
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
275
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((arc) => arc.data) });
|
|
276
|
-
}
|
|
277
|
-
return resp;
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
getArcUk(args, opts) {
|
|
281
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
282
|
-
const resp = yield this.fetcher.GET('/risk_assessment/sora/uk/air_risk_classifications/{arc_id}', { path: args }, opts);
|
|
283
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
284
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
285
|
-
}
|
|
286
|
-
return resp;
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
getSailUk(args, opts) {
|
|
290
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
291
|
-
const resp = yield this.fetcher.GET('/risk_assessment/sora/uk/sail', { query: args }, opts);
|
|
292
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
293
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
294
|
-
}
|
|
295
|
-
return resp;
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
calculateResidualArcUk(args, opts) {
|
|
299
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
300
|
-
const resp = yield this.fetcher.POST('/risk_assessment/sora/uk/residual_arc', { body: args }, opts);
|
|
301
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
302
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
303
|
-
}
|
|
304
|
-
return resp;
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
generateSoraReportUk(args, opts) {
|
|
308
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
309
|
-
const resp = yield this.fetcher.POST('/risk_assessment/sora/uk/report', { body: args }, opts);
|
|
310
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
311
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
312
|
-
}
|
|
313
|
-
return resp;
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
generateSoraSemanticModelVolumesUk(args, opts) {
|
|
317
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
318
|
-
const resp = yield this.fetcher.POST('/risk_assessment/sora/uk/semantic_model_volumes', { body: args }, opts);
|
|
319
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
320
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
321
|
-
}
|
|
322
|
-
return resp;
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
createSoraClassification(args, opts) {
|
|
326
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
327
|
-
const resp = yield this.fetcher.POST('/risk_assessment/sora/classifications', { body: args }, opts);
|
|
328
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
329
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
330
|
-
}
|
|
331
|
-
return resp;
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
updateSoraClassification(id, args, opts) {
|
|
335
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
336
|
-
const resp = yield this.fetcher.PUT('/risk_assessment/sora/classifications/{classification_id}', { body: args, path: { classification_id: id } }, opts);
|
|
337
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
338
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
339
|
-
}
|
|
340
|
-
return resp;
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
getSoraClassification(id, opts) {
|
|
344
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
345
|
-
const resp = yield this.fetcher.GET('/risk_assessment/sora/classifications/{classification_id}', { path: { classification_id: id } }, opts);
|
|
346
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
347
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
348
|
-
}
|
|
349
|
-
return resp;
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
/// controlled ground areas
|
|
353
|
-
getAllControlledGroundAreas(args, opts) {
|
|
354
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
355
|
-
const resp = yield this.fetcher.GET('/risk_assessment/sora/controlled_ground_areas/', { query: args }, opts);
|
|
356
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
357
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((controlledGroundArea) => controlledGroundArea.data) });
|
|
358
|
-
}
|
|
359
|
-
else {
|
|
360
|
-
return resp;
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
createControlledGroundArea(args, opts) {
|
|
365
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
366
|
-
const resp = yield this.fetcher.POST('/risk_assessment/sora/controlled_ground_areas/', { body: args }, opts);
|
|
367
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
368
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
369
|
-
}
|
|
370
|
-
return resp;
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
getControlledGroundArea(args, opts) {
|
|
374
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
375
|
-
const resp = yield this.fetcher.GET('/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}', { path: args }, opts);
|
|
376
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
377
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
378
|
-
}
|
|
379
|
-
return resp;
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
updateControlledGroundArea(id, args, opts) {
|
|
383
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
384
|
-
const resp = yield this.fetcher.PUT('/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}', { body: args, path: { controlled_ground_area_id: id } }, opts);
|
|
385
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
386
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
387
|
-
}
|
|
388
|
-
return resp;
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
deleteControlledGroundArea(args, opts) {
|
|
392
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
393
|
-
const resp = yield this.fetcher.DELETE('/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}', { path: args }, opts);
|
|
394
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
395
|
-
return Object.assign(Object.assign({}, resp), { data: true });
|
|
396
|
-
}
|
|
397
|
-
return resp;
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
/// atypical airspaces
|
|
401
|
-
getAllAtypicalAirspaces(args, opts) {
|
|
402
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
403
|
-
const resp = yield this.fetcher.GET('/risk_assessment/sora/atypical_airspaces/', { query: args }, opts);
|
|
404
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
405
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((atypicalAirspace) => atypicalAirspace.data) });
|
|
406
|
-
}
|
|
407
|
-
else {
|
|
408
|
-
return resp;
|
|
409
|
-
}
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
createAtypicalAirspace(args, opts) {
|
|
413
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
414
|
-
const resp = yield this.fetcher.POST('/risk_assessment/sora/atypical_airspaces/', { body: args }, opts);
|
|
415
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
416
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
417
|
-
}
|
|
418
|
-
return resp;
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
getAtypicalAirspace(args, opts) {
|
|
422
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
423
|
-
const resp = yield this.fetcher.GET('/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}', { path: args }, opts);
|
|
424
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
425
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
426
|
-
}
|
|
427
|
-
return resp;
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
updateAtypicalAirspace(id, args, opts) {
|
|
431
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
432
|
-
const resp = yield this.fetcher.PUT('/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}', { body: args, path: { atypical_airspace_id: id } }, opts);
|
|
433
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
434
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
435
|
-
}
|
|
436
|
-
return resp;
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
deleteAtypicalAirspace(args, opts) {
|
|
440
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
441
|
-
const resp = yield this.fetcher.DELETE('/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}', { path: args }, opts);
|
|
442
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
443
|
-
return Object.assign(Object.assign({}, resp), { data: true });
|
|
444
|
-
}
|
|
445
|
-
return resp;
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
/// geocages
|
|
449
|
-
createGeocage(args, opts) {
|
|
450
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
451
|
-
const resp = yield this.fetcher.POST('/geocages/', { body: args }, opts);
|
|
452
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
453
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
454
|
-
}
|
|
455
|
-
return resp;
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
getGeocage(args, opts) {
|
|
459
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
460
|
-
const resp = yield this.fetcher.GET('/geocages/{geocage_id}', { path: args }, opts);
|
|
461
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
462
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
463
|
-
}
|
|
464
|
-
return resp;
|
|
465
|
-
});
|
|
466
|
-
}
|
|
467
|
-
getAllGeocages(args, opts) {
|
|
468
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
469
|
-
const resp = yield this.fetcher.GET('/geocages/', { query: args }, opts);
|
|
470
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
471
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
472
|
-
}
|
|
473
|
-
else {
|
|
474
|
-
return resp;
|
|
475
|
-
}
|
|
476
|
-
});
|
|
477
|
-
}
|
|
478
|
-
updateGeocage(id, args, opts) {
|
|
479
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
480
|
-
const resp = yield this.fetcher.PUT('/geocages/{geocage_id}', { body: args, path: { geocage_id: id } }, opts);
|
|
481
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
482
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
483
|
-
}
|
|
484
|
-
return resp;
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
deleteGeocage(args, opts) {
|
|
488
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
489
|
-
const resp = yield this.fetcher.DELETE('/geocages/{geocage_id}', { path: args }, opts);
|
|
490
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
491
|
-
return Object.assign(Object.assign({}, resp), { data: true });
|
|
492
|
-
}
|
|
493
|
-
return resp;
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
/// flight patterns
|
|
497
|
-
createRasterPattern(args, opts) {
|
|
498
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
499
|
-
const resp = yield this.fetcher.POST('/flight_patterns/raster', { body: args }, opts);
|
|
500
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
501
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
502
|
-
}
|
|
503
|
-
return resp;
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
exports.Direct = Direct;
|