@metorial-services/shuttle-client 1.0.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.
@@ -0,0 +1,5100 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ import { InitializeResult, JSONRPCMessage } from '@modelcontextprotocol/sdk/types.js';
4
+ import * as Cookie from 'cookie';
5
+
6
+ export interface ClientOpts {
7
+ endpoint: string;
8
+ headers?: Record<string, string | undefined>;
9
+ getHeaders?: () => Promise<Record<string, string>> | Record<string, string>;
10
+ onRequest?: (d: {
11
+ endpoint: string;
12
+ name: string;
13
+ payload: any;
14
+ headers: Record<string, string | undefined>;
15
+ query?: Record<string, string | undefined>;
16
+ }) => any;
17
+ }
18
+ export interface ValidationError {
19
+ code: string;
20
+ message: string;
21
+ expected?: any;
22
+ received?: any;
23
+ path?: string[];
24
+ min?: number;
25
+ max?: number;
26
+ positive?: boolean;
27
+ negative?: boolean;
28
+ }
29
+ export type ValidationResult<T> = {
30
+ success: true;
31
+ value: T;
32
+ } | {
33
+ success: false;
34
+ errors: ValidationError[];
35
+ };
36
+ export type ValidationType<T> = {
37
+ validate: (value: any) => ValidationResult<T>;
38
+ examples?: T[];
39
+ items?: ValidationType<any> | ValidationType<any>[];
40
+ properties?: {
41
+ [key: string]: ValidationType<any>;
42
+ };
43
+ type: string;
44
+ name?: string;
45
+ description?: string;
46
+ optional?: boolean;
47
+ nullable?: boolean;
48
+ hidden?: boolean;
49
+ };
50
+ export type KeysWhichExtend<T, SelectedType> = {
51
+ [key in keyof T]: SelectedType extends T[key] ? key : never;
52
+ }[keyof T];
53
+ export type Optional<T> = Partial<Pick<T, KeysWhichExtend<T, undefined>>>;
54
+ type Required$1<T> = Omit<T, KeysWhichExtend<T, undefined>>;
55
+ export type UndefinedIsOptional<T> = Optional<T> & Required$1<T>;
56
+ export interface ServiceRequest {
57
+ query: URLSearchParams;
58
+ headers: Headers;
59
+ url: string;
60
+ ip?: string;
61
+ body: any;
62
+ rawBody: any;
63
+ requestId: string;
64
+ getCookies: () => Record<string, string | undefined>;
65
+ getCookie: (name: string) => string | undefined;
66
+ setCookie: (name: string, value: string, opts?: Cookie.SerializeOptions) => void;
67
+ sharedMiddlewareMemo: Map<string, Promise<any>>;
68
+ beforeSend: (handler: () => Promise<any>) => void;
69
+ appendHeaders: (headers: Record<string, string | string[]>) => void;
70
+ }
71
+ export type Simplify<T> = {
72
+ [KeyType in keyof T]: T[KeyType];
73
+ } & {};
74
+ export type ExtendContext<C extends object, E> = E extends object ? Simplify<C & E> : C;
75
+ export type Controller<HandlersAndSubControllers extends {
76
+ [key: string]: Handler<any, any, any> | Controller<any>;
77
+ }> = HandlersAndSubControllers;
78
+ export type InferClient<HandlersAndSubControllers extends {
79
+ [key: string]: Handler<any, any, any> | Controller<any>;
80
+ }> = {
81
+ [K in keyof HandlersAndSubControllers]: HandlersAndSubControllers[K] extends Handler<infer I, infer O, infer C> ? ((input: I, opts?: {
82
+ headers?: Record<string, string>;
83
+ query?: Record<string, string>;
84
+ }) => Promise<O>) & {
85
+ getFull: (input: I, opts?: {
86
+ headers?: Record<string, string>;
87
+ query?: Record<string, string>;
88
+ }) => Promise<{
89
+ data: O;
90
+ status: number;
91
+ headers: Record<string, string>;
92
+ }>;
93
+ } : HandlersAndSubControllers[K] extends Controller<infer U> ? InferClient<U> : never;
94
+ };
95
+ declare class Handler<Input, Output, Context extends {
96
+ [key: string]: any;
97
+ } = {}> {
98
+ private _middleware;
99
+ private _handler;
100
+ private _validation;
101
+ constructor(_middleware?: Array<(ctx: Context & ServiceRequest) => Promise<any>>);
102
+ do<HandlerOutput>(handler: (ctx: Context & Omit<ServiceRequest, "body"> & {
103
+ input: Input;
104
+ }) => Promise<HandlerOutput>): Handler<Input, HandlerOutput, Context>;
105
+ use<T extends {
106
+ [key: string]: any;
107
+ } = {}>(handler: (ctx: Context & ServiceRequest) => Promise<T | undefined | void>): Handler<Input, Output, ExtendContext<Context, T>>;
108
+ input<HandlerInput>(validation: ValidationType<HandlerInput>): Handler<HandlerInput, Output, Context>;
109
+ run(req: ServiceRequest, initialContext: any): Promise<{
110
+ response: Output;
111
+ }>;
112
+ }
113
+ declare const ChangeNotificationType: {
114
+ readonly public_server_version_created: "public_server_version_created";
115
+ readonly private_server_version_created: "private_server_version_created";
116
+ };
117
+ export type ChangeNotificationType = (typeof ChangeNotificationType)[keyof typeof ChangeNotificationType];
118
+ declare const ContainerRegistryType: {
119
+ readonly docker: "docker";
120
+ };
121
+ export type ContainerRegistryType = (typeof ContainerRegistryType)[keyof typeof ContainerRegistryType];
122
+ declare const ContainerRepositoryType: {
123
+ readonly docker: "docker";
124
+ };
125
+ export type ContainerRepositoryType = (typeof ContainerRepositoryType)[keyof typeof ContainerRepositoryType];
126
+ declare const ContainerRepositoryTagDiscoveryStatus: {
127
+ readonly pending: "pending";
128
+ readonly succeeded: "succeeded";
129
+ readonly failed: "failed";
130
+ };
131
+ export type ContainerRepositoryTagDiscoveryStatus = (typeof ContainerRepositoryTagDiscoveryStatus)[keyof typeof ContainerRepositoryTagDiscoveryStatus];
132
+ declare const ContainerRepositoryTagType: {
133
+ readonly tag: "tag";
134
+ readonly digest: "digest";
135
+ };
136
+ export type ContainerRepositoryTagType = (typeof ContainerRepositoryTagType)[keyof typeof ContainerRepositoryTagType];
137
+ declare const ServerDeploymentStatus: {
138
+ readonly queued: "queued";
139
+ readonly deploying: "deploying";
140
+ readonly succeeded: "succeeded";
141
+ readonly failed: "failed";
142
+ };
143
+ export type ServerDeploymentStatus = (typeof ServerDeploymentStatus)[keyof typeof ServerDeploymentStatus];
144
+ declare const ServerDeploymentStepType: {
145
+ readonly started: "started";
146
+ readonly discovering: "discovering";
147
+ readonly deploying: "deploying";
148
+ readonly publishing: "publishing";
149
+ };
150
+ export type ServerDeploymentStepType = (typeof ServerDeploymentStepType)[keyof typeof ServerDeploymentStepType];
151
+ declare const ServerDeploymentStepStatus: {
152
+ readonly running: "running";
153
+ readonly succeeded: "succeeded";
154
+ readonly failed: "failed";
155
+ };
156
+ export type ServerDeploymentStepStatus = (typeof ServerDeploymentStepStatus)[keyof typeof ServerDeploymentStepStatus];
157
+ declare const ServerDiscoveryStatus: {
158
+ readonly pending: "pending";
159
+ readonly succeeded: "succeeded";
160
+ readonly failed: "failed";
161
+ };
162
+ export type ServerDiscoveryStatus = (typeof ServerDiscoveryStatus)[keyof typeof ServerDiscoveryStatus];
163
+ declare const FunctionServerStatus: {
164
+ readonly pending: "pending";
165
+ readonly succeeded: "succeeded";
166
+ readonly failed: "failed";
167
+ };
168
+ export type FunctionServerStatus = (typeof FunctionServerStatus)[keyof typeof FunctionServerStatus];
169
+ declare const ServerAuthConfigType: {
170
+ readonly remote: "remote";
171
+ readonly delegated: "delegated";
172
+ };
173
+ export type ServerAuthConfigType = (typeof ServerAuthConfigType)[keyof typeof ServerAuthConfigType];
174
+ declare const ServerConnectionStatus: {
175
+ readonly new: "new";
176
+ readonly connected: "connected";
177
+ readonly disconnected: "disconnected";
178
+ };
179
+ export type ServerConnectionStatus = (typeof ServerConnectionStatus)[keyof typeof ServerConnectionStatus];
180
+ declare const NetworkingRuleStatus: {
181
+ readonly active: "active";
182
+ readonly inactive: "inactive";
183
+ };
184
+ export type NetworkingRuleStatus = (typeof NetworkingRuleStatus)[keyof typeof NetworkingRuleStatus];
185
+ declare const ServerOAuthCredentialsType: {
186
+ readonly remote: "remote";
187
+ readonly delegated: "delegated";
188
+ };
189
+ export type ServerOAuthCredentialsType = (typeof ServerOAuthCredentialsType)[keyof typeof ServerOAuthCredentialsType];
190
+ declare const ServerOAuthSetupType: {
191
+ readonly remote: "remote";
192
+ readonly delegated: "delegated";
193
+ };
194
+ export type ServerOAuthSetupType = (typeof ServerOAuthSetupType)[keyof typeof ServerOAuthSetupType];
195
+ declare const ServerOAuthSetupStatus: {
196
+ readonly pending: "pending";
197
+ readonly completed: "completed";
198
+ readonly failed: "failed";
199
+ };
200
+ export type ServerOAuthSetupStatus = (typeof ServerOAuthSetupStatus)[keyof typeof ServerOAuthSetupStatus];
201
+ declare const DelegatedOAuthConnectionStatus: {
202
+ readonly active: "active";
203
+ readonly inactive: "inactive";
204
+ };
205
+ export type DelegatedOAuthConnectionStatus = (typeof DelegatedOAuthConnectionStatus)[keyof typeof DelegatedOAuthConnectionStatus];
206
+ declare const DelegatedOAuthConnectionAuthTokenSource: {
207
+ readonly import: "import";
208
+ readonly oauth: "oauth";
209
+ };
210
+ export type DelegatedOAuthConnectionAuthTokenSource = (typeof DelegatedOAuthConnectionAuthTokenSource)[keyof typeof DelegatedOAuthConnectionAuthTokenSource];
211
+ declare const RemoteOAuthConfigDiscoveryStatus: {
212
+ readonly discovering: "discovering";
213
+ readonly failed: "failed";
214
+ readonly manual: "manual";
215
+ readonly supports_auto_registration: "supports_auto_registration";
216
+ };
217
+ export type RemoteOAuthConfigDiscoveryStatus = (typeof RemoteOAuthConfigDiscoveryStatus)[keyof typeof RemoteOAuthConfigDiscoveryStatus];
218
+ declare const RemoteOAuthConnectionStatus: {
219
+ readonly active: "active";
220
+ readonly inactive: "inactive";
221
+ };
222
+ export type RemoteOAuthConnectionStatus = (typeof RemoteOAuthConnectionStatus)[keyof typeof RemoteOAuthConnectionStatus];
223
+ declare const RemoteOAuthConnectionDiscoveryStatus: {
224
+ readonly discovering: "discovering";
225
+ readonly failed: "failed";
226
+ readonly succeeded: "succeeded";
227
+ };
228
+ export type RemoteOAuthConnectionDiscoveryStatus = (typeof RemoteOAuthConnectionDiscoveryStatus)[keyof typeof RemoteOAuthConnectionDiscoveryStatus];
229
+ declare const RemoteOAuthConnectionAuthTokenSource: {
230
+ readonly import: "import";
231
+ readonly oauth: "oauth";
232
+ };
233
+ export type RemoteOAuthConnectionAuthTokenSource = (typeof RemoteOAuthConnectionAuthTokenSource)[keyof typeof RemoteOAuthConnectionAuthTokenSource];
234
+ declare const ServerType: {
235
+ readonly container: "container";
236
+ readonly remote: "remote";
237
+ readonly function: "function";
238
+ };
239
+ export type ServerType = (typeof ServerType)[keyof typeof ServerType];
240
+ declare const ServerRemoteProtocol: {
241
+ readonly sse: "sse";
242
+ readonly streamable_http: "streamable_http";
243
+ };
244
+ export type ServerRemoteProtocol = (typeof ServerRemoteProtocol)[keyof typeof ServerRemoteProtocol];
245
+ export declare let createShuttleClient: (o: ClientOpts) => InferClient<{
246
+ tenant: {
247
+ upsert: Handler<UndefinedIsOptional<{
248
+ name: string;
249
+ identifier: string;
250
+ }>, {
251
+ object: string;
252
+ id: string;
253
+ identifier: string;
254
+ name: string;
255
+ createdAt: Date;
256
+ }, {}>;
257
+ get: Handler<UndefinedIsOptional<{
258
+ tenantId: string;
259
+ }>, {
260
+ object: string;
261
+ id: string;
262
+ identifier: string;
263
+ name: string;
264
+ createdAt: Date;
265
+ }, {
266
+ tenant: {
267
+ name: string;
268
+ oid: bigint;
269
+ id: string;
270
+ createdAt: Date;
271
+ identifier: string;
272
+ functionBayTenantId: string | null;
273
+ };
274
+ }>;
275
+ };
276
+ containerRegistry: {
277
+ list: Handler<Partial<Pick<{
278
+ tenantId: string;
279
+ }, never>> & {
280
+ tenantId: string;
281
+ } & {
282
+ limit?: number;
283
+ after?: string;
284
+ before?: string;
285
+ cursor?: string;
286
+ order?: "asc" | "desc";
287
+ }, {
288
+ __typename: string;
289
+ items: {
290
+ object: string;
291
+ id: string;
292
+ type: "docker";
293
+ name: string;
294
+ url: string;
295
+ tenantId: string | undefined;
296
+ createdAt: Date;
297
+ }[];
298
+ pagination: {
299
+ has_more_after: boolean;
300
+ has_more_before: boolean;
301
+ };
302
+ }, {
303
+ tenant: {
304
+ name: string;
305
+ oid: bigint;
306
+ id: string;
307
+ createdAt: Date;
308
+ identifier: string;
309
+ functionBayTenantId: string | null;
310
+ };
311
+ }>;
312
+ get: Handler<UndefinedIsOptional<{
313
+ tenantId: string;
314
+ registryId: string;
315
+ }>, {
316
+ object: string;
317
+ id: string;
318
+ type: "docker";
319
+ name: string;
320
+ url: string;
321
+ tenantId: string | undefined;
322
+ createdAt: Date;
323
+ }, {
324
+ tenant: {
325
+ name: string;
326
+ oid: bigint;
327
+ id: string;
328
+ createdAt: Date;
329
+ identifier: string;
330
+ functionBayTenantId: string | null;
331
+ };
332
+ registry: {
333
+ tenant: {
334
+ name: string;
335
+ oid: bigint;
336
+ id: string;
337
+ createdAt: Date;
338
+ identifier: string;
339
+ functionBayTenantId: string | null;
340
+ } | null;
341
+ } & {
342
+ name: string;
343
+ oid: bigint;
344
+ id: string;
345
+ type: ContainerRegistryType;
346
+ createdAt: Date;
347
+ tenantOid: bigint | null;
348
+ updatedAt: Date;
349
+ identifier: string;
350
+ url: string;
351
+ secretOid: bigint | null;
352
+ };
353
+ }>;
354
+ };
355
+ containerRepository: {
356
+ list: Handler<Partial<Pick<{
357
+ tenantId: string;
358
+ }, never>> & {
359
+ tenantId: string;
360
+ } & {
361
+ limit?: number;
362
+ after?: string;
363
+ before?: string;
364
+ cursor?: string;
365
+ order?: "asc" | "desc";
366
+ }, {
367
+ __typename: string;
368
+ items: {
369
+ object: string;
370
+ id: string;
371
+ type: "docker";
372
+ name: string;
373
+ registry: {
374
+ object: string;
375
+ id: string;
376
+ type: "docker";
377
+ name: string;
378
+ url: string;
379
+ tenantId: string | undefined;
380
+ createdAt: Date;
381
+ };
382
+ tenantId: string | undefined;
383
+ createdAt: Date;
384
+ }[];
385
+ pagination: {
386
+ has_more_after: boolean;
387
+ has_more_before: boolean;
388
+ };
389
+ }, {
390
+ tenant: {
391
+ name: string;
392
+ oid: bigint;
393
+ id: string;
394
+ createdAt: Date;
395
+ identifier: string;
396
+ functionBayTenantId: string | null;
397
+ };
398
+ }>;
399
+ get: Handler<UndefinedIsOptional<{
400
+ tenantId: string;
401
+ repositoryId: string;
402
+ }>, {
403
+ object: string;
404
+ id: string;
405
+ type: "docker";
406
+ name: string;
407
+ registry: {
408
+ object: string;
409
+ id: string;
410
+ type: "docker";
411
+ name: string;
412
+ url: string;
413
+ tenantId: string | undefined;
414
+ createdAt: Date;
415
+ };
416
+ tenantId: string | undefined;
417
+ createdAt: Date;
418
+ }, {
419
+ tenant: {
420
+ name: string;
421
+ oid: bigint;
422
+ id: string;
423
+ createdAt: Date;
424
+ identifier: string;
425
+ functionBayTenantId: string | null;
426
+ };
427
+ repository: {
428
+ tenant: {
429
+ name: string;
430
+ oid: bigint;
431
+ id: string;
432
+ createdAt: Date;
433
+ identifier: string;
434
+ functionBayTenantId: string | null;
435
+ } | null;
436
+ registry: {
437
+ name: string;
438
+ oid: bigint;
439
+ id: string;
440
+ type: ContainerRegistryType;
441
+ createdAt: Date;
442
+ tenantOid: bigint | null;
443
+ updatedAt: Date;
444
+ identifier: string;
445
+ url: string;
446
+ secretOid: bigint | null;
447
+ };
448
+ } & {
449
+ name: string;
450
+ oid: bigint;
451
+ id: string;
452
+ type: ContainerRepositoryType;
453
+ createdAt: Date;
454
+ tenantOid: bigint | null;
455
+ updatedAt: Date;
456
+ identifier: string;
457
+ registryOid: bigint;
458
+ registryConnectionOid: bigint | null;
459
+ };
460
+ }>;
461
+ };
462
+ containerRepositoryTag: {
463
+ list: Handler<Partial<Pick<{
464
+ tenantId: string;
465
+ }, never>> & {
466
+ tenantId: string;
467
+ } & {
468
+ limit?: number;
469
+ after?: string;
470
+ before?: string;
471
+ cursor?: string;
472
+ order?: "asc" | "desc";
473
+ }, {
474
+ __typename: string;
475
+ items: {
476
+ object: string;
477
+ id: string;
478
+ type: ContainerRepositoryTagType;
479
+ name: string;
480
+ repository: {
481
+ object: string;
482
+ id: string;
483
+ type: "docker";
484
+ name: string;
485
+ registry: {
486
+ object: string;
487
+ id: string;
488
+ type: "docker";
489
+ name: string;
490
+ url: string;
491
+ tenantId: string | undefined;
492
+ createdAt: Date;
493
+ };
494
+ tenantId: string | undefined;
495
+ createdAt: Date;
496
+ };
497
+ currentVersion: {
498
+ object: string;
499
+ id: string;
500
+ digest: string;
501
+ repository: {
502
+ object: string;
503
+ id: string;
504
+ type: "docker";
505
+ name: string;
506
+ registry: {
507
+ object: string;
508
+ id: string;
509
+ type: "docker";
510
+ name: string;
511
+ url: string;
512
+ tenantId: string | undefined;
513
+ createdAt: Date;
514
+ };
515
+ tenantId: string | undefined;
516
+ createdAt: Date;
517
+ };
518
+ tenantId: string | undefined;
519
+ createdAt: Date;
520
+ } | null;
521
+ tenantId: string | undefined;
522
+ createdAt: Date;
523
+ }[];
524
+ pagination: {
525
+ has_more_after: boolean;
526
+ has_more_before: boolean;
527
+ };
528
+ }, {
529
+ tenant: {
530
+ name: string;
531
+ oid: bigint;
532
+ id: string;
533
+ createdAt: Date;
534
+ identifier: string;
535
+ functionBayTenantId: string | null;
536
+ };
537
+ }>;
538
+ get: Handler<UndefinedIsOptional<{
539
+ tenantId: string;
540
+ repositoryTagId: string;
541
+ }>, {
542
+ object: string;
543
+ id: string;
544
+ type: ContainerRepositoryTagType;
545
+ name: string;
546
+ repository: {
547
+ object: string;
548
+ id: string;
549
+ type: "docker";
550
+ name: string;
551
+ registry: {
552
+ object: string;
553
+ id: string;
554
+ type: "docker";
555
+ name: string;
556
+ url: string;
557
+ tenantId: string | undefined;
558
+ createdAt: Date;
559
+ };
560
+ tenantId: string | undefined;
561
+ createdAt: Date;
562
+ };
563
+ currentVersion: {
564
+ object: string;
565
+ id: string;
566
+ digest: string;
567
+ repository: {
568
+ object: string;
569
+ id: string;
570
+ type: "docker";
571
+ name: string;
572
+ registry: {
573
+ object: string;
574
+ id: string;
575
+ type: "docker";
576
+ name: string;
577
+ url: string;
578
+ tenantId: string | undefined;
579
+ createdAt: Date;
580
+ };
581
+ tenantId: string | undefined;
582
+ createdAt: Date;
583
+ };
584
+ tenantId: string | undefined;
585
+ createdAt: Date;
586
+ } | null;
587
+ tenantId: string | undefined;
588
+ createdAt: Date;
589
+ }, {
590
+ tenant: {
591
+ name: string;
592
+ oid: bigint;
593
+ id: string;
594
+ createdAt: Date;
595
+ identifier: string;
596
+ functionBayTenantId: string | null;
597
+ };
598
+ repositoryTag: {
599
+ tenant: {
600
+ name: string;
601
+ oid: bigint;
602
+ id: string;
603
+ createdAt: Date;
604
+ identifier: string;
605
+ functionBayTenantId: string | null;
606
+ } | null;
607
+ repository: {
608
+ registry: {
609
+ name: string;
610
+ oid: bigint;
611
+ id: string;
612
+ type: ContainerRegistryType;
613
+ createdAt: Date;
614
+ tenantOid: bigint | null;
615
+ updatedAt: Date;
616
+ identifier: string;
617
+ url: string;
618
+ secretOid: bigint | null;
619
+ };
620
+ } & {
621
+ name: string;
622
+ oid: bigint;
623
+ id: string;
624
+ type: ContainerRepositoryType;
625
+ createdAt: Date;
626
+ tenantOid: bigint | null;
627
+ updatedAt: Date;
628
+ identifier: string;
629
+ registryOid: bigint;
630
+ registryConnectionOid: bigint | null;
631
+ };
632
+ currentVersion: {
633
+ oid: bigint;
634
+ id: string;
635
+ createdAt: Date;
636
+ tenantOid: bigint | null;
637
+ digest: string;
638
+ repositoryOid: bigint;
639
+ } | null;
640
+ } & {
641
+ name: string;
642
+ oid: bigint;
643
+ id: string;
644
+ type: ContainerRepositoryTagType;
645
+ createdAt: Date;
646
+ tenantOid: bigint | null;
647
+ currentVersionOid: bigint | null;
648
+ updatedAt: Date;
649
+ identifier: string;
650
+ digest: string | null;
651
+ repositoryOid: bigint;
652
+ discoveryStatus: ContainerRepositoryTagDiscoveryStatus;
653
+ tag: string | null;
654
+ lastDiscoveryErrorOid: bigint | null;
655
+ lastSyncedAt: Date | null;
656
+ };
657
+ }>;
658
+ };
659
+ containerRepositoryVersion: {
660
+ list: Handler<Partial<Pick<{
661
+ tenantId: string;
662
+ }, never>> & {
663
+ tenantId: string;
664
+ } & {
665
+ limit?: number;
666
+ after?: string;
667
+ before?: string;
668
+ cursor?: string;
669
+ order?: "asc" | "desc";
670
+ }, {
671
+ __typename: string;
672
+ items: {
673
+ object: string;
674
+ id: string;
675
+ digest: string;
676
+ repository: {
677
+ object: string;
678
+ id: string;
679
+ type: "docker";
680
+ name: string;
681
+ registry: {
682
+ object: string;
683
+ id: string;
684
+ type: "docker";
685
+ name: string;
686
+ url: string;
687
+ tenantId: string | undefined;
688
+ createdAt: Date;
689
+ };
690
+ tenantId: string | undefined;
691
+ createdAt: Date;
692
+ };
693
+ tenantId: string | undefined;
694
+ createdAt: Date;
695
+ }[];
696
+ pagination: {
697
+ has_more_after: boolean;
698
+ has_more_before: boolean;
699
+ };
700
+ }, {
701
+ tenant: {
702
+ name: string;
703
+ oid: bigint;
704
+ id: string;
705
+ createdAt: Date;
706
+ identifier: string;
707
+ functionBayTenantId: string | null;
708
+ };
709
+ }>;
710
+ get: Handler<UndefinedIsOptional<{
711
+ tenantId: string;
712
+ repositoryVersionId: string;
713
+ }>, {
714
+ object: string;
715
+ id: string;
716
+ digest: string;
717
+ repository: {
718
+ object: string;
719
+ id: string;
720
+ type: "docker";
721
+ name: string;
722
+ registry: {
723
+ object: string;
724
+ id: string;
725
+ type: "docker";
726
+ name: string;
727
+ url: string;
728
+ tenantId: string | undefined;
729
+ createdAt: Date;
730
+ };
731
+ tenantId: string | undefined;
732
+ createdAt: Date;
733
+ };
734
+ tenantId: string | undefined;
735
+ createdAt: Date;
736
+ }, {
737
+ tenant: {
738
+ name: string;
739
+ oid: bigint;
740
+ id: string;
741
+ createdAt: Date;
742
+ identifier: string;
743
+ functionBayTenantId: string | null;
744
+ };
745
+ repositoryVersion: {
746
+ tenant: {
747
+ name: string;
748
+ oid: bigint;
749
+ id: string;
750
+ createdAt: Date;
751
+ identifier: string;
752
+ functionBayTenantId: string | null;
753
+ } | null;
754
+ repository: {
755
+ registry: {
756
+ name: string;
757
+ oid: bigint;
758
+ id: string;
759
+ type: ContainerRegistryType;
760
+ createdAt: Date;
761
+ tenantOid: bigint | null;
762
+ updatedAt: Date;
763
+ identifier: string;
764
+ url: string;
765
+ secretOid: bigint | null;
766
+ };
767
+ } & {
768
+ name: string;
769
+ oid: bigint;
770
+ id: string;
771
+ type: ContainerRepositoryType;
772
+ createdAt: Date;
773
+ tenantOid: bigint | null;
774
+ updatedAt: Date;
775
+ identifier: string;
776
+ registryOid: bigint;
777
+ registryConnectionOid: bigint | null;
778
+ };
779
+ } & {
780
+ oid: bigint;
781
+ id: string;
782
+ createdAt: Date;
783
+ tenantOid: bigint | null;
784
+ digest: string;
785
+ repositoryOid: bigint;
786
+ };
787
+ }>;
788
+ };
789
+ server: {
790
+ list: Handler<Partial<Pick<{
791
+ tenantId: string;
792
+ }, never>> & {
793
+ tenantId: string;
794
+ } & {
795
+ limit?: number;
796
+ after?: string;
797
+ before?: string;
798
+ cursor?: string;
799
+ order?: "asc" | "desc";
800
+ }, {
801
+ __typename: string;
802
+ items: {
803
+ object: string;
804
+ id: string;
805
+ type: ServerType;
806
+ name: string;
807
+ description: string | null;
808
+ currentVersionId: string | undefined;
809
+ draft: {
810
+ repositoryTag: {
811
+ object: string;
812
+ id: string;
813
+ type: ContainerRepositoryTagType;
814
+ name: string;
815
+ repository: {
816
+ object: string;
817
+ id: string;
818
+ type: "docker";
819
+ name: string;
820
+ registry: {
821
+ object: string;
822
+ id: string;
823
+ type: "docker";
824
+ name: string;
825
+ url: string;
826
+ tenantId: string | undefined;
827
+ createdAt: Date;
828
+ };
829
+ tenantId: string | undefined;
830
+ createdAt: Date;
831
+ };
832
+ currentVersion: {
833
+ object: string;
834
+ id: string;
835
+ digest: string;
836
+ repository: {
837
+ object: string;
838
+ id: string;
839
+ type: "docker";
840
+ name: string;
841
+ registry: {
842
+ object: string;
843
+ id: string;
844
+ type: "docker";
845
+ name: string;
846
+ url: string;
847
+ tenantId: string | undefined;
848
+ createdAt: Date;
849
+ };
850
+ tenantId: string | undefined;
851
+ createdAt: Date;
852
+ };
853
+ tenantId: string | undefined;
854
+ createdAt: Date;
855
+ } | null;
856
+ tenantId: string | undefined;
857
+ createdAt: Date;
858
+ } | null;
859
+ configSchema: PrismaJson.ServerConfigSchema;
860
+ configTransformer: string;
861
+ remoteUrl: string | null;
862
+ remoteProtocol: ServerRemoteProtocol | null;
863
+ createdAt: Date;
864
+ };
865
+ oauthConfig: {
866
+ type: "remote";
867
+ name: string | null;
868
+ config: any;
869
+ scopes: string[];
870
+ authConfigSchema: null;
871
+ provider: {
872
+ name: string;
873
+ url: string;
874
+ };
875
+ discovery: {
876
+ status: RemoteOAuthConfigDiscoveryStatus;
877
+ error: {
878
+ code: string;
879
+ message: string;
880
+ } | null;
881
+ createdAt: Date;
882
+ lastDiscoveredAt: Date | null;
883
+ };
884
+ } | {
885
+ type: "delegated";
886
+ name: string | null;
887
+ config: null;
888
+ scopes: never[];
889
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
890
+ provider: null;
891
+ discovery: {
892
+ status: "succeeded";
893
+ error: {
894
+ code: string;
895
+ message: string;
896
+ } | null;
897
+ createdAt: Date;
898
+ lastDiscoveredAt: null;
899
+ };
900
+ } | null;
901
+ tenantId: string | undefined;
902
+ createdAt: Date;
903
+ updatedAt: Date;
904
+ }[];
905
+ pagination: {
906
+ has_more_after: boolean;
907
+ has_more_before: boolean;
908
+ };
909
+ }, {
910
+ tenant: {
911
+ name: string;
912
+ oid: bigint;
913
+ id: string;
914
+ createdAt: Date;
915
+ identifier: string;
916
+ functionBayTenantId: string | null;
917
+ };
918
+ }>;
919
+ create: Handler<UndefinedIsOptional<{
920
+ tenantId: string;
921
+ from: UndefinedIsOptional<{
922
+ type: "container.from_image_ref";
923
+ imageRef: string;
924
+ username: string | undefined;
925
+ password: string | undefined;
926
+ }> | UndefinedIsOptional<{
927
+ type: "remote";
928
+ remoteUrl: string;
929
+ config: Record<string, any> | undefined;
930
+ protocol: "sse" | "streamable_http";
931
+ }> | UndefinedIsOptional<{
932
+ type: "function";
933
+ files: UndefinedIsOptional<{
934
+ filename: string;
935
+ content: string;
936
+ encoding: "utf-8" | "base64" | undefined;
937
+ }>[];
938
+ env: Record<string, string>;
939
+ runtime: UndefinedIsOptional<{
940
+ identifier: "nodejs";
941
+ version: "24.x" | "22.x";
942
+ }> | UndefinedIsOptional<{
943
+ identifier: "python";
944
+ version: "3.14" | "3.13" | "3.12";
945
+ }>;
946
+ }>;
947
+ config: UndefinedIsOptional<{
948
+ schema: Record<string, any>;
949
+ transformer: string;
950
+ }> | undefined;
951
+ name: string;
952
+ description: string | undefined;
953
+ }>, {
954
+ server: {
955
+ object: string;
956
+ id: string;
957
+ type: ServerType;
958
+ name: string;
959
+ description: string | null;
960
+ currentVersionId: string | undefined;
961
+ draft: {
962
+ repositoryTag: {
963
+ object: string;
964
+ id: string;
965
+ type: ContainerRepositoryTagType;
966
+ name: string;
967
+ repository: {
968
+ object: string;
969
+ id: string;
970
+ type: "docker";
971
+ name: string;
972
+ registry: {
973
+ object: string;
974
+ id: string;
975
+ type: "docker";
976
+ name: string;
977
+ url: string;
978
+ tenantId: string | undefined;
979
+ createdAt: Date;
980
+ };
981
+ tenantId: string | undefined;
982
+ createdAt: Date;
983
+ };
984
+ currentVersion: {
985
+ object: string;
986
+ id: string;
987
+ digest: string;
988
+ repository: {
989
+ object: string;
990
+ id: string;
991
+ type: "docker";
992
+ name: string;
993
+ registry: {
994
+ object: string;
995
+ id: string;
996
+ type: "docker";
997
+ name: string;
998
+ url: string;
999
+ tenantId: string | undefined;
1000
+ createdAt: Date;
1001
+ };
1002
+ tenantId: string | undefined;
1003
+ createdAt: Date;
1004
+ };
1005
+ tenantId: string | undefined;
1006
+ createdAt: Date;
1007
+ } | null;
1008
+ tenantId: string | undefined;
1009
+ createdAt: Date;
1010
+ } | null;
1011
+ configSchema: PrismaJson.ServerConfigSchema;
1012
+ configTransformer: string;
1013
+ remoteUrl: string | null;
1014
+ remoteProtocol: ServerRemoteProtocol | null;
1015
+ createdAt: Date;
1016
+ };
1017
+ oauthConfig: {
1018
+ type: "remote";
1019
+ name: string | null;
1020
+ config: any;
1021
+ scopes: string[];
1022
+ authConfigSchema: null;
1023
+ provider: {
1024
+ name: string;
1025
+ url: string;
1026
+ };
1027
+ discovery: {
1028
+ status: RemoteOAuthConfigDiscoveryStatus;
1029
+ error: {
1030
+ code: string;
1031
+ message: string;
1032
+ } | null;
1033
+ createdAt: Date;
1034
+ lastDiscoveredAt: Date | null;
1035
+ };
1036
+ } | {
1037
+ type: "delegated";
1038
+ name: string | null;
1039
+ config: null;
1040
+ scopes: never[];
1041
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
1042
+ provider: null;
1043
+ discovery: {
1044
+ status: "succeeded";
1045
+ error: {
1046
+ code: string;
1047
+ message: string;
1048
+ } | null;
1049
+ createdAt: Date;
1050
+ lastDiscoveredAt: null;
1051
+ };
1052
+ } | null;
1053
+ tenantId: string | undefined;
1054
+ createdAt: Date;
1055
+ updatedAt: Date;
1056
+ };
1057
+ deployment: {
1058
+ object: string;
1059
+ id: string;
1060
+ status: ServerDeploymentStatus;
1061
+ serverId: string;
1062
+ tenantId: string | null;
1063
+ functionServerId: string | null;
1064
+ createdAt: Date;
1065
+ updatedAt: Date;
1066
+ startedAt: Date | null;
1067
+ endedAt: Date | null;
1068
+ };
1069
+ }, {
1070
+ tenant: {
1071
+ name: string;
1072
+ oid: bigint;
1073
+ id: string;
1074
+ createdAt: Date;
1075
+ identifier: string;
1076
+ functionBayTenantId: string | null;
1077
+ };
1078
+ }>;
1079
+ createVersion: Handler<UndefinedIsOptional<{
1080
+ tenantId: string;
1081
+ serverId: string;
1082
+ from: UndefinedIsOptional<{
1083
+ type: "container.from_image_ref";
1084
+ imageRef: string;
1085
+ username: string | undefined;
1086
+ password: string | undefined;
1087
+ }> | UndefinedIsOptional<{
1088
+ type: "remote";
1089
+ remoteUrl: string;
1090
+ protocol: "sse" | "streamable_http";
1091
+ }> | UndefinedIsOptional<{
1092
+ type: "function";
1093
+ files: UndefinedIsOptional<{
1094
+ filename: string;
1095
+ content: string;
1096
+ encoding: "utf-8" | "base64" | undefined;
1097
+ }>[];
1098
+ env: Record<string, string>;
1099
+ runtime: UndefinedIsOptional<{
1100
+ identifier: "nodejs";
1101
+ version: "24.x" | "22.x";
1102
+ }> | UndefinedIsOptional<{
1103
+ identifier: "python";
1104
+ version: "3.14" | "3.13" | "3.12";
1105
+ }>;
1106
+ }>;
1107
+ config: UndefinedIsOptional<{
1108
+ schema: Record<string, any>;
1109
+ transformer: string;
1110
+ }> | undefined;
1111
+ }>, {
1112
+ object: string;
1113
+ id: string;
1114
+ status: ServerDeploymentStatus;
1115
+ serverId: string;
1116
+ tenantId: string | null;
1117
+ functionServerId: string | null;
1118
+ createdAt: Date;
1119
+ updatedAt: Date;
1120
+ startedAt: Date | null;
1121
+ endedAt: Date | null;
1122
+ }, {
1123
+ tenant: {
1124
+ name: string;
1125
+ oid: bigint;
1126
+ id: string;
1127
+ createdAt: Date;
1128
+ identifier: string;
1129
+ functionBayTenantId: string | null;
1130
+ };
1131
+ }>;
1132
+ get: Handler<UndefinedIsOptional<{
1133
+ tenantId: string;
1134
+ serverId: string;
1135
+ }>, {
1136
+ object: string;
1137
+ id: string;
1138
+ type: ServerType;
1139
+ name: string;
1140
+ description: string | null;
1141
+ currentVersionId: string | undefined;
1142
+ draft: {
1143
+ repositoryTag: {
1144
+ object: string;
1145
+ id: string;
1146
+ type: ContainerRepositoryTagType;
1147
+ name: string;
1148
+ repository: {
1149
+ object: string;
1150
+ id: string;
1151
+ type: "docker";
1152
+ name: string;
1153
+ registry: {
1154
+ object: string;
1155
+ id: string;
1156
+ type: "docker";
1157
+ name: string;
1158
+ url: string;
1159
+ tenantId: string | undefined;
1160
+ createdAt: Date;
1161
+ };
1162
+ tenantId: string | undefined;
1163
+ createdAt: Date;
1164
+ };
1165
+ currentVersion: {
1166
+ object: string;
1167
+ id: string;
1168
+ digest: string;
1169
+ repository: {
1170
+ object: string;
1171
+ id: string;
1172
+ type: "docker";
1173
+ name: string;
1174
+ registry: {
1175
+ object: string;
1176
+ id: string;
1177
+ type: "docker";
1178
+ name: string;
1179
+ url: string;
1180
+ tenantId: string | undefined;
1181
+ createdAt: Date;
1182
+ };
1183
+ tenantId: string | undefined;
1184
+ createdAt: Date;
1185
+ };
1186
+ tenantId: string | undefined;
1187
+ createdAt: Date;
1188
+ } | null;
1189
+ tenantId: string | undefined;
1190
+ createdAt: Date;
1191
+ } | null;
1192
+ configSchema: PrismaJson.ServerConfigSchema;
1193
+ configTransformer: string;
1194
+ remoteUrl: string | null;
1195
+ remoteProtocol: ServerRemoteProtocol | null;
1196
+ createdAt: Date;
1197
+ };
1198
+ oauthConfig: {
1199
+ type: "remote";
1200
+ name: string | null;
1201
+ config: any;
1202
+ scopes: string[];
1203
+ authConfigSchema: null;
1204
+ provider: {
1205
+ name: string;
1206
+ url: string;
1207
+ };
1208
+ discovery: {
1209
+ status: RemoteOAuthConfigDiscoveryStatus;
1210
+ error: {
1211
+ code: string;
1212
+ message: string;
1213
+ } | null;
1214
+ createdAt: Date;
1215
+ lastDiscoveredAt: Date | null;
1216
+ };
1217
+ } | {
1218
+ type: "delegated";
1219
+ name: string | null;
1220
+ config: null;
1221
+ scopes: never[];
1222
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
1223
+ provider: null;
1224
+ discovery: {
1225
+ status: "succeeded";
1226
+ error: {
1227
+ code: string;
1228
+ message: string;
1229
+ } | null;
1230
+ createdAt: Date;
1231
+ lastDiscoveredAt: null;
1232
+ };
1233
+ } | null;
1234
+ tenantId: string | undefined;
1235
+ createdAt: Date;
1236
+ updatedAt: Date;
1237
+ }, {
1238
+ tenant: {
1239
+ name: string;
1240
+ oid: bigint;
1241
+ id: string;
1242
+ createdAt: Date;
1243
+ identifier: string;
1244
+ functionBayTenantId: string | null;
1245
+ };
1246
+ server: {
1247
+ tenant: {
1248
+ name: string;
1249
+ oid: bigint;
1250
+ id: string;
1251
+ createdAt: Date;
1252
+ identifier: string;
1253
+ functionBayTenantId: string | null;
1254
+ } | null;
1255
+ draftRepositoryTag: ({
1256
+ tenant: {
1257
+ name: string;
1258
+ oid: bigint;
1259
+ id: string;
1260
+ createdAt: Date;
1261
+ identifier: string;
1262
+ functionBayTenantId: string | null;
1263
+ } | null;
1264
+ repository: {
1265
+ registry: {
1266
+ name: string;
1267
+ oid: bigint;
1268
+ id: string;
1269
+ type: ContainerRegistryType;
1270
+ createdAt: Date;
1271
+ tenantOid: bigint | null;
1272
+ updatedAt: Date;
1273
+ identifier: string;
1274
+ url: string;
1275
+ secretOid: bigint | null;
1276
+ };
1277
+ } & {
1278
+ name: string;
1279
+ oid: bigint;
1280
+ id: string;
1281
+ type: ContainerRepositoryType;
1282
+ createdAt: Date;
1283
+ tenantOid: bigint | null;
1284
+ updatedAt: Date;
1285
+ identifier: string;
1286
+ registryOid: bigint;
1287
+ registryConnectionOid: bigint | null;
1288
+ };
1289
+ currentVersion: {
1290
+ oid: bigint;
1291
+ id: string;
1292
+ createdAt: Date;
1293
+ tenantOid: bigint | null;
1294
+ digest: string;
1295
+ repositoryOid: bigint;
1296
+ } | null;
1297
+ } & {
1298
+ name: string;
1299
+ oid: bigint;
1300
+ id: string;
1301
+ type: ContainerRepositoryTagType;
1302
+ createdAt: Date;
1303
+ tenantOid: bigint | null;
1304
+ currentVersionOid: bigint | null;
1305
+ updatedAt: Date;
1306
+ identifier: string;
1307
+ digest: string | null;
1308
+ repositoryOid: bigint;
1309
+ discoveryStatus: ContainerRepositoryTagDiscoveryStatus;
1310
+ tag: string | null;
1311
+ lastDiscoveryErrorOid: bigint | null;
1312
+ lastSyncedAt: Date | null;
1313
+ }) | null;
1314
+ currentVersion: {
1315
+ oid: bigint;
1316
+ id: string;
1317
+ serverOid: bigint;
1318
+ createdAt: Date;
1319
+ tenantOid: bigint | null;
1320
+ updatedAt: Date;
1321
+ identifier: string;
1322
+ isCurrent: boolean;
1323
+ configSchema: PrismaJson.ServerConfigSchema;
1324
+ configTransformer: string;
1325
+ remoteUrl: string | null;
1326
+ remoteProtocol: ServerRemoteProtocol | null;
1327
+ repositoryTagOid: bigint | null;
1328
+ repositoryVersionOid: bigint | null;
1329
+ functionServerOid: bigint | null;
1330
+ deploymentOid: bigint;
1331
+ } | null;
1332
+ remoteOauthConfig: {
1333
+ name: string | null;
1334
+ oid: bigint;
1335
+ id: string;
1336
+ serverOid: bigint;
1337
+ createdAt: Date;
1338
+ discoverStatus: RemoteOAuthConfigDiscoveryStatus;
1339
+ config: PrismaJson.RemoteOAuthConfig;
1340
+ providerName: string;
1341
+ providerUrl: string;
1342
+ discoveryUrl: string | null;
1343
+ errorCode: string | null;
1344
+ errorMessage: string | null;
1345
+ scopes: string[];
1346
+ oauthDiscoveryDocumentOid: bigint | null;
1347
+ lastDiscoveredAt: Date | null;
1348
+ } | null;
1349
+ delegatedOauthConfig: {
1350
+ name: string | null;
1351
+ oid: bigint;
1352
+ id: string;
1353
+ serverOid: bigint;
1354
+ createdAt: Date;
1355
+ functionServerOid: bigint;
1356
+ errorCode: string | null;
1357
+ errorMessage: string | null;
1358
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
1359
+ authConfigSchemaHash: string;
1360
+ supportsOauthTokenRefresh: boolean;
1361
+ } | null;
1362
+ } & {
1363
+ name: string;
1364
+ oid: bigint;
1365
+ id: string;
1366
+ type: ServerType;
1367
+ createdAt: Date;
1368
+ description: string | null;
1369
+ draftConfigSchema: PrismaJson.ServerConfigSchema;
1370
+ draftConfigTransformer: string;
1371
+ draftRemoteUrl: string | null;
1372
+ draftRemoteProtocol: ServerRemoteProtocol | null;
1373
+ draftRepositoryTagOid: bigint | null;
1374
+ tenantOid: bigint | null;
1375
+ currentVersionOid: bigint | null;
1376
+ remoteOauthConfigOid: bigint | null;
1377
+ delegatedOauthConfigOid: bigint | null;
1378
+ updatedAt: Date;
1379
+ };
1380
+ }>;
1381
+ update: Handler<UndefinedIsOptional<{
1382
+ tenantId: string;
1383
+ serverId: string;
1384
+ name: string | undefined;
1385
+ description: string | undefined;
1386
+ }>, {
1387
+ object: string;
1388
+ id: string;
1389
+ type: ServerType;
1390
+ name: string;
1391
+ description: string | null;
1392
+ currentVersionId: string | undefined;
1393
+ draft: {
1394
+ repositoryTag: {
1395
+ object: string;
1396
+ id: string;
1397
+ type: ContainerRepositoryTagType;
1398
+ name: string;
1399
+ repository: {
1400
+ object: string;
1401
+ id: string;
1402
+ type: "docker";
1403
+ name: string;
1404
+ registry: {
1405
+ object: string;
1406
+ id: string;
1407
+ type: "docker";
1408
+ name: string;
1409
+ url: string;
1410
+ tenantId: string | undefined;
1411
+ createdAt: Date;
1412
+ };
1413
+ tenantId: string | undefined;
1414
+ createdAt: Date;
1415
+ };
1416
+ currentVersion: {
1417
+ object: string;
1418
+ id: string;
1419
+ digest: string;
1420
+ repository: {
1421
+ object: string;
1422
+ id: string;
1423
+ type: "docker";
1424
+ name: string;
1425
+ registry: {
1426
+ object: string;
1427
+ id: string;
1428
+ type: "docker";
1429
+ name: string;
1430
+ url: string;
1431
+ tenantId: string | undefined;
1432
+ createdAt: Date;
1433
+ };
1434
+ tenantId: string | undefined;
1435
+ createdAt: Date;
1436
+ };
1437
+ tenantId: string | undefined;
1438
+ createdAt: Date;
1439
+ } | null;
1440
+ tenantId: string | undefined;
1441
+ createdAt: Date;
1442
+ } | null;
1443
+ configSchema: PrismaJson.ServerConfigSchema;
1444
+ configTransformer: string;
1445
+ remoteUrl: string | null;
1446
+ remoteProtocol: ServerRemoteProtocol | null;
1447
+ createdAt: Date;
1448
+ };
1449
+ oauthConfig: {
1450
+ type: "remote";
1451
+ name: string | null;
1452
+ config: any;
1453
+ scopes: string[];
1454
+ authConfigSchema: null;
1455
+ provider: {
1456
+ name: string;
1457
+ url: string;
1458
+ };
1459
+ discovery: {
1460
+ status: RemoteOAuthConfigDiscoveryStatus;
1461
+ error: {
1462
+ code: string;
1463
+ message: string;
1464
+ } | null;
1465
+ createdAt: Date;
1466
+ lastDiscoveredAt: Date | null;
1467
+ };
1468
+ } | {
1469
+ type: "delegated";
1470
+ name: string | null;
1471
+ config: null;
1472
+ scopes: never[];
1473
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
1474
+ provider: null;
1475
+ discovery: {
1476
+ status: "succeeded";
1477
+ error: {
1478
+ code: string;
1479
+ message: string;
1480
+ } | null;
1481
+ createdAt: Date;
1482
+ lastDiscoveredAt: null;
1483
+ };
1484
+ } | null;
1485
+ tenantId: string | undefined;
1486
+ createdAt: Date;
1487
+ updatedAt: Date;
1488
+ }, {
1489
+ tenant: {
1490
+ name: string;
1491
+ oid: bigint;
1492
+ id: string;
1493
+ createdAt: Date;
1494
+ identifier: string;
1495
+ functionBayTenantId: string | null;
1496
+ };
1497
+ server: {
1498
+ tenant: {
1499
+ name: string;
1500
+ oid: bigint;
1501
+ id: string;
1502
+ createdAt: Date;
1503
+ identifier: string;
1504
+ functionBayTenantId: string | null;
1505
+ } | null;
1506
+ draftRepositoryTag: ({
1507
+ tenant: {
1508
+ name: string;
1509
+ oid: bigint;
1510
+ id: string;
1511
+ createdAt: Date;
1512
+ identifier: string;
1513
+ functionBayTenantId: string | null;
1514
+ } | null;
1515
+ repository: {
1516
+ registry: {
1517
+ name: string;
1518
+ oid: bigint;
1519
+ id: string;
1520
+ type: ContainerRegistryType;
1521
+ createdAt: Date;
1522
+ tenantOid: bigint | null;
1523
+ updatedAt: Date;
1524
+ identifier: string;
1525
+ url: string;
1526
+ secretOid: bigint | null;
1527
+ };
1528
+ } & {
1529
+ name: string;
1530
+ oid: bigint;
1531
+ id: string;
1532
+ type: ContainerRepositoryType;
1533
+ createdAt: Date;
1534
+ tenantOid: bigint | null;
1535
+ updatedAt: Date;
1536
+ identifier: string;
1537
+ registryOid: bigint;
1538
+ registryConnectionOid: bigint | null;
1539
+ };
1540
+ currentVersion: {
1541
+ oid: bigint;
1542
+ id: string;
1543
+ createdAt: Date;
1544
+ tenantOid: bigint | null;
1545
+ digest: string;
1546
+ repositoryOid: bigint;
1547
+ } | null;
1548
+ } & {
1549
+ name: string;
1550
+ oid: bigint;
1551
+ id: string;
1552
+ type: ContainerRepositoryTagType;
1553
+ createdAt: Date;
1554
+ tenantOid: bigint | null;
1555
+ currentVersionOid: bigint | null;
1556
+ updatedAt: Date;
1557
+ identifier: string;
1558
+ digest: string | null;
1559
+ repositoryOid: bigint;
1560
+ discoveryStatus: ContainerRepositoryTagDiscoveryStatus;
1561
+ tag: string | null;
1562
+ lastDiscoveryErrorOid: bigint | null;
1563
+ lastSyncedAt: Date | null;
1564
+ }) | null;
1565
+ currentVersion: {
1566
+ oid: bigint;
1567
+ id: string;
1568
+ serverOid: bigint;
1569
+ createdAt: Date;
1570
+ tenantOid: bigint | null;
1571
+ updatedAt: Date;
1572
+ identifier: string;
1573
+ isCurrent: boolean;
1574
+ configSchema: PrismaJson.ServerConfigSchema;
1575
+ configTransformer: string;
1576
+ remoteUrl: string | null;
1577
+ remoteProtocol: ServerRemoteProtocol | null;
1578
+ repositoryTagOid: bigint | null;
1579
+ repositoryVersionOid: bigint | null;
1580
+ functionServerOid: bigint | null;
1581
+ deploymentOid: bigint;
1582
+ } | null;
1583
+ remoteOauthConfig: {
1584
+ name: string | null;
1585
+ oid: bigint;
1586
+ id: string;
1587
+ serverOid: bigint;
1588
+ createdAt: Date;
1589
+ discoverStatus: RemoteOAuthConfigDiscoveryStatus;
1590
+ config: PrismaJson.RemoteOAuthConfig;
1591
+ providerName: string;
1592
+ providerUrl: string;
1593
+ discoveryUrl: string | null;
1594
+ errorCode: string | null;
1595
+ errorMessage: string | null;
1596
+ scopes: string[];
1597
+ oauthDiscoveryDocumentOid: bigint | null;
1598
+ lastDiscoveredAt: Date | null;
1599
+ } | null;
1600
+ delegatedOauthConfig: {
1601
+ name: string | null;
1602
+ oid: bigint;
1603
+ id: string;
1604
+ serverOid: bigint;
1605
+ createdAt: Date;
1606
+ functionServerOid: bigint;
1607
+ errorCode: string | null;
1608
+ errorMessage: string | null;
1609
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
1610
+ authConfigSchemaHash: string;
1611
+ supportsOauthTokenRefresh: boolean;
1612
+ } | null;
1613
+ } & {
1614
+ name: string;
1615
+ oid: bigint;
1616
+ id: string;
1617
+ type: ServerType;
1618
+ createdAt: Date;
1619
+ description: string | null;
1620
+ draftConfigSchema: PrismaJson.ServerConfigSchema;
1621
+ draftConfigTransformer: string;
1622
+ draftRemoteUrl: string | null;
1623
+ draftRemoteProtocol: ServerRemoteProtocol | null;
1624
+ draftRepositoryTagOid: bigint | null;
1625
+ tenantOid: bigint | null;
1626
+ currentVersionOid: bigint | null;
1627
+ remoteOauthConfigOid: bigint | null;
1628
+ delegatedOauthConfigOid: bigint | null;
1629
+ updatedAt: Date;
1630
+ };
1631
+ }>;
1632
+ };
1633
+ serverVersion: {
1634
+ list: Handler<Partial<Pick<{
1635
+ tenantId: string;
1636
+ serverIds: string[] | undefined;
1637
+ }, "serverIds">> & {
1638
+ tenantId: string;
1639
+ } & {
1640
+ limit?: number;
1641
+ after?: string;
1642
+ before?: string;
1643
+ cursor?: string;
1644
+ order?: "asc" | "desc";
1645
+ }, {
1646
+ __typename: string;
1647
+ items: {
1648
+ object: string;
1649
+ id: string;
1650
+ type: ServerType;
1651
+ isCurrent: boolean;
1652
+ repositoryTag: {
1653
+ object: string;
1654
+ id: string;
1655
+ type: ContainerRepositoryTagType;
1656
+ name: string;
1657
+ repository: {
1658
+ object: string;
1659
+ id: string;
1660
+ type: "docker";
1661
+ name: string;
1662
+ registry: {
1663
+ object: string;
1664
+ id: string;
1665
+ type: "docker";
1666
+ name: string;
1667
+ url: string;
1668
+ tenantId: string | undefined;
1669
+ createdAt: Date;
1670
+ };
1671
+ tenantId: string | undefined;
1672
+ createdAt: Date;
1673
+ };
1674
+ currentVersion: {
1675
+ object: string;
1676
+ id: string;
1677
+ digest: string;
1678
+ repository: {
1679
+ object: string;
1680
+ id: string;
1681
+ type: "docker";
1682
+ name: string;
1683
+ registry: {
1684
+ object: string;
1685
+ id: string;
1686
+ type: "docker";
1687
+ name: string;
1688
+ url: string;
1689
+ tenantId: string | undefined;
1690
+ createdAt: Date;
1691
+ };
1692
+ tenantId: string | undefined;
1693
+ createdAt: Date;
1694
+ };
1695
+ tenantId: string | undefined;
1696
+ createdAt: Date;
1697
+ } | null;
1698
+ tenantId: string | undefined;
1699
+ createdAt: Date;
1700
+ } | null;
1701
+ repositoryVersion: {
1702
+ object: string;
1703
+ id: string;
1704
+ digest: string;
1705
+ repository: {
1706
+ object: string;
1707
+ id: string;
1708
+ type: "docker";
1709
+ name: string;
1710
+ registry: {
1711
+ object: string;
1712
+ id: string;
1713
+ type: "docker";
1714
+ name: string;
1715
+ url: string;
1716
+ tenantId: string | undefined;
1717
+ createdAt: Date;
1718
+ };
1719
+ tenantId: string | undefined;
1720
+ createdAt: Date;
1721
+ };
1722
+ tenantId: string | undefined;
1723
+ createdAt: Date;
1724
+ } | null;
1725
+ configSchema: PrismaJson.ServerConfigSchema;
1726
+ configTransformer: string;
1727
+ remoteUrl: string | null;
1728
+ remoteProtocol: ServerRemoteProtocol | null;
1729
+ serverId: string;
1730
+ tenantId: string | undefined;
1731
+ createdAt: Date;
1732
+ updatedAt: Date;
1733
+ }[];
1734
+ pagination: {
1735
+ has_more_after: boolean;
1736
+ has_more_before: boolean;
1737
+ };
1738
+ }, {
1739
+ tenant: {
1740
+ name: string;
1741
+ oid: bigint;
1742
+ id: string;
1743
+ createdAt: Date;
1744
+ identifier: string;
1745
+ functionBayTenantId: string | null;
1746
+ };
1747
+ }>;
1748
+ get: Handler<UndefinedIsOptional<{
1749
+ tenantId: string;
1750
+ serverVersionId: string;
1751
+ }>, {
1752
+ object: string;
1753
+ id: string;
1754
+ type: ServerType;
1755
+ isCurrent: boolean;
1756
+ repositoryTag: {
1757
+ object: string;
1758
+ id: string;
1759
+ type: ContainerRepositoryTagType;
1760
+ name: string;
1761
+ repository: {
1762
+ object: string;
1763
+ id: string;
1764
+ type: "docker";
1765
+ name: string;
1766
+ registry: {
1767
+ object: string;
1768
+ id: string;
1769
+ type: "docker";
1770
+ name: string;
1771
+ url: string;
1772
+ tenantId: string | undefined;
1773
+ createdAt: Date;
1774
+ };
1775
+ tenantId: string | undefined;
1776
+ createdAt: Date;
1777
+ };
1778
+ currentVersion: {
1779
+ object: string;
1780
+ id: string;
1781
+ digest: string;
1782
+ repository: {
1783
+ object: string;
1784
+ id: string;
1785
+ type: "docker";
1786
+ name: string;
1787
+ registry: {
1788
+ object: string;
1789
+ id: string;
1790
+ type: "docker";
1791
+ name: string;
1792
+ url: string;
1793
+ tenantId: string | undefined;
1794
+ createdAt: Date;
1795
+ };
1796
+ tenantId: string | undefined;
1797
+ createdAt: Date;
1798
+ };
1799
+ tenantId: string | undefined;
1800
+ createdAt: Date;
1801
+ } | null;
1802
+ tenantId: string | undefined;
1803
+ createdAt: Date;
1804
+ } | null;
1805
+ repositoryVersion: {
1806
+ object: string;
1807
+ id: string;
1808
+ digest: string;
1809
+ repository: {
1810
+ object: string;
1811
+ id: string;
1812
+ type: "docker";
1813
+ name: string;
1814
+ registry: {
1815
+ object: string;
1816
+ id: string;
1817
+ type: "docker";
1818
+ name: string;
1819
+ url: string;
1820
+ tenantId: string | undefined;
1821
+ createdAt: Date;
1822
+ };
1823
+ tenantId: string | undefined;
1824
+ createdAt: Date;
1825
+ };
1826
+ tenantId: string | undefined;
1827
+ createdAt: Date;
1828
+ } | null;
1829
+ configSchema: PrismaJson.ServerConfigSchema;
1830
+ configTransformer: string;
1831
+ remoteUrl: string | null;
1832
+ remoteProtocol: ServerRemoteProtocol | null;
1833
+ serverId: string;
1834
+ tenantId: string | undefined;
1835
+ createdAt: Date;
1836
+ updatedAt: Date;
1837
+ }, {
1838
+ tenant: {
1839
+ name: string;
1840
+ oid: bigint;
1841
+ id: string;
1842
+ createdAt: Date;
1843
+ identifier: string;
1844
+ functionBayTenantId: string | null;
1845
+ };
1846
+ serverVersion: {
1847
+ server: {
1848
+ name: string;
1849
+ oid: bigint;
1850
+ id: string;
1851
+ type: ServerType;
1852
+ createdAt: Date;
1853
+ description: string | null;
1854
+ draftConfigSchema: PrismaJson.ServerConfigSchema;
1855
+ draftConfigTransformer: string;
1856
+ draftRemoteUrl: string | null;
1857
+ draftRemoteProtocol: ServerRemoteProtocol | null;
1858
+ draftRepositoryTagOid: bigint | null;
1859
+ tenantOid: bigint | null;
1860
+ currentVersionOid: bigint | null;
1861
+ remoteOauthConfigOid: bigint | null;
1862
+ delegatedOauthConfigOid: bigint | null;
1863
+ updatedAt: Date;
1864
+ };
1865
+ tenant: {
1866
+ name: string;
1867
+ oid: bigint;
1868
+ id: string;
1869
+ createdAt: Date;
1870
+ identifier: string;
1871
+ functionBayTenantId: string | null;
1872
+ } | null;
1873
+ repositoryTag: ({
1874
+ tenant: {
1875
+ name: string;
1876
+ oid: bigint;
1877
+ id: string;
1878
+ createdAt: Date;
1879
+ identifier: string;
1880
+ functionBayTenantId: string | null;
1881
+ } | null;
1882
+ repository: {
1883
+ registry: {
1884
+ name: string;
1885
+ oid: bigint;
1886
+ id: string;
1887
+ type: ContainerRegistryType;
1888
+ createdAt: Date;
1889
+ tenantOid: bigint | null;
1890
+ updatedAt: Date;
1891
+ identifier: string;
1892
+ url: string;
1893
+ secretOid: bigint | null;
1894
+ };
1895
+ } & {
1896
+ name: string;
1897
+ oid: bigint;
1898
+ id: string;
1899
+ type: ContainerRepositoryType;
1900
+ createdAt: Date;
1901
+ tenantOid: bigint | null;
1902
+ updatedAt: Date;
1903
+ identifier: string;
1904
+ registryOid: bigint;
1905
+ registryConnectionOid: bigint | null;
1906
+ };
1907
+ currentVersion: {
1908
+ oid: bigint;
1909
+ id: string;
1910
+ createdAt: Date;
1911
+ tenantOid: bigint | null;
1912
+ digest: string;
1913
+ repositoryOid: bigint;
1914
+ } | null;
1915
+ } & {
1916
+ name: string;
1917
+ oid: bigint;
1918
+ id: string;
1919
+ type: ContainerRepositoryTagType;
1920
+ createdAt: Date;
1921
+ tenantOid: bigint | null;
1922
+ currentVersionOid: bigint | null;
1923
+ updatedAt: Date;
1924
+ identifier: string;
1925
+ digest: string | null;
1926
+ repositoryOid: bigint;
1927
+ discoveryStatus: ContainerRepositoryTagDiscoveryStatus;
1928
+ tag: string | null;
1929
+ lastDiscoveryErrorOid: bigint | null;
1930
+ lastSyncedAt: Date | null;
1931
+ }) | null;
1932
+ repositoryVersion: ({
1933
+ tenant: {
1934
+ name: string;
1935
+ oid: bigint;
1936
+ id: string;
1937
+ createdAt: Date;
1938
+ identifier: string;
1939
+ functionBayTenantId: string | null;
1940
+ } | null;
1941
+ repository: {
1942
+ registry: {
1943
+ name: string;
1944
+ oid: bigint;
1945
+ id: string;
1946
+ type: ContainerRegistryType;
1947
+ createdAt: Date;
1948
+ tenantOid: bigint | null;
1949
+ updatedAt: Date;
1950
+ identifier: string;
1951
+ url: string;
1952
+ secretOid: bigint | null;
1953
+ };
1954
+ } & {
1955
+ name: string;
1956
+ oid: bigint;
1957
+ id: string;
1958
+ type: ContainerRepositoryType;
1959
+ createdAt: Date;
1960
+ tenantOid: bigint | null;
1961
+ updatedAt: Date;
1962
+ identifier: string;
1963
+ registryOid: bigint;
1964
+ registryConnectionOid: bigint | null;
1965
+ };
1966
+ } & {
1967
+ oid: bigint;
1968
+ id: string;
1969
+ createdAt: Date;
1970
+ tenantOid: bigint | null;
1971
+ digest: string;
1972
+ repositoryOid: bigint;
1973
+ }) | null;
1974
+ } & {
1975
+ oid: bigint;
1976
+ id: string;
1977
+ serverOid: bigint;
1978
+ createdAt: Date;
1979
+ tenantOid: bigint | null;
1980
+ updatedAt: Date;
1981
+ identifier: string;
1982
+ isCurrent: boolean;
1983
+ configSchema: PrismaJson.ServerConfigSchema;
1984
+ configTransformer: string;
1985
+ remoteUrl: string | null;
1986
+ remoteProtocol: ServerRemoteProtocol | null;
1987
+ repositoryTagOid: bigint | null;
1988
+ repositoryVersionOid: bigint | null;
1989
+ functionServerOid: bigint | null;
1990
+ deploymentOid: bigint;
1991
+ };
1992
+ }>;
1993
+ };
1994
+ serverDiscovery: {
1995
+ create: Handler<UndefinedIsOptional<{
1996
+ tenantId: string;
1997
+ serverConfigId: string;
1998
+ serverVersionId: string;
1999
+ serverAuthConfigId: string | undefined;
2000
+ }>, {
2001
+ object: string;
2002
+ id: string;
2003
+ status: ServerDiscoveryStatus;
2004
+ authConfigSchema: Record<string, any> | null;
2005
+ configSchema: any;
2006
+ capabilities: {
2007
+ experimental?: {
2008
+ [x: string]: object;
2009
+ } | undefined;
2010
+ logging?: object | undefined;
2011
+ completions?: object | undefined;
2012
+ prompts?: {
2013
+ listChanged?: boolean | undefined;
2014
+ } | undefined;
2015
+ resources?: {
2016
+ subscribe?: boolean | undefined;
2017
+ listChanged?: boolean | undefined;
2018
+ } | undefined;
2019
+ tools?: {
2020
+ listChanged?: boolean | undefined;
2021
+ } | undefined;
2022
+ tasks?: {
2023
+ [x: string]: unknown;
2024
+ list?: object | undefined;
2025
+ cancel?: object | undefined;
2026
+ requests?: {
2027
+ [x: string]: unknown;
2028
+ tools?: {
2029
+ [x: string]: unknown;
2030
+ call?: object | undefined;
2031
+ } | undefined;
2032
+ } | undefined;
2033
+ } | undefined;
2034
+ };
2035
+ instructions: string | null;
2036
+ prompts: {
2037
+ name: string;
2038
+ description?: string | undefined;
2039
+ arguments?: {
2040
+ name: string;
2041
+ description?: string | undefined;
2042
+ required?: boolean | undefined;
2043
+ }[] | undefined;
2044
+ _meta?: {
2045
+ [x: string]: unknown;
2046
+ } | undefined;
2047
+ icons?: {
2048
+ src: string;
2049
+ mimeType?: string | undefined;
2050
+ sizes?: string[] | undefined;
2051
+ theme?: "light" | "dark" | undefined;
2052
+ }[] | undefined;
2053
+ title?: string | undefined;
2054
+ }[];
2055
+ resourceTemplates: {
2056
+ uriTemplate: string;
2057
+ name: string;
2058
+ description?: string | undefined;
2059
+ mimeType?: string | undefined;
2060
+ annotations?: {
2061
+ audience?: ("user" | "assistant")[] | undefined;
2062
+ priority?: number | undefined;
2063
+ lastModified?: string | undefined;
2064
+ } | undefined;
2065
+ _meta?: {
2066
+ [x: string]: unknown;
2067
+ } | undefined;
2068
+ icons?: {
2069
+ src: string;
2070
+ mimeType?: string | undefined;
2071
+ sizes?: string[] | undefined;
2072
+ theme?: "light" | "dark" | undefined;
2073
+ }[] | undefined;
2074
+ title?: string | undefined;
2075
+ }[];
2076
+ tools: {
2077
+ inputSchema: {
2078
+ [x: string]: unknown;
2079
+ type: "object";
2080
+ properties?: {
2081
+ [x: string]: object;
2082
+ } | undefined;
2083
+ required?: string[] | undefined;
2084
+ };
2085
+ name: string;
2086
+ description?: string | undefined;
2087
+ outputSchema?: {
2088
+ [x: string]: unknown;
2089
+ type: "object";
2090
+ properties?: {
2091
+ [x: string]: object;
2092
+ } | undefined;
2093
+ required?: string[] | undefined;
2094
+ } | undefined;
2095
+ annotations?: {
2096
+ title?: string | undefined;
2097
+ readOnlyHint?: boolean | undefined;
2098
+ destructiveHint?: boolean | undefined;
2099
+ idempotentHint?: boolean | undefined;
2100
+ openWorldHint?: boolean | undefined;
2101
+ } | undefined;
2102
+ execution?: {
2103
+ taskSupport?: "optional" | "required" | "forbidden" | undefined;
2104
+ } | undefined;
2105
+ _meta?: {
2106
+ [x: string]: unknown;
2107
+ } | undefined;
2108
+ icons?: {
2109
+ src: string;
2110
+ mimeType?: string | undefined;
2111
+ sizes?: string[] | undefined;
2112
+ theme?: "light" | "dark" | undefined;
2113
+ }[] | undefined;
2114
+ title?: string | undefined;
2115
+ }[];
2116
+ info: {
2117
+ version: string;
2118
+ name: string;
2119
+ websiteUrl?: string | undefined;
2120
+ description?: string | undefined;
2121
+ icons?: {
2122
+ src: string;
2123
+ mimeType?: string | undefined;
2124
+ sizes?: string[] | undefined;
2125
+ theme?: "light" | "dark" | undefined;
2126
+ }[] | undefined;
2127
+ title?: string | undefined;
2128
+ };
2129
+ serverConfigId: string;
2130
+ serverVersionId: string;
2131
+ serverAuthConfigId: string | undefined;
2132
+ createdAt: Date;
2133
+ }, {
2134
+ tenant: {
2135
+ name: string;
2136
+ oid: bigint;
2137
+ id: string;
2138
+ createdAt: Date;
2139
+ identifier: string;
2140
+ functionBayTenantId: string | null;
2141
+ };
2142
+ }>;
2143
+ };
2144
+ serverConfig: {
2145
+ list: Handler<Partial<Pick<{
2146
+ tenantId: string;
2147
+ }, never>> & {
2148
+ tenantId: string;
2149
+ } & {
2150
+ limit?: number;
2151
+ after?: string;
2152
+ before?: string;
2153
+ cursor?: string;
2154
+ order?: "asc" | "desc";
2155
+ }, {
2156
+ __typename: string;
2157
+ items: {
2158
+ object: string;
2159
+ id: string;
2160
+ serverId: string;
2161
+ tenantId: string;
2162
+ createdAt: Date;
2163
+ updatedAt: Date;
2164
+ }[];
2165
+ pagination: {
2166
+ has_more_after: boolean;
2167
+ has_more_before: boolean;
2168
+ };
2169
+ }, {
2170
+ tenant: {
2171
+ name: string;
2172
+ oid: bigint;
2173
+ id: string;
2174
+ createdAt: Date;
2175
+ identifier: string;
2176
+ functionBayTenantId: string | null;
2177
+ };
2178
+ }>;
2179
+ create: Handler<UndefinedIsOptional<{
2180
+ tenantId: string;
2181
+ serverId: string;
2182
+ config: Record<string, any>;
2183
+ }>, {
2184
+ object: string;
2185
+ id: string;
2186
+ serverId: string;
2187
+ tenantId: string;
2188
+ createdAt: Date;
2189
+ updatedAt: Date;
2190
+ }, {
2191
+ tenant: {
2192
+ name: string;
2193
+ oid: bigint;
2194
+ id: string;
2195
+ createdAt: Date;
2196
+ identifier: string;
2197
+ functionBayTenantId: string | null;
2198
+ };
2199
+ }>;
2200
+ get: Handler<UndefinedIsOptional<{
2201
+ tenantId: string;
2202
+ serverConfigId: string;
2203
+ }>, {
2204
+ object: string;
2205
+ id: string;
2206
+ serverId: string;
2207
+ tenantId: string;
2208
+ createdAt: Date;
2209
+ updatedAt: Date;
2210
+ }, {
2211
+ tenant: {
2212
+ name: string;
2213
+ oid: bigint;
2214
+ id: string;
2215
+ createdAt: Date;
2216
+ identifier: string;
2217
+ functionBayTenantId: string | null;
2218
+ };
2219
+ serverConfig: {
2220
+ server: {
2221
+ name: string;
2222
+ oid: bigint;
2223
+ id: string;
2224
+ type: ServerType;
2225
+ createdAt: Date;
2226
+ description: string | null;
2227
+ draftConfigSchema: PrismaJson.ServerConfigSchema;
2228
+ draftConfigTransformer: string;
2229
+ draftRemoteUrl: string | null;
2230
+ draftRemoteProtocol: ServerRemoteProtocol | null;
2231
+ draftRepositoryTagOid: bigint | null;
2232
+ tenantOid: bigint | null;
2233
+ currentVersionOid: bigint | null;
2234
+ remoteOauthConfigOid: bigint | null;
2235
+ delegatedOauthConfigOid: bigint | null;
2236
+ updatedAt: Date;
2237
+ };
2238
+ tenant: {
2239
+ name: string;
2240
+ oid: bigint;
2241
+ id: string;
2242
+ createdAt: Date;
2243
+ identifier: string;
2244
+ functionBayTenantId: string | null;
2245
+ };
2246
+ } & {
2247
+ oid: bigint;
2248
+ id: string;
2249
+ serverOid: bigint;
2250
+ createdAt: Date;
2251
+ tenantOid: bigint;
2252
+ updatedAt: Date;
2253
+ secretOid: bigint;
2254
+ };
2255
+ }>;
2256
+ };
2257
+ serverDeployment: {
2258
+ list: Handler<Partial<Pick<{
2259
+ tenantId: string;
2260
+ serverIds: string[] | undefined;
2261
+ }, "serverIds">> & {
2262
+ tenantId: string;
2263
+ } & {
2264
+ limit?: number;
2265
+ after?: string;
2266
+ before?: string;
2267
+ cursor?: string;
2268
+ order?: "asc" | "desc";
2269
+ }, {
2270
+ __typename: string;
2271
+ items: {
2272
+ object: string;
2273
+ id: string;
2274
+ status: ServerDeploymentStatus;
2275
+ serverId: string;
2276
+ tenantId: string | null;
2277
+ functionServerId: string | null;
2278
+ createdAt: Date;
2279
+ updatedAt: Date;
2280
+ startedAt: Date | null;
2281
+ endedAt: Date | null;
2282
+ }[];
2283
+ pagination: {
2284
+ has_more_after: boolean;
2285
+ has_more_before: boolean;
2286
+ };
2287
+ }, {
2288
+ tenant: {
2289
+ name: string;
2290
+ oid: bigint;
2291
+ id: string;
2292
+ createdAt: Date;
2293
+ identifier: string;
2294
+ functionBayTenantId: string | null;
2295
+ };
2296
+ }>;
2297
+ get: Handler<UndefinedIsOptional<{
2298
+ tenantId: string;
2299
+ serverDeploymentId: string;
2300
+ }>, {
2301
+ object: string;
2302
+ id: string;
2303
+ status: ServerDeploymentStatus;
2304
+ serverId: string;
2305
+ tenantId: string | null;
2306
+ functionServerId: string | null;
2307
+ createdAt: Date;
2308
+ updatedAt: Date;
2309
+ startedAt: Date | null;
2310
+ endedAt: Date | null;
2311
+ }, {
2312
+ tenant: {
2313
+ name: string;
2314
+ oid: bigint;
2315
+ id: string;
2316
+ createdAt: Date;
2317
+ identifier: string;
2318
+ functionBayTenantId: string | null;
2319
+ };
2320
+ serverDeployment: {
2321
+ server: {
2322
+ name: string;
2323
+ oid: bigint;
2324
+ id: string;
2325
+ type: ServerType;
2326
+ createdAt: Date;
2327
+ description: string | null;
2328
+ draftConfigSchema: PrismaJson.ServerConfigSchema;
2329
+ draftConfigTransformer: string;
2330
+ draftRemoteUrl: string | null;
2331
+ draftRemoteProtocol: ServerRemoteProtocol | null;
2332
+ draftRepositoryTagOid: bigint | null;
2333
+ tenantOid: bigint | null;
2334
+ currentVersionOid: bigint | null;
2335
+ remoteOauthConfigOid: bigint | null;
2336
+ delegatedOauthConfigOid: bigint | null;
2337
+ updatedAt: Date;
2338
+ };
2339
+ tenant: {
2340
+ name: string;
2341
+ oid: bigint;
2342
+ id: string;
2343
+ createdAt: Date;
2344
+ identifier: string;
2345
+ functionBayTenantId: string | null;
2346
+ } | null;
2347
+ functionServer: {
2348
+ oid: bigint;
2349
+ id: string;
2350
+ serverOid: bigint;
2351
+ createdAt: Date;
2352
+ delegatedOauthConfigOid: bigint | null;
2353
+ functionBayTenantId: string;
2354
+ configSchema: PrismaJson.FunctionServerConfigSchema;
2355
+ status: FunctionServerStatus;
2356
+ errorCode: string | null;
2357
+ errorMessage: string | null;
2358
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
2359
+ supportsOauthTokenRefresh: boolean;
2360
+ functionBayFunctionId: string;
2361
+ functionBayDeploymentId: string;
2362
+ functionBayVersionId: string | null;
2363
+ supportsOAuth: boolean;
2364
+ info: PrismaJson.FunctionServerInfo;
2365
+ providerOid: bigint;
2366
+ } | null;
2367
+ } & {
2368
+ oid: bigint;
2369
+ id: string;
2370
+ serverOid: bigint;
2371
+ createdAt: Date;
2372
+ tenantOid: bigint | null;
2373
+ updatedAt: Date;
2374
+ functionServerOid: bigint | null;
2375
+ status: ServerDeploymentStatus;
2376
+ startedAt: Date | null;
2377
+ endedAt: Date | null;
2378
+ };
2379
+ }>;
2380
+ getOutput: Handler<UndefinedIsOptional<{
2381
+ tenantId: string;
2382
+ serverDeploymentId: string;
2383
+ }>, ({
2384
+ object: string;
2385
+ id: string;
2386
+ status: import("@metorial-services/function-bay-client").FunctionDeploymentStepStatus;
2387
+ name: string;
2388
+ logs: {
2389
+ timestamp: number;
2390
+ message: string;
2391
+ }[];
2392
+ type: "deploy" | "build";
2393
+ createdAt: Date;
2394
+ startedAt: Date | null;
2395
+ endedAt: Date | null;
2396
+ } | {
2397
+ object: string;
2398
+ id: string;
2399
+ status: ServerDeploymentStepStatus;
2400
+ name: string;
2401
+ logs: {
2402
+ timestamp: number;
2403
+ message: string;
2404
+ }[];
2405
+ type: ServerDeploymentStepType;
2406
+ createdAt: Date;
2407
+ startedAt: Date | null;
2408
+ endedAt: Date | null;
2409
+ })[], {
2410
+ tenant: {
2411
+ name: string;
2412
+ oid: bigint;
2413
+ id: string;
2414
+ createdAt: Date;
2415
+ identifier: string;
2416
+ functionBayTenantId: string | null;
2417
+ };
2418
+ serverDeployment: {
2419
+ server: {
2420
+ name: string;
2421
+ oid: bigint;
2422
+ id: string;
2423
+ type: ServerType;
2424
+ createdAt: Date;
2425
+ description: string | null;
2426
+ draftConfigSchema: PrismaJson.ServerConfigSchema;
2427
+ draftConfigTransformer: string;
2428
+ draftRemoteUrl: string | null;
2429
+ draftRemoteProtocol: ServerRemoteProtocol | null;
2430
+ draftRepositoryTagOid: bigint | null;
2431
+ tenantOid: bigint | null;
2432
+ currentVersionOid: bigint | null;
2433
+ remoteOauthConfigOid: bigint | null;
2434
+ delegatedOauthConfigOid: bigint | null;
2435
+ updatedAt: Date;
2436
+ };
2437
+ tenant: {
2438
+ name: string;
2439
+ oid: bigint;
2440
+ id: string;
2441
+ createdAt: Date;
2442
+ identifier: string;
2443
+ functionBayTenantId: string | null;
2444
+ } | null;
2445
+ functionServer: {
2446
+ oid: bigint;
2447
+ id: string;
2448
+ serverOid: bigint;
2449
+ createdAt: Date;
2450
+ delegatedOauthConfigOid: bigint | null;
2451
+ functionBayTenantId: string;
2452
+ configSchema: PrismaJson.FunctionServerConfigSchema;
2453
+ status: FunctionServerStatus;
2454
+ errorCode: string | null;
2455
+ errorMessage: string | null;
2456
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
2457
+ supportsOauthTokenRefresh: boolean;
2458
+ functionBayFunctionId: string;
2459
+ functionBayDeploymentId: string;
2460
+ functionBayVersionId: string | null;
2461
+ supportsOAuth: boolean;
2462
+ info: PrismaJson.FunctionServerInfo;
2463
+ providerOid: bigint;
2464
+ } | null;
2465
+ } & {
2466
+ oid: bigint;
2467
+ id: string;
2468
+ serverOid: bigint;
2469
+ createdAt: Date;
2470
+ tenantOid: bigint | null;
2471
+ updatedAt: Date;
2472
+ functionServerOid: bigint | null;
2473
+ status: ServerDeploymentStatus;
2474
+ startedAt: Date | null;
2475
+ endedAt: Date | null;
2476
+ };
2477
+ }>;
2478
+ };
2479
+ serverConnection: {
2480
+ list: Handler<Partial<Pick<{
2481
+ tenantId: string;
2482
+ }, never>> & {
2483
+ tenantId: string;
2484
+ } & {
2485
+ limit?: number;
2486
+ after?: string;
2487
+ before?: string;
2488
+ cursor?: string;
2489
+ order?: "asc" | "desc";
2490
+ }, {
2491
+ __typename: string;
2492
+ items: {
2493
+ object: string;
2494
+ id: string;
2495
+ status: ServerConnectionStatus;
2496
+ client: {
2497
+ version: string;
2498
+ name: string;
2499
+ websiteUrl?: string | undefined;
2500
+ description?: string | undefined;
2501
+ icons?: {
2502
+ src: string;
2503
+ mimeType?: string | undefined;
2504
+ sizes?: string[] | undefined;
2505
+ theme?: "light" | "dark" | undefined;
2506
+ }[] | undefined;
2507
+ title?: string | undefined;
2508
+ };
2509
+ capabilities: {
2510
+ experimental?: {
2511
+ [x: string]: object;
2512
+ } | undefined;
2513
+ sampling?: {
2514
+ context?: object | undefined;
2515
+ tools?: object | undefined;
2516
+ } | undefined;
2517
+ elicitation?: {
2518
+ [x: string]: unknown;
2519
+ form?: {
2520
+ [x: string]: unknown;
2521
+ applyDefaults?: boolean | undefined;
2522
+ } | undefined;
2523
+ url?: object | undefined;
2524
+ } | undefined;
2525
+ roots?: {
2526
+ listChanged?: boolean | undefined;
2527
+ } | undefined;
2528
+ tasks?: {
2529
+ [x: string]: unknown;
2530
+ list?: object | undefined;
2531
+ cancel?: object | undefined;
2532
+ requests?: {
2533
+ [x: string]: unknown;
2534
+ sampling?: {
2535
+ [x: string]: unknown;
2536
+ createMessage?: object | undefined;
2537
+ } | undefined;
2538
+ elicitation?: {
2539
+ [x: string]: unknown;
2540
+ create?: object | undefined;
2541
+ } | undefined;
2542
+ } | undefined;
2543
+ } | undefined;
2544
+ };
2545
+ serverConfigId: string;
2546
+ serverVersionId: string;
2547
+ serverAuthConfigId: string | undefined;
2548
+ createdAt: Date;
2549
+ }[];
2550
+ pagination: {
2551
+ has_more_after: boolean;
2552
+ has_more_before: boolean;
2553
+ };
2554
+ }, {
2555
+ tenant: {
2556
+ name: string;
2557
+ oid: bigint;
2558
+ id: string;
2559
+ createdAt: Date;
2560
+ identifier: string;
2561
+ functionBayTenantId: string | null;
2562
+ };
2563
+ }>;
2564
+ create: Handler<UndefinedIsOptional<{
2565
+ tenantId: string;
2566
+ serverConfigId: string;
2567
+ serverVersionId: string;
2568
+ serverAuthConfigId: string | undefined;
2569
+ networkRulesetIds: string[] | undefined;
2570
+ client: Record<string, any>;
2571
+ capabilities: Record<string, any> | undefined;
2572
+ }>, {
2573
+ object: string;
2574
+ id: string;
2575
+ status: ServerConnectionStatus;
2576
+ client: {
2577
+ version: string;
2578
+ name: string;
2579
+ websiteUrl?: string | undefined;
2580
+ description?: string | undefined;
2581
+ icons?: {
2582
+ src: string;
2583
+ mimeType?: string | undefined;
2584
+ sizes?: string[] | undefined;
2585
+ theme?: "light" | "dark" | undefined;
2586
+ }[] | undefined;
2587
+ title?: string | undefined;
2588
+ };
2589
+ capabilities: {
2590
+ experimental?: {
2591
+ [x: string]: object;
2592
+ } | undefined;
2593
+ sampling?: {
2594
+ context?: object | undefined;
2595
+ tools?: object | undefined;
2596
+ } | undefined;
2597
+ elicitation?: {
2598
+ [x: string]: unknown;
2599
+ form?: {
2600
+ [x: string]: unknown;
2601
+ applyDefaults?: boolean | undefined;
2602
+ } | undefined;
2603
+ url?: object | undefined;
2604
+ } | undefined;
2605
+ roots?: {
2606
+ listChanged?: boolean | undefined;
2607
+ } | undefined;
2608
+ tasks?: {
2609
+ [x: string]: unknown;
2610
+ list?: object | undefined;
2611
+ cancel?: object | undefined;
2612
+ requests?: {
2613
+ [x: string]: unknown;
2614
+ sampling?: {
2615
+ [x: string]: unknown;
2616
+ createMessage?: object | undefined;
2617
+ } | undefined;
2618
+ elicitation?: {
2619
+ [x: string]: unknown;
2620
+ create?: object | undefined;
2621
+ } | undefined;
2622
+ } | undefined;
2623
+ } | undefined;
2624
+ };
2625
+ serverConfigId: string;
2626
+ serverVersionId: string;
2627
+ serverAuthConfigId: string | undefined;
2628
+ createdAt: Date;
2629
+ }, {
2630
+ tenant: {
2631
+ name: string;
2632
+ oid: bigint;
2633
+ id: string;
2634
+ createdAt: Date;
2635
+ identifier: string;
2636
+ functionBayTenantId: string | null;
2637
+ };
2638
+ }>;
2639
+ get: Handler<UndefinedIsOptional<{
2640
+ tenantId: string;
2641
+ serverConnectionId: string;
2642
+ }>, {
2643
+ object: string;
2644
+ id: string;
2645
+ status: ServerConnectionStatus;
2646
+ client: {
2647
+ version: string;
2648
+ name: string;
2649
+ websiteUrl?: string | undefined;
2650
+ description?: string | undefined;
2651
+ icons?: {
2652
+ src: string;
2653
+ mimeType?: string | undefined;
2654
+ sizes?: string[] | undefined;
2655
+ theme?: "light" | "dark" | undefined;
2656
+ }[] | undefined;
2657
+ title?: string | undefined;
2658
+ };
2659
+ capabilities: {
2660
+ experimental?: {
2661
+ [x: string]: object;
2662
+ } | undefined;
2663
+ sampling?: {
2664
+ context?: object | undefined;
2665
+ tools?: object | undefined;
2666
+ } | undefined;
2667
+ elicitation?: {
2668
+ [x: string]: unknown;
2669
+ form?: {
2670
+ [x: string]: unknown;
2671
+ applyDefaults?: boolean | undefined;
2672
+ } | undefined;
2673
+ url?: object | undefined;
2674
+ } | undefined;
2675
+ roots?: {
2676
+ listChanged?: boolean | undefined;
2677
+ } | undefined;
2678
+ tasks?: {
2679
+ [x: string]: unknown;
2680
+ list?: object | undefined;
2681
+ cancel?: object | undefined;
2682
+ requests?: {
2683
+ [x: string]: unknown;
2684
+ sampling?: {
2685
+ [x: string]: unknown;
2686
+ createMessage?: object | undefined;
2687
+ } | undefined;
2688
+ elicitation?: {
2689
+ [x: string]: unknown;
2690
+ create?: object | undefined;
2691
+ } | undefined;
2692
+ } | undefined;
2693
+ } | undefined;
2694
+ };
2695
+ serverConfigId: string;
2696
+ serverVersionId: string;
2697
+ serverAuthConfigId: string | undefined;
2698
+ createdAt: Date;
2699
+ }, {
2700
+ tenant: {
2701
+ name: string;
2702
+ oid: bigint;
2703
+ id: string;
2704
+ createdAt: Date;
2705
+ identifier: string;
2706
+ functionBayTenantId: string | null;
2707
+ };
2708
+ serverConnection: {
2709
+ serverVersion: {
2710
+ oid: bigint;
2711
+ id: string;
2712
+ serverOid: bigint;
2713
+ createdAt: Date;
2714
+ tenantOid: bigint | null;
2715
+ updatedAt: Date;
2716
+ identifier: string;
2717
+ isCurrent: boolean;
2718
+ configSchema: PrismaJson.ServerConfigSchema;
2719
+ configTransformer: string;
2720
+ remoteUrl: string | null;
2721
+ remoteProtocol: ServerRemoteProtocol | null;
2722
+ repositoryTagOid: bigint | null;
2723
+ repositoryVersionOid: bigint | null;
2724
+ functionServerOid: bigint | null;
2725
+ deploymentOid: bigint;
2726
+ };
2727
+ serverAuthConfig: {
2728
+ oid: bigint;
2729
+ id: string;
2730
+ type: ServerAuthConfigType;
2731
+ serverOid: bigint;
2732
+ createdAt: Date;
2733
+ tenantOid: bigint;
2734
+ updatedAt: Date;
2735
+ credentialsOid: bigint | null;
2736
+ remoteOAuthConnectionOid: bigint | null;
2737
+ remoteOAuthConnectionAuthTokenOid: bigint | null;
2738
+ delegatedOAuthConnectionOid: bigint | null;
2739
+ delegatedOAuthConnectionAuthTokenOid: bigint | null;
2740
+ } | null;
2741
+ serverConfig: {
2742
+ oid: bigint;
2743
+ id: string;
2744
+ serverOid: bigint;
2745
+ createdAt: Date;
2746
+ tenantOid: bigint;
2747
+ updatedAt: Date;
2748
+ secretOid: bigint;
2749
+ };
2750
+ } & {
2751
+ oid: bigint;
2752
+ id: string;
2753
+ serverVersionOid: bigint;
2754
+ createdAt: Date;
2755
+ tenantOid: bigint;
2756
+ status: ServerConnectionStatus;
2757
+ isLogsInStorage: boolean;
2758
+ logBucketOid: bigint;
2759
+ client: PrismaJson.ServerConnectionClient;
2760
+ capabilities: PrismaJson.ServerConnectionCapabilities;
2761
+ serverConfigOid: bigint;
2762
+ serverAuthConfigOid: bigint | null;
2763
+ lastPingAt: Date | null;
2764
+ };
2765
+ }>;
2766
+ getLogs: Handler<UndefinedIsOptional<{
2767
+ tenantId: string;
2768
+ serverConnectionId: string;
2769
+ }>, {
2770
+ timestamp: Date;
2771
+ outputType: PrismaJson.OutputType;
2772
+ message: string;
2773
+ }[] | undefined, {
2774
+ tenant: {
2775
+ name: string;
2776
+ oid: bigint;
2777
+ id: string;
2778
+ createdAt: Date;
2779
+ identifier: string;
2780
+ functionBayTenantId: string | null;
2781
+ };
2782
+ serverConnection: {
2783
+ serverVersion: {
2784
+ oid: bigint;
2785
+ id: string;
2786
+ serverOid: bigint;
2787
+ createdAt: Date;
2788
+ tenantOid: bigint | null;
2789
+ updatedAt: Date;
2790
+ identifier: string;
2791
+ isCurrent: boolean;
2792
+ configSchema: PrismaJson.ServerConfigSchema;
2793
+ configTransformer: string;
2794
+ remoteUrl: string | null;
2795
+ remoteProtocol: ServerRemoteProtocol | null;
2796
+ repositoryTagOid: bigint | null;
2797
+ repositoryVersionOid: bigint | null;
2798
+ functionServerOid: bigint | null;
2799
+ deploymentOid: bigint;
2800
+ };
2801
+ serverAuthConfig: {
2802
+ oid: bigint;
2803
+ id: string;
2804
+ type: ServerAuthConfigType;
2805
+ serverOid: bigint;
2806
+ createdAt: Date;
2807
+ tenantOid: bigint;
2808
+ updatedAt: Date;
2809
+ credentialsOid: bigint | null;
2810
+ remoteOAuthConnectionOid: bigint | null;
2811
+ remoteOAuthConnectionAuthTokenOid: bigint | null;
2812
+ delegatedOAuthConnectionOid: bigint | null;
2813
+ delegatedOAuthConnectionAuthTokenOid: bigint | null;
2814
+ } | null;
2815
+ serverConfig: {
2816
+ oid: bigint;
2817
+ id: string;
2818
+ serverOid: bigint;
2819
+ createdAt: Date;
2820
+ tenantOid: bigint;
2821
+ updatedAt: Date;
2822
+ secretOid: bigint;
2823
+ };
2824
+ } & {
2825
+ oid: bigint;
2826
+ id: string;
2827
+ serverVersionOid: bigint;
2828
+ createdAt: Date;
2829
+ tenantOid: bigint;
2830
+ status: ServerConnectionStatus;
2831
+ isLogsInStorage: boolean;
2832
+ logBucketOid: bigint;
2833
+ client: PrismaJson.ServerConnectionClient;
2834
+ capabilities: PrismaJson.ServerConnectionCapabilities;
2835
+ serverConfigOid: bigint;
2836
+ serverAuthConfigOid: bigint | null;
2837
+ lastPingAt: Date | null;
2838
+ };
2839
+ }>;
2840
+ };
2841
+ serverAuthConfig: {
2842
+ list: Handler<Partial<Pick<{
2843
+ tenantId: string;
2844
+ }, never>> & {
2845
+ tenantId: string;
2846
+ } & {
2847
+ limit?: number;
2848
+ after?: string;
2849
+ before?: string;
2850
+ cursor?: string;
2851
+ order?: "asc" | "desc";
2852
+ }, {
2853
+ __typename: string;
2854
+ items: {
2855
+ object: string;
2856
+ id: string;
2857
+ type: ServerAuthConfigType;
2858
+ source: RemoteOAuthConnectionAuthTokenSource;
2859
+ authConfig: PrismaJson.DelegatedOAuthConnectionAuthConfig;
2860
+ credentials: {
2861
+ object: string;
2862
+ id: string;
2863
+ type: ServerOAuthCredentialsType;
2864
+ registrationType: "manual" | "automatic";
2865
+ clientId: string | null;
2866
+ oauthConfig: {
2867
+ type: "remote";
2868
+ name: string | null;
2869
+ config: any;
2870
+ scopes: string[];
2871
+ authConfigSchema: null;
2872
+ provider: {
2873
+ name: string;
2874
+ url: string;
2875
+ };
2876
+ discovery: {
2877
+ status: RemoteOAuthConfigDiscoveryStatus;
2878
+ error: {
2879
+ code: string;
2880
+ message: string;
2881
+ } | null;
2882
+ createdAt: Date;
2883
+ lastDiscoveredAt: Date | null;
2884
+ };
2885
+ } | {
2886
+ type: "delegated";
2887
+ name: string | null;
2888
+ config: null;
2889
+ scopes: never[];
2890
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
2891
+ provider: null;
2892
+ discovery: {
2893
+ status: "succeeded";
2894
+ error: {
2895
+ code: string;
2896
+ message: string;
2897
+ } | null;
2898
+ createdAt: Date;
2899
+ lastDiscoveredAt: null;
2900
+ };
2901
+ } | null;
2902
+ provider: {
2903
+ name: string;
2904
+ url: string;
2905
+ } | null;
2906
+ discovery: {
2907
+ status: RemoteOAuthConnectionDiscoveryStatus;
2908
+ error: {
2909
+ code: string;
2910
+ message: string;
2911
+ } | null;
2912
+ createdAt: Date;
2913
+ lastDiscoveredAt: Date | null;
2914
+ };
2915
+ isDefault: boolean;
2916
+ serverId: string;
2917
+ tenantId: string;
2918
+ createdAt: Date;
2919
+ updatedAt: Date;
2920
+ } | null;
2921
+ profile: {
2922
+ id: string;
2923
+ email: string | null;
2924
+ name: string | null;
2925
+ data: unknown;
2926
+ } | null;
2927
+ serverId: string;
2928
+ tenantId: string;
2929
+ createdAt: Date;
2930
+ updatedAt: Date;
2931
+ }[];
2932
+ pagination: {
2933
+ has_more_after: boolean;
2934
+ has_more_before: boolean;
2935
+ };
2936
+ }, {
2937
+ tenant: {
2938
+ name: string;
2939
+ oid: bigint;
2940
+ id: string;
2941
+ createdAt: Date;
2942
+ identifier: string;
2943
+ functionBayTenantId: string | null;
2944
+ };
2945
+ }>;
2946
+ create: Handler<UndefinedIsOptional<{
2947
+ tenantId: string;
2948
+ serverId: string;
2949
+ config: UndefinedIsOptional<{
2950
+ accessToken: string;
2951
+ expiresAt: string | null | undefined;
2952
+ }>;
2953
+ }>, {
2954
+ object: string;
2955
+ id: string;
2956
+ type: ServerAuthConfigType;
2957
+ source: RemoteOAuthConnectionAuthTokenSource;
2958
+ authConfig: PrismaJson.DelegatedOAuthConnectionAuthConfig;
2959
+ credentials: {
2960
+ object: string;
2961
+ id: string;
2962
+ type: ServerOAuthCredentialsType;
2963
+ registrationType: "manual" | "automatic";
2964
+ clientId: string | null;
2965
+ oauthConfig: {
2966
+ type: "remote";
2967
+ name: string | null;
2968
+ config: any;
2969
+ scopes: string[];
2970
+ authConfigSchema: null;
2971
+ provider: {
2972
+ name: string;
2973
+ url: string;
2974
+ };
2975
+ discovery: {
2976
+ status: RemoteOAuthConfigDiscoveryStatus;
2977
+ error: {
2978
+ code: string;
2979
+ message: string;
2980
+ } | null;
2981
+ createdAt: Date;
2982
+ lastDiscoveredAt: Date | null;
2983
+ };
2984
+ } | {
2985
+ type: "delegated";
2986
+ name: string | null;
2987
+ config: null;
2988
+ scopes: never[];
2989
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
2990
+ provider: null;
2991
+ discovery: {
2992
+ status: "succeeded";
2993
+ error: {
2994
+ code: string;
2995
+ message: string;
2996
+ } | null;
2997
+ createdAt: Date;
2998
+ lastDiscoveredAt: null;
2999
+ };
3000
+ } | null;
3001
+ provider: {
3002
+ name: string;
3003
+ url: string;
3004
+ } | null;
3005
+ discovery: {
3006
+ status: RemoteOAuthConnectionDiscoveryStatus;
3007
+ error: {
3008
+ code: string;
3009
+ message: string;
3010
+ } | null;
3011
+ createdAt: Date;
3012
+ lastDiscoveredAt: Date | null;
3013
+ };
3014
+ isDefault: boolean;
3015
+ serverId: string;
3016
+ tenantId: string;
3017
+ createdAt: Date;
3018
+ updatedAt: Date;
3019
+ } | null;
3020
+ profile: {
3021
+ id: string;
3022
+ email: string | null;
3023
+ name: string | null;
3024
+ data: unknown;
3025
+ } | null;
3026
+ serverId: string;
3027
+ tenantId: string;
3028
+ createdAt: Date;
3029
+ updatedAt: Date;
3030
+ }, {
3031
+ tenant: {
3032
+ name: string;
3033
+ oid: bigint;
3034
+ id: string;
3035
+ createdAt: Date;
3036
+ identifier: string;
3037
+ functionBayTenantId: string | null;
3038
+ };
3039
+ }>;
3040
+ decrypt: Handler<UndefinedIsOptional<{
3041
+ tenantId: string;
3042
+ slateAuthConfigId: string;
3043
+ note: string;
3044
+ }>, {
3045
+ decryptedAuthConfig: {
3046
+ accessToken: string;
3047
+ expiresAt: Date | null;
3048
+ };
3049
+ authConfig: {
3050
+ object: string;
3051
+ id: string;
3052
+ type: ServerAuthConfigType;
3053
+ source: RemoteOAuthConnectionAuthTokenSource;
3054
+ authConfig: PrismaJson.DelegatedOAuthConnectionAuthConfig;
3055
+ credentials: {
3056
+ object: string;
3057
+ id: string;
3058
+ type: ServerOAuthCredentialsType;
3059
+ registrationType: "manual" | "automatic";
3060
+ clientId: string | null;
3061
+ oauthConfig: {
3062
+ type: "remote";
3063
+ name: string | null;
3064
+ config: any;
3065
+ scopes: string[];
3066
+ authConfigSchema: null;
3067
+ provider: {
3068
+ name: string;
3069
+ url: string;
3070
+ };
3071
+ discovery: {
3072
+ status: RemoteOAuthConfigDiscoveryStatus;
3073
+ error: {
3074
+ code: string;
3075
+ message: string;
3076
+ } | null;
3077
+ createdAt: Date;
3078
+ lastDiscoveredAt: Date | null;
3079
+ };
3080
+ } | {
3081
+ type: "delegated";
3082
+ name: string | null;
3083
+ config: null;
3084
+ scopes: never[];
3085
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
3086
+ provider: null;
3087
+ discovery: {
3088
+ status: "succeeded";
3089
+ error: {
3090
+ code: string;
3091
+ message: string;
3092
+ } | null;
3093
+ createdAt: Date;
3094
+ lastDiscoveredAt: null;
3095
+ };
3096
+ } | null;
3097
+ provider: {
3098
+ name: string;
3099
+ url: string;
3100
+ } | null;
3101
+ discovery: {
3102
+ status: RemoteOAuthConnectionDiscoveryStatus;
3103
+ error: {
3104
+ code: string;
3105
+ message: string;
3106
+ } | null;
3107
+ createdAt: Date;
3108
+ lastDiscoveredAt: Date | null;
3109
+ };
3110
+ isDefault: boolean;
3111
+ serverId: string;
3112
+ tenantId: string;
3113
+ createdAt: Date;
3114
+ updatedAt: Date;
3115
+ } | null;
3116
+ profile: {
3117
+ id: string;
3118
+ email: string | null;
3119
+ name: string | null;
3120
+ data: unknown;
3121
+ } | null;
3122
+ serverId: string;
3123
+ tenantId: string;
3124
+ createdAt: Date;
3125
+ updatedAt: Date;
3126
+ };
3127
+ }, {
3128
+ tenant: {
3129
+ name: string;
3130
+ oid: bigint;
3131
+ id: string;
3132
+ createdAt: Date;
3133
+ identifier: string;
3134
+ functionBayTenantId: string | null;
3135
+ };
3136
+ serverAuthConfig: {
3137
+ server: {
3138
+ name: string;
3139
+ oid: bigint;
3140
+ id: string;
3141
+ type: ServerType;
3142
+ createdAt: Date;
3143
+ description: string | null;
3144
+ draftConfigSchema: PrismaJson.ServerConfigSchema;
3145
+ draftConfigTransformer: string;
3146
+ draftRemoteUrl: string | null;
3147
+ draftRemoteProtocol: ServerRemoteProtocol | null;
3148
+ draftRepositoryTagOid: bigint | null;
3149
+ tenantOid: bigint | null;
3150
+ currentVersionOid: bigint | null;
3151
+ remoteOauthConfigOid: bigint | null;
3152
+ delegatedOauthConfigOid: bigint | null;
3153
+ updatedAt: Date;
3154
+ };
3155
+ tenant: {
3156
+ name: string;
3157
+ oid: bigint;
3158
+ id: string;
3159
+ createdAt: Date;
3160
+ identifier: string;
3161
+ functionBayTenantId: string | null;
3162
+ };
3163
+ remoteOAuthConnectionAuthToken: ({
3164
+ connectionProfile: {
3165
+ name: string | null;
3166
+ oid: bigint;
3167
+ id: string;
3168
+ createdAt: Date;
3169
+ tenantOid: bigint;
3170
+ updatedAt: Date;
3171
+ connectionOid: bigint;
3172
+ lastUsedAt: Date;
3173
+ sub: string;
3174
+ email: string | null;
3175
+ rawProfile: unknown | null;
3176
+ } | null;
3177
+ } & {
3178
+ oid: bigint;
3179
+ id: string;
3180
+ serverOid: bigint;
3181
+ createdAt: Date;
3182
+ tenantOid: bigint;
3183
+ secretOid: bigint;
3184
+ configOid: bigint;
3185
+ source: RemoteOAuthConnectionAuthTokenSource;
3186
+ scope: string | null;
3187
+ tokenType: string | null;
3188
+ idToken: string | null;
3189
+ expiresAt: Date | null;
3190
+ connectionProfileOid: bigint | null;
3191
+ connectionOid: bigint | null;
3192
+ firstErrorAt: Date | null;
3193
+ lastErrorAt: Date | null;
3194
+ errorDisabledAt: Date | null;
3195
+ errorCount: number;
3196
+ lastUsedAt: Date;
3197
+ refreshedAt: Date | null;
3198
+ }) | null;
3199
+ delegatedOAuthConnectionAuthToken: {
3200
+ oid: bigint;
3201
+ id: string;
3202
+ serverOid: bigint;
3203
+ createdAt: Date;
3204
+ tenantOid: bigint;
3205
+ secretOid: bigint;
3206
+ configOid: bigint;
3207
+ source: DelegatedOAuthConnectionAuthTokenSource;
3208
+ scope: string | null;
3209
+ tokenType: string | null;
3210
+ idToken: string | null;
3211
+ expiresAt: Date | null;
3212
+ connectionOid: bigint | null;
3213
+ firstErrorAt: Date | null;
3214
+ lastErrorAt: Date | null;
3215
+ errorDisabledAt: Date | null;
3216
+ errorCount: number;
3217
+ lastUsedAt: Date;
3218
+ refreshedAt: Date | null;
3219
+ authConfigValue: PrismaJson.DelegatedOAuthConnectionAuthConfig;
3220
+ authStateValue: PrismaJson.DelegatedOAuthConnectionAuthState;
3221
+ } | null;
3222
+ credentials: ({
3223
+ remoteConnection: ({
3224
+ config: {
3225
+ name: string | null;
3226
+ oid: bigint;
3227
+ id: string;
3228
+ serverOid: bigint;
3229
+ createdAt: Date;
3230
+ discoverStatus: RemoteOAuthConfigDiscoveryStatus;
3231
+ config: PrismaJson.RemoteOAuthConfig;
3232
+ providerName: string;
3233
+ providerUrl: string;
3234
+ discoveryUrl: string | null;
3235
+ errorCode: string | null;
3236
+ errorMessage: string | null;
3237
+ scopes: string[];
3238
+ oauthDiscoveryDocumentOid: bigint | null;
3239
+ lastDiscoveredAt: Date | null;
3240
+ };
3241
+ registration: {
3242
+ oid: bigint;
3243
+ id: string;
3244
+ createdAt: Date;
3245
+ clientId: string;
3246
+ clientSecret: string | null;
3247
+ autoRegistrationName: string | null;
3248
+ registrationClientUri: string | null;
3249
+ registrationAccessToken: string | null;
3250
+ clientSecretExpiresAt: Date | null;
3251
+ data: PrismaJson.RemoteOAuthAutoRegistrationData;
3252
+ discoveryDocumentOid: bigint | null;
3253
+ } | null;
3254
+ } & {
3255
+ oid: bigint;
3256
+ id: string;
3257
+ serverOid: bigint;
3258
+ createdAt: Date;
3259
+ tenantOid: bigint;
3260
+ updatedAt: Date;
3261
+ secretOid: bigint | null;
3262
+ discoveryStatus: RemoteOAuthConnectionDiscoveryStatus;
3263
+ status: RemoteOAuthConnectionStatus;
3264
+ providerName: string;
3265
+ providerUrl: string;
3266
+ discoveryUrl: string | null;
3267
+ errorCode: string | null;
3268
+ errorMessage: string | null;
3269
+ scopes: string[];
3270
+ clientId: string | null;
3271
+ configOid: bigint;
3272
+ registrationOid: bigint | null;
3273
+ }) | null;
3274
+ delegatedConnection: ({
3275
+ config: {
3276
+ name: string | null;
3277
+ oid: bigint;
3278
+ id: string;
3279
+ serverOid: bigint;
3280
+ createdAt: Date;
3281
+ functionServerOid: bigint;
3282
+ errorCode: string | null;
3283
+ errorMessage: string | null;
3284
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
3285
+ authConfigSchemaHash: string;
3286
+ supportsOauthTokenRefresh: boolean;
3287
+ };
3288
+ functionServer: {
3289
+ oid: bigint;
3290
+ id: string;
3291
+ serverOid: bigint;
3292
+ createdAt: Date;
3293
+ delegatedOauthConfigOid: bigint | null;
3294
+ functionBayTenantId: string;
3295
+ configSchema: PrismaJson.FunctionServerConfigSchema;
3296
+ status: FunctionServerStatus;
3297
+ errorCode: string | null;
3298
+ errorMessage: string | null;
3299
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
3300
+ supportsOauthTokenRefresh: boolean;
3301
+ functionBayFunctionId: string;
3302
+ functionBayDeploymentId: string;
3303
+ functionBayVersionId: string | null;
3304
+ supportsOAuth: boolean;
3305
+ info: PrismaJson.FunctionServerInfo;
3306
+ providerOid: bigint;
3307
+ };
3308
+ } & {
3309
+ oid: bigint;
3310
+ id: string;
3311
+ serverOid: bigint;
3312
+ createdAt: Date;
3313
+ tenantOid: bigint;
3314
+ updatedAt: Date;
3315
+ functionServerOid: bigint;
3316
+ secretOid: bigint | null;
3317
+ status: DelegatedOAuthConnectionStatus;
3318
+ errorCode: string | null;
3319
+ errorMessage: string | null;
3320
+ clientId: string;
3321
+ configOid: bigint;
3322
+ }) | null;
3323
+ } & {
3324
+ oid: bigint;
3325
+ id: string;
3326
+ type: ServerOAuthCredentialsType;
3327
+ serverOid: bigint;
3328
+ createdAt: Date;
3329
+ tenantOid: bigint;
3330
+ updatedAt: Date;
3331
+ isDefault: boolean;
3332
+ remoteConnectionOid: bigint | null;
3333
+ delegatedConnectionOid: bigint | null;
3334
+ }) | null;
3335
+ } & {
3336
+ oid: bigint;
3337
+ id: string;
3338
+ type: ServerAuthConfigType;
3339
+ serverOid: bigint;
3340
+ createdAt: Date;
3341
+ tenantOid: bigint;
3342
+ updatedAt: Date;
3343
+ credentialsOid: bigint | null;
3344
+ remoteOAuthConnectionOid: bigint | null;
3345
+ remoteOAuthConnectionAuthTokenOid: bigint | null;
3346
+ delegatedOAuthConnectionOid: bigint | null;
3347
+ delegatedOAuthConnectionAuthTokenOid: bigint | null;
3348
+ };
3349
+ }>;
3350
+ get: Handler<UndefinedIsOptional<{
3351
+ tenantId: string;
3352
+ serverAuthConfigId: string;
3353
+ }>, {
3354
+ object: string;
3355
+ id: string;
3356
+ type: ServerAuthConfigType;
3357
+ source: RemoteOAuthConnectionAuthTokenSource;
3358
+ authConfig: PrismaJson.DelegatedOAuthConnectionAuthConfig;
3359
+ credentials: {
3360
+ object: string;
3361
+ id: string;
3362
+ type: ServerOAuthCredentialsType;
3363
+ registrationType: "manual" | "automatic";
3364
+ clientId: string | null;
3365
+ oauthConfig: {
3366
+ type: "remote";
3367
+ name: string | null;
3368
+ config: any;
3369
+ scopes: string[];
3370
+ authConfigSchema: null;
3371
+ provider: {
3372
+ name: string;
3373
+ url: string;
3374
+ };
3375
+ discovery: {
3376
+ status: RemoteOAuthConfigDiscoveryStatus;
3377
+ error: {
3378
+ code: string;
3379
+ message: string;
3380
+ } | null;
3381
+ createdAt: Date;
3382
+ lastDiscoveredAt: Date | null;
3383
+ };
3384
+ } | {
3385
+ type: "delegated";
3386
+ name: string | null;
3387
+ config: null;
3388
+ scopes: never[];
3389
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
3390
+ provider: null;
3391
+ discovery: {
3392
+ status: "succeeded";
3393
+ error: {
3394
+ code: string;
3395
+ message: string;
3396
+ } | null;
3397
+ createdAt: Date;
3398
+ lastDiscoveredAt: null;
3399
+ };
3400
+ } | null;
3401
+ provider: {
3402
+ name: string;
3403
+ url: string;
3404
+ } | null;
3405
+ discovery: {
3406
+ status: RemoteOAuthConnectionDiscoveryStatus;
3407
+ error: {
3408
+ code: string;
3409
+ message: string;
3410
+ } | null;
3411
+ createdAt: Date;
3412
+ lastDiscoveredAt: Date | null;
3413
+ };
3414
+ isDefault: boolean;
3415
+ serverId: string;
3416
+ tenantId: string;
3417
+ createdAt: Date;
3418
+ updatedAt: Date;
3419
+ } | null;
3420
+ profile: {
3421
+ id: string;
3422
+ email: string | null;
3423
+ name: string | null;
3424
+ data: unknown;
3425
+ } | null;
3426
+ serverId: string;
3427
+ tenantId: string;
3428
+ createdAt: Date;
3429
+ updatedAt: Date;
3430
+ }, {
3431
+ tenant: {
3432
+ name: string;
3433
+ oid: bigint;
3434
+ id: string;
3435
+ createdAt: Date;
3436
+ identifier: string;
3437
+ functionBayTenantId: string | null;
3438
+ };
3439
+ serverAuthConfig: {
3440
+ server: {
3441
+ name: string;
3442
+ oid: bigint;
3443
+ id: string;
3444
+ type: ServerType;
3445
+ createdAt: Date;
3446
+ description: string | null;
3447
+ draftConfigSchema: PrismaJson.ServerConfigSchema;
3448
+ draftConfigTransformer: string;
3449
+ draftRemoteUrl: string | null;
3450
+ draftRemoteProtocol: ServerRemoteProtocol | null;
3451
+ draftRepositoryTagOid: bigint | null;
3452
+ tenantOid: bigint | null;
3453
+ currentVersionOid: bigint | null;
3454
+ remoteOauthConfigOid: bigint | null;
3455
+ delegatedOauthConfigOid: bigint | null;
3456
+ updatedAt: Date;
3457
+ };
3458
+ tenant: {
3459
+ name: string;
3460
+ oid: bigint;
3461
+ id: string;
3462
+ createdAt: Date;
3463
+ identifier: string;
3464
+ functionBayTenantId: string | null;
3465
+ };
3466
+ remoteOAuthConnectionAuthToken: ({
3467
+ connectionProfile: {
3468
+ name: string | null;
3469
+ oid: bigint;
3470
+ id: string;
3471
+ createdAt: Date;
3472
+ tenantOid: bigint;
3473
+ updatedAt: Date;
3474
+ connectionOid: bigint;
3475
+ lastUsedAt: Date;
3476
+ sub: string;
3477
+ email: string | null;
3478
+ rawProfile: unknown | null;
3479
+ } | null;
3480
+ } & {
3481
+ oid: bigint;
3482
+ id: string;
3483
+ serverOid: bigint;
3484
+ createdAt: Date;
3485
+ tenantOid: bigint;
3486
+ secretOid: bigint;
3487
+ configOid: bigint;
3488
+ source: RemoteOAuthConnectionAuthTokenSource;
3489
+ scope: string | null;
3490
+ tokenType: string | null;
3491
+ idToken: string | null;
3492
+ expiresAt: Date | null;
3493
+ connectionProfileOid: bigint | null;
3494
+ connectionOid: bigint | null;
3495
+ firstErrorAt: Date | null;
3496
+ lastErrorAt: Date | null;
3497
+ errorDisabledAt: Date | null;
3498
+ errorCount: number;
3499
+ lastUsedAt: Date;
3500
+ refreshedAt: Date | null;
3501
+ }) | null;
3502
+ delegatedOAuthConnectionAuthToken: {
3503
+ oid: bigint;
3504
+ id: string;
3505
+ serverOid: bigint;
3506
+ createdAt: Date;
3507
+ tenantOid: bigint;
3508
+ secretOid: bigint;
3509
+ configOid: bigint;
3510
+ source: DelegatedOAuthConnectionAuthTokenSource;
3511
+ scope: string | null;
3512
+ tokenType: string | null;
3513
+ idToken: string | null;
3514
+ expiresAt: Date | null;
3515
+ connectionOid: bigint | null;
3516
+ firstErrorAt: Date | null;
3517
+ lastErrorAt: Date | null;
3518
+ errorDisabledAt: Date | null;
3519
+ errorCount: number;
3520
+ lastUsedAt: Date;
3521
+ refreshedAt: Date | null;
3522
+ authConfigValue: PrismaJson.DelegatedOAuthConnectionAuthConfig;
3523
+ authStateValue: PrismaJson.DelegatedOAuthConnectionAuthState;
3524
+ } | null;
3525
+ credentials: ({
3526
+ remoteConnection: ({
3527
+ config: {
3528
+ name: string | null;
3529
+ oid: bigint;
3530
+ id: string;
3531
+ serverOid: bigint;
3532
+ createdAt: Date;
3533
+ discoverStatus: RemoteOAuthConfigDiscoveryStatus;
3534
+ config: PrismaJson.RemoteOAuthConfig;
3535
+ providerName: string;
3536
+ providerUrl: string;
3537
+ discoveryUrl: string | null;
3538
+ errorCode: string | null;
3539
+ errorMessage: string | null;
3540
+ scopes: string[];
3541
+ oauthDiscoveryDocumentOid: bigint | null;
3542
+ lastDiscoveredAt: Date | null;
3543
+ };
3544
+ registration: {
3545
+ oid: bigint;
3546
+ id: string;
3547
+ createdAt: Date;
3548
+ clientId: string;
3549
+ clientSecret: string | null;
3550
+ autoRegistrationName: string | null;
3551
+ registrationClientUri: string | null;
3552
+ registrationAccessToken: string | null;
3553
+ clientSecretExpiresAt: Date | null;
3554
+ data: PrismaJson.RemoteOAuthAutoRegistrationData;
3555
+ discoveryDocumentOid: bigint | null;
3556
+ } | null;
3557
+ } & {
3558
+ oid: bigint;
3559
+ id: string;
3560
+ serverOid: bigint;
3561
+ createdAt: Date;
3562
+ tenantOid: bigint;
3563
+ updatedAt: Date;
3564
+ secretOid: bigint | null;
3565
+ discoveryStatus: RemoteOAuthConnectionDiscoveryStatus;
3566
+ status: RemoteOAuthConnectionStatus;
3567
+ providerName: string;
3568
+ providerUrl: string;
3569
+ discoveryUrl: string | null;
3570
+ errorCode: string | null;
3571
+ errorMessage: string | null;
3572
+ scopes: string[];
3573
+ clientId: string | null;
3574
+ configOid: bigint;
3575
+ registrationOid: bigint | null;
3576
+ }) | null;
3577
+ delegatedConnection: ({
3578
+ config: {
3579
+ name: string | null;
3580
+ oid: bigint;
3581
+ id: string;
3582
+ serverOid: bigint;
3583
+ createdAt: Date;
3584
+ functionServerOid: bigint;
3585
+ errorCode: string | null;
3586
+ errorMessage: string | null;
3587
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
3588
+ authConfigSchemaHash: string;
3589
+ supportsOauthTokenRefresh: boolean;
3590
+ };
3591
+ functionServer: {
3592
+ oid: bigint;
3593
+ id: string;
3594
+ serverOid: bigint;
3595
+ createdAt: Date;
3596
+ delegatedOauthConfigOid: bigint | null;
3597
+ functionBayTenantId: string;
3598
+ configSchema: PrismaJson.FunctionServerConfigSchema;
3599
+ status: FunctionServerStatus;
3600
+ errorCode: string | null;
3601
+ errorMessage: string | null;
3602
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
3603
+ supportsOauthTokenRefresh: boolean;
3604
+ functionBayFunctionId: string;
3605
+ functionBayDeploymentId: string;
3606
+ functionBayVersionId: string | null;
3607
+ supportsOAuth: boolean;
3608
+ info: PrismaJson.FunctionServerInfo;
3609
+ providerOid: bigint;
3610
+ };
3611
+ } & {
3612
+ oid: bigint;
3613
+ id: string;
3614
+ serverOid: bigint;
3615
+ createdAt: Date;
3616
+ tenantOid: bigint;
3617
+ updatedAt: Date;
3618
+ functionServerOid: bigint;
3619
+ secretOid: bigint | null;
3620
+ status: DelegatedOAuthConnectionStatus;
3621
+ errorCode: string | null;
3622
+ errorMessage: string | null;
3623
+ clientId: string;
3624
+ configOid: bigint;
3625
+ }) | null;
3626
+ } & {
3627
+ oid: bigint;
3628
+ id: string;
3629
+ type: ServerOAuthCredentialsType;
3630
+ serverOid: bigint;
3631
+ createdAt: Date;
3632
+ tenantOid: bigint;
3633
+ updatedAt: Date;
3634
+ isDefault: boolean;
3635
+ remoteConnectionOid: bigint | null;
3636
+ delegatedConnectionOid: bigint | null;
3637
+ }) | null;
3638
+ } & {
3639
+ oid: bigint;
3640
+ id: string;
3641
+ type: ServerAuthConfigType;
3642
+ serverOid: bigint;
3643
+ createdAt: Date;
3644
+ tenantOid: bigint;
3645
+ updatedAt: Date;
3646
+ credentialsOid: bigint | null;
3647
+ remoteOAuthConnectionOid: bigint | null;
3648
+ remoteOAuthConnectionAuthTokenOid: bigint | null;
3649
+ delegatedOAuthConnectionOid: bigint | null;
3650
+ delegatedOAuthConnectionAuthTokenOid: bigint | null;
3651
+ };
3652
+ }>;
3653
+ };
3654
+ serverOAuthSetup: {
3655
+ list: Handler<Partial<Pick<{
3656
+ tenantId: string;
3657
+ }, never>> & {
3658
+ tenantId: string;
3659
+ } & {
3660
+ limit?: number;
3661
+ after?: string;
3662
+ before?: string;
3663
+ cursor?: string;
3664
+ order?: "asc" | "desc";
3665
+ }, {
3666
+ __typename: string;
3667
+ items: {
3668
+ object: string;
3669
+ id: string;
3670
+ type: ServerOAuthSetupType;
3671
+ status: ServerOAuthSetupStatus;
3672
+ url: string;
3673
+ authConfig: {
3674
+ object: string;
3675
+ id: string;
3676
+ type: ServerAuthConfigType;
3677
+ source: RemoteOAuthConnectionAuthTokenSource;
3678
+ authConfig: PrismaJson.DelegatedOAuthConnectionAuthConfig;
3679
+ credentials: {
3680
+ object: string;
3681
+ id: string;
3682
+ type: ServerOAuthCredentialsType;
3683
+ registrationType: "manual" | "automatic";
3684
+ clientId: string | null;
3685
+ oauthConfig: {
3686
+ type: "remote";
3687
+ name: string | null;
3688
+ config: any;
3689
+ scopes: string[];
3690
+ authConfigSchema: null;
3691
+ provider: {
3692
+ name: string;
3693
+ url: string;
3694
+ };
3695
+ discovery: {
3696
+ status: RemoteOAuthConfigDiscoveryStatus;
3697
+ error: {
3698
+ code: string;
3699
+ message: string;
3700
+ } | null;
3701
+ createdAt: Date;
3702
+ lastDiscoveredAt: Date | null;
3703
+ };
3704
+ } | {
3705
+ type: "delegated";
3706
+ name: string | null;
3707
+ config: null;
3708
+ scopes: never[];
3709
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
3710
+ provider: null;
3711
+ discovery: {
3712
+ status: "succeeded";
3713
+ error: {
3714
+ code: string;
3715
+ message: string;
3716
+ } | null;
3717
+ createdAt: Date;
3718
+ lastDiscoveredAt: null;
3719
+ };
3720
+ } | null;
3721
+ provider: {
3722
+ name: string;
3723
+ url: string;
3724
+ } | null;
3725
+ discovery: {
3726
+ status: RemoteOAuthConnectionDiscoveryStatus;
3727
+ error: {
3728
+ code: string;
3729
+ message: string;
3730
+ } | null;
3731
+ createdAt: Date;
3732
+ lastDiscoveredAt: Date | null;
3733
+ };
3734
+ isDefault: boolean;
3735
+ serverId: string;
3736
+ tenantId: string;
3737
+ createdAt: Date;
3738
+ updatedAt: Date;
3739
+ } | null;
3740
+ profile: {
3741
+ id: string;
3742
+ email: string | null;
3743
+ name: string | null;
3744
+ data: unknown;
3745
+ } | null;
3746
+ serverId: string;
3747
+ tenantId: string;
3748
+ createdAt: Date;
3749
+ updatedAt: Date;
3750
+ } | null;
3751
+ credentials: {
3752
+ object: string;
3753
+ id: string;
3754
+ type: ServerOAuthCredentialsType;
3755
+ registrationType: "manual" | "automatic";
3756
+ clientId: string | null;
3757
+ oauthConfig: {
3758
+ type: "remote";
3759
+ name: string | null;
3760
+ config: any;
3761
+ scopes: string[];
3762
+ authConfigSchema: null;
3763
+ provider: {
3764
+ name: string;
3765
+ url: string;
3766
+ };
3767
+ discovery: {
3768
+ status: RemoteOAuthConfigDiscoveryStatus;
3769
+ error: {
3770
+ code: string;
3771
+ message: string;
3772
+ } | null;
3773
+ createdAt: Date;
3774
+ lastDiscoveredAt: Date | null;
3775
+ };
3776
+ } | {
3777
+ type: "delegated";
3778
+ name: string | null;
3779
+ config: null;
3780
+ scopes: never[];
3781
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
3782
+ provider: null;
3783
+ discovery: {
3784
+ status: "succeeded";
3785
+ error: {
3786
+ code: string;
3787
+ message: string;
3788
+ } | null;
3789
+ createdAt: Date;
3790
+ lastDiscoveredAt: null;
3791
+ };
3792
+ } | null;
3793
+ provider: {
3794
+ name: string;
3795
+ url: string;
3796
+ } | null;
3797
+ discovery: {
3798
+ status: RemoteOAuthConnectionDiscoveryStatus;
3799
+ error: {
3800
+ code: string;
3801
+ message: string;
3802
+ } | null;
3803
+ createdAt: Date;
3804
+ lastDiscoveredAt: Date | null;
3805
+ };
3806
+ isDefault: boolean;
3807
+ serverId: string;
3808
+ tenantId: string;
3809
+ createdAt: Date;
3810
+ updatedAt: Date;
3811
+ };
3812
+ serverId: string;
3813
+ tenantId: string;
3814
+ credentialsId: string;
3815
+ createdAt: Date;
3816
+ updatedAt: Date;
3817
+ }[];
3818
+ pagination: {
3819
+ has_more_after: boolean;
3820
+ has_more_before: boolean;
3821
+ };
3822
+ }, {
3823
+ tenant: {
3824
+ name: string;
3825
+ oid: bigint;
3826
+ id: string;
3827
+ createdAt: Date;
3828
+ identifier: string;
3829
+ functionBayTenantId: string | null;
3830
+ };
3831
+ }>;
3832
+ create: Handler<UndefinedIsOptional<{
3833
+ tenantId: string;
3834
+ serverCredentialsId: string | undefined;
3835
+ serverId: string;
3836
+ redirectUri: string;
3837
+ }>, {
3838
+ object: string;
3839
+ id: string;
3840
+ type: ServerOAuthSetupType;
3841
+ status: ServerOAuthSetupStatus;
3842
+ url: string;
3843
+ authConfig: {
3844
+ object: string;
3845
+ id: string;
3846
+ type: ServerAuthConfigType;
3847
+ source: RemoteOAuthConnectionAuthTokenSource;
3848
+ authConfig: PrismaJson.DelegatedOAuthConnectionAuthConfig;
3849
+ credentials: {
3850
+ object: string;
3851
+ id: string;
3852
+ type: ServerOAuthCredentialsType;
3853
+ registrationType: "manual" | "automatic";
3854
+ clientId: string | null;
3855
+ oauthConfig: {
3856
+ type: "remote";
3857
+ name: string | null;
3858
+ config: any;
3859
+ scopes: string[];
3860
+ authConfigSchema: null;
3861
+ provider: {
3862
+ name: string;
3863
+ url: string;
3864
+ };
3865
+ discovery: {
3866
+ status: RemoteOAuthConfigDiscoveryStatus;
3867
+ error: {
3868
+ code: string;
3869
+ message: string;
3870
+ } | null;
3871
+ createdAt: Date;
3872
+ lastDiscoveredAt: Date | null;
3873
+ };
3874
+ } | {
3875
+ type: "delegated";
3876
+ name: string | null;
3877
+ config: null;
3878
+ scopes: never[];
3879
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
3880
+ provider: null;
3881
+ discovery: {
3882
+ status: "succeeded";
3883
+ error: {
3884
+ code: string;
3885
+ message: string;
3886
+ } | null;
3887
+ createdAt: Date;
3888
+ lastDiscoveredAt: null;
3889
+ };
3890
+ } | null;
3891
+ provider: {
3892
+ name: string;
3893
+ url: string;
3894
+ } | null;
3895
+ discovery: {
3896
+ status: RemoteOAuthConnectionDiscoveryStatus;
3897
+ error: {
3898
+ code: string;
3899
+ message: string;
3900
+ } | null;
3901
+ createdAt: Date;
3902
+ lastDiscoveredAt: Date | null;
3903
+ };
3904
+ isDefault: boolean;
3905
+ serverId: string;
3906
+ tenantId: string;
3907
+ createdAt: Date;
3908
+ updatedAt: Date;
3909
+ } | null;
3910
+ profile: {
3911
+ id: string;
3912
+ email: string | null;
3913
+ name: string | null;
3914
+ data: unknown;
3915
+ } | null;
3916
+ serverId: string;
3917
+ tenantId: string;
3918
+ createdAt: Date;
3919
+ updatedAt: Date;
3920
+ } | null;
3921
+ credentials: {
3922
+ object: string;
3923
+ id: string;
3924
+ type: ServerOAuthCredentialsType;
3925
+ registrationType: "manual" | "automatic";
3926
+ clientId: string | null;
3927
+ oauthConfig: {
3928
+ type: "remote";
3929
+ name: string | null;
3930
+ config: any;
3931
+ scopes: string[];
3932
+ authConfigSchema: null;
3933
+ provider: {
3934
+ name: string;
3935
+ url: string;
3936
+ };
3937
+ discovery: {
3938
+ status: RemoteOAuthConfigDiscoveryStatus;
3939
+ error: {
3940
+ code: string;
3941
+ message: string;
3942
+ } | null;
3943
+ createdAt: Date;
3944
+ lastDiscoveredAt: Date | null;
3945
+ };
3946
+ } | {
3947
+ type: "delegated";
3948
+ name: string | null;
3949
+ config: null;
3950
+ scopes: never[];
3951
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
3952
+ provider: null;
3953
+ discovery: {
3954
+ status: "succeeded";
3955
+ error: {
3956
+ code: string;
3957
+ message: string;
3958
+ } | null;
3959
+ createdAt: Date;
3960
+ lastDiscoveredAt: null;
3961
+ };
3962
+ } | null;
3963
+ provider: {
3964
+ name: string;
3965
+ url: string;
3966
+ } | null;
3967
+ discovery: {
3968
+ status: RemoteOAuthConnectionDiscoveryStatus;
3969
+ error: {
3970
+ code: string;
3971
+ message: string;
3972
+ } | null;
3973
+ createdAt: Date;
3974
+ lastDiscoveredAt: Date | null;
3975
+ };
3976
+ isDefault: boolean;
3977
+ serverId: string;
3978
+ tenantId: string;
3979
+ createdAt: Date;
3980
+ updatedAt: Date;
3981
+ };
3982
+ serverId: string;
3983
+ tenantId: string;
3984
+ credentialsId: string;
3985
+ createdAt: Date;
3986
+ updatedAt: Date;
3987
+ }, {
3988
+ tenant: {
3989
+ name: string;
3990
+ oid: bigint;
3991
+ id: string;
3992
+ createdAt: Date;
3993
+ identifier: string;
3994
+ functionBayTenantId: string | null;
3995
+ };
3996
+ }>;
3997
+ get: Handler<UndefinedIsOptional<{
3998
+ tenantId: string;
3999
+ serverOAuthSetupId: string;
4000
+ }>, {
4001
+ object: string;
4002
+ id: string;
4003
+ type: ServerOAuthSetupType;
4004
+ status: ServerOAuthSetupStatus;
4005
+ url: string;
4006
+ authConfig: {
4007
+ object: string;
4008
+ id: string;
4009
+ type: ServerAuthConfigType;
4010
+ source: RemoteOAuthConnectionAuthTokenSource;
4011
+ authConfig: PrismaJson.DelegatedOAuthConnectionAuthConfig;
4012
+ credentials: {
4013
+ object: string;
4014
+ id: string;
4015
+ type: ServerOAuthCredentialsType;
4016
+ registrationType: "manual" | "automatic";
4017
+ clientId: string | null;
4018
+ oauthConfig: {
4019
+ type: "remote";
4020
+ name: string | null;
4021
+ config: any;
4022
+ scopes: string[];
4023
+ authConfigSchema: null;
4024
+ provider: {
4025
+ name: string;
4026
+ url: string;
4027
+ };
4028
+ discovery: {
4029
+ status: RemoteOAuthConfigDiscoveryStatus;
4030
+ error: {
4031
+ code: string;
4032
+ message: string;
4033
+ } | null;
4034
+ createdAt: Date;
4035
+ lastDiscoveredAt: Date | null;
4036
+ };
4037
+ } | {
4038
+ type: "delegated";
4039
+ name: string | null;
4040
+ config: null;
4041
+ scopes: never[];
4042
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
4043
+ provider: null;
4044
+ discovery: {
4045
+ status: "succeeded";
4046
+ error: {
4047
+ code: string;
4048
+ message: string;
4049
+ } | null;
4050
+ createdAt: Date;
4051
+ lastDiscoveredAt: null;
4052
+ };
4053
+ } | null;
4054
+ provider: {
4055
+ name: string;
4056
+ url: string;
4057
+ } | null;
4058
+ discovery: {
4059
+ status: RemoteOAuthConnectionDiscoveryStatus;
4060
+ error: {
4061
+ code: string;
4062
+ message: string;
4063
+ } | null;
4064
+ createdAt: Date;
4065
+ lastDiscoveredAt: Date | null;
4066
+ };
4067
+ isDefault: boolean;
4068
+ serverId: string;
4069
+ tenantId: string;
4070
+ createdAt: Date;
4071
+ updatedAt: Date;
4072
+ } | null;
4073
+ profile: {
4074
+ id: string;
4075
+ email: string | null;
4076
+ name: string | null;
4077
+ data: unknown;
4078
+ } | null;
4079
+ serverId: string;
4080
+ tenantId: string;
4081
+ createdAt: Date;
4082
+ updatedAt: Date;
4083
+ } | null;
4084
+ credentials: {
4085
+ object: string;
4086
+ id: string;
4087
+ type: ServerOAuthCredentialsType;
4088
+ registrationType: "manual" | "automatic";
4089
+ clientId: string | null;
4090
+ oauthConfig: {
4091
+ type: "remote";
4092
+ name: string | null;
4093
+ config: any;
4094
+ scopes: string[];
4095
+ authConfigSchema: null;
4096
+ provider: {
4097
+ name: string;
4098
+ url: string;
4099
+ };
4100
+ discovery: {
4101
+ status: RemoteOAuthConfigDiscoveryStatus;
4102
+ error: {
4103
+ code: string;
4104
+ message: string;
4105
+ } | null;
4106
+ createdAt: Date;
4107
+ lastDiscoveredAt: Date | null;
4108
+ };
4109
+ } | {
4110
+ type: "delegated";
4111
+ name: string | null;
4112
+ config: null;
4113
+ scopes: never[];
4114
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
4115
+ provider: null;
4116
+ discovery: {
4117
+ status: "succeeded";
4118
+ error: {
4119
+ code: string;
4120
+ message: string;
4121
+ } | null;
4122
+ createdAt: Date;
4123
+ lastDiscoveredAt: null;
4124
+ };
4125
+ } | null;
4126
+ provider: {
4127
+ name: string;
4128
+ url: string;
4129
+ } | null;
4130
+ discovery: {
4131
+ status: RemoteOAuthConnectionDiscoveryStatus;
4132
+ error: {
4133
+ code: string;
4134
+ message: string;
4135
+ } | null;
4136
+ createdAt: Date;
4137
+ lastDiscoveredAt: Date | null;
4138
+ };
4139
+ isDefault: boolean;
4140
+ serverId: string;
4141
+ tenantId: string;
4142
+ createdAt: Date;
4143
+ updatedAt: Date;
4144
+ };
4145
+ serverId: string;
4146
+ tenantId: string;
4147
+ credentialsId: string;
4148
+ createdAt: Date;
4149
+ updatedAt: Date;
4150
+ }, {
4151
+ tenant: {
4152
+ name: string;
4153
+ oid: bigint;
4154
+ id: string;
4155
+ createdAt: Date;
4156
+ identifier: string;
4157
+ functionBayTenantId: string | null;
4158
+ };
4159
+ serverOAuthSetup: {
4160
+ server: {
4161
+ name: string;
4162
+ oid: bigint;
4163
+ id: string;
4164
+ type: ServerType;
4165
+ createdAt: Date;
4166
+ description: string | null;
4167
+ draftConfigSchema: PrismaJson.ServerConfigSchema;
4168
+ draftConfigTransformer: string;
4169
+ draftRemoteUrl: string | null;
4170
+ draftRemoteProtocol: ServerRemoteProtocol | null;
4171
+ draftRepositoryTagOid: bigint | null;
4172
+ tenantOid: bigint | null;
4173
+ currentVersionOid: bigint | null;
4174
+ remoteOauthConfigOid: bigint | null;
4175
+ delegatedOauthConfigOid: bigint | null;
4176
+ updatedAt: Date;
4177
+ };
4178
+ tenant: {
4179
+ name: string;
4180
+ oid: bigint;
4181
+ id: string;
4182
+ createdAt: Date;
4183
+ identifier: string;
4184
+ functionBayTenantId: string | null;
4185
+ };
4186
+ credentials: {
4187
+ remoteConnection: ({
4188
+ config: {
4189
+ name: string | null;
4190
+ oid: bigint;
4191
+ id: string;
4192
+ serverOid: bigint;
4193
+ createdAt: Date;
4194
+ discoverStatus: RemoteOAuthConfigDiscoveryStatus;
4195
+ config: PrismaJson.RemoteOAuthConfig;
4196
+ providerName: string;
4197
+ providerUrl: string;
4198
+ discoveryUrl: string | null;
4199
+ errorCode: string | null;
4200
+ errorMessage: string | null;
4201
+ scopes: string[];
4202
+ oauthDiscoveryDocumentOid: bigint | null;
4203
+ lastDiscoveredAt: Date | null;
4204
+ };
4205
+ registration: {
4206
+ oid: bigint;
4207
+ id: string;
4208
+ createdAt: Date;
4209
+ clientId: string;
4210
+ clientSecret: string | null;
4211
+ autoRegistrationName: string | null;
4212
+ registrationClientUri: string | null;
4213
+ registrationAccessToken: string | null;
4214
+ clientSecretExpiresAt: Date | null;
4215
+ data: PrismaJson.RemoteOAuthAutoRegistrationData;
4216
+ discoveryDocumentOid: bigint | null;
4217
+ } | null;
4218
+ } & {
4219
+ oid: bigint;
4220
+ id: string;
4221
+ serverOid: bigint;
4222
+ createdAt: Date;
4223
+ tenantOid: bigint;
4224
+ updatedAt: Date;
4225
+ secretOid: bigint | null;
4226
+ discoveryStatus: RemoteOAuthConnectionDiscoveryStatus;
4227
+ status: RemoteOAuthConnectionStatus;
4228
+ providerName: string;
4229
+ providerUrl: string;
4230
+ discoveryUrl: string | null;
4231
+ errorCode: string | null;
4232
+ errorMessage: string | null;
4233
+ scopes: string[];
4234
+ clientId: string | null;
4235
+ configOid: bigint;
4236
+ registrationOid: bigint | null;
4237
+ }) | null;
4238
+ delegatedConnection: ({
4239
+ config: {
4240
+ name: string | null;
4241
+ oid: bigint;
4242
+ id: string;
4243
+ serverOid: bigint;
4244
+ createdAt: Date;
4245
+ functionServerOid: bigint;
4246
+ errorCode: string | null;
4247
+ errorMessage: string | null;
4248
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
4249
+ authConfigSchemaHash: string;
4250
+ supportsOauthTokenRefresh: boolean;
4251
+ };
4252
+ functionServer: {
4253
+ oid: bigint;
4254
+ id: string;
4255
+ serverOid: bigint;
4256
+ createdAt: Date;
4257
+ delegatedOauthConfigOid: bigint | null;
4258
+ functionBayTenantId: string;
4259
+ configSchema: PrismaJson.FunctionServerConfigSchema;
4260
+ status: FunctionServerStatus;
4261
+ errorCode: string | null;
4262
+ errorMessage: string | null;
4263
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
4264
+ supportsOauthTokenRefresh: boolean;
4265
+ functionBayFunctionId: string;
4266
+ functionBayDeploymentId: string;
4267
+ functionBayVersionId: string | null;
4268
+ supportsOAuth: boolean;
4269
+ info: PrismaJson.FunctionServerInfo;
4270
+ providerOid: bigint;
4271
+ };
4272
+ } & {
4273
+ oid: bigint;
4274
+ id: string;
4275
+ serverOid: bigint;
4276
+ createdAt: Date;
4277
+ tenantOid: bigint;
4278
+ updatedAt: Date;
4279
+ functionServerOid: bigint;
4280
+ secretOid: bigint | null;
4281
+ status: DelegatedOAuthConnectionStatus;
4282
+ errorCode: string | null;
4283
+ errorMessage: string | null;
4284
+ clientId: string;
4285
+ configOid: bigint;
4286
+ }) | null;
4287
+ } & {
4288
+ oid: bigint;
4289
+ id: string;
4290
+ type: ServerOAuthCredentialsType;
4291
+ serverOid: bigint;
4292
+ createdAt: Date;
4293
+ tenantOid: bigint;
4294
+ updatedAt: Date;
4295
+ isDefault: boolean;
4296
+ remoteConnectionOid: bigint | null;
4297
+ delegatedConnectionOid: bigint | null;
4298
+ };
4299
+ authConfig: ({
4300
+ remoteOAuthConnectionAuthToken: ({
4301
+ connectionProfile: {
4302
+ name: string | null;
4303
+ oid: bigint;
4304
+ id: string;
4305
+ createdAt: Date;
4306
+ tenantOid: bigint;
4307
+ updatedAt: Date;
4308
+ connectionOid: bigint;
4309
+ lastUsedAt: Date;
4310
+ sub: string;
4311
+ email: string | null;
4312
+ rawProfile: unknown | null;
4313
+ } | null;
4314
+ } & {
4315
+ oid: bigint;
4316
+ id: string;
4317
+ serverOid: bigint;
4318
+ createdAt: Date;
4319
+ tenantOid: bigint;
4320
+ secretOid: bigint;
4321
+ configOid: bigint;
4322
+ source: RemoteOAuthConnectionAuthTokenSource;
4323
+ scope: string | null;
4324
+ tokenType: string | null;
4325
+ idToken: string | null;
4326
+ expiresAt: Date | null;
4327
+ connectionProfileOid: bigint | null;
4328
+ connectionOid: bigint | null;
4329
+ firstErrorAt: Date | null;
4330
+ lastErrorAt: Date | null;
4331
+ errorDisabledAt: Date | null;
4332
+ errorCount: number;
4333
+ lastUsedAt: Date;
4334
+ refreshedAt: Date | null;
4335
+ }) | null;
4336
+ delegatedOAuthConnectionAuthToken: {
4337
+ oid: bigint;
4338
+ id: string;
4339
+ serverOid: bigint;
4340
+ createdAt: Date;
4341
+ tenantOid: bigint;
4342
+ secretOid: bigint;
4343
+ configOid: bigint;
4344
+ source: DelegatedOAuthConnectionAuthTokenSource;
4345
+ scope: string | null;
4346
+ tokenType: string | null;
4347
+ idToken: string | null;
4348
+ expiresAt: Date | null;
4349
+ connectionOid: bigint | null;
4350
+ firstErrorAt: Date | null;
4351
+ lastErrorAt: Date | null;
4352
+ errorDisabledAt: Date | null;
4353
+ errorCount: number;
4354
+ lastUsedAt: Date;
4355
+ refreshedAt: Date | null;
4356
+ authConfigValue: PrismaJson.DelegatedOAuthConnectionAuthConfig;
4357
+ authStateValue: PrismaJson.DelegatedOAuthConnectionAuthState;
4358
+ } | null;
4359
+ } & {
4360
+ oid: bigint;
4361
+ id: string;
4362
+ type: ServerAuthConfigType;
4363
+ serverOid: bigint;
4364
+ createdAt: Date;
4365
+ tenantOid: bigint;
4366
+ updatedAt: Date;
4367
+ credentialsOid: bigint | null;
4368
+ remoteOAuthConnectionOid: bigint | null;
4369
+ remoteOAuthConnectionAuthTokenOid: bigint | null;
4370
+ delegatedOAuthConnectionOid: bigint | null;
4371
+ delegatedOAuthConnectionAuthTokenOid: bigint | null;
4372
+ }) | null;
4373
+ } & {
4374
+ oid: bigint;
4375
+ id: string;
4376
+ type: ServerOAuthSetupType;
4377
+ serverOid: bigint;
4378
+ createdAt: Date;
4379
+ tenantOid: bigint;
4380
+ updatedAt: Date;
4381
+ status: ServerOAuthSetupStatus;
4382
+ credentialsOid: bigint;
4383
+ authConfigValue: PrismaJson.ServerOAuthSetupAuthConfig;
4384
+ redirectUri: string;
4385
+ authConfigOid: bigint | null;
4386
+ remoteOAuthConnectionSetupOid: bigint | null;
4387
+ delegatedOAuthConnectionSetupOid: bigint | null;
4388
+ };
4389
+ }>;
4390
+ };
4391
+ serverOAuthCredentials: {
4392
+ list: Handler<Partial<Pick<{
4393
+ tenantId: string;
4394
+ }, never>> & {
4395
+ tenantId: string;
4396
+ } & {
4397
+ limit?: number;
4398
+ after?: string;
4399
+ before?: string;
4400
+ cursor?: string;
4401
+ order?: "asc" | "desc";
4402
+ }, {
4403
+ __typename: string;
4404
+ items: {
4405
+ object: string;
4406
+ id: string;
4407
+ type: ServerOAuthCredentialsType;
4408
+ registrationType: "manual" | "automatic";
4409
+ clientId: string | null;
4410
+ oauthConfig: {
4411
+ type: "remote";
4412
+ name: string | null;
4413
+ config: any;
4414
+ scopes: string[];
4415
+ authConfigSchema: null;
4416
+ provider: {
4417
+ name: string;
4418
+ url: string;
4419
+ };
4420
+ discovery: {
4421
+ status: RemoteOAuthConfigDiscoveryStatus;
4422
+ error: {
4423
+ code: string;
4424
+ message: string;
4425
+ } | null;
4426
+ createdAt: Date;
4427
+ lastDiscoveredAt: Date | null;
4428
+ };
4429
+ } | {
4430
+ type: "delegated";
4431
+ name: string | null;
4432
+ config: null;
4433
+ scopes: never[];
4434
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
4435
+ provider: null;
4436
+ discovery: {
4437
+ status: "succeeded";
4438
+ error: {
4439
+ code: string;
4440
+ message: string;
4441
+ } | null;
4442
+ createdAt: Date;
4443
+ lastDiscoveredAt: null;
4444
+ };
4445
+ } | null;
4446
+ provider: {
4447
+ name: string;
4448
+ url: string;
4449
+ } | null;
4450
+ discovery: {
4451
+ status: RemoteOAuthConnectionDiscoveryStatus;
4452
+ error: {
4453
+ code: string;
4454
+ message: string;
4455
+ } | null;
4456
+ createdAt: Date;
4457
+ lastDiscoveredAt: Date | null;
4458
+ };
4459
+ isDefault: boolean;
4460
+ serverId: string;
4461
+ tenantId: string;
4462
+ createdAt: Date;
4463
+ updatedAt: Date;
4464
+ }[];
4465
+ pagination: {
4466
+ has_more_after: boolean;
4467
+ has_more_before: boolean;
4468
+ };
4469
+ }, {
4470
+ tenant: {
4471
+ name: string;
4472
+ oid: bigint;
4473
+ id: string;
4474
+ createdAt: Date;
4475
+ identifier: string;
4476
+ functionBayTenantId: string | null;
4477
+ };
4478
+ }>;
4479
+ create: Handler<UndefinedIsOptional<{
4480
+ tenantId: string;
4481
+ serverId: string;
4482
+ clientId: string | undefined;
4483
+ clientSecret: string | undefined;
4484
+ scopes: string[] | undefined;
4485
+ }>, {
4486
+ object: string;
4487
+ id: string;
4488
+ type: ServerOAuthCredentialsType;
4489
+ registrationType: "manual" | "automatic";
4490
+ clientId: string | null;
4491
+ oauthConfig: {
4492
+ type: "remote";
4493
+ name: string | null;
4494
+ config: any;
4495
+ scopes: string[];
4496
+ authConfigSchema: null;
4497
+ provider: {
4498
+ name: string;
4499
+ url: string;
4500
+ };
4501
+ discovery: {
4502
+ status: RemoteOAuthConfigDiscoveryStatus;
4503
+ error: {
4504
+ code: string;
4505
+ message: string;
4506
+ } | null;
4507
+ createdAt: Date;
4508
+ lastDiscoveredAt: Date | null;
4509
+ };
4510
+ } | {
4511
+ type: "delegated";
4512
+ name: string | null;
4513
+ config: null;
4514
+ scopes: never[];
4515
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
4516
+ provider: null;
4517
+ discovery: {
4518
+ status: "succeeded";
4519
+ error: {
4520
+ code: string;
4521
+ message: string;
4522
+ } | null;
4523
+ createdAt: Date;
4524
+ lastDiscoveredAt: null;
4525
+ };
4526
+ } | null;
4527
+ provider: {
4528
+ name: string;
4529
+ url: string;
4530
+ } | null;
4531
+ discovery: {
4532
+ status: RemoteOAuthConnectionDiscoveryStatus;
4533
+ error: {
4534
+ code: string;
4535
+ message: string;
4536
+ } | null;
4537
+ createdAt: Date;
4538
+ lastDiscoveredAt: Date | null;
4539
+ };
4540
+ isDefault: boolean;
4541
+ serverId: string;
4542
+ tenantId: string;
4543
+ createdAt: Date;
4544
+ updatedAt: Date;
4545
+ }, {
4546
+ tenant: {
4547
+ name: string;
4548
+ oid: bigint;
4549
+ id: string;
4550
+ createdAt: Date;
4551
+ identifier: string;
4552
+ functionBayTenantId: string | null;
4553
+ };
4554
+ }>;
4555
+ get: Handler<UndefinedIsOptional<{
4556
+ tenantId: string;
4557
+ serverOAuthCredentialsId: string;
4558
+ }>, {
4559
+ object: string;
4560
+ id: string;
4561
+ type: ServerOAuthCredentialsType;
4562
+ registrationType: "manual" | "automatic";
4563
+ clientId: string | null;
4564
+ oauthConfig: {
4565
+ type: "remote";
4566
+ name: string | null;
4567
+ config: any;
4568
+ scopes: string[];
4569
+ authConfigSchema: null;
4570
+ provider: {
4571
+ name: string;
4572
+ url: string;
4573
+ };
4574
+ discovery: {
4575
+ status: RemoteOAuthConfigDiscoveryStatus;
4576
+ error: {
4577
+ code: string;
4578
+ message: string;
4579
+ } | null;
4580
+ createdAt: Date;
4581
+ lastDiscoveredAt: Date | null;
4582
+ };
4583
+ } | {
4584
+ type: "delegated";
4585
+ name: string | null;
4586
+ config: null;
4587
+ scopes: never[];
4588
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
4589
+ provider: null;
4590
+ discovery: {
4591
+ status: "succeeded";
4592
+ error: {
4593
+ code: string;
4594
+ message: string;
4595
+ } | null;
4596
+ createdAt: Date;
4597
+ lastDiscoveredAt: null;
4598
+ };
4599
+ } | null;
4600
+ provider: {
4601
+ name: string;
4602
+ url: string;
4603
+ } | null;
4604
+ discovery: {
4605
+ status: RemoteOAuthConnectionDiscoveryStatus;
4606
+ error: {
4607
+ code: string;
4608
+ message: string;
4609
+ } | null;
4610
+ createdAt: Date;
4611
+ lastDiscoveredAt: Date | null;
4612
+ };
4613
+ isDefault: boolean;
4614
+ serverId: string;
4615
+ tenantId: string;
4616
+ createdAt: Date;
4617
+ updatedAt: Date;
4618
+ }, {
4619
+ tenant: {
4620
+ name: string;
4621
+ oid: bigint;
4622
+ id: string;
4623
+ createdAt: Date;
4624
+ identifier: string;
4625
+ functionBayTenantId: string | null;
4626
+ };
4627
+ serverOAuthCredentials: {
4628
+ server: {
4629
+ name: string;
4630
+ oid: bigint;
4631
+ id: string;
4632
+ type: ServerType;
4633
+ createdAt: Date;
4634
+ description: string | null;
4635
+ draftConfigSchema: PrismaJson.ServerConfigSchema;
4636
+ draftConfigTransformer: string;
4637
+ draftRemoteUrl: string | null;
4638
+ draftRemoteProtocol: ServerRemoteProtocol | null;
4639
+ draftRepositoryTagOid: bigint | null;
4640
+ tenantOid: bigint | null;
4641
+ currentVersionOid: bigint | null;
4642
+ remoteOauthConfigOid: bigint | null;
4643
+ delegatedOauthConfigOid: bigint | null;
4644
+ updatedAt: Date;
4645
+ };
4646
+ tenant: {
4647
+ name: string;
4648
+ oid: bigint;
4649
+ id: string;
4650
+ createdAt: Date;
4651
+ identifier: string;
4652
+ functionBayTenantId: string | null;
4653
+ };
4654
+ remoteConnection: ({
4655
+ config: {
4656
+ name: string | null;
4657
+ oid: bigint;
4658
+ id: string;
4659
+ serverOid: bigint;
4660
+ createdAt: Date;
4661
+ discoverStatus: RemoteOAuthConfigDiscoveryStatus;
4662
+ config: PrismaJson.RemoteOAuthConfig;
4663
+ providerName: string;
4664
+ providerUrl: string;
4665
+ discoveryUrl: string | null;
4666
+ errorCode: string | null;
4667
+ errorMessage: string | null;
4668
+ scopes: string[];
4669
+ oauthDiscoveryDocumentOid: bigint | null;
4670
+ lastDiscoveredAt: Date | null;
4671
+ };
4672
+ registration: {
4673
+ oid: bigint;
4674
+ id: string;
4675
+ createdAt: Date;
4676
+ clientId: string;
4677
+ clientSecret: string | null;
4678
+ autoRegistrationName: string | null;
4679
+ registrationClientUri: string | null;
4680
+ registrationAccessToken: string | null;
4681
+ clientSecretExpiresAt: Date | null;
4682
+ data: PrismaJson.RemoteOAuthAutoRegistrationData;
4683
+ discoveryDocumentOid: bigint | null;
4684
+ } | null;
4685
+ } & {
4686
+ oid: bigint;
4687
+ id: string;
4688
+ serverOid: bigint;
4689
+ createdAt: Date;
4690
+ tenantOid: bigint;
4691
+ updatedAt: Date;
4692
+ secretOid: bigint | null;
4693
+ discoveryStatus: RemoteOAuthConnectionDiscoveryStatus;
4694
+ status: RemoteOAuthConnectionStatus;
4695
+ providerName: string;
4696
+ providerUrl: string;
4697
+ discoveryUrl: string | null;
4698
+ errorCode: string | null;
4699
+ errorMessage: string | null;
4700
+ scopes: string[];
4701
+ clientId: string | null;
4702
+ configOid: bigint;
4703
+ registrationOid: bigint | null;
4704
+ }) | null;
4705
+ delegatedConnection: ({
4706
+ config: {
4707
+ name: string | null;
4708
+ oid: bigint;
4709
+ id: string;
4710
+ serverOid: bigint;
4711
+ createdAt: Date;
4712
+ functionServerOid: bigint;
4713
+ errorCode: string | null;
4714
+ errorMessage: string | null;
4715
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
4716
+ authConfigSchemaHash: string;
4717
+ supportsOauthTokenRefresh: boolean;
4718
+ };
4719
+ functionServer: {
4720
+ oid: bigint;
4721
+ id: string;
4722
+ serverOid: bigint;
4723
+ createdAt: Date;
4724
+ delegatedOauthConfigOid: bigint | null;
4725
+ functionBayTenantId: string;
4726
+ configSchema: PrismaJson.FunctionServerConfigSchema;
4727
+ status: FunctionServerStatus;
4728
+ errorCode: string | null;
4729
+ errorMessage: string | null;
4730
+ authConfigSchema: PrismaJson.FunctionServerAuthConfigSchema;
4731
+ supportsOauthTokenRefresh: boolean;
4732
+ functionBayFunctionId: string;
4733
+ functionBayDeploymentId: string;
4734
+ functionBayVersionId: string | null;
4735
+ supportsOAuth: boolean;
4736
+ info: PrismaJson.FunctionServerInfo;
4737
+ providerOid: bigint;
4738
+ };
4739
+ } & {
4740
+ oid: bigint;
4741
+ id: string;
4742
+ serverOid: bigint;
4743
+ createdAt: Date;
4744
+ tenantOid: bigint;
4745
+ updatedAt: Date;
4746
+ functionServerOid: bigint;
4747
+ secretOid: bigint | null;
4748
+ status: DelegatedOAuthConnectionStatus;
4749
+ errorCode: string | null;
4750
+ errorMessage: string | null;
4751
+ clientId: string;
4752
+ configOid: bigint;
4753
+ }) | null;
4754
+ } & {
4755
+ oid: bigint;
4756
+ id: string;
4757
+ type: ServerOAuthCredentialsType;
4758
+ serverOid: bigint;
4759
+ createdAt: Date;
4760
+ tenantOid: bigint;
4761
+ updatedAt: Date;
4762
+ isDefault: boolean;
4763
+ remoteConnectionOid: bigint | null;
4764
+ delegatedConnectionOid: bigint | null;
4765
+ };
4766
+ }>;
4767
+ };
4768
+ changeNotification: {
4769
+ list: Handler<Partial<Pick<{}, never>> & {} & {
4770
+ limit?: number;
4771
+ after?: string;
4772
+ before?: string;
4773
+ cursor?: string;
4774
+ order?: "asc" | "desc";
4775
+ }, {
4776
+ __typename: string;
4777
+ items: {
4778
+ object: string;
4779
+ id: string;
4780
+ type: ChangeNotificationType;
4781
+ serverId: string | undefined;
4782
+ serverVersion: string | undefined;
4783
+ tenantId: string | undefined;
4784
+ createdAt: Date;
4785
+ }[];
4786
+ pagination: {
4787
+ has_more_after: boolean;
4788
+ has_more_before: boolean;
4789
+ };
4790
+ }, {}>;
4791
+ get: Handler<UndefinedIsOptional<{
4792
+ changeNotificationId: string;
4793
+ }>, {
4794
+ object: string;
4795
+ id: string;
4796
+ type: ChangeNotificationType;
4797
+ serverId: string | undefined;
4798
+ serverVersion: string | undefined;
4799
+ tenantId: string | undefined;
4800
+ createdAt: Date;
4801
+ }, {
4802
+ changeNotification: {
4803
+ server: ({
4804
+ tenant: {
4805
+ name: string;
4806
+ oid: bigint;
4807
+ id: string;
4808
+ createdAt: Date;
4809
+ identifier: string;
4810
+ functionBayTenantId: string | null;
4811
+ } | null;
4812
+ } & {
4813
+ name: string;
4814
+ oid: bigint;
4815
+ id: string;
4816
+ type: ServerType;
4817
+ createdAt: Date;
4818
+ description: string | null;
4819
+ draftConfigSchema: PrismaJson.ServerConfigSchema;
4820
+ draftConfigTransformer: string;
4821
+ draftRemoteUrl: string | null;
4822
+ draftRemoteProtocol: ServerRemoteProtocol | null;
4823
+ draftRepositoryTagOid: bigint | null;
4824
+ tenantOid: bigint | null;
4825
+ currentVersionOid: bigint | null;
4826
+ remoteOauthConfigOid: bigint | null;
4827
+ delegatedOauthConfigOid: bigint | null;
4828
+ updatedAt: Date;
4829
+ }) | null;
4830
+ serverVersion: {
4831
+ oid: bigint;
4832
+ id: string;
4833
+ serverOid: bigint;
4834
+ createdAt: Date;
4835
+ tenantOid: bigint | null;
4836
+ updatedAt: Date;
4837
+ identifier: string;
4838
+ isCurrent: boolean;
4839
+ configSchema: PrismaJson.ServerConfigSchema;
4840
+ configTransformer: string;
4841
+ remoteUrl: string | null;
4842
+ remoteProtocol: ServerRemoteProtocol | null;
4843
+ repositoryTagOid: bigint | null;
4844
+ repositoryVersionOid: bigint | null;
4845
+ functionServerOid: bigint | null;
4846
+ deploymentOid: bigint;
4847
+ } | null;
4848
+ } & {
4849
+ oid: bigint;
4850
+ id: string;
4851
+ type: ChangeNotificationType;
4852
+ serverOid: bigint | null;
4853
+ serverVersionOid: bigint | null;
4854
+ createdAt: Date;
4855
+ };
4856
+ }>;
4857
+ };
4858
+ networkingRuleset: {
4859
+ list: Handler<Partial<Pick<{
4860
+ tenantId: string;
4861
+ isDefault: boolean | undefined;
4862
+ ids: string[] | undefined;
4863
+ }, "isDefault" | "ids">> & {
4864
+ tenantId: string;
4865
+ } & {
4866
+ limit?: number;
4867
+ after?: string;
4868
+ before?: string;
4869
+ cursor?: string;
4870
+ order?: "asc" | "desc";
4871
+ }, {
4872
+ __typename: string;
4873
+ items: {
4874
+ object: string;
4875
+ id: string;
4876
+ status: NetworkingRuleStatus;
4877
+ name: string;
4878
+ description: string | null;
4879
+ defaultAction: "accept" | "deny";
4880
+ rules: {
4881
+ action: "accept" | "deny";
4882
+ protocol?: "tcp" | "udp" | "icmp";
4883
+ destination?: string;
4884
+ portRange?: {
4885
+ start: number;
4886
+ end: number;
4887
+ };
4888
+ }[];
4889
+ tenantId: string;
4890
+ createdAt: Date;
4891
+ }[];
4892
+ pagination: {
4893
+ has_more_after: boolean;
4894
+ has_more_before: boolean;
4895
+ };
4896
+ }, {
4897
+ tenant: {
4898
+ name: string;
4899
+ oid: bigint;
4900
+ id: string;
4901
+ createdAt: Date;
4902
+ identifier: string;
4903
+ functionBayTenantId: string | null;
4904
+ };
4905
+ }>;
4906
+ create: Handler<UndefinedIsOptional<{
4907
+ tenantId: string;
4908
+ name: string;
4909
+ description: string | undefined;
4910
+ isDefault: boolean | undefined;
4911
+ defaultAction: "accept" | "deny";
4912
+ rules: UndefinedIsOptional<{
4913
+ action: "accept" | "deny";
4914
+ protocol: "tcp" | "udp" | "icmp" | undefined;
4915
+ destination: string | undefined;
4916
+ port: number | undefined;
4917
+ portRange: UndefinedIsOptional<{
4918
+ start: number;
4919
+ end: number;
4920
+ }> | undefined;
4921
+ }>[] | undefined;
4922
+ }>, {
4923
+ object: string;
4924
+ id: string;
4925
+ status: NetworkingRuleStatus;
4926
+ name: string;
4927
+ description: string | null;
4928
+ defaultAction: "accept" | "deny";
4929
+ rules: {
4930
+ action: "accept" | "deny";
4931
+ protocol?: "tcp" | "udp" | "icmp";
4932
+ destination?: string;
4933
+ portRange?: {
4934
+ start: number;
4935
+ end: number;
4936
+ };
4937
+ }[];
4938
+ tenantId: string;
4939
+ createdAt: Date;
4940
+ }, {
4941
+ tenant: {
4942
+ name: string;
4943
+ oid: bigint;
4944
+ id: string;
4945
+ createdAt: Date;
4946
+ identifier: string;
4947
+ functionBayTenantId: string | null;
4948
+ };
4949
+ }>;
4950
+ get: Handler<UndefinedIsOptional<{
4951
+ tenantId: string;
4952
+ networkingRulesetId: string;
4953
+ }>, {
4954
+ object: string;
4955
+ id: string;
4956
+ status: NetworkingRuleStatus;
4957
+ name: string;
4958
+ description: string | null;
4959
+ defaultAction: "accept" | "deny";
4960
+ rules: {
4961
+ action: "accept" | "deny";
4962
+ protocol?: "tcp" | "udp" | "icmp";
4963
+ destination?: string;
4964
+ portRange?: {
4965
+ start: number;
4966
+ end: number;
4967
+ };
4968
+ }[];
4969
+ tenantId: string;
4970
+ createdAt: Date;
4971
+ }, {
4972
+ tenant: {
4973
+ name: string;
4974
+ oid: bigint;
4975
+ id: string;
4976
+ createdAt: Date;
4977
+ identifier: string;
4978
+ functionBayTenantId: string | null;
4979
+ };
4980
+ networkingRuleset: {
4981
+ tenant: {
4982
+ name: string;
4983
+ oid: bigint;
4984
+ id: string;
4985
+ createdAt: Date;
4986
+ identifier: string;
4987
+ functionBayTenantId: string | null;
4988
+ };
4989
+ } & {
4990
+ name: string;
4991
+ oid: bigint;
4992
+ id: string;
4993
+ createdAt: Date;
4994
+ description: string | null;
4995
+ tenantOid: bigint;
4996
+ updatedAt: Date;
4997
+ isDefault: boolean;
4998
+ status: NetworkingRuleStatus;
4999
+ rules: PrismaJson.NetworkingRulesetList;
5000
+ };
5001
+ }>;
5002
+ update: Handler<UndefinedIsOptional<{
5003
+ tenantId: string;
5004
+ networkingRulesetId: string;
5005
+ name: string | undefined;
5006
+ description: string | undefined;
5007
+ defaultAction: "accept" | "deny";
5008
+ rules: UndefinedIsOptional<{
5009
+ action: "accept" | "deny";
5010
+ protocol: "tcp" | "udp" | "icmp" | undefined;
5011
+ destination: string | undefined;
5012
+ port: number | undefined;
5013
+ portRange: UndefinedIsOptional<{
5014
+ start: number;
5015
+ end: number;
5016
+ }> | undefined;
5017
+ }>[];
5018
+ }>, {
5019
+ object: string;
5020
+ id: string;
5021
+ status: NetworkingRuleStatus;
5022
+ name: string;
5023
+ description: string | null;
5024
+ defaultAction: "accept" | "deny";
5025
+ rules: {
5026
+ action: "accept" | "deny";
5027
+ protocol?: "tcp" | "udp" | "icmp";
5028
+ destination?: string;
5029
+ portRange?: {
5030
+ start: number;
5031
+ end: number;
5032
+ };
5033
+ }[];
5034
+ tenantId: string;
5035
+ createdAt: Date;
5036
+ }, {
5037
+ tenant: {
5038
+ name: string;
5039
+ oid: bigint;
5040
+ id: string;
5041
+ createdAt: Date;
5042
+ identifier: string;
5043
+ functionBayTenantId: string | null;
5044
+ };
5045
+ networkingRuleset: {
5046
+ tenant: {
5047
+ name: string;
5048
+ oid: bigint;
5049
+ id: string;
5050
+ createdAt: Date;
5051
+ identifier: string;
5052
+ functionBayTenantId: string | null;
5053
+ };
5054
+ } & {
5055
+ name: string;
5056
+ oid: bigint;
5057
+ id: string;
5058
+ createdAt: Date;
5059
+ description: string | null;
5060
+ tenantOid: bigint;
5061
+ updatedAt: Date;
5062
+ isDefault: boolean;
5063
+ status: NetworkingRuleStatus;
5064
+ rules: PrismaJson.NetworkingRulesetList;
5065
+ };
5066
+ }>;
5067
+ };
5068
+ }>;
5069
+ export type ConnectionMessage = {
5070
+ type: "mcp.message";
5071
+ data: JSONRPCMessage;
5072
+ } | {
5073
+ type: "error";
5074
+ data: {
5075
+ code: string;
5076
+ message: string;
5077
+ };
5078
+ } | {
5079
+ type: "initialized";
5080
+ data: InitializeResult;
5081
+ } | {
5082
+ type: "close";
5083
+ data?: undefined;
5084
+ };
5085
+ export declare let createLiveConnectionClient: (opts: {
5086
+ endpoint: string;
5087
+ }) => Promise<{
5088
+ connect: (d: {
5089
+ tenantId: string;
5090
+ connectionId: string;
5091
+ onOpen?: () => void;
5092
+ onMessage?: (msg: ConnectionMessage) => void;
5093
+ onClose?: () => void;
5094
+ }) => {
5095
+ sendMcpMessage: (msg: JSONRPCMessage) => Promise<void>;
5096
+ close: () => Promise<void>;
5097
+ };
5098
+ }>;
5099
+
5100
+ export {};