@layer-drone/protocol 0.2.0 → 0.3.0
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/index.d.mts +221 -5
- package/dist/index.d.ts +221 -5
- package/dist/index.js +87 -0
- package/dist/index.mjs +83 -0
- package/package.json +1 -1
- package/src/client/sdk.gen.ts +109 -0
- package/src/client/transformers.gen.ts +45 -0
- package/src/client/types.gen.ts +252 -0
package/dist/index.js
CHANGED
|
@@ -39,6 +39,9 @@ __export(index_exports, {
|
|
|
39
39
|
createClient: () => createClient,
|
|
40
40
|
createConfig: () => createConfig,
|
|
41
41
|
dlqRedriverControllerRedriveDlq: () => dlqRedriverControllerRedriveDlq,
|
|
42
|
+
flightPlansControllerCreate: () => flightPlansControllerCreate,
|
|
43
|
+
flightPlansControllerGet: () => flightPlansControllerGet,
|
|
44
|
+
flightPlansControllerGetMany: () => flightPlansControllerGetMany,
|
|
42
45
|
flightsControllerCreatePresignedUrls: () => flightsControllerCreatePresignedUrls,
|
|
43
46
|
flightsControllerGenerateStorageKey: () => flightsControllerGenerateStorageKey,
|
|
44
47
|
flightsControllerGetFlight: () => flightsControllerGetFlight,
|
|
@@ -60,6 +63,7 @@ __export(index_exports, {
|
|
|
60
63
|
quotesControllerCreateQuote: () => quotesControllerCreateQuote,
|
|
61
64
|
quotesControllerGetQuote: () => quotesControllerGetQuote,
|
|
62
65
|
schemaControllerGetEventSchema: () => schemaControllerGetEventSchema,
|
|
66
|
+
schemaControllerGetFlightPlanSchema: () => schemaControllerGetFlightPlanSchema,
|
|
63
67
|
urlSearchParamsBodySerializer: () => urlSearchParamsBodySerializer,
|
|
64
68
|
vaultsControllerCreateVaults: () => vaultsControllerCreateVaults,
|
|
65
69
|
webhooksControllerCreate: () => webhooksControllerCreate,
|
|
@@ -803,6 +807,36 @@ var flightsControllerValidateFlightResponseTransformer = /* @__PURE__ */ __name(
|
|
|
803
807
|
data = validateFlightResponseDtoSchemaResponseTransformer(data);
|
|
804
808
|
return data;
|
|
805
809
|
}, "flightsControllerValidateFlightResponseTransformer");
|
|
810
|
+
var getFlightPlansResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
811
|
+
data.data = data.data.map((item) => {
|
|
812
|
+
item.created_at = new Date(item.created_at);
|
|
813
|
+
item.updated_at = new Date(item.updated_at);
|
|
814
|
+
return item;
|
|
815
|
+
});
|
|
816
|
+
return data;
|
|
817
|
+
}, "getFlightPlansResponseSchemaResponseTransformer");
|
|
818
|
+
var flightPlansControllerGetManyResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
819
|
+
data = getFlightPlansResponseSchemaResponseTransformer(data);
|
|
820
|
+
return data;
|
|
821
|
+
}, "flightPlansControllerGetManyResponseTransformer");
|
|
822
|
+
var createFlightPlanResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
823
|
+
data.created_at = new Date(data.created_at);
|
|
824
|
+
data.updated_at = new Date(data.updated_at);
|
|
825
|
+
return data;
|
|
826
|
+
}, "createFlightPlanResponseSchemaResponseTransformer");
|
|
827
|
+
var flightPlansControllerCreateResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
828
|
+
data = createFlightPlanResponseSchemaResponseTransformer(data);
|
|
829
|
+
return data;
|
|
830
|
+
}, "flightPlansControllerCreateResponseTransformer");
|
|
831
|
+
var getFlightPlanResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
832
|
+
data.created_at = new Date(data.created_at);
|
|
833
|
+
data.updated_at = new Date(data.updated_at);
|
|
834
|
+
return data;
|
|
835
|
+
}, "getFlightPlanResponseSchemaResponseTransformer");
|
|
836
|
+
var flightPlansControllerGetResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
837
|
+
data = getFlightPlanResponseSchemaResponseTransformer(data);
|
|
838
|
+
return data;
|
|
839
|
+
}, "flightPlansControllerGetResponseTransformer");
|
|
806
840
|
var createMissionResponseDtoSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
807
841
|
data.data.missions = data.data.missions.map((item) => {
|
|
808
842
|
item.captureStartTime = new Date(item.captureStartTime);
|
|
@@ -1074,6 +1108,49 @@ var flightsControllerValidateFlight = /* @__PURE__ */ __name((options) => {
|
|
|
1074
1108
|
}
|
|
1075
1109
|
});
|
|
1076
1110
|
}, "flightsControllerValidateFlight");
|
|
1111
|
+
var flightPlansControllerGetMany = /* @__PURE__ */ __name((options) => {
|
|
1112
|
+
return (options?.client ?? client).get({
|
|
1113
|
+
security: [
|
|
1114
|
+
{
|
|
1115
|
+
name: "x-api-token",
|
|
1116
|
+
type: "apiKey"
|
|
1117
|
+
}
|
|
1118
|
+
],
|
|
1119
|
+
responseTransformer: flightPlansControllerGetManyResponseTransformer,
|
|
1120
|
+
url: "/flight-plans",
|
|
1121
|
+
...options
|
|
1122
|
+
});
|
|
1123
|
+
}, "flightPlansControllerGetMany");
|
|
1124
|
+
var flightPlansControllerCreate = /* @__PURE__ */ __name((options) => {
|
|
1125
|
+
return (options.client ?? client).post({
|
|
1126
|
+
security: [
|
|
1127
|
+
{
|
|
1128
|
+
name: "x-api-token",
|
|
1129
|
+
type: "apiKey"
|
|
1130
|
+
}
|
|
1131
|
+
],
|
|
1132
|
+
responseTransformer: flightPlansControllerCreateResponseTransformer,
|
|
1133
|
+
url: "/flight-plans",
|
|
1134
|
+
...options,
|
|
1135
|
+
headers: {
|
|
1136
|
+
"Content-Type": "application/json",
|
|
1137
|
+
...options.headers
|
|
1138
|
+
}
|
|
1139
|
+
});
|
|
1140
|
+
}, "flightPlansControllerCreate");
|
|
1141
|
+
var flightPlansControllerGet = /* @__PURE__ */ __name((options) => {
|
|
1142
|
+
return (options.client ?? client).get({
|
|
1143
|
+
security: [
|
|
1144
|
+
{
|
|
1145
|
+
name: "x-api-token",
|
|
1146
|
+
type: "apiKey"
|
|
1147
|
+
}
|
|
1148
|
+
],
|
|
1149
|
+
responseTransformer: flightPlansControllerGetResponseTransformer,
|
|
1150
|
+
url: "/flight-plans/{id}",
|
|
1151
|
+
...options
|
|
1152
|
+
});
|
|
1153
|
+
}, "flightPlansControllerGet");
|
|
1077
1154
|
var keysControllerGetProvenanceCryptoKey = /* @__PURE__ */ __name((options) => {
|
|
1078
1155
|
return (options?.client ?? client).get({
|
|
1079
1156
|
url: "/keys",
|
|
@@ -1179,6 +1256,12 @@ var schemaControllerGetEventSchema = /* @__PURE__ */ __name((options) => {
|
|
|
1179
1256
|
...options
|
|
1180
1257
|
});
|
|
1181
1258
|
}, "schemaControllerGetEventSchema");
|
|
1259
|
+
var schemaControllerGetFlightPlanSchema = /* @__PURE__ */ __name((options) => {
|
|
1260
|
+
return (options?.client ?? client).get({
|
|
1261
|
+
url: "/schema/flight-plan",
|
|
1262
|
+
...options
|
|
1263
|
+
});
|
|
1264
|
+
}, "schemaControllerGetFlightPlanSchema");
|
|
1182
1265
|
var vaultsControllerCreateVaults = /* @__PURE__ */ __name((options) => {
|
|
1183
1266
|
return (options.client ?? client).post({
|
|
1184
1267
|
security: [
|
|
@@ -1558,6 +1641,9 @@ __name(getSecretHeader, "getSecretHeader");
|
|
|
1558
1641
|
createClient,
|
|
1559
1642
|
createConfig,
|
|
1560
1643
|
dlqRedriverControllerRedriveDlq,
|
|
1644
|
+
flightPlansControllerCreate,
|
|
1645
|
+
flightPlansControllerGet,
|
|
1646
|
+
flightPlansControllerGetMany,
|
|
1561
1647
|
flightsControllerCreatePresignedUrls,
|
|
1562
1648
|
flightsControllerGenerateStorageKey,
|
|
1563
1649
|
flightsControllerGetFlight,
|
|
@@ -1579,6 +1665,7 @@ __name(getSecretHeader, "getSecretHeader");
|
|
|
1579
1665
|
quotesControllerCreateQuote,
|
|
1580
1666
|
quotesControllerGetQuote,
|
|
1581
1667
|
schemaControllerGetEventSchema,
|
|
1668
|
+
schemaControllerGetFlightPlanSchema,
|
|
1582
1669
|
urlSearchParamsBodySerializer,
|
|
1583
1670
|
vaultsControllerCreateVaults,
|
|
1584
1671
|
webhooksControllerCreate,
|
package/dist/index.mjs
CHANGED
|
@@ -731,6 +731,36 @@ var flightsControllerValidateFlightResponseTransformer = /* @__PURE__ */ __name(
|
|
|
731
731
|
data = validateFlightResponseDtoSchemaResponseTransformer(data);
|
|
732
732
|
return data;
|
|
733
733
|
}, "flightsControllerValidateFlightResponseTransformer");
|
|
734
|
+
var getFlightPlansResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
735
|
+
data.data = data.data.map((item) => {
|
|
736
|
+
item.created_at = new Date(item.created_at);
|
|
737
|
+
item.updated_at = new Date(item.updated_at);
|
|
738
|
+
return item;
|
|
739
|
+
});
|
|
740
|
+
return data;
|
|
741
|
+
}, "getFlightPlansResponseSchemaResponseTransformer");
|
|
742
|
+
var flightPlansControllerGetManyResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
743
|
+
data = getFlightPlansResponseSchemaResponseTransformer(data);
|
|
744
|
+
return data;
|
|
745
|
+
}, "flightPlansControllerGetManyResponseTransformer");
|
|
746
|
+
var createFlightPlanResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
747
|
+
data.created_at = new Date(data.created_at);
|
|
748
|
+
data.updated_at = new Date(data.updated_at);
|
|
749
|
+
return data;
|
|
750
|
+
}, "createFlightPlanResponseSchemaResponseTransformer");
|
|
751
|
+
var flightPlansControllerCreateResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
752
|
+
data = createFlightPlanResponseSchemaResponseTransformer(data);
|
|
753
|
+
return data;
|
|
754
|
+
}, "flightPlansControllerCreateResponseTransformer");
|
|
755
|
+
var getFlightPlanResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
756
|
+
data.created_at = new Date(data.created_at);
|
|
757
|
+
data.updated_at = new Date(data.updated_at);
|
|
758
|
+
return data;
|
|
759
|
+
}, "getFlightPlanResponseSchemaResponseTransformer");
|
|
760
|
+
var flightPlansControllerGetResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
761
|
+
data = getFlightPlanResponseSchemaResponseTransformer(data);
|
|
762
|
+
return data;
|
|
763
|
+
}, "flightPlansControllerGetResponseTransformer");
|
|
734
764
|
var createMissionResponseDtoSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
735
765
|
data.data.missions = data.data.missions.map((item) => {
|
|
736
766
|
item.captureStartTime = new Date(item.captureStartTime);
|
|
@@ -1002,6 +1032,49 @@ var flightsControllerValidateFlight = /* @__PURE__ */ __name((options) => {
|
|
|
1002
1032
|
}
|
|
1003
1033
|
});
|
|
1004
1034
|
}, "flightsControllerValidateFlight");
|
|
1035
|
+
var flightPlansControllerGetMany = /* @__PURE__ */ __name((options) => {
|
|
1036
|
+
return (options?.client ?? client).get({
|
|
1037
|
+
security: [
|
|
1038
|
+
{
|
|
1039
|
+
name: "x-api-token",
|
|
1040
|
+
type: "apiKey"
|
|
1041
|
+
}
|
|
1042
|
+
],
|
|
1043
|
+
responseTransformer: flightPlansControllerGetManyResponseTransformer,
|
|
1044
|
+
url: "/flight-plans",
|
|
1045
|
+
...options
|
|
1046
|
+
});
|
|
1047
|
+
}, "flightPlansControllerGetMany");
|
|
1048
|
+
var flightPlansControllerCreate = /* @__PURE__ */ __name((options) => {
|
|
1049
|
+
return (options.client ?? client).post({
|
|
1050
|
+
security: [
|
|
1051
|
+
{
|
|
1052
|
+
name: "x-api-token",
|
|
1053
|
+
type: "apiKey"
|
|
1054
|
+
}
|
|
1055
|
+
],
|
|
1056
|
+
responseTransformer: flightPlansControllerCreateResponseTransformer,
|
|
1057
|
+
url: "/flight-plans",
|
|
1058
|
+
...options,
|
|
1059
|
+
headers: {
|
|
1060
|
+
"Content-Type": "application/json",
|
|
1061
|
+
...options.headers
|
|
1062
|
+
}
|
|
1063
|
+
});
|
|
1064
|
+
}, "flightPlansControllerCreate");
|
|
1065
|
+
var flightPlansControllerGet = /* @__PURE__ */ __name((options) => {
|
|
1066
|
+
return (options.client ?? client).get({
|
|
1067
|
+
security: [
|
|
1068
|
+
{
|
|
1069
|
+
name: "x-api-token",
|
|
1070
|
+
type: "apiKey"
|
|
1071
|
+
}
|
|
1072
|
+
],
|
|
1073
|
+
responseTransformer: flightPlansControllerGetResponseTransformer,
|
|
1074
|
+
url: "/flight-plans/{id}",
|
|
1075
|
+
...options
|
|
1076
|
+
});
|
|
1077
|
+
}, "flightPlansControllerGet");
|
|
1005
1078
|
var keysControllerGetProvenanceCryptoKey = /* @__PURE__ */ __name((options) => {
|
|
1006
1079
|
return (options?.client ?? client).get({
|
|
1007
1080
|
url: "/keys",
|
|
@@ -1107,6 +1180,12 @@ var schemaControllerGetEventSchema = /* @__PURE__ */ __name((options) => {
|
|
|
1107
1180
|
...options
|
|
1108
1181
|
});
|
|
1109
1182
|
}, "schemaControllerGetEventSchema");
|
|
1183
|
+
var schemaControllerGetFlightPlanSchema = /* @__PURE__ */ __name((options) => {
|
|
1184
|
+
return (options?.client ?? client).get({
|
|
1185
|
+
url: "/schema/flight-plan",
|
|
1186
|
+
...options
|
|
1187
|
+
});
|
|
1188
|
+
}, "schemaControllerGetFlightPlanSchema");
|
|
1110
1189
|
var vaultsControllerCreateVaults = /* @__PURE__ */ __name((options) => {
|
|
1111
1190
|
return (options.client ?? client).post({
|
|
1112
1191
|
security: [
|
|
@@ -1485,6 +1564,9 @@ export {
|
|
|
1485
1564
|
createClient,
|
|
1486
1565
|
createConfig,
|
|
1487
1566
|
dlqRedriverControllerRedriveDlq,
|
|
1567
|
+
flightPlansControllerCreate,
|
|
1568
|
+
flightPlansControllerGet,
|
|
1569
|
+
flightPlansControllerGetMany,
|
|
1488
1570
|
flightsControllerCreatePresignedUrls,
|
|
1489
1571
|
flightsControllerGenerateStorageKey,
|
|
1490
1572
|
flightsControllerGetFlight,
|
|
@@ -1506,6 +1588,7 @@ export {
|
|
|
1506
1588
|
quotesControllerCreateQuote,
|
|
1507
1589
|
quotesControllerGetQuote,
|
|
1508
1590
|
schemaControllerGetEventSchema,
|
|
1591
|
+
schemaControllerGetFlightPlanSchema,
|
|
1509
1592
|
urlSearchParamsBodySerializer,
|
|
1510
1593
|
vaultsControllerCreateVaults,
|
|
1511
1594
|
webhooksControllerCreate,
|
package/package.json
CHANGED
package/src/client/sdk.gen.ts
CHANGED
|
@@ -9,6 +9,9 @@ import {
|
|
|
9
9
|
apiTokenControllerUpdateTokenResponseTransformer,
|
|
10
10
|
conditionsControllerGetSunAltitudeTimeLimitsResponseTransformer,
|
|
11
11
|
contractsControllerGetAllContractsResponseTransformer,
|
|
12
|
+
flightPlansControllerCreateResponseTransformer,
|
|
13
|
+
flightPlansControllerGetManyResponseTransformer,
|
|
14
|
+
flightPlansControllerGetResponseTransformer,
|
|
12
15
|
flightsControllerValidateFlightResponseTransformer,
|
|
13
16
|
inboundWebhookConfigsControllerCreateResponseTransformer,
|
|
14
17
|
inboundWebhookConfigsControllerGetManyResponseTransformer,
|
|
@@ -55,6 +58,15 @@ import type {
|
|
|
55
58
|
DlqRedriverControllerRedriveDlqData,
|
|
56
59
|
DlqRedriverControllerRedriveDlqErrors,
|
|
57
60
|
DlqRedriverControllerRedriveDlqResponses,
|
|
61
|
+
FlightPlansControllerCreateData,
|
|
62
|
+
FlightPlansControllerCreateErrors,
|
|
63
|
+
FlightPlansControllerCreateResponses,
|
|
64
|
+
FlightPlansControllerGetData,
|
|
65
|
+
FlightPlansControllerGetErrors,
|
|
66
|
+
FlightPlansControllerGetManyData,
|
|
67
|
+
FlightPlansControllerGetManyErrors,
|
|
68
|
+
FlightPlansControllerGetManyResponses,
|
|
69
|
+
FlightPlansControllerGetResponses,
|
|
58
70
|
FlightsControllerCreatePresignedUrlsData,
|
|
59
71
|
FlightsControllerCreatePresignedUrlsErrors,
|
|
60
72
|
FlightsControllerCreatePresignedUrlsResponses,
|
|
@@ -104,6 +116,8 @@ import type {
|
|
|
104
116
|
QuotesControllerGetQuoteResponses,
|
|
105
117
|
SchemaControllerGetEventSchemaData,
|
|
106
118
|
SchemaControllerGetEventSchemaResponses,
|
|
119
|
+
SchemaControllerGetFlightPlanSchemaData,
|
|
120
|
+
SchemaControllerGetFlightPlanSchemaResponses,
|
|
107
121
|
VaultsControllerCreateVaultsData,
|
|
108
122
|
VaultsControllerCreateVaultsErrors,
|
|
109
123
|
VaultsControllerCreateVaultsResponses,
|
|
@@ -545,6 +559,86 @@ export const flightsControllerValidateFlight = <
|
|
|
545
559
|
});
|
|
546
560
|
};
|
|
547
561
|
|
|
562
|
+
/**
|
|
563
|
+
* Get all flight plans
|
|
564
|
+
* Returns all available flight plan templates. These define capture patterns (map, panorama) that can be used for drone missions.
|
|
565
|
+
*/
|
|
566
|
+
export const flightPlansControllerGetMany = <
|
|
567
|
+
ThrowOnError extends boolean = false,
|
|
568
|
+
>(
|
|
569
|
+
options?: Options<FlightPlansControllerGetManyData, ThrowOnError>,
|
|
570
|
+
) => {
|
|
571
|
+
return (options?.client ?? _heyApiClient).get<
|
|
572
|
+
FlightPlansControllerGetManyResponses,
|
|
573
|
+
FlightPlansControllerGetManyErrors,
|
|
574
|
+
ThrowOnError
|
|
575
|
+
>({
|
|
576
|
+
security: [
|
|
577
|
+
{
|
|
578
|
+
name: "x-api-token",
|
|
579
|
+
type: "apiKey",
|
|
580
|
+
},
|
|
581
|
+
],
|
|
582
|
+
responseTransformer: flightPlansControllerGetManyResponseTransformer,
|
|
583
|
+
url: "/flight-plans",
|
|
584
|
+
...options,
|
|
585
|
+
});
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Create a new flight plan
|
|
590
|
+
* Creates a new flight plan template with sections and connection strategy.
|
|
591
|
+
*/
|
|
592
|
+
export const flightPlansControllerCreate = <
|
|
593
|
+
ThrowOnError extends boolean = false,
|
|
594
|
+
>(
|
|
595
|
+
options: Options<FlightPlansControllerCreateData, ThrowOnError>,
|
|
596
|
+
) => {
|
|
597
|
+
return (options.client ?? _heyApiClient).post<
|
|
598
|
+
FlightPlansControllerCreateResponses,
|
|
599
|
+
FlightPlansControllerCreateErrors,
|
|
600
|
+
ThrowOnError
|
|
601
|
+
>({
|
|
602
|
+
security: [
|
|
603
|
+
{
|
|
604
|
+
name: "x-api-token",
|
|
605
|
+
type: "apiKey",
|
|
606
|
+
},
|
|
607
|
+
],
|
|
608
|
+
responseTransformer: flightPlansControllerCreateResponseTransformer,
|
|
609
|
+
url: "/flight-plans",
|
|
610
|
+
...options,
|
|
611
|
+
headers: {
|
|
612
|
+
"Content-Type": "application/json",
|
|
613
|
+
...options.headers,
|
|
614
|
+
},
|
|
615
|
+
});
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Get a flight plan by ID
|
|
620
|
+
* Returns a single flight plan template by its ID.
|
|
621
|
+
*/
|
|
622
|
+
export const flightPlansControllerGet = <ThrowOnError extends boolean = false>(
|
|
623
|
+
options: Options<FlightPlansControllerGetData, ThrowOnError>,
|
|
624
|
+
) => {
|
|
625
|
+
return (options.client ?? _heyApiClient).get<
|
|
626
|
+
FlightPlansControllerGetResponses,
|
|
627
|
+
FlightPlansControllerGetErrors,
|
|
628
|
+
ThrowOnError
|
|
629
|
+
>({
|
|
630
|
+
security: [
|
|
631
|
+
{
|
|
632
|
+
name: "x-api-token",
|
|
633
|
+
type: "apiKey",
|
|
634
|
+
},
|
|
635
|
+
],
|
|
636
|
+
responseTransformer: flightPlansControllerGetResponseTransformer,
|
|
637
|
+
url: "/flight-plans/{id}",
|
|
638
|
+
...options,
|
|
639
|
+
});
|
|
640
|
+
};
|
|
641
|
+
|
|
548
642
|
export const keysControllerGetProvenanceCryptoKey = <
|
|
549
643
|
ThrowOnError extends boolean = false,
|
|
550
644
|
>(
|
|
@@ -736,6 +830,21 @@ export const schemaControllerGetEventSchema = <
|
|
|
736
830
|
});
|
|
737
831
|
};
|
|
738
832
|
|
|
833
|
+
export const schemaControllerGetFlightPlanSchema = <
|
|
834
|
+
ThrowOnError extends boolean = false,
|
|
835
|
+
>(
|
|
836
|
+
options?: Options<SchemaControllerGetFlightPlanSchemaData, ThrowOnError>,
|
|
837
|
+
) => {
|
|
838
|
+
return (options?.client ?? _heyApiClient).get<
|
|
839
|
+
SchemaControllerGetFlightPlanSchemaResponses,
|
|
840
|
+
unknown,
|
|
841
|
+
ThrowOnError
|
|
842
|
+
>({
|
|
843
|
+
url: "/schema/flight-plan",
|
|
844
|
+
...options,
|
|
845
|
+
});
|
|
846
|
+
};
|
|
847
|
+
|
|
739
848
|
/**
|
|
740
849
|
* Create new vault requests
|
|
741
850
|
* Create vault requests and publish to the internal.vault.requested queue.
|
|
@@ -3,6 +3,9 @@ import type {
|
|
|
3
3
|
ApiTokenControllerUpdateTokenResponse,
|
|
4
4
|
ConditionsControllerGetSunAltitudeTimeLimitsResponse,
|
|
5
5
|
ContractsControllerGetAllContractsResponse,
|
|
6
|
+
FlightPlansControllerCreateResponse,
|
|
7
|
+
FlightPlansControllerGetManyResponse,
|
|
8
|
+
FlightPlansControllerGetResponse,
|
|
6
9
|
FlightsControllerValidateFlightResponse,
|
|
7
10
|
InboundWebhookConfigsControllerCreateResponse,
|
|
8
11
|
InboundWebhookConfigsControllerGetManyResponse,
|
|
@@ -75,6 +78,48 @@ export const flightsControllerValidateFlightResponseTransformer = async (
|
|
|
75
78
|
return data;
|
|
76
79
|
};
|
|
77
80
|
|
|
81
|
+
const getFlightPlansResponseSchemaResponseTransformer = (data: any) => {
|
|
82
|
+
data.data = data.data.map((item: any) => {
|
|
83
|
+
item.created_at = new Date(item.created_at);
|
|
84
|
+
item.updated_at = new Date(item.updated_at);
|
|
85
|
+
return item;
|
|
86
|
+
});
|
|
87
|
+
return data;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const flightPlansControllerGetManyResponseTransformer = async (
|
|
91
|
+
data: any,
|
|
92
|
+
): Promise<FlightPlansControllerGetManyResponse> => {
|
|
93
|
+
data = getFlightPlansResponseSchemaResponseTransformer(data);
|
|
94
|
+
return data;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const createFlightPlanResponseSchemaResponseTransformer = (data: any) => {
|
|
98
|
+
data.created_at = new Date(data.created_at);
|
|
99
|
+
data.updated_at = new Date(data.updated_at);
|
|
100
|
+
return data;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const flightPlansControllerCreateResponseTransformer = async (
|
|
104
|
+
data: any,
|
|
105
|
+
): Promise<FlightPlansControllerCreateResponse> => {
|
|
106
|
+
data = createFlightPlanResponseSchemaResponseTransformer(data);
|
|
107
|
+
return data;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const getFlightPlanResponseSchemaResponseTransformer = (data: any) => {
|
|
111
|
+
data.created_at = new Date(data.created_at);
|
|
112
|
+
data.updated_at = new Date(data.updated_at);
|
|
113
|
+
return data;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const flightPlansControllerGetResponseTransformer = async (
|
|
117
|
+
data: any,
|
|
118
|
+
): Promise<FlightPlansControllerGetResponse> => {
|
|
119
|
+
data = getFlightPlanResponseSchemaResponseTransformer(data);
|
|
120
|
+
return data;
|
|
121
|
+
};
|
|
122
|
+
|
|
78
123
|
const createMissionResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
79
124
|
data.data.missions = data.data.missions.map((item: any) => {
|
|
80
125
|
item.captureStartTime = new Date(item.captureStartTime);
|