@layer-drone/protocol 1.0.1 → 1.0.2
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 +401 -6
- package/dist/index.d.ts +401 -6
- package/dist/index.js +23 -0
- package/dist/index.mjs +23 -0
- package/package.json +1 -1
- package/src/client/types.gen.ts +5 -0
- package/src/event/types.gen.ts +29 -0
package/src/client/types.gen.ts
CHANGED
|
@@ -1001,6 +1001,7 @@ export type CreateWebhookBody = {
|
|
|
1001
1001
|
| "protocol.mission.paid"
|
|
1002
1002
|
| "protocol.flight.submitted"
|
|
1003
1003
|
| "protocol.flight.reviewed"
|
|
1004
|
+
| "protocol.zone"
|
|
1004
1005
|
| "*"
|
|
1005
1006
|
>;
|
|
1006
1007
|
active: boolean;
|
|
@@ -1022,6 +1023,7 @@ export type GetWebhooksResponse = Array<{
|
|
|
1022
1023
|
| "protocol.mission.paid"
|
|
1023
1024
|
| "protocol.flight.submitted"
|
|
1024
1025
|
| "protocol.flight.reviewed"
|
|
1026
|
+
| "protocol.zone"
|
|
1025
1027
|
| "*"
|
|
1026
1028
|
>;
|
|
1027
1029
|
active: boolean;
|
|
@@ -1043,6 +1045,7 @@ export type GetWebhookResponse = {
|
|
|
1043
1045
|
| "protocol.mission.paid"
|
|
1044
1046
|
| "protocol.flight.submitted"
|
|
1045
1047
|
| "protocol.flight.reviewed"
|
|
1048
|
+
| "protocol.zone"
|
|
1046
1049
|
| "*"
|
|
1047
1050
|
>;
|
|
1048
1051
|
active: boolean;
|
|
@@ -1063,6 +1066,7 @@ export type UpdateWebhookBody = {
|
|
|
1063
1066
|
| "protocol.mission.paid"
|
|
1064
1067
|
| "protocol.flight.submitted"
|
|
1065
1068
|
| "protocol.flight.reviewed"
|
|
1069
|
+
| "protocol.zone"
|
|
1066
1070
|
| "*"
|
|
1067
1071
|
>;
|
|
1068
1072
|
active?: boolean;
|
|
@@ -1079,6 +1083,7 @@ export type UpdateWebhookResponse = {
|
|
|
1079
1083
|
| "protocol.mission.paid"
|
|
1080
1084
|
| "protocol.flight.submitted"
|
|
1081
1085
|
| "protocol.flight.reviewed"
|
|
1086
|
+
| "protocol.zone"
|
|
1082
1087
|
| "*"
|
|
1083
1088
|
>;
|
|
1084
1089
|
active: boolean;
|
package/src/event/types.gen.ts
CHANGED
|
@@ -132,6 +132,34 @@ export const Event = z.union([
|
|
|
132
132
|
.catchall(z.any()),
|
|
133
133
|
})
|
|
134
134
|
.catchall(z.any()),
|
|
135
|
+
z
|
|
136
|
+
.object({
|
|
137
|
+
id: z.string(),
|
|
138
|
+
event_type: z.literal("protocol.zone"),
|
|
139
|
+
timestamp: z.string(),
|
|
140
|
+
data: z
|
|
141
|
+
.object({
|
|
142
|
+
version: z.literal(1),
|
|
143
|
+
data: z
|
|
144
|
+
.object({
|
|
145
|
+
id: z.string(),
|
|
146
|
+
region_id: z.number(),
|
|
147
|
+
is_flyable: z.boolean(),
|
|
148
|
+
deleted_at: z.string().datetime({ offset: true }).optional(),
|
|
149
|
+
})
|
|
150
|
+
.catchall(z.any()),
|
|
151
|
+
changes: z
|
|
152
|
+
.object({
|
|
153
|
+
region_id: z.number().optional(),
|
|
154
|
+
is_flyable: z.boolean().optional(),
|
|
155
|
+
deleted_at: z.string().datetime({ offset: true }).optional(),
|
|
156
|
+
})
|
|
157
|
+
.catchall(z.any())
|
|
158
|
+
.optional(),
|
|
159
|
+
})
|
|
160
|
+
.catchall(z.any()),
|
|
161
|
+
})
|
|
162
|
+
.catchall(z.any()),
|
|
135
163
|
]);
|
|
136
164
|
export type Event = z.infer<typeof Event>;
|
|
137
165
|
|
|
@@ -156,3 +184,4 @@ export type FlightReviewedEvent = Extract<
|
|
|
156
184
|
Event,
|
|
157
185
|
{ event_type: "protocol.flight.reviewed" }
|
|
158
186
|
>;
|
|
187
|
+
export type ZoneEvent = Extract<Event, { event_type: "protocol.zone" }>;
|