@nixopus/api-client 0.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.mjs ADDED
@@ -0,0 +1,1424 @@
1
+ // src/core/bodySerializer.gen.ts
2
+ var jsonBodySerializer = {
3
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
4
+ };
5
+
6
+ // src/core/params.gen.ts
7
+ var extraPrefixesMap = {
8
+ $body_: "body",
9
+ $headers_: "headers",
10
+ $path_: "path",
11
+ $query_: "query"
12
+ };
13
+ var extraPrefixes = Object.entries(extraPrefixesMap);
14
+
15
+ // src/core/serverSentEvents.gen.ts
16
+ var createSseClient = ({
17
+ onRequest,
18
+ onSseError,
19
+ onSseEvent,
20
+ responseTransformer,
21
+ responseValidator,
22
+ sseDefaultRetryDelay,
23
+ sseMaxRetryAttempts,
24
+ sseMaxRetryDelay,
25
+ sseSleepFn,
26
+ url,
27
+ ...options
28
+ }) => {
29
+ let lastEventId;
30
+ const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
31
+ const createStream = async function* () {
32
+ let retryDelay = sseDefaultRetryDelay ?? 3e3;
33
+ let attempt = 0;
34
+ const signal = options.signal ?? new AbortController().signal;
35
+ while (true) {
36
+ if (signal.aborted) break;
37
+ attempt++;
38
+ const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
39
+ if (lastEventId !== void 0) {
40
+ headers.set("Last-Event-ID", lastEventId);
41
+ }
42
+ try {
43
+ const requestInit = {
44
+ redirect: "follow",
45
+ ...options,
46
+ body: options.serializedBody,
47
+ headers,
48
+ signal
49
+ };
50
+ let request = new Request(url, requestInit);
51
+ if (onRequest) {
52
+ request = await onRequest(url, requestInit);
53
+ }
54
+ const _fetch = options.fetch ?? globalThis.fetch;
55
+ const response = await _fetch(request);
56
+ if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
57
+ if (!response.body) throw new Error("No body in SSE response");
58
+ const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
59
+ let buffer = "";
60
+ const abortHandler = () => {
61
+ try {
62
+ reader.cancel();
63
+ } catch {
64
+ }
65
+ };
66
+ signal.addEventListener("abort", abortHandler);
67
+ try {
68
+ while (true) {
69
+ const { done, value } = await reader.read();
70
+ if (done) break;
71
+ buffer += value;
72
+ buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
73
+ const chunks = buffer.split("\n\n");
74
+ buffer = chunks.pop() ?? "";
75
+ for (const chunk of chunks) {
76
+ const lines = chunk.split("\n");
77
+ const dataLines = [];
78
+ let eventName;
79
+ for (const line of lines) {
80
+ if (line.startsWith("data:")) {
81
+ dataLines.push(line.replace(/^data:\s*/, ""));
82
+ } else if (line.startsWith("event:")) {
83
+ eventName = line.replace(/^event:\s*/, "");
84
+ } else if (line.startsWith("id:")) {
85
+ lastEventId = line.replace(/^id:\s*/, "");
86
+ } else if (line.startsWith("retry:")) {
87
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
88
+ if (!Number.isNaN(parsed)) {
89
+ retryDelay = parsed;
90
+ }
91
+ }
92
+ }
93
+ let data;
94
+ let parsedJson = false;
95
+ if (dataLines.length) {
96
+ const rawData = dataLines.join("\n");
97
+ try {
98
+ data = JSON.parse(rawData);
99
+ parsedJson = true;
100
+ } catch {
101
+ data = rawData;
102
+ }
103
+ }
104
+ if (parsedJson) {
105
+ if (responseValidator) {
106
+ await responseValidator(data);
107
+ }
108
+ if (responseTransformer) {
109
+ data = await responseTransformer(data);
110
+ }
111
+ }
112
+ onSseEvent?.({
113
+ data,
114
+ event: eventName,
115
+ id: lastEventId,
116
+ retry: retryDelay
117
+ });
118
+ if (dataLines.length) {
119
+ yield data;
120
+ }
121
+ }
122
+ }
123
+ } finally {
124
+ signal.removeEventListener("abort", abortHandler);
125
+ reader.releaseLock();
126
+ }
127
+ break;
128
+ } catch (error) {
129
+ onSseError?.(error);
130
+ if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
131
+ break;
132
+ }
133
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
134
+ await sleep(backoff);
135
+ }
136
+ }
137
+ };
138
+ const stream = createStream();
139
+ return { stream };
140
+ };
141
+
142
+ // src/core/pathSerializer.gen.ts
143
+ var separatorArrayExplode = (style) => {
144
+ switch (style) {
145
+ case "label":
146
+ return ".";
147
+ case "matrix":
148
+ return ";";
149
+ case "simple":
150
+ return ",";
151
+ default:
152
+ return "&";
153
+ }
154
+ };
155
+ var separatorArrayNoExplode = (style) => {
156
+ switch (style) {
157
+ case "form":
158
+ return ",";
159
+ case "pipeDelimited":
160
+ return "|";
161
+ case "spaceDelimited":
162
+ return "%20";
163
+ default:
164
+ return ",";
165
+ }
166
+ };
167
+ var separatorObjectExplode = (style) => {
168
+ switch (style) {
169
+ case "label":
170
+ return ".";
171
+ case "matrix":
172
+ return ";";
173
+ case "simple":
174
+ return ",";
175
+ default:
176
+ return "&";
177
+ }
178
+ };
179
+ var serializeArrayParam = ({
180
+ allowReserved,
181
+ explode,
182
+ name,
183
+ style,
184
+ value
185
+ }) => {
186
+ if (!explode) {
187
+ const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
188
+ switch (style) {
189
+ case "label":
190
+ return `.${joinedValues2}`;
191
+ case "matrix":
192
+ return `;${name}=${joinedValues2}`;
193
+ case "simple":
194
+ return joinedValues2;
195
+ default:
196
+ return `${name}=${joinedValues2}`;
197
+ }
198
+ }
199
+ const separator = separatorArrayExplode(style);
200
+ const joinedValues = value.map((v) => {
201
+ if (style === "label" || style === "simple") {
202
+ return allowReserved ? v : encodeURIComponent(v);
203
+ }
204
+ return serializePrimitiveParam({
205
+ allowReserved,
206
+ name,
207
+ value: v
208
+ });
209
+ }).join(separator);
210
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
211
+ };
212
+ var serializePrimitiveParam = ({
213
+ allowReserved,
214
+ name,
215
+ value
216
+ }) => {
217
+ if (value === void 0 || value === null) {
218
+ return "";
219
+ }
220
+ if (typeof value === "object") {
221
+ throw new Error(
222
+ "Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these."
223
+ );
224
+ }
225
+ return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
226
+ };
227
+ var serializeObjectParam = ({
228
+ allowReserved,
229
+ explode,
230
+ name,
231
+ style,
232
+ value,
233
+ valueOnly
234
+ }) => {
235
+ if (value instanceof Date) {
236
+ return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
237
+ }
238
+ if (style !== "deepObject" && !explode) {
239
+ let values = [];
240
+ Object.entries(value).forEach(([key, v]) => {
241
+ values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
242
+ });
243
+ const joinedValues2 = values.join(",");
244
+ switch (style) {
245
+ case "form":
246
+ return `${name}=${joinedValues2}`;
247
+ case "label":
248
+ return `.${joinedValues2}`;
249
+ case "matrix":
250
+ return `;${name}=${joinedValues2}`;
251
+ default:
252
+ return joinedValues2;
253
+ }
254
+ }
255
+ const separator = separatorObjectExplode(style);
256
+ const joinedValues = Object.entries(value).map(
257
+ ([key, v]) => serializePrimitiveParam({
258
+ allowReserved,
259
+ name: style === "deepObject" ? `${name}[${key}]` : key,
260
+ value: v
261
+ })
262
+ ).join(separator);
263
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
264
+ };
265
+
266
+ // src/core/utils.gen.ts
267
+ var PATH_PARAM_RE = /\{[^{}]+\}/g;
268
+ var defaultPathSerializer = ({ path, url: _url }) => {
269
+ let url = _url;
270
+ const matches = _url.match(PATH_PARAM_RE);
271
+ if (matches) {
272
+ for (const match of matches) {
273
+ let explode = false;
274
+ let name = match.substring(1, match.length - 1);
275
+ let style = "simple";
276
+ if (name.endsWith("*")) {
277
+ explode = true;
278
+ name = name.substring(0, name.length - 1);
279
+ }
280
+ if (name.startsWith(".")) {
281
+ name = name.substring(1);
282
+ style = "label";
283
+ } else if (name.startsWith(";")) {
284
+ name = name.substring(1);
285
+ style = "matrix";
286
+ }
287
+ const value = path[name];
288
+ if (value === void 0 || value === null) {
289
+ continue;
290
+ }
291
+ if (Array.isArray(value)) {
292
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
293
+ continue;
294
+ }
295
+ if (typeof value === "object") {
296
+ url = url.replace(
297
+ match,
298
+ serializeObjectParam({
299
+ explode,
300
+ name,
301
+ style,
302
+ value,
303
+ valueOnly: true
304
+ })
305
+ );
306
+ continue;
307
+ }
308
+ if (style === "matrix") {
309
+ url = url.replace(
310
+ match,
311
+ `;${serializePrimitiveParam({
312
+ name,
313
+ value
314
+ })}`
315
+ );
316
+ continue;
317
+ }
318
+ const replaceValue = encodeURIComponent(
319
+ style === "label" ? `.${value}` : value
320
+ );
321
+ url = url.replace(match, replaceValue);
322
+ }
323
+ }
324
+ return url;
325
+ };
326
+ var getUrl = ({
327
+ baseUrl,
328
+ path,
329
+ query,
330
+ querySerializer,
331
+ url: _url
332
+ }) => {
333
+ const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
334
+ let url = (baseUrl ?? "") + pathUrl;
335
+ if (path) {
336
+ url = defaultPathSerializer({ path, url });
337
+ }
338
+ let search = query ? querySerializer(query) : "";
339
+ if (search.startsWith("?")) {
340
+ search = search.substring(1);
341
+ }
342
+ if (search) {
343
+ url += `?${search}`;
344
+ }
345
+ return url;
346
+ };
347
+ function getValidRequestBody(options) {
348
+ const hasBody = options.body !== void 0;
349
+ const isSerializedBody = hasBody && options.bodySerializer;
350
+ if (isSerializedBody) {
351
+ if ("serializedBody" in options) {
352
+ const hasSerializedBody = options.serializedBody !== void 0 && options.serializedBody !== "";
353
+ return hasSerializedBody ? options.serializedBody : null;
354
+ }
355
+ return options.body !== "" ? options.body : null;
356
+ }
357
+ if (hasBody) {
358
+ return options.body;
359
+ }
360
+ return void 0;
361
+ }
362
+
363
+ // src/core/auth.gen.ts
364
+ var getAuthToken = async (auth, callback) => {
365
+ const token = typeof callback === "function" ? await callback(auth) : callback;
366
+ if (!token) {
367
+ return;
368
+ }
369
+ if (auth.scheme === "bearer") {
370
+ return `Bearer ${token}`;
371
+ }
372
+ if (auth.scheme === "basic") {
373
+ return `Basic ${btoa(token)}`;
374
+ }
375
+ return token;
376
+ };
377
+
378
+ // src/client/utils.gen.ts
379
+ var createQuerySerializer = ({
380
+ parameters = {},
381
+ ...args
382
+ } = {}) => {
383
+ const querySerializer = (queryParams) => {
384
+ const search = [];
385
+ if (queryParams && typeof queryParams === "object") {
386
+ for (const name in queryParams) {
387
+ const value = queryParams[name];
388
+ if (value === void 0 || value === null) {
389
+ continue;
390
+ }
391
+ const options = parameters[name] || args;
392
+ if (Array.isArray(value)) {
393
+ const serializedArray = serializeArrayParam({
394
+ allowReserved: options.allowReserved,
395
+ explode: true,
396
+ name,
397
+ style: "form",
398
+ value,
399
+ ...options.array
400
+ });
401
+ if (serializedArray) search.push(serializedArray);
402
+ } else if (typeof value === "object") {
403
+ const serializedObject = serializeObjectParam({
404
+ allowReserved: options.allowReserved,
405
+ explode: true,
406
+ name,
407
+ style: "deepObject",
408
+ value,
409
+ ...options.object
410
+ });
411
+ if (serializedObject) search.push(serializedObject);
412
+ } else {
413
+ const serializedPrimitive = serializePrimitiveParam({
414
+ allowReserved: options.allowReserved,
415
+ name,
416
+ value
417
+ });
418
+ if (serializedPrimitive) search.push(serializedPrimitive);
419
+ }
420
+ }
421
+ }
422
+ return search.join("&");
423
+ };
424
+ return querySerializer;
425
+ };
426
+ var getParseAs = (contentType) => {
427
+ if (!contentType) {
428
+ return "stream";
429
+ }
430
+ const cleanContent = contentType.split(";")[0]?.trim();
431
+ if (!cleanContent) {
432
+ return;
433
+ }
434
+ if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
435
+ return "json";
436
+ }
437
+ if (cleanContent === "multipart/form-data") {
438
+ return "formData";
439
+ }
440
+ if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
441
+ return "blob";
442
+ }
443
+ if (cleanContent.startsWith("text/")) {
444
+ return "text";
445
+ }
446
+ return;
447
+ };
448
+ var checkForExistence = (options, name) => {
449
+ if (!name) {
450
+ return false;
451
+ }
452
+ if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
453
+ return true;
454
+ }
455
+ return false;
456
+ };
457
+ var setAuthParams = async ({
458
+ security,
459
+ ...options
460
+ }) => {
461
+ for (const auth of security) {
462
+ if (checkForExistence(options, auth.name)) {
463
+ continue;
464
+ }
465
+ const token = await getAuthToken(auth, options.auth);
466
+ if (!token) {
467
+ continue;
468
+ }
469
+ const name = auth.name ?? "Authorization";
470
+ switch (auth.in) {
471
+ case "query":
472
+ if (!options.query) {
473
+ options.query = {};
474
+ }
475
+ options.query[name] = token;
476
+ break;
477
+ case "cookie":
478
+ options.headers.append("Cookie", `${name}=${token}`);
479
+ break;
480
+ case "header":
481
+ default:
482
+ options.headers.set(name, token);
483
+ break;
484
+ }
485
+ }
486
+ };
487
+ var buildUrl = (options) => getUrl({
488
+ baseUrl: options.baseUrl,
489
+ path: options.path,
490
+ query: options.query,
491
+ querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
492
+ url: options.url
493
+ });
494
+ var mergeConfigs = (a, b) => {
495
+ const config = { ...a, ...b };
496
+ if (config.baseUrl?.endsWith("/")) {
497
+ config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
498
+ }
499
+ config.headers = mergeHeaders(a.headers, b.headers);
500
+ return config;
501
+ };
502
+ var headersEntries = (headers) => {
503
+ const entries = [];
504
+ headers.forEach((value, key) => {
505
+ entries.push([key, value]);
506
+ });
507
+ return entries;
508
+ };
509
+ var mergeHeaders = (...headers) => {
510
+ const mergedHeaders = new Headers();
511
+ for (const header of headers) {
512
+ if (!header) {
513
+ continue;
514
+ }
515
+ const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
516
+ for (const [key, value] of iterator) {
517
+ if (value === null) {
518
+ mergedHeaders.delete(key);
519
+ } else if (Array.isArray(value)) {
520
+ for (const v of value) {
521
+ mergedHeaders.append(key, v);
522
+ }
523
+ } else if (value !== void 0) {
524
+ mergedHeaders.set(
525
+ key,
526
+ typeof value === "object" ? JSON.stringify(value) : value
527
+ );
528
+ }
529
+ }
530
+ }
531
+ return mergedHeaders;
532
+ };
533
+ var Interceptors = class {
534
+ constructor() {
535
+ this.fns = [];
536
+ }
537
+ clear() {
538
+ this.fns = [];
539
+ }
540
+ eject(id) {
541
+ const index = this.getInterceptorIndex(id);
542
+ if (this.fns[index]) {
543
+ this.fns[index] = null;
544
+ }
545
+ }
546
+ exists(id) {
547
+ const index = this.getInterceptorIndex(id);
548
+ return Boolean(this.fns[index]);
549
+ }
550
+ getInterceptorIndex(id) {
551
+ if (typeof id === "number") {
552
+ return this.fns[id] ? id : -1;
553
+ }
554
+ return this.fns.indexOf(id);
555
+ }
556
+ update(id, fn) {
557
+ const index = this.getInterceptorIndex(id);
558
+ if (this.fns[index]) {
559
+ this.fns[index] = fn;
560
+ return id;
561
+ }
562
+ return false;
563
+ }
564
+ use(fn) {
565
+ this.fns.push(fn);
566
+ return this.fns.length - 1;
567
+ }
568
+ };
569
+ var createInterceptors = () => ({
570
+ error: new Interceptors(),
571
+ request: new Interceptors(),
572
+ response: new Interceptors()
573
+ });
574
+ var defaultQuerySerializer = createQuerySerializer({
575
+ allowReserved: false,
576
+ array: {
577
+ explode: true,
578
+ style: "form"
579
+ },
580
+ object: {
581
+ explode: true,
582
+ style: "deepObject"
583
+ }
584
+ });
585
+ var defaultHeaders = {
586
+ "Content-Type": "application/json"
587
+ };
588
+ var createConfig = (override = {}) => ({
589
+ ...jsonBodySerializer,
590
+ headers: defaultHeaders,
591
+ parseAs: "auto",
592
+ querySerializer: defaultQuerySerializer,
593
+ ...override
594
+ });
595
+
596
+ // src/client/client.gen.ts
597
+ var createClient = (config = {}) => {
598
+ let _config = mergeConfigs(createConfig(), config);
599
+ const getConfig = () => ({ ..._config });
600
+ const setConfig = (config2) => {
601
+ _config = mergeConfigs(_config, config2);
602
+ return getConfig();
603
+ };
604
+ const interceptors = createInterceptors();
605
+ const beforeRequest = async (options) => {
606
+ const opts = {
607
+ ..._config,
608
+ ...options,
609
+ fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
610
+ headers: mergeHeaders(_config.headers, options.headers),
611
+ serializedBody: void 0
612
+ };
613
+ if (opts.security) {
614
+ await setAuthParams({
615
+ ...opts,
616
+ security: opts.security
617
+ });
618
+ }
619
+ if (opts.requestValidator) {
620
+ await opts.requestValidator(opts);
621
+ }
622
+ if (opts.body !== void 0 && opts.bodySerializer) {
623
+ opts.serializedBody = opts.bodySerializer(opts.body);
624
+ }
625
+ if (opts.body === void 0 || opts.serializedBody === "") {
626
+ opts.headers.delete("Content-Type");
627
+ }
628
+ const url = buildUrl(opts);
629
+ return { opts, url };
630
+ };
631
+ const request = async (options) => {
632
+ const { opts, url } = await beforeRequest(options);
633
+ const requestInit = {
634
+ redirect: "follow",
635
+ ...opts,
636
+ body: getValidRequestBody(opts)
637
+ };
638
+ let request2 = new Request(url, requestInit);
639
+ for (const fn of interceptors.request.fns) {
640
+ if (fn) {
641
+ request2 = await fn(request2, opts);
642
+ }
643
+ }
644
+ const _fetch = opts.fetch;
645
+ let response;
646
+ try {
647
+ response = await _fetch(request2);
648
+ } catch (error2) {
649
+ let finalError2 = error2;
650
+ for (const fn of interceptors.error.fns) {
651
+ if (fn) {
652
+ finalError2 = await fn(error2, void 0, request2, opts);
653
+ }
654
+ }
655
+ finalError2 = finalError2 || {};
656
+ if (opts.throwOnError) {
657
+ throw finalError2;
658
+ }
659
+ return opts.responseStyle === "data" ? void 0 : {
660
+ error: finalError2,
661
+ request: request2,
662
+ response: void 0
663
+ };
664
+ }
665
+ for (const fn of interceptors.response.fns) {
666
+ if (fn) {
667
+ response = await fn(response, request2, opts);
668
+ }
669
+ }
670
+ const result = {
671
+ request: request2,
672
+ response
673
+ };
674
+ if (response.ok) {
675
+ const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
676
+ if (response.status === 204 || response.headers.get("Content-Length") === "0") {
677
+ let emptyData;
678
+ switch (parseAs) {
679
+ case "arrayBuffer":
680
+ case "blob":
681
+ case "text":
682
+ emptyData = await response[parseAs]();
683
+ break;
684
+ case "formData":
685
+ emptyData = new FormData();
686
+ break;
687
+ case "stream":
688
+ emptyData = response.body;
689
+ break;
690
+ case "json":
691
+ default:
692
+ emptyData = {};
693
+ break;
694
+ }
695
+ return opts.responseStyle === "data" ? emptyData : {
696
+ data: emptyData,
697
+ ...result
698
+ };
699
+ }
700
+ let data;
701
+ switch (parseAs) {
702
+ case "arrayBuffer":
703
+ case "blob":
704
+ case "formData":
705
+ case "text":
706
+ data = await response[parseAs]();
707
+ break;
708
+ case "json": {
709
+ const text = await response.text();
710
+ data = text ? JSON.parse(text) : {};
711
+ break;
712
+ }
713
+ case "stream":
714
+ return opts.responseStyle === "data" ? response.body : {
715
+ data: response.body,
716
+ ...result
717
+ };
718
+ }
719
+ if (parseAs === "json") {
720
+ if (opts.responseValidator) {
721
+ await opts.responseValidator(data);
722
+ }
723
+ if (opts.responseTransformer) {
724
+ data = await opts.responseTransformer(data);
725
+ }
726
+ }
727
+ return opts.responseStyle === "data" ? data : {
728
+ data,
729
+ ...result
730
+ };
731
+ }
732
+ const textError = await response.text();
733
+ let jsonError;
734
+ try {
735
+ jsonError = JSON.parse(textError);
736
+ } catch {
737
+ }
738
+ const error = jsonError ?? textError;
739
+ let finalError = error;
740
+ for (const fn of interceptors.error.fns) {
741
+ if (fn) {
742
+ finalError = await fn(error, response, request2, opts);
743
+ }
744
+ }
745
+ finalError = finalError || {};
746
+ if (opts.throwOnError) {
747
+ throw finalError;
748
+ }
749
+ return opts.responseStyle === "data" ? void 0 : {
750
+ error: finalError,
751
+ ...result
752
+ };
753
+ };
754
+ const makeMethodFn = (method) => (options) => request({ ...options, method });
755
+ const makeSseFn = (method) => async (options) => {
756
+ const { opts, url } = await beforeRequest(options);
757
+ return createSseClient({
758
+ ...opts,
759
+ body: opts.body,
760
+ headers: opts.headers,
761
+ method,
762
+ onRequest: async (url2, init) => {
763
+ let request2 = new Request(url2, init);
764
+ for (const fn of interceptors.request.fns) {
765
+ if (fn) {
766
+ request2 = await fn(request2, opts);
767
+ }
768
+ }
769
+ return request2;
770
+ },
771
+ serializedBody: getValidRequestBody(opts),
772
+ url
773
+ });
774
+ };
775
+ return {
776
+ buildUrl,
777
+ connect: makeMethodFn("CONNECT"),
778
+ delete: makeMethodFn("DELETE"),
779
+ get: makeMethodFn("GET"),
780
+ getConfig,
781
+ head: makeMethodFn("HEAD"),
782
+ interceptors,
783
+ options: makeMethodFn("OPTIONS"),
784
+ patch: makeMethodFn("PATCH"),
785
+ post: makeMethodFn("POST"),
786
+ put: makeMethodFn("PUT"),
787
+ request,
788
+ setConfig,
789
+ sse: {
790
+ connect: makeSseFn("CONNECT"),
791
+ delete: makeSseFn("DELETE"),
792
+ get: makeSseFn("GET"),
793
+ head: makeSseFn("HEAD"),
794
+ options: makeSseFn("OPTIONS"),
795
+ patch: makeSseFn("PATCH"),
796
+ post: makeSseFn("POST"),
797
+ put: makeSseFn("PUT"),
798
+ trace: makeSseFn("TRACE")
799
+ },
800
+ trace: makeMethodFn("TRACE")
801
+ };
802
+ };
803
+
804
+ // src/client.gen.ts
805
+ var client = createClient(createConfig());
806
+
807
+ // src/sdk.gen.ts
808
+ var getApiV1AuditLogs = (options) => (options?.client ?? client).get({ url: "/api/v1/audit/logs", ...options });
809
+ var getApiV1AuthBootstrap = (options) => (options?.client ?? client).get({ url: "/api/v1/auth/bootstrap", ...options });
810
+ var postApiV1AuthCliInit = (options) => (options.client ?? client).post({
811
+ url: "/api/v1/auth/cli/init",
812
+ ...options,
813
+ headers: {
814
+ "Content-Type": "*/*",
815
+ ...options.headers
816
+ }
817
+ });
818
+ var getApiV1AuthIsAdminRegistered = (options) => (options?.client ?? client).get({ url: "/api/v1/auth/is-admin-registered", ...options });
819
+ var getApiV1Container = (options) => (options?.client ?? client).get({ url: "/api/v1/container", ...options });
820
+ var postApiV1ContainerImages = (options) => (options.client ?? client).post({
821
+ url: "/api/v1/container/images",
822
+ ...options,
823
+ headers: {
824
+ "Content-Type": "*/*",
825
+ ...options.headers
826
+ }
827
+ });
828
+ var postApiV1ContainerPruneBuildCache = (options) => (options.client ?? client).post({
829
+ url: "/api/v1/container/prune/build-cache",
830
+ ...options,
831
+ headers: {
832
+ "Content-Type": "*/*",
833
+ ...options.headers
834
+ }
835
+ });
836
+ var postApiV1ContainerPruneImages = (options) => (options.client ?? client).post({
837
+ url: "/api/v1/container/prune/images",
838
+ ...options,
839
+ headers: {
840
+ "Content-Type": "*/*",
841
+ ...options.headers
842
+ }
843
+ });
844
+ var deleteApiV1ContainerContainerId = (options) => (options.client ?? client).delete({ url: "/api/v1/container/{container_id}", ...options });
845
+ var getApiV1ContainerContainerId = (options) => (options.client ?? client).get({ url: "/api/v1/container/{container_id}", ...options });
846
+ var postApiV1ContainerContainerIdLogs = (options) => (options.client ?? client).post({
847
+ url: "/api/v1/container/{container_id}/logs",
848
+ ...options,
849
+ headers: {
850
+ "Content-Type": "*/*",
851
+ ...options.headers
852
+ }
853
+ });
854
+ var putApiV1ContainerContainerIdResources = (options) => (options.client ?? client).put({
855
+ url: "/api/v1/container/{container_id}/resources",
856
+ ...options,
857
+ headers: {
858
+ "Content-Type": "*/*",
859
+ ...options.headers
860
+ }
861
+ });
862
+ var postApiV1ContainerContainerIdRestart = (options) => (options.client ?? client).post({ url: "/api/v1/container/{container_id}/restart", ...options });
863
+ var postApiV1ContainerContainerIdStart = (options) => (options.client ?? client).post({ url: "/api/v1/container/{container_id}/start", ...options });
864
+ var postApiV1ContainerContainerIdStop = (options) => (options.client ?? client).post({ url: "/api/v1/container/{container_id}/stop", ...options });
865
+ var deleteApiV1DeployApplication = (options) => (options.client ?? client).delete({
866
+ url: "/api/v1/deploy/application",
867
+ ...options,
868
+ headers: {
869
+ "Content-Type": "*/*",
870
+ ...options.headers
871
+ }
872
+ });
873
+ var getApiV1DeployApplication = (options) => (options?.client ?? client).get({ url: "/api/v1/deploy/application", ...options });
874
+ var postApiV1DeployApplication = (options) => (options.client ?? client).post({
875
+ url: "/api/v1/deploy/application",
876
+ ...options,
877
+ headers: {
878
+ "Content-Type": "*/*",
879
+ ...options.headers
880
+ }
881
+ });
882
+ var putApiV1DeployApplication = (options) => (options.client ?? client).put({
883
+ url: "/api/v1/deploy/application",
884
+ ...options,
885
+ headers: {
886
+ "Content-Type": "*/*",
887
+ ...options.headers
888
+ }
889
+ });
890
+ var getApiV1DeployApplicationDeployments = (options) => (options.client ?? client).get({
891
+ url: "/api/v1/deploy/application/deployments",
892
+ ...options,
893
+ headers: {
894
+ "Content-Type": "*/*",
895
+ ...options.headers
896
+ }
897
+ });
898
+ var getApiV1DeployApplicationDeploymentsDeploymentId = (options) => (options.client ?? client).get({ url: "/api/v1/deploy/application/deployments/{deployment_id}", ...options });
899
+ var getApiV1DeployApplicationDeploymentsDeploymentIdLogs = (options) => (options.client ?? client).get({ url: "/api/v1/deploy/application/deployments/{deployment_id}/logs", ...options });
900
+ var deleteApiV1DeployApplicationDomains = (options) => (options.client ?? client).delete({
901
+ url: "/api/v1/deploy/application/domains",
902
+ ...options,
903
+ headers: {
904
+ "Content-Type": "*/*",
905
+ ...options.headers
906
+ }
907
+ });
908
+ var postApiV1DeployApplicationDomains = (options) => (options.client ?? client).post({
909
+ url: "/api/v1/deploy/application/domains",
910
+ ...options,
911
+ headers: {
912
+ "Content-Type": "*/*",
913
+ ...options.headers
914
+ }
915
+ });
916
+ var putApiV1DeployApplicationLabels = (options) => (options.client ?? client).put({
917
+ url: "/api/v1/deploy/application/labels",
918
+ ...options,
919
+ headers: {
920
+ "Content-Type": "*/*",
921
+ ...options.headers
922
+ }
923
+ });
924
+ var getApiV1DeployApplicationLogsApplicationId = (options) => (options.client ?? client).get({ url: "/api/v1/deploy/application/logs/{application_id}", ...options });
925
+ var postApiV1DeployApplicationProject = (options) => (options.client ?? client).post({
926
+ url: "/api/v1/deploy/application/project",
927
+ ...options,
928
+ headers: {
929
+ "Content-Type": "*/*",
930
+ ...options.headers
931
+ }
932
+ });
933
+ var postApiV1DeployApplicationProjectAddToFamily = (options) => (options.client ?? client).post({
934
+ url: "/api/v1/deploy/application/project/add-to-family",
935
+ ...options,
936
+ headers: {
937
+ "Content-Type": "*/*",
938
+ ...options.headers
939
+ }
940
+ });
941
+ var postApiV1DeployApplicationProjectDeploy = (options) => (options.client ?? client).post({
942
+ url: "/api/v1/deploy/application/project/deploy",
943
+ ...options,
944
+ headers: {
945
+ "Content-Type": "*/*",
946
+ ...options.headers
947
+ }
948
+ });
949
+ var postApiV1DeployApplicationProjectDuplicate = (options) => (options.client ?? client).post({
950
+ url: "/api/v1/deploy/application/project/duplicate",
951
+ ...options,
952
+ headers: {
953
+ "Content-Type": "*/*",
954
+ ...options.headers
955
+ }
956
+ });
957
+ var getApiV1DeployApplicationProjectFamily = (options) => (options?.client ?? client).get({ url: "/api/v1/deploy/application/project/family", ...options });
958
+ var getApiV1DeployApplicationProjectFamilyEnvironments = (options) => (options?.client ?? client).get({ url: "/api/v1/deploy/application/project/family/environments", ...options });
959
+ var postApiV1DeployApplicationRecover = (options) => (options.client ?? client).post({
960
+ url: "/api/v1/deploy/application/recover",
961
+ ...options,
962
+ headers: {
963
+ "Content-Type": "*/*",
964
+ ...options.headers
965
+ }
966
+ });
967
+ var postApiV1DeployApplicationRedeploy = (options) => (options.client ?? client).post({
968
+ url: "/api/v1/deploy/application/redeploy",
969
+ ...options,
970
+ headers: {
971
+ "Content-Type": "*/*",
972
+ ...options.headers
973
+ }
974
+ });
975
+ var postApiV1DeployApplicationRestart = (options) => (options.client ?? client).post({
976
+ url: "/api/v1/deploy/application/restart",
977
+ ...options,
978
+ headers: {
979
+ "Content-Type": "*/*",
980
+ ...options.headers
981
+ }
982
+ });
983
+ var postApiV1DeployApplicationRollback = (options) => (options.client ?? client).post({
984
+ url: "/api/v1/deploy/application/rollback",
985
+ ...options,
986
+ headers: {
987
+ "Content-Type": "*/*",
988
+ ...options.headers
989
+ }
990
+ });
991
+ var getApiV1DeployApplications = (options) => (options.client ?? client).get({
992
+ url: "/api/v1/deploy/applications",
993
+ ...options,
994
+ headers: {
995
+ "Content-Type": "*/*",
996
+ ...options.headers
997
+ }
998
+ });
999
+ var deleteApiV1Domain = (options) => (options.client ?? client).delete({
1000
+ url: "/api/v1/domain",
1001
+ ...options,
1002
+ headers: {
1003
+ "Content-Type": "*/*",
1004
+ ...options.headers
1005
+ }
1006
+ });
1007
+ var postApiV1Domain = (options) => (options.client ?? client).post({
1008
+ url: "/api/v1/domain",
1009
+ ...options,
1010
+ headers: {
1011
+ "Content-Type": "*/*",
1012
+ ...options.headers
1013
+ }
1014
+ });
1015
+ var putApiV1Domain = (options) => (options.client ?? client).put({
1016
+ url: "/api/v1/domain",
1017
+ ...options,
1018
+ headers: {
1019
+ "Content-Type": "*/*",
1020
+ ...options.headers
1021
+ }
1022
+ });
1023
+ var getApiV1DomainGenerate = (options) => (options?.client ?? client).get({ url: "/api/v1/domain/generate", ...options });
1024
+ var getApiV1Domains = (options) => (options?.client ?? client).get({ url: "/api/v1/domains", ...options });
1025
+ var getApiV1Extensions = (options) => (options?.client ?? client).get({ url: "/api/v1/extensions", ...options });
1026
+ var getApiV1ExtensionsByExtensionIdExtensionId = (options) => (options.client ?? client).get({ url: "/api/v1/extensions/by-extension-id/{extension_id}", ...options });
1027
+ var getApiV1ExtensionsByExtensionIdExtensionIdExecutions = (options) => (options.client ?? client).get({ url: "/api/v1/extensions/by-extension-id/{extension_id}/executions", ...options });
1028
+ var getApiV1ExtensionsCategories = (options) => (options?.client ?? client).get({ url: "/api/v1/extensions/categories", ...options });
1029
+ var getApiV1ExtensionsExecutionExecutionId = (options) => (options.client ?? client).get({ url: "/api/v1/extensions/execution/{execution_id}", ...options });
1030
+ var postApiV1ExtensionsExecutionExecutionIdCancel = (options) => (options.client ?? client).post({ url: "/api/v1/extensions/execution/{execution_id}/cancel", ...options });
1031
+ var getApiV1ExtensionsExecutionExecutionIdLogs = (options) => (options.client ?? client).get({ url: "/api/v1/extensions/execution/{execution_id}/logs", ...options });
1032
+ var postApiV1ExtensionsExtensionIdFork = (options) => (options.client ?? client).post({
1033
+ url: "/api/v1/extensions/{extension_id}/fork",
1034
+ ...options,
1035
+ headers: {
1036
+ "Content-Type": "*/*",
1037
+ ...options.headers
1038
+ }
1039
+ });
1040
+ var postApiV1ExtensionsExtensionIdRun = (options) => (options.client ?? client).post({
1041
+ url: "/api/v1/extensions/{extension_id}/run",
1042
+ ...options,
1043
+ headers: {
1044
+ "Content-Type": "*/*",
1045
+ ...options.headers
1046
+ }
1047
+ });
1048
+ var deleteApiV1ExtensionsId = (options) => (options.client ?? client).delete({ url: "/api/v1/extensions/{id}", ...options });
1049
+ var getApiV1ExtensionsId = (options) => (options.client ?? client).get({ url: "/api/v1/extensions/{id}", ...options });
1050
+ var getApiV1FeatureFlags = (options) => (options?.client ?? client).get({ url: "/api/v1/feature-flags", ...options });
1051
+ var putApiV1FeatureFlags = (options) => (options.client ?? client).put({
1052
+ url: "/api/v1/feature-flags",
1053
+ ...options,
1054
+ headers: {
1055
+ "Content-Type": "*/*",
1056
+ ...options.headers
1057
+ }
1058
+ });
1059
+ var getApiV1FeatureFlagsCheck = (options) => (options?.client ?? client).get({ url: "/api/v1/feature-flags/check", ...options });
1060
+ var getApiV1FileManager = (options) => (options.client ?? client).get({
1061
+ url: "/api/v1/file-manager",
1062
+ ...options,
1063
+ headers: {
1064
+ "Content-Type": "*/*",
1065
+ ...options.headers
1066
+ }
1067
+ });
1068
+ var postApiV1FileManagerCopyDirectory = (options) => (options.client ?? client).post({
1069
+ url: "/api/v1/file-manager/copy-directory",
1070
+ ...options,
1071
+ headers: {
1072
+ "Content-Type": "*/*",
1073
+ ...options.headers
1074
+ }
1075
+ });
1076
+ var postApiV1FileManagerCreateDirectory = (options) => (options.client ?? client).post({
1077
+ url: "/api/v1/file-manager/create-directory",
1078
+ ...options,
1079
+ headers: {
1080
+ "Content-Type": "*/*",
1081
+ ...options.headers
1082
+ }
1083
+ });
1084
+ var deleteApiV1FileManagerDeleteDirectory = (options) => (options.client ?? client).delete({
1085
+ url: "/api/v1/file-manager/delete-directory",
1086
+ ...options,
1087
+ headers: {
1088
+ "Content-Type": "*/*",
1089
+ ...options.headers
1090
+ }
1091
+ });
1092
+ var postApiV1FileManagerMoveDirectory = (options) => (options.client ?? client).post({
1093
+ url: "/api/v1/file-manager/move-directory",
1094
+ ...options,
1095
+ headers: {
1096
+ "Content-Type": "*/*",
1097
+ ...options.headers
1098
+ }
1099
+ });
1100
+ var postApiV1FileManagerUpload = (options) => (options?.client ?? client).post({ url: "/api/v1/file-manager/upload", ...options });
1101
+ var deleteApiV1GithubConnector = (options) => (options.client ?? client).delete({
1102
+ url: "/api/v1/github-connector",
1103
+ ...options,
1104
+ headers: {
1105
+ "Content-Type": "*/*",
1106
+ ...options.headers
1107
+ }
1108
+ });
1109
+ var postApiV1GithubConnector = (options) => (options.client ?? client).post({
1110
+ url: "/api/v1/github-connector",
1111
+ ...options,
1112
+ headers: {
1113
+ "Content-Type": "*/*",
1114
+ ...options.headers
1115
+ }
1116
+ });
1117
+ var putApiV1GithubConnector = (options) => (options.client ?? client).put({
1118
+ url: "/api/v1/github-connector",
1119
+ ...options,
1120
+ headers: {
1121
+ "Content-Type": "*/*",
1122
+ ...options.headers
1123
+ }
1124
+ });
1125
+ var getApiV1GithubConnectorAll = (options) => (options?.client ?? client).get({ url: "/api/v1/github-connector/all", ...options });
1126
+ var getApiV1GithubConnectorRepositories = (options) => (options?.client ?? client).get({ url: "/api/v1/github-connector/repositories", ...options });
1127
+ var postApiV1GithubConnectorRepositoryBranches = (options) => (options.client ?? client).post({
1128
+ url: "/api/v1/github-connector/repository/branches",
1129
+ ...options,
1130
+ headers: {
1131
+ "Content-Type": "*/*",
1132
+ ...options.headers
1133
+ }
1134
+ });
1135
+ var getApiV1Health = (options) => (options?.client ?? client).get({ url: "/api/v1/health", ...options });
1136
+ var deleteApiV1Healthcheck = (options) => (options?.client ?? client).delete({ url: "/api/v1/healthcheck", ...options });
1137
+ var getApiV1Healthcheck = (options) => (options?.client ?? client).get({ url: "/api/v1/healthcheck", ...options });
1138
+ var postApiV1Healthcheck = (options) => (options.client ?? client).post({
1139
+ url: "/api/v1/healthcheck",
1140
+ ...options,
1141
+ headers: {
1142
+ "Content-Type": "*/*",
1143
+ ...options.headers
1144
+ }
1145
+ });
1146
+ var putApiV1Healthcheck = (options) => (options.client ?? client).put({
1147
+ url: "/api/v1/healthcheck",
1148
+ ...options,
1149
+ headers: {
1150
+ "Content-Type": "*/*",
1151
+ ...options.headers
1152
+ }
1153
+ });
1154
+ var getApiV1HealthcheckResults = (options) => (options?.client ?? client).get({ url: "/api/v1/healthcheck/results", ...options });
1155
+ var getApiV1HealthcheckStats = (options) => (options?.client ?? client).get({ url: "/api/v1/healthcheck/stats", ...options });
1156
+ var patchApiV1HealthcheckToggle = (options) => (options.client ?? client).patch({
1157
+ url: "/api/v1/healthcheck/toggle",
1158
+ ...options,
1159
+ headers: {
1160
+ "Content-Type": "*/*",
1161
+ ...options.headers
1162
+ }
1163
+ });
1164
+ var postApiV1LivePause = (options) => (options.client ?? client).post({
1165
+ url: "/api/v1/live/pause",
1166
+ ...options,
1167
+ headers: {
1168
+ "Content-Type": "*/*",
1169
+ ...options.headers
1170
+ }
1171
+ });
1172
+ var getApiV1NotificationPreferences = (options) => (options?.client ?? client).get({ url: "/api/v1/notification/preferences", ...options });
1173
+ var postApiV1NotificationPreferences = (options) => (options.client ?? client).post({
1174
+ url: "/api/v1/notification/preferences",
1175
+ ...options,
1176
+ headers: {
1177
+ "Content-Type": "*/*",
1178
+ ...options.headers
1179
+ }
1180
+ });
1181
+ var deleteApiV1NotificationSmtp = (options) => (options.client ?? client).delete({
1182
+ url: "/api/v1/notification/smtp",
1183
+ ...options,
1184
+ headers: {
1185
+ "Content-Type": "*/*",
1186
+ ...options.headers
1187
+ }
1188
+ });
1189
+ var getApiV1NotificationSmtp = (options) => (options?.client ?? client).get({ url: "/api/v1/notification/smtp", ...options });
1190
+ var postApiV1NotificationSmtp = (options) => (options.client ?? client).post({
1191
+ url: "/api/v1/notification/smtp",
1192
+ ...options,
1193
+ headers: {
1194
+ "Content-Type": "*/*",
1195
+ ...options.headers
1196
+ }
1197
+ });
1198
+ var putApiV1NotificationSmtp = (options) => (options.client ?? client).put({
1199
+ url: "/api/v1/notification/smtp",
1200
+ ...options,
1201
+ headers: {
1202
+ "Content-Type": "*/*",
1203
+ ...options.headers
1204
+ }
1205
+ });
1206
+ var deleteApiV1NotificationWebhook = (options) => (options.client ?? client).delete({
1207
+ url: "/api/v1/notification/webhook",
1208
+ ...options,
1209
+ headers: {
1210
+ "Content-Type": "*/*",
1211
+ ...options.headers
1212
+ }
1213
+ });
1214
+ var postApiV1NotificationWebhook = (options) => (options.client ?? client).post({
1215
+ url: "/api/v1/notification/webhook",
1216
+ ...options,
1217
+ headers: {
1218
+ "Content-Type": "*/*",
1219
+ ...options.headers
1220
+ }
1221
+ });
1222
+ var putApiV1NotificationWebhook = (options) => (options.client ?? client).put({
1223
+ url: "/api/v1/notification/webhook",
1224
+ ...options,
1225
+ headers: {
1226
+ "Content-Type": "*/*",
1227
+ ...options.headers
1228
+ }
1229
+ });
1230
+ var getApiV1NotificationWebhookType = (options) => (options.client ?? client).get({ url: "/api/v1/notification/webhook/{type}", ...options });
1231
+ var getApiV1Servers = (options) => (options?.client ?? client).get({ url: "/api/v1/servers", ...options });
1232
+ var getApiV1ServersSshStatus = (options) => (options?.client ?? client).get({ url: "/api/v1/servers/ssh/status", ...options });
1233
+ var postApiV1TrailProvision = (options) => (options.client ?? client).post({
1234
+ url: "/api/v1/trail/provision",
1235
+ ...options,
1236
+ headers: {
1237
+ "Content-Type": "*/*",
1238
+ ...options.headers
1239
+ }
1240
+ });
1241
+ var getApiV1TrailStatusSessionId = (options) => (options.client ?? client).get({ url: "/api/v1/trail/status/{sessionId}", ...options });
1242
+ var postApiV1Update = (options) => (options.client ?? client).post({
1243
+ url: "/api/v1/update",
1244
+ ...options,
1245
+ headers: {
1246
+ "Content-Type": "*/*",
1247
+ ...options.headers
1248
+ }
1249
+ });
1250
+ var getApiV1UpdateCheck = (options) => (options?.client ?? client).get({ url: "/api/v1/update/check", ...options });
1251
+ var getApiV1User = (options) => (options?.client ?? client).get({ url: "/api/v1/user", ...options });
1252
+ var patchApiV1UserAvatar = (options) => (options.client ?? client).patch({
1253
+ url: "/api/v1/user/avatar",
1254
+ ...options,
1255
+ headers: {
1256
+ "Content-Type": "*/*",
1257
+ ...options.headers
1258
+ }
1259
+ });
1260
+ var patchApiV1UserName = (options) => (options.client ?? client).patch({
1261
+ url: "/api/v1/user/name",
1262
+ ...options,
1263
+ headers: {
1264
+ "Content-Type": "*/*",
1265
+ ...options.headers
1266
+ }
1267
+ });
1268
+ var getApiV1UserOnboarded = (options) => (options?.client ?? client).get({ url: "/api/v1/user/onboarded", ...options });
1269
+ var postApiV1UserOnboarded = (options) => (options?.client ?? client).post({ url: "/api/v1/user/onboarded", ...options });
1270
+ var getApiV1UserPreferences = (options) => (options?.client ?? client).get({ url: "/api/v1/user/preferences", ...options });
1271
+ var putApiV1UserPreferences = (options) => (options.client ?? client).put({
1272
+ url: "/api/v1/user/preferences",
1273
+ ...options,
1274
+ headers: {
1275
+ "Content-Type": "*/*",
1276
+ ...options.headers
1277
+ }
1278
+ });
1279
+ var getApiV1UserSettings = (options) => (options?.client ?? client).get({ url: "/api/v1/user/settings", ...options });
1280
+ var patchApiV1UserSettingsAutoUpdate = (options) => (options.client ?? client).patch({
1281
+ url: "/api/v1/user/settings/auto-update",
1282
+ ...options,
1283
+ headers: {
1284
+ "Content-Type": "*/*",
1285
+ ...options.headers
1286
+ }
1287
+ });
1288
+ var patchApiV1UserSettingsFont = (options) => (options.client ?? client).patch({
1289
+ url: "/api/v1/user/settings/font",
1290
+ ...options,
1291
+ headers: {
1292
+ "Content-Type": "*/*",
1293
+ ...options.headers
1294
+ }
1295
+ });
1296
+ var patchApiV1UserSettingsLanguage = (options) => (options.client ?? client).patch({
1297
+ url: "/api/v1/user/settings/language",
1298
+ ...options,
1299
+ headers: {
1300
+ "Content-Type": "*/*",
1301
+ ...options.headers
1302
+ }
1303
+ });
1304
+ var patchApiV1UserSettingsTheme = (options) => (options.client ?? client).patch({
1305
+ url: "/api/v1/user/settings/theme",
1306
+ ...options,
1307
+ headers: {
1308
+ "Content-Type": "*/*",
1309
+ ...options.headers
1310
+ }
1311
+ });
1312
+ var postApiV1Webhook = (options) => (options?.client ?? client).post({ url: "/api/v1/webhook", ...options });
1313
+ var getWs = (options) => (options?.client ?? client).get({ url: "/ws", ...options });
1314
+ var getWsLiveApplicationId = (options) => (options.client ?? client).get({ url: "/ws/live/{application_id}", ...options });
1315
+ export {
1316
+ deleteApiV1ContainerContainerId,
1317
+ deleteApiV1DeployApplication,
1318
+ deleteApiV1DeployApplicationDomains,
1319
+ deleteApiV1Domain,
1320
+ deleteApiV1ExtensionsId,
1321
+ deleteApiV1FileManagerDeleteDirectory,
1322
+ deleteApiV1GithubConnector,
1323
+ deleteApiV1Healthcheck,
1324
+ deleteApiV1NotificationSmtp,
1325
+ deleteApiV1NotificationWebhook,
1326
+ getApiV1AuditLogs,
1327
+ getApiV1AuthBootstrap,
1328
+ getApiV1AuthIsAdminRegistered,
1329
+ getApiV1Container,
1330
+ getApiV1ContainerContainerId,
1331
+ getApiV1DeployApplication,
1332
+ getApiV1DeployApplicationDeployments,
1333
+ getApiV1DeployApplicationDeploymentsDeploymentId,
1334
+ getApiV1DeployApplicationDeploymentsDeploymentIdLogs,
1335
+ getApiV1DeployApplicationLogsApplicationId,
1336
+ getApiV1DeployApplicationProjectFamily,
1337
+ getApiV1DeployApplicationProjectFamilyEnvironments,
1338
+ getApiV1DeployApplications,
1339
+ getApiV1DomainGenerate,
1340
+ getApiV1Domains,
1341
+ getApiV1Extensions,
1342
+ getApiV1ExtensionsByExtensionIdExtensionId,
1343
+ getApiV1ExtensionsByExtensionIdExtensionIdExecutions,
1344
+ getApiV1ExtensionsCategories,
1345
+ getApiV1ExtensionsExecutionExecutionId,
1346
+ getApiV1ExtensionsExecutionExecutionIdLogs,
1347
+ getApiV1ExtensionsId,
1348
+ getApiV1FeatureFlags,
1349
+ getApiV1FeatureFlagsCheck,
1350
+ getApiV1FileManager,
1351
+ getApiV1GithubConnectorAll,
1352
+ getApiV1GithubConnectorRepositories,
1353
+ getApiV1Health,
1354
+ getApiV1Healthcheck,
1355
+ getApiV1HealthcheckResults,
1356
+ getApiV1HealthcheckStats,
1357
+ getApiV1NotificationPreferences,
1358
+ getApiV1NotificationSmtp,
1359
+ getApiV1NotificationWebhookType,
1360
+ getApiV1Servers,
1361
+ getApiV1ServersSshStatus,
1362
+ getApiV1TrailStatusSessionId,
1363
+ getApiV1UpdateCheck,
1364
+ getApiV1User,
1365
+ getApiV1UserOnboarded,
1366
+ getApiV1UserPreferences,
1367
+ getApiV1UserSettings,
1368
+ getWs,
1369
+ getWsLiveApplicationId,
1370
+ patchApiV1HealthcheckToggle,
1371
+ patchApiV1UserAvatar,
1372
+ patchApiV1UserName,
1373
+ patchApiV1UserSettingsAutoUpdate,
1374
+ patchApiV1UserSettingsFont,
1375
+ patchApiV1UserSettingsLanguage,
1376
+ patchApiV1UserSettingsTheme,
1377
+ postApiV1AuthCliInit,
1378
+ postApiV1ContainerContainerIdLogs,
1379
+ postApiV1ContainerContainerIdRestart,
1380
+ postApiV1ContainerContainerIdStart,
1381
+ postApiV1ContainerContainerIdStop,
1382
+ postApiV1ContainerImages,
1383
+ postApiV1ContainerPruneBuildCache,
1384
+ postApiV1ContainerPruneImages,
1385
+ postApiV1DeployApplication,
1386
+ postApiV1DeployApplicationDomains,
1387
+ postApiV1DeployApplicationProject,
1388
+ postApiV1DeployApplicationProjectAddToFamily,
1389
+ postApiV1DeployApplicationProjectDeploy,
1390
+ postApiV1DeployApplicationProjectDuplicate,
1391
+ postApiV1DeployApplicationRecover,
1392
+ postApiV1DeployApplicationRedeploy,
1393
+ postApiV1DeployApplicationRestart,
1394
+ postApiV1DeployApplicationRollback,
1395
+ postApiV1Domain,
1396
+ postApiV1ExtensionsExecutionExecutionIdCancel,
1397
+ postApiV1ExtensionsExtensionIdFork,
1398
+ postApiV1ExtensionsExtensionIdRun,
1399
+ postApiV1FileManagerCopyDirectory,
1400
+ postApiV1FileManagerCreateDirectory,
1401
+ postApiV1FileManagerMoveDirectory,
1402
+ postApiV1FileManagerUpload,
1403
+ postApiV1GithubConnector,
1404
+ postApiV1GithubConnectorRepositoryBranches,
1405
+ postApiV1Healthcheck,
1406
+ postApiV1LivePause,
1407
+ postApiV1NotificationPreferences,
1408
+ postApiV1NotificationSmtp,
1409
+ postApiV1NotificationWebhook,
1410
+ postApiV1TrailProvision,
1411
+ postApiV1Update,
1412
+ postApiV1UserOnboarded,
1413
+ postApiV1Webhook,
1414
+ putApiV1ContainerContainerIdResources,
1415
+ putApiV1DeployApplication,
1416
+ putApiV1DeployApplicationLabels,
1417
+ putApiV1Domain,
1418
+ putApiV1FeatureFlags,
1419
+ putApiV1GithubConnector,
1420
+ putApiV1Healthcheck,
1421
+ putApiV1NotificationSmtp,
1422
+ putApiV1NotificationWebhook,
1423
+ putApiV1UserPreferences
1424
+ };