@layer-drone/protocol 0.0.8 → 0.0.9-alpha.1

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.mjs CHANGED
@@ -1,10 +1,595 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
 
4
+ // src/client/core/bodySerializer.ts
5
+ var jsonBodySerializer = {
6
+ bodySerializer: /* @__PURE__ */ __name((body) => JSON.stringify(body, (key, value) => typeof value === "bigint" ? value.toString() : value), "bodySerializer")
7
+ };
8
+
9
+ // src/client/core/params.ts
10
+ var extraPrefixesMap = {
11
+ $body_: "body",
12
+ $headers_: "headers",
13
+ $path_: "path",
14
+ $query_: "query"
15
+ };
16
+ var extraPrefixes = Object.entries(extraPrefixesMap);
17
+
18
+ // src/client/core/auth.ts
19
+ var getAuthToken = /* @__PURE__ */ __name(async (auth, callback) => {
20
+ const token = typeof callback === "function" ? await callback(auth) : callback;
21
+ if (!token) {
22
+ return;
23
+ }
24
+ if (auth.scheme === "bearer") {
25
+ return `Bearer ${token}`;
26
+ }
27
+ if (auth.scheme === "basic") {
28
+ return `Basic ${btoa(token)}`;
29
+ }
30
+ return token;
31
+ }, "getAuthToken");
32
+
33
+ // src/client/core/pathSerializer.ts
34
+ var separatorArrayExplode = /* @__PURE__ */ __name((style) => {
35
+ switch (style) {
36
+ case "label":
37
+ return ".";
38
+ case "matrix":
39
+ return ";";
40
+ case "simple":
41
+ return ",";
42
+ default:
43
+ return "&";
44
+ }
45
+ }, "separatorArrayExplode");
46
+ var separatorArrayNoExplode = /* @__PURE__ */ __name((style) => {
47
+ switch (style) {
48
+ case "form":
49
+ return ",";
50
+ case "pipeDelimited":
51
+ return "|";
52
+ case "spaceDelimited":
53
+ return "%20";
54
+ default:
55
+ return ",";
56
+ }
57
+ }, "separatorArrayNoExplode");
58
+ var separatorObjectExplode = /* @__PURE__ */ __name((style) => {
59
+ switch (style) {
60
+ case "label":
61
+ return ".";
62
+ case "matrix":
63
+ return ";";
64
+ case "simple":
65
+ return ",";
66
+ default:
67
+ return "&";
68
+ }
69
+ }, "separatorObjectExplode");
70
+ var serializeArrayParam = /* @__PURE__ */ __name(({ allowReserved, explode, name, style, value }) => {
71
+ if (!explode) {
72
+ const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
73
+ switch (style) {
74
+ case "label":
75
+ return `.${joinedValues2}`;
76
+ case "matrix":
77
+ return `;${name}=${joinedValues2}`;
78
+ case "simple":
79
+ return joinedValues2;
80
+ default:
81
+ return `${name}=${joinedValues2}`;
82
+ }
83
+ }
84
+ const separator = separatorArrayExplode(style);
85
+ const joinedValues = value.map((v) => {
86
+ if (style === "label" || style === "simple") {
87
+ return allowReserved ? v : encodeURIComponent(v);
88
+ }
89
+ return serializePrimitiveParam({
90
+ allowReserved,
91
+ name,
92
+ value: v
93
+ });
94
+ }).join(separator);
95
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
96
+ }, "serializeArrayParam");
97
+ var serializePrimitiveParam = /* @__PURE__ */ __name(({ allowReserved, name, value }) => {
98
+ if (value === void 0 || value === null) {
99
+ return "";
100
+ }
101
+ if (typeof value === "object") {
102
+ throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");
103
+ }
104
+ return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
105
+ }, "serializePrimitiveParam");
106
+ var serializeObjectParam = /* @__PURE__ */ __name(({ allowReserved, explode, name, style, value, valueOnly }) => {
107
+ if (value instanceof Date) {
108
+ return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
109
+ }
110
+ if (style !== "deepObject" && !explode) {
111
+ let values = [];
112
+ Object.entries(value).forEach(([key, v]) => {
113
+ values = [
114
+ ...values,
115
+ key,
116
+ allowReserved ? v : encodeURIComponent(v)
117
+ ];
118
+ });
119
+ const joinedValues2 = values.join(",");
120
+ switch (style) {
121
+ case "form":
122
+ return `${name}=${joinedValues2}`;
123
+ case "label":
124
+ return `.${joinedValues2}`;
125
+ case "matrix":
126
+ return `;${name}=${joinedValues2}`;
127
+ default:
128
+ return joinedValues2;
129
+ }
130
+ }
131
+ const separator = separatorObjectExplode(style);
132
+ const joinedValues = Object.entries(value).map(([key, v]) => serializePrimitiveParam({
133
+ allowReserved,
134
+ name: style === "deepObject" ? `${name}[${key}]` : key,
135
+ value: v
136
+ })).join(separator);
137
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
138
+ }, "serializeObjectParam");
139
+
140
+ // src/client/client/utils.ts
141
+ var PATH_PARAM_RE = /\{[^{}]+\}/g;
142
+ var defaultPathSerializer = /* @__PURE__ */ __name(({ path, url: _url }) => {
143
+ let url = _url;
144
+ const matches = _url.match(PATH_PARAM_RE);
145
+ if (matches) {
146
+ for (const match of matches) {
147
+ let explode = false;
148
+ let name = match.substring(1, match.length - 1);
149
+ let style = "simple";
150
+ if (name.endsWith("*")) {
151
+ explode = true;
152
+ name = name.substring(0, name.length - 1);
153
+ }
154
+ if (name.startsWith(".")) {
155
+ name = name.substring(1);
156
+ style = "label";
157
+ } else if (name.startsWith(";")) {
158
+ name = name.substring(1);
159
+ style = "matrix";
160
+ }
161
+ const value = path[name];
162
+ if (value === void 0 || value === null) {
163
+ continue;
164
+ }
165
+ if (Array.isArray(value)) {
166
+ url = url.replace(match, serializeArrayParam({
167
+ explode,
168
+ name,
169
+ style,
170
+ value
171
+ }));
172
+ continue;
173
+ }
174
+ if (typeof value === "object") {
175
+ url = url.replace(match, serializeObjectParam({
176
+ explode,
177
+ name,
178
+ style,
179
+ value,
180
+ valueOnly: true
181
+ }));
182
+ continue;
183
+ }
184
+ if (style === "matrix") {
185
+ url = url.replace(match, `;${serializePrimitiveParam({
186
+ name,
187
+ value
188
+ })}`);
189
+ continue;
190
+ }
191
+ const replaceValue = encodeURIComponent(style === "label" ? `.${value}` : value);
192
+ url = url.replace(match, replaceValue);
193
+ }
194
+ }
195
+ return url;
196
+ }, "defaultPathSerializer");
197
+ var createQuerySerializer = /* @__PURE__ */ __name(({ allowReserved, array, object } = {}) => {
198
+ const querySerializer = /* @__PURE__ */ __name((queryParams) => {
199
+ const search = [];
200
+ if (queryParams && typeof queryParams === "object") {
201
+ for (const name in queryParams) {
202
+ const value = queryParams[name];
203
+ if (value === void 0 || value === null) {
204
+ continue;
205
+ }
206
+ if (Array.isArray(value)) {
207
+ const serializedArray = serializeArrayParam({
208
+ allowReserved,
209
+ explode: true,
210
+ name,
211
+ style: "form",
212
+ value,
213
+ ...array
214
+ });
215
+ if (serializedArray) search.push(serializedArray);
216
+ } else if (typeof value === "object") {
217
+ const serializedObject = serializeObjectParam({
218
+ allowReserved,
219
+ explode: true,
220
+ name,
221
+ style: "deepObject",
222
+ value,
223
+ ...object
224
+ });
225
+ if (serializedObject) search.push(serializedObject);
226
+ } else {
227
+ const serializedPrimitive = serializePrimitiveParam({
228
+ allowReserved,
229
+ name,
230
+ value
231
+ });
232
+ if (serializedPrimitive) search.push(serializedPrimitive);
233
+ }
234
+ }
235
+ }
236
+ return search.join("&");
237
+ }, "querySerializer");
238
+ return querySerializer;
239
+ }, "createQuerySerializer");
240
+ var getParseAs = /* @__PURE__ */ __name((contentType) => {
241
+ if (!contentType) {
242
+ return "stream";
243
+ }
244
+ const cleanContent = contentType.split(";")[0]?.trim();
245
+ if (!cleanContent) {
246
+ return;
247
+ }
248
+ if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
249
+ return "json";
250
+ }
251
+ if (cleanContent === "multipart/form-data") {
252
+ return "formData";
253
+ }
254
+ if ([
255
+ "application/",
256
+ "audio/",
257
+ "image/",
258
+ "video/"
259
+ ].some((type) => cleanContent.startsWith(type))) {
260
+ return "blob";
261
+ }
262
+ if (cleanContent.startsWith("text/")) {
263
+ return "text";
264
+ }
265
+ }, "getParseAs");
266
+ var setAuthParams = /* @__PURE__ */ __name(async ({ security, ...options }) => {
267
+ for (const auth of security) {
268
+ const token = await getAuthToken(auth, options.auth);
269
+ if (!token) {
270
+ continue;
271
+ }
272
+ const name = auth.name ?? "Authorization";
273
+ switch (auth.in) {
274
+ case "query":
275
+ if (!options.query) {
276
+ options.query = {};
277
+ }
278
+ options.query[name] = token;
279
+ break;
280
+ case "cookie":
281
+ options.headers.append("Cookie", `${name}=${token}`);
282
+ break;
283
+ case "header":
284
+ default:
285
+ options.headers.set(name, token);
286
+ break;
287
+ }
288
+ return;
289
+ }
290
+ }, "setAuthParams");
291
+ var buildUrl = /* @__PURE__ */ __name((options) => {
292
+ const url = getUrl({
293
+ baseUrl: options.baseUrl,
294
+ path: options.path,
295
+ query: options.query,
296
+ querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
297
+ url: options.url
298
+ });
299
+ return url;
300
+ }, "buildUrl");
301
+ var getUrl = /* @__PURE__ */ __name(({ baseUrl, path, query, querySerializer, url: _url }) => {
302
+ const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
303
+ let url = (baseUrl ?? "") + pathUrl;
304
+ if (path) {
305
+ url = defaultPathSerializer({
306
+ path,
307
+ url
308
+ });
309
+ }
310
+ let search = query ? querySerializer(query) : "";
311
+ if (search.startsWith("?")) {
312
+ search = search.substring(1);
313
+ }
314
+ if (search) {
315
+ url += `?${search}`;
316
+ }
317
+ return url;
318
+ }, "getUrl");
319
+ var mergeConfigs = /* @__PURE__ */ __name((a, b) => {
320
+ const config = {
321
+ ...a,
322
+ ...b
323
+ };
324
+ if (config.baseUrl?.endsWith("/")) {
325
+ config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
326
+ }
327
+ config.headers = mergeHeaders(a.headers, b.headers);
328
+ return config;
329
+ }, "mergeConfigs");
330
+ var mergeHeaders = /* @__PURE__ */ __name((...headers) => {
331
+ const mergedHeaders = new Headers();
332
+ for (const header of headers) {
333
+ if (!header || typeof header !== "object") {
334
+ continue;
335
+ }
336
+ const iterator = header instanceof Headers ? header.entries() : Object.entries(header);
337
+ for (const [key, value] of iterator) {
338
+ if (value === null) {
339
+ mergedHeaders.delete(key);
340
+ } else if (Array.isArray(value)) {
341
+ for (const v of value) {
342
+ mergedHeaders.append(key, v);
343
+ }
344
+ } else if (value !== void 0) {
345
+ mergedHeaders.set(key, typeof value === "object" ? JSON.stringify(value) : value);
346
+ }
347
+ }
348
+ }
349
+ return mergedHeaders;
350
+ }, "mergeHeaders");
351
+ var Interceptors = class Interceptors2 {
352
+ static {
353
+ __name(this, "Interceptors");
354
+ }
355
+ _fns;
356
+ constructor() {
357
+ this._fns = [];
358
+ }
359
+ clear() {
360
+ this._fns = [];
361
+ }
362
+ getInterceptorIndex(id) {
363
+ if (typeof id === "number") {
364
+ return this._fns[id] ? id : -1;
365
+ } else {
366
+ return this._fns.indexOf(id);
367
+ }
368
+ }
369
+ exists(id) {
370
+ const index = this.getInterceptorIndex(id);
371
+ return !!this._fns[index];
372
+ }
373
+ eject(id) {
374
+ const index = this.getInterceptorIndex(id);
375
+ if (this._fns[index]) {
376
+ this._fns[index] = null;
377
+ }
378
+ }
379
+ update(id, fn) {
380
+ const index = this.getInterceptorIndex(id);
381
+ if (this._fns[index]) {
382
+ this._fns[index] = fn;
383
+ return id;
384
+ } else {
385
+ return false;
386
+ }
387
+ }
388
+ use(fn) {
389
+ this._fns = [
390
+ ...this._fns,
391
+ fn
392
+ ];
393
+ return this._fns.length - 1;
394
+ }
395
+ };
396
+ var createInterceptors = /* @__PURE__ */ __name(() => ({
397
+ error: new Interceptors(),
398
+ request: new Interceptors(),
399
+ response: new Interceptors()
400
+ }), "createInterceptors");
401
+ var defaultQuerySerializer = createQuerySerializer({
402
+ allowReserved: false,
403
+ array: {
404
+ explode: true,
405
+ style: "form"
406
+ },
407
+ object: {
408
+ explode: true,
409
+ style: "deepObject"
410
+ }
411
+ });
412
+ var defaultHeaders = {
413
+ "Content-Type": "application/json"
414
+ };
415
+ var createConfig = /* @__PURE__ */ __name((override = {}) => ({
416
+ ...jsonBodySerializer,
417
+ headers: defaultHeaders,
418
+ parseAs: "auto",
419
+ querySerializer: defaultQuerySerializer,
420
+ ...override
421
+ }), "createConfig");
422
+
423
+ // src/client/client/client.ts
424
+ var createClient = /* @__PURE__ */ __name((config = {}) => {
425
+ let _config = mergeConfigs(createConfig(), config);
426
+ const getConfig = /* @__PURE__ */ __name(() => ({
427
+ ..._config
428
+ }), "getConfig");
429
+ const setConfig = /* @__PURE__ */ __name((config2) => {
430
+ _config = mergeConfigs(_config, config2);
431
+ return getConfig();
432
+ }, "setConfig");
433
+ const interceptors = createInterceptors();
434
+ const request = /* @__PURE__ */ __name(async (options) => {
435
+ const opts = {
436
+ ..._config,
437
+ ...options,
438
+ fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
439
+ headers: mergeHeaders(_config.headers, options.headers)
440
+ };
441
+ if (opts.security) {
442
+ await setAuthParams({
443
+ ...opts,
444
+ security: opts.security
445
+ });
446
+ }
447
+ if (opts.body && opts.bodySerializer) {
448
+ opts.body = opts.bodySerializer(opts.body);
449
+ }
450
+ if (opts.body === void 0 || opts.body === "") {
451
+ opts.headers.delete("Content-Type");
452
+ }
453
+ const url = buildUrl(opts);
454
+ const requestInit = {
455
+ redirect: "follow",
456
+ ...opts
457
+ };
458
+ let request2 = new Request(url, requestInit);
459
+ for (const fn of interceptors.request._fns) {
460
+ if (fn) {
461
+ request2 = await fn(request2, opts);
462
+ }
463
+ }
464
+ const _fetch = opts.fetch;
465
+ let response = await _fetch(request2);
466
+ for (const fn of interceptors.response._fns) {
467
+ if (fn) {
468
+ response = await fn(response, request2, opts);
469
+ }
470
+ }
471
+ const result = {
472
+ request: request2,
473
+ response
474
+ };
475
+ if (response.ok) {
476
+ if (response.status === 204 || response.headers.get("Content-Length") === "0") {
477
+ return opts.responseStyle === "data" ? {} : {
478
+ data: {},
479
+ ...result
480
+ };
481
+ }
482
+ const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
483
+ if (parseAs === "stream") {
484
+ return opts.responseStyle === "data" ? response.body : {
485
+ data: response.body,
486
+ ...result
487
+ };
488
+ }
489
+ let data = await response[parseAs]();
490
+ if (parseAs === "json") {
491
+ if (opts.responseValidator) {
492
+ await opts.responseValidator(data);
493
+ }
494
+ if (opts.responseTransformer) {
495
+ data = await opts.responseTransformer(data);
496
+ }
497
+ }
498
+ return opts.responseStyle === "data" ? data : {
499
+ data,
500
+ ...result
501
+ };
502
+ }
503
+ let error = await response.text();
504
+ try {
505
+ error = JSON.parse(error);
506
+ } catch {
507
+ }
508
+ let finalError = error;
509
+ for (const fn of interceptors.error._fns) {
510
+ if (fn) {
511
+ finalError = await fn(error, response, request2, opts);
512
+ }
513
+ }
514
+ finalError = finalError || {};
515
+ if (opts.throwOnError) {
516
+ throw finalError;
517
+ }
518
+ return opts.responseStyle === "data" ? void 0 : {
519
+ error: finalError,
520
+ ...result
521
+ };
522
+ }, "request");
523
+ return {
524
+ buildUrl,
525
+ connect: /* @__PURE__ */ __name((options) => request({
526
+ ...options,
527
+ method: "CONNECT"
528
+ }), "connect"),
529
+ delete: /* @__PURE__ */ __name((options) => request({
530
+ ...options,
531
+ method: "DELETE"
532
+ }), "delete"),
533
+ get: /* @__PURE__ */ __name((options) => request({
534
+ ...options,
535
+ method: "GET"
536
+ }), "get"),
537
+ getConfig,
538
+ head: /* @__PURE__ */ __name((options) => request({
539
+ ...options,
540
+ method: "HEAD"
541
+ }), "head"),
542
+ interceptors,
543
+ options: /* @__PURE__ */ __name((options) => request({
544
+ ...options,
545
+ method: "OPTIONS"
546
+ }), "options"),
547
+ patch: /* @__PURE__ */ __name((options) => request({
548
+ ...options,
549
+ method: "PATCH"
550
+ }), "patch"),
551
+ post: /* @__PURE__ */ __name((options) => request({
552
+ ...options,
553
+ method: "POST"
554
+ }), "post"),
555
+ put: /* @__PURE__ */ __name((options) => request({
556
+ ...options,
557
+ method: "PUT"
558
+ }), "put"),
559
+ request,
560
+ setConfig,
561
+ trace: /* @__PURE__ */ __name((options) => request({
562
+ ...options,
563
+ method: "TRACE"
564
+ }), "trace")
565
+ };
566
+ }, "createClient");
567
+
4
568
  // src/client/client.gen.ts
