@volant-autonomy/via-sdk 1.0.2 → 1.2801.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 +17 -1
- package/dist/composite.d.ts +30 -0
- package/dist/composite.js +12 -0
- package/dist/direct.d.ts +326 -48
- package/dist/direct.js +97 -10
- package/dist/docstringTransformer.js +5 -0
- package/dist/types.d.ts +3 -3
- package/dist/volant-schema.d.ts +1103 -229
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`@volant-autonomy/via-sdk` is an auto-generated type-safe wrapper for the Via API with automatic authentication handling.
|
|
4
4
|
Usable in TypeScript or JavaScript.
|
|
5
5
|
|
|
6
|
-
**Note:** To use this SDK you need access to [the Via API](https://via.volantautonomy.com/api/v1.0/docs). Please contact us at via@volantautonomy.com to obtain access.
|
|
6
|
+
**Note:** To use this SDK you need access to [the Via API](https://via.volantautonomy.com/api/v1.0/docs). Please contact us at <via@volantautonomy.com> to obtain access.
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
@@ -44,6 +44,22 @@ For example, `GET /flightplans/` takes in a filter from a query parameter. The S
|
|
|
44
44
|
|
|
45
45
|
Another example, `GET /flightplans/{flightplan_id}` takes in a flightplan ID through the path. The SDK does this through function arguments, ie: `SDK.direct.getFlightplan('aaaaa-bbbbb-ccccc')`
|
|
46
46
|
|
|
47
|
+
## Feature list
|
|
48
|
+
|
|
49
|
+
As well as offering methods for all endpoints within the API, you have access to a variety of features in this API
|
|
50
|
+
Wrapper that help make some common workflows more convenient. These features are as follows:
|
|
51
|
+
|
|
52
|
+
| Feature | Remark | Method |
|
|
53
|
+
| -------------------------- |-------------------------------------------------------------------------------------| -------------------------------|
|
|
54
|
+
| Upsert Flightplan | Create a flightplan no ID is supplied. Update existing flightplan if ID is supplied | upsertFlightplan() |
|
|
55
|
+
| Fetch Draft Flightplans | Will fetch a list flightplans that you own that are in `Draft` state | getAllDraftFlightplans() |
|
|
56
|
+
| Fetch Closed Flightplans | Will fetch a list flightplans that you own that are in `Closed` state | getAllClosedFlightplans() |
|
|
57
|
+
| Fetch Pending Flightplans | Will fetch a list flightplans that you own that are in `Pending` state | getAllPendingFlightplans() |
|
|
58
|
+
| Fetch Accepted Flightplans | Will fetch a list flightplans that you own that are in `Accepted` state | getAllAcceptedFlightplans() |
|
|
59
|
+
| Flightplan approval | Will attempt to update the state of a Flightplan to `Accepted` | attemptAcceptFlightplan() |
|
|
60
|
+
| Temporal Deconfliction | Will attempt to temporally deconflict your flightplan and update the departure time | attemptTemporalDeconfliction() |
|
|
61
|
+
| Pathing | Will perform a pathing request and return the pathing result | doPathingTask() |
|
|
62
|
+
|
|
47
63
|
### Response data format
|
|
48
64
|
|
|
49
65
|
Direct functions return an object with a data field and an error field. Only exactly one of these is defined, the other is undefined.
|
package/dist/composite.d.ts
CHANGED
|
@@ -130,6 +130,36 @@ export declare class Composite {
|
|
|
130
130
|
response: Response;
|
|
131
131
|
aborted: false;
|
|
132
132
|
}>;
|
|
133
|
+
attemptTemporalDeconfliction(id: string, timeInterval?: number): Promise<{
|
|
134
|
+
data?: never;
|
|
135
|
+
error: {
|
|
136
|
+
errors: {
|
|
137
|
+
detail: string;
|
|
138
|
+
status: "401" | "400" | "422" | "403" | "404";
|
|
139
|
+
}[];
|
|
140
|
+
status: "401" | "400" | "422" | "403" | "404";
|
|
141
|
+
};
|
|
142
|
+
response: Response;
|
|
143
|
+
aborted: false;
|
|
144
|
+
} | {
|
|
145
|
+
data: {
|
|
146
|
+
id: string;
|
|
147
|
+
type?: "flightplan";
|
|
148
|
+
meta: import("./volant-schema").components["schemas"]["FlightplanMeta"];
|
|
149
|
+
attributes: import("./volant-schema").components["schemas"]["Flightplan-Output"];
|
|
150
|
+
};
|
|
151
|
+
error?: never;
|
|
152
|
+
response: Response;
|
|
153
|
+
aborted: false;
|
|
154
|
+
} | {
|
|
155
|
+
error: {
|
|
156
|
+
errors: {
|
|
157
|
+
detail: string;
|
|
158
|
+
status: "401" | "400" | "422" | "404";
|
|
159
|
+
}[];
|
|
160
|
+
status: "401" | "400" | "422" | "404";
|
|
161
|
+
};
|
|
162
|
+
}>;
|
|
133
163
|
/** Handles creating and polling a pathing task for you */
|
|
134
164
|
doPathingTask(args: createPathingTask['requestBody']['content']['application/json']): Promise<{
|
|
135
165
|
error: {
|
package/dist/composite.js
CHANGED
|
@@ -52,6 +52,18 @@ class Composite {
|
|
|
52
52
|
return this.direct.changeFlightplanState(id, 'Accepted');
|
|
53
53
|
});
|
|
54
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
|
+
}
|
|
55
67
|
/// pathing tasks
|
|
56
68
|
/** Handles creating and polling a pathing task for you */
|
|
57
69
|
doPathingTask(args) {
|
package/dist/direct.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export type getFlightplan = paths['/flightplans/{flightplan_id}']['get'];
|
|
|
12
12
|
export type getFlightplanWaypointsDetailed = paths['/flightplans/{flightplan_id}/waypoints_detail']['get'];
|
|
13
13
|
export type getFlightplanStatistics = paths['/flightplans/{flightplan_id}/statistics']['get'];
|
|
14
14
|
export type getFlightplanVolumes = paths['/flightplans/{flightplan_id}/volumes']['get'];
|
|
15
|
-
export type getFlightplanConflicts = paths['/flightplans/{flightplan_id}/conflicts']['get'];
|
|
16
15
|
export type getFlightplanDeconflictedStartTime = paths['/flightplans/{flightplan_id}/start_time_deconflict']['get'];
|
|
17
16
|
export type changeFlightplanState = paths['/flightplans/{flightplan_id}/state']['post'];
|
|
18
17
|
export type getFlightplanAsFile = paths['/flightplans/{flightplan_id}/content']['get'];
|
|
@@ -34,6 +33,16 @@ export type createSoraReportV2_5 = paths['/risk_assessment/sora/v2.5/report']['p
|
|
|
34
33
|
export type createSoraSemanticModelVolumesV2_5 = paths['/risk_assessment/sora/v2.5/semantic_model_volumes']['post'];
|
|
35
34
|
export type createSoraClassification = paths['/risk_assessment/sora/classifications']['post'];
|
|
36
35
|
export type getSoraClassification = paths['/risk_assessment/sora/classifications/{classification_id}']['get'];
|
|
36
|
+
export type getAllControlledGroundAreas = paths['/risk_assessment/sora/controlled_ground_areas/']['get'];
|
|
37
|
+
export type createControlledGroundArea = paths['/risk_assessment/sora/controlled_ground_areas/']['post'];
|
|
38
|
+
export type getControlledGroundArea = paths['/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}']['get'];
|
|
39
|
+
export type updateControlledGroundArea = paths['/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}']['put'];
|
|
40
|
+
export type deleteControlledGroundArea = paths['/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}']['delete'];
|
|
41
|
+
export type getAllAtypicalAirspaces = paths['/risk_assessment/sora/atypical_airspaces/']['get'];
|
|
42
|
+
export type createAtypicalAirspace = paths['/risk_assessment/sora/atypical_airspaces/']['post'];
|
|
43
|
+
export type getAtypicalAirspace = paths['/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}']['get'];
|
|
44
|
+
export type updateAtypicalAirspace = paths['/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}']['put'];
|
|
45
|
+
export type deleteAtypicalAirspace = paths['/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}']['delete'];
|
|
37
46
|
export type createRasterPattern = paths['/flight_patterns/raster']['post'];
|
|
38
47
|
export declare class Direct {
|
|
39
48
|
private fetcher;
|
|
@@ -103,9 +112,8 @@ export declare class Direct {
|
|
|
103
112
|
}>;
|
|
104
113
|
/**
|
|
105
114
|
* Modify a Flightplan
|
|
106
|
-
* @description Modify the specified flightplan. This is only permitted while the flightplan state is not
|
|
107
|
-
*
|
|
108
|
-
* checking.
|
|
115
|
+
* @description Modify the specified flightplan. This is only permitted while the flightplan state is not `Closed`. If the
|
|
116
|
+
* flightplan is in state: `Accepted`, the flightplan will be subject to conflict checking.
|
|
109
117
|
*/
|
|
110
118
|
modifyDraftFlightplan<Opts extends requestOptions = {}>(id: pathOf<modifyDraftFlightplan>['flightplan_id'], args: bodyOf<modifyDraftFlightplan>, opts?: Opts | requestOptions): Promise<{
|
|
111
119
|
data?: never;
|
|
@@ -229,10 +237,9 @@ export declare class Direct {
|
|
|
229
237
|
* Retrieve Flightplan Operational Intent Volumes
|
|
230
238
|
* @description Retrieve Operational Intent Volumes for the specified flightplan
|
|
231
239
|
*
|
|
232
|
-
* Volumes wholly contain the operational intent while being as small as practical. Start and end
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
* the mean flightpath as defined in each waypoint.
|
|
240
|
+
* Volumes wholly contain the operational intent while being as small as practical. Start and end times, as well as
|
|
241
|
+
* lower and upper altitudes, are required for each volume. The end time may not be in the past. Volumes are generated
|
|
242
|
+
* based on the `LateralParameters` of the flightplan about the mean flightpath as defined in each waypoint.
|
|
236
243
|
*/
|
|
237
244
|
getFlightplanVolumes<Opts extends requestOptions = {}>(id: pathOf<getFlightplanVolumes>['flightplan_id'], opts?: Opts | requestOptions): Promise<{
|
|
238
245
|
data?: never;
|
|
@@ -259,42 +266,6 @@ export declare class Direct {
|
|
|
259
266
|
response: Response;
|
|
260
267
|
aborted: false;
|
|
261
268
|
}>;
|
|
262
|
-
/**
|
|
263
|
-
* Retrieve Flightplan Conflicts
|
|
264
|
-
* @description Retrieve all the conflicts for the specified flightplan, categorised by their state.
|
|
265
|
-
*
|
|
266
|
-
* Flightplans of state `Closed` are ignored.
|
|
267
|
-
*
|
|
268
|
-
* Note that Flightplans which are in the category `Draft` will not prevent transitioning the
|
|
269
|
-
* specified flightplan in to the `Accepted` state and instead are intended as a warning.
|
|
270
|
-
* Flightplans in the `Accepted` state will prevent transition of the specified flightplan to
|
|
271
|
-
* `Accepted`.
|
|
272
|
-
*/
|
|
273
|
-
getFlightplanConflicts<Opts extends requestOptions = {}>(id: pathOf<getFlightplanConflicts>['flightplan_id'], opts?: Opts | requestOptions): Promise<{
|
|
274
|
-
data?: never;
|
|
275
|
-
error: {
|
|
276
|
-
errors: {
|
|
277
|
-
detail: string;
|
|
278
|
-
status: "401" | "400" | "422" | "404";
|
|
279
|
-
}[];
|
|
280
|
-
status: "401" | "400" | "422" | "404";
|
|
281
|
-
};
|
|
282
|
-
response: Response;
|
|
283
|
-
aborted: false;
|
|
284
|
-
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
285
|
-
data?: never;
|
|
286
|
-
error?: never;
|
|
287
|
-
response?: never;
|
|
288
|
-
aborted: true;
|
|
289
|
-
} : never) | {
|
|
290
|
-
data: {
|
|
291
|
-
data: import("./volant-schema").components["schemas"]["FlightplanConflictResponse"] | import("./volant-schema").components["schemas"]["AirspaceConstraintConflictResponse"];
|
|
292
|
-
links: import("./volant-schema").components["schemas"]["Links"];
|
|
293
|
-
}[];
|
|
294
|
-
error?: never;
|
|
295
|
-
response: Response;
|
|
296
|
-
aborted: false;
|
|
297
|
-
}>;
|
|
298
269
|
/**
|
|
299
270
|
* Returns the inputted flightplan with an updated start time that does not conflict
|
|
300
271
|
* @description Get a new start time for a draft flightplan which will not conflict with any occupied airspace.
|
|
@@ -610,6 +581,7 @@ export declare class Direct {
|
|
|
610
581
|
}>;
|
|
611
582
|
/**
|
|
612
583
|
* List available aircraft
|
|
584
|
+
* @deprecated
|
|
613
585
|
* @description List available aircraft.
|
|
614
586
|
*/
|
|
615
587
|
getAllAircraft<Opts extends requestOptions = {}>(opts?: Opts | requestOptions): Promise<{
|
|
@@ -640,6 +612,7 @@ export declare class Direct {
|
|
|
640
612
|
}>;
|
|
641
613
|
/**
|
|
642
614
|
* Retrieve the specified aircraft
|
|
615
|
+
* @deprecated
|
|
643
616
|
* @description Retrieve the specified aircraft.
|
|
644
617
|
*/
|
|
645
618
|
getAircraft<Opts extends requestOptions = {}>(id: pathOf<getAircraft>['aircraft_id'], opts?: Opts | requestOptions): Promise<{
|
|
@@ -779,8 +752,9 @@ export declare class Direct {
|
|
|
779
752
|
aborted: true;
|
|
780
753
|
} : never) | {
|
|
781
754
|
data: {
|
|
782
|
-
|
|
783
|
-
|
|
755
|
+
id: import("./volant-schema").components["schemas"]["ARC"];
|
|
756
|
+
name: string;
|
|
757
|
+
implemented: boolean;
|
|
784
758
|
}[];
|
|
785
759
|
error?: never;
|
|
786
760
|
response: Response;
|
|
@@ -818,7 +792,13 @@ export declare class Direct {
|
|
|
818
792
|
}>;
|
|
819
793
|
/**
|
|
820
794
|
* Generate a report containing derived SORA information used for regulatory evidence
|
|
821
|
-
* @description Generate a report containing derived SORA information used for regulatory evidence
|
|
795
|
+
* @description Generate a report containing derived SORA information used for regulatory evidence.
|
|
796
|
+
*
|
|
797
|
+
*
|
|
798
|
+
* GRC and ARC determination is considered across the entire operational volume as determined by the supplied
|
|
799
|
+
* `waypoints`. Where the operational environment differs across the volume, the worst case is taken, i.e. the highest
|
|
800
|
+
* Intrinsic GRC determined and the highest likelihood to encounter another aircraft (as defined by Airspace Encounter
|
|
801
|
+
* Class) determining the ARC.
|
|
822
802
|
*/
|
|
823
803
|
createSoraReportV2_5<Opts extends requestOptions = {}>(args: bodyOf<createSoraReportV2_5>, opts?: Opts | requestOptions): Promise<{
|
|
824
804
|
data?: never;
|
|
@@ -868,7 +848,7 @@ export declare class Direct {
|
|
|
868
848
|
} : never) | {
|
|
869
849
|
data: {
|
|
870
850
|
type: "FeatureCollection";
|
|
871
|
-
features: (import("./volant-schema").components["schemas"]["
|
|
851
|
+
features: (import("./volant-schema").components["schemas"]["GeoJsonPolygonFeature_GeoJsonSemanticModelProperties_"] | import("./volant-schema").components["schemas"]["GeoJsonMultiPolygonFeature_GeoJsonSemanticModelProperties_"])[];
|
|
872
852
|
};
|
|
873
853
|
error?: never;
|
|
874
854
|
response: Response;
|
|
@@ -934,6 +914,304 @@ export declare class Direct {
|
|
|
934
914
|
response: Response;
|
|
935
915
|
aborted: false;
|
|
936
916
|
}>;
|
|
917
|
+
/**
|
|
918
|
+
* List Controlled Ground Areas
|
|
919
|
+
* @description Get a list of Controlled Ground Areas, ordered by last time updated
|
|
920
|
+
*/
|
|
921
|
+
getAllControlledGroundAreas<Opts extends requestOptions = {}>(args: queryOf<getAllControlledGroundAreas>, opts?: Opts | requestOptions): Promise<{
|
|
922
|
+
data?: never;
|
|
923
|
+
error: {
|
|
924
|
+
errors: {
|
|
925
|
+
detail: string;
|
|
926
|
+
status: "401" | "400" | "422";
|
|
927
|
+
}[];
|
|
928
|
+
status: "401" | "400" | "422";
|
|
929
|
+
};
|
|
930
|
+
response: Response;
|
|
931
|
+
aborted: false;
|
|
932
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
933
|
+
data?: never;
|
|
934
|
+
error?: never;
|
|
935
|
+
response?: never;
|
|
936
|
+
aborted: true;
|
|
937
|
+
} : never) | {
|
|
938
|
+
data: {
|
|
939
|
+
id: string;
|
|
940
|
+
type?: "controlled_ground_area";
|
|
941
|
+
attributes: import("./volant-schema").components["schemas"]["ControlledGroundArea-Output"];
|
|
942
|
+
}[];
|
|
943
|
+
error?: never;
|
|
944
|
+
response: Response;
|
|
945
|
+
aborted: false;
|
|
946
|
+
}>;
|
|
947
|
+
/**
|
|
948
|
+
* Create a Controlled Ground Area
|
|
949
|
+
* @description Create a Controlled Ground Area from GeoJSON
|
|
950
|
+
*/
|
|
951
|
+
createControlledGroundArea<Opts extends requestOptions = {}>(args: bodyOf<createControlledGroundArea>, opts?: Opts | requestOptions): Promise<{
|
|
952
|
+
data?: never;
|
|
953
|
+
error: {
|
|
954
|
+
errors: {
|
|
955
|
+
detail: string;
|
|
956
|
+
status: "401" | "400" | "422";
|
|
957
|
+
}[];
|
|
958
|
+
status: "401" | "400" | "422";
|
|
959
|
+
};
|
|
960
|
+
response: Response;
|
|
961
|
+
aborted: false;
|
|
962
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
963
|
+
data?: never;
|
|
964
|
+
error?: never;
|
|
965
|
+
response?: never;
|
|
966
|
+
aborted: true;
|
|
967
|
+
} : never) | {
|
|
968
|
+
data: {
|
|
969
|
+
id: string;
|
|
970
|
+
type?: "controlled_ground_area";
|
|
971
|
+
attributes: import("./volant-schema").components["schemas"]["ControlledGroundArea-Output"];
|
|
972
|
+
};
|
|
973
|
+
error?: never;
|
|
974
|
+
response: Response;
|
|
975
|
+
aborted: false;
|
|
976
|
+
}>;
|
|
977
|
+
/**
|
|
978
|
+
* Get a Controlled Ground Area
|
|
979
|
+
* @description Get a Controlled Ground Area
|
|
980
|
+
*/
|
|
981
|
+
getControlledGroundArea<Opts extends requestOptions = {}>(args: pathOf<getControlledGroundArea>, opts?: Opts | requestOptions): Promise<{
|
|
982
|
+
data?: never;
|
|
983
|
+
error: {
|
|
984
|
+
errors: {
|
|
985
|
+
detail: string;
|
|
986
|
+
status: "401" | "400" | "422" | "404";
|
|
987
|
+
}[];
|
|
988
|
+
status: "401" | "400" | "422" | "404";
|
|
989
|
+
};
|
|
990
|
+
response: Response;
|
|
991
|
+
aborted: false;
|
|
992
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
993
|
+
data?: never;
|
|
994
|
+
error?: never;
|
|
995
|
+
response?: never;
|
|
996
|
+
aborted: true;
|
|
997
|
+
} : never) | {
|
|
998
|
+
data: {
|
|
999
|
+
id: string;
|
|
1000
|
+
type?: "controlled_ground_area";
|
|
1001
|
+
attributes: import("./volant-schema").components["schemas"]["ControlledGroundArea-Output"];
|
|
1002
|
+
};
|
|
1003
|
+
error?: never;
|
|
1004
|
+
response: Response;
|
|
1005
|
+
aborted: false;
|
|
1006
|
+
}>;
|
|
1007
|
+
/**
|
|
1008
|
+
* Update a Controlled Ground Area
|
|
1009
|
+
* @description Modify an existing Controlled Ground Area. This cannot be performed when it is referenced by a flightplan in state
|
|
1010
|
+
* `Accepted`.
|
|
1011
|
+
*/
|
|
1012
|
+
updateControlledGroundArea<Opts extends requestOptions = {}>(id: pathOf<updateControlledGroundArea>['controlled_ground_area_id'], args: bodyOf<updateControlledGroundArea>, opts?: Opts | requestOptions): Promise<{
|
|
1013
|
+
data?: never;
|
|
1014
|
+
error: {
|
|
1015
|
+
errors: {
|
|
1016
|
+
detail: string;
|
|
1017
|
+
status: "401" | "400" | "422" | "404";
|
|
1018
|
+
}[];
|
|
1019
|
+
status: "401" | "400" | "422" | "404";
|
|
1020
|
+
};
|
|
1021
|
+
response: Response;
|
|
1022
|
+
aborted: false;
|
|
1023
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1024
|
+
data?: never;
|
|
1025
|
+
error?: never;
|
|
1026
|
+
response?: never;
|
|
1027
|
+
aborted: true;
|
|
1028
|
+
} : never) | {
|
|
1029
|
+
data: {
|
|
1030
|
+
id: string;
|
|
1031
|
+
type?: "controlled_ground_area";
|
|
1032
|
+
attributes: import("./volant-schema").components["schemas"]["ControlledGroundArea-Output"];
|
|
1033
|
+
};
|
|
1034
|
+
error?: never;
|
|
1035
|
+
response: Response;
|
|
1036
|
+
aborted: false;
|
|
1037
|
+
}>;
|
|
1038
|
+
/**
|
|
1039
|
+
* Delete a Controlled Ground Area
|
|
1040
|
+
* @description Delete a Controlled Ground Area.
|
|
1041
|
+
*
|
|
1042
|
+
* A Controlled Ground Area cannot be deleted if it is referenced by a SORA Classification
|
|
1043
|
+
*/
|
|
1044
|
+
deleteControlledGroundArea<Opts extends requestOptions = {}>(args: pathOf<deleteControlledGroundArea>, opts?: Opts | requestOptions): Promise<{
|
|
1045
|
+
data?: never;
|
|
1046
|
+
error: {
|
|
1047
|
+
errors: {
|
|
1048
|
+
detail: string;
|
|
1049
|
+
status: "401" | "400" | "422" | "404";
|
|
1050
|
+
}[];
|
|
1051
|
+
status: "401" | "400" | "422" | "404";
|
|
1052
|
+
};
|
|
1053
|
+
response: Response;
|
|
1054
|
+
aborted: false;
|
|
1055
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1056
|
+
data?: never;
|
|
1057
|
+
error?: never;
|
|
1058
|
+
response?: never;
|
|
1059
|
+
aborted: true;
|
|
1060
|
+
} : never) | {
|
|
1061
|
+
data: boolean;
|
|
1062
|
+
error?: never;
|
|
1063
|
+
response: Response;
|
|
1064
|
+
aborted: false;
|
|
1065
|
+
}>;
|
|
1066
|
+
/**
|
|
1067
|
+
* List Controlled Ground Areas
|
|
1068
|
+
* @description Get a list of Atypical Airspaces, ordered by last time updated
|
|
1069
|
+
*/
|
|
1070
|
+
getAllAtypicalAirspaces<Opts extends requestOptions = {}>(args: queryOf<getAllAtypicalAirspaces>, opts?: Opts | requestOptions): Promise<{
|
|
1071
|
+
data?: never;
|
|
1072
|
+
error: {
|
|
1073
|
+
errors: {
|
|
1074
|
+
detail: string;
|
|
1075
|
+
status: "401" | "400" | "422";
|
|
1076
|
+
}[];
|
|
1077
|
+
status: "401" | "400" | "422";
|
|
1078
|
+
};
|
|
1079
|
+
response: Response;
|
|
1080
|
+
aborted: false;
|
|
1081
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1082
|
+
data?: never;
|
|
1083
|
+
error?: never;
|
|
1084
|
+
response?: never;
|
|
1085
|
+
aborted: true;
|
|
1086
|
+
} : never) | {
|
|
1087
|
+
data: {
|
|
1088
|
+
id: string;
|
|
1089
|
+
type?: "atypical_airspace";
|
|
1090
|
+
attributes: import("./volant-schema").components["schemas"]["AtypicalAirspace-Output"];
|
|
1091
|
+
}[];
|
|
1092
|
+
error?: never;
|
|
1093
|
+
response: Response;
|
|
1094
|
+
aborted: false;
|
|
1095
|
+
}>;
|
|
1096
|
+
/**
|
|
1097
|
+
* Create an Atypical Airspace
|
|
1098
|
+
* @description Create an Atypical Airspace
|
|
1099
|
+
*/
|
|
1100
|
+
createAtypicalAirspace<Opts extends requestOptions = {}>(args: bodyOf<createAtypicalAirspace>, opts?: Opts | requestOptions): Promise<{
|
|
1101
|
+
data?: never;
|
|
1102
|
+
error: {
|
|
1103
|
+
errors: {
|
|
1104
|
+
detail: string;
|
|
1105
|
+
status: "401" | "400" | "422";
|
|
1106
|
+
}[];
|
|
1107
|
+
status: "401" | "400" | "422";
|
|
1108
|
+
};
|
|
1109
|
+
response: Response;
|
|
1110
|
+
aborted: false;
|
|
1111
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1112
|
+
data?: never;
|
|
1113
|
+
error?: never;
|
|
1114
|
+
response?: never;
|
|
1115
|
+
aborted: true;
|
|
1116
|
+
} : never) | {
|
|
1117
|
+
data: {
|
|
1118
|
+
id: string;
|
|
1119
|
+
type?: "atypical_airspace";
|
|
1120
|
+
attributes: import("./volant-schema").components["schemas"]["AtypicalAirspace-Output"];
|
|
1121
|
+
};
|
|
1122
|
+
error?: never;
|
|
1123
|
+
response: Response;
|
|
1124
|
+
aborted: false;
|
|
1125
|
+
}>;
|
|
1126
|
+
/**
|
|
1127
|
+
* Get an Atypical Airspace
|
|
1128
|
+
* @description Get an Atypical Airspace
|
|
1129
|
+
*/
|
|
1130
|
+
getAtypicalAirspace<Opts extends requestOptions = {}>(args: pathOf<getAtypicalAirspace>, opts?: Opts | requestOptions): Promise<{
|
|
1131
|
+
data?: never;
|
|
1132
|
+
error: {
|
|
1133
|
+
errors: {
|
|
1134
|
+
detail: string;
|
|
1135
|
+
status: "401" | "400" | "422" | "404";
|
|
1136
|
+
}[];
|
|
1137
|
+
status: "401" | "400" | "422" | "404";
|
|
1138
|
+
};
|
|
1139
|
+
response: Response;
|
|
1140
|
+
aborted: false;
|
|
1141
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1142
|
+
data?: never;
|
|
1143
|
+
error?: never;
|
|
1144
|
+
response?: never;
|
|
1145
|
+
aborted: true;
|
|
1146
|
+
} : never) | {
|
|
1147
|
+
data: {
|
|
1148
|
+
id: string;
|
|
1149
|
+
type?: "atypical_airspace";
|
|
1150
|
+
attributes: import("./volant-schema").components["schemas"]["AtypicalAirspace-Output"];
|
|
1151
|
+
};
|
|
1152
|
+
error?: never;
|
|
1153
|
+
response: Response;
|
|
1154
|
+
aborted: false;
|
|
1155
|
+
}>;
|
|
1156
|
+
/**
|
|
1157
|
+
* Update an Atypical Airspace
|
|
1158
|
+
* @description Modify an existing Atypical Airspace. This cannot be performed when it is referenced by a flightplan in state
|
|
1159
|
+
* `Accepted`.
|
|
1160
|
+
*/
|
|
1161
|
+
updateAtypicalAirspace<Opts extends requestOptions = {}>(id: pathOf<updateAtypicalAirspace>['atypical_airspace_id'], args: bodyOf<updateAtypicalAirspace>, opts?: Opts | requestOptions): Promise<{
|
|
1162
|
+
data?: never;
|
|
1163
|
+
error: {
|
|
1164
|
+
errors: {
|
|
1165
|
+
detail: string;
|
|
1166
|
+
status: "401" | "400" | "422" | "404";
|
|
1167
|
+
}[];
|
|
1168
|
+
status: "401" | "400" | "422" | "404";
|
|
1169
|
+
};
|
|
1170
|
+
response: Response;
|
|
1171
|
+
aborted: false;
|
|
1172
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1173
|
+
data?: never;
|
|
1174
|
+
error?: never;
|
|
1175
|
+
response?: never;
|
|
1176
|
+
aborted: true;
|
|
1177
|
+
} : never) | {
|
|
1178
|
+
data: {
|
|
1179
|
+
id: string;
|
|
1180
|
+
type?: "atypical_airspace";
|
|
1181
|
+
attributes: import("./volant-schema").components["schemas"]["AtypicalAirspace-Output"];
|
|
1182
|
+
};
|
|
1183
|
+
error?: never;
|
|
1184
|
+
response: Response;
|
|
1185
|
+
aborted: false;
|
|
1186
|
+
}>;
|
|
1187
|
+
/**
|
|
1188
|
+
* Delete an Atypical Airspace
|
|
1189
|
+
* @description Delete an Atypical Airspace.
|
|
1190
|
+
*
|
|
1191
|
+
* A Atypical Airspace cannot be deleted if it is referenced by a SORA Classification
|
|
1192
|
+
*/
|
|
1193
|
+
deleteAtypicalAirspace<Opts extends requestOptions = {}>(args: pathOf<deleteAtypicalAirspace>, opts?: Opts | requestOptions): Promise<{
|
|
1194
|
+
data?: never;
|
|
1195
|
+
error: {
|
|
1196
|
+
errors: {
|
|
1197
|
+
detail: string;
|
|
1198
|
+
status: "401" | "400" | "422" | "404";
|
|
1199
|
+
}[];
|
|
1200
|
+
status: "401" | "400" | "422" | "404";
|
|
1201
|
+
};
|
|
1202
|
+
response: Response;
|
|
1203
|
+
aborted: false;
|
|
1204
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1205
|
+
data?: never;
|
|
1206
|
+
error?: never;
|
|
1207
|
+
response?: never;
|
|
1208
|
+
aborted: true;
|
|
1209
|
+
} : never) | {
|
|
1210
|
+
data: boolean;
|
|
1211
|
+
error?: never;
|
|
1212
|
+
response: Response;
|
|
1213
|
+
aborted: false;
|
|
1214
|
+
}>;
|
|
937
1215
|
/**
|
|
938
1216
|
* Generate a raster pattern
|
|
939
1217
|
* @description Generate a raster pattern that covers a specified search polygon
|
package/dist/direct.js
CHANGED
|
@@ -81,15 +81,6 @@ class Direct {
|
|
|
81
81
|
return resp;
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
getFlightplanConflicts(id, opts) {
|
|
85
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
const resp = yield this.fetcher.GET('/flightplans/{flightplan_id}/conflicts', { path: { flightplan_id: id } }, opts);
|
|
87
|
-
if (resp.error === undefined && !resp.aborted) {
|
|
88
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
89
|
-
}
|
|
90
|
-
return resp;
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
84
|
// TODO: make a wrapper for this which updates the existing flightplan to have this new start time
|
|
94
85
|
getFlightplanDeconflictedStartTime(id, args, opts) {
|
|
95
86
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -236,7 +227,7 @@ class Direct {
|
|
|
236
227
|
return __awaiter(this, void 0, void 0, function* () {
|
|
237
228
|
const resp = yield this.fetcher.GET('/risk_assessment/sora/v2.5/air_risk_classifications', {}, opts);
|
|
238
229
|
if (resp.error === undefined && !resp.aborted) {
|
|
239
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
230
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((arc) => arc.data) });
|
|
240
231
|
}
|
|
241
232
|
return resp;
|
|
242
233
|
});
|
|
@@ -286,6 +277,102 @@ class Direct {
|
|
|
286
277
|
return resp;
|
|
287
278
|
});
|
|
288
279
|
}
|
|
280
|
+
/// controlled ground areas
|
|
281
|
+
getAllControlledGroundAreas(args, opts) {
|
|
282
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
283
|
+
const resp = yield this.fetcher.GET('/risk_assessment/sora/controlled_ground_areas/', { query: args }, opts);
|
|
284
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
285
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((controlledGroundArea) => controlledGroundArea.data) });
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
return resp;
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
createControlledGroundArea(args, opts) {
|
|
293
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
294
|
+
const resp = yield this.fetcher.POST('/risk_assessment/sora/controlled_ground_areas/', { body: args }, opts);
|
|
295
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
296
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
297
|
+
}
|
|
298
|
+
return resp;
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
getControlledGroundArea(args, opts) {
|
|
302
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
303
|
+
const resp = yield this.fetcher.GET('/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}', { path: args }, opts);
|
|
304
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
305
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
306
|
+
}
|
|
307
|
+
return resp;
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
updateControlledGroundArea(id, args, opts) {
|
|
311
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
312
|
+
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);
|
|
313
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
314
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
315
|
+
}
|
|
316
|
+
return resp;
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
deleteControlledGroundArea(args, opts) {
|
|
320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
+
const resp = yield this.fetcher.DELETE('/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}', { path: args }, opts);
|
|
322
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
323
|
+
return Object.assign(Object.assign({}, resp), { data: true });
|
|
324
|
+
}
|
|
325
|
+
return resp;
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
/// atypical airspaces
|
|
329
|
+
getAllAtypicalAirspaces(args, opts) {
|
|
330
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
331
|
+
const resp = yield this.fetcher.GET('/risk_assessment/sora/atypical_airspaces/', { query: args }, opts);
|
|
332
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
333
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((atypicalAirspace) => atypicalAirspace.data) });
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
return resp;
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
createAtypicalAirspace(args, opts) {
|
|
341
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
342
|
+
const resp = yield this.fetcher.POST('/risk_assessment/sora/atypical_airspaces/', { body: args }, opts);
|
|
343
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
344
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
345
|
+
}
|
|
346
|
+
return resp;
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
getAtypicalAirspace(args, opts) {
|
|
350
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
351
|
+
const resp = yield this.fetcher.GET('/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}', { path: args }, opts);
|
|
352
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
353
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
354
|
+
}
|
|
355
|
+
return resp;
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
updateAtypicalAirspace(id, args, opts) {
|
|
359
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
360
|
+
const resp = yield this.fetcher.PUT('/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}', { body: args, path: { atypical_airspace_id: id } }, opts);
|
|
361
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
362
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
363
|
+
}
|
|
364
|
+
return resp;
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
deleteAtypicalAirspace(args, opts) {
|
|
368
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
369
|
+
const resp = yield this.fetcher.DELETE('/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}', { path: args }, opts);
|
|
370
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
371
|
+
return Object.assign(Object.assign({}, resp), { data: true });
|
|
372
|
+
}
|
|
373
|
+
return resp;
|
|
374
|
+
});
|
|
375
|
+
}
|
|
289
376
|
/// flight patterns
|
|
290
377
|
createRasterPattern(args, opts) {
|
|
291
378
|
return __awaiter(this, void 0, void 0, function* () {
|