@layer-drone/protocol 0.0.17 → 0.0.18-alpha
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/README.md +43 -0
- package/dist/index.d.mts +328 -347
- package/dist/index.d.ts +328 -347
- package/dist/index.js +101 -122
- package/dist/index.mjs +100 -120
- package/package.json +7 -2
- package/src/client/client/client.ts +5 -1
- package/src/client/sdk.gen.ts +108 -136
- package/src/client/transformers.gen.ts +12 -26
- package/src/client/types.gen.ts +219 -262
- package/src/event/types.gen.ts +40 -41
package/src/event/types.gen.ts
CHANGED
|
@@ -10,23 +10,6 @@ export const Event = z.union([
|
|
|
10
10
|
data: z.object({ message: z.string() }).strict(),
|
|
11
11
|
})
|
|
12
12
|
.strict(),
|
|
13
|
-
z
|
|
14
|
-
.object({
|
|
15
|
-
id: z.any(),
|
|
16
|
-
event_type: z.literal("protocol.flight.submitted"),
|
|
17
|
-
timestamp: z.any(),
|
|
18
|
-
data: z
|
|
19
|
-
.object({
|
|
20
|
-
storageKey: z.string(),
|
|
21
|
-
pilotAddress: z.string(),
|
|
22
|
-
flightManifestUri: z.string(),
|
|
23
|
-
missionId: z
|
|
24
|
-
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
25
|
-
.transform((wire) => BigInt(wire.value)),
|
|
26
|
-
})
|
|
27
|
-
.strict(),
|
|
28
|
-
})
|
|
29
|
-
.strict(),
|
|
30
13
|
z
|
|
31
14
|
.object({
|
|
32
15
|
id: z.any(),
|
|
@@ -47,7 +30,6 @@ export const Event = z.union([
|
|
|
47
30
|
flightPlanId: z.number(),
|
|
48
31
|
captureStartTime: z.string().datetime({ offset: true }),
|
|
49
32
|
captureEndTime: z.string().datetime({ offset: true }),
|
|
50
|
-
detailsHash: z.string(),
|
|
51
33
|
requestor: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
52
34
|
})
|
|
53
35
|
.strict(),
|
|
@@ -75,21 +57,23 @@ export const Event = z.union([
|
|
|
75
57
|
z
|
|
76
58
|
.object({
|
|
77
59
|
id: z.any(),
|
|
78
|
-
event_type: z.literal("protocol.
|
|
60
|
+
event_type: z.literal("protocol.mission.paid"),
|
|
79
61
|
timestamp: z.any(),
|
|
80
62
|
data: z
|
|
81
63
|
.object({
|
|
64
|
+
recipient: z.any(),
|
|
82
65
|
flightId: z
|
|
83
66
|
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
84
67
|
.transform((wire) => BigInt(wire.value)),
|
|
85
|
-
isApproved: z.boolean(),
|
|
86
|
-
validationLogUri: z.string(),
|
|
87
|
-
validator: z.string(),
|
|
88
|
-
filesHash: z.string(),
|
|
89
|
-
storageKey: z.string(),
|
|
90
68
|
missionId: z
|
|
91
69
|
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
92
70
|
.transform((wire) => BigInt(wire.value)),
|
|
71
|
+
vaultId: z
|
|
72
|
+
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
73
|
+
.transform((wire) => BigInt(wire.value)),
|
|
74
|
+
amount: z
|
|
75
|
+
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
76
|
+
.transform((wire) => BigInt(wire.value)),
|
|
93
77
|
})
|
|
94
78
|
.strict(),
|
|
95
79
|
})
|
|
@@ -97,24 +81,39 @@ export const Event = z.union([
|
|
|
97
81
|
z
|
|
98
82
|
.object({
|
|
99
83
|
id: z.any(),
|
|
100
|
-
event_type: z.literal("
|
|
84
|
+
event_type: z.literal("protocol.flight.submitted"),
|
|
101
85
|
timestamp: z.any(),
|
|
102
86
|
data: z
|
|
103
87
|
.object({
|
|
104
|
-
isApproved: z.boolean(),
|
|
105
88
|
storageKey: z.string(),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
tokenId: z
|
|
89
|
+
pilotAddress: z.string(),
|
|
90
|
+
flightManifestUri: z.string(),
|
|
91
|
+
missionId: z
|
|
110
92
|
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
111
93
|
.transform((wire) => BigInt(wire.value)),
|
|
112
|
-
|
|
94
|
+
})
|
|
95
|
+
.strict(),
|
|
96
|
+
})
|
|
97
|
+
.strict(),
|
|
98
|
+
z
|
|
99
|
+
.object({
|
|
100
|
+
id: z.any(),
|
|
101
|
+
event_type: z.literal("protocol.flight.reviewed"),
|
|
102
|
+
timestamp: z.any(),
|
|
103
|
+
data: z
|
|
104
|
+
.object({
|
|
105
|
+
flightId: z
|
|
113
106
|
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
114
107
|
.transform((wire) => BigInt(wire.value)),
|
|
115
|
-
|
|
108
|
+
owner: z.any(),
|
|
109
|
+
isApproved: z.boolean(),
|
|
110
|
+
validationLogUri: z.string(),
|
|
111
|
+
validator: z.string(),
|
|
116
112
|
filesHash: z.string(),
|
|
117
|
-
|
|
113
|
+
storageKey: z.string(),
|
|
114
|
+
missionId: z
|
|
115
|
+
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
116
|
+
.transform((wire) => BigInt(wire.value)),
|
|
118
117
|
})
|
|
119
118
|
.strict(),
|
|
120
119
|
})
|
|
@@ -123,10 +122,6 @@ export const Event = z.union([
|
|
|
123
122
|
export type Event = z.infer<typeof Event>;
|
|
124
123
|
|
|
125
124
|
export type TestEvent = Extract<Event, { event_type: "test" }>;
|
|
126
|
-
export type FlightSubmittedEvent = Extract<
|
|
127
|
-
Event,
|
|
128
|
-
{ event_type: "protocol.flight.submitted" }
|
|
129
|
-
>;
|
|
130
125
|
export type MissionCreatedEvent = Extract<
|
|
131
126
|
Event,
|
|
132
127
|
{ event_type: "protocol.mission.created" }
|
|
@@ -135,11 +130,15 @@ export type MissionUpdatedEvent = Extract<
|
|
|
135
130
|
Event,
|
|
136
131
|
{ event_type: "protocol.mission.updated" }
|
|
137
132
|
>;
|
|
138
|
-
export type
|
|
133
|
+
export type MissionPaidEvent = Extract<
|
|
139
134
|
Event,
|
|
140
|
-
{ event_type: "protocol.
|
|
135
|
+
{ event_type: "protocol.mission.paid" }
|
|
136
|
+
>;
|
|
137
|
+
export type FlightSubmittedEvent = Extract<
|
|
138
|
+
Event,
|
|
139
|
+
{ event_type: "protocol.flight.submitted" }
|
|
141
140
|
>;
|
|
142
|
-
export type
|
|
141
|
+
export type FlightReviewedEvent = Extract<
|
|
143
142
|
Event,
|
|
144
|
-
{ event_type: "
|
|
143
|
+
{ event_type: "protocol.flight.reviewed" }
|
|
145
144
|
>;
|