@ninedeploy/sdk 0.10.6 → 0.16.0

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.
Files changed (129) hide show
  1. package/LICENSE +21 -21
  2. package/dist/apiPath.d.ts +5 -0
  3. package/dist/apiPath.d.ts.map +1 -0
  4. package/dist/apiPath.js +18 -0
  5. package/dist/apiPath.js.map +1 -0
  6. package/dist/client.d.ts +29 -0
  7. package/dist/client.d.ts.map +1 -0
  8. package/dist/client.js +51 -0
  9. package/dist/client.js.map +1 -0
  10. package/dist/databaseImport.d.ts +138 -0
  11. package/dist/databaseImport.d.ts.map +1 -0
  12. package/dist/databaseImport.js +126 -0
  13. package/dist/databaseImport.js.map +1 -0
  14. package/dist/errors.js +1 -1
  15. package/dist/errors.js.map +1 -1
  16. package/dist/index.d.ts +12 -1973
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +9 -641
  19. package/dist/index.js.map +1 -1
  20. package/dist/manifest.d.ts.map +1 -1
  21. package/dist/manifest.js +25 -21
  22. package/dist/manifest.js.map +1 -1
  23. package/dist/resources/auth.d.ts +282 -0
  24. package/dist/resources/auth.d.ts.map +1 -0
  25. package/dist/resources/auth.js +111 -0
  26. package/dist/resources/auth.js.map +1 -0
  27. package/dist/resources/databases.d.ts +178 -0
  28. package/dist/resources/databases.d.ts.map +1 -0
  29. package/dist/resources/databases.js +82 -0
  30. package/dist/resources/databases.js.map +1 -0
  31. package/dist/resources/deploys.d.ts +125 -0
  32. package/dist/resources/deploys.d.ts.map +1 -0
  33. package/dist/resources/deploys.js +46 -0
  34. package/dist/resources/deploys.js.map +1 -0
  35. package/dist/resources/domains.d.ts +101 -0
  36. package/dist/resources/domains.d.ts.map +1 -0
  37. package/dist/resources/domains.js +28 -0
  38. package/dist/resources/domains.js.map +1 -0
  39. package/dist/resources/env.d.ts +55 -0
  40. package/dist/resources/env.d.ts.map +1 -0
  41. package/dist/resources/env.js +33 -0
  42. package/dist/resources/env.js.map +1 -0
  43. package/dist/resources/logs.d.ts +27 -0
  44. package/dist/resources/logs.d.ts.map +1 -0
  45. package/dist/resources/logs.js +18 -0
  46. package/dist/resources/logs.js.map +1 -0
  47. package/dist/resources/network.d.ts +134 -0
  48. package/dist/resources/network.d.ts.map +1 -0
  49. package/dist/resources/network.js +33 -0
  50. package/dist/resources/network.js.map +1 -0
  51. package/dist/resources/plugins.d.ts +42 -0
  52. package/dist/resources/plugins.d.ts.map +1 -0
  53. package/dist/resources/plugins.js +22 -0
  54. package/dist/resources/plugins.js.map +1 -0
  55. package/dist/resources/servers.d.ts +130 -0
  56. package/dist/resources/servers.d.ts.map +1 -0
  57. package/dist/resources/servers.js +37 -0
  58. package/dist/resources/servers.js.map +1 -0
  59. package/dist/resources/services.d.ts +185 -0
  60. package/dist/resources/services.d.ts.map +1 -0
  61. package/dist/resources/services.js +83 -0
  62. package/dist/resources/services.js.map +1 -0
  63. package/dist/resources/settings.d.ts +312 -0
  64. package/dist/resources/settings.d.ts.map +1 -0
  65. package/dist/resources/settings.js +85 -0
  66. package/dist/resources/settings.js.map +1 -0
  67. package/dist/resources/sources.d.ts +87 -0
  68. package/dist/resources/sources.d.ts.map +1 -0
  69. package/dist/resources/sources.js +39 -0
  70. package/dist/resources/sources.js.map +1 -0
  71. package/dist/resources/system.d.ts +240 -0
  72. package/dist/resources/system.d.ts.map +1 -0
  73. package/dist/resources/system.js +86 -0
  74. package/dist/resources/system.js.map +1 -0
  75. package/dist/resources/templates.d.ts +36 -0
  76. package/dist/resources/templates.d.ts.map +1 -0
  77. package/dist/resources/templates.js +17 -0
  78. package/dist/resources/templates.js.map +1 -0
  79. package/dist/resources/terminals.d.ts +60 -0
  80. package/dist/resources/terminals.d.ts.map +1 -0
  81. package/dist/resources/terminals.js +35 -0
  82. package/dist/resources/terminals.js.map +1 -0
  83. package/dist/resources/traefik.d.ts +84 -0
  84. package/dist/resources/traefik.d.ts.map +1 -0
  85. package/dist/resources/traefik.js +35 -0
  86. package/dist/resources/traefik.js.map +1 -0
  87. package/dist/resources/volumes.d.ts +114 -0
  88. package/dist/resources/volumes.d.ts.map +1 -0
  89. package/dist/resources/volumes.js +47 -0
  90. package/dist/resources/volumes.js.map +1 -0
  91. package/dist/terminal.d.ts +98 -0
  92. package/dist/terminal.d.ts.map +1 -0
  93. package/dist/terminal.js +180 -0
  94. package/dist/terminal.js.map +1 -0
  95. package/dist/transport.d.ts +61 -0
  96. package/dist/transport.d.ts.map +1 -0
  97. package/dist/transport.js +90 -0
  98. package/dist/transport.js.map +1 -0
  99. package/dist/types.d.ts +539 -0
  100. package/dist/types.d.ts.map +1 -0
  101. package/dist/types.js +5 -0
  102. package/dist/types.js.map +1 -0
  103. package/package.json +5 -4
  104. package/src/apiPath.ts +23 -0
  105. package/src/client.ts +70 -0
  106. package/src/databaseImport.ts +174 -0
  107. package/src/errors.ts +27 -0
  108. package/src/index.ts +118 -0
  109. package/src/manifest.ts +414 -0
  110. package/src/resources/auth.ts +357 -0
  111. package/src/resources/databases.ts +227 -0
  112. package/src/resources/deploys.ts +161 -0
  113. package/src/resources/domains.ts +142 -0
  114. package/src/resources/env.ts +84 -0
  115. package/src/resources/logs.ts +48 -0
  116. package/src/resources/network.ts +126 -0
  117. package/src/resources/plugins.ts +52 -0
  118. package/src/resources/servers.ts +141 -0
  119. package/src/resources/services.ts +250 -0
  120. package/src/resources/settings.ts +275 -0
  121. package/src/resources/sources.ts +131 -0
  122. package/src/resources/system.ts +281 -0
  123. package/src/resources/templates.ts +55 -0
  124. package/src/resources/terminals.ts +112 -0
  125. package/src/resources/traefik.ts +116 -0
  126. package/src/resources/volumes.ts +138 -0
  127. package/src/terminal.ts +254 -0
  128. package/src/transport.ts +154 -0
  129. package/src/types.ts +588 -0
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "@ninedeploy/sdk",
3
- "version": "0.10.6",
3
+ "version": "0.16.0",
4
4
  "description": "Official TypeScript SDK for NineDeploy PaaS",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/NineDeploy/NineDeploy.git",