5
- import { createClient, createConfig } from "@hey-api/client-fetch";
6
569
  var client = createClient(createConfig());
7
570
 
571
+ // src/client/transformers.gen.ts
572
+ var updateApiTokenResponseDtoSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
573
+ data.deleted_at = new Date(data.deleted_at);
574
+ data.last_used = new Date(data.last_used);
575
+ return data;
576
+ }, "updateApiTokenResponseDtoSchemaResponseTransformer");
577
+ var apiTokenControllerUpdateTokenResponseTransformer = /* @__PURE__ */ __name(async (data) => {
578
+ data = updateApiTokenResponseDtoSchemaResponseTransformer(data);
579
+ return data;
580
+ }, "apiTokenControllerUpdateTokenResponseTransformer");
581
+ var getTimeLimitsForSunAltitudeResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
582
+ data.OptimalSunAltitudePeriod.StartTime = new Date(data.OptimalSunAltitudePeriod.StartTime);
583
+ data.OptimalSunAltitudePeriod.EndTime = new Date(data.OptimalSunAltitudePeriod.EndTime);
584
+ data.DaylightPeriod.StartTime = new Date(data.DaylightPeriod.StartTime);
585
+ data.DaylightPeriod.EndTime = new Date(data.DaylightPeriod.EndTime);
586
+ return data;
587
+ }, "getTimeLimitsForSunAltitudeResponseSchemaResponseTransformer");
588
+ var conditionsControllerGetSunAltitudeTimeLimitsResponseTransformer = /* @__PURE__ */ __name(async (data) => {
589
+ data = getTimeLimitsForSunAltitudeResponseSchemaResponseTransformer(data);
590
+ return data;
591
+ }, "conditionsControllerGetSunAltitudeTimeLimitsResponseTransformer");
592
+
8
593
  // src/client/sdk.gen.ts
