@layer-drone/protocol 0.0.3 → 0.0.6
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 +561 -0
- package/dist/index.d.ts +561 -0
- package/dist/index.js +390 -0
- package/dist/index.mjs +343 -0
- package/package.json +6 -1
- package/src/client/sdk.gen.ts +64 -29
- package/src/client/types.gen.ts +59 -6
- package/.eslintrc.js +0 -19
- package/.prettierrc.js +0 -4
- package/.turbo/turbo-build.log +0 -18
- package/.turbo/turbo-lint.log +0 -4
- package/CHANGELOG.md +0 -8
- package/openapi-ts.config.ts +0 -7
- package/scripts/generate-event-type.ts +0 -35
- package/tsconfig.json +0 -12
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/client/client.gen.ts
|
|
5
|
+
import { createClient, createConfig } from "@hey-api/client-fetch";
|
|
6
|
+
var client = createClient(createConfig());
|
|
7
|
+
|
|
8
|
+
// src/client/sdk.gen.ts
|
|
9
|
+
var appControllerGetHello = /* @__PURE__ */ __name((options) => {
|
|
10
|
+
return (options?.client ?? client).get({
|
|
11
|
+
url: "/",
|
|
12
|
+
...options
|
|
13
|
+
});
|
|
14
|
+
}, "appControllerGetHello");
|
|
15
|
+
var keysControllerGetProvenanceCryptoKey = /* @__PURE__ */ __name((options) => {
|
|
16
|
+
return (options?.client ?? client).get({
|
|
17
|
+
url: "/keys",
|
|
18
|
+
...options
|
|
19
|
+
});
|
|
20
|
+
}, "keysControllerGetProvenanceCryptoKey");
|
|
21
|
+
var rewardsControllerDepositRewards = /* @__PURE__ */ __name((options) => {
|
|
22
|
+
return (options.client ?? client).post({
|
|
23
|
+
security: [
|
|
24
|
+
{
|
|
25
|
+
name: "x-api-token",
|
|
26
|
+
type: "apiKey"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
url: "/rewards/deposit",
|
|
30
|
+
...options,
|
|
31
|
+
headers: {
|
|
32
|
+
"Content-Type": "application/json",
|
|
33
|
+
...options?.headers
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}, "rewardsControllerDepositRewards");
|
|
37
|
+
var rewardsControllerDistributeRewards = /* @__PURE__ */ __name((options) => {
|
|
38
|
+
return (options.client ?? client).post({
|
|
39
|
+
security: [
|
|
40
|
+
{
|
|
41
|
+
name: "x-api-token",
|
|
42
|
+
type: "apiKey"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
url: "/rewards/distribute",
|
|
46
|
+
...options,
|
|
47
|
+
headers: {
|
|
48
|
+
"Content-Type": "application/json",
|
|
49
|
+
...options?.headers
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}, "rewardsControllerDistributeRewards");
|
|
53
|
+
var apiTokenControllerCreateToken = /* @__PURE__ */ __name((options) => {
|
|
54
|
+
return (options.client ?? client).post({
|
|
55
|
+
security: [
|
|
56
|
+
{
|
|
57
|
+
name: "x-api-token",
|
|
58
|
+
type: "apiKey"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
url: "/tokens",
|
|
62
|
+
...options,
|
|
63
|
+
headers: {
|
|
64
|
+
"Content-Type": "application/json",
|
|
65
|
+
...options?.headers
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}, "apiTokenControllerCreateToken");
|
|
69
|
+
var apiTokenControllerDeleteToken = /* @__PURE__ */ __name((options) => {
|
|
70
|
+
return (options.client ?? client).delete({
|
|
71
|
+
security: [
|
|
72
|
+
{
|
|
73
|
+
name: "x-api-token",
|
|
74
|
+
type: "apiKey"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
url: "/tokens/{id}",
|
|
78
|
+
...options
|
|
79
|
+
});
|
|
80
|
+
}, "apiTokenControllerDeleteToken");
|
|
81
|
+
var apiTokenControllerGetToken = /* @__PURE__ */ __name((options) => {
|
|
82
|
+
return (options.client ?? client).get({
|
|
83
|
+
security: [
|
|
84
|
+
{
|
|
85
|
+
name: "x-api-token",
|
|
86
|
+
type: "apiKey"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
url: "/tokens/{id}",
|
|
90
|
+
...options
|
|
91
|
+
});
|
|
92
|
+
}, "apiTokenControllerGetToken");
|
|
93
|
+
var apiTokenControllerUpdateToken = /* @__PURE__ */ __name((options) => {
|
|
94
|
+
return (options.client ?? client).patch({
|
|
95
|
+
security: [
|
|
96
|
+
{
|
|
97
|
+
name: "x-api-token",
|
|
98
|
+
type: "apiKey"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
url: "/tokens/{id}",
|
|
102
|
+
...options,
|
|
103
|
+
headers: {
|
|
104
|
+
"Content-Type": "application/json",
|
|
105
|
+
...options?.headers
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}, "apiTokenControllerUpdateToken");
|
|
109
|
+
var quotesControllerCreateQuote = /* @__PURE__ */ __name((options) => {
|
|
110
|
+
return (options.client ?? client).post({
|
|
111
|
+
security: [
|
|
112
|
+
{
|
|
113
|
+
name: "x-api-token",
|
|
114
|
+
type: "apiKey"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
url: "/quotes",
|
|
118
|
+
...options,
|
|
119
|
+
headers: {
|
|
120
|
+
"Content-Type": "application/json",
|
|
121
|
+
...options?.headers
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}, "quotesControllerCreateQuote");
|
|
125
|
+
var flightsControllerGenerateFlightId = /* @__PURE__ */ __name((options) => {
|
|
126
|
+
return (options.client ?? client).get({
|
|
127
|
+
security: [
|
|
128
|
+
{
|
|
129
|
+
name: "x-api-token",
|
|
130
|
+
type: "apiKey"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
url: "/flights/id",
|
|
134
|
+
...options
|
|
135
|
+
});
|
|
136
|
+
}, "flightsControllerGenerateFlightId");
|
|
137
|
+
var flightsControllerCreatePresignedUrls = /* @__PURE__ */ __name((options) => {
|
|
138
|
+
return (options.client ?? client).post({
|
|
139
|
+
security: [
|
|
140
|
+
{
|
|
141
|
+
name: "x-api-token",
|
|
142
|
+
type: "apiKey"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
url: "/flights/{flightId}/files",
|
|
146
|
+
...options,
|
|
147
|
+
headers: {
|
|
148
|
+
"Content-Type": "application/json",
|
|
149
|
+
...options?.headers
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}, "flightsControllerCreatePresignedUrls");
|
|
153
|
+
var flightsControllerValidateFlight = /* @__PURE__ */ __name((options) => {
|
|
154
|
+
return (options.client ?? client).post({
|
|
155
|
+
security: [
|
|
156
|
+
{
|
|
157
|
+
name: "x-api-token",
|
|
158
|
+
type: "apiKey"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
url: "/flights",
|
|
162
|
+
...options,
|
|
163
|
+
headers: {
|
|
164
|
+
"Content-Type": "application/json",
|
|
165
|
+
...options?.headers
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}, "flightsControllerValidateFlight");
|
|
169
|
+
var schemaControllerGetEventSchema = /* @__PURE__ */ __name((options) => {
|
|
170
|
+
return (options?.client ?? client).get({
|
|
171
|
+
url: "/schema/event",
|
|
172
|
+
...options
|
|
173
|
+
});
|
|
174
|
+
}, "schemaControllerGetEventSchema");
|
|
175
|
+
var webhooksControllerGetMany = /* @__PURE__ */ __name((options) => {
|
|
176
|
+
return (options.client ?? client).get({
|
|
177
|
+
security: [
|
|
178
|
+
{
|
|
179
|
+
name: "x-api-token",
|
|
180
|
+
type: "apiKey"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
url: "/org/{org_id}/webhooks",
|
|
184
|
+
...options
|
|
185
|
+
});
|
|
186
|
+
}, "webhooksControllerGetMany");
|
|
187
|
+
var webhooksControllerCreate = /* @__PURE__ */ __name((options) => {
|
|
188
|
+
return (options.client ?? client).post({
|
|
189
|
+
security: [
|
|
190
|
+
{
|
|
191
|
+
name: "x-api-token",
|
|
192
|
+
type: "apiKey"
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
url: "/org/{org_id}/webhooks",
|
|
196
|
+
...options,
|
|
197
|
+
headers: {
|
|
198
|
+
"Content-Type": "application/json",
|
|
199
|
+
...options?.headers
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}, "webhooksControllerCreate");
|
|
203
|
+
var webhooksControllerDelete = /* @__PURE__ */ __name((options) => {
|
|
204
|
+
return (options.client ?? client).delete({
|
|
205
|
+
security: [
|
|
206
|
+
{
|
|
207
|
+
name: "x-api-token",
|
|
208
|
+
type: "apiKey"
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
url: "/org/{org_id}/webhooks/{id}",
|
|
212
|
+
...options
|
|
213
|
+
});
|
|
214
|
+
}, "webhooksControllerDelete");
|
|
215
|
+
var webhooksControllerGet = /* @__PURE__ */ __name((options) => {
|
|
216
|
+
return (options.client ?? client).get({
|
|
217
|
+
security: [
|
|
218
|
+
{
|
|
219
|
+
name: "x-api-token",
|
|
220
|
+
type: "apiKey"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
url: "/org/{org_id}/webhooks/{id}",
|
|
224
|
+
...options
|
|
225
|
+
});
|
|
226
|
+
}, "webhooksControllerGet");
|
|
227
|
+
var webhooksControllerUpdate = /* @__PURE__ */ __name((options) => {
|
|
228
|
+
return (options.client ?? client).put({
|
|
229
|
+
security: [
|
|
230
|
+
{
|
|
231
|
+
name: "x-api-token",
|
|
232
|
+
type: "apiKey"
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
url: "/org/{org_id}/webhooks/{id}",
|
|
236
|
+
...options,
|
|
237
|
+
headers: {
|
|
238
|
+
"Content-Type": "application/json",
|
|
239
|
+
...options?.headers
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
}, "webhooksControllerUpdate");
|
|
243
|
+
var webhooksControllerRegenerateSecret = /* @__PURE__ */ __name((options) => {
|
|
244
|
+
return (options.client ?? client).post({
|
|
245
|
+
security: [
|
|
246
|
+
{
|
|
247
|
+
name: "x-api-token",
|
|
248
|
+
type: "apiKey"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
url: "/org/{org_id}/webhooks/{id}/regenerate-secret",
|
|
252
|
+
...options
|
|
253
|
+
});
|
|
254
|
+
}, "webhooksControllerRegenerateSecret");
|
|
255
|
+
var webhooksControllerTest = /* @__PURE__ */ __name((options) => {
|
|
256
|
+
return (options.client ?? client).post({
|
|
257
|
+
security: [
|
|
258
|
+
{
|
|
259
|
+
name: "x-api-token",
|
|
260
|
+
type: "apiKey"
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
url: "/org/{org_id}/webhooks/{id}/test",
|
|
264
|
+
...options
|
|
265
|
+
});
|
|
266
|
+
}, "webhooksControllerTest");
|
|
267
|
+
var webhooksControllerGetStatus = /* @__PURE__ */ __name((options) => {
|
|
268
|
+
return (options.client ?? client).get({
|
|
269
|
+
security: [
|
|
270
|
+
{
|
|
271
|
+
name: "x-api-token",
|
|
272
|
+
type: "apiKey"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
url: "/org/{org_id}/webhooks/{id}/status",
|
|
276
|
+
...options
|
|
277
|
+
});
|
|
278
|
+
}, "webhooksControllerGetStatus");
|
|
279
|
+
|
|
280
|
+
// src/event/types.gen.ts
|
|
281
|
+
import { z } from "zod";
|
|
282
|
+
var Event = z.union([
|
|
283
|
+
z.object({
|
|
284
|
+
id: z.string(),
|
|
285
|
+
event_type: z.literal("test"),
|
|
286
|
+
timestamp: z.string(),
|
|
287
|
+
data: z.object({
|
|
288
|
+
message: z.string()
|
|
289
|
+
}).strict()
|
|
290
|
+
}).strict(),
|
|
291
|
+
z.object({
|
|
292
|
+
id: z.any(),
|
|
293
|
+
event_type: z.literal("protocol.flight.submitted"),
|
|
294
|
+
timestamp: z.any(),
|
|
295
|
+
data: z.object({
|
|
296
|
+
flightId: z.number(),
|
|
297
|
+
pilotAddress: z.string(),
|
|
298
|
+
flightManifestUri: z.string()
|
|
299
|
+
}).strict()
|
|
300
|
+
}).strict()
|
|
301
|
+
]);
|
|
302
|
+
|
|
303
|
+
// src/event/parser.ts
|
|
304
|
+
var WEBHOOK_SECRET_HEADER = "X-Webhook-Secret";
|
|
305
|
+
function parseWebhookEvent(req, webhookSecret) {
|
|
306
|
+
const secret = req.headers[WEBHOOK_SECRET_HEADER] || req.headers[WEBHOOK_SECRET_HEADER.toLowerCase()];
|
|
307
|
+
if (typeof secret !== "string") {
|
|
308
|
+
throw new Error("Webhook request signature is not a string");
|
|
309
|
+
}
|
|
310
|
+
if (!Buffer.isBuffer(req.body)) {
|
|
311
|
+
throw new Error("Webhook request body is not a Buffer");
|
|
312
|
+
}
|
|
313
|
+
if (secret !== webhookSecret) {
|
|
314
|
+
throw new Error("Invalid webhook secret");
|
|
315
|
+
}
|
|
316
|
+
return Event.parse(JSON.parse(req.body.toString("utf-8")));
|
|
317
|
+
}
|
|
318
|
+
__name(parseWebhookEvent, "parseWebhookEvent");
|
|
319
|
+
export {
|
|
320
|
+
Event,
|
|
321
|
+
apiTokenControllerCreateToken,
|
|
322
|
+
apiTokenControllerDeleteToken,
|
|
323
|
+
apiTokenControllerGetToken,
|
|
324
|
+
apiTokenControllerUpdateToken,
|
|
325
|
+
appControllerGetHello,
|
|
326
|
+
flightsControllerCreatePresignedUrls,
|
|
327
|
+
flightsControllerGenerateFlightId,
|
|
328
|
+
flightsControllerValidateFlight,
|
|
329
|
+
keysControllerGetProvenanceCryptoKey,
|
|
330
|
+
parseWebhookEvent,
|
|
331
|
+
quotesControllerCreateQuote,
|
|
332
|
+
rewardsControllerDepositRewards,
|
|
333
|
+
rewardsControllerDistributeRewards,
|
|
334
|
+
schemaControllerGetEventSchema,
|
|
335
|
+
webhooksControllerCreate,
|
|
336
|
+
webhooksControllerDelete,
|
|
337
|
+
webhooksControllerGet,
|
|
338
|
+
webhooksControllerGetMany,
|
|
339
|
+
webhooksControllerGetStatus,
|
|
340
|
+
webhooksControllerRegenerateSecret,
|
|
341
|
+
webhooksControllerTest,
|
|
342
|
+
webhooksControllerUpdate
|
|
343
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layer-drone/protocol",
|
|
3
|
-
"
|
|
3
|
+
"description": "Layer Drone protocol SDK with typed API client and event parsing",
|
|
4
|
+
"version": "0.0.6",
|
|
4
5
|
"license": "MIT",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"src"
|
|
9
|
+
],
|
|
5
10
|
"main": "./dist/index.js",
|
|
6
11
|
"types": "./dist/index.d.ts",
|
|
7
12
|
"publishConfig": {
|
package/src/client/sdk.gen.ts
CHANGED
|
@@ -15,10 +15,14 @@ import type {
|
|
|
15
15
|
ApiTokenControllerUpdateTokenResponse,
|
|
16
16
|
AppControllerGetHelloData,
|
|
17
17
|
FlightsControllerCreatePresignedUrlsData,
|
|
18
|
+
FlightsControllerCreatePresignedUrlsResponse,
|
|
18
19
|
FlightsControllerGenerateFlightIdData,
|
|
20
|
+
FlightsControllerGenerateFlightIdResponse,
|
|
19
21
|
FlightsControllerValidateFlightData,
|
|
22
|
+
FlightsControllerValidateFlightResponse,
|
|
20
23
|
KeysControllerGetProvenanceCryptoKeyData,
|
|
21
24
|
KeysControllerGetProvenanceCryptoKeyResponse,
|
|
25
|
+
QuotesControllerCreateQuoteData,
|
|
22
26
|
RewardsControllerDepositRewardsData,
|
|
23
27
|
RewardsControllerDepositRewardsResponse,
|
|
24
28
|
RewardsControllerDistributeRewardsData,
|
|
@@ -223,12 +227,39 @@ export const apiTokenControllerUpdateToken = <
|
|
|
223
227
|
});
|
|
224
228
|
};
|
|
225
229
|
|
|
230
|
+
export const quotesControllerCreateQuote = <
|
|
231
|
+
ThrowOnError extends boolean = false,
|
|
232
|
+
>(
|
|
233
|
+
options: Options<QuotesControllerCreateQuoteData, ThrowOnError>,
|
|
234
|
+
) => {
|
|
235
|
+
return (options.client ?? _heyApiClient).post<unknown, unknown, ThrowOnError>(
|
|
236
|
+
{
|
|
237
|
+
security: [
|
|
238
|
+
{
|
|
239
|
+
name: "x-api-token",
|
|
240
|
+
type: "apiKey",
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
url: "/quotes",
|
|
244
|
+
...options,
|
|
245
|
+
headers: {
|
|
246
|
+
"Content-Type": "application/json",
|
|
247
|
+
...options?.headers,
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
);
|
|
251
|
+
};
|
|
252
|
+
|
|
226
253
|
export const flightsControllerGenerateFlightId = <
|
|
227
254
|
ThrowOnError extends boolean = false,
|
|
228
255
|
>(
|
|
229
256
|
options: Options<FlightsControllerGenerateFlightIdData, ThrowOnError>,
|
|
230
257
|
) => {
|
|
231
|
-
return (options.client ?? _heyApiClient).get<
|
|
258
|
+
return (options.client ?? _heyApiClient).get<
|
|
259
|
+
FlightsControllerGenerateFlightIdResponse,
|
|
260
|
+
unknown,
|
|
261
|
+
ThrowOnError
|
|
262
|
+
>({
|
|
232
263
|
security: [
|
|
233
264
|
{
|
|
234
265
|
name: "x-api-token",
|
|
@@ -245,22 +276,24 @@ export const flightsControllerCreatePresignedUrls = <
|
|
|
245
276
|
>(
|
|
246
277
|
options: Options<FlightsControllerCreatePresignedUrlsData, ThrowOnError>,
|
|
247
278
|
) => {
|
|
248
|
-
return (options.client ?? _heyApiClient).post<
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
...options,
|
|
258
|
-
headers: {
|
|
259
|
-
"Content-Type": "application/json",
|
|
260
|
-
...options?.headers,
|
|
279
|
+
return (options.client ?? _heyApiClient).post<
|
|
280
|
+
FlightsControllerCreatePresignedUrlsResponse,
|
|
281
|
+
unknown,
|
|
282
|
+
ThrowOnError
|
|
283
|
+
>({
|
|
284
|
+
security: [
|
|
285
|
+
{
|
|
286
|
+
name: "x-api-token",
|
|
287
|
+
type: "apiKey",
|
|
261
288
|
},
|
|
289
|
+
],
|
|
290
|
+
url: "/flights/{flightId}/files",
|
|
291
|
+
...options,
|
|
292
|
+
headers: {
|
|
293
|
+
"Content-Type": "application/json",
|
|
294
|
+
...options?.headers,
|
|
262
295
|
},
|
|
263
|
-
);
|
|
296
|
+
});
|
|
264
297
|
};
|
|
265
298
|
|
|
266
299
|
export const flightsControllerValidateFlight = <
|
|
@@ -268,22 +301,24 @@ export const flightsControllerValidateFlight = <
|
|
|
268
301
|
>(
|
|
269
302
|
options: Options<FlightsControllerValidateFlightData, ThrowOnError>,
|
|
270
303
|
) => {
|
|
271
|
-
return (options.client ?? _heyApiClient).post<
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
...options,
|
|
281
|
-
headers: {
|
|
282
|
-
"Content-Type": "application/json",
|
|
283
|
-
...options?.headers,
|
|
304
|
+
return (options.client ?? _heyApiClient).post<
|
|
305
|
+
FlightsControllerValidateFlightResponse,
|
|
306
|
+
unknown,
|
|
307
|
+
ThrowOnError
|
|
308
|
+
>({
|
|
309
|
+
security: [
|
|
310
|
+
{
|
|
311
|
+
name: "x-api-token",
|
|
312
|
+
type: "apiKey",
|
|
284
313
|
},
|
|
314
|
+
],
|
|
315
|
+
url: "/flights",
|
|
316
|
+
...options,
|
|
317
|
+
headers: {
|
|
318
|
+
"Content-Type": "application/json",
|
|
319
|
+
...options?.headers,
|
|
285
320
|
},
|
|
286
|
-
);
|
|
321
|
+
});
|
|
287
322
|
};
|
|
288
323
|
|
|
289
324
|
export const schemaControllerGetEventSchema = <
|
package/src/client/types.gen.ts
CHANGED
|
@@ -84,9 +84,21 @@ export type UpdateApiTokenResponseDto = {
|
|
|
84
84
|
> | null;
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
+
export type CreateQuoteRequestDto = {
|
|
88
|
+
missionIds: Array<number>;
|
|
89
|
+
entitlementType: string;
|
|
90
|
+
buyer: string;
|
|
91
|
+
mintOnChain: boolean;
|
|
92
|
+
};
|
|
93
|
+
|
|
87
94
|
export type CreateFileRequestDto = {
|
|
88
95
|
filenames: Array<string>;
|
|
89
|
-
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export type CreateFileResponseDto = {
|
|
99
|
+
presignedUrls: {
|
|
100
|
+
[key: string]: string;
|
|
101
|
+
};
|
|
90
102
|
};
|
|
91
103
|
|
|
92
104
|
export type ValidateFlightDto = {
|
|
@@ -95,6 +107,11 @@ export type ValidateFlightDto = {
|
|
|
95
107
|
flightManifestUri?: string;
|
|
96
108
|
};
|
|
97
109
|
|
|
110
|
+
export type ValidateFlightResponseDto = {
|
|
111
|
+
success: boolean;
|
|
112
|
+
message: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
98
115
|
export type CreateWebhookBody = {
|
|
99
116
|
name: string;
|
|
100
117
|
url: string;
|
|
@@ -307,6 +324,22 @@ export type ApiTokenControllerUpdateTokenResponses = {
|
|
|
307
324
|
export type ApiTokenControllerUpdateTokenResponse =
|
|
308
325
|
ApiTokenControllerUpdateTokenResponses[keyof ApiTokenControllerUpdateTokenResponses];
|
|
309
326
|
|
|
327
|
+
export type QuotesControllerCreateQuoteData = {
|
|
328
|
+
body: CreateQuoteRequestDto;
|
|
329
|
+
path?: never;
|
|
330
|
+
query?: never;
|
|
331
|
+
url: "/quotes";
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
export type QuotesControllerCreateQuoteErrors = {
|
|
335
|
+
401: unknown;
|
|
336
|
+
403: unknown;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
export type QuotesControllerCreateQuoteResponses = {
|
|
340
|
+
201: unknown;
|
|
341
|
+
};
|
|
342
|
+
|
|
310
343
|
export type FlightsControllerGenerateFlightIdData = {
|
|
311
344
|
body?: never;
|
|
312
345
|
path?: never;
|
|
@@ -323,14 +356,22 @@ export type FlightsControllerGenerateFlightIdErrors = {
|
|
|
323
356
|
};
|
|
324
357
|
|
|
325
358
|
export type FlightsControllerGenerateFlightIdResponses = {
|
|
326
|
-
|
|
359
|
+
/**
|
|
360
|
+
* Returns the generated flight ID
|
|
361
|
+
*/
|
|
362
|
+
200: number;
|
|
327
363
|
};
|
|
328
364
|
|
|
365
|
+
export type FlightsControllerGenerateFlightIdResponse =
|
|
366
|
+
FlightsControllerGenerateFlightIdResponses[keyof FlightsControllerGenerateFlightIdResponses];
|
|
367
|
+
|
|
329
368
|
export type FlightsControllerCreatePresignedUrlsData = {
|
|
330
369
|
body: CreateFileRequestDto;
|
|
331
|
-
path
|
|
370
|
+
path: {
|
|
371
|
+
flightId: number;
|
|
372
|
+
};
|
|
332
373
|
query?: never;
|
|
333
|
-
url: "/flights/files";
|
|
374
|
+
url: "/flights/{flightId}/files";
|
|
334
375
|
};
|
|
335
376
|
|
|
336
377
|
export type FlightsControllerCreatePresignedUrlsErrors = {
|
|
@@ -339,9 +380,15 @@ export type FlightsControllerCreatePresignedUrlsErrors = {
|
|
|
339
380
|
};
|
|
340
381
|
|
|
341
382
|
export type FlightsControllerCreatePresignedUrlsResponses = {
|
|
342
|
-
|
|
383
|
+
/**
|
|
384
|
+
* Returns presigned URLs for file upload
|
|
385
|
+
*/
|
|
386
|
+
200: CreateFileResponseDto;
|
|
343
387
|
};
|
|
344
388
|
|
|
389
|
+
export type FlightsControllerCreatePresignedUrlsResponse =
|
|
390
|
+
FlightsControllerCreatePresignedUrlsResponses[keyof FlightsControllerCreatePresignedUrlsResponses];
|
|
391
|
+
|
|
345
392
|
export type FlightsControllerValidateFlightData = {
|
|
346
393
|
body: ValidateFlightDto;
|
|
347
394
|
path?: never;
|
|
@@ -355,9 +402,15 @@ export type FlightsControllerValidateFlightErrors = {
|
|
|
355
402
|
};
|
|
356
403
|
|
|
357
404
|
export type FlightsControllerValidateFlightResponses = {
|
|
358
|
-
|
|
405
|
+
/**
|
|
406
|
+
* Returns flight validation result
|
|
407
|
+
*/
|
|
408
|
+
200: ValidateFlightResponseDto;
|
|
359
409
|
};
|
|
360
410
|
|
|
411
|
+
export type FlightsControllerValidateFlightResponse =
|
|
412
|
+
FlightsControllerValidateFlightResponses[keyof FlightsControllerValidateFlightResponses];
|
|
413
|
+
|
|
361
414
|
export type SchemaControllerGetEventSchemaData = {
|
|
362
415
|
body?: never;
|
|
363
416
|
path?: never;
|
package/.eslintrc.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/** @type {import("eslint").Linter.Config} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
extends: ["@layer-drone/eslint-config/nest.js"],
|
|
4
|
-
parserOptions: {
|
|
5
|
-
project: "tsconfig.json",
|
|
6
|
-
tsconfigRootDir: __dirname,
|
|
7
|
-
sourceType: "module",
|
|
8
|
-
},
|
|
9
|
-
ignorePatterns: [
|
|
10
|
-
"*.config.ts",
|
|
11
|
-
".*.js",
|
|
12
|
-
"*.setup.js",
|
|
13
|
-
"*.config.js",
|
|
14
|
-
".turbo/",
|
|
15
|
-
"dist/",
|
|
16
|
-
"coverage/",
|
|
17
|
-
"node_modules/",
|
|
18
|
-
],
|
|
19
|
-
};
|
package/.prettierrc.js
DELETED
package/.turbo/turbo-build.log
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @layer-drone/protocol@0.0.3 build /home/runner/work/layer-drone/layer-drone/packages/protocol
|
|
3
|
-
> tsup src/index.ts --format cjs,esm --dts
|
|
4
|
-
|
|
5
|
-
[34mCLI[39m Building entry: src/index.ts
|
|
6
|
-
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
-
[34mCLI[39m tsup v8.5.0
|
|
8
|
-
[34mCLI[39m Target: es2022
|
|
9
|
-
[34mCJS[39m Build start
|
|
10
|
-
[34mESM[39m Build start
|
|
11
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m8.29 KB[39m
|
|
12
|
-
[32mESM[39m ⚡️ Build success in 464ms
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[32m10.83 KB[39m
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in 472ms
|
|
15
|
-
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in 14801ms
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m21.83 KB[39m
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m21.83 KB[39m
|
package/.turbo/turbo-lint.log
DELETED
package/CHANGELOG.md
DELETED