@layer-drone/protocol 0.0.8 → 0.0.9-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/dist/index.d.mts +182 -55
- package/dist/index.d.ts +182 -55
- package/dist/index.js +576 -11
- package/dist/index.mjs +574 -10
- package/package.json +3 -3
- package/src/client/client/client.ts +181 -0
- package/src/client/client/index.ts +22 -0
- package/src/client/client/types.ts +215 -0
- package/src/client/client/utils.ts +415 -0
- package/src/client/client.gen.ts +2 -3
- package/src/client/core/auth.ts +40 -0
- package/src/client/core/bodySerializer.ts +84 -0
- package/src/client/core/params.ts +141 -0
- package/src/client/core/pathSerializer.ts +179 -0
- package/src/client/core/types.ts +98 -0
- package/src/client/index.ts +2 -2
- package/src/client/sdk.gen.ts +129 -91
- package/src/client/transformers.gen.ts +40 -0
- package/src/client/types.gen.ts +17 -21
- package/src/index.ts +1 -0
package/src/client/sdk.gen.ts
CHANGED
|
@@ -1,53 +1,77 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { client as _heyApiClient } from "./client.gen.js";
|
|
2
3
|
import type {
|
|
3
4
|
Client,
|
|
4
5
|
Options as ClientOptions,
|
|
5
6
|
TDataShape,
|
|
6
|
-
} from "
|
|
7
|
-
|
|
8
|
-
import { client as _heyApiClient } from "./client.gen";
|
|
7
|
+
} from "./client/index.js";
|
|
9
8
|
import type {
|
|
10
9
|
ApiTokenControllerCreateTokenData,
|
|
11
|
-
|
|
10
|
+
ApiTokenControllerCreateTokenErrors,
|
|
11
|
+
ApiTokenControllerCreateTokenResponses,
|
|
12
12
|
ApiTokenControllerDeleteTokenData,
|
|
13
|
+
ApiTokenControllerDeleteTokenErrors,
|
|
14
|
+
ApiTokenControllerDeleteTokenResponses,
|
|
13
15
|
ApiTokenControllerGetTokenData,
|
|
16
|
+
ApiTokenControllerGetTokenErrors,
|
|
17
|
+
ApiTokenControllerGetTokenResponses,
|
|
14
18
|
ApiTokenControllerUpdateTokenData,
|
|
15
|
-
|
|
19
|
+
ApiTokenControllerUpdateTokenErrors,
|
|
20
|
+
ApiTokenControllerUpdateTokenResponses,
|
|
16
21
|
AppControllerGetHelloData,
|
|
22
|
+
AppControllerGetHelloResponses,
|
|
17
23
|
ConditionsControllerGetSunAltitudeTimeLimitsData,
|
|
18
|
-
|
|
24
|
+
ConditionsControllerGetSunAltitudeTimeLimitsResponses,
|
|
19
25
|
FlightsControllerCreatePresignedUrlsData,
|
|
20
|
-
|
|
26
|
+
FlightsControllerCreatePresignedUrlsErrors,
|
|
27
|
+
FlightsControllerCreatePresignedUrlsResponses,
|
|
21
28
|
FlightsControllerGenerateFlightIdData,
|
|
22
|
-
|
|
29
|
+
FlightsControllerGenerateFlightIdErrors,
|
|
30
|
+
FlightsControllerGenerateFlightIdResponses,
|
|
23
31
|
FlightsControllerValidateFlightData,
|
|
24
|
-
|
|
32
|
+
FlightsControllerValidateFlightErrors,
|
|
33
|
+
FlightsControllerValidateFlightResponses,
|
|
25
34
|
KeysControllerGetProvenanceCryptoKeyData,
|
|
26
|
-
|
|
35
|
+
KeysControllerGetProvenanceCryptoKeyResponses,
|
|
27
36
|
QuotesControllerCreateQuoteData,
|
|
37
|
+
QuotesControllerCreateQuoteErrors,
|
|
38
|
+
QuotesControllerCreateQuoteResponses,
|
|
28
39
|
QuotesControllerGetQuoteData,
|
|
40
|
+
QuotesControllerGetQuoteErrors,
|
|
41
|
+
QuotesControllerGetQuoteResponses,
|
|
29
42
|
RewardsControllerDepositRewardsData,
|
|
30
|
-
|
|
43
|
+
RewardsControllerDepositRewardsErrors,
|
|
44
|
+
RewardsControllerDepositRewardsResponses,
|
|
31
45
|
RewardsControllerDistributeRewardsData,
|
|
32
|
-
|
|
46
|
+
RewardsControllerDistributeRewardsErrors,
|
|
47
|
+
RewardsControllerDistributeRewardsResponses,
|
|
33
48
|
SchemaControllerGetEventSchemaData,
|
|
49
|
+
SchemaControllerGetEventSchemaResponses,
|
|
34
50
|
WebhooksControllerCreateData,
|
|
35
|
-
|
|
51
|
+
WebhooksControllerCreateErrors,
|
|
52
|
+
WebhooksControllerCreateResponses,
|
|
36
53
|
WebhooksControllerDeleteData,
|
|
37
|
-
|
|
54
|
+
WebhooksControllerDeleteErrors,
|
|
55
|
+
WebhooksControllerDeleteResponses,
|
|
38
56
|
WebhooksControllerGetData,
|
|
57
|
+
WebhooksControllerGetErrors,
|
|
39
58
|
WebhooksControllerGetManyData,
|
|
40
|
-
|
|
41
|
-
|
|
59
|
+
WebhooksControllerGetManyErrors,
|
|
60
|
+
WebhooksControllerGetManyResponses,
|
|
61
|
+
WebhooksControllerGetResponses,
|
|
42
62
|
WebhooksControllerGetStatusData,
|
|
43
|
-
|
|
63
|
+
WebhooksControllerGetStatusErrors,
|
|
64
|
+
WebhooksControllerGetStatusResponses,
|
|
44
65
|
WebhooksControllerRegenerateSecretData,
|
|
45
|
-
|
|
66
|
+
WebhooksControllerRegenerateSecretErrors,
|
|
67
|
+
WebhooksControllerRegenerateSecretResponses,
|
|
46
68
|
WebhooksControllerTestData,
|
|
47
|
-
|
|
69
|
+
WebhooksControllerTestErrors,
|
|
70
|
+
WebhooksControllerTestResponses,
|
|
48
71
|
WebhooksControllerUpdateData,
|
|
49
|
-
|
|
50
|
-
|
|
72
|
+
WebhooksControllerUpdateErrors,
|
|
73
|
+
WebhooksControllerUpdateResponses,
|
|
74
|
+
} from "./types.gen.js";
|
|
51
75
|
|
|
52
76
|
export type Options<
|
|
53
77
|
TData extends TDataShape = TDataShape,
|
|
@@ -69,12 +93,14 @@ export type Options<
|
|
|
69
93
|
export const appControllerGetHello = <ThrowOnError extends boolean = false>(
|
|
70
94
|
options?: Options<AppControllerGetHelloData, ThrowOnError>,
|
|
71
95
|
) => {
|
|
72
|
-
return (options?.client ?? _heyApiClient).get<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
96
|
+
return (options?.client ?? _heyApiClient).get<
|
|
97
|
+
AppControllerGetHelloResponses,
|
|
98
|
+
unknown,
|
|
99
|
+
ThrowOnError
|
|
100
|
+
>({
|
|
101
|
+
url: "/",
|
|
102
|
+
...options,
|
|
103
|
+
});
|
|
78
104
|
};
|
|
79
105
|
|
|
80
106
|
export const keysControllerGetProvenanceCryptoKey = <
|
|
@@ -83,7 +109,7 @@ export const keysControllerGetProvenanceCryptoKey = <
|
|
|
83
109
|
options?: Options<KeysControllerGetProvenanceCryptoKeyData, ThrowOnError>,
|
|
84
110
|
) => {
|
|
85
111
|
return (options?.client ?? _heyApiClient).get<
|
|
86
|
-
|
|
112
|
+
KeysControllerGetProvenanceCryptoKeyResponses,
|
|
87
113
|
unknown,
|
|
88
114
|
ThrowOnError
|
|
89
115
|
>({
|
|
@@ -98,8 +124,8 @@ export const rewardsControllerDepositRewards = <
|
|
|
98
124
|
options: Options<RewardsControllerDepositRewardsData, ThrowOnError>,
|
|
99
125
|
) => {
|
|
100
126
|
return (options.client ?? _heyApiClient).post<
|
|
101
|
-
|
|
102
|
-
|
|
127
|
+
RewardsControllerDepositRewardsResponses,
|
|
128
|
+
RewardsControllerDepositRewardsErrors,
|
|
103
129
|
ThrowOnError
|
|
104
130
|
>({
|
|
105
131
|
security: [
|
|
@@ -112,7 +138,7 @@ export const rewardsControllerDepositRewards = <
|
|
|
112
138
|
...options,
|
|
113
139
|
headers: {
|
|
114
140
|
"Content-Type": "application/json",
|
|
115
|
-
...options
|
|
141
|
+
...options.headers,
|
|
116
142
|
},
|
|
117
143
|
});
|
|
118
144
|
};
|
|
@@ -123,8 +149,8 @@ export const rewardsControllerDistributeRewards = <
|
|
|
123
149
|
options: Options<RewardsControllerDistributeRewardsData, ThrowOnError>,
|
|
124
150
|
) => {
|
|
125
151
|
return (options.client ?? _heyApiClient).post<
|
|
126
|
-
|
|
127
|
-
|
|
152
|
+
RewardsControllerDistributeRewardsResponses,
|
|
153
|
+
RewardsControllerDistributeRewardsErrors,
|
|
128
154
|
ThrowOnError
|
|
129
155
|
>({
|
|
130
156
|
security: [
|
|
@@ -137,7 +163,7 @@ export const rewardsControllerDistributeRewards = <
|
|
|
137
163
|
...options,
|
|
138
164
|
headers: {
|
|
139
165
|
"Content-Type": "application/json",
|
|
140
|
-
...options
|
|
166
|
+
...options.headers,
|
|
141
167
|
},
|
|
142
168
|
});
|
|
143
169
|
};
|
|
@@ -148,8 +174,8 @@ export const apiTokenControllerCreateToken = <
|
|
|
148
174
|
options: Options<ApiTokenControllerCreateTokenData, ThrowOnError>,
|
|
149
175
|
) => {
|
|
150
176
|
return (options.client ?? _heyApiClient).post<
|
|
151
|
-
|
|
152
|
-
|
|
177
|
+
ApiTokenControllerCreateTokenResponses,
|
|
178
|
+
ApiTokenControllerCreateTokenErrors,
|
|
153
179
|
ThrowOnError
|
|
154
180
|
>({
|
|
155
181
|
security: [
|
|
@@ -162,7 +188,7 @@ export const apiTokenControllerCreateToken = <
|
|
|
162
188
|
...options,
|
|
163
189
|
headers: {
|
|
164
190
|
"Content-Type": "application/json",
|
|
165
|
-
...options
|
|
191
|
+
...options.headers,
|
|
166
192
|
},
|
|
167
193
|
});
|
|
168
194
|
};
|
|
@@ -173,8 +199,8 @@ export const apiTokenControllerDeleteToken = <
|
|
|
173
199
|
options: Options<ApiTokenControllerDeleteTokenData, ThrowOnError>,
|
|
174
200
|
) => {
|
|
175
201
|
return (options.client ?? _heyApiClient).delete<
|
|
176
|
-
|
|
177
|
-
|
|
202
|
+
ApiTokenControllerDeleteTokenResponses,
|
|
203
|
+
ApiTokenControllerDeleteTokenErrors,
|
|
178
204
|
ThrowOnError
|
|
179
205
|
>({
|
|
180
206
|
security: [
|
|
@@ -193,7 +219,11 @@ export const apiTokenControllerGetToken = <
|
|
|
193
219
|
>(
|
|
194
220
|
options: Options<ApiTokenControllerGetTokenData, ThrowOnError>,
|
|
195
221
|
) => {
|
|
196
|
-
return (options.client ?? _heyApiClient).get<
|
|
222
|
+
return (options.client ?? _heyApiClient).get<
|
|
223
|
+
ApiTokenControllerGetTokenResponses,
|
|
224
|
+
ApiTokenControllerGetTokenErrors,
|
|
225
|
+
ThrowOnError
|
|
226
|
+
>({
|
|
197
227
|
security: [
|
|
198
228
|
{
|
|
199
229
|
name: "x-api-token",
|
|
@@ -211,8 +241,8 @@ export const apiTokenControllerUpdateToken = <
|
|
|
211
241
|
options: Options<ApiTokenControllerUpdateTokenData, ThrowOnError>,
|
|
212
242
|
) => {
|
|
213
243
|
return (options.client ?? _heyApiClient).patch<
|
|
214
|
-
|
|
215
|
-
|
|
244
|
+
ApiTokenControllerUpdateTokenResponses,
|
|
245
|
+
ApiTokenControllerUpdateTokenErrors,
|
|
216
246
|
ThrowOnError
|
|
217
247
|
>({
|
|
218
248
|
security: [
|
|
@@ -225,7 +255,7 @@ export const apiTokenControllerUpdateToken = <
|
|
|
225
255
|
...options,
|
|
226
256
|
headers: {
|
|
227
257
|
"Content-Type": "application/json",
|
|
228
|
-
...options
|
|
258
|
+
...options.headers,
|
|
229
259
|
},
|
|
230
260
|
});
|
|
231
261
|
};
|
|
@@ -235,28 +265,34 @@ export const quotesControllerCreateQuote = <
|
|
|
235
265
|
>(
|
|
236
266
|
options: Options<QuotesControllerCreateQuoteData, ThrowOnError>,
|
|
237
267
|
) => {
|
|
238
|
-
return (options.client ?? _heyApiClient).post<
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
...options,
|
|
248
|
-
headers: {
|
|
249
|
-
"Content-Type": "application/json",
|
|
250
|
-
...options?.headers,
|
|
268
|
+
return (options.client ?? _heyApiClient).post<
|
|
269
|
+
QuotesControllerCreateQuoteResponses,
|
|
270
|
+
QuotesControllerCreateQuoteErrors,
|
|
271
|
+
ThrowOnError
|
|
272
|
+
>({
|
|
273
|
+
security: [
|
|
274
|
+
{
|
|
275
|
+
name: "x-api-token",
|
|
276
|
+
type: "apiKey",
|
|
251
277
|
},
|
|
278
|
+
],
|
|
279
|
+
url: "/quotes",
|
|
280
|
+
...options,
|
|
281
|
+
headers: {
|
|
282
|
+
"Content-Type": "application/json",
|
|
283
|
+
...options.headers,
|
|
252
284
|
},
|
|
253
|
-
);
|
|
285
|
+
});
|
|
254
286
|
};
|
|
255
287
|
|
|
256
288
|
export const quotesControllerGetQuote = <ThrowOnError extends boolean = false>(
|
|
257
289
|
options: Options<QuotesControllerGetQuoteData, ThrowOnError>,
|
|
258
290
|
) => {
|
|
259
|
-
return (options.client ?? _heyApiClient).get<
|
|
291
|
+
return (options.client ?? _heyApiClient).get<
|
|
292
|
+
QuotesControllerGetQuoteResponses,
|
|
293
|
+
QuotesControllerGetQuoteErrors,
|
|
294
|
+
ThrowOnError
|
|
295
|
+
>({
|
|
260
296
|
security: [
|
|
261
297
|
{
|
|
262
298
|
name: "x-api-token",
|
|
@@ -274,8 +310,8 @@ export const flightsControllerGenerateFlightId = <
|
|
|
274
310
|
options: Options<FlightsControllerGenerateFlightIdData, ThrowOnError>,
|
|
275
311
|
) => {
|
|
276
312
|
return (options.client ?? _heyApiClient).get<
|
|
277
|
-
|
|
278
|
-
|
|
313
|
+
FlightsControllerGenerateFlightIdResponses,
|
|
314
|
+
FlightsControllerGenerateFlightIdErrors,
|
|
279
315
|
ThrowOnError
|
|
280
316
|
>({
|
|
281
317
|
security: [
|
|
@@ -295,8 +331,8 @@ export const flightsControllerCreatePresignedUrls = <
|
|
|
295
331
|
options: Options<FlightsControllerCreatePresignedUrlsData, ThrowOnError>,
|
|
296
332
|
) => {
|
|
297
333
|
return (options.client ?? _heyApiClient).post<
|
|
298
|
-
|
|
299
|
-
|
|
334
|
+
FlightsControllerCreatePresignedUrlsResponses,
|
|
335
|
+
FlightsControllerCreatePresignedUrlsErrors,
|
|
300
336
|
ThrowOnError
|
|
301
337
|
>({
|
|
302
338
|
security: [
|
|
@@ -309,7 +345,7 @@ export const flightsControllerCreatePresignedUrls = <
|
|
|
309
345
|
...options,
|
|
310
346
|
headers: {
|
|
311
347
|
"Content-Type": "application/json",
|
|
312
|
-
...options
|
|
348
|
+
...options.headers,
|
|
313
349
|
},
|
|
314
350
|
});
|
|
315
351
|
};
|
|
@@ -320,8 +356,8 @@ export const flightsControllerValidateFlight = <
|
|
|
320
356
|
options: Options<FlightsControllerValidateFlightData, ThrowOnError>,
|
|
321
357
|
) => {
|
|
322
358
|
return (options.client ?? _heyApiClient).post<
|
|
323
|
-
|
|
324
|
-
|
|
359
|
+
FlightsControllerValidateFlightResponses,
|
|
360
|
+
FlightsControllerValidateFlightErrors,
|
|
325
361
|
ThrowOnError
|
|
326
362
|
>({
|
|
327
363
|
security: [
|
|
@@ -334,7 +370,7 @@ export const flightsControllerValidateFlight = <
|
|
|
334
370
|
...options,
|
|
335
371
|
headers: {
|
|
336
372
|
"Content-Type": "application/json",
|
|
337
|
-
...options
|
|
373
|
+
...options.headers,
|
|
338
374
|
},
|
|
339
375
|
});
|
|
340
376
|
};
|
|
@@ -348,7 +384,7 @@ export const conditionsControllerGetSunAltitudeTimeLimits = <
|
|
|
348
384
|
>,
|
|
349
385
|
) => {
|
|
350
386
|
return (options.client ?? _heyApiClient).get<
|
|
351
|
-
|
|
387
|
+
ConditionsControllerGetSunAltitudeTimeLimitsResponses,
|
|
352
388
|
unknown,
|
|
353
389
|
ThrowOnError
|
|
354
390
|
>({
|
|
@@ -362,20 +398,22 @@ export const schemaControllerGetEventSchema = <
|
|
|
362
398
|
>(
|
|
363
399
|
options?: Options<SchemaControllerGetEventSchemaData, ThrowOnError>,
|
|
364
400
|
) => {
|
|
365
|
-
return (options?.client ?? _heyApiClient).get<
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
401
|
+
return (options?.client ?? _heyApiClient).get<
|
|
402
|
+
SchemaControllerGetEventSchemaResponses,
|
|
403
|
+
unknown,
|
|
404
|
+
ThrowOnError
|
|
405
|
+
>({
|
|
406
|
+
url: "/schema/event",
|
|
407
|
+
...options,
|
|
408
|
+
});
|
|
371
409
|
};
|
|
372
410
|
|
|
373
411
|
export const webhooksControllerGetMany = <ThrowOnError extends boolean = false>(
|
|
374
412
|
options: Options<WebhooksControllerGetManyData, ThrowOnError>,
|
|
375
413
|
) => {
|
|
376
414
|
return (options.client ?? _heyApiClient).get<
|
|
377
|
-
|
|
378
|
-
|
|
415
|
+
WebhooksControllerGetManyResponses,
|
|
416
|
+
WebhooksControllerGetManyErrors,
|
|
379
417
|
ThrowOnError
|
|
380
418
|
>({
|
|
381
419
|
security: [
|
|
@@ -393,8 +431,8 @@ export const webhooksControllerCreate = <ThrowOnError extends boolean = false>(
|
|
|
393
431
|
options: Options<WebhooksControllerCreateData, ThrowOnError>,
|
|
394
432
|
) => {
|
|
395
433
|
return (options.client ?? _heyApiClient).post<
|
|
396
|
-
|
|
397
|
-
|
|
434
|
+
WebhooksControllerCreateResponses,
|
|
435
|
+
WebhooksControllerCreateErrors,
|
|
398
436
|
ThrowOnError
|
|
399
437
|
>({
|
|
400
438
|
security: [
|
|
@@ -407,7 +445,7 @@ export const webhooksControllerCreate = <ThrowOnError extends boolean = false>(
|
|
|
407
445
|
...options,
|
|
408
446
|
headers: {
|
|
409
447
|
"Content-Type": "application/json",
|
|
410
|
-
...options
|
|
448
|
+
...options.headers,
|
|
411
449
|
},
|
|
412
450
|
});
|
|
413
451
|
};
|
|
@@ -416,8 +454,8 @@ export const webhooksControllerDelete = <ThrowOnError extends boolean = false>(
|
|
|
416
454
|
options: Options<WebhooksControllerDeleteData, ThrowOnError>,
|
|
417
455
|
) => {
|
|
418
456
|
return (options.client ?? _heyApiClient).delete<
|
|
419
|
-
|
|
420
|
-
|
|
457
|
+
WebhooksControllerDeleteResponses,
|
|
458
|
+
WebhooksControllerDeleteErrors,
|
|
421
459
|
ThrowOnError
|
|
422
460
|
>({
|
|
423
461
|
security: [
|
|
@@ -435,8 +473,8 @@ export const webhooksControllerGet = <ThrowOnError extends boolean = false>(
|
|
|
435
473
|
options: Options<WebhooksControllerGetData, ThrowOnError>,
|
|
436
474
|
) => {
|
|
437
475
|
return (options.client ?? _heyApiClient).get<
|
|
438
|
-
|
|
439
|
-
|
|
476
|
+
WebhooksControllerGetResponses,
|
|
477
|
+
WebhooksControllerGetErrors,
|
|
440
478
|
ThrowOnError
|
|
441
479
|
>({
|
|
442
480
|
security: [
|
|
@@ -454,8 +492,8 @@ export const webhooksControllerUpdate = <ThrowOnError extends boolean = false>(
|
|
|
454
492
|
options: Options<WebhooksControllerUpdateData, ThrowOnError>,
|
|
455
493
|
) => {
|
|
456
494
|
return (options.client ?? _heyApiClient).put<
|
|
457
|
-
|
|
458
|
-
|
|
495
|
+
WebhooksControllerUpdateResponses,
|
|
496
|
+
WebhooksControllerUpdateErrors,
|
|
459
497
|
ThrowOnError
|
|
460
498
|
>({
|
|
461
499
|
security: [
|
|
@@ -468,7 +506,7 @@ export const webhooksControllerUpdate = <ThrowOnError extends boolean = false>(
|
|
|
468
506
|
...options,
|
|
469
507
|
headers: {
|
|
470
508
|
"Content-Type": "application/json",
|
|
471
|
-
...options
|
|
509
|
+
...options.headers,
|
|
472
510
|
},
|
|
473
511
|
});
|
|
474
512
|
};
|
|
@@ -479,8 +517,8 @@ export const webhooksControllerRegenerateSecret = <
|
|
|
479
517
|
options: Options<WebhooksControllerRegenerateSecretData, ThrowOnError>,
|
|
480
518
|
) => {
|
|
481
519
|
return (options.client ?? _heyApiClient).post<
|
|
482
|
-
|
|
483
|
-
|
|
520
|
+
WebhooksControllerRegenerateSecretResponses,
|
|
521
|
+
WebhooksControllerRegenerateSecretErrors,
|
|
484
522
|
ThrowOnError
|
|
485
523
|
>({
|
|
486
524
|
security: [
|
|
@@ -498,8 +536,8 @@ export const webhooksControllerTest = <ThrowOnError extends boolean = false>(
|
|
|
498
536
|
options: Options<WebhooksControllerTestData, ThrowOnError>,
|
|
499
537
|
) => {
|
|
500
538
|
return (options.client ?? _heyApiClient).post<
|
|
501
|
-
|
|
502
|
-
|
|
539
|
+
WebhooksControllerTestResponses,
|
|
540
|
+
WebhooksControllerTestErrors,
|
|
503
541
|
ThrowOnError
|
|
504
542
|
>({
|
|
505
543
|
security: [
|
|
@@ -519,8 +557,8 @@ export const webhooksControllerGetStatus = <
|
|
|
519
557
|
options: Options<WebhooksControllerGetStatusData, ThrowOnError>,
|
|
520
558
|
) => {
|
|
521
559
|
return (options.client ?? _heyApiClient).get<
|
|
522
|
-
|
|
523
|
-
|
|
560
|
+
WebhooksControllerGetStatusResponses,
|
|
561
|
+
WebhooksControllerGetStatusErrors,
|
|
524
562
|
ThrowOnError
|
|
525
563
|
>({
|
|
526
564
|
security: [
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import type {
|
|
3
|
+
ApiTokenControllerUpdateTokenResponse,
|
|
4
|
+
ConditionsControllerGetSunAltitudeTimeLimitsResponse,
|
|
5
|
+
} from "./types.gen.js";
|
|
6
|
+
|
|
7
|
+
const updateApiTokenResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
8
|
+
data.deleted_at = new Date(data.deleted_at);
|
|
9
|
+
data.last_used = new Date(data.last_used);
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const apiTokenControllerUpdateTokenResponseTransformer = async (
|
|
14
|
+
data: any,
|
|
15
|
+
): Promise<ApiTokenControllerUpdateTokenResponse> => {
|
|
16
|
+
data = updateApiTokenResponseDtoSchemaResponseTransformer(data);
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const getTimeLimitsForSunAltitudeResponseSchemaResponseTransformer = (
|
|
21
|
+
data: any,
|
|
22
|
+
) => {
|
|
23
|
+
data.OptimalSunAltitudePeriod.StartTime = new Date(
|
|
24
|
+
data.OptimalSunAltitudePeriod.StartTime,
|
|
25
|
+
);
|
|
26
|
+
data.OptimalSunAltitudePeriod.EndTime = new Date(
|
|
27
|
+
data.OptimalSunAltitudePeriod.EndTime,
|
|
28
|
+
);
|
|
29
|
+
data.DaylightPeriod.StartTime = new Date(data.DaylightPeriod.StartTime);
|
|
30
|
+
data.DaylightPeriod.EndTime = new Date(data.DaylightPeriod.EndTime);
|
|
31
|
+
return data;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const conditionsControllerGetSunAltitudeTimeLimitsResponseTransformer =
|
|
35
|
+
async (
|
|
36
|
+
data: any,
|
|
37
|
+
): Promise<ConditionsControllerGetSunAltitudeTimeLimitsResponse> => {
|
|
38
|
+
data = getTimeLimitsForSunAltitudeResponseSchemaResponseTransformer(data);
|
|
39
|
+
return data;
|
|
40
|
+
};
|
package/src/client/types.gen.ts
CHANGED
|
@@ -32,7 +32,7 @@ export type DepositRewardsRequestDto = {
|
|
|
32
32
|
/**
|
|
33
33
|
* An integer where the last 18 places are decimal places
|
|
34
34
|
*/
|
|
35
|
-
amount:
|
|
35
|
+
amount: bigint;
|
|
36
36
|
vaultId: number;
|
|
37
37
|
vaultManagerAddress?: string;
|
|
38
38
|
};
|
|
@@ -54,12 +54,10 @@ export type DistributeRewardsResponseDto = {
|
|
|
54
54
|
export type CreateApiTokenResponseDto = {
|
|
55
55
|
id: string;
|
|
56
56
|
name: string;
|
|
57
|
-
deleted_at:
|
|
58
|
-
last_used:
|
|
57
|
+
deleted_at: Date;
|
|
58
|
+
last_used: Date;
|
|
59
59
|
org: number;
|
|
60
|
-
scopes: Array<
|
|
61
|
-
"manageTokens" | "manageFlights" | "manageWebhooks" | "all"
|
|
62
|
-
> | null;
|
|
60
|
+
scopes: Array<"manageTokens" | "manageFlights" | "manageWebhooks" | "all">;
|
|
63
61
|
};
|
|
64
62
|
|
|
65
63
|
export type CreateApiTokenRequestDto = {
|
|
@@ -76,12 +74,10 @@ export type UpdateApiTokenRequestDto = {
|
|
|
76
74
|
export type UpdateApiTokenResponseDto = {
|
|
77
75
|
id: string;
|
|
78
76
|
name: string;
|
|
79
|
-
deleted_at:
|
|
80
|
-
last_used:
|
|
77
|
+
deleted_at: Date;
|
|
78
|
+
last_used: Date;
|
|
81
79
|
org: number;
|
|
82
|
-
scopes: Array<
|
|
83
|
-
"manageTokens" | "manageFlights" | "manageWebhooks" | "all"
|
|
84
|
-
> | null;
|
|
80
|
+
scopes: Array<"manageTokens" | "manageFlights" | "manageWebhooks" | "all">;
|
|
85
81
|
};
|
|
86
82
|
|
|
87
83
|
export type CreateQuoteRequestDto = {
|
|
@@ -114,13 +110,13 @@ export type ValidateFlightResponseDto = {
|
|
|
114
110
|
|
|
115
111
|
export type GetTimeLimitsForSunAltitudeResponse = {
|
|
116
112
|
OptimalSunAltitudePeriod: {
|
|
117
|
-
StartTime:
|
|
118
|
-
EndTime:
|
|
113
|
+
StartTime: Date;
|
|
114
|
+
EndTime: Date;
|
|
119
115
|
SunAltitudeAtLimits: number;
|
|
120
116
|
};
|
|
121
117
|
DaylightPeriod: {
|
|
122
|
-
StartTime:
|
|
123
|
-
EndTime:
|
|
118
|
+
StartTime: Date;
|
|
119
|
+
EndTime: Date;
|
|
124
120
|
SunAltitudeAtLimits: number;
|
|
125
121
|
};
|
|
126
122
|
SunAltitudeInDegrees: number;
|
|
@@ -145,7 +141,7 @@ export type GetWebhooksResponse = Array<{
|
|
|
145
141
|
event_types: Array<"test" | "protocol.flight.submitted" | "*">;
|
|
146
142
|
active: boolean;
|
|
147
143
|
failure_count: number;
|
|
148
|
-
last_failure_reason: string
|
|
144
|
+
last_failure_reason: string;
|
|
149
145
|
created_at: string;
|
|
150
146
|
updated_at: string;
|
|
151
147
|
}>;
|
|
@@ -157,7 +153,7 @@ export type GetWebhookResponse = {
|
|
|
157
153
|
event_types: Array<"test" | "protocol.flight.submitted" | "*">;
|
|
158
154
|
active: boolean;
|
|
159
155
|
failure_count: number;
|
|
160
|
-
last_failure_reason: string
|
|
156
|
+
last_failure_reason: string;
|
|
161
157
|
created_at: string;
|
|
162
158
|
updated_at: string;
|
|
163
159
|
};
|
|
@@ -176,7 +172,7 @@ export type UpdateWebhookResponse = {
|
|
|
176
172
|
event_types: Array<"test" | "protocol.flight.submitted" | "*">;
|
|
177
173
|
active: boolean;
|
|
178
174
|
failure_count: number;
|
|
179
|
-
last_failure_reason: string
|
|
175
|
+
last_failure_reason: string;
|
|
180
176
|
created_at: string;
|
|
181
177
|
updated_at: string;
|
|
182
178
|
};
|
|
@@ -195,7 +191,7 @@ export type TestWebhookResponse = {
|
|
|
195
191
|
|
|
196
192
|
export type GetWebhookStatusResponse = {
|
|
197
193
|
status: "inactive" | "error" | "connected" | "connecting";
|
|
198
|
-
error?: string
|
|
194
|
+
error?: string;
|
|
199
195
|
};
|
|
200
196
|
|
|
201
197
|
export type AppControllerGetHelloData = {
|
|
@@ -456,9 +452,9 @@ export type ConditionsControllerGetSunAltitudeTimeLimitsData = {
|
|
|
456
452
|
*/
|
|
457
453
|
lon: number;
|
|
458
454
|
/**
|
|
459
|
-
* Local time in ISO time format with correct timezone YYYY-MM-DDTHH:MM:SS+hh:mm
|
|
455
|
+
* Local time in ISO time format with correct timezone YYYY-MM-DDTHH:MM:SS+hh:mm
|
|
460
456
|
*/
|
|
461
|
-
time:
|
|
457
|
+
time: Date;
|
|
462
458
|
};
|
|
463
459
|
url: "/conditions/sun-altitude";
|
|
464
460
|
};
|
package/src/index.ts
CHANGED