9
594
  var appControllerGetHello = /* @__PURE__ */ __name((options) => {
10
595
  return (options?.client ?? client).get({
@@ -30,7 +615,7 @@ var rewardsControllerDepositRewards = /* @__PURE__ */ __name((options) => {
30
615
  ...options,
31
616
  headers: {
32
617
  "Content-Type": "application/json",
33
- ...options?.headers
618
+ ...options.headers
34
619
  }
35
620
  });
36
621
  }, "rewardsControllerDepositRewards");
@@ -46,7 +631,7 @@ var rewardsControllerDistributeRewards = /* @__PURE__ */ __name((options) => {
46
631
  ...options,
47
632
  headers: {
48
633
  "Content-Type": "application/json",
49
- ...options?.headers
634
+ ...options.headers
50
635
  }
51
636
  });
52
637
  }, "rewardsControllerDistributeRewards");
@@ -62,7 +647,7 @@ var apiTokenControllerCreateToken = /* @__PURE__ */ __name((options) => {
62
647
  ...options,
63
648
  headers: {
64
649
  "Content-Type": "application/json",
65
- ...options?.headers
650
+ ...options.headers
66
651
  }
67
652
  });
68
653
  }, "apiTokenControllerCreateToken");
@@ -98,11 +683,12 @@ var apiTokenControllerUpdateToken = /* @__PURE__ */ __name((options) => {
98
683
  type: "apiKey"
99
684
  }
100
685
  ],
