@miosa/sdk 0.3.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 (81) hide show
  1. package/README.md +181 -0
  2. package/dist/index.d.ts +4689 -0
  3. package/dist/index.js +6045 -0
  4. package/dist/index.js.map +1 -0
  5. package/package.json +63 -0
  6. package/src/client.ts +249 -0
  7. package/src/errors.ts +136 -0
  8. package/src/http.test.ts +374 -0
  9. package/src/http.ts +390 -0
  10. package/src/index.ts +452 -0
  11. package/src/resources/admin.ts +348 -0
  12. package/src/resources/analytics.ts +60 -0
  13. package/src/resources/api-keys.ts +119 -0
  14. package/src/resources/audit-log.ts +64 -0
  15. package/src/resources/benchmarks.ts +104 -0
  16. package/src/resources/builder-sessions.ts +75 -0
  17. package/src/resources/channels.ts +143 -0
  18. package/src/resources/checkpoints.ts +225 -0
  19. package/src/resources/command-center.ts +73 -0
  20. package/src/resources/community.ts +103 -0
  21. package/src/resources/completions.ts +104 -0
  22. package/src/resources/computer-auto-stop.ts +43 -0
  23. package/src/resources/computer-env.ts +76 -0
  24. package/src/resources/computer-logs.ts +50 -0
  25. package/src/resources/computer-osa.ts +76 -0
  26. package/src/resources/computer-ports.ts +91 -0
  27. package/src/resources/computer-terminal.ts +61 -0
  28. package/src/resources/computer-volumes.ts +64 -0
  29. package/src/resources/computer.ts +530 -0
  30. package/src/resources/computers.ts +75 -0
  31. package/src/resources/credits.ts +43 -0
  32. package/src/resources/cron-jobs.ts +191 -0
  33. package/src/resources/custom_domains.ts +123 -0
  34. package/src/resources/dashboard.ts +49 -0
  35. package/src/resources/databases.ts +218 -0
  36. package/src/resources/deployments.ts +777 -0
  37. package/src/resources/desktop.ts +134 -0
  38. package/src/resources/email.ts +212 -0
  39. package/src/resources/embeddings.ts +36 -0
  40. package/src/resources/events.ts +296 -0
  41. package/src/resources/exec.ts +319 -0
  42. package/src/resources/external-keys.ts +79 -0
  43. package/src/resources/files.test.ts +339 -0
  44. package/src/resources/files.ts +220 -0
  45. package/src/resources/flat-custom-domains.ts +127 -0
  46. package/src/resources/functions.ts +178 -0
  47. package/src/resources/health-checks.ts +165 -0
  48. package/src/resources/integrations.ts +183 -0
  49. package/src/resources/mcp.ts +70 -0
  50. package/src/resources/models.ts +45 -0
  51. package/src/resources/network_policy.ts +73 -0
  52. package/src/resources/open-computers/agents.ts +91 -0
  53. package/src/resources/open-computers/apps.ts +102 -0
  54. package/src/resources/open-computers/clusters.ts +88 -0
  55. package/src/resources/open-computers/desktop.ts +34 -0
  56. package/src/resources/open-computers/files.ts +97 -0
  57. package/src/resources/open-computers/hosts.ts +85 -0
  58. package/src/resources/open-computers/index.ts +98 -0
  59. package/src/resources/open-computers/jobs.ts +75 -0
  60. package/src/resources/open-computers/open_computers.test.ts +288 -0
  61. package/src/resources/open-computers/secrets.ts +115 -0
  62. package/src/resources/open-computers/terminal.ts +33 -0
  63. package/src/resources/open-computers/tunnels.ts +87 -0
  64. package/src/resources/open-computers/types.ts +343 -0
  65. package/src/resources/open-computers/workspaces.ts +135 -0
  66. package/src/resources/project-auth.ts +142 -0
  67. package/src/resources/project-integrations.ts +133 -0
  68. package/src/resources/provider-defaults.ts +89 -0
  69. package/src/resources/regions.ts +94 -0
  70. package/src/resources/sandbox-templates.ts +195 -0
  71. package/src/resources/sandboxes.live.test.ts +92 -0
  72. package/src/resources/sandboxes.test.ts +624 -0
  73. package/src/resources/sandboxes.ts +1173 -0
  74. package/src/resources/settings.ts +143 -0
  75. package/src/resources/snapshots-standalone.ts +51 -0
  76. package/src/resources/storage.ts +221 -0
  77. package/src/resources/tenant.ts +39 -0
  78. package/src/resources/usage.ts +85 -0
  79. package/src/resources/volumes.ts +117 -0
  80. package/src/resources/webhooks.ts +171 -0
  81. package/src/types.ts +460 -0
