@volant-autonomy/via-sdk 1.0.2 → 1.2773.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 +15 -0
- package/dist/composite.d.ts +30 -0
- package/dist/composite.js +12 -0
- package/dist/direct.d.ts +330 -15
- package/dist/direct.js +97 -1
- package/dist/types.d.ts +3 -3
- package/dist/volant-schema.d.ts +1122 -120
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,6 +44,21 @@ 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
|
+
As well as offering methods for all endpoints within the API, you have access to a variety of features in this API
|
|
49
|
+
Wrapper that help make some common workflows more convenient. These features are as follows:
|
|
50
|
+
| Feature | Remark | Method |
|
|
51
|
+
| -------------------------- |-------------------------------------------------------------------------------------| -------------------------------|
|
|
52
|
+
| Upsert Flightplan | Create a flightplan no ID is supplied. Update existing flightplan if ID is supplied | upsertFlightplan() |
|
|
53
|
+
| Fetch Draft Flightplans | Will fetch a list flightplans that you own that are in `Draft` state | getAllDraftFlightplans() |
|
|
54
|
+
| Fetch Closed Flightplans | Will fetch a list flightplans that you own that are in `Closed` state | getAllClosedFlightplans() |
|
|
55
|
+
| Fetch Pending Flightplans | Will fetch a list flightplans that you own that are in `Pending` state | getAllPendingFlightplans() |
|
|
56
|
+
| Fetch Accepted Flightplans | Will fetch a list flightplans that you own that are in `Accepted` state | getAllAcceptedFlightplans() |
|
|
57
|
+
| Flightplan approval | Will attempt to update the state of a Flightplan to `Accepted` | attemptAcceptFlightplan() |
|
|
58
|
+
| Temporal Deconfliction | Will attempt to temporally deconflict your flightplan and update the departure time | attemptTemporalDeconfliction() |
|
|
59
|
+
| Pathing | Will perform a pathing request and return the pathing result | doPathingTask() |
|
|
60
|
+
|
|
61
|
+
|
|
47
62
|
### Response data format
|
|
48
63
|
|
|
49
64
|
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
|
@@ -34,6 +34,16 @@ export type createSoraReportV2_5 = paths['/risk_assessment/sora/v2.5/report']['p
|
|
|
34
34
|
export type createSoraSemanticModelVolumesV2_5 = paths['/risk_assessment/sora/v2.5/semantic_model_volumes']['post'];
|
|
35
35
|
export type createSoraClassification = paths['/risk_assessment/sora/classifications']['post'];
|
|
36
36
|
export type getSoraClassification = paths['/risk_assessment/sora/classifications/{classification_id}']['get'];
|
|
37
|
+
export type getAllControlledGroundAreas = paths['/risk_assessment/sora/controlled_ground_areas/']['get'];
|
|
38
|
+
export type createControlledGroundArea = paths['/risk_assessment/sora/controlled_ground_areas/']['post'];
|
|
39
|
+
export type getControlledGroundArea = paths['/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}']['get'];
|
|
40
|
+
export type updateControlledGroundArea = paths['/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}']['put'];
|
|
41
|
+
export type deleteControlledGroundArea = paths['/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}']['delete'];
|
|
42
|
+
export type getAllAtypicalAirspaces = paths['/risk_assessment/sora/atypical_airspaces/']['get'];
|
|
43
|
+
export type createAtypicalAirspace = paths['/risk_assessment/sora/atypical_airspaces/']['post'];
|
|
44
|
+
export type getAtypicalAirspace = paths['/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}']['get'];
|
|
45
|
+
export type updateAtypicalAirspace = paths['/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}']['put'];
|
|
46
|
+
export type deleteAtypicalAirspace = paths['/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}']['delete'];
|
|
37
47
|
export type createRasterPattern = paths['/flight_patterns/raster']['post'];
|
|
38
48
|
export declare class Direct {
|
|
39
49
|
private fetcher;
|
|
@@ -103,9 +113,8 @@ export declare class Direct {
|
|
|
103
113
|
}>;
|
|
104
114
|
/**
|
|
105
115
|
* Modify a Flightplan
|
|
106
|
-
* @description Modify the specified flightplan. This is only permitted while the flightplan state is not
|
|
107
|
-
*
|
|
108
|
-
* checking.
|
|
116
|
+
* @description Modify the specified flightplan. This is only permitted while the flightplan state is not `Closed`. If the
|
|
117
|
+
* flightplan is in state: `Accepted`, the flightplan will be subject to conflict checking.
|
|
109
118
|
*/
|
|
110
119
|
modifyDraftFlightplan<Opts extends requestOptions = {}>(id: pathOf<modifyDraftFlightplan>['flightplan_id'], args: bodyOf<modifyDraftFlightplan>, opts?: Opts | requestOptions): Promise<{
|
|
111
120
|
data?: never;
|
|
@@ -229,10 +238,9 @@ export declare class Direct {
|
|
|
229
238
|
* Retrieve Flightplan Operational Intent Volumes
|
|
230
239
|
* @description Retrieve Operational Intent Volumes for the specified flightplan
|
|
231
240
|
*
|
|
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.
|
|
241
|
+
* Volumes wholly contain the operational intent while being as small as practical. Start and end times, as well as
|
|
242
|
+
* lower and upper altitudes, are required for each volume. The end time may not be in the past. Volumes are generated
|
|
243
|
+
* based on the `LateralParameters` of the flightplan about the mean flightpath as defined in each waypoint.
|
|
236
244
|
*/
|
|
237
245
|
getFlightplanVolumes<Opts extends requestOptions = {}>(id: pathOf<getFlightplanVolumes>['flightplan_id'], opts?: Opts | requestOptions): Promise<{
|
|
238
246
|
data?: never;
|
|
@@ -261,14 +269,14 @@ export declare class Direct {
|
|
|
261
269
|
}>;
|
|
262
270
|
/**
|
|
263
271
|
* Retrieve Flightplan Conflicts
|
|
272
|
+
* @deprecated
|
|
264
273
|
* @description Retrieve all the conflicts for the specified flightplan, categorised by their state.
|
|
265
274
|
*
|
|
266
275
|
* Flightplans of state `Closed` are ignored.
|
|
267
276
|
*
|
|
268
|
-
* Note that Flightplans which are in the category `Draft` will not prevent transitioning the
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
* `Accepted`.
|
|
277
|
+
* Note that Flightplans which are in the category `Draft` will not prevent transitioning the specified flightplan in
|
|
278
|
+
* to the `Accepted` state and instead are intended as a warning. Flightplans in the `Accepted` state will prevent
|
|
279
|
+
* transition of the specified flightplan to `Accepted`.
|
|
272
280
|
*/
|
|
273
281
|
getFlightplanConflicts<Opts extends requestOptions = {}>(id: pathOf<getFlightplanConflicts>['flightplan_id'], opts?: Opts | requestOptions): Promise<{
|
|
274
282
|
data?: never;
|
|
@@ -610,6 +618,7 @@ export declare class Direct {
|
|
|
610
618
|
}>;
|
|
611
619
|
/**
|
|
612
620
|
* List available aircraft
|
|
621
|
+
* @deprecated
|
|
613
622
|
* @description List available aircraft.
|
|
614
623
|
*/
|
|
615
624
|
getAllAircraft<Opts extends requestOptions = {}>(opts?: Opts | requestOptions): Promise<{
|
|
@@ -640,6 +649,7 @@ export declare class Direct {
|
|
|
640
649
|
}>;
|
|
641
650
|
/**
|
|
642
651
|
* Retrieve the specified aircraft
|
|
652
|
+
* @deprecated
|
|
643
653
|
* @description Retrieve the specified aircraft.
|
|
644
654
|
*/
|
|
645
655
|
getAircraft<Opts extends requestOptions = {}>(id: pathOf<getAircraft>['aircraft_id'], opts?: Opts | requestOptions): Promise<{
|
|
@@ -779,8 +789,9 @@ export declare class Direct {
|
|
|
779
789
|
aborted: true;
|
|
780
790
|
} : never) | {
|
|
781
791
|
data: {
|
|
782
|
-
|
|
783
|
-
|
|
792
|
+
id: import("./volant-schema").components["schemas"]["ARC"];
|
|
793
|
+
name: string;
|
|
794
|
+
implemented: boolean;
|
|
784
795
|
}[];
|
|
785
796
|
error?: never;
|
|
786
797
|
response: Response;
|
|
@@ -818,7 +829,13 @@ export declare class Direct {
|
|
|
818
829
|
}>;
|
|
819
830
|
/**
|
|
820
831
|
* Generate a report containing derived SORA information used for regulatory evidence
|
|
821
|
-
* @description Generate a report containing derived SORA information used for regulatory evidence
|
|
832
|
+
* @description Generate a report containing derived SORA information used for regulatory evidence.
|
|
833
|
+
*
|
|
834
|
+
*
|
|
835
|
+
* GRC and ARC determination is considered across the entire operational volume as determined by the supplied
|
|
836
|
+
* `waypoints`. Where the operational environment differs across the volume, the worst case is taken, i.e. the highest
|
|
837
|
+
* Intrinsic GRC determined and the highest likelihood to encounter another aircraft (as defined by Airspace Encounter
|
|
838
|
+
* Class) determining the ARC.
|
|
822
839
|
*/
|
|
823
840
|
createSoraReportV2_5<Opts extends requestOptions = {}>(args: bodyOf<createSoraReportV2_5>, opts?: Opts | requestOptions): Promise<{
|
|
824
841
|
data?: never;
|
|
@@ -868,7 +885,7 @@ export declare class Direct {
|
|
|
868
885
|
} : never) | {
|
|
869
886
|
data: {
|
|
870
887
|
type: "FeatureCollection";
|
|
871
|
-
features: (import("./volant-schema").components["schemas"]["
|
|
888
|
+
features: (import("./volant-schema").components["schemas"]["GeoJsonPolygonFeature_GeoJsonSemanticModelProperties_"] | import("./volant-schema").components["schemas"]["GeoJsonMultiPolygonFeature_GeoJsonSemanticModelProperties_"])[];
|
|
872
889
|
};
|
|
873
890
|
error?: never;
|
|
874
891
|
response: Response;
|
|
@@ -934,6 +951,304 @@ export declare class Direct {
|
|
|
934
951
|
response: Response;
|
|
935
952
|
aborted: false;
|
|
936
953
|
}>;
|
|
954
|
+
/**
|
|
955
|
+
* List Controlled Ground Areas
|
|
956
|
+
* @description Get a list of Controlled Ground Areas, ordered by last time updated
|
|
957
|
+
*/
|
|
958
|
+
getAllControlledGroundAreas<Opts extends requestOptions = {}>(args: queryOf<getAllControlledGroundAreas>, opts?: Opts | requestOptions): Promise<{
|
|
959
|
+
data?: never;
|
|
960
|
+
error: {
|
|
961
|
+
errors: {
|
|
962
|
+
detail: string;
|
|
963
|
+
status: "401" | "400" | "422";
|
|
964
|
+
}[];
|
|
965
|
+
status: "401" | "400" | "422";
|
|
966
|
+
};
|
|
967
|
+
response: Response;
|
|
968
|
+
aborted: false;
|
|
969
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
970
|
+
data?: never;
|
|
971
|
+
error?: never;
|
|
972
|
+
response?: never;
|
|
973
|
+
aborted: true;
|
|
974
|
+
} : never) | {
|
|
975
|
+
data: {
|
|
976
|
+
id: string;
|
|
977
|
+
type?: "controlled_ground_area";
|
|
978
|
+
attributes: import("./volant-schema").components["schemas"]["ControlledGroundArea-Output"];
|
|
979
|
+
}[];
|
|
980
|
+
error?: never;
|
|
981
|
+
response: Response;
|
|
982
|
+
aborted: false;
|
|
983
|
+
}>;
|
|
984
|
+
/**
|
|
985
|
+
* Create a Controlled Ground Area
|
|
986
|
+
* @description Create a Controlled Ground Area from GeoJSON
|
|
987
|
+
*/
|
|
988
|
+
createControlledGroundArea<Opts extends requestOptions = {}>(args: bodyOf<createControlledGroundArea>, opts?: Opts | requestOptions): Promise<{
|
|
989
|
+
data?: never;
|
|
990
|
+
error: {
|
|
991
|
+
errors: {
|
|
992
|
+
detail: string;
|
|
993
|
+
status: "401" | "400" | "422";
|
|
994
|
+
}[];
|
|
995
|
+
status: "401" | "400" | "422";
|
|
996
|
+
};
|
|
997
|
+
response: Response;
|
|
998
|
+
aborted: false;
|
|
999
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1000
|
+
data?: never;
|
|
1001
|
+
error?: never;
|
|
1002
|
+
response?: never;
|
|
1003
|
+
aborted: true;
|
|
1004
|
+
} : never) | {
|
|
1005
|
+
data: {
|
|
1006
|
+
id: string;
|
|
1007
|
+
type?: "controlled_ground_area";
|
|
1008
|
+
attributes: import("./volant-schema").components["schemas"]["ControlledGroundArea-Output"];
|
|
1009
|
+
};
|
|
1010
|
+
error?: never;
|
|
1011
|
+
response: Response;
|
|
1012
|
+
aborted: false;
|
|
1013
|
+
}>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Get a Controlled Ground Area
|
|
1016
|
+
* @description Get a Controlled Ground Area
|
|
1017
|
+
*/
|
|
1018
|
+
getControlledGroundArea<Opts extends requestOptions = {}>(args: pathOf<getControlledGroundArea>, opts?: Opts | requestOptions): Promise<{
|
|
1019
|
+
data?: never;
|
|
1020
|
+
error: {
|
|
1021
|
+
errors: {
|
|
1022
|
+
detail: string;
|
|
1023
|
+
status: "401" | "400" | "422" | "404";
|
|
1024
|
+
}[];
|
|
1025
|
+
status: "401" | "400" | "422" | "404";
|
|
1026
|
+
};
|
|
1027
|
+
response: Response;
|
|
1028
|
+
aborted: false;
|
|
1029
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1030
|
+
data?: never;
|
|
1031
|
+
error?: never;
|
|
1032
|
+
response?: never;
|
|
1033
|
+
aborted: true;
|
|
1034
|
+
} : never) | {
|
|
1035
|
+
data: {
|
|
1036
|
+
id: string;
|
|
1037
|
+
type?: "controlled_ground_area";
|
|
1038
|
+
attributes: import("./volant-schema").components["schemas"]["ControlledGroundArea-Output"];
|
|
1039
|
+
};
|
|
1040
|
+
error?: never;
|
|
1041
|
+
response: Response;
|
|
1042
|
+
aborted: false;
|
|
1043
|
+
}>;
|
|
1044
|
+
/**
|
|
1045
|
+
* Update a Controlled Ground Area
|
|
1046
|
+
* @description Modify an existing Controlled Ground Area. This cannot be performed when it is referenced by a flightplan in state
|
|
1047
|
+
* `Accepted`.
|
|
1048
|
+
*/
|
|
1049
|
+
updateControlledGroundArea<Opts extends requestOptions = {}>(id: pathOf<updateControlledGroundArea>['controlled_ground_area_id'], args: bodyOf<updateControlledGroundArea>, opts?: Opts | requestOptions): Promise<{
|
|
1050
|
+
data?: never;
|
|
1051
|
+
error: {
|
|
1052
|
+
errors: {
|
|
1053
|
+
detail: string;
|
|
1054
|
+
status: "401" | "400" | "422" | "404";
|
|
1055
|
+
}[];
|
|
1056
|
+
status: "401" | "400" | "422" | "404";
|
|
1057
|
+
};
|
|
1058
|
+
response: Response;
|
|
1059
|
+
aborted: false;
|
|
1060
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1061
|
+
data?: never;
|
|
1062
|
+
error?: never;
|
|
1063
|
+
response?: never;
|
|
1064
|
+
aborted: true;
|
|
1065
|
+
} : never) | {
|
|
1066
|
+
data: {
|
|
1067
|
+
id: string;
|
|
1068
|
+
type?: "controlled_ground_area";
|
|
1069
|
+
attributes: import("./volant-schema").components["schemas"]["ControlledGroundArea-Output"];
|
|
1070
|
+
};
|
|
1071
|
+
error?: never;
|
|
1072
|
+
response: Response;
|
|
1073
|
+
aborted: false;
|
|
1074
|
+
}>;
|
|
1075
|
+
/**
|
|
1076
|
+
* Delete a Controlled Ground Area
|
|
1077
|
+
* @description Delete a Controlled Ground Area.
|
|
1078
|
+
*
|
|
1079
|
+
* A Controlled Ground Area cannot be deleted if it is referenced by a SORA Classification
|
|
1080
|
+
*/
|
|
1081
|
+
deleteControlledGroundArea<Opts extends requestOptions = {}>(args: pathOf<deleteControlledGroundArea>, opts?: Opts | requestOptions): Promise<{
|
|
1082
|
+
data?: never;
|
|
1083
|
+
error: {
|
|
1084
|
+
errors: {
|
|
1085
|
+
detail: string;
|
|
1086
|
+
status: "401" | "400" | "422" | "404";
|
|
1087
|
+
}[];
|
|
1088
|
+
status: "401" | "400" | "422" | "404";
|
|
1089
|
+
};
|
|
1090
|
+
response: Response;
|
|
1091
|
+
aborted: false;
|
|
1092
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1093
|
+
data?: never;
|
|
1094
|
+
error?: never;
|
|
1095
|
+
response?: never;
|
|
1096
|
+
aborted: true;
|
|
1097
|
+
} : never) | {
|
|
1098
|
+
data: boolean;
|
|
1099
|
+
error?: never;
|
|
1100
|
+
response: Response;
|
|
1101
|
+
aborted: false;
|
|
1102
|
+
}>;
|
|
1103
|
+
/**
|
|
1104
|
+
* List Controlled Ground Areas
|
|
1105
|
+
* @description Get a list of Atypical Airspaces, ordered by last time updated
|
|
1106
|
+
*/
|
|
1107
|
+
getAllAtypicalAirspaces<Opts extends requestOptions = {}>(args: queryOf<getAllAtypicalAirspaces>, opts?: Opts | requestOptions): Promise<{
|
|
1108
|
+
data?: never;
|
|
1109
|
+
error: {
|
|
1110
|
+
errors: {
|
|
1111
|
+
detail: string;
|
|
1112
|
+
status: "401" | "400" | "422";
|
|
1113
|
+
}[];
|
|
1114
|
+
status: "401" | "400" | "422";
|
|
1115
|
+
};
|
|
1116
|
+
response: Response;
|
|
1117
|
+
aborted: false;
|
|
1118
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1119
|
+
data?: never;
|
|
1120
|
+
error?: never;
|
|
1121
|
+
response?: never;
|
|
1122
|
+
aborted: true;
|
|
1123
|
+
} : never) | {
|
|
1124
|
+
data: {
|
|
1125
|
+
id: string;
|
|
1126
|
+
type?: "atypical_airspace";
|
|
1127
|
+
attributes: import("./volant-schema").components["schemas"]["AtypicalAirspace-Output"];
|
|
1128
|
+
}[];
|
|
1129
|
+
error?: never;
|
|
1130
|
+
response: Response;
|
|
1131
|
+
aborted: false;
|
|
1132
|
+
}>;
|
|
1133
|
+
/**
|
|
1134
|
+
* Create an Atypical Airspace
|
|
1135
|
+
* @description Create an Atypical Airspace
|
|
1136
|
+
*/
|
|
1137
|
+
createAtypicalAirspace<Opts extends requestOptions = {}>(args: bodyOf<createAtypicalAirspace>, opts?: Opts | requestOptions): Promise<{
|
|
1138
|
+
data?: never;
|
|
1139
|
+
error: {
|
|
1140
|
+
errors: {
|
|
1141
|
+
detail: string;
|
|
1142
|
+
status: "401" | "400" | "422";
|
|
1143
|
+
}[];
|
|
1144
|
+
status: "401" | "400" | "422";
|
|
1145
|
+
};
|
|
1146
|
+
response: Response;
|
|
1147
|
+
aborted: false;
|
|
1148
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1149
|
+
data?: never;
|
|
1150
|
+
error?: never;
|
|
1151
|
+
response?: never;
|
|
1152
|
+
aborted: true;
|
|
1153
|
+
} : never) | {
|
|
1154
|
+
data: {
|
|
1155
|
+
id: string;
|
|
1156
|
+
type?: "atypical_airspace";
|
|
1157
|
+
attributes: import("./volant-schema").components["schemas"]["AtypicalAirspace-Output"];
|
|
1158
|
+
};
|
|
1159
|
+
error?: never;
|
|
1160
|
+
response: Response;
|
|
1161
|
+
aborted: false;
|
|
1162
|
+
}>;
|
|
1163
|
+
/**
|
|
1164
|
+
* Get an Atypical Airspace
|
|
1165
|
+
* @description Get an Atypical Airspace
|
|
1166
|
+
*/
|
|
1167
|
+
getAtypicalAirspace<Opts extends requestOptions = {}>(args: pathOf<getAtypicalAirspace>, opts?: Opts | requestOptions): Promise<{
|
|
1168
|
+
data?: never;
|
|
1169
|
+
error: {
|
|
1170
|
+
errors: {
|
|
1171
|
+
detail: string;
|
|
1172
|
+
status: "401" | "400" | "422" | "404";
|
|
1173
|
+
}[];
|
|
1174
|
+
status: "401" | "400" | "422" | "404";
|
|
1175
|
+
};
|
|
1176
|
+
response: Response;
|
|
1177
|
+
aborted: false;
|
|
1178
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1179
|
+
data?: never;
|
|
1180
|
+
error?: never;
|
|
1181
|
+
response?: never;
|
|
1182
|
+
aborted: true;
|
|
1183
|
+
} : never) | {
|
|
1184
|
+
data: {
|
|
1185
|
+
id: string;
|
|
1186
|
+
type?: "atypical_airspace";
|
|
1187
|
+
attributes: import("./volant-schema").components["schemas"]["AtypicalAirspace-Output"];
|
|
1188
|
+
};
|
|
1189
|
+
error?: never;
|
|
1190
|
+
response: Response;
|
|
1191
|
+
aborted: false;
|
|
1192
|
+
}>;
|
|
1193
|
+
/**
|
|
1194
|
+
* Update an Atypical Airspace
|
|
1195
|
+
* @description Modify an existing Atypical Airspace. This cannot be performed when it is referenced by a flightplan in state
|
|
1196
|
+
* `Accepted`.
|
|
1197
|
+
*/
|
|
1198
|
+
updateAtypicalAirspace<Opts extends requestOptions = {}>(id: pathOf<updateAtypicalAirspace>['atypical_airspace_id'], args: bodyOf<updateAtypicalAirspace>, opts?: Opts | requestOptions): Promise<{
|
|
1199
|
+
data?: never;
|
|
1200
|
+
error: {
|
|
1201
|
+
errors: {
|
|
1202
|
+
detail: string;
|
|
1203
|
+
status: "401" | "400" | "422" | "404";
|
|
1204
|
+
}[];
|
|
1205
|
+
status: "401" | "400" | "422" | "404";
|
|
1206
|
+
};
|
|
1207
|
+
response: Response;
|
|
1208
|
+
aborted: false;
|
|
1209
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1210
|
+
data?: never;
|
|
1211
|
+
error?: never;
|
|
1212
|
+
response?: never;
|
|
1213
|
+
aborted: true;
|
|
1214
|
+
} : never) | {
|
|
1215
|
+
data: {
|
|
1216
|
+
id: string;
|
|
1217
|
+
type?: "atypical_airspace";
|
|
1218
|
+
attributes: import("./volant-schema").components["schemas"]["AtypicalAirspace-Output"];
|
|
1219
|
+
};
|
|
1220
|
+
error?: never;
|
|
1221
|
+
response: Response;
|
|
1222
|
+
aborted: false;
|
|
1223
|
+
}>;
|
|
1224
|
+
/**
|
|
1225
|
+
* Delete an Atypical Airspace
|
|
1226
|
+
* @description Delete an Atypical Airspace.
|
|
1227
|
+
*
|
|
1228
|
+
* A Atypical Airspace cannot be deleted if it is referenced by a SORA Classification
|
|
1229
|
+
*/
|
|
1230
|
+
deleteAtypicalAirspace<Opts extends requestOptions = {}>(args: pathOf<deleteAtypicalAirspace>, opts?: Opts | requestOptions): Promise<{
|
|
1231
|
+
data?: never;
|
|
1232
|
+
error: {
|
|
1233
|
+
errors: {
|
|
1234
|
+
detail: string;
|
|
1235
|
+
status: "401" | "400" | "422" | "404";
|
|
1236
|
+
}[];
|
|
1237
|
+
status: "401" | "400" | "422" | "404";
|
|
1238
|
+
};
|
|
1239
|
+
response: Response;
|
|
1240
|
+
aborted: false;
|
|
1241
|
+
} | (keyof Opts extends never ? never : Opts["abortKey"] extends undefined ? never : Opts["abortKey"] extends string | undefined ? {
|
|
1242
|
+
data?: never;
|
|
1243
|
+
error?: never;
|
|
1244
|
+
response?: never;
|
|
1245
|
+
aborted: true;
|
|
1246
|
+
} : never) | {
|
|
1247
|
+
data: boolean;
|
|
1248
|
+
error?: never;
|
|
1249
|
+
response: Response;
|
|
1250
|
+
aborted: false;
|
|
1251
|
+
}>;
|
|
937
1252
|
/**
|
|
938
1253
|
* Generate a raster pattern
|
|
939
1254
|
* @description Generate a raster pattern that covers a specified search polygon
|
package/dist/direct.js
CHANGED
|
@@ -236,7 +236,7 @@ class Direct {
|
|
|
236
236
|
return __awaiter(this, void 0, void 0, function* () {
|
|
237
237
|
const resp = yield this.fetcher.GET('/risk_assessment/sora/v2.5/air_risk_classifications', {}, opts);
|
|
238
238
|
if (resp.error === undefined && !resp.aborted) {
|
|
239
|
-
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
239
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((arc) => arc.data) });
|
|
240
240
|
}
|
|
241
241
|
return resp;
|
|
242
242
|
});
|
|
@@ -286,6 +286,102 @@ class Direct {
|
|
|
286
286
|
return resp;
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
|
+
/// controlled ground areas
|
|
290
|
+
getAllControlledGroundAreas(args, opts) {
|
|
291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
+
const resp = yield this.fetcher.GET('/risk_assessment/sora/controlled_ground_areas/', { query: args }, opts);
|
|
293
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
294
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((controlledGroundArea) => controlledGroundArea.data) });
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
return resp;
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
createControlledGroundArea(args, opts) {
|
|
302
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
303
|
+
const resp = yield this.fetcher.POST('/risk_assessment/sora/controlled_ground_areas/', { body: 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
|
+
getControlledGroundArea(args, opts) {
|
|
311
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
312
|
+
const resp = yield this.fetcher.GET('/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}', { path: args }, 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
|
+
updateControlledGroundArea(id, args, opts) {
|
|
320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
+
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);
|
|
322
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
323
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
324
|
+
}
|
|
325
|
+
return resp;
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
deleteControlledGroundArea(args, opts) {
|
|
329
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
330
|
+
const resp = yield this.fetcher.DELETE('/risk_assessment/sora/controlled_ground_areas/{controlled_ground_area_id}', { path: args }, opts);
|
|
331
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
332
|
+
return Object.assign(Object.assign({}, resp), { data: true });
|
|
333
|
+
}
|
|
334
|
+
return resp;
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
/// atypical airspaces
|
|
338
|
+
getAllAtypicalAirspaces(args, opts) {
|
|
339
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
340
|
+
const resp = yield this.fetcher.GET('/risk_assessment/sora/atypical_airspaces/', { query: args }, opts);
|
|
341
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
342
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data.map((atypicalAirspace) => atypicalAirspace.data) });
|
|
343
|
+
}
|
|
344
|
+
else {
|
|
345
|
+
return resp;
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
createAtypicalAirspace(args, opts) {
|
|
350
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
351
|
+
const resp = yield this.fetcher.POST('/risk_assessment/sora/atypical_airspaces/', { body: 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
|
+
getAtypicalAirspace(args, opts) {
|
|
359
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
360
|
+
const resp = yield this.fetcher.GET('/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}', { path: args }, 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
|
+
updateAtypicalAirspace(id, args, opts) {
|
|
368
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
369
|
+
const resp = yield this.fetcher.PUT('/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}', { body: args, path: { atypical_airspace_id: id } }, opts);
|
|
370
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
371
|
+
return Object.assign(Object.assign({}, resp), { data: resp.data.data });
|
|
372
|
+
}
|
|
373
|
+
return resp;
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
deleteAtypicalAirspace(args, opts) {
|
|
377
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
378
|
+
const resp = yield this.fetcher.DELETE('/risk_assessment/sora/atypical_airspaces/{atypical_airspace_id}', { path: args }, opts);
|
|
379
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
380
|
+
return Object.assign(Object.assign({}, resp), { data: true });
|
|
381
|
+
}
|
|
382
|
+
return resp;
|
|
383
|
+
});
|
|
384
|
+
}
|
|
289
385
|
/// flight patterns
|
|
290
386
|
createRasterPattern(args, opts) {
|
|
291
387
|
return __awaiter(this, void 0, void 0, function* () {
|
package/dist/types.d.ts
CHANGED
|
@@ -37,18 +37,18 @@ export type bodyOf<T> = T extends {
|
|
|
37
37
|
/** Gets the type of the query input for an endpoint */
|
|
38
38
|
export type queryOf<T> = T extends {
|
|
39
39
|
parameters: {
|
|
40
|
-
query
|
|
40
|
+
query?: infer P;
|
|
41
41
|
};
|
|
42
42
|
} ? P : never;
|
|
43
43
|
/** Gets the type of the path input for an endpoint */
|
|
44
44
|
export type pathOf<T> = T extends {
|
|
45
45
|
parameters: {
|
|
46
|
-
path
|
|
46
|
+
path?: infer P;
|
|
47
47
|
};
|
|
48
48
|
} ? P : never;
|
|
49
49
|
/** Gets the type of the header input for an endpoint */
|
|
50
50
|
export type headerOf<T> = T extends {
|
|
51
51
|
parameters: {
|
|
52
|
-
header
|
|
52
|
+
header?: infer P;
|
|
53
53
|
};
|
|
54
54
|
} ? P : never;
|