@volant-autonomy/via-sdk 1.6154.1 → 1.6173.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/dist/direct.d.ts +128 -0
- package/dist/index.cjs.js +40 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +40 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/volant-schema.d.ts +420 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -611,6 +611,45 @@ class Direct {
|
|
|
611
611
|
}
|
|
612
612
|
return resp;
|
|
613
613
|
}
|
|
614
|
+
// ground speed fields
|
|
615
|
+
async getGroundSpeedField(id, opts) {
|
|
616
|
+
const resp = await this.fetcher.GET('/ground_speed_fields/{ground_speed_field_id}', { path: { ground_speed_field_id: id } }, opts);
|
|
617
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
618
|
+
return { ...resp, data: resp.data.data };
|
|
619
|
+
}
|
|
620
|
+
return resp;
|
|
621
|
+
}
|
|
622
|
+
async getAllGroundSpeedFields(args, opts) {
|
|
623
|
+
const resp = await this.fetcher.GET('/ground_speed_fields/', { query: args }, opts);
|
|
624
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
625
|
+
return { ...resp, data: resp.data.data.map((x) => x.data) };
|
|
626
|
+
}
|
|
627
|
+
return resp;
|
|
628
|
+
}
|
|
629
|
+
async createGroundSpeedField(args, opts) {
|
|
630
|
+
const formData = new FormData();
|
|
631
|
+
formData.append('chart_id', args.chart_id);
|
|
632
|
+
formData.append('name', args.name);
|
|
633
|
+
formData.append('file', args.file);
|
|
634
|
+
const resp = await this.fetcher.POST('/ground_speed_fields/', { body: formData }, {
|
|
635
|
+
...opts,
|
|
636
|
+
// when sending a FormData object the browser will automatically
|
|
637
|
+
// set the Content-Type header to the correct value, if (and only if)
|
|
638
|
+
// you don't set it yourself
|
|
639
|
+
contentType: 'none'
|
|
640
|
+
});
|
|
641
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
642
|
+
return { ...resp, data: resp.data.data };
|
|
643
|
+
}
|
|
644
|
+
return resp;
|
|
645
|
+
}
|
|
646
|
+
async deleteGroundSpeedField(id, opts) {
|
|
647
|
+
const resp = await this.fetcher.DELETE('/ground_speed_fields/{ground_speed_field_id}', { path: { ground_speed_field_id: id } }, opts);
|
|
648
|
+
if (resp.error === undefined && !resp.aborted) {
|
|
649
|
+
return { ...resp, data: true };
|
|
650
|
+
}
|
|
651
|
+
return resp;
|
|
652
|
+
}
|
|
614
653
|
/// flight patterns
|
|
615
654
|
async createRasterPattern(args, opts) {
|
|
616
655
|
const resp = await this.fetcher.POST('/flight_patterns/raster', { body: args }, opts);
|
|
@@ -783,7 +822,7 @@ function defaultPathSerializer(pathname, pathParams) {
|
|
|
783
822
|
return nextURL;
|
|
784
823
|
}
|
|
785
824
|
|
|
786
|
-
var version = "1.
|
|
825
|
+
var version = "1.6173.1";
|
|
787
826
|
|
|
788
827
|
const querySerializer = createQuerySerializer();
|
|
789
828
|
class Fetcher {
|