@lifesi/genesis 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,830 @@
1
+ import { GenesisClient, type GenesisOptions } from './client.js';
2
+ import type { OperationInput as In } from './types.js';
3
+ import type { components } from './generated/schema.js';
4
+ import { type HivesUploadOptions } from './hives-upload.js';
5
+ type S = components['schemas'];
6
+ export type ChatMessage = {
7
+ role: 'system' | 'user' | 'assistant' | 'tool';
8
+ content: string;
9
+ } & Record<string, unknown>;
10
+ /**
11
+ * The Genesis SDK: one client, every service.
12
+ * const genesis = new Genesis(); // GENESIS_API_KEY or `genesis login`
13
+ * await genesis.hives.projects.list();
14
+ * await genesis.foundry.chat({ model: 'x', messages: [{ role: 'user', content: 'hi' }] });
15
+ */
16
+ export declare class Genesis extends GenesisClient {
17
+ constructor(opts?: GenesisOptions);
18
+ /** Generic escape hatch: genesis.call('hives_list_projects', {...}) */
19
+ call: <K extends import("./index.js").OperationId>(operationId: K, input?: In<K>, init?: {
20
+ signal?: AbortSignal;
21
+ headers?: Record<string, string>;
22
+ }) => Promise<import("./types.js").OperationOutput<K>>;
23
+ readonly dials: {
24
+ overview: {
25
+ summary: (scope: import("./dials.js").DialsScope) => Promise<{
26
+ ok: boolean;
27
+ scope: components["schemas"]["Dials.Scope"];
28
+ calls: {
29
+ total: number;
30
+ queued: number;
31
+ active: number;
32
+ completed: number;
33
+ failed: number;
34
+ };
35
+ dispatch: {
36
+ total: number;
37
+ pending: number;
38
+ claimed: number;
39
+ dispatched: number;
40
+ failed: number;
41
+ };
42
+ people: {
43
+ deployed: number;
44
+ };
45
+ agents: {
46
+ deployed: number;
47
+ };
48
+ routes: {
49
+ deployed: number;
50
+ };
51
+ numbers: {
52
+ deployed: number;
53
+ };
54
+ voice: {
55
+ deployed: number;
56
+ };
57
+ messages: {
58
+ total: number;
59
+ queued: number;
60
+ delivered: number;
61
+ failed: number;
62
+ };
63
+ usage: {
64
+ total: number;
65
+ quantity: number;
66
+ lastMetric: string | null;
67
+ lastResourceId: string | null;
68
+ };
69
+ }>;
70
+ operatingSurface: (scope: import("./dials.js").DialsScope) => Promise<{
71
+ ok: boolean;
72
+ scope: components["schemas"]["Dials.Scope"];
73
+ summary: components["schemas"]["Dials.ConsoleSummary"];
74
+ surfaces: components["schemas"]["Dials.OperatingSurfaceCard"][];
75
+ } & {
76
+ [key: string]: unknown;
77
+ }>;
78
+ };
79
+ numbers: {
80
+ reconciliations: (scope: import("./dials.js").DialsScope) => Promise<{
81
+ ok: boolean;
82
+ reconciliations: components["schemas"]["Dials.InventoryReconciliation"][];
83
+ }>;
84
+ drift: (scope: import("./dials.js").DialsScope) => Promise<{
85
+ ok: boolean;
86
+ drift: components["schemas"]["Dials.InventoryDrift"][];
87
+ }>;
88
+ updateCallerName: (body: In<"dials_updateNumberCallerName">["body"]) => Promise<{
89
+ ok: boolean;
90
+ number: components["schemas"]["Dials.Number"];
91
+ auditId: string;
92
+ next: string;
93
+ }>;
94
+ reconcile: (body: In<"dials_reconcileNumberInventory">["body"]) => Promise<{
95
+ ok: boolean;
96
+ reconciliations: components["schemas"]["Dials.InventoryReconciliation"][];
97
+ drift: components["schemas"]["Dials.InventoryDrift"][];
98
+ orphanCount: number;
99
+ auditId: string;
100
+ next: string;
101
+ }>;
102
+ list: (scope: import("./dials.js").DialsScope) => Promise<{
103
+ ok: boolean;
104
+ numbers: components["schemas"]["Dials.Number"][];
105
+ }>;
106
+ search: (scope: import("./dials.js").DialsScope, query?: Omit<In<"dials_searchNumbers">, keyof import("./dials.js").DialsScope>) => Promise<{
107
+ ok: boolean;
108
+ numbers: components["schemas"]["Dials.AvailableNumber"][];
109
+ }>;
110
+ provision: (body: In<"dials_provisionNumber">["body"]) => Promise<{
111
+ [key: string]: unknown;
112
+ }>;
113
+ assign: (body: In<"dials_assignNumber">["body"]) => Promise<{
114
+ [key: string]: unknown;
115
+ }>;
116
+ release: (body: In<"dials_releaseNumber">["body"]) => Promise<{
117
+ [key: string]: unknown;
118
+ }>;
119
+ registerEmergencyAddress: (body: import("./dials.js").DialsEmergencyAddress) => Promise<{
120
+ ok: boolean;
121
+ number: components["schemas"]["Dials.Number"];
122
+ address: components["schemas"]["Dials.EmergencyAddress"];
123
+ auditId: string;
124
+ next: string;
125
+ }>;
126
+ };
127
+ calls: {
128
+ list: (scope: import("./dials.js").DialsScope) => Promise<{
129
+ ok: boolean;
130
+ calls: components["schemas"]["Dials.Call"][];
131
+ }>;
132
+ validate: (body: import("./dials.js").DialsOutboundCall) => Promise<{
133
+ [key: string]: unknown;
134
+ }>;
135
+ create: (body: import("./dials.js").DialsOutboundCall) => Promise<{
136
+ [key: string]: unknown;
137
+ }>;
138
+ };
139
+ };
140
+ readonly henry: {
141
+ config: () => Promise<{
142
+ credential_configured: boolean;
143
+ models: {
144
+ id: string;
145
+ }[];
146
+ }>;
147
+ credential: (api_key: string) => Promise<{
148
+ credential_configured: boolean;
149
+ models: {
150
+ id: string;
151
+ }[];
152
+ }>;
153
+ runs: {
154
+ list: (page_token?: string) => Promise<{
155
+ runs: components["schemas"]["Henry.Run"][];
156
+ next_page_token?: string | null;
157
+ }>;
158
+ create: (body: NonNullable<In<"henry_createRun">["body"]>) => Promise<{
159
+ id: string;
160
+ task: string;
161
+ model: string;
162
+ status: "ready" | "running" | "acting" | "paused" | "awaiting_approval" | "completed" | "cancelled" | "failed" | "waiting_input";
163
+ created_at: string;
164
+ updated_at: string;
165
+ activity: {
166
+ id: string;
167
+ at: string;
168
+ type: string;
169
+ detail: string;
170
+ }[];
171
+ approvals: {
172
+ id: string;
173
+ action: string;
174
+ url: string;
175
+ status: string;
176
+ requested_at: string;
177
+ }[];
178
+ phases: {
179
+ id?: string;
180
+ code?: number;
181
+ receipt?: Record<string, never>;
182
+ usage?: Record<string, never> | null;
183
+ }[];
184
+ messages: ({
185
+ role: string;
186
+ content?: string | null;
187
+ } & {
188
+ [key: string]: unknown;
189
+ })[];
190
+ }>;
191
+ get: (run_id: string) => Promise<{
192
+ id: string;
193
+ task: string;
194
+ model: string;
195
+ status: "ready" | "running" | "acting" | "paused" | "awaiting_approval" | "completed" | "cancelled" | "failed" | "waiting_input";
196
+ created_at: string;
197
+ updated_at: string;
198
+ activity: {
199
+ id: string;
200
+ at: string;
201
+ type: string;
202
+ detail: string;
203
+ }[];
204
+ approvals: {
205
+ id: string;
206
+ action: string;
207
+ url: string;
208
+ status: string;
209
+ requested_at: string;
210
+ }[];
211
+ phases: {
212
+ id?: string;
213
+ code?: number;
214
+ receipt?: Record<string, never>;
215
+ usage?: Record<string, never> | null;
216
+ }[];
217
+ messages: ({
218
+ role: string;
219
+ content?: string | null;
220
+ } & {
221
+ [key: string]: unknown;
222
+ })[];
223
+ }>;
224
+ command: (run_id: string, action: "pause" | "resume" | "cancel" | "input", text?: string) => Promise<{
225
+ id: string;
226
+ task: string;
227
+ model: string;
228
+ status: "ready" | "running" | "acting" | "paused" | "awaiting_approval" | "completed" | "cancelled" | "failed" | "waiting_input";
229
+ created_at: string;
230
+ updated_at: string;
231
+ activity: {
232
+ id: string;
233
+ at: string;
234
+ type: string;
235
+ detail: string;
236
+ }[];
237
+ approvals: {
238
+ id: string;
239
+ action: string;
240
+ url: string;
241
+ status: string;
242
+ requested_at: string;
243
+ }[];
244
+ phases: {
245
+ id?: string;
246
+ code?: number;
247
+ receipt?: Record<string, never>;
248
+ usage?: Record<string, never> | null;
249
+ }[];
250
+ messages: ({
251
+ role: string;
252
+ content?: string | null;
253
+ } & {
254
+ [key: string]: unknown;
255
+ })[];
256
+ }>;
257
+ approval: (run_id: string, approval_id: string, decision: "approve" | "reject") => Promise<{
258
+ id: string;
259
+ task: string;
260
+ model: string;
261
+ status: "ready" | "running" | "acting" | "paused" | "awaiting_approval" | "completed" | "cancelled" | "failed" | "waiting_input";
262
+ created_at: string;
263
+ updated_at: string;
264
+ activity: {
265
+ id: string;
266
+ at: string;
267
+ type: string;
268
+ detail: string;
269
+ }[];
270
+ approvals: {
271
+ id: string;
272
+ action: string;
273
+ url: string;
274
+ status: string;
275
+ requested_at: string;
276
+ }[];
277
+ phases: {
278
+ id?: string;
279
+ code?: number;
280
+ receipt?: Record<string, never>;
281
+ usage?: Record<string, never> | null;
282
+ }[];
283
+ messages: ({
284
+ role: string;
285
+ content?: string | null;
286
+ } & {
287
+ [key: string]: unknown;
288
+ })[];
289
+ }>;
290
+ };
291
+ };
292
+ readonly fleets: {
293
+ connection: {
294
+ get: () => Promise<{
295
+ connected: boolean;
296
+ model: string;
297
+ updated_at?: number;
298
+ }>;
299
+ set: (api_key: string) => Promise<{
300
+ connected: boolean;
301
+ model: string;
302
+ updated_at?: number;
303
+ }>;
304
+ delete: () => Promise<{
305
+ connected: boolean;
306
+ model: string;
307
+ updated_at?: number;
308
+ }>;
309
+ };
310
+ tasks: {
311
+ list: (query?: In<"fleets_listTasks">) => Promise<{
312
+ tasks: components["schemas"]["Fleets.Summary"][];
313
+ next_before: string | null;
314
+ }>;
315
+ submit: (body: {
316
+ input: string;
317
+ timeout_seconds?: number;
318
+ idempotency_key?: string;
319
+ }) => Promise<{
320
+ task_id: string;
321
+ status: components["schemas"]["Fleets.Status"];
322
+ submitted_at: string;
323
+ started_at?: string | null;
324
+ completed_at?: string | null;
325
+ }>;
326
+ get: (task_id: string) => Promise<{
327
+ task_id: string;
328
+ status: components["schemas"]["Fleets.Status"];
329
+ submitted_at: string;
330
+ started_at?: string | null;
331
+ completed_at?: string | null;
332
+ }>;
333
+ cancel: (task_id: string) => Promise<{
334
+ task_id: string;
335
+ status: components["schemas"]["Fleets.Status"];
336
+ }>;
337
+ receipt: (task_id: string) => Promise<{
338
+ task_id: string;
339
+ status: components["schemas"]["Fleets.Status"];
340
+ submitted_at: string;
341
+ started_at?: string | null;
342
+ completed_at?: string | null;
343
+ } & {
344
+ tenant: string;
345
+ principal: string;
346
+ idempotency_key: string | null;
347
+ request_fingerprint: string;
348
+ timeout_seconds: number;
349
+ exit_code: number | null;
350
+ exit_signal: number | null;
351
+ cleanup_result: {
352
+ process_group_gone?: boolean;
353
+ workdir_removed?: boolean;
354
+ sigkill_sent?: boolean;
355
+ } | null;
356
+ henry_receipt?: {
357
+ [key: string]: unknown;
358
+ };
359
+ }>;
360
+ };
361
+ };
362
+ readonly runner: Readonly<{
363
+ catalog: (opts?: import("./runner.js").RunnerRequestOptions) => Promise<{
364
+ workspaces: {
365
+ key: components["schemas"]["Runner.SafeOpaqueRef"];
366
+ label: string;
367
+ }[];
368
+ routes: {
369
+ routeId: components["schemas"]["Runner.SafeOpaqueRef"];
370
+ kind: "external-harness" | "internal-model";
371
+ name: string;
372
+ via: string;
373
+ state: "synthetic" | "bound" | "unbound";
374
+ default: boolean;
375
+ }[];
376
+ }>;
377
+ jobs: Readonly<{
378
+ list: (opts?: import("./runner.js").RunnerRequestOptions) => Promise<{
379
+ jobs: components["schemas"]["Runner.Snapshot"][];
380
+ }>;
381
+ start: (input: import("./runner.js").RunnerStartInput, opts?: import("./runner.js").RunnerRequestOptions) => Promise<{
382
+ jobId: components["schemas"]["Runner.SafeOpaqueRef"];
383
+ snapshot: components["schemas"]["Runner.Snapshot"];
384
+ }>;
385
+ get: (jobId: string, opts?: import("./runner.js").RunnerRequestOptions) => Promise<{
386
+ snapshot: components["schemas"]["Runner.Snapshot"];
387
+ }>;
388
+ events: (jobId: string, afterSeq?: number, opts?: import("./runner.js").RunnerRequestOptions) => Promise<{
389
+ events: components["schemas"]["Runner.Event"][];
390
+ nextAfterSeq: number;
391
+ hasMore: boolean;
392
+ }>;
393
+ result: (jobId: string, opts?: import("./runner.js").RunnerRequestOptions) => Promise<{
394
+ result: components["schemas"]["Runner.ProviderResult"];
395
+ }>;
396
+ cancel: (jobId: string, opts?: import("./runner.js").RunnerRequestOptions) => Promise<{
397
+ snapshot: components["schemas"]["Runner.Snapshot"];
398
+ }>;
399
+ }>;
400
+ }>;
401
+ readonly beacons: {
402
+ devices: {
403
+ list: () => Promise<{
404
+ data?: components["schemas"]["Beacons.BridgeDevice"][];
405
+ }>;
406
+ update: (id: string, body: In<"beacons_updateBridgeDevice">["body"]) => Promise<{
407
+ id: string;
408
+ org_id: string;
409
+ name: string;
410
+ nicknames: string[];
411
+ created_at: string;
412
+ status: string;
413
+ }>;
414
+ revoke: (id: string) => Promise<import("./types.js").OperationOutput<"beacons_revokeBridgeDevice"> | undefined>;
415
+ };
416
+ };
417
+ readonly foundry: {
418
+ models: {
419
+ list: () => Promise<{
420
+ [key: string]: unknown;
421
+ }>;
422
+ };
423
+ /** OpenAI-compatible chat completion (non-streaming). */
424
+ chat: (body: {
425
+ model: string;
426
+ messages: ChatMessage[];
427
+ } & Record<string, unknown>) => Promise<{
428
+ id: string;
429
+ model?: string;
430
+ choices: {
431
+ [key: string]: unknown;
432
+ }[];
433
+ usage?: components["schemas"]["Foundry.Usage"];
434
+ foundry?: components["schemas"]["Foundry.RequestMetadata"];
435
+ } & {
436
+ [key: string]: unknown;
437
+ }>;
438
+ /** Streaming chat: yields content deltas parsed from the SSE stream. */
439
+ chatStream: (body: {
440
+ model: string;
441
+ messages: ChatMessage[];
442
+ } & Record<string, unknown>) => AsyncGenerator<string, any, any>;
443
+ embeddings: (body: In<"foundry_createEmbedding">["body"]) => Promise<{
444
+ object?: string;
445
+ model?: string;
446
+ data: {
447
+ [key: string]: unknown;
448
+ }[];
449
+ usage?: components["schemas"]["Foundry.Usage"];
450
+ } & {
451
+ [key: string]: unknown;
452
+ }>;
453
+ registry: {
454
+ models: (q?: In<"foundry_listRegistryModels">) => Promise<{
455
+ [key: string]: unknown;
456
+ }>;
457
+ model: (canonical_model_id: string) => Promise<{
458
+ [key: string]: unknown;
459
+ }>;
460
+ };
461
+ };
462
+ readonly hives: {
463
+ projects: {
464
+ list: (q?: In<"hives_list_projects">) => Promise<{
465
+ data: (Record<string, never> & {
466
+ active_instances: number;
467
+ current_version?: number | null;
468
+ requests_24h: number;
469
+ total_deployments: number;
470
+ })[];
471
+ pagination: components["schemas"]["Hives.PaginationMeta"];
472
+ }>;
473
+ get: (project_id: string) => Promise<Record<string, never> & {
474
+ active_instances: number;
475
+ current_version?: number | null;
476
+ requests_24h: number;
477
+ total_deployments: number;
478
+ }>;
479
+ create: (body: In<"hives_create_project">["body"]) => Promise<Record<string, never> & {
480
+ active_instances: number;
481
+ current_version?: number | null;
482
+ requests_24h: number;
483
+ total_deployments: number;
484
+ }>;
485
+ update: (project_id: string, body: In<"hives_update_project">["body"]) => Promise<Record<string, never> & {
486
+ active_instances: number;
487
+ current_version?: number | null;
488
+ requests_24h: number;
489
+ total_deployments: number;
490
+ }>;
491
+ activity: (project_id: string, q?: Omit<In<"hives_get_project_activity">, "project_id">) => Promise<{
492
+ data: components["schemas"]["Hives.ActivityEntry"][];
493
+ pagination: components["schemas"]["Hives.PaginationMeta"];
494
+ }>;
495
+ delete: (project_id: string) => Promise<{
496
+ id: string;
497
+ message: string;
498
+ success: boolean;
499
+ }>;
500
+ };
501
+ secrets: {
502
+ list: (project_id: string, q?: Omit<In<"hives_list_secrets">, "project_id">) => Promise<{
503
+ data: {
504
+ created_at: string;
505
+ description?: string | null;
506
+ name: string;
507
+ updated_at: string;
508
+ version: number;
509
+ }[];
510
+ pagination: components["schemas"]["Hives.PaginationMeta"];
511
+ }>;
512
+ get: (project_id: string, secret_id: string) => Promise<{
513
+ id: string;
514
+ created_at: string;
515
+ description?: string | null;
516
+ name: string;
517
+ updated_at: string;
518
+ version: number;
519
+ }>;
520
+ create: (project_id: string, body: In<"hives_create_secret">["body"]) => Promise<{
521
+ id: string;
522
+ created_at: string;
523
+ description?: string | null;
524
+ name: string;
525
+ updated_at: string;
526
+ version: number;
527
+ }>;
528
+ update: (project_id: string, secret_id: string, body: In<"hives_update_secret">["body"]) => Promise<{
529
+ id: string;
530
+ created_at: string;
531
+ description?: string | null;
532
+ name: string;
533
+ updated_at: string;
534
+ version: number;
535
+ }>;
536
+ delete: (project_id: string, secret_id: string) => Promise<{
537
+ id: string;
538
+ message: string;
539
+ success: boolean;
540
+ }>;
541
+ /** Explicit sensitive operation. Do not log or retain the returned plaintext. */
542
+ reveal: (project_id: string, secret_id: string) => Promise<{
543
+ value: string;
544
+ }>;
545
+ bulkUpsert: (project_id: string, body: In<"hives_bulk_upsert_secrets">["body"]) => Promise<{
546
+ success: boolean;
547
+ secrets: components["schemas"]["Hives.SecretResponse"][];
548
+ }>;
549
+ };
550
+ deployments: {
551
+ list: (project_id: string, q?: Omit<In<"hives_list_deployments">, "project_id">) => Promise<{
552
+ data: (Record<string, never> & {
553
+ logs_url?: string | null;
554
+ url?: string | null;
555
+ })[];
556
+ pagination: components["schemas"]["Hives.PaginationMeta"];
557
+ }>;
558
+ get: (project_id: string, deployment_id: string) => Promise<{
559
+ id: string;
560
+ project_id: string;
561
+ tenant_id: string;
562
+ module_id: string;
563
+ module_hash?: string | null;
564
+ version: number;
565
+ status: string;
566
+ git_sha?: string | null;
567
+ git_branch?: string | null;
568
+ created_by: string;
569
+ created_at: string;
570
+ promoted_at?: string | null;
571
+ logs_url?: string | null;
572
+ url?: string | null;
573
+ }>;
574
+ upload: (project_id: string, file: Blob, options?: HivesUploadOptions) => Promise<{
575
+ id: string;
576
+ project_id: string;
577
+ tenant_id: string;
578
+ module_id: string;
579
+ module_hash?: string | null;
580
+ version: number;
581
+ status: string;
582
+ git_sha?: string | null;
583
+ git_branch?: string | null;
584
+ created_by: string;
585
+ created_at: string;
586
+ promoted_at?: string | null;
587
+ logs_url?: string | null;
588
+ url?: string | null;
589
+ }>;
590
+ create: (project_id: string, body: In<"hives_create_deployment">["body"]) => Promise<{
591
+ id: string;
592
+ project_id: string;
593
+ tenant_id: string;
594
+ module_id: string;
595
+ module_hash?: string | null;
596
+ version: number;
597
+ status: string;
598
+ git_sha?: string | null;
599
+ git_branch?: string | null;
600
+ created_by: string;
601
+ created_at: string;
602
+ promoted_at?: string | null;
603
+ logs_url?: string | null;
604
+ url?: string | null;
605
+ }>;
606
+ promote: (project_id: string, deployment_id: string) => Promise<{
607
+ id: string;
608
+ project_id: string;
609
+ tenant_id: string;
610
+ module_id: string;
611
+ module_hash?: string | null;
612
+ version: number;
613
+ status: string;
614
+ git_sha?: string | null;
615
+ git_branch?: string | null;
616
+ created_by: string;
617
+ created_at: string;
618
+ promoted_at?: string | null;
619
+ logs_url?: string | null;
620
+ url?: string | null;
621
+ }>;
622
+ rollback: (project_id: string, deployment_id: string, body?: In<"hives_rollback_deployment">["body"]) => Promise<{
623
+ id: string;
624
+ project_id: string;
625
+ tenant_id: string;
626
+ module_id: string;
627
+ module_hash?: string | null;
628
+ version: number;
629
+ status: string;
630
+ git_sha?: string | null;
631
+ git_branch?: string | null;
632
+ created_by: string;
633
+ created_at: string;
634
+ promoted_at?: string | null;
635
+ logs_url?: string | null;
636
+ url?: string | null;
637
+ }>;
638
+ cancel: (project_id: string, deployment_id: string) => Promise<{
639
+ id: string;
640
+ project_id: string;
641
+ tenant_id: string;
642
+ module_id: string;
643
+ module_hash?: string | null;
644
+ version: number;
645
+ status: string;
646
+ git_sha?: string | null;
647
+ git_branch?: string | null;
648
+ created_by: string;
649
+ created_at: string;
650
+ promoted_at?: string | null;
651
+ logs_url?: string | null;
652
+ url?: string | null;
653
+ }>;
654
+ delete: (project_id: string, deployment_id: string) => Promise<{
655
+ id: string;
656
+ message: string;
657
+ success: boolean;
658
+ }>;
659
+ logs: (project_id: string, deployment_id: string, q?: Omit<In<"hives_query_deployment_logs">, "project_id" | "deployment_id">) => Promise<{
660
+ logs: components["schemas"]["Hives.LogEntry"][];
661
+ pagination: components["schemas"]["Hives.PaginationMeta"];
662
+ time_range: components["schemas"]["Hives.TimeRange"];
663
+ }>;
664
+ invoke: (project_id: string, deployment_id: string, body?: In<"hives_invoke_deployment">["body"], init?: {
665
+ signal?: AbortSignal;
666
+ }) => Promise<Response>;
667
+ };
668
+ functions: {
669
+ list: (project_id: string, q?: Omit<In<"hives_list_functions">, "project_id">) => Promise<{
670
+ data: components["schemas"]["Hives.FunctionResponse"][];
671
+ pagination: components["schemas"]["Hives.PaginationMeta"];
672
+ }>;
673
+ get: (project_id: string, function_id: string) => Promise<{
674
+ id: string;
675
+ tenant_id: string;
676
+ project_id: string;
677
+ name: string;
678
+ description?: string | null;
679
+ handler: string;
680
+ route?: string | null;
681
+ memory_mb: number;
682
+ timeout_ms: number;
683
+ status: string;
684
+ invocations: number;
685
+ avg_duration_ms: number;
686
+ created_at: string;
687
+ updated_at: string;
688
+ }>;
689
+ create: (project_id: string, body: In<"hives_create_function">["body"]) => Promise<{
690
+ id: string;
691
+ tenant_id: string;
692
+ project_id: string;
693
+ name: string;
694
+ description?: string | null;
695
+ handler: string;
696
+ route?: string | null;
697
+ memory_mb: number;
698
+ timeout_ms: number;
699
+ status: string;
700
+ invocations: number;
701
+ avg_duration_ms: number;
702
+ created_at: string;
703
+ updated_at: string;
704
+ }>;
705
+ update: (project_id: string, function_id: string, body: In<"hives_update_function">["body"]) => Promise<{
706
+ id: string;
707
+ tenant_id: string;
708
+ project_id: string;
709
+ name: string;
710
+ description?: string | null;
711
+ handler: string;
712
+ route?: string | null;
713
+ memory_mb: number;
714
+ timeout_ms: number;
715
+ status: string;
716
+ invocations: number;
717
+ avg_duration_ms: number;
718
+ created_at: string;
719
+ updated_at: string;
720
+ }>;
721
+ delete: (project_id: string, function_id: string) => Promise<{
722
+ id: string;
723
+ message: string;
724
+ success: boolean;
725
+ }>;
726
+ /** Completed raw guest response; parse text/JSON/bytes explicitly. Never follows redirects. */
727
+ invoke: (project_id: string, function_id: string, body?: In<"hives_invoke_function">["body"], init?: {
728
+ signal?: AbortSignal;
729
+ }) => Promise<Response>;
730
+ };
731
+ regions: {
732
+ list: () => Promise<{
733
+ regions: components["schemas"]["Hives.Region"][];
734
+ }>;
735
+ };
736
+ };
737
+ readonly relays: {
738
+ zones: {
739
+ list: (q?: In<"relays_listZones">) => Promise<{
740
+ zones?: components["schemas"]["Relays.Zone"][];
741
+ meta?: components["schemas"]["Relays.Meta"];
742
+ }>;
743
+ get: (zone: string) => Promise<{
744
+ id?: number;
745
+ name?: string;
746
+ type?: "NATIVE" | "MASTER" | "SLAVE";
747
+ record_count?: number;
748
+ dnssec_enabled?: boolean;
749
+ status?: string;
750
+ serial?: number;
751
+ nameservers?: string[];
752
+ soa?: {
753
+ [key: string]: unknown;
754
+ };
755
+ created_at?: string;
756
+ updated_at?: string;
757
+ }>;
758
+ create: (body: S["Relays.CreateZone"]) => Promise<{
759
+ id?: number;
760
+ name?: string;
761
+ type?: "NATIVE" | "MASTER" | "SLAVE";
762
+ record_count?: number;
763
+ dnssec_enabled?: boolean;
764
+ status?: string;
765
+ serial?: number;
766
+ nameservers?: string[];
767
+ soa?: {
768
+ [key: string]: unknown;
769
+ };
770
+ created_at?: string;
771
+ updated_at?: string;
772
+ }>;
773
+ delete: (zone: string) => Promise<{
774
+ success?: boolean;
775
+ message?: string;
776
+ }>;
777
+ };
778
+ records: {
779
+ list: (zone: string, q?: Omit<In<"relays_listRecords">, "zone">) => Promise<{
780
+ zone?: string;
781
+ records?: components["schemas"]["Relays.Record"][];
782
+ meta?: components["schemas"]["Relays.Meta"];
783
+ }>;
784
+ create: (zone: string, body: S["Relays.RecordInput"]) => Promise<{
785
+ [key: string]: unknown;
786
+ }>;
787
+ update: (zone: string, recordId: number, body: S["Relays.RecordPatch"]) => Promise<{
788
+ name: string;
789
+ type: string;
790
+ content: string;
791
+ ttl?: number;
792
+ priority?: number;
793
+ disabled?: boolean;
794
+ comment?: string;
795
+ tags?: string[];
796
+ } & {
797
+ id?: number;
798
+ zone?: string;
799
+ created_at?: string;
800
+ updated_at?: string;
801
+ }>;
802
+ delete: (zone: string, recordId: number) => Promise<{
803
+ success?: boolean;
804
+ message?: string;
805
+ }>;
806
+ };
807
+ };
808
+ /** LifeID org API keys (WorkOS). custody 'blinds' = key goes straight to Blinds, never shown. */
809
+ readonly keys: {
810
+ list: (org_id: string) => Promise<{
811
+ object: "list";
812
+ data: components["schemas"]["Iam.ApiKeyMetadata"][];
813
+ }>;
814
+ create: (org_id: string, body: S["Iam.CreateApiKeyRequest"]) => Promise<{
815
+ id: string;
816
+ name: string;
817
+ obfuscated_value: string;
818
+ value?: string | null;
819
+ blinds_credential_ref?: string | null;
820
+ scopes: string[];
821
+ expires_at?: string | null;
822
+ created_at: string;
823
+ }>;
824
+ revoke: (key_id: string) => Promise<void>;
825
+ };
826
+ /** Who is this credential? (LifeID verify: org, principal, scopes, kind) */
827
+ whoami(): Promise<S['Iam.VerifiedPrincipal']>;
828
+ private streamChat;
829
+ }
830
+ export {};