686
+ responseTransformer: apiTokenControllerUpdateTokenResponseTransformer,
101
687
  url: "/tokens/{id}",
102
688
  ...options,
103
689
  headers: {
104
690
  "Content-Type": "application/json",
105
- ...options?.headers
691
+ ...options.headers
106
692
  }
107
693
  });
108
694
  }, "apiTokenControllerUpdateToken");
@@ -118,7 +704,7 @@ var quotesControllerCreateQuote = /* @__PURE__ */ __name((options) => {
118
704
  ...options,
119
705
  headers: {
120
706
  "Content-Type": "application/json",
121
- ...options?.headers
707
+ ...options.headers
122
708
  }
123
709
  });
124
710
  }, "quotesControllerCreateQuote");
@@ -158,7 +744,7 @@ var flightsControllerCreatePresignedUrls = /* @__PURE__ */ __name((options) => {
158
744
  ...options,
159
745
  headers: {
160
746
  "Content-Type": "application/json",
161
- ...options?.headers
747
+ ...options.headers
162
748
  }
163
749
  });
164
750
  }, "flightsControllerCreatePresignedUrls");
@@ -174,12 +760,13 @@ var flightsControllerValidateFlight = /* @__PURE__ */ __name((options) => {
174
760
  ...options,
175
761
  headers: {
176
762
  "Content-Type": "application/json",
177
- ...options?.headers
763
+ ...options.headers
178
764
  }
179
765
  });
