@layer-drone/protocol 0.3.0 → 0.6.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 +336 -18
- package/dist/index.d.ts +336 -18
- package/dist/index.js +300 -19
- package/dist/index.mjs +287 -17
- package/package.json +1 -1
- package/src/client/client/types.ts +4 -5
- package/src/client/core/pathSerializer.ts +1 -2
- package/src/client/sdk.gen.ts +290 -17
- package/src/client/transformers.gen.ts +165 -0
- package/src/client/types.gen.ts +438 -16
- package/src/event/parser.ts +62 -10
package/src/client/sdk.gen.ts
CHANGED
|
@@ -12,12 +12,23 @@ import {
|
|
|
12
12
|
flightPlansControllerCreateResponseTransformer,
|
|
13
13
|
flightPlansControllerGetManyResponseTransformer,
|
|
14
14
|
flightPlansControllerGetResponseTransformer,
|
|
15
|
+
flightReviewsControllerGetFlightReviewResponseTransformer,
|
|
16
|
+
flightReviewsControllerGetFlightReviewsResponseTransformer,
|
|
17
|
+
flightsControllerGetFlightResponseTransformer,
|
|
15
18
|
flightsControllerValidateFlightResponseTransformer,
|
|
16
19
|
inboundWebhookConfigsControllerCreateResponseTransformer,
|
|
17
20
|
inboundWebhookConfigsControllerGetManyResponseTransformer,
|
|
18
21
|
inboundWebhookConfigsControllerGetResponseTransformer,
|
|
19
22
|
inboundWebhookConfigsControllerUpdateResponseTransformer,
|
|
20
23
|
missionsControllerCreateMissionsResponseTransformer,
|
|
24
|
+
missionsControllerGetMissionResponseTransformer,
|
|
25
|
+
missionsControllerGetMissionsResponseTransformer,
|
|
26
|
+
webhooksControllerGetManyResponseTransformer,
|
|
27
|
+
webhooksControllerGetResponseTransformer,
|
|
28
|
+
webhooksControllerRegenerateSecretResponseTransformer,
|
|
29
|
+
webhooksControllerUpdateResponseTransformer,
|
|
30
|
+
zonesControllerCreateZoneResponseTransformer,
|
|
31
|
+
zonesControllerUpdateZoneResponseTransformer,
|
|
21
32
|
} from "./transformers.gen.js";
|
|
22
33
|
import type {
|
|
23
34
|
AlchemyControllerHandleWebhookData,
|
|
@@ -58,6 +69,12 @@ import type {
|
|
|
58
69
|
DlqRedriverControllerRedriveDlqData,
|
|
59
70
|
DlqRedriverControllerRedriveDlqErrors,
|
|
60
71
|
DlqRedriverControllerRedriveDlqResponses,
|
|
72
|
+
EventProcessorFlightReviewsSyncControllerResyncFlightReviewsData,
|
|
73
|
+
EventProcessorFlightReviewsSyncControllerResyncFlightReviewsErrors,
|
|
74
|
+
EventProcessorFlightReviewsSyncControllerResyncFlightReviewsResponses,
|
|
75
|
+
EventProcessorMissionsSyncControllerResyncMissionsData,
|
|
76
|
+
EventProcessorMissionsSyncControllerResyncMissionsErrors,
|
|
77
|
+
EventProcessorMissionsSyncControllerResyncMissionsResponses,
|
|
61
78
|
FlightPlansControllerCreateData,
|
|
62
79
|
FlightPlansControllerCreateErrors,
|
|
63
80
|
FlightPlansControllerCreateResponses,
|
|
@@ -67,6 +84,12 @@ import type {
|
|
|
67
84
|
FlightPlansControllerGetManyErrors,
|
|
68
85
|
FlightPlansControllerGetManyResponses,
|
|
69
86
|
FlightPlansControllerGetResponses,
|
|
87
|
+
FlightReviewsControllerGetFlightReviewData,
|
|
88
|
+
FlightReviewsControllerGetFlightReviewErrors,
|
|
89
|
+
FlightReviewsControllerGetFlightReviewResponses,
|
|
90
|
+
FlightReviewsControllerGetFlightReviewsData,
|
|
91
|
+
FlightReviewsControllerGetFlightReviewsErrors,
|
|
92
|
+
FlightReviewsControllerGetFlightReviewsResponses,
|
|
70
93
|
FlightsControllerCreatePresignedUrlsData,
|
|
71
94
|
FlightsControllerCreatePresignedUrlsErrors,
|
|
72
95
|
FlightsControllerCreatePresignedUrlsResponses,
|
|
@@ -102,6 +125,12 @@ import type {
|
|
|
102
125
|
MissionsControllerCreateMissionsData,
|
|
103
126
|
MissionsControllerCreateMissionsErrors,
|
|
104
127
|
MissionsControllerCreateMissionsResponses,
|
|
128
|
+
MissionsControllerGetMissionData,
|
|
129
|
+
MissionsControllerGetMissionErrors,
|
|
130
|
+
MissionsControllerGetMissionResponses,
|
|
131
|
+
MissionsControllerGetMissionsData,
|
|
132
|
+
MissionsControllerGetMissionsErrors,
|
|
133
|
+
MissionsControllerGetMissionsResponses,
|
|
105
134
|
MissionsControllerRepriceMissionsData,
|
|
106
135
|
MissionsControllerRepriceMissionsErrors,
|
|
107
136
|
MissionsControllerRepriceMissionsResponses,
|
|
@@ -116,8 +145,6 @@ import type {
|
|
|
116
145
|
QuotesControllerGetQuoteResponses,
|
|
117
146
|
SchemaControllerGetEventSchemaData,
|
|
118
147
|
SchemaControllerGetEventSchemaResponses,
|
|
119
|
-
SchemaControllerGetFlightPlanSchemaData,
|
|
120
|
-
SchemaControllerGetFlightPlanSchemaResponses,
|
|
121
148
|
VaultsControllerCreateVaultsData,
|
|
122
149
|
VaultsControllerCreateVaultsErrors,
|
|
123
150
|
VaultsControllerCreateVaultsResponses,
|
|
@@ -145,6 +172,15 @@ import type {
|
|
|
145
172
|
WebhooksControllerUpdateData,
|
|
146
173
|
WebhooksControllerUpdateErrors,
|
|
147
174
|
WebhooksControllerUpdateResponses,
|
|
175
|
+
ZonesControllerCreateZoneData,
|
|
176
|
+
ZonesControllerCreateZoneErrors,
|
|
177
|
+
ZonesControllerCreateZoneResponses,
|
|
178
|
+
ZonesControllerDeleteZoneData,
|
|
179
|
+
ZonesControllerDeleteZoneErrors,
|
|
180
|
+
ZonesControllerDeleteZoneResponses,
|
|
181
|
+
ZonesControllerUpdateZoneData,
|
|
182
|
+
ZonesControllerUpdateZoneErrors,
|
|
183
|
+
ZonesControllerUpdateZoneResponses,
|
|
148
184
|
} from "./types.gen.js";
|
|
149
185
|
|
|
150
186
|
export type Options<
|
|
@@ -503,6 +539,7 @@ export const flightsControllerGetFlight = <
|
|
|
503
539
|
type: "apiKey",
|
|
504
540
|
},
|
|
505
541
|
],
|
|
542
|
+
responseTransformer: flightsControllerGetFlightResponseTransformer,
|
|
506
543
|
url: "/flights/{flightId}",
|
|
507
544
|
...options,
|
|
508
545
|
});
|
|
@@ -639,6 +676,58 @@ export const flightPlansControllerGet = <ThrowOnError extends boolean = false>(
|
|
|
639
676
|
});
|
|
640
677
|
};
|
|
641
678
|
|
|
679
|
+
/**
|
|
680
|
+
* Get a flight review by ID
|
|
681
|
+
*/
|
|
682
|
+
export const flightReviewsControllerGetFlightReview = <
|
|
683
|
+
ThrowOnError extends boolean = false,
|
|
684
|
+
>(
|
|
685
|
+
options: Options<FlightReviewsControllerGetFlightReviewData, ThrowOnError>,
|
|
686
|
+
) => {
|
|
687
|
+
return (options.client ?? _heyApiClient).get<
|
|
688
|
+
FlightReviewsControllerGetFlightReviewResponses,
|
|
689
|
+
FlightReviewsControllerGetFlightReviewErrors,
|
|
690
|
+
ThrowOnError
|
|
691
|
+
>({
|
|
692
|
+
security: [
|
|
693
|
+
{
|
|
694
|
+
name: "x-api-token",
|
|
695
|
+
type: "apiKey",
|
|
696
|
+
},
|
|
697
|
+
],
|
|
698
|
+
responseTransformer:
|
|
699
|
+
flightReviewsControllerGetFlightReviewResponseTransformer,
|
|
700
|
+
url: "/flight-reviews/{id}",
|
|
701
|
+
...options,
|
|
702
|
+
});
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Get flight reviews by updated_at time range
|
|
707
|
+
*/
|
|
708
|
+
export const flightReviewsControllerGetFlightReviews = <
|
|
709
|
+
ThrowOnError extends boolean = false,
|
|
710
|
+
>(
|
|
711
|
+
options: Options<FlightReviewsControllerGetFlightReviewsData, ThrowOnError>,
|
|
712
|
+
) => {
|
|
713
|
+
return (options.client ?? _heyApiClient).get<
|
|
714
|
+
FlightReviewsControllerGetFlightReviewsResponses,
|
|
715
|
+
FlightReviewsControllerGetFlightReviewsErrors,
|
|
716
|
+
ThrowOnError
|
|
717
|
+
>({
|
|
718
|
+
security: [
|
|
719
|
+
{
|
|
720
|
+
name: "x-api-token",
|
|
721
|
+
type: "apiKey",
|
|
722
|
+
},
|
|
723
|
+
],
|
|
724
|
+
responseTransformer:
|
|
725
|
+
flightReviewsControllerGetFlightReviewsResponseTransformer,
|
|
726
|
+
url: "/flight-reviews",
|
|
727
|
+
...options,
|
|
728
|
+
});
|
|
729
|
+
};
|
|
730
|
+
|
|
642
731
|
export const keysControllerGetProvenanceCryptoKey = <
|
|
643
732
|
ThrowOnError extends boolean = false,
|
|
644
733
|
>(
|
|
@@ -654,6 +743,57 @@ export const keysControllerGetProvenanceCryptoKey = <
|
|
|
654
743
|
});
|
|
655
744
|
};
|
|
656
745
|
|
|
746
|
+
/**
|
|
747
|
+
* Get a mission by ID
|
|
748
|
+
*/
|
|
749
|
+
export const missionsControllerGetMission = <
|
|
750
|
+
ThrowOnError extends boolean = false,
|
|
751
|
+
>(
|
|
752
|
+
options: Options<MissionsControllerGetMissionData, ThrowOnError>,
|
|
753
|
+
) => {
|
|
754
|
+
return (options.client ?? _heyApiClient).get<
|
|
755
|
+
MissionsControllerGetMissionResponses,
|
|
756
|
+
MissionsControllerGetMissionErrors,
|
|
757
|
+
ThrowOnError
|
|
758
|
+
>({
|
|
759
|
+
security: [
|
|
760
|
+
{
|
|
761
|
+
name: "x-api-token",
|
|
762
|
+
type: "apiKey",
|
|
763
|
+
},
|
|
764
|
+
],
|
|
765
|
+
responseTransformer: missionsControllerGetMissionResponseTransformer,
|
|
766
|
+
url: "/missions/{id}",
|
|
767
|
+
...options,
|
|
768
|
+
});
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Get missions
|
|
773
|
+
* Returns up to 500 missions per page, sorted by id ascending. All filters are optional. Use `page` (0-indexed, default 0) to paginate. `hasNextPage` is true when additional pages are available. `zone_id` may be repeated to filter by multiple zones.
|
|
774
|
+
*/
|
|
775
|
+
export const missionsControllerGetMissions = <
|
|
776
|
+
ThrowOnError extends boolean = false,
|
|
777
|
+
>(
|
|
778
|
+
options?: Options<MissionsControllerGetMissionsData, ThrowOnError>,
|
|
779
|
+
) => {
|
|
780
|
+
return (options?.client ?? _heyApiClient).get<
|
|
781
|
+
MissionsControllerGetMissionsResponses,
|
|
782
|
+
MissionsControllerGetMissionsErrors,
|
|
783
|
+
ThrowOnError
|
|
784
|
+
>({
|
|
785
|
+
security: [
|
|
786
|
+
{
|
|
787
|
+
name: "x-api-token",
|
|
788
|
+
type: "apiKey",
|
|
789
|
+
},
|
|
790
|
+
],
|
|
791
|
+
responseTransformer: missionsControllerGetMissionsResponseTransformer,
|
|
792
|
+
url: "/missions",
|
|
793
|
+
...options,
|
|
794
|
+
});
|
|
795
|
+
};
|
|
796
|
+
|
|
657
797
|
/**
|
|
658
798
|
* Create new missions
|
|
659
799
|
* Create missions for specified zones and mission types.
|
|
@@ -830,21 +970,6 @@ export const schemaControllerGetEventSchema = <
|
|
|
830
970
|
});
|
|
831
971
|
};
|
|
832
972
|
|
|
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
|
-
|
|
848
973
|
/**
|
|
849
974
|
* Create new vault requests
|
|
850
975
|
* Create vault requests and publish to the internal.vault.requested queue.
|
|
@@ -894,6 +1019,7 @@ export const webhooksControllerGetMany = <ThrowOnError extends boolean = false>(
|
|
|
894
1019
|
type: "apiKey",
|
|
895
1020
|
},
|
|
896
1021
|
],
|
|
1022
|
+
responseTransformer: webhooksControllerGetManyResponseTransformer,
|
|
897
1023
|
url: "/org/{org_id}/webhooks",
|
|
898
1024
|
...options,
|
|
899
1025
|
});
|
|
@@ -955,6 +1081,7 @@ export const webhooksControllerGet = <ThrowOnError extends boolean = false>(
|
|
|
955
1081
|
type: "apiKey",
|
|
956
1082
|
},
|
|
957
1083
|
],
|
|
1084
|
+
responseTransformer: webhooksControllerGetResponseTransformer,
|
|
958
1085
|
url: "/org/{org_id}/webhooks/{id}",
|
|
959
1086
|
...options,
|
|
960
1087
|
});
|
|
@@ -974,6 +1101,7 @@ export const webhooksControllerUpdate = <ThrowOnError extends boolean = false>(
|
|
|
974
1101
|
type: "apiKey",
|
|
975
1102
|
},
|
|
976
1103
|
],
|
|
1104
|
+
responseTransformer: webhooksControllerUpdateResponseTransformer,
|
|
977
1105
|
url: "/org/{org_id}/webhooks/{id}",
|
|
978
1106
|
...options,
|
|
979
1107
|
headers: {
|
|
@@ -999,8 +1127,13 @@ export const webhooksControllerRegenerateSecret = <
|
|
|
999
1127
|
type: "apiKey",
|
|
1000
1128
|
},
|
|
1001
1129
|
],
|
|
1130
|
+
responseTransformer: webhooksControllerRegenerateSecretResponseTransformer,
|
|
1002
1131
|
url: "/org/{org_id}/webhooks/{id}/regenerate-secret",
|
|
1003
1132
|
...options,
|
|
1133
|
+
headers: {
|
|
1134
|
+
"Content-Type": "application/json",
|
|
1135
|
+
...options.headers,
|
|
1136
|
+
},
|
|
1004
1137
|
});
|
|
1005
1138
|
};
|
|
1006
1139
|
|
|
@@ -1044,6 +1177,146 @@ export const webhooksControllerGetStatus = <
|
|
|
1044
1177
|
});
|
|
1045
1178
|
};
|
|
1046
1179
|
|
|
1180
|
+
/**
|
|
1181
|
+
* Create a zone
|
|
1182
|
+
*/
|
|
1183
|
+
export const zonesControllerCreateZone = <ThrowOnError extends boolean = false>(
|
|
1184
|
+
options: Options<ZonesControllerCreateZoneData, ThrowOnError>,
|
|
1185
|
+
) => {
|
|
1186
|
+
return (options.client ?? _heyApiClient).post<
|
|
1187
|
+
ZonesControllerCreateZoneResponses,
|
|
1188
|
+
ZonesControllerCreateZoneErrors,
|
|
1189
|
+
ThrowOnError
|
|
1190
|
+
>({
|
|
1191
|
+
security: [
|
|
1192
|
+
{
|
|
1193
|
+
name: "x-api-token",
|
|
1194
|
+
type: "apiKey",
|
|
1195
|
+
},
|
|
1196
|
+
],
|
|
1197
|
+
responseTransformer: zonesControllerCreateZoneResponseTransformer,
|
|
1198
|
+
url: "/zones",
|
|
1199
|
+
...options,
|
|
1200
|
+
headers: {
|
|
1201
|
+
"Content-Type": "application/json",
|
|
1202
|
+
...options.headers,
|
|
1203
|
+
},
|
|
1204
|
+
});
|
|
1205
|
+
};
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* Delete a zone
|
|
1209
|
+
*/
|
|
1210
|
+
export const zonesControllerDeleteZone = <ThrowOnError extends boolean = false>(
|
|
1211
|
+
options: Options<ZonesControllerDeleteZoneData, ThrowOnError>,
|
|
1212
|
+
) => {
|
|
1213
|
+
return (options.client ?? _heyApiClient).delete<
|
|
1214
|
+
ZonesControllerDeleteZoneResponses,
|
|
1215
|
+
ZonesControllerDeleteZoneErrors,
|
|
1216
|
+
ThrowOnError
|
|
1217
|
+
>({
|
|
1218
|
+
security: [
|
|
1219
|
+
{
|
|
1220
|
+
name: "x-api-token",
|
|
1221
|
+
type: "apiKey",
|
|
1222
|
+
},
|
|
1223
|
+
],
|
|
1224
|
+
url: "/zones/{id}",
|
|
1225
|
+
...options,
|
|
1226
|
+
});
|
|
1227
|
+
};
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* Update a zone
|
|
1231
|
+
*/
|
|
1232
|
+
export const zonesControllerUpdateZone = <ThrowOnError extends boolean = false>(
|
|
1233
|
+
options: Options<ZonesControllerUpdateZoneData, ThrowOnError>,
|
|
1234
|
+
) => {
|
|
1235
|
+
return (options.client ?? _heyApiClient).put<
|
|
1236
|
+
ZonesControllerUpdateZoneResponses,
|
|
1237
|
+
ZonesControllerUpdateZoneErrors,
|
|
1238
|
+
ThrowOnError
|
|
1239
|
+
>({
|
|
1240
|
+
security: [
|
|
1241
|
+
{
|
|
1242
|
+
name: "x-api-token",
|
|
1243
|
+
type: "apiKey",
|
|
1244
|
+
},
|
|
1245
|
+
],
|
|
1246
|
+
responseTransformer: zonesControllerUpdateZoneResponseTransformer,
|
|
1247
|
+
url: "/zones/{id}",
|
|
1248
|
+
...options,
|
|
1249
|
+
headers: {
|
|
1250
|
+
"Content-Type": "application/json",
|
|
1251
|
+
...options.headers,
|
|
1252
|
+
},
|
|
1253
|
+
});
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* Force mission state resync from RPC
|
|
1258
|
+
* For each mission ID, reads MissionData + MissionEscrow on-chain, loads off-chain JSON from the missions bucket, and upserts event-proc.vaults / missions / campaigns.
|
|
1259
|
+
*/
|
|
1260
|
+
export const eventProcessorMissionsSyncControllerResyncMissions = <
|
|
1261
|
+
ThrowOnError extends boolean = false,
|
|
1262
|
+
>(
|
|
1263
|
+
options: Options<
|
|
1264
|
+
EventProcessorMissionsSyncControllerResyncMissionsData,
|
|
1265
|
+
ThrowOnError
|
|
1266
|
+
>,
|
|
1267
|
+
) => {
|
|
1268
|
+
return (options.client ?? _heyApiClient).put<
|
|
1269
|
+
EventProcessorMissionsSyncControllerResyncMissionsResponses,
|
|
1270
|
+
EventProcessorMissionsSyncControllerResyncMissionsErrors,
|
|
1271
|
+
ThrowOnError
|
|
1272
|
+
>({
|
|
1273
|
+
security: [
|
|
1274
|
+
{
|
|
1275
|
+
name: "x-api-token",
|
|
1276
|
+
type: "apiKey",
|
|
1277
|
+
},
|
|
1278
|
+
],
|
|
1279
|
+
url: "/event-processor/missions/sync",
|
|
1280
|
+
...options,
|
|
1281
|
+
headers: {
|
|
1282
|
+
"Content-Type": "application/json",
|
|
1283
|
+
...options.headers,
|
|
1284
|
+
},
|
|
1285
|
+
});
|
|
1286
|
+
};
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* Force flight review state resync from RPC
|
|
1290
|
+
* For each flight ID, reads FlightReviews on-chain, resolves validation log URI like the indexer, fetches optional S3 validation log, and upserts event-proc.flight_reviews.
|
|
1291
|
+
*/
|
|
1292
|
+
export const eventProcessorFlightReviewsSyncControllerResyncFlightReviews = <
|
|
1293
|
+
ThrowOnError extends boolean = false,
|
|
1294
|
+
>(
|
|
1295
|
+
options: Options<
|
|
1296
|
+
EventProcessorFlightReviewsSyncControllerResyncFlightReviewsData,
|
|
1297
|
+
ThrowOnError
|
|
1298
|
+
>,
|
|
1299
|
+
) => {
|
|
1300
|
+
return (options.client ?? _heyApiClient).put<
|
|
1301
|
+
EventProcessorFlightReviewsSyncControllerResyncFlightReviewsResponses,
|
|
1302
|
+
EventProcessorFlightReviewsSyncControllerResyncFlightReviewsErrors,
|
|
1303
|
+
ThrowOnError
|
|
1304
|
+
>({
|
|
1305
|
+
security: [
|
|
1306
|
+
{
|
|
1307
|
+
name: "x-api-token",
|
|
1308
|
+
type: "apiKey",
|
|
1309
|
+
},
|
|
1310
|
+
],
|
|
1311
|
+
url: "/event-processor/flightreviews",
|
|
1312
|
+
...options,
|
|
1313
|
+
headers: {
|
|
1314
|
+
"Content-Type": "application/json",
|
|
1315
|
+
...options.headers,
|
|
1316
|
+
},
|
|
1317
|
+
});
|
|
1318
|
+
};
|
|
1319
|
+
|
|
1047
1320
|
export const alchemyControllerHandleWebhook = <
|
|
1048
1321
|
ThrowOnError extends boolean = false,
|
|
1049
1322
|
>(
|
|
@@ -6,12 +6,23 @@ import type {
|
|
|
6
6
|
FlightPlansControllerCreateResponse,
|
|
7
7
|
FlightPlansControllerGetManyResponse,
|
|
8
8
|
FlightPlansControllerGetResponse,
|
|
9
|
+
FlightReviewsControllerGetFlightReviewResponse,
|
|
10
|
+
FlightReviewsControllerGetFlightReviewsResponse,
|
|
11
|
+
FlightsControllerGetFlightResponse,
|
|
9
12
|
FlightsControllerValidateFlightResponse,
|
|
10
13
|
InboundWebhookConfigsControllerCreateResponse,
|
|
11
14
|
InboundWebhookConfigsControllerGetManyResponse,
|
|
12
15
|
InboundWebhookConfigsControllerGetResponse,
|
|
13
16
|
InboundWebhookConfigsControllerUpdateResponse,
|
|
14
17
|
MissionsControllerCreateMissionsResponse,
|
|
18
|
+
MissionsControllerGetMissionResponse,
|
|
19
|
+
MissionsControllerGetMissionsResponse,
|
|
20
|
+
WebhooksControllerGetManyResponse,
|
|
21
|
+
WebhooksControllerGetResponse,
|
|
22
|
+
WebhooksControllerRegenerateSecretResponse,
|
|
23
|
+
WebhooksControllerUpdateResponse,
|
|
24
|
+
ZonesControllerCreateZoneResponse,
|
|
25
|
+
ZonesControllerUpdateZoneResponse,
|
|
15
26
|
} from "./types.gen.js";
|
|
16
27
|
|
|
17
28
|
const updateApiTokenResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
@@ -66,6 +77,18 @@ export const contractsControllerGetAllContractsResponseTransformer = async (
|
|
|
66
77
|
return data;
|
|
67
78
|
};
|
|
68
79
|
|
|
80
|
+
const flightDtoSchemaResponseTransformer = (data: any) => {
|
|
81
|
+
data.payout.createdAt = new Date(data.payout.createdAt);
|
|
82
|
+
return data;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const flightsControllerGetFlightResponseTransformer = async (
|
|
86
|
+
data: any,
|
|
87
|
+
): Promise<FlightsControllerGetFlightResponse> => {
|
|
88
|
+
data = flightDtoSchemaResponseTransformer(data);
|
|
89
|
+
return data;
|
|
90
|
+
};
|
|
91
|
+
|
|
69
92
|
const validateFlightResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
70
93
|
data.flightId = BigInt(data.flightId.toString());
|
|
71
94
|
return data;
|
|
@@ -120,6 +143,75 @@ export const flightPlansControllerGetResponseTransformer = async (
|
|
|
120
143
|
return data;
|
|
121
144
|
};
|
|
122
145
|
|
|
146
|
+
const getFlightReviewResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
147
|
+
data.createdAt = new Date(data.createdAt);
|
|
148
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
149
|
+
return data;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export const flightReviewsControllerGetFlightReviewResponseTransformer = async (
|
|
153
|
+
data: any,
|
|
154
|
+
): Promise<FlightReviewsControllerGetFlightReviewResponse> => {
|
|
155
|
+
data = getFlightReviewResponseDtoSchemaResponseTransformer(data);
|
|
156
|
+
return data;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
const getFlightReviewsResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
160
|
+
data.flightReviews = data.flightReviews.map((item: any) => {
|
|
161
|
+
item.createdAt = new Date(item.createdAt);
|
|
162
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
163
|
+
return item;
|
|
164
|
+
});
|
|
165
|
+
return data;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export const flightReviewsControllerGetFlightReviewsResponseTransformer =
|
|
169
|
+
async (
|
|
170
|
+
data: any,
|
|
171
|
+
): Promise<FlightReviewsControllerGetFlightReviewsResponse> => {
|
|
172
|
+
data = getFlightReviewsResponseDtoSchemaResponseTransformer(data);
|
|
173
|
+
return data;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const getMissionResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
177
|
+
data.captureStartTime = new Date(data.captureStartTime);
|
|
178
|
+
data.captureEndTime = new Date(data.captureEndTime);
|
|
179
|
+
data.createdAt = new Date(data.createdAt);
|
|
180
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
181
|
+
data.payout.createdAt = new Date(data.payout.createdAt);
|
|
182
|
+
data.vault.createdAt = new Date(data.vault.createdAt);
|
|
183
|
+
data.vault.updatedAt = new Date(data.vault.updatedAt);
|
|
184
|
+
return data;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export const missionsControllerGetMissionResponseTransformer = async (
|
|
188
|
+
data: any,
|
|
189
|
+
): Promise<MissionsControllerGetMissionResponse> => {
|
|
190
|
+
data = getMissionResponseDtoSchemaResponseTransformer(data);
|
|
191
|
+
return data;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const getMissionsResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
195
|
+
data.missions = data.missions.map((item: any) => {
|
|
196
|
+
item.captureStartTime = new Date(item.captureStartTime);
|
|
197
|
+
item.captureEndTime = new Date(item.captureEndTime);
|
|
198
|
+
item.createdAt = new Date(item.createdAt);
|
|
199
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
200
|
+
item.payout.createdAt = new Date(item.payout.createdAt);
|
|
201
|
+
item.vault.createdAt = new Date(item.vault.createdAt);
|
|
202
|
+
item.vault.updatedAt = new Date(item.vault.updatedAt);
|
|
203
|
+
return item;
|
|
204
|
+
});
|
|
205
|
+
return data;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
export const missionsControllerGetMissionsResponseTransformer = async (
|
|
209
|
+
data: any,
|
|
210
|
+
): Promise<MissionsControllerGetMissionsResponse> => {
|
|
211
|
+
data = getMissionsResponseDtoSchemaResponseTransformer(data);
|
|
212
|
+
return data;
|
|
213
|
+
};
|
|
214
|
+
|
|
123
215
|
const createMissionResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
124
216
|
data.data.missions = data.data.missions.map((item: any) => {
|
|
125
217
|
item.captureStartTime = new Date(item.captureStartTime);
|
|
@@ -136,6 +228,79 @@ export const missionsControllerCreateMissionsResponseTransformer = async (
|
|
|
136
228
|
return data;
|
|
137
229
|
};
|
|
138
230
|
|
|
231
|
+
const getWebhooksResponseSchemaResponseTransformer = (data: any) => {
|
|
232
|
+
data = data.map((item: any) => {
|
|
233
|
+
item.previous_secret_expires_at = new Date(item.previous_secret_expires_at);
|
|
234
|
+
return item;
|
|
235
|
+
});
|
|
236
|
+
return data;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
export const webhooksControllerGetManyResponseTransformer = async (
|
|
240
|
+
data: any,
|
|
241
|
+
): Promise<WebhooksControllerGetManyResponse> => {
|
|
242
|
+
data = getWebhooksResponseSchemaResponseTransformer(data);
|
|
243
|
+
return data;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
const getWebhookResponseSchemaResponseTransformer = (data: any) => {
|
|
247
|
+
data.previous_secret_expires_at = new Date(data.previous_secret_expires_at);
|
|
248
|
+
return data;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export const webhooksControllerGetResponseTransformer = async (
|
|
252
|
+
data: any,
|
|
253
|
+
): Promise<WebhooksControllerGetResponse> => {
|
|
254
|
+
data = getWebhookResponseSchemaResponseTransformer(data);
|
|
255
|
+
return data;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
const updateWebhookResponseSchemaResponseTransformer = (data: any) => {
|
|
259
|
+
data.previous_secret_expires_at = new Date(data.previous_secret_expires_at);
|
|
260
|
+
return data;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
export const webhooksControllerUpdateResponseTransformer = async (
|
|
264
|
+
data: any,
|
|
265
|
+
): Promise<WebhooksControllerUpdateResponse> => {
|
|
266
|
+
data = updateWebhookResponseSchemaResponseTransformer(data);
|
|
267
|
+
return data;
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
const regenerateWebhookSecretResponseDtoSchemaResponseTransformer = (
|
|
271
|
+
data: any,
|
|
272
|
+
) => {
|
|
273
|
+
data.previous_secret_expires_at = new Date(data.previous_secret_expires_at);
|
|
274
|
+
return data;
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
export const webhooksControllerRegenerateSecretResponseTransformer = async (
|
|
278
|
+
data: any,
|
|
279
|
+
): Promise<WebhooksControllerRegenerateSecretResponse> => {
|
|
280
|
+
data = regenerateWebhookSecretResponseDtoSchemaResponseTransformer(data);
|
|
281
|
+
return data;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
const zoneResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
285
|
+
data.created_at = new Date(data.created_at);
|
|
286
|
+
data.updated_at = new Date(data.updated_at);
|
|
287
|
+
return data;
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
export const zonesControllerCreateZoneResponseTransformer = async (
|
|
291
|
+
data: any,
|
|
292
|
+
): Promise<ZonesControllerCreateZoneResponse> => {
|
|
293
|
+
data = zoneResponseDtoSchemaResponseTransformer(data);
|
|
294
|
+
return data;
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
export const zonesControllerUpdateZoneResponseTransformer = async (
|
|
298
|
+
data: any,
|
|
299
|
+
): Promise<ZonesControllerUpdateZoneResponse> => {
|
|
300
|
+
data = zoneResponseDtoSchemaResponseTransformer(data);
|
|
301
|
+
return data;
|
|
302
|
+
};
|
|
303
|
+
|
|
139
304
|
const getInboundWebhookConfigsResponseSchemaResponseTransformer = (
|
|
140
305
|
data: any,
|
|
141
306
|
) => {
|