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