@layer-drone/protocol 2.2.0 → 2.3.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/index.d.mts +277 -15
- package/dist/index.d.ts +277 -15
- package/dist/index.js +187 -1
- package/dist/index.mjs +181 -1
- package/package.json +4 -3
- package/src/client/sdk.gen.ts +229 -0
- package/src/client/transformers.gen.ts +84 -0
- package/src/client/types.gen.ts +316 -14
- package/src/event/types.gen.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -51,6 +51,7 @@ __export(index_exports, {
|
|
|
51
51
|
campaignsControllerGet0V1: () => campaignsControllerGet0V1,
|
|
52
52
|
campaignsControllerGet1: () => campaignsControllerGet1,
|
|
53
53
|
campaignsControllerGetCampaignV2V2: () => campaignsControllerGetCampaignV2V2,
|
|
54
|
+
campaignsControllerGetCampaignZonesV2V2: () => campaignsControllerGetCampaignZonesV2V2,
|
|
54
55
|
campaignsControllerGetCampaignsV2V2: () => campaignsControllerGetCampaignsV2V2,
|
|
55
56
|
campaignsControllerGetMany0V1: () => campaignsControllerGetMany0V1,
|
|
56
57
|
campaignsControllerGetMany1: () => campaignsControllerGetMany1,
|
|
@@ -144,6 +145,7 @@ __export(index_exports, {
|
|
|
144
145
|
missionsControllerUpdateMissions0V1: () => missionsControllerUpdateMissions0V1,
|
|
145
146
|
missionsControllerUpdateMissions1: () => missionsControllerUpdateMissions1,
|
|
146
147
|
parseWebhookEvent: () => parseWebhookEvent,
|
|
148
|
+
pilotsControllerGetPilotReputationV2V2: () => pilotsControllerGetPilotReputationV2V2,
|
|
147
149
|
protocolTriggersApiControllerTriggerMissionClose0V1: () => protocolTriggersApiControllerTriggerMissionClose0V1,
|
|
148
150
|
protocolTriggersApiControllerTriggerMissionClose1: () => protocolTriggersApiControllerTriggerMissionClose1,
|
|
149
151
|
protocolTriggersApiControllerTriggerPayout0V1: () => protocolTriggersApiControllerTriggerPayout0V1,
|
|
@@ -152,6 +154,10 @@ __export(index_exports, {
|
|
|
152
154
|
quotesControllerCreateQuote1: () => quotesControllerCreateQuote1,
|
|
153
155
|
quotesControllerGetQuote0V1: () => quotesControllerGetQuote0V1,
|
|
154
156
|
quotesControllerGetQuote1: () => quotesControllerGetQuote1,
|
|
157
|
+
reservationsControllerCancelReservationV2V2: () => reservationsControllerCancelReservationV2V2,
|
|
158
|
+
reservationsControllerCreateReservationV2V2: () => reservationsControllerCreateReservationV2V2,
|
|
159
|
+
reservationsControllerGetReservationV2V2: () => reservationsControllerGetReservationV2V2,
|
|
160
|
+
reservationsControllerGetReservationsV2V2: () => reservationsControllerGetReservationsV2V2,
|
|
155
161
|
reviewProposal: () => reviewProposal,
|
|
156
162
|
rewardsControllerListRewardsV2V2: () => rewardsControllerListRewardsV2V2,
|
|
157
163
|
submitProposal: () => submitProposal,
|
|
@@ -1387,6 +1393,13 @@ var listMissionsResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data
|
|
|
1387
1393
|
item.hold.created_at = new Date(item.hold.created_at);
|
|
1388
1394
|
item.hold.updated_at = new Date(item.hold.updated_at);
|
|
1389
1395
|
}
|
|
1396
|
+
if (item.reservation) {
|
|
1397
|
+
if (item.reservation.ended_at) {
|
|
1398
|
+
item.reservation.ended_at = new Date(item.reservation.ended_at);
|
|
1399
|
+
}
|
|
1400
|
+
item.reservation.created_at = new Date(item.reservation.created_at);
|
|
1401
|
+
item.reservation.updated_at = new Date(item.reservation.updated_at);
|
|
1402
|
+
}
|
|
1390
1403
|
if (item.closed_at) {
|
|
1391
1404
|
item.closed_at = new Date(item.closed_at);
|
|
1392
1405
|
}
|
|
@@ -1422,6 +1435,13 @@ var createMissionsResponseSchemaResponseTransformer = /* @__PURE__ */ __name((da
|
|
|
1422
1435
|
item.mission.hold.created_at = new Date(item.mission.hold.created_at);
|
|
1423
1436
|
item.mission.hold.updated_at = new Date(item.mission.hold.updated_at);
|
|
1424
1437
|
}
|
|
1438
|
+
if (item.mission.reservation) {
|
|
1439
|
+
if (item.mission.reservation.ended_at) {
|
|
1440
|
+
item.mission.reservation.ended_at = new Date(item.mission.reservation.ended_at);
|
|
1441
|
+
}
|
|
1442
|
+
item.mission.reservation.created_at = new Date(item.mission.reservation.created_at);
|
|
1443
|
+
item.mission.reservation.updated_at = new Date(item.mission.reservation.updated_at);
|
|
1444
|
+
}
|
|
1425
1445
|
if (item.mission.closed_at) {
|
|
1426
1446
|
item.mission.closed_at = new Date(item.mission.closed_at);
|
|
1427
1447
|
}
|
|
@@ -1456,6 +1476,13 @@ var missionResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) =>
|
|
|
1456
1476
|
data.hold.created_at = new Date(data.hold.created_at);
|
|
1457
1477
|
data.hold.updated_at = new Date(data.hold.updated_at);
|
|
1458
1478
|
}
|
|
1479
|
+
if (data.reservation) {
|
|
1480
|
+
if (data.reservation.ended_at) {
|
|
1481
|
+
data.reservation.ended_at = new Date(data.reservation.ended_at);
|
|
1482
|
+
}
|
|
1483
|
+
data.reservation.created_at = new Date(data.reservation.created_at);
|
|
1484
|
+
data.reservation.updated_at = new Date(data.reservation.updated_at);
|
|
1485
|
+
}
|
|
1459
1486
|
if (data.closed_at) {
|
|
1460
1487
|
data.closed_at = new Date(data.closed_at);
|
|
1461
1488
|
}
|
|
@@ -1479,6 +1506,41 @@ var missionsControllerRetryMissionV2V2ResponseTransformer = /* @__PURE__ */ __na
|
|
|
1479
1506
|
data = missionResponseSchemaResponseTransformer(data);
|
|
1480
1507
|
return data;
|
|
1481
1508
|
}, "missionsControllerRetryMissionV2V2ResponseTransformer");
|
|
1509
|
+
var listReservationsResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
1510
|
+
data.data = data.data.map((item) => {
|
|
1511
|
+
if (item.ended_at) {
|
|
1512
|
+
item.ended_at = new Date(item.ended_at);
|
|
1513
|
+
}
|
|
1514
|
+
item.created_at = new Date(item.created_at);
|
|
1515
|
+
item.updated_at = new Date(item.updated_at);
|
|
1516
|
+
return item;
|
|
1517
|
+
});
|
|
1518
|
+
return data;
|
|
1519
|
+
}, "listReservationsResponseSchemaResponseTransformer");
|
|
1520
|
+
var reservationsControllerGetReservationsV2V2ResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
1521
|
+
data = listReservationsResponseSchemaResponseTransformer(data);
|
|
1522
|
+
return data;
|
|
1523
|
+
}, "reservationsControllerGetReservationsV2V2ResponseTransformer");
|
|
1524
|
+
var reservationResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
1525
|
+
if (data.ended_at) {
|
|
1526
|
+
data.ended_at = new Date(data.ended_at);
|
|
1527
|
+
}
|
|
1528
|
+
data.created_at = new Date(data.created_at);
|
|
1529
|
+
data.updated_at = new Date(data.updated_at);
|
|
1530
|
+
return data;
|
|
1531
|
+
}, "reservationResponseSchemaResponseTransformer");
|
|
1532
|
+
var reservationsControllerCreateReservationV2V2ResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
1533
|
+
data = reservationResponseSchemaResponseTransformer(data);
|
|
1534
|
+
return data;
|
|
1535
|
+
}, "reservationsControllerCreateReservationV2V2ResponseTransformer");
|
|
1536
|
+
var reservationsControllerGetReservationV2V2ResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
1537
|
+
data = reservationResponseSchemaResponseTransformer(data);
|
|
1538
|
+
return data;
|
|
1539
|
+
}, "reservationsControllerGetReservationV2V2ResponseTransformer");
|
|
1540
|
+
var reservationsControllerCancelReservationV2V2ResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
1541
|
+
data = reservationResponseSchemaResponseTransformer(data);
|
|
1542
|
+
return data;
|
|
1543
|
+
}, "reservationsControllerCancelReservationV2V2ResponseTransformer");
|
|
1482
1544
|
var listRewardsResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
1483
1545
|
data.data = data.data.map((item) => {
|
|
1484
1546
|
item.created_at = new Date(item.created_at);
|
|
@@ -3259,6 +3321,10 @@ var inboundWebhookConfigsControllerUpdate1 = /* @__PURE__ */ __name((options) =>
|
|
|
3259
3321
|
var campaignsControllerGetCampaignsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3260
3322
|
return (options?.client ?? client).get({
|
|
3261
3323
|
security: [
|
|
3324
|
+
{
|
|
3325
|
+
name: "x-api-token",
|
|
3326
|
+
type: "apiKey"
|
|
3327
|
+
},
|
|
3262
3328
|
{
|
|
3263
3329
|
name: "x-api-token",
|
|
3264
3330
|
type: "apiKey"
|
|
@@ -3289,6 +3355,10 @@ var campaignsControllerCreateCampaignV2V2 = /* @__PURE__ */ __name((options) =>
|
|
|
3289
3355
|
var campaignsControllerGetCampaignV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3290
3356
|
return (options.client ?? client).get({
|
|
3291
3357
|
security: [
|
|
3358
|
+
{
|
|
3359
|
+
name: "x-api-token",
|
|
3360
|
+
type: "apiKey"
|
|
3361
|
+
},
|
|
3292
3362
|
{
|
|
3293
3363
|
name: "x-api-token",
|
|
3294
3364
|
type: "apiKey"
|
|
@@ -3328,6 +3398,22 @@ var campaignsControllerCancelCampaignV2V2 = /* @__PURE__ */ __name((options) =>
|
|
|
3328
3398
|
...options
|
|
3329
3399
|
});
|
|
3330
3400
|
}, "campaignsControllerCancelCampaignV2V2");
|
|
3401
|
+
var campaignsControllerGetCampaignZonesV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3402
|
+
return (options.client ?? client).get({
|
|
3403
|
+
security: [
|
|
3404
|
+
{
|
|
3405
|
+
name: "x-api-token",
|
|
3406
|
+
type: "apiKey"
|
|
3407
|
+
},
|
|
3408
|
+
{
|
|
3409
|
+
name: "x-api-token",
|
|
3410
|
+
type: "apiKey"
|
|
3411
|
+
}
|
|
3412
|
+
],
|
|
3413
|
+
url: "/v2/campaigns/{id}/zones",
|
|
3414
|
+
...options
|
|
3415
|
+
});
|
|
3416
|
+
}, "campaignsControllerGetCampaignZonesV2V2");
|
|
3331
3417
|
var flightPlansControllerGetManyV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3332
3418
|
return (options?.client ?? client).get({
|
|
3333
3419
|
security: [
|
|
@@ -3541,6 +3627,10 @@ var flightsControllerSubmitProvenanceV2V2 = /* @__PURE__ */ __name((options) =>
|
|
|
3541
3627
|
var missionsControllerGetMissionsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3542
3628
|
return (options?.client ?? client).get({
|
|
3543
3629
|
security: [
|
|
3630
|
+
{
|
|
3631
|
+
name: "x-api-token",
|
|
3632
|
+
type: "apiKey"
|
|
3633
|
+
},
|
|
3544
3634
|
{
|
|
3545
3635
|
name: "x-api-token",
|
|
3546
3636
|
type: "apiKey"
|
|
@@ -3571,6 +3661,10 @@ var missionsControllerCreateMissionsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
|
3571
3661
|
var missionsControllerGetMissionV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3572
3662
|
return (options.client ?? client).get({
|
|
3573
3663
|
security: [
|
|
3664
|
+
{
|
|
3665
|
+
name: "x-api-token",
|
|
3666
|
+
type: "apiKey"
|
|
3667
|
+
},
|
|
3574
3668
|
{
|
|
3575
3669
|
name: "x-api-token",
|
|
3576
3670
|
type: "apiKey"
|
|
@@ -3624,6 +3718,86 @@ var missionsControllerRetryMissionV2V2 = /* @__PURE__ */ __name((options) => {
|
|
|
3624
3718
|
...options
|
|
3625
3719
|
});
|
|
3626
3720
|
}, "missionsControllerRetryMissionV2V2");
|
|
3721
|
+
var pilotsControllerGetPilotReputationV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3722
|
+
return (options.client ?? client).get({
|
|
3723
|
+
security: [
|
|
3724
|
+
{
|
|
3725
|
+
name: "x-api-token",
|
|
3726
|
+
type: "apiKey"
|
|
3727
|
+
}
|
|
3728
|
+
],
|
|
3729
|
+
url: "/v2/pilots/{address}/reputation",
|
|
3730
|
+
...options
|
|
3731
|
+
});
|
|
3732
|
+
}, "pilotsControllerGetPilotReputationV2V2");
|
|
3733
|
+
var reservationsControllerGetReservationsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3734
|
+
return (options?.client ?? client).get({
|
|
3735
|
+
security: [
|
|
3736
|
+
{
|
|
3737
|
+
name: "x-api-token",
|
|
3738
|
+
type: "apiKey"
|
|
3739
|
+
},
|
|
3740
|
+
{
|
|
3741
|
+
name: "x-api-token",
|
|
3742
|
+
type: "apiKey"
|
|
3743
|
+
}
|
|
3744
|
+
],
|
|
3745
|
+
responseTransformer: reservationsControllerGetReservationsV2V2ResponseTransformer,
|
|
3746
|
+
url: "/v2/reservations",
|
|
3747
|
+
...options
|
|
3748
|
+
});
|
|
3749
|
+
}, "reservationsControllerGetReservationsV2V2");
|
|
3750
|
+
var reservationsControllerCreateReservationV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3751
|
+
return (options.client ?? client).post({
|
|
3752
|
+
security: [
|
|
3753
|
+
{
|
|
3754
|
+
name: "x-api-token",
|
|
3755
|
+
type: "apiKey"
|
|
3756
|
+
}
|
|
3757
|
+
],
|
|
3758
|
+
responseTransformer: reservationsControllerCreateReservationV2V2ResponseTransformer,
|
|
3759
|
+
url: "/v2/reservations",
|
|
3760
|
+
...options,
|
|
3761
|
+
headers: {
|
|
3762
|
+
"Content-Type": "application/json",
|
|
3763
|
+
...options.headers
|
|
3764
|
+
}
|
|
3765
|
+
});
|
|
3766
|
+
}, "reservationsControllerCreateReservationV2V2");
|
|
3767
|
+
var reservationsControllerGetReservationV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3768
|
+
return (options.client ?? client).get({
|
|
3769
|
+
security: [
|
|
3770
|
+
{
|
|
3771
|
+
name: "x-api-token",
|
|
3772
|
+
type: "apiKey"
|
|
3773
|
+
},
|
|
3774
|
+
{
|
|
3775
|
+
name: "x-api-token",
|
|
3776
|
+
type: "apiKey"
|
|
3777
|
+
}
|
|
3778
|
+
],
|
|
3779
|
+
responseTransformer: reservationsControllerGetReservationV2V2ResponseTransformer,
|
|
3780
|
+
url: "/v2/reservations/{id}",
|
|
3781
|
+
...options
|
|
3782
|
+
});
|
|
3783
|
+
}, "reservationsControllerGetReservationV2V2");
|
|
3784
|
+
var reservationsControllerCancelReservationV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3785
|
+
return (options.client ?? client).post({
|
|
3786
|
+
security: [
|
|
3787
|
+
{
|
|
3788
|
+
name: "x-api-token",
|
|
3789
|
+
type: "apiKey"
|
|
3790
|
+
}
|
|
3791
|
+
],
|
|
3792
|
+
responseTransformer: reservationsControllerCancelReservationV2V2ResponseTransformer,
|
|
3793
|
+
url: "/v2/reservations/{id}/cancel",
|
|
3794
|
+
...options,
|
|
3795
|
+
headers: {
|
|
3796
|
+
"Content-Type": "application/json",
|
|
3797
|
+
...options.headers
|
|
3798
|
+
}
|
|
3799
|
+
});
|
|
3800
|
+
}, "reservationsControllerCancelReservationV2V2");
|
|
3627
3801
|
var rewardsControllerListRewardsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3628
3802
|
return (options?.client ?? client).get({
|
|
3629
3803
|
security: [
|
|
@@ -3656,6 +3830,10 @@ var zonesControllerCreateZonesV2V2 = /* @__PURE__ */ __name((options) => {
|
|
|
3656
3830
|
var zonesControllerGetZoneV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3657
3831
|
return (options.client ?? client).get({
|
|
3658
3832
|
security: [
|
|
3833
|
+
{
|
|
3834
|
+
name: "x-api-token",
|
|
3835
|
+
type: "apiKey"
|
|
3836
|
+
},
|
|
3659
3837
|
{
|
|
3660
3838
|
name: "x-api-token",
|
|
3661
3839
|
type: "apiKey"
|
|
@@ -3715,6 +3893,7 @@ var Event = import_zod.z.union([
|
|
|
3715
3893
|
}).transform((wire) => BigInt(wire.value)),
|
|
3716
3894
|
zoneId: import_zod.z.string(),
|
|
3717
3895
|
flightPlanId: import_zod.z.number(),
|
|
3896
|
+
mfFlightPlanId: import_zod.z.string().uuid().optional(),
|
|
3718
3897
|
campaigns: import_zod.z.array(import_zod.z.string()),
|
|
3719
3898
|
captureStartTime: import_zod.z.string().datetime({
|
|
3720
3899
|
offset: true
|
|
@@ -3754,7 +3933,8 @@ var Event = import_zod.z.union([
|
|
|
3754
3933
|
value: import_zod.z.string()
|
|
3755
3934
|
}).transform((wire) => BigInt(wire.value)).optional(),
|
|
3756
3935
|
isOpen: import_zod.z.boolean().optional(),
|
|
3757
|
-
campaigns: import_zod.z.array(import_zod.z.string()).optional()
|
|
3936
|
+
campaigns: import_zod.z.array(import_zod.z.string()).optional(),
|
|
3937
|
+
mfFlightPlanId: import_zod.z.string().uuid().optional()
|
|
3758
3938
|
}).catchall(import_zod.z.any())
|
|
3759
3939
|
}).catchall(import_zod.z.any()),
|
|
3760
3940
|
import_zod.z.object({
|
|
@@ -3928,6 +4108,7 @@ __name(getFirstHeader, "getFirstHeader");
|
|
|
3928
4108
|
campaignsControllerGet0V1,
|
|
3929
4109
|
campaignsControllerGet1,
|
|
3930
4110
|
campaignsControllerGetCampaignV2V2,
|
|
4111
|
+
campaignsControllerGetCampaignZonesV2V2,
|
|
3931
4112
|
campaignsControllerGetCampaignsV2V2,
|
|
3932
4113
|
campaignsControllerGetMany0V1,
|
|
3933
4114
|
campaignsControllerGetMany1,
|
|
@@ -4021,6 +4202,7 @@ __name(getFirstHeader, "getFirstHeader");
|
|
|
4021
4202
|
missionsControllerUpdateMissions0V1,
|
|
4022
4203
|
missionsControllerUpdateMissions1,
|
|
4023
4204
|
parseWebhookEvent,
|
|
4205
|
+
pilotsControllerGetPilotReputationV2V2,
|
|
4024
4206
|
protocolTriggersApiControllerTriggerMissionClose0V1,
|
|
4025
4207
|
protocolTriggersApiControllerTriggerMissionClose1,
|
|
4026
4208
|
protocolTriggersApiControllerTriggerPayout0V1,
|
|
@@ -4029,6 +4211,10 @@ __name(getFirstHeader, "getFirstHeader");
|
|
|
4029
4211
|
quotesControllerCreateQuote1,
|
|
4030
4212
|
quotesControllerGetQuote0V1,
|
|
4031
4213
|
quotesControllerGetQuote1,
|
|
4214
|
+
reservationsControllerCancelReservationV2V2,
|
|
4215
|
+
reservationsControllerCreateReservationV2V2,
|
|
4216
|
+
reservationsControllerGetReservationV2V2,
|
|
4217
|
+
reservationsControllerGetReservationsV2V2,
|
|
4032
4218
|
reviewProposal,
|
|
4033
4219
|
rewardsControllerListRewardsV2V2,
|
|
4034
4220
|
submitProposal,
|
package/dist/index.mjs
CHANGED
|
@@ -1200,6 +1200,13 @@ var listMissionsResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data
|
|
|
1200
1200
|
item.hold.created_at = new Date(item.hold.created_at);
|
|
1201
1201
|
item.hold.updated_at = new Date(item.hold.updated_at);
|
|
1202
1202
|
}
|
|
1203
|
+
if (item.reservation) {
|
|
1204
|
+
if (item.reservation.ended_at) {
|
|
1205
|
+
item.reservation.ended_at = new Date(item.reservation.ended_at);
|
|
1206
|
+
}
|
|
1207
|
+
item.reservation.created_at = new Date(item.reservation.created_at);
|
|
1208
|
+
item.reservation.updated_at = new Date(item.reservation.updated_at);
|
|
1209
|
+
}
|
|
1203
1210
|
if (item.closed_at) {
|
|
1204
1211
|
item.closed_at = new Date(item.closed_at);
|
|
1205
1212
|
}
|
|
@@ -1235,6 +1242,13 @@ var createMissionsResponseSchemaResponseTransformer = /* @__PURE__ */ __name((da
|
|
|
1235
1242
|
item.mission.hold.created_at = new Date(item.mission.hold.created_at);
|
|
1236
1243
|
item.mission.hold.updated_at = new Date(item.mission.hold.updated_at);
|
|
1237
1244
|
}
|
|
1245
|
+
if (item.mission.reservation) {
|
|
1246
|
+
if (item.mission.reservation.ended_at) {
|
|
1247
|
+
item.mission.reservation.ended_at = new Date(item.mission.reservation.ended_at);
|
|
1248
|
+
}
|
|
1249
|
+
item.mission.reservation.created_at = new Date(item.mission.reservation.created_at);
|
|
1250
|
+
item.mission.reservation.updated_at = new Date(item.mission.reservation.updated_at);
|
|
1251
|
+
}
|
|
1238
1252
|
if (item.mission.closed_at) {
|
|
1239
1253
|
item.mission.closed_at = new Date(item.mission.closed_at);
|
|
1240
1254
|
}
|
|
@@ -1269,6 +1283,13 @@ var missionResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) =>
|
|
|
1269
1283
|
data.hold.created_at = new Date(data.hold.created_at);
|
|
1270
1284
|
data.hold.updated_at = new Date(data.hold.updated_at);
|
|
1271
1285
|
}
|
|
1286
|
+
if (data.reservation) {
|
|
1287
|
+
if (data.reservation.ended_at) {
|
|
1288
|
+
data.reservation.ended_at = new Date(data.reservation.ended_at);
|
|
1289
|
+
}
|
|
1290
|
+
data.reservation.created_at = new Date(data.reservation.created_at);
|
|
1291
|
+
data.reservation.updated_at = new Date(data.reservation.updated_at);
|
|
1292
|
+
}
|
|
1272
1293
|
if (data.closed_at) {
|
|
1273
1294
|
data.closed_at = new Date(data.closed_at);
|
|
1274
1295
|
}
|
|
@@ -1292,6 +1313,41 @@ var missionsControllerRetryMissionV2V2ResponseTransformer = /* @__PURE__ */ __na
|
|
|
1292
1313
|
data = missionResponseSchemaResponseTransformer(data);
|
|
1293
1314
|
return data;
|
|
1294
1315
|
}, "missionsControllerRetryMissionV2V2ResponseTransformer");
|
|
1316
|
+
var listReservationsResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
1317
|
+
data.data = data.data.map((item) => {
|
|
1318
|
+
if (item.ended_at) {
|
|
1319
|
+
item.ended_at = new Date(item.ended_at);
|
|
1320
|
+
}
|
|
1321
|
+
item.created_at = new Date(item.created_at);
|
|
1322
|
+
item.updated_at = new Date(item.updated_at);
|
|
1323
|
+
return item;
|
|
1324
|
+
});
|
|
1325
|
+
return data;
|
|
1326
|
+
}, "listReservationsResponseSchemaResponseTransformer");
|
|
1327
|
+
var reservationsControllerGetReservationsV2V2ResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
1328
|
+
data = listReservationsResponseSchemaResponseTransformer(data);
|
|
1329
|
+
return data;
|
|
1330
|
+
}, "reservationsControllerGetReservationsV2V2ResponseTransformer");
|
|
1331
|
+
var reservationResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
1332
|
+
if (data.ended_at) {
|
|
1333
|
+
data.ended_at = new Date(data.ended_at);
|
|
1334
|
+
}
|
|
1335
|
+
data.created_at = new Date(data.created_at);
|
|
1336
|
+
data.updated_at = new Date(data.updated_at);
|
|
1337
|
+
return data;
|
|
1338
|
+
}, "reservationResponseSchemaResponseTransformer");
|
|
1339
|
+
var reservationsControllerCreateReservationV2V2ResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
1340
|
+
data = reservationResponseSchemaResponseTransformer(data);
|
|
1341
|
+
return data;
|
|
1342
|
+
}, "reservationsControllerCreateReservationV2V2ResponseTransformer");
|
|
1343
|
+
var reservationsControllerGetReservationV2V2ResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
1344
|
+
data = reservationResponseSchemaResponseTransformer(data);
|
|
1345
|
+
return data;
|
|
1346
|
+
}, "reservationsControllerGetReservationV2V2ResponseTransformer");
|
|
1347
|
+
var reservationsControllerCancelReservationV2V2ResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
1348
|
+
data = reservationResponseSchemaResponseTransformer(data);
|
|
1349
|
+
return data;
|
|
1350
|
+
}, "reservationsControllerCancelReservationV2V2ResponseTransformer");
|
|
1295
1351
|
var listRewardsResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
1296
1352
|
data.data = data.data.map((item) => {
|
|
1297
1353
|
item.created_at = new Date(item.created_at);
|
|
@@ -3072,6 +3128,10 @@ var inboundWebhookConfigsControllerUpdate1 = /* @__PURE__ */ __name((options) =>
|
|
|
3072
3128
|
var campaignsControllerGetCampaignsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3073
3129
|
return (options?.client ?? client).get({
|
|
3074
3130
|
security: [
|
|
3131
|
+
{
|
|
3132
|
+
name: "x-api-token",
|
|
3133
|
+
type: "apiKey"
|
|
3134
|
+
},
|
|
3075
3135
|
{
|
|
3076
3136
|
name: "x-api-token",
|
|
3077
3137
|
type: "apiKey"
|
|
@@ -3102,6 +3162,10 @@ var campaignsControllerCreateCampaignV2V2 = /* @__PURE__ */ __name((options) =>
|
|
|
3102
3162
|
var campaignsControllerGetCampaignV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3103
3163
|
return (options.client ?? client).get({
|
|
3104
3164
|
security: [
|
|
3165
|
+
{
|
|
3166
|
+
name: "x-api-token",
|
|
3167
|
+
type: "apiKey"
|
|
3168
|
+
},
|
|
3105
3169
|
{
|
|
3106
3170
|
name: "x-api-token",
|
|
3107
3171
|
type: "apiKey"
|
|
@@ -3141,6 +3205,22 @@ var campaignsControllerCancelCampaignV2V2 = /* @__PURE__ */ __name((options) =>
|
|
|
3141
3205
|
...options
|
|
3142
3206
|
});
|
|
3143
3207
|
}, "campaignsControllerCancelCampaignV2V2");
|
|
3208
|
+
var campaignsControllerGetCampaignZonesV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3209
|
+
return (options.client ?? client).get({
|
|
3210
|
+
security: [
|
|
3211
|
+
{
|
|
3212
|
+
name: "x-api-token",
|
|
3213
|
+
type: "apiKey"
|
|
3214
|
+
},
|
|
3215
|
+
{
|
|
3216
|
+
name: "x-api-token",
|
|
3217
|
+
type: "apiKey"
|
|
3218
|
+
}
|
|
3219
|
+
],
|
|
3220
|
+
url: "/v2/campaigns/{id}/zones",
|
|
3221
|
+
...options
|
|
3222
|
+
});
|
|
3223
|
+
}, "campaignsControllerGetCampaignZonesV2V2");
|
|
3144
3224
|
var flightPlansControllerGetManyV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3145
3225
|
return (options?.client ?? client).get({
|
|
3146
3226
|
security: [
|
|
@@ -3354,6 +3434,10 @@ var flightsControllerSubmitProvenanceV2V2 = /* @__PURE__ */ __name((options) =>
|
|
|
3354
3434
|
var missionsControllerGetMissionsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3355
3435
|
return (options?.client ?? client).get({
|
|
3356
3436
|
security: [
|
|
3437
|
+
{
|
|
3438
|
+
name: "x-api-token",
|
|
3439
|
+
type: "apiKey"
|
|
3440
|
+
},
|
|
3357
3441
|
{
|
|
3358
3442
|
name: "x-api-token",
|
|
3359
3443
|
type: "apiKey"
|
|
@@ -3384,6 +3468,10 @@ var missionsControllerCreateMissionsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
|
3384
3468
|
var missionsControllerGetMissionV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3385
3469
|
return (options.client ?? client).get({
|
|
3386
3470
|
security: [
|
|
3471
|
+
{
|
|
3472
|
+
name: "x-api-token",
|
|
3473
|
+
type: "apiKey"
|
|
3474
|
+
},
|
|
3387
3475
|
{
|
|
3388
3476
|
name: "x-api-token",
|
|
3389
3477
|
type: "apiKey"
|
|
@@ -3437,6 +3525,86 @@ var missionsControllerRetryMissionV2V2 = /* @__PURE__ */ __name((options) => {
|
|
|
3437
3525
|
...options
|
|
3438
3526
|
});
|
|
3439
3527
|
}, "missionsControllerRetryMissionV2V2");
|
|
3528
|
+
var pilotsControllerGetPilotReputationV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3529
|
+
return (options.client ?? client).get({
|
|
3530
|
+
security: [
|
|
3531
|
+
{
|
|
3532
|
+
name: "x-api-token",
|
|
3533
|
+
type: "apiKey"
|
|
3534
|
+
}
|
|
3535
|
+
],
|
|
3536
|
+
url: "/v2/pilots/{address}/reputation",
|
|
3537
|
+
...options
|
|
3538
|
+
});
|
|
3539
|
+
}, "pilotsControllerGetPilotReputationV2V2");
|
|
3540
|
+
var reservationsControllerGetReservationsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3541
|
+
return (options?.client ?? client).get({
|
|
3542
|
+
security: [
|
|
3543
|
+
{
|
|
3544
|
+
name: "x-api-token",
|
|
3545
|
+
type: "apiKey"
|
|
3546
|
+
},
|
|
3547
|
+
{
|
|
3548
|
+
name: "x-api-token",
|
|
3549
|
+
type: "apiKey"
|
|
3550
|
+
}
|
|
3551
|
+
],
|
|
3552
|
+
responseTransformer: reservationsControllerGetReservationsV2V2ResponseTransformer,
|
|
3553
|
+
url: "/v2/reservations",
|
|
3554
|
+
...options
|
|
3555
|
+
});
|
|
3556
|
+
}, "reservationsControllerGetReservationsV2V2");
|
|
3557
|
+
var reservationsControllerCreateReservationV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3558
|
+
return (options.client ?? client).post({
|
|
3559
|
+
security: [
|
|
3560
|
+
{
|
|
3561
|
+
name: "x-api-token",
|
|
3562
|
+
type: "apiKey"
|
|
3563
|
+
}
|
|
3564
|
+
],
|
|
3565
|
+
responseTransformer: reservationsControllerCreateReservationV2V2ResponseTransformer,
|
|
3566
|
+
url: "/v2/reservations",
|
|
3567
|
+
...options,
|
|
3568
|
+
headers: {
|
|
3569
|
+
"Content-Type": "application/json",
|
|
3570
|
+
...options.headers
|
|
3571
|
+
}
|
|
3572
|
+
});
|
|
3573
|
+
}, "reservationsControllerCreateReservationV2V2");
|
|
3574
|
+
var reservationsControllerGetReservationV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3575
|
+
return (options.client ?? client).get({
|
|
3576
|
+
security: [
|
|
3577
|
+
{
|
|
3578
|
+
name: "x-api-token",
|
|
3579
|
+
type: "apiKey"
|
|
3580
|
+
},
|
|
3581
|
+
{
|
|
3582
|
+
name: "x-api-token",
|
|
3583
|
+
type: "apiKey"
|
|
3584
|
+
}
|
|
3585
|
+
],
|
|
3586
|
+
responseTransformer: reservationsControllerGetReservationV2V2ResponseTransformer,
|
|
3587
|
+
url: "/v2/reservations/{id}",
|
|
3588
|
+
...options
|
|
3589
|
+
});
|
|
3590
|
+
}, "reservationsControllerGetReservationV2V2");
|
|
3591
|
+
var reservationsControllerCancelReservationV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3592
|
+
return (options.client ?? client).post({
|
|
3593
|
+
security: [
|
|
3594
|
+
{
|
|
3595
|
+
name: "x-api-token",
|
|
3596
|
+
type: "apiKey"
|
|
3597
|
+
}
|
|
3598
|
+
],
|
|
3599
|
+
responseTransformer: reservationsControllerCancelReservationV2V2ResponseTransformer,
|
|
3600
|
+
url: "/v2/reservations/{id}/cancel",
|
|
3601
|
+
...options,
|
|
3602
|
+
headers: {
|
|
3603
|
+
"Content-Type": "application/json",
|
|
3604
|
+
...options.headers
|
|
3605
|
+
}
|
|
3606
|
+
});
|
|
3607
|
+
}, "reservationsControllerCancelReservationV2V2");
|
|
3440
3608
|
var rewardsControllerListRewardsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3441
3609
|
return (options?.client ?? client).get({
|
|
3442
3610
|
security: [
|
|
@@ -3469,6 +3637,10 @@ var zonesControllerCreateZonesV2V2 = /* @__PURE__ */ __name((options) => {
|
|
|
3469
3637
|
var zonesControllerGetZoneV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3470
3638
|
return (options.client ?? client).get({
|
|
3471
3639
|
security: [
|
|
3640
|
+
{
|
|
3641
|
+
name: "x-api-token",
|
|
3642
|
+
type: "apiKey"
|
|
3643
|
+
},
|
|
3472
3644
|
{
|
|
3473
3645
|
name: "x-api-token",
|
|
3474
3646
|
type: "apiKey"
|
|
@@ -3528,6 +3700,7 @@ var Event = z.union([
|
|
|
3528
3700
|
}).transform((wire) => BigInt(wire.value)),
|
|
3529
3701
|
zoneId: z.string(),
|
|
3530
3702
|
flightPlanId: z.number(),
|
|
3703
|
+
mfFlightPlanId: z.string().uuid().optional(),
|
|
3531
3704
|
campaigns: z.array(z.string()),
|
|
3532
3705
|
captureStartTime: z.string().datetime({
|
|
3533
3706
|
offset: true
|
|
@@ -3567,7 +3740,8 @@ var Event = z.union([
|
|
|
3567
3740
|
value: z.string()
|
|
3568
3741
|
}).transform((wire) => BigInt(wire.value)).optional(),
|
|
3569
3742
|
isOpen: z.boolean().optional(),
|
|
3570
|
-
campaigns: z.array(z.string()).optional()
|
|
3743
|
+
campaigns: z.array(z.string()).optional(),
|
|
3744
|
+
mfFlightPlanId: z.string().uuid().optional()
|
|
3571
3745
|
}).catchall(z.any())
|
|
3572
3746
|
}).catchall(z.any()),
|
|
3573
3747
|
z.object({
|
|
@@ -3740,6 +3914,7 @@ export {
|
|
|
3740
3914
|
campaignsControllerGet0V1,
|
|
3741
3915
|
campaignsControllerGet1,
|
|
3742
3916
|
campaignsControllerGetCampaignV2V2,
|
|
3917
|
+
campaignsControllerGetCampaignZonesV2V2,
|
|
3743
3918
|
campaignsControllerGetCampaignsV2V2,
|
|
3744
3919
|
campaignsControllerGetMany0V1,
|
|
3745
3920
|
campaignsControllerGetMany1,
|
|
@@ -3833,6 +4008,7 @@ export {
|
|
|
3833
4008
|
missionsControllerUpdateMissions0V1,
|
|
3834
4009
|
missionsControllerUpdateMissions1,
|
|
3835
4010
|
parseWebhookEvent,
|
|
4011
|
+
pilotsControllerGetPilotReputationV2V2,
|
|
3836
4012
|
protocolTriggersApiControllerTriggerMissionClose0V1,
|
|
3837
4013
|
protocolTriggersApiControllerTriggerMissionClose1,
|
|
3838
4014
|
protocolTriggersApiControllerTriggerPayout0V1,
|
|
@@ -3841,6 +4017,10 @@ export {
|
|
|
3841
4017
|
quotesControllerCreateQuote1,
|
|
3842
4018
|
quotesControllerGetQuote0V1,
|
|
3843
4019
|
quotesControllerGetQuote1,
|
|
4020
|
+
reservationsControllerCancelReservationV2V2,
|
|
4021
|
+
reservationsControllerCreateReservationV2V2,
|
|
4022
|
+
reservationsControllerGetReservationV2V2,
|
|
4023
|
+
reservationsControllerGetReservationsV2V2,
|
|
3844
4024
|
reviewProposal,
|
|
3845
4025
|
rewardsControllerListRewardsV2V2,
|
|
3846
4026
|
submitProposal,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layer-drone/protocol",
|
|
3
3
|
"description": "Layer Drone protocol SDK with typed API client and event parsing",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"@types/node": "^20.3.1",
|
|
24
24
|
"csv-parse": "^6.1.0",
|
|
25
25
|
"express": "^4.17.7",
|
|
26
|
+
"h3-js": "^4.2.1",
|
|
26
27
|
"jest": "^29.7.0",
|
|
27
28
|
"json-refs": "^3.0.15",
|
|
28
29
|
"json-schema-to-zod": "^2.6.1",
|
|
@@ -34,8 +35,8 @@
|
|
|
34
35
|
"zod": "^3.24.2",
|
|
35
36
|
"zod-to-json-schema": "^3.24.5",
|
|
36
37
|
"@layer-drone/eslint-config": "0.0.0",
|
|
37
|
-
"@layer-drone/
|
|
38
|
-
"@layer-drone/
|
|
38
|
+
"@layer-drone/typescript-config": "0.0.0",
|
|
39
|
+
"@layer-drone/event-schema": "0.0.0"
|
|
39
40
|
},
|
|
40
41
|
"peerDependencies": {
|
|
41
42
|
"zod": "^3.x.x"
|