8
+ "url": "git+https://github.com/ninedeploy/ninedeploy.git",
9
9
  "directory": "packages/sdk"
10
10
  },
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
14
14
  "files": [
15
- "dist"
15
+ "dist",
16
+ "src"
16
17
  ],
17
18
  "type": "module",
18
19
  "main": "./dist/index.js",
@@ -24,7 +25,7 @@
24
25
  }
25
26
  },
26
27
  "dependencies": {
27
- "@ninedeploy/schemas": "0.10.6",
28
+ "@ninedeploy/schemas": "0.16.0",
28
29
  "js-yaml": "^4.3.1"
29
30
  },
30
31
  "devDependencies": {
package/src/apiPath.ts ADDED
@@ -0,0 +1,23 @@
1
+ // Validated GET paths for `client.api.get` (0.15 T4).
2
+ // Split out of the former single-file SDK entry (src/index.ts); the public
3
+ // surface is re-exported unchanged from there.
4
+ import { NineDeployError } from './errors.js';
5
+
6
+ // ── 0.15 T4 api ──
7
+ /** Query parameters for `client.api.get`. */
8
+ export type ApiQuery = Record<string, string | number | boolean | undefined>;
9
+
10
+ /** The paths `client.api.get` accepts: under `/v1/`, plain segments, no `..`. */
11
+ const API_PATH = /^\/v1\/[A-Za-z0-9/_.-]+$/;
12
+
13
+ /** Validate an `api.get` path and append its query string. Exported for tests. */
14
+ export function apiGetUrl(path: string, query?: ApiQuery): string {
15
+ if (!API_PATH.test(path) || path.split('/').includes('..')) {
16
+ throw new NineDeployError(0, 'invalid_path', `Not an API path: ${path}`);
17
+ }
18
+ const qs = Object.entries(query ?? {})
19
+ .filter((entry): entry is [string, string | number | boolean] => entry[1] !== undefined)
20
+ .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(String(v))}`)
21
+ .join('&');
22
+ return qs ? `${path}?${qs}` : path;
23
+ }
package/src/client.ts ADDED
@@ -0,0 +1,70 @@
1
+ // The NineDeployClient surface, composed from the per-resource modules.
2
+ // Split out of the former single-file SDK entry (src/index.ts); the public
3
+ // surface is re-exported unchanged from there.
4
+ import { createTransport, type NineDeployClientOptions } from './transport.js';
5
+ import { authApi, type AuthApi } from './resources/auth.js';
6
+ import { servicesApi, type ServicesApi } from './resources/services.js';
7
+ import { deploysApi, type DeploysApi } from './resources/deploys.js';
8
+ import { envApi, type EnvApi } from './resources/env.js';
9
+ import { domainsApi, type DomainsApi } from './resources/domains.js';
10
+ import { networkApi, type NetworkApi } from './resources/network.js';
11
+ import { traefikApi, type TraefikApi } from './resources/traefik.js';
12
+ import { databasesApi, type DatabasesApi } from './resources/databases.js';
13
+ import { volumesApi, type VolumesApi } from './resources/volumes.js';
14
+ import { sourcesApi, type SourcesApi } from './resources/sources.js';
15
+ import { serversApi, type ServersApi } from './resources/servers.js';
16
+ import { templatesApi, type TemplatesApi } from './resources/templates.js';
17
+ import { settingsApi, type SettingsApi } from './resources/settings.js';
18
+ import { systemApi, type SystemApi } from './resources/system.js';
19
+ import { pluginsApi, type PluginsApi } from './resources/plugins.js';
20
+ import { logsApi, type LogsApi } from './resources/logs.js';
21
+ import { terminalsApi, type TerminalsApi } from './resources/terminals.js';
22
+
23
+ export interface NineDeployClient
24
+ extends AuthApi,
25
+ ServicesApi,
26
+ DeploysApi,
27
+ EnvApi,
28
+ DomainsApi,
29
+ NetworkApi,
30
+ TraefikApi,
31
+ DatabasesApi,
32
+ VolumesApi,
33
+ SourcesApi,
34
+ ServersApi,
35
+ TemplatesApi,
36
+ SettingsApi,
37
+ SystemApi,
38
+ PluginsApi,
39
+ LogsApi,
40
+ TerminalsApi {}
41
+
42
+ /**
43
+ * Create a typed NineDeploy API client. Used by both the web dashboard and the CLI.
44
+ *
45
+ * @example
46
+ * const client = createClient({ baseUrl: 'http://localhost:3000', getToken: () => token });
47
+ * const services = await client.services.list();
48
+ */
49
+ export function createClient(opts: NineDeployClientOptions): NineDeployClient {
50
+ const t = createTransport(opts);
51
+ return {
52
+ ...authApi(t),
53
+ ...servicesApi(t),
54
+ ...deploysApi(t),
55
+ ...envApi(t),
56
+ ...domainsApi(t),
57
+ ...networkApi(t),
58
+ ...traefikApi(t),
59
+ ...databasesApi(t),
60
+ ...volumesApi(t),
61
+ ...sourcesApi(t),
62
+ ...serversApi(t),
63
+ ...templatesApi(t),
64
+ ...settingsApi(t),
65
+ ...systemApi(t),
66
+ ...pluginsApi(t),
67
+ ...logsApi(t),
68
+ ...terminalsApi(t),
69
+ };
70
+ }
@@ -0,0 +1,174 @@
1
+ // Database dump imports (0.14): resumable chunked uploads.
2
+ // Split out of the former single-file SDK entry (src/index.ts); the public
3
+ // surface is re-exported unchanged from there.
4
+ import type {
5
+ DatabaseImport,
6
+ DatabaseImportCreate,
7
+ DatabaseImportOptions,
8
+ } from '@ninedeploy/schemas';
9
+ import { NineDeployError } from './errors.js';
10
+ import type { Transport } from './transport.js';
11
+
12
+ /** 0.14: an import that no longer changes (`DatabaseImport['status']`). */
13
+ export const DATABASE_IMPORT_FINISHED_STATUSES: ReadonlyArray<DatabaseImport['status']> = [
14
+ 'completed',
15
+ 'completed_with_warnings',
16
+ 'failed',
17
+ 'cancelled',
18
+ 'expired',
19
+ ];
20
+
21
+ /** 0.14: `databases.imports.wait` polling options. */
22
+ export interface ImportWaitOptions {
23
+ /**
24
+ * `finished` (default) waits for a final status; `uploaded` returns as soon
25
+ * as the import leaves `uploading` (an S3 download landing in `pending`).
26
+ */
27
+ until?: 'finished' | 'uploaded';
28
+ /** Poll interval, default 2000 ms. */
29
+ intervalMs?: number;
30
+ /** Give up after this long (default: never). Throws `import_wait_timeout`. */
31
+ timeoutMs?: number;
32
+ /** Called with every polled row. */
33
+ onStatus?: (row: DatabaseImport) => void;
34
+ }
35
+
36
+ /**
37
+ * 0.14: the bytes `databases.importFile` uploads. A factory receives the byte
38
+ * offset to resume from, so a seekable source (a browser `File`, a file
39
+ * handle) skips what the server already holds without re-reading it.
40
+ */
41
+ export type ImportFileData = Uint8Array | AsyncIterable<Uint8Array> | ((offset: number) => AsyncIterable<Uint8Array>);
42
+
43
+ /** 0.14: `databases.importFile` options. */
44
+ export interface ImportFileOptions {
45
+ /** Required unless `data` is a Uint8Array (or `resumeImportId` is given). */
46
+ sizeBytes?: number;
47
+ filename?: string;
48
+ /** Hex sha256 of the whole file; the server checks it before starting. */
49
+ sha256?: string;
50
+ options?: DatabaseImportOptions;
51
+ /** Continue an `uploading` (or start a `pending`) import from where the server stands. */
52
+ resumeImportId?: number;
53
+ /** Start the import once uploaded (default true). */
54
+ start?: boolean;
55
+ /** Poll after starting until the import finishes. */
56
+ poll?: boolean | Omit<ImportWaitOptions, 'until'>;
57
+ /** Called once with the new import row (persist its id to resume later). */
58
+ onCreated?: (row: DatabaseImport) => void;
59
+ /** Called after every accepted chunk. */
60
+ onProgress?: (progress: { receivedBytes: number; sizeBytes: number; row: DatabaseImport }) => void;
61
+ }
62
+
63
+ /** 0.14: the import bytes from `offset` on (a factory seeks; the rest skip). */
64
+ async function* sourceFrom(data: ImportFileData, offset: number): AsyncIterable<Uint8Array> {
65
+ if (data instanceof Uint8Array) {
66
+ yield data.subarray(offset);
67
+ return;
68
+ }
69
+ if (typeof data === 'function') {
70
+ yield* data(offset);
71
+ return;
72
+ }
73
+ let skip = offset;
74
+ for await (const piece of data) {
75
+ if (skip >= piece.length) {
76
+ skip -= piece.length;
77
+ continue;
78
+ }
79
+ yield skip > 0 ? piece.subarray(skip) : piece;
80
+ skip = 0;
81
+ }
82
+ }
83
+
84
+ /** 0.14: re-cut a byte stream into `size`-byte chunks (the last one shorter). */
85
+ async function* rechunk(source: AsyncIterable<Uint8Array>, size: number): AsyncIterable<Uint8Array> {
86
+ let buf = new Uint8Array(size);
87
+ let len = 0;
88
+ for await (const piece of source) {
89
+ let at = 0;
90
+ while (at < piece.length) {
91
+ const take = Math.min(size - len, piece.length - at);
92
+ buf.set(piece.subarray(at, at + take), len);
93
+ len += take;
94
+ at += take;
95
+ if (len === size) {
96
+ yield buf;
97
+ buf = new Uint8Array(size);
98
+ len = 0;
99
+ }
100
+ }
101
+ }
102
+ if (len > 0) yield buf.subarray(0, len);
103
+ }
104
+
105
+ /** Chunked dump-import helpers bound to one transport (used by `databases`). */
106
+ export function createImportHelpers(t: Transport) {
107
+ const { get, send, request } = t;
108
+ // ── 0.14 dump import helpers ─────────────────────────────────────────────
109
+ const importPath = (id: number, importId?: number) => `/v1/databases/${id}/imports${importId === undefined ? '' : `/${importId}`}`;
110
+ const getImport = (id: number, importId: number) => get<DatabaseImport>(importPath(id, importId));
111
+ /** An 8 MiB chunk over a slow uplink outlasts the default 30 s budget. */
112
+ const CHUNK_TIMEOUT_MS = 10 * 60_000;
113
+ const uploadChunk = (id: number, importId: number, index: number, chunk: Uint8Array) =>
114
+ request<DatabaseImport>(`${importPath(id, importId)}/chunks/${index}`, { method: 'PUT', raw: chunk }, CHUNK_TIMEOUT_MS);
115
+ const startImport = (id: number, importId: number) => send<DatabaseImport>('POST', `${importPath(id, importId)}/start`);
116
+ const sleep = (ms: number) =>
117
+ new Promise<void>((resolve) => {
118
+ (globalThis as unknown as { setTimeout: (fn: () => void, ms: number) => unknown }).setTimeout(resolve, ms);
119
+ });
120
+
121
+ async function waitForImport(id: number, importId: number, o: ImportWaitOptions = {}): Promise<DatabaseImport> {
122
+ const interval = o.intervalMs ?? 2000;
123
+ const deadline = o.timeoutMs === undefined ? Number.POSITIVE_INFINITY : Date.now() + o.timeoutMs;
124
+ for (;;) {
125
+ const row = await getImport(id, importId);
126
+ o.onStatus?.(row);
127
+ const done = o.until === 'uploaded' ? row.status !== 'uploading' : DATABASE_IMPORT_FINISHED_STATUSES.includes(row.status);
128
+ if (done) return row;
129
+ if (Date.now() + interval > deadline) {
130
+ throw new NineDeployError(0, 'import_wait_timeout', `Import ${importId} is still ${row.status}`);
131
+ }
132
+ await sleep(interval);
133
+ }
134
+ }
135
+
136
+ async function importFile(id: number, data: ImportFileData, opts: ImportFileOptions = {}): Promise<DatabaseImport> {
137
+ const declared = data instanceof Uint8Array ? data.length : opts.sizeBytes;
138
+ let row: DatabaseImport;
139
+ if (opts.resumeImportId !== undefined) {
140
+ row = await getImport(id, opts.resumeImportId);
141
+ } else {
142
+ if (declared === undefined) throw new NineDeployError(0, 'import_size_required', 'sizeBytes is required for a streamed import');
143
+ const input: DatabaseImportCreate = { source: 'upload', sizeBytes: declared };
144
+ if (opts.sha256 !== undefined) input.sha256 = opts.sha256;
145
+ if (opts.filename !== undefined) input.filename = opts.filename;
146
+ if (opts.options !== undefined) input.options = opts.options;
147
+ row = await send<DatabaseImport>('POST', importPath(id), input);
148
+ opts.onCreated?.(row);
149
+ }
150
+ const size = row.sizeBytes;
151
+ const mismatch = (what: string) =>
152
+ new NineDeployError(0, 'import_size_mismatch', `The data is ${what} than the import's declared ${size} bytes`);
153
+ if (declared !== undefined && declared !== size) throw mismatch(declared > size ? 'larger' : 'smaller');
154
+
155
+ if (row.status === 'uploading') {
156
+ let index = row.receivedBytes / row.chunkSize;
157
+ for await (const chunk of rechunk(sourceFrom(data, row.receivedBytes), row.chunkSize)) {
158
+ if (row.receivedBytes + chunk.length > size) throw mismatch('larger');
159
+ row = await uploadChunk(id, row.id, index, chunk);
160
+ index += 1;
161
+ opts.onProgress?.({ receivedBytes: row.receivedBytes, sizeBytes: size, row });
162
+ }
163
+ if (row.receivedBytes < size) throw mismatch('smaller');
164
+ } else if (row.status !== 'pending') {
165
+ throw new NineDeployError(409, 'import_not_resumable', `Import ${row.id} is ${row.status}; only an uploading or pending import can continue`);
166
+ }
167
+ if (opts.start === false) return row;
168
+ row = await startImport(id, row.id);
169
+ if (!opts.poll) return row;
170
+ return waitForImport(id, row.id, opts.poll === true ? {} : opts.poll);
171
+ }
172
+
173
+ return { importPath, getImport, uploadChunk, startImport, waitForImport, importFile };
174
+ }
package/src/errors.ts ADDED
@@ -0,0 +1,27 @@
1
+ export interface ApiErrorBody {
2
+ error: { code: string; message: string; details?: unknown };
3
+ }
4
+
5
+ export class NineDeployError extends Error {
6
+ readonly status: number;
7
+ readonly code: string;
8
+ readonly details?: unknown;
9
+
10
+ constructor(status: number, code: string, message: string, details?: unknown) {
11
+ super(message);
12
+ this.name = 'NineDeployError';
13
+ this.status = status;
14
+ this.code = code;
15
+ this.details = details;
16
+ }
17
+
18
+ static fromBody(status: number, body: unknown): NineDeployError {
19
+ const err = (body as ApiErrorBody | null)?.error;
20
+ return new NineDeployError(
21
+ status,
22
+ typeof err?.code === 'string' ? err.code : 'unknown_error',
23
+ typeof err?.message === 'string' ? err.message : `Request failed with status ${status}`,
24
+ err?.details,
25
+ );
26
+ }
27
+ }
package/src/index.ts ADDED
@@ -0,0 +1,118 @@
1
+ // @ninedeploy/sdk public entry. Every name below is part of the published API;
2
+ // the implementation lives in the modules it re-exports from (resources/*.ts
3
+ // hold one client surface each, client.ts composes them).
4
+ export { NineDeployError } from './errors.js';
5
+ export type * from '@ninedeploy/schemas';
6
+ export {
7
+ detectProjectKind,
8
+ formatManifestYaml,
9
+ ManifestParseError,
10
+ ManifestValidationError,
11
+ parseManifestYaml,
12
+ starterManifest,
13
+ buildManifestFromTemplate,
14
+ } from './manifest.js';
15
+ export type { ProjectKind, TemplateRegistryEntry } from './manifest.js';
16
+
17
+ export type {
18
+ FetchLike,
19
+ NineDeployClientOptions,
20
+ } from './transport.js';
21
+
22
+ export type {
23
+ JobKind,
24
+ ScheduledJob,
25
+ JobRun,
26
+ TraefikVersionInfo,
27
+ TraefikRoutingConfig,
28
+ HealthStatus,
29
+ VaultAllowlistView,
30
+ VaultSettings,
31
+ TokenIntrospection,
32
+ TemplateDeployResult,
33
+ TemplatePrepareResult,
34
+ ApplyManifestResult,
35
+ ApplyManifestInput,
36
+ BackupDrillResult,
37
+ BackupDrillEntry,
38
+ LogSearchInput,
39
+ LogSearchLine,
40
+ LogSearchResult,
41
+ EmailTemplateName,
42
+ EmailTemplateEntry,
43
+ EmailTemplateRender,
44
+ PgbouncerStatus,
45
+ ImageInfo,
46
+ PruneImagesInput,
47
+ PruneImagesResult,
48
+ DomainVerificationChallenge,
49
+ CreatedDomain,
50
+ DomainVerifyResult,
51
+ StartDomainTransferResult,
52
+ DomainTransferPreview,
53
+ AcceptDomainTransferInput,
54
+ AcceptDomainTransferResult,
55
+ DatabaseCredentialsWithPublic,
56
+ GithubAppInstallationSync,
57
+ SourceRepo,
58
+ SourceUpdateInput,
59
+ ServerListEntry,
60
+ ServerRolesResult,
61
+ SwarmJoinResult,
62
+ SwarmLeaveResult,
63
+ VolumeListEntry,
64
+ VolumeCreateResult,
65
+ ServiceDetail,
66
+ NodeTerminalCapability,
67
+ TerminalListQuery,
68
+ TrafficQuery,
69
+ ContainerInspectData,
70
+ ContainerComposeData,
71
+ } from './types.js';
72
+
73
+ export {
74
+ DATABASE_IMPORT_FINISHED_STATUSES,
75
+ } from './databaseImport.js';
76
+
77
+ export type {
78
+ ImportWaitOptions,
79
+ ImportFileData,
80
+ ImportFileOptions,
81
+ } from './databaseImport.js';
82
+
83
+ export type {
84
+ ApiQuery,
85
+ } from './apiPath.js';
86
+
87
+ export {
88
+ apiGetUrl,
89
+ } from './apiPath.js';
90
+
91
+ export {
92
+ AGENT_SWARM_MANAGER_VAR,
93
+ } from './types.js';
94
+
95
+ export {
96
+ TERMINAL_SUBPROTOCOL,
97
+ TERMINAL_TICKET_PREFIX,
98
+ TERMINAL_INPUT_CHUNK_BYTES,
99
+ TERMINAL_PENDING_INPUT_MAX,
100
+ terminalAttachInfo,
101
+ terminalCloseMessage,
102
+ connectTerminal,
103
+ } from './terminal.js';
104
+
105
+ export type {
106
+ TerminalAttachSource,
107
+ WebSocketLocation,
108
+ TerminalAttachInfo,
109
+ TerminalSocketLike,
110
+ TerminalSocketFactory,
111
+ TerminalReady,
112
+ TerminalHandlers,
113
+ TerminalConnectOptions,
114
+ TerminalConnection,
115
+ } from './terminal.js';
116
+
117
+ export { createClient } from './client.js';
118
+ export type { NineDeployClient } from './client.js';