@@ -0,0 +1,171 @@
1
+ /**
2
+ * Webhooks resource — tenant outgoing event delivery.
3
+ */
4
+
5
+ import { randomUUID } from "node:crypto";
6
+
7
+ import type { HttpClient } from "../http.js";
8
+
9
+ // ── Branded IDs ──────────────────────────────────────────────────────────────
10
+
11
+ export type WebhookId = string & { readonly __brand: "WebhookId" };
12
+ export type WebhookDeliveryId = string & {
13
+ readonly __brand: "WebhookDeliveryId";
14
+ };
15
+
16
+ // ── Resource shapes ──────────────────────────────────────────────────────────
17
+
18
+ export interface WebhookData {
19
+ id: WebhookId;
20
+ tenant_id: string;
21
+ url: string;
22
+ events: string[];
23
+ state?: string;
24
+ secret?: string | null;
25
+ enabled?: boolean;
26
+ created_at?: string;
27
+ updated_at?: string;
28
+ [key: string]: unknown;
29
+ }
30
+
31
+ export interface WebhookDeliveryData {
32
+ id: WebhookDeliveryId;
33
+ webhook_id: WebhookId;
34
+ event?: string;
35
+ state?: string;
36
+ response_status?: number | null;
37
+ attempt_count?: number;
38
+ next_retry_at?: string | null;
39
+ delivered_at?: string | null;
40
+ created_at?: string;
41
+ [key: string]: unknown;
42
+ }
43
+
44
+ // ── Request payloads ─────────────────────────────────────────────────────────
45
+
46
+ export interface WebhookListParams {
47
+ limit?: number;
48
+ cursor?: string;
49
+ [key: string]: string | number | boolean | undefined;
50
+ }
51
+
52
+ export interface WebhookCreateParams {
53
+ url: string;
54
+ events: string[];
55
+ secret?: string;
56
+ enabled?: boolean;
57
+ idempotencyKey?: string;
58
+ [key: string]: unknown;
59
+ }
60
+
61
+ export interface WebhookUpdateParams {
62
+ url?: string;
63
+ events?: string[];
64
+ secret?: string;
65
+ enabled?: boolean;
66
+ [key: string]: unknown;
67
+ }
68
+
69
+ // ── Helpers ───────────────────────────────────────────────────────────────────
70
+
71
+ function unwrap<T>(payload: unknown): T {
72
+ if (payload && typeof payload === "object" && "data" in (payload as object)) {
73
+ return (payload as { data: T }).data;
74
+ }
75
+ return payload as T;
76
+ }
77
+
78
+ function listItems<T>(
79
+ payload: unknown,
80
+ candidateKeys: string[] = ["data", "webhooks", "deliveries", "items"],
81
+ ): T[] {
82
+ if (Array.isArray(payload)) return payload;
83
+ if (!payload || typeof payload !== "object") return [];
84
+ const p = payload as Record<string, unknown>;
85
+ if (Array.isArray(p.data)) return p.data as T[];
86
+ for (const key of candidateKeys) {
87
+ if (Array.isArray(p[key])) return p[key] as T[];
88
+ }
89
+ return [];
90
+ }
91
+
92
+ function stripUndefined(
93
+ input: Record<string, unknown>,
94
+ ): Record<string, unknown> {
95
+ return Object.fromEntries(
96
+ Object.entries(input).filter(([, v]) => v !== undefined),
97
+ );
98
+ }
99
+
100
+ function idempotencyKey(key?: string): string {
101
+ return key ?? randomUUID();
102
+ }
103
+
104
+ // ── Main resource ─────────────────────────────────────────────────────────────
105
+
106
+ export class Webhooks {
107
+ constructor(private readonly http: HttpClient) {}
108
+
109
+ async list(params: WebhookListParams = {}): Promise<WebhookData[]> {
110
+ const query = stripUndefined({ ...params }) as Record<
111
+ string,
112
+ string | number | boolean | undefined
113
+ >;
114
+ const data = await this.http.get<unknown>("/webhooks", query);
115
+ return listItems<WebhookData>(data);
116
+ }
117
+
118
+ async get(webhookId: string): Promise<WebhookData> {
119
+ const data = await this.http.get<unknown>(`/webhooks/${webhookId}`);
120
+ return unwrap<WebhookData>(data);
121
+ }
122
+
123
+ async create(params: WebhookCreateParams): Promise<WebhookData> {
124
+ const { idempotencyKey: ikey, ...rest } = params;
125
+ const body = stripUndefined(rest as Record<string, unknown>);
126
+ const data = await this.http.request<unknown>("/webhooks", {
127
+ method: "POST",
128
+ body,
129
+ headers: { "Idempotency-Key": idempotencyKey(ikey) },
130
+ });
131
+ return unwrap<WebhookData>(data);
132
+ }
133
+
134
+ async update(
135
+ webhookId: string,
136
+ params: WebhookUpdateParams,
137
+ ): Promise<WebhookData> {
138
+ const body = stripUndefined(params as Record<string, unknown>);
139
+ const data = await this.http.patch<unknown>(`/webhooks/${webhookId}`, body);
140
+ return unwrap<WebhookData>(data);
141
+ }
142
+
143
+ async delete(webhookId: string): Promise<void> {
144
+ await this.http.delete<unknown>(`/webhooks/${webhookId}`);
145
+ }
146
+
147
+ async test(
148
+ webhookId: string,
149
+ opts: { idempotencyKey?: string } = {},
150
+ ): Promise<Record<string, unknown>> {
151
+ const data = await this.http.request<unknown>(
152
+ `/webhooks/${webhookId}/test`,
153
+ {
154
+ method: "POST",
155
+ headers: { "Idempotency-Key": idempotencyKey(opts.idempotencyKey) },
156
+ },
157
+ );
158
+ return unwrap<Record<string, unknown>>(data);
159
+ }
160
+
161
+ async deliveries(webhookId: string): Promise<WebhookDeliveryData[]> {
162
+ const data = await this.http.get<unknown>(
163
+ `/webhooks/${webhookId}/deliveries`,
164
+ );
165
+ return listItems<WebhookDeliveryData>(data, [
166
+ "data",
167
+ "deliveries",
168
+ "items",
169
+ ]);
170
+ }
171
+ }
package/src/types.ts ADDED
@@ -0,0 +1,460 @@
1
+ // ─── Shared primitives ──────────────────────────────────────────────────────
2
+
3
+ export type ComputerId = string & { readonly __brand: "ComputerId" };
4
+ export type SessionId = string & { readonly __brand: "SessionId" };
5
+ export type TenantId = string & { readonly __brand: "TenantId" };
6
+
7
+ // ─── Computers ───────────────────────────────────────────────────────────────
8
+
9
+ export type ComputerSize = "small" | "medium" | "large";
10
+ /**
11
+ * Lifecycle states emitted by the control plane.
12
+ *
13
+ * Canonical states (what the server actually emits):
14
+ * provisioning — VM is being created + booted (~30-50s on small tier)
15
+ * active — running and reachable (same as legacy "running")
16
+ * paused — RAM snapshot on disk, cold start available
17
+ * stopped — explicitly halted
18
+ * error — terminal failure; destroy and retry
19
+ * destroyed — terminal; gone
20
+ *
21
+ * Legacy aliases (`running`, `starting`, `creating`, `stopping`) are kept
22
+ * in the union so older callers still typecheck, but the server will emit
23
+ * the canonical names. Treat `active` and `running` as synonymous.
24
+ */
25
+ export type ComputerStatus =
26
+ | "provisioning"
27
+ | "active"
28
+ | "paused"
29
+ | "stopped"
30
+ | "error"
31
+ | "destroyed"
32
+ // legacy — retained for backwards compatibility
33
+ | "creating"
34
+ | "starting"
35
+ | "running"
36
+ | "stopping";
37
+ /**
38
+ * Template slug for the rootfs a computer boots into.
39
+ *
40
+ * - `miosa-desktop` — full KasmVNC + Xfce GUI (default)
41
+ * - `miosa-sandbox` — lightweight code-exec rootfs, no desktop
42
+ *
43
+ * Additional templates can be added at the platform level; the type is kept
44
+ * open so future templates don't require an SDK release.
45
+ */
46
+ export type ComputerTemplateType =
47
+ | "miosa-desktop"
48
+ | "miosa-sandbox"
49
+ | (string & {});
50
+
51
+ /**
52
+ * Controls who can access the computer's HTTP preview URL.
53
+ *
54
+ * - `public` — unauthenticated access to preview paths (default)
55
+ * - `tenant` — requires a valid JWT with matching tenant_id
56
+ * - `key` — requires a Bearer `msk_u_*` key matching the owner tenant
57
+ *
58
+ * Sensitive paths (`/api/*`, `/vnc/*`, `/term/*`) are always auth-gated
59
+ * regardless of visibility mode.
60
+ */
61
+ export type ComputerVisibility = "public" | "tenant" | "key";
62
+
63
+ export interface ComputerCreateParams {
64
+ name: string;
65
+ template_type?: ComputerTemplateType;
66
+ size?: ComputerSize;
67
+ visibility?: ComputerVisibility;
68
+ metadata?: Record<string, string>;
69
+ }
70
+
71
+ export interface ComputerUpdateParams {
72
+ name?: string;
73
+ visibility?: ComputerVisibility;
74
+ metadata?: Record<string, string>;
75
+ }
76
+
77
+ export interface ComputerData {
78
+ id: ComputerId;
79
+ name: string;
80
+ /**
81
+ * URL-safe identifier used in preview URLs: `https://{port}-{slug}.sandbox.miosa.ai`.
82
+ * Falls back to the computer id when no slug is assigned.
83
+ */
84
+ slug: string;
85
+ status: ComputerStatus;
86
+ template_type: ComputerTemplateType;
87
+ size: ComputerSize;
88
+ tenant_id: TenantId;
89
+ ip_address: string | null;
90
+ metadata: Record<string, string>;
91
+ /** Controls who can access the HTTP preview URL. Defaults to `"public"`. */
92
+ visibility: ComputerVisibility;
93
+ /** Public ingress root, e.g. `https://<slug>.sandbox.miosa.ai`. */
94
+ sandbox_url?: string;
95
+ /** KasmVNC URL for desktop templates. */
96
+ desktop_url?: string;
97
+ created_at: string;
98
+ updated_at: string;
99
+ }
100
+
101
+ // ─── Network Policy ───────────────────────────────────────────────────────────
102
+
103
+ export type NetworkPolicyEffect = "allow" | "deny";
104
+ export type NetworkPolicyProtocol = "tcp" | "udp" | "any";
105
+
106
+ /**
107
+ * A single egress rule.
108
+ *
109
+ * - `effect` — `"allow"` or `"deny"`
110
+ * - `destination` — CIDR (`"10.0.0.0/8"`), IP, domain (`"example.com"`),
111
+ * wildcard (`"*.example.com"`), or `"any"`
112
+ * - `ports` — optional: `"80"`, `"80,443"`, `"8000-9000"` (omit = all ports)
113
+ * - `protocol` — `"tcp"` | `"udp"` | `"any"` (default `"any"`)
114
+ */
115
+ export interface NetworkPolicyRule {
116
+ effect: NetworkPolicyEffect;
117
+ destination: string;
118
+ ports?: string;
119
+ protocol?: NetworkPolicyProtocol;
120
+ }
121
+
122
+ export interface NetworkPolicySetParams {
123
+ /** Rules evaluated top-to-bottom. */
124
+ rules: NetworkPolicyRule[];
125
+ /**
126
+ * Verdict when no rule matches.
127
+ * `"allow"` = allowlist entries, deny everything else.
128
+ * `"deny"` = blocklist entries, allow everything else (default).
129
+ */
130
+ default_effect?: NetworkPolicyEffect;
131
+ }
132
+
133
+ export interface NetworkPolicyData {
134
+ computer_id: ComputerId;
135
+ tenant_id: TenantId;
136
+ rules: NetworkPolicyRule[];
137
+ default_effect: NetworkPolicyEffect;
138
+ inserted_at?: string;
139
+ updated_at?: string;
140
+ }
141
+
142
+ export interface ComputerListResponse {
143
+ data: ComputerData[];
144
+ meta: {
145
+ total: number;
146
+ page: number;
147
+ per_page: number;
148
+ };
149
+ }
150
+
151
+ export interface ComputerListParams {
152
+ page?: number;
153
+ per_page?: number;
154
+ status?: ComputerStatus;
155
+ }
156
+
157
+ // ─── Desktop ─────────────────────────────────────────────────────────────────
158
+
159
+ export type MouseButton = "left" | "right" | "middle";
160
+ export type ScrollDirection = "up" | "down" | "left" | "right";
161
+
162
+ export interface ClickParams {
163
+ x: number;
164
+ y: number;
165
+ button?: MouseButton;
166
+ }
167
+
168
+ export interface DoubleClickParams {
169
+ x: number;
170
+ y: number;
171
+ }
172
+
173
+ export interface TypeParams {
174
+ text: string;
175
+ delay?: number;
176
+ }
177
+
178
+ export interface KeyParams {
179
+ key: string;
180
+ }
181
+
182
+ export interface ScrollParams {
183
+ x?: number;
184
+ y?: number;
185
+ direction: ScrollDirection;
186
+ clicks?: number;
187
+ }
188
+
189
+ export interface DragParams {
190
+ from_x: number;
191
+ from_y: number;
192
+ to_x: number;
193
+ to_y: number;
194
+ }
195
+
196
+ export interface WaitParams {
197
+ seconds: number;
198
+ }
199
+
200
+ export interface WindowInfo {
201
+ id: string;
202
+ title: string;
203
+ x: number;
204
+ y: number;
205
+ width: number;
206
+ height: number;
207
+ is_focused: boolean;
208
+ }
209
+
210
+ export interface CursorInfo {
211
+ x: number;
212
+ y: number;
213
+ }
214
+
215
+ export interface WindowFocusParams {
216
+ window_id: string;
217
+ }
218
+
219
+ export interface LaunchParams {
220
+ app_name: string;
221
+ }
222
+
223
+ export interface DesktopActionResult {
224
+ success: boolean;
225
+ }
226
+
227
+ // ─── Exec ────────────────────────────────────────────────────────────────────
228
+
229
+ export interface ExecParams {
230
+ command: string;
231
+ timeout?: number;
232
+ }
233
+
234
+ export interface ExecPythonParams {
235
+ code: string;
236
+ timeout?: number;
237
+ }
238
+
239
+ /**
240
+ * Result of `exec.bash()` / `exec.python()`.
241
+ *
242
+ * The server returns stdout and stderr separately (what every other
243
+ * runtime does too) — the older `{output, success}` shape was never
244
+ * actually emitted. `output` is kept as a read-only alias of `stdout`
245
+ * for backwards compatibility; new code should use `stdout` + `stderr`.
246
+ */
247
+ export interface ExecResult {
248
+ /** Standard output from the command. */
249
+ stdout: string;
250
+ /** Standard error from the command. Empty string when no error output. */
251
+ stderr: string;
252
+ /** Process exit code. 0 = success. */
253
+ exit_code: number;
254
+ /** @deprecated alias for `stdout`; prefer `stdout` in new code. */
255
+ output?: string;
256
+ /** @deprecated derive from `exit_code === 0` in new code. */
257
+ success?: boolean;
258
+ }
259
+
260
+ // ─── Files ───────────────────────────────────────────────────────────────────
261
+
262
+ export interface FileEntry {
263
+ name: string;
264
+ path: string;
265
+ size: number;
266
+ is_dir: boolean;
267
+ modified_at: string;
268
+ }
269
+
270
+ export interface FileListParams {
271
+ path: string;
272
+ }
273
+
274
+ export interface FileDownloadParams {
275
+ path: string;
276
+ }
277
+
278
+ export interface FileDeleteParams {
279
+ path: string;
280
+ }
281
+
282
+ export interface FileExportParams {
283
+ path: string;
284
+ }
285
+
286
+ export interface FileExportResult {
287
+ url: string;
288
+ expires_at: string;
289
+ }
290
+
291
+ export interface FileListResult {
292
+ entries: FileEntry[];
293
+ path: string;
294
+ }
295
+
296
+ // ─── Phase-7 stdlib-parity file types ────────────────────────────────────────
297
+
298
+ export interface FileStat {
299
+ path: string;
300
+ /** File size in bytes. */
301
+ size: number;
302
+ /** Unix mode bits (e.g. 0o100644 for a regular file with rw-r--r--). */
303
+ mode: number;
304
+ is_dir: boolean;
305
+ is_symlink: boolean;
306
+ /** Populated when is_symlink is true. */
307
+ symlink_target?: string;
308
+ modified_at: string;
309
+ }
310
+
311
+ export interface DirEntry {
312
+ name: string;
313
+ is_dir: boolean;
314
+ is_symlink: boolean;
315
+ size: number;
316
+ modified_at: string;
317
+ }
318
+
319
+ export interface MkdirParams {
320
+ /** Create parent directories as needed. Defaults to true. */
321
+ recursive?: boolean;
322
+ /** Octal mode bits (e.g. 0o755). Defaults to 0o755. */
323
+ mode?: number;
324
+ }
325
+
326
+ export interface CopyParams {
327
+ /** Copy directory trees recursively. Defaults to false. */
328
+ recursive?: boolean;
329
+ }
330
+
331
+ export interface DirListResult {
332
+ data: {
333
+ entries: DirEntry[];
334
+ path: string;
335
+ };
336
+ }
337
+
338
+ // ─── Agent / CUA ─────────────────────────────────────────────────────────────
339
+
340
+ export type AgentSessionStatus =
341
+ | "pending"
342
+ | "running"
343
+ | "completed"
344
+ | "failed"
345
+ | "cancelled";
346
+
347
+ export interface AgentSessionCreateParams {
348
+ goal: string;
349
+ model_id?: string;
350
+ max_turns?: number;
351
+ }
352
+
353
+ export interface AgentSessionData {
354
+ id: SessionId;
355
+ computer_id: ComputerId;
356
+ goal: string;
357
+ model_id: string;
358
+ status: AgentSessionStatus;
359
+ max_turns: number;
360
+ turns_used: number;
361
+ created_at: string;
362
+ updated_at: string;
363
+ completed_at: string | null;
364
+ error: string | null;
365
+ }
366
+
367
+ export interface AgentSessionListResponse {
368
+ data: AgentSessionData[];
369
+ }
370
+
371
+ export type AgentEventType =
372
+ | "session_started"
373
+ | "turn_started"
374
+ | "thinking"
375
+ | "tool_call"
376
+ | "tool_result"
377
+ | "streaming_token"
378
+ | "agent_response"
379
+ | "turn_completed"
380
+ | "session_completed"
381
+ | "session_failed"
382
+ | "done"
383
+ | "error";
384
+
385
+ export interface AgentEvent {
386
+ type: AgentEventType;
387
+ session_id: SessionId;
388
+ data: unknown;
389
+ timestamp: string;
390
+ }
391
+
392
+ // ─── Credits ─────────────────────────────────────────────────────────────────
393
+
394
+ export interface CreditBalance {
395
+ balance: number;
396
+ expires_at: string | null;
397
+ }
398
+
399
+ export interface CreditTransaction {
400
+ id: string;
401
+ amount: number;
402
+ type: "credit" | "debit";
403
+ description: string;
404
+ created_at: string;
405
+ }
406
+
407
+ export interface CreditTransactionListResponse {
408
+ data: CreditTransaction[];
409
+ meta: {
410
+ total: number;
411
+ page: number;
412
+ per_page: number;
413
+ };
414
+ }
415
+
416
+ export interface CreditUsage {
417
+ period_start: string;
418
+ period_end: string;
419
+ compute_credits: number;
420
+ ai_credits: number;
421
+ total_credits: number;
422
+ }
423
+
424
+ // ─── Events ──────────────────────────────────────────────────────────────────
425
+
426
+ export type {
427
+ EventProducer,
428
+ EventSubscribeOptions,
429
+ ComputerEvent,
430
+ EventStream,
431
+ WindowFocusChangedPayload,
432
+ WindowOpenedPayload,
433
+ WindowClosedPayload,
434
+ ClipboardChangedPayload,
435
+ FileCreatedPayload,
436
+ FileModifiedPayload,
437
+ FileDeletedPayload,
438
+ ProcessStartedPayload,
439
+ ProcessStoppedPayload,
440
+ IdleInactivePayload,
441
+ IdleActivePayload,
442
+ ProducerUnavailablePayload,
443
+ } from "./resources/events.js";
444
+
445
+ // ─── Custom Domains ──────────────────────────────────────────────────────────
446
+
447
+ export type {
448
+ CustomDomainStatus,
449
+ CustomDomainData,
450
+ CustomDomainRegisterParams,
451
+ } from "./resources/custom_domains.js";
452
+
453
+ // ─── Client config ───────────────────────────────────────────────────────────
454
+
455
+ export interface MiosaClientConfig {
456
+ apiKey: string;
457
+ baseUrl?: string;
458
+ timeout?: number;
459
+ maxRetries?: number;
460
+ }