@layer-drone/protocol 2.3.1 → 2.5.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 +820 -6
- package/dist/index.d.ts +820 -6
- package/dist/index.js +102 -0
- package/dist/index.mjs +101 -0
- package/package.json +3 -3
- package/src/client/sdk.gen.ts +31 -0
- package/src/client/types.gen.ts +54 -0
- package/src/event/types.gen.ts +105 -0
package/dist/index.js
CHANGED
|
@@ -146,6 +146,7 @@ __export(index_exports, {
|
|
|
146
146
|
missionsControllerUpdateMissions1: () => missionsControllerUpdateMissions1,
|
|
147
147
|
parseWebhookEvent: () => parseWebhookEvent,
|
|
148
148
|
pilotsControllerGetPilotReputationV2V2: () => pilotsControllerGetPilotReputationV2V2,
|
|
149
|
+
pilotsControllerGetPilotReservationSlotsV2V2: () => pilotsControllerGetPilotReservationSlotsV2V2,
|
|
149
150
|
protocolTriggersApiControllerTriggerMissionClose0V1: () => protocolTriggersApiControllerTriggerMissionClose0V1,
|
|
150
151
|
protocolTriggersApiControllerTriggerMissionClose1: () => protocolTriggersApiControllerTriggerMissionClose1,
|
|
151
152
|
protocolTriggersApiControllerTriggerPayout0V1: () => protocolTriggersApiControllerTriggerPayout0V1,
|
|
@@ -3730,6 +3731,18 @@ var pilotsControllerGetPilotReputationV2V2 = /* @__PURE__ */ __name((options) =>
|
|
|
3730
3731
|
...options
|
|
3731
3732
|
});
|
|
3732
3733
|
}, "pilotsControllerGetPilotReputationV2V2");
|
|
3734
|
+
var pilotsControllerGetPilotReservationSlotsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3735
|
+
return (options.client ?? client).get({
|
|
3736
|
+
security: [
|
|
3737
|
+
{
|
|
3738
|
+
name: "x-api-token",
|
|
3739
|
+
type: "apiKey"
|
|
3740
|
+
}
|
|
3741
|
+
],
|
|
3742
|
+
url: "/v2/pilots/{address}/reservation-slots",
|
|
3743
|
+
...options
|
|
3744
|
+
});
|
|
3745
|
+
}, "pilotsControllerGetPilotReservationSlotsV2V2");
|
|
3733
3746
|
var reservationsControllerGetReservationsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3734
3747
|
return (options?.client ?? client).get({
|
|
3735
3748
|
security: [
|
|
@@ -4031,6 +4044,94 @@ var Event = import_zod.z.union([
|
|
|
4031
4044
|
}).optional()
|
|
4032
4045
|
}).catchall(import_zod.z.any()).optional()
|
|
4033
4046
|
}).catchall(import_zod.z.any())
|
|
4047
|
+
}).catchall(import_zod.z.any()),
|
|
4048
|
+
import_zod.z.object({
|
|
4049
|
+
id: import_zod.z.string(),
|
|
4050
|
+
event_type: import_zod.z.literal("fulfillment.reservation"),
|
|
4051
|
+
timestamp: import_zod.z.string(),
|
|
4052
|
+
data: import_zod.z.object({
|
|
4053
|
+
version: import_zod.z.literal(1),
|
|
4054
|
+
data: import_zod.z.object({
|
|
4055
|
+
id: import_zod.z.string().uuid(),
|
|
4056
|
+
missionId: import_zod.z.string().uuid(),
|
|
4057
|
+
missionHoldId: import_zod.z.string().uuid(),
|
|
4058
|
+
pilotAddress: import_zod.z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
4059
|
+
status: import_zod.z.enum([
|
|
4060
|
+
"active",
|
|
4061
|
+
"completed",
|
|
4062
|
+
"cancelled",
|
|
4063
|
+
"expired"
|
|
4064
|
+
]),
|
|
4065
|
+
endedAt: import_zod.z.union([
|
|
4066
|
+
import_zod.z.string().datetime({
|
|
4067
|
+
offset: true
|
|
4068
|
+
}),
|
|
4069
|
+
import_zod.z.null()
|
|
4070
|
+
]),
|
|
4071
|
+
createdAt: import_zod.z.string().datetime({
|
|
4072
|
+
offset: true
|
|
4073
|
+
}),
|
|
4074
|
+
updatedAt: import_zod.z.string().datetime({
|
|
4075
|
+
offset: true
|
|
4076
|
+
})
|
|
4077
|
+
}).catchall(import_zod.z.any()),
|
|
4078
|
+
changes: import_zod.z.array(import_zod.z.enum([
|
|
4079
|
+
"id",
|
|
4080
|
+
"missionId",
|
|
4081
|
+
"missionHoldId",
|
|
4082
|
+
"pilotAddress",
|
|
4083
|
+
"status",
|
|
4084
|
+
"endedAt",
|
|
4085
|
+
"createdAt",
|
|
4086
|
+
"updatedAt"
|
|
4087
|
+
])).optional()
|
|
4088
|
+
}).catchall(import_zod.z.any())
|
|
4089
|
+
}).catchall(import_zod.z.any()),
|
|
4090
|
+
import_zod.z.object({
|
|
4091
|
+
id: import_zod.z.string(),
|
|
4092
|
+
event_type: import_zod.z.literal("fulfillment.mission-hold"),
|
|
4093
|
+
timestamp: import_zod.z.string(),
|
|
4094
|
+
data: import_zod.z.object({
|
|
4095
|
+
version: import_zod.z.literal(1),
|
|
4096
|
+
data: import_zod.z.object({
|
|
4097
|
+
id: import_zod.z.string().uuid(),
|
|
4098
|
+
missionId: import_zod.z.string().uuid(),
|
|
4099
|
+
pilotAddress: import_zod.z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
4100
|
+
expiresAt: import_zod.z.string().datetime({
|
|
4101
|
+
offset: true
|
|
4102
|
+
}),
|
|
4103
|
+
releasedAt: import_zod.z.union([
|
|
4104
|
+
import_zod.z.string().datetime({
|
|
4105
|
+
offset: true
|
|
4106
|
+
}),
|
|
4107
|
+
import_zod.z.null()
|
|
4108
|
+
]),
|
|
4109
|
+
releasedReason: import_zod.z.union([
|
|
4110
|
+
import_zod.z.enum([
|
|
4111
|
+
"expired",
|
|
4112
|
+
"completed",
|
|
4113
|
+
"cancelled"
|
|
4114
|
+
]),
|
|
4115
|
+
import_zod.z.null()
|
|
4116
|
+
]),
|
|
4117
|
+
createdAt: import_zod.z.string().datetime({
|
|
4118
|
+
offset: true
|
|
4119
|
+
}),
|
|
4120
|
+
updatedAt: import_zod.z.string().datetime({
|
|
4121
|
+
offset: true
|
|
4122
|
+
})
|
|
4123
|
+
}).catchall(import_zod.z.any()),
|
|
4124
|
+
changes: import_zod.z.array(import_zod.z.enum([
|
|
4125
|
+
"id",
|
|
4126
|
+
"missionId",
|
|
4127
|
+
"pilotAddress",
|
|
4128
|
+
"expiresAt",
|
|
4129
|
+
"releasedAt",
|
|
4130
|
+
"releasedReason",
|
|
4131
|
+
"createdAt",
|
|
4132
|
+
"updatedAt"
|
|
4133
|
+
])).optional()
|
|
4134
|
+
}).catchall(import_zod.z.any())
|
|
4034
4135
|
}).catchall(import_zod.z.any())
|
|
4035
4136
|
]);
|
|
4036
4137
|
|
|
@@ -4203,6 +4304,7 @@ __name(getFirstHeader, "getFirstHeader");
|
|
|
4203
4304
|
missionsControllerUpdateMissions1,
|
|
4204
4305
|
parseWebhookEvent,
|
|
4205
4306
|
pilotsControllerGetPilotReputationV2V2,
|
|
4307
|
+
pilotsControllerGetPilotReservationSlotsV2V2,
|
|
4206
4308
|
protocolTriggersApiControllerTriggerMissionClose0V1,
|
|
4207
4309
|
protocolTriggersApiControllerTriggerMissionClose1,
|
|
4208
4310
|
protocolTriggersApiControllerTriggerPayout0V1,
|
package/dist/index.mjs
CHANGED
|
@@ -3537,6 +3537,18 @@ var pilotsControllerGetPilotReputationV2V2 = /* @__PURE__ */ __name((options) =>
|
|
|
3537
3537
|
...options
|
|
3538
3538
|
});
|
|
3539
3539
|
}, "pilotsControllerGetPilotReputationV2V2");
|
|
3540
|
+
var pilotsControllerGetPilotReservationSlotsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3541
|
+
return (options.client ?? client).get({
|
|
3542
|
+
security: [
|
|
3543
|
+
{
|
|
3544
|
+
name: "x-api-token",
|
|
3545
|
+
type: "apiKey"
|
|
3546
|
+
}
|
|
3547
|
+
],
|
|
3548
|
+
url: "/v2/pilots/{address}/reservation-slots",
|
|
3549
|
+
...options
|
|
3550
|
+
});
|
|
3551
|
+
}, "pilotsControllerGetPilotReservationSlotsV2V2");
|
|
3540
3552
|
var reservationsControllerGetReservationsV2V2 = /* @__PURE__ */ __name((options) => {
|
|
3541
3553
|
return (options?.client ?? client).get({
|
|
3542
3554
|
security: [
|
|
@@ -3838,6 +3850,94 @@ var Event = z.union([
|
|
|
3838
3850
|
}).optional()
|
|
3839
3851
|
}).catchall(z.any()).optional()
|
|
3840
3852
|
}).catchall(z.any())
|
|
3853
|
+
}).catchall(z.any()),
|
|
3854
|
+
z.object({
|
|
3855
|
+
id: z.string(),
|
|
3856
|
+
event_type: z.literal("fulfillment.reservation"),
|
|
3857
|
+
timestamp: z.string(),
|
|
3858
|
+
data: z.object({
|
|
3859
|
+
version: z.literal(1),
|
|
3860
|
+
data: z.object({
|
|
3861
|
+
id: z.string().uuid(),
|
|
3862
|
+
missionId: z.string().uuid(),
|
|
3863
|
+
missionHoldId: z.string().uuid(),
|
|
3864
|
+
pilotAddress: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
3865
|
+
status: z.enum([
|
|
3866
|
+
"active",
|
|
3867
|
+
"completed",
|
|
3868
|
+
"cancelled",
|
|
3869
|
+
"expired"
|
|
3870
|
+
]),
|
|
3871
|
+
endedAt: z.union([
|
|
3872
|
+
z.string().datetime({
|
|
3873
|
+
offset: true
|
|
3874
|
+
}),
|
|
3875
|
+
z.null()
|
|
3876
|
+
]),
|
|
3877
|
+
createdAt: z.string().datetime({
|
|
3878
|
+
offset: true
|
|
3879
|
+
}),
|
|
3880
|
+
updatedAt: z.string().datetime({
|
|
3881
|
+
offset: true
|
|
3882
|
+
})
|
|
3883
|
+
}).catchall(z.any()),
|
|
3884
|
+
changes: z.array(z.enum([
|
|
3885
|
+
"id",
|
|
3886
|
+
"missionId",
|
|
3887
|
+
"missionHoldId",
|
|
3888
|
+
"pilotAddress",
|
|
3889
|
+
"status",
|
|
3890
|
+
"endedAt",
|
|
3891
|
+
"createdAt",
|
|
3892
|
+
"updatedAt"
|
|
3893
|
+
])).optional()
|
|
3894
|
+
}).catchall(z.any())
|
|
3895
|
+
}).catchall(z.any()),
|
|
3896
|
+
z.object({
|
|
3897
|
+
id: z.string(),
|
|
3898
|
+
event_type: z.literal("fulfillment.mission-hold"),
|
|
3899
|
+
timestamp: z.string(),
|
|
3900
|
+
data: z.object({
|
|
3901
|
+
version: z.literal(1),
|
|
3902
|
+
data: z.object({
|
|
3903
|
+
id: z.string().uuid(),
|
|
3904
|
+
missionId: z.string().uuid(),
|
|
3905
|
+
pilotAddress: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
3906
|
+
expiresAt: z.string().datetime({
|
|
3907
|
+
offset: true
|
|
3908
|
+
}),
|
|
3909
|
+
releasedAt: z.union([
|
|
3910
|
+
z.string().datetime({
|
|
3911
|
+
offset: true
|
|
3912
|
+
}),
|
|
3913
|
+
z.null()
|
|
3914
|
+
]),
|
|
3915
|
+
releasedReason: z.union([
|
|
3916
|
+
z.enum([
|
|
3917
|
+
"expired",
|
|
3918
|
+
"completed",
|
|
3919
|
+
"cancelled"
|
|
3920
|
+
]),
|
|
3921
|
+
z.null()
|
|
3922
|
+
]),
|
|
3923
|
+
createdAt: z.string().datetime({
|
|
3924
|
+
offset: true
|
|
3925
|
+
}),
|
|
3926
|
+
updatedAt: z.string().datetime({
|
|
3927
|
+
offset: true
|
|
3928
|
+
})
|
|
3929
|
+
}).catchall(z.any()),
|
|
3930
|
+
changes: z.array(z.enum([
|
|
3931
|
+
"id",
|
|
3932
|
+
"missionId",
|
|
3933
|
+
"pilotAddress",
|
|
3934
|
+
"expiresAt",
|
|
3935
|
+
"releasedAt",
|
|
3936
|
+
"releasedReason",
|
|
3937
|
+
"createdAt",
|
|
3938
|
+
"updatedAt"
|
|
3939
|
+
])).optional()
|
|
3940
|
+
}).catchall(z.any())
|
|
3841
3941
|
}).catchall(z.any())
|
|
3842
3942
|
]);
|
|
3843
3943
|
|
|
@@ -4009,6 +4109,7 @@ export {
|
|
|
4009
4109
|
missionsControllerUpdateMissions1,
|
|
4010
4110
|
parseWebhookEvent,
|
|
4011
4111
|
pilotsControllerGetPilotReputationV2V2,
|
|
4112
|
+
pilotsControllerGetPilotReservationSlotsV2V2,
|
|
4012
4113
|
protocolTriggersApiControllerTriggerMissionClose0V1,
|
|
4013
4114
|
protocolTriggersApiControllerTriggerMissionClose1,
|
|
4014
4115
|
protocolTriggersApiControllerTriggerPayout0V1,
|
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.5.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"zod": "^3.24.2",
|
|
36
36
|
"zod-to-json-schema": "^3.24.5",
|
|
37
37
|
"@layer-drone/eslint-config": "0.0.0",
|
|
38
|
-
"@layer-drone/
|
|
39
|
-
"@layer-drone/
|
|
38
|
+
"@layer-drone/event-schema": "0.0.0",
|
|
39
|
+
"@layer-drone/typescript-config": "0.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"zod": "^3.x.x"
|
package/src/client/sdk.gen.ts
CHANGED
|
@@ -417,6 +417,9 @@ import type {
|
|
|
417
417
|
PilotsControllerGetPilotReputationV2V2Data,
|
|
418
418
|
PilotsControllerGetPilotReputationV2V2Errors,
|
|
419
419
|
PilotsControllerGetPilotReputationV2V2Responses,
|
|
420
|
+
PilotsControllerGetPilotReservationSlotsV2V2Data,
|
|
421
|
+
PilotsControllerGetPilotReservationSlotsV2V2Errors,
|
|
422
|
+
PilotsControllerGetPilotReservationSlotsV2V2Responses,
|
|
420
423
|
ProtocolTriggersApiControllerTriggerMissionClose0V1Data,
|
|
421
424
|
ProtocolTriggersApiControllerTriggerMissionClose0V1Errors,
|
|
422
425
|
ProtocolTriggersApiControllerTriggerMissionClose0V1Responses,
|
|
@@ -4543,6 +4546,34 @@ export const pilotsControllerGetPilotReputationV2V2 = <
|
|
|
4543
4546
|
});
|
|
4544
4547
|
};
|
|
4545
4548
|
|
|
4549
|
+
/**
|
|
4550
|
+
* Get a pilot's reservation slots (mission-fulfillment)
|
|
4551
|
+
* Returns how many reservation slots the pilot's reputation points unlock, how many their active reservations use, and how many are free, from mission-fulfillment.
|
|
4552
|
+
*/
|
|
4553
|
+
export const pilotsControllerGetPilotReservationSlotsV2V2 = <
|
|
4554
|
+
ThrowOnError extends boolean = true,
|
|
4555
|
+
>(
|
|
4556
|
+
options: Options<
|
|
4557
|
+
PilotsControllerGetPilotReservationSlotsV2V2Data,
|
|
4558
|
+
ThrowOnError
|
|
4559
|
+
>,
|
|
4560
|
+
) => {
|
|
4561
|
+
return (options.client ?? _heyApiClient).get<
|
|
4562
|
+
PilotsControllerGetPilotReservationSlotsV2V2Responses,
|
|
4563
|
+
PilotsControllerGetPilotReservationSlotsV2V2Errors,
|
|
4564
|
+
ThrowOnError
|
|
4565
|
+
>({
|
|
4566
|
+
security: [
|
|
4567
|
+
{
|
|
4568
|
+
name: "x-api-token",
|
|
4569
|
+
type: "apiKey",
|
|
4570
|
+
},
|
|
4571
|
+
],
|
|
4572
|
+
url: "/v2/pilots/{address}/reservation-slots",
|
|
4573
|
+
...options,
|
|
4574
|
+
});
|
|
4575
|
+
};
|
|
4576
|
+
|
|
4546
4577
|
/**
|
|
4547
4578
|
* List reservations (mission-fulfillment)
|
|
4548
4579
|
* Returns reservations from mission-fulfillment.
|
package/src/client/types.gen.ts
CHANGED
|
@@ -1005,6 +1005,9 @@ export type CreateVaultsResponseDto = {
|
|
|
1005
1005
|
export type CreateWebhookBody = {
|
|
1006
1006
|
name: string;
|
|
1007
1007
|
url: string;
|
|
1008
|
+
/**
|
|
1009
|
+
* "*" subscribes to every event type except the transitional fulfillment.reservation and fulfillment.mission-hold, which are delivered only when named and will be removed once Pilot API MVT indexing moves to LayerDrone.
|
|
1010
|
+
*/
|
|
1008
1011
|
event_types: Array<
|
|
1009
1012
|
| "test"
|
|
1010
1013
|
| "protocol.mission.created"
|
|
@@ -1013,6 +1016,8 @@ export type CreateWebhookBody = {
|
|
|
1013
1016
|
| "protocol.flight.submitted"
|
|
1014
1017
|
| "protocol.flight.reviewed"
|
|
1015
1018
|
| "protocol.zone"
|
|
1019
|
+
| "fulfillment.reservation"
|
|
1020
|
+
| "fulfillment.mission-hold"
|
|
1016
1021
|
| "*"
|
|
1017
1022
|
>;
|
|
1018
1023
|
active: boolean;
|
|
@@ -1027,6 +1032,9 @@ export type GetWebhooksResponse = Array<{
|
|
|
1027
1032
|
id: number;
|
|
1028
1033
|
name: string;
|
|
1029
1034
|
url: string;
|
|
1035
|
+
/**
|
|
1036
|
+
* "*" subscribes to every event type except the transitional fulfillment.reservation and fulfillment.mission-hold, which are delivered only when named and will be removed once Pilot API MVT indexing moves to LayerDrone.
|
|
1037
|
+
*/
|
|
1030
1038
|
event_types: Array<
|
|
1031
1039
|
| "test"
|
|
1032
1040
|
| "protocol.mission.created"
|
|
@@ -1035,6 +1043,8 @@ export type GetWebhooksResponse = Array<{
|
|
|
1035
1043
|
| "protocol.flight.submitted"
|
|
1036
1044
|
| "protocol.flight.reviewed"
|
|
1037
1045
|
| "protocol.zone"
|
|
1046
|
+
| "fulfillment.reservation"
|
|
1047
|
+
| "fulfillment.mission-hold"
|
|
1038
1048
|
| "*"
|
|
1039
1049
|
>;
|
|
1040
1050
|
active: boolean;
|
|
@@ -1049,6 +1059,9 @@ export type GetWebhookResponse = {
|
|
|
1049
1059
|
id: number;
|
|
1050
1060
|
name: string;
|
|
1051
1061
|
url: string;
|
|
1062
|
+
/**
|
|
1063
|
+
* "*" subscribes to every event type except the transitional fulfillment.reservation and fulfillment.mission-hold, which are delivered only when named and will be removed once Pilot API MVT indexing moves to LayerDrone.
|
|
1064
|
+
*/
|
|
1052
1065
|
event_types: Array<
|
|
1053
1066
|
| "test"
|
|
1054
1067
|
| "protocol.mission.created"
|
|
@@ -1057,6 +1070,8 @@ export type GetWebhookResponse = {
|
|
|
1057
1070
|
| "protocol.flight.submitted"
|
|
1058
1071
|
| "protocol.flight.reviewed"
|
|
1059
1072
|
| "protocol.zone"
|
|
1073
|
+
| "fulfillment.reservation"
|
|
1074
|
+
| "fulfillment.mission-hold"
|
|
1060
1075
|
| "*"
|
|
1061
1076
|
>;
|
|
1062
1077
|
active: boolean;
|
|
@@ -1070,6 +1085,9 @@ export type GetWebhookResponse = {
|
|
|
1070
1085
|
export type UpdateWebhookBody = {
|
|
1071
1086
|
name?: string;
|
|
1072
1087
|
url?: string;
|
|
1088
|
+
/**
|
|
1089
|
+
* "*" subscribes to every event type except the transitional fulfillment.reservation and fulfillment.mission-hold, which are delivered only when named and will be removed once Pilot API MVT indexing moves to LayerDrone.
|
|
1090
|
+
*/
|
|
1073
1091
|
event_types?: Array<
|
|
1074
1092
|
| "test"
|
|
1075
1093
|
| "protocol.mission.created"
|
|
@@ -1078,6 +1096,8 @@ export type UpdateWebhookBody = {
|
|
|
1078
1096
|
| "protocol.flight.submitted"
|
|
1079
1097
|
| "protocol.flight.reviewed"
|
|
1080
1098
|
| "protocol.zone"
|
|
1099
|
+
| "fulfillment.reservation"
|
|
1100
|
+
| "fulfillment.mission-hold"
|
|
1081
1101
|
| "*"
|
|
1082
1102
|
>;
|
|
1083
1103
|
active?: boolean;
|
|
@@ -1087,6 +1107,9 @@ export type UpdateWebhookResponse = {
|
|
|
1087
1107
|
id: number;
|
|
1088
1108
|
name: string;
|
|
1089
1109
|
url: string;
|
|
1110
|
+
/**
|
|
1111
|
+
* "*" subscribes to every event type except the transitional fulfillment.reservation and fulfillment.mission-hold, which are delivered only when named and will be removed once Pilot API MVT indexing moves to LayerDrone.
|
|
1112
|
+
*/
|
|
1090
1113
|
event_types: Array<
|
|
1091
1114
|
| "test"
|
|
1092
1115
|
| "protocol.mission.created"
|
|
@@ -1095,6 +1118,8 @@ export type UpdateWebhookResponse = {
|
|
|
1095
1118
|
| "protocol.flight.submitted"
|
|
1096
1119
|
| "protocol.flight.reviewed"
|
|
1097
1120
|
| "protocol.zone"
|
|
1121
|
+
| "fulfillment.reservation"
|
|
1122
|
+
| "fulfillment.mission-hold"
|
|
1098
1123
|
| "*"
|
|
1099
1124
|
>;
|
|
1100
1125
|
active: boolean;
|
|
@@ -1450,6 +1475,7 @@ export type FlightPathIntendedResponse = {
|
|
|
1450
1475
|
id: string;
|
|
1451
1476
|
slug?: string | null;
|
|
1452
1477
|
name?: string;
|
|
1478
|
+
family?: "Map" | "Multi Panorama" | "Panorama" | "Grid Map" | "Hybrid";
|
|
1453
1479
|
};
|
|
1454
1480
|
zoneHash: string;
|
|
1455
1481
|
imageCount: number;
|
|
@@ -1848,6 +1874,13 @@ export type CancelReservationBody = {
|
|
|
1848
1874
|
pilot_address: string;
|
|
1849
1875
|
};
|
|
1850
1876
|
|
|
1877
|
+
export type PilotReservationSlotsResponse = {
|
|
1878
|
+
pilot_address: string;
|
|
1879
|
+
total: number;
|
|
1880
|
+
used: number;
|
|
1881
|
+
free: number;
|
|
1882
|
+
};
|
|
1883
|
+
|
|
1851
1884
|
export type PilotReputationResponse = {
|
|
1852
1885
|
pilot_address: string;
|
|
1853
1886
|
points: number;
|
|
@@ -5551,6 +5584,27 @@ export type PilotsControllerGetPilotReputationV2V2Responses = {
|
|
|
5551
5584
|
export type PilotsControllerGetPilotReputationV2V2Response =
|
|
5552
5585
|
PilotsControllerGetPilotReputationV2V2Responses[keyof PilotsControllerGetPilotReputationV2V2Responses];
|
|
5553
5586
|
|
|
5587
|
+
export type PilotsControllerGetPilotReservationSlotsV2V2Data = {
|
|
5588
|
+
body?: never;
|
|
5589
|
+
path: {
|
|
5590
|
+
address: string;
|
|
5591
|
+
};
|
|
5592
|
+
query?: never;
|
|
5593
|
+
url: "/v2/pilots/{address}/reservation-slots";
|
|
5594
|
+
};
|
|
5595
|
+
|
|
5596
|
+
export type PilotsControllerGetPilotReservationSlotsV2V2Errors = {
|
|
5597
|
+
401: unknown;
|
|
5598
|
+
403: unknown;
|
|
5599
|
+
};
|
|
5600
|
+
|
|
5601
|
+
export type PilotsControllerGetPilotReservationSlotsV2V2Responses = {
|
|
5602
|
+
200: PilotReservationSlotsResponse;
|
|
5603
|
+
};
|
|
5604
|
+
|
|
5605
|
+
export type PilotsControllerGetPilotReservationSlotsV2V2Response =
|
|
5606
|
+
PilotsControllerGetPilotReservationSlotsV2V2Responses[keyof PilotsControllerGetPilotReservationSlotsV2V2Responses];
|
|
5607
|
+
|
|
5554
5608
|
export type ReservationsControllerGetReservationsV2V2Data = {
|
|
5555
5609
|
body?: never;
|
|
5556
5610
|
path?: never;
|
package/src/event/types.gen.ts
CHANGED
|
@@ -169,6 +169,91 @@ export const Event = z.union([
|
|
|
169
169
|
.catchall(z.any()),
|
|
170
170
|
})
|
|
171
171
|
.catchall(z.any()),
|
|
172
|
+
z
|
|
173
|
+
.object({
|
|
174
|
+
id: z.string(),
|
|
175
|
+
event_type: z.literal("fulfillment.reservation"),
|
|
176
|
+
timestamp: z.string(),
|
|
177
|
+
data: z
|
|
178
|
+
.object({
|
|
179
|
+
version: z.literal(1),
|
|
180
|
+
data: z
|
|
181
|
+
.object({
|
|
182
|
+
id: z.string().uuid(),
|
|
183
|
+
missionId: z.string().uuid(),
|
|
184
|
+
missionHoldId: z.string().uuid(),
|
|
185
|
+
pilotAddress: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
186
|
+
status: z.enum(["active", "completed", "cancelled", "expired"]),
|
|
187
|
+
endedAt: z.union([
|
|
188
|
+
z.string().datetime({ offset: true }),
|
|
189
|
+
z.null(),
|
|
190
|
+
]),
|
|
191
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
192
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
193
|
+
})
|
|
194
|
+
.catchall(z.any()),
|
|
195
|
+
changes: z
|
|
196
|
+
.array(
|
|
197
|
+
z.enum([
|
|
198
|
+
"id",
|
|
199
|
+
"missionId",
|
|
200
|
+
"missionHoldId",
|
|
201
|
+
"pilotAddress",
|
|
202
|
+
"status",
|
|
203
|
+
"endedAt",
|
|
204
|
+
"createdAt",
|
|
205
|
+
"updatedAt",
|
|
206
|
+
]),
|
|
207
|
+
)
|
|
208
|
+
.optional(),
|
|
209
|
+
})
|
|
210
|
+
.catchall(z.any()),
|
|
211
|
+
})
|
|
212
|
+
.catchall(z.any()),
|
|
213
|
+
z
|
|
214
|
+
.object({
|
|
215
|
+
id: z.string(),
|
|
216
|
+
event_type: z.literal("fulfillment.mission-hold"),
|
|
217
|
+
timestamp: z.string(),
|
|
218
|
+
data: z
|
|
219
|
+
.object({
|
|
220
|
+
version: z.literal(1),
|
|
221
|
+
data: z
|
|
222
|
+
.object({
|
|
223
|
+
id: z.string().uuid(),
|
|
224
|
+
missionId: z.string().uuid(),
|
|
225
|
+
pilotAddress: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
226
|
+
expiresAt: z.string().datetime({ offset: true }),
|
|
227
|
+
releasedAt: z.union([
|
|
228
|
+
z.string().datetime({ offset: true }),
|
|
229
|
+
z.null(),
|
|
230
|
+
]),
|
|
231
|
+
releasedReason: z.union([
|
|
232
|
+
z.enum(["expired", "completed", "cancelled"]),
|
|
233
|
+
z.null(),
|
|
234
|
+
]),
|
|
235
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
236
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
237
|
+
})
|
|
238
|
+
.catchall(z.any()),
|
|
239
|
+
changes: z
|
|
240
|
+
.array(
|
|
241
|
+
z.enum([
|
|
242
|
+
"id",
|
|
243
|
+
"missionId",
|
|
244
|
+
"pilotAddress",
|
|
245
|
+
"expiresAt",
|
|
246
|
+
"releasedAt",
|
|
247
|
+
"releasedReason",
|
|
248
|
+
"createdAt",
|
|
249
|
+
"updatedAt",
|
|
250
|
+
]),
|
|
251
|
+
)
|
|
252
|
+
.optional(),
|
|
253
|
+
})
|
|
254
|
+
.catchall(z.any()),
|
|
255
|
+
})
|
|
256
|
+
.catchall(z.any()),
|
|
172
257
|
]);
|
|
173
258
|
export type Event = z.infer<typeof Event>;
|
|
174
259
|
|
|
@@ -194,3 +279,23 @@ export type FlightReviewedEvent = Extract<
|
|
|
194
279
|
{ event_type: "protocol.flight.reviewed" }
|
|
195
280
|
>;
|
|
196
281
|
export type ZoneEvent = Extract<Event, { event_type: "protocol.zone" }>;
|
|
282
|
+
/**
|
|
283
|
+
* @deprecated Transitional - for Pilot API MVT indexing only, and removed once
|
|
284
|
+
* MVT generation moves to LayerDrone. Not delivered through "*": a webhook
|
|
285
|
+
* must subscribe to it by name. Delivery is at most once, so do not treat it
|
|
286
|
+
* as a source of truth.
|
|
287
|
+
*/
|
|
288
|
+
export type FulfillmentReservationEvent = Extract<
|
|
289
|
+
Event,
|
|
290
|
+
{ event_type: "fulfillment.reservation" }
|
|
291
|
+
>;
|
|
292
|
+
/**
|
|
293
|
+
* @deprecated Transitional - for Pilot API MVT indexing only, and removed once
|
|
294
|
+
* MVT generation moves to LayerDrone. Not delivered through "*": a webhook
|
|
295
|
+
* must subscribe to it by name. Delivery is at most once, so do not treat it
|
|
296
|
+
* as a source of truth.
|
|
297
|
+
*/
|
|
298
|
+
export type FulfillmentMissionHoldEvent = Extract<
|
|
299
|
+
Event,
|
|
300
|
+
{ event_type: "fulfillment.mission-hold" }
|
|
301
|
+
>;
|