180
766
  }, "flightsControllerValidateFlight");
181
767
  var conditionsControllerGetSunAltitudeTimeLimits = /* @__PURE__ */ __name((options) => {
182
768
  return (options.client ?? client).get({
769
+ responseTransformer: conditionsControllerGetSunAltitudeTimeLimitsResponseTransformer,
183
770
  url: "/conditions/sun-altitude",
184
771
  ...options
185
772
  });
@@ -214,7 +801,7 @@ var webhooksControllerCreate = /* @__PURE__ */ __name((options) => {
214
801
  ...options,
215
802
  headers: {
216
803
  "Content-Type": "application/json",
217
- ...options?.headers
804
+ ...options.headers
218
805
  }
219
806
  });
220
807
  }, "webhooksControllerCreate");
@@ -254,7 +841,7 @@ var webhooksControllerUpdate = /* @__PURE__ */ __name((options) => {
254
841
  ...options,
255
842
  headers: {
256
843
  "Content-Type": "application/json",
257
- ...options?.headers
844
+ ...options.headers
258
845
  }
259
846
  });
260
847
  }, "webhooksControllerUpdate");
@@ -349,6 +936,7 @@ export {
349
936
  apiTokenControllerGetToken,
350
937
  apiTokenControllerUpdateToken,
351
938
  appControllerGetHello,
939
+ client,
352
940
  conditionsControllerGetSunAltitudeTimeLimits,
353
941
  flightsControllerCreatePresignedUrls,
354
942
  flightsControllerGenerateFlightId,
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": "0.0.8",
4
+ "version": "0.0.9-alpha.1",
5
5
  "license": "MIT",
6
6
  "files": [
7
7
  "dist",
@@ -16,7 +16,7 @@
16
16
  "@hey-api/client-fetch": "^0.8.3"
17
17
  },
18
18
  "devDependencies": {
19
- "@hey-api/openapi-ts": "^0.64.11",
19
+ "@hey-api/openapi-ts": "^0.73.0",
20
20
  "@types/express": "^4",
21
21
  "@types/node": "^20.3.1",
22
22
  "express": "^4",