pgbeam 0.1.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,3713 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+ type AccountExport = {
6
+ /**
7
+ * @type object
8
+ */
9
+ user: {
10
+ /**
11
+ * @type string
12
+ */
13
+ id: string;
14
+ /**
15
+ * @type string
16
+ */
17
+ name: string;
18
+ /**
19
+ * @type string, email
20
+ */
21
+ email: string;
22
+ /**
23
+ * @type boolean
24
+ */
25
+ email_verified: boolean;
26
+ /**
27
+ * @type string | undefined
28
+ */
29
+ image?: string;
30
+ /**
31
+ * @type string, date-time
32
+ */
33
+ created_at: string;
34
+ /**
35
+ * @type string, date-time
36
+ */
37
+ updated_at: string;
38
+ };
39
+ /**
40
+ * @type array
41
+ */
42
+ organizations: {
43
+ /**
44
+ * @type string
45
+ */
46
+ id: string;
47
+ /**
48
+ * @type string
49
+ */
50
+ name: string;
51
+ /**
52
+ * @type string
53
+ */
54
+ slug: string;
55
+ /**
56
+ * @type string
57
+ */
58
+ role: string;
59
+ /**
60
+ * @type string, date-time
61
+ */
62
+ created_at: string;
63
+ }[];
64
+ /**
65
+ * @type array
66
+ */
67
+ projects: {
68
+ /**
69
+ * @type string
70
+ */
71
+ id: string;
72
+ /**
73
+ * @type string
74
+ */
75
+ org_id: string;
76
+ /**
77
+ * @type string
78
+ */
79
+ name: string;
80
+ /**
81
+ * @type string
82
+ */
83
+ description: string;
84
+ /**
85
+ * @type string
86
+ */
87
+ status: string;
88
+ /**
89
+ * @type string, date-time
90
+ */
91
+ created_at: string;
92
+ }[];
93
+ /**
94
+ * @type array
95
+ */
96
+ databases: {
97
+ /**
98
+ * @type string
99
+ */
100
+ id: string;
101
+ /**
102
+ * @type string
103
+ */
104
+ project_id: string;
105
+ /**
106
+ * @type string
107
+ */
108
+ host: string;
109
+ /**
110
+ * @type integer
111
+ */
112
+ port: number;
113
+ /**
114
+ * @type string
115
+ */
116
+ name: string;
117
+ /**
118
+ * @type string
119
+ */
120
+ ssl_mode: string;
121
+ /**
122
+ * @type string
123
+ */
124
+ role: string;
125
+ /**
126
+ * @type string, date-time
127
+ */
128
+ created_at: string;
129
+ }[];
130
+ /**
131
+ * @type array
132
+ */
133
+ sessions: {
134
+ /**
135
+ * @type string
136
+ */
137
+ id: string;
138
+ /**
139
+ * @type string, date-time
140
+ */
141
+ expires_at: string;
142
+ /**
143
+ * @type string, date-time
144
+ */
145
+ created_at: string;
146
+ /**
147
+ * @type string | undefined
148
+ */
149
+ ip_address?: string;
150
+ /**
151
+ * @type string | undefined
152
+ */
153
+ user_agent?: string;
154
+ }[];
155
+ /**
156
+ * @type object
157
+ */
158
+ email_preferences: {
159
+ /**
160
+ * @type boolean | undefined
161
+ */
162
+ marketing_emails?: boolean;
163
+ /**
164
+ * @type boolean | undefined
165
+ */
166
+ usage_limit_alerts?: boolean;
167
+ };
168
+ /**
169
+ * @type array
170
+ */
171
+ consents: {
172
+ /**
173
+ * @type string
174
+ */
175
+ id: string;
176
+ /**
177
+ * @type string
178
+ */
179
+ document_type: string;
180
+ /**
181
+ * @type string
182
+ */
183
+ document_version: string;
184
+ /**
185
+ * @type string, date-time
186
+ */
187
+ accepted_at: string;
188
+ /**
189
+ * @type string | undefined
190
+ */
191
+ ip_address?: string;
192
+ }[];
193
+ /**
194
+ * @type array
195
+ */
196
+ audit_logs: {
197
+ /**
198
+ * @type string
199
+ */
200
+ id: string;
201
+ /**
202
+ * @type string
203
+ */
204
+ action: string;
205
+ /**
206
+ * @type string | undefined
207
+ */
208
+ resource_type?: string;
209
+ /**
210
+ * @type string | undefined
211
+ */
212
+ resource_id?: string;
213
+ /**
214
+ * @type string | undefined
215
+ */
216
+ ip_address?: string;
217
+ /**
218
+ * @type string, date-time
219
+ */
220
+ created_at: string;
221
+ }[];
222
+ /**
223
+ * @type string, date-time
224
+ */
225
+ exported_at: string;
226
+ };
227
+
228
+ /**
229
+ * Generated by Kubb (https://kubb.dev/).
230
+ * Do not edit manually.
231
+ */
232
+ type Error$1 = {
233
+ /**
234
+ * @type object
235
+ */
236
+ error: {
237
+ /**
238
+ * @description Machine-readable error code.
239
+ * @type string
240
+ */
241
+ code: string;
242
+ /**
243
+ * @description Human-readable error message.
244
+ * @type string
245
+ */
246
+ message: string;
247
+ /**
248
+ * @description Optional structured error details.
249
+ * @type object | undefined
250
+ */
251
+ details?: {
252
+ [key: string]: any;
253
+ };
254
+ };
255
+ };
256
+
257
+ /**
258
+ * Generated by Kubb (https://kubb.dev/).
259
+ * Do not edit manually.
260
+ */
261
+
262
+ /**
263
+ * @description Account data export.
264
+ */
265
+ type ExportAccountData200 = AccountExport;
266
+ /**
267
+ * @description Missing or invalid authentication.
268
+ */
269
+ type ExportAccountData401 = Error$1;
270
+ /**
271
+ * @description Rate limited. Try again later.
272
+ */
273
+ type ExportAccountData429 = Error$1;
274
+ type ExportAccountDataQueryResponse = ExportAccountData200;
275
+ type ExportAccountDataQuery = {
276
+ Response: ExportAccountData200;
277
+ Errors: ExportAccountData401 | ExportAccountData429;
278
+ };
279
+
280
+ /**
281
+ * Generated by Kubb (https://kubb.dev/).
282
+ * Do not edit manually.
283
+ */
284
+ type ActivityEntry = {
285
+ /**
286
+ * @type string
287
+ */
288
+ id: string;
289
+ /**
290
+ * @type string
291
+ */
292
+ project_id: string;
293
+ /**
294
+ * @type string
295
+ */
296
+ project_name: string;
297
+ /**
298
+ * @type string
299
+ */
300
+ region: string;
301
+ /**
302
+ * @type integer, int64
303
+ */
304
+ queries_total: number;
305
+ /**
306
+ * @type integer, int64
307
+ */
308
+ cache_hits: number;
309
+ /**
310
+ * @type integer, int64
311
+ */
312
+ cache_misses: number;
313
+ /**
314
+ * @type number, double
315
+ */
316
+ avg_latency_ms: number;
317
+ /**
318
+ * @type number, double
319
+ */
320
+ p99_latency_ms: number;
321
+ /**
322
+ * @type integer
323
+ */
324
+ active_connections: number;
325
+ /**
326
+ * @type string, date-time
327
+ */
328
+ created_at: string;
329
+ };
330
+
331
+ /**
332
+ * Generated by Kubb (https://kubb.dev/).
333
+ * Do not edit manually.
334
+ */
335
+
336
+ type ActivityResponse = {
337
+ /**
338
+ * @type array
339
+ */
340
+ entries: ActivityEntry[];
341
+ };
342
+
343
+ /**
344
+ * Generated by Kubb (https://kubb.dev/).
345
+ * Do not edit manually.
346
+ */
347
+
348
+ type GetOrganizationActivityPathParams = {
349
+ /**
350
+ * @type string
351
+ */
352
+ org_id: string;
353
+ };
354
+ type GetOrganizationActivityQueryParams = {
355
+ /**
356
+ * @minLength 1
357
+ * @maxLength 500
358
+ * @default 100
359
+ * @type integer | undefined
360
+ */
361
+ limit?: number;
362
+ /**
363
+ * @description Filter activity by event type (e.g. metrics, connection).
364
+ * @type string | undefined
365
+ */
366
+ event_type?: string;
367
+ };
368
+ /**
369
+ * @description Recent activity entries.
370
+ */
371
+ type GetOrganizationActivity200 = ActivityResponse;
372
+ /**
373
+ * @description Missing or invalid authentication.
374
+ */
375
+ type GetOrganizationActivity401 = Error$1;
376
+ type GetOrganizationActivityQueryResponse = GetOrganizationActivity200;
377
+ type GetOrganizationActivityQuery = {
378
+ Response: GetOrganizationActivity200;
379
+ PathParams: GetOrganizationActivityPathParams;
380
+ QueryParams: GetOrganizationActivityQueryParams;
381
+ Errors: GetOrganizationActivity401;
382
+ };
383
+
384
+ /**
385
+ * Generated by Kubb (https://kubb.dev/).
386
+ * Do not edit manually.
387
+ */
388
+ type PlanLimits = {
389
+ /**
390
+ * @description Maximum queries per day across all projects. 0 means unlimited.
391
+ * @type integer, int64
392
+ */
393
+ queries_per_day: number;
394
+ /**
395
+ * @description Maximum number of active projects.
396
+ * @type integer
397
+ */
398
+ max_projects: number;
399
+ /**
400
+ * @description Maximum databases per project.
401
+ * @type integer
402
+ */
403
+ max_databases: number;
404
+ /**
405
+ * @description Maximum concurrent connections per project.
406
+ * @type integer
407
+ */
408
+ max_connections: number;
409
+ /**
410
+ * @description Maximum queries per second per project.
411
+ * @type integer
412
+ */
413
+ queries_per_second: number;
414
+ /**
415
+ * @description Monthly data transfer quota in bytes. 0 means unlimited.
416
+ * @type integer, int64
417
+ */
418
+ bytes_per_month: number;
419
+ };
420
+
421
+ /**
422
+ * Generated by Kubb (https://kubb.dev/).
423
+ * Do not edit manually.
424
+ */
425
+
426
+ type PlanInfo = {
427
+ /**
428
+ * @description Plan tier name (starter, pro, scale).
429
+ * @type string
430
+ */
431
+ name: string;
432
+ /**
433
+ * @description Display label for the plan.
434
+ * @type string
435
+ */
436
+ label: string;
437
+ /**
438
+ * @description Monthly price in dollars.
439
+ * @type integer
440
+ */
441
+ monthly_price: number;
442
+ /**
443
+ * @description Annual price in dollars (if applicable).
444
+ * @type integer | undefined
445
+ */
446
+ annual_price?: number;
447
+ /**
448
+ * @description Short description of the plan.
449
+ * @type string | undefined
450
+ */
451
+ description?: string;
452
+ /**
453
+ * @description Human-readable overage pricing text.
454
+ * @type string | undefined
455
+ */
456
+ overage_text?: string;
457
+ /**
458
+ * @description Number of trial days for new signups.
459
+ * @type integer | undefined
460
+ */
461
+ trial_days?: number;
462
+ /**
463
+ * @type object
464
+ */
465
+ limits: PlanLimits;
466
+ };
467
+
468
+ /**
469
+ * Generated by Kubb (https://kubb.dev/).
470
+ * Do not edit manually.
471
+ */
472
+
473
+ type ListPlansResponse = {
474
+ /**
475
+ * @type array
476
+ */
477
+ plans: PlanInfo[];
478
+ };
479
+
480
+ /**
481
+ * Generated by Kubb (https://kubb.dev/).
482
+ * Do not edit manually.
483
+ */
484
+
485
+ /**
486
+ * @description List of available plans.
487
+ */
488
+ type ListPlans200 = ListPlansResponse;
489
+ /**
490
+ * @description Missing or invalid authentication.
491
+ */
492
+ type ListPlans401 = Error$1;
493
+ type ListPlansQueryResponse = ListPlans200;
494
+ type ListPlansQuery = {
495
+ Response: ListPlans200;
496
+ Errors: ListPlans401;
497
+ };
498
+
499
+ /**
500
+ * Generated by Kubb (https://kubb.dev/).
501
+ * Do not edit manually.
502
+ */
503
+
504
+ declare const organizationPlanPlanEnum: {
505
+ readonly starter: "starter";
506
+ readonly pro: "pro";
507
+ readonly scale: "scale";
508
+ };
509
+ type OrganizationPlanPlanEnumKey = (typeof organizationPlanPlanEnum)[keyof typeof organizationPlanPlanEnum];
510
+ declare const organizationPlanSubscriptionStatusEnum: {
511
+ readonly none: "none";
512
+ readonly active: "active";
513
+ readonly trialing: "trialing";
514
+ readonly past_due: "past_due";
515
+ readonly canceled: "canceled";
516
+ readonly unpaid: "unpaid";
517
+ readonly incomplete: "incomplete";
518
+ readonly incomplete_expired: "incomplete_expired";
519
+ readonly paused: "paused";
520
+ };
521
+ type OrganizationPlanSubscriptionStatusEnumKey = (typeof organizationPlanSubscriptionStatusEnum)[keyof typeof organizationPlanSubscriptionStatusEnum];
522
+ type OrganizationPlan = {
523
+ /**
524
+ * @type string
525
+ */
526
+ org_id: string;
527
+ /**
528
+ * @description Current plan tier.
529
+ * @type string
530
+ */
531
+ plan: OrganizationPlanPlanEnumKey;
532
+ /**
533
+ * @description Stripe subscription status.
534
+ * @type string | undefined
535
+ */
536
+ subscription_status?: OrganizationPlanSubscriptionStatusEnumKey;
537
+ /**
538
+ * @description End of current billing period.
539
+ * @type string | undefined, date-time
540
+ */
541
+ current_period_end?: string;
542
+ /**
543
+ * @description Whether the organization billing is active (false = suspended).
544
+ * @type boolean | undefined
545
+ */
546
+ enabled?: boolean;
547
+ /**
548
+ * @type object
549
+ */
550
+ limits: PlanLimits;
551
+ /**
552
+ * @type string | undefined, date-time
553
+ */
554
+ created_at?: string;
555
+ /**
556
+ * @type string | undefined, date-time
557
+ */
558
+ updated_at?: string;
559
+ };
560
+
561
+ /**
562
+ * Generated by Kubb (https://kubb.dev/).
563
+ * Do not edit manually.
564
+ */
565
+
566
+ type GetOrganizationPlanPathParams = {
567
+ /**
568
+ * @type string
569
+ */
570
+ org_id: string;
571
+ };
572
+ /**
573
+ * @description Organization plan details.
574
+ */
575
+ type GetOrganizationPlan200 = OrganizationPlan;
576
+ /**
577
+ * @description Missing or invalid authentication.
578
+ */
579
+ type GetOrganizationPlan401 = Error$1;
580
+ type GetOrganizationPlanQueryResponse = GetOrganizationPlan200;
581
+ type GetOrganizationPlanQuery = {
582
+ Response: GetOrganizationPlan200;
583
+ PathParams: GetOrganizationPlanPathParams;
584
+ Errors: GetOrganizationPlan401;
585
+ };
586
+
587
+ /**
588
+ * Generated by Kubb (https://kubb.dev/).
589
+ * Do not edit manually.
590
+ */
591
+ declare const queryCatalogEntryQueryTypeEnum: {
592
+ readonly read: "read";
593
+ readonly write: "write";
594
+ readonly other: "other";
595
+ };
596
+ type QueryCatalogEntryQueryTypeEnumKey = (typeof queryCatalogEntryQueryTypeEnum)[keyof typeof queryCatalogEntryQueryTypeEnum];
597
+ declare const queryCatalogEntryRecommendationEnum: {
598
+ readonly great: "great";
599
+ readonly good: "good";
600
+ readonly fair: "fair";
601
+ readonly poor: "poor";
602
+ };
603
+ type QueryCatalogEntryRecommendationEnumKey = (typeof queryCatalogEntryRecommendationEnum)[keyof typeof queryCatalogEntryRecommendationEnum];
604
+ type QueryCatalogEntry = {
605
+ /**
606
+ * @description xxhash64 hex of the normalized SQL.
607
+ * @type string
608
+ */
609
+ query_hash: string;
610
+ /**
611
+ * @description SQL with literals replaced by $N placeholders.
612
+ * @type string
613
+ */
614
+ normalized_sql: string;
615
+ /**
616
+ * @description Query classification.
617
+ * @type string
618
+ */
619
+ query_type: QueryCatalogEntryQueryTypeEnumKey;
620
+ /**
621
+ * @description Whether caching is enabled for this query shape.
622
+ * @type boolean
623
+ */
624
+ cache_enabled: boolean;
625
+ /**
626
+ * @description TTL override in seconds. Null means use project default.
627
+ * @minLength 0
628
+ * @type integer
629
+ */
630
+ cache_ttl_seconds?: number | null;
631
+ /**
632
+ * @description SWR override in seconds. Null means use project default.
633
+ * @minLength 0
634
+ * @type integer
635
+ */
636
+ cache_swr_seconds?: number | null;
637
+ /**
638
+ * @description Total number of executions observed.
639
+ * @type integer, int64
640
+ */
641
+ call_count: number;
642
+ /**
643
+ * @description Average query latency in milliseconds.
644
+ * @type number, double
645
+ */
646
+ avg_latency_ms: number;
647
+ /**
648
+ * @description 95th percentile latency in milliseconds.
649
+ * @type number, double
650
+ */
651
+ p95_latency_ms: number;
652
+ /**
653
+ * @description Average response size in bytes.
654
+ * @type integer, int64
655
+ */
656
+ avg_response_bytes: number;
657
+ /**
658
+ * @description Response stability rate (0.0 to 1.0). Higher means more stable.
659
+ * @type number, double
660
+ */
661
+ stability_rate: number;
662
+ /**
663
+ * @description Cache recommendation based on frequency, latency, and stability.
664
+ * @type string
665
+ */
666
+ recommendation: QueryCatalogEntryRecommendationEnumKey;
667
+ /**
668
+ * @description When this query was first observed.
669
+ * @type string, date-time
670
+ */
671
+ first_seen_at: string;
672
+ /**
673
+ * @description When this query was last observed.
674
+ * @type string, date-time
675
+ */
676
+ last_seen_at: string;
677
+ };
678
+
679
+ /**
680
+ * Generated by Kubb (https://kubb.dev/).
681
+ * Do not edit manually.
682
+ */
683
+
684
+ type ListQueryCatalogResponse = {
685
+ /**
686
+ * @type array
687
+ */
688
+ entries: QueryCatalogEntry[];
689
+ /**
690
+ * @description Opaque token for cursor-based pagination.
691
+ * @type string | undefined
692
+ */
693
+ next_page_token?: string;
694
+ };
695
+
696
+ /**
697
+ * Generated by Kubb (https://kubb.dev/).
698
+ * Do not edit manually.
699
+ */
700
+
701
+ type ListQueryCatalogPathParams = {
702
+ /**
703
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
704
+ * @pattern ^[a-zA-Z0-9_.-]+$
705
+ * @type string
706
+ */
707
+ project_id: string;
708
+ /**
709
+ * @description Unique database identifier (prefixed, e.g. db_xxx).
710
+ * @pattern ^[a-zA-Z0-9_.-]+$
711
+ * @type string
712
+ */
713
+ database_id: string;
714
+ };
715
+ type ListQueryCatalogQueryParams = {
716
+ /**
717
+ * @description Maximum number of items to return (1-100, default 20).
718
+ * @minLength 1
719
+ * @maxLength 100
720
+ * @default 20
721
+ * @type integer | undefined
722
+ */
723
+ page_size?: number;
724
+ /**
725
+ * @description Opaque token for cursor-based pagination.
726
+ * @pattern ^[a-zA-Z0-9_.-]+$
727
+ * @type string | undefined
728
+ */
729
+ page_token?: string;
730
+ };
731
+ /**
732
+ * @description Query catalog entries.
733
+ */
734
+ type ListQueryCatalog200 = ListQueryCatalogResponse;
735
+ /**
736
+ * @description Missing or invalid authentication.
737
+ */
738
+ type ListQueryCatalog401 = Error$1;
739
+ /**
740
+ * @description Operation not allowed by current plan limits.
741
+ */
742
+ type ListQueryCatalog403 = Error$1;
743
+ /**
744
+ * @description Resource not found.
745
+ */
746
+ type ListQueryCatalog404 = Error$1;
747
+ type ListQueryCatalogQueryResponse = ListQueryCatalog200;
748
+ type ListQueryCatalogQuery = {
749
+ Response: ListQueryCatalog200;
750
+ PathParams: ListQueryCatalogPathParams;
751
+ QueryParams: ListQueryCatalogQueryParams;
752
+ Errors: ListQueryCatalog401 | ListQueryCatalog403 | ListQueryCatalog404;
753
+ };
754
+
755
+ /**
756
+ * Generated by Kubb (https://kubb.dev/).
757
+ * Do not edit manually.
758
+ */
759
+ type UpdateCacheRuleRequest = {
760
+ /**
761
+ * @description Whether to enable caching for this query shape.
762
+ * @type boolean
763
+ */
764
+ cache_enabled: boolean;
765
+ /**
766
+ * @description TTL override in seconds. Null to use project default.
767
+ * @minLength 0
768
+ * @maxLength 86400
769
+ * @type integer
770
+ */
771
+ cache_ttl_seconds?: number | null;
772
+ /**
773
+ * @description SWR override in seconds. Null to use project default.
774
+ * @minLength 0
775
+ * @maxLength 86400
776
+ * @type integer
777
+ */
778
+ cache_swr_seconds?: number | null;
779
+ };
780
+
781
+ /**
782
+ * Generated by Kubb (https://kubb.dev/).
783
+ * Do not edit manually.
784
+ */
785
+
786
+ type UpdateCacheRuleResponse = {
787
+ /**
788
+ * @type object
789
+ */
790
+ entry: QueryCatalogEntry;
791
+ };
792
+
793
+ /**
794
+ * Generated by Kubb (https://kubb.dev/).
795
+ * Do not edit manually.
796
+ */
797
+
798
+ type UpdateCacheRulePathParams = {
799
+ /**
800
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
801
+ * @pattern ^[a-zA-Z0-9_.-]+$
802
+ * @type string
803
+ */
804
+ project_id: string;
805
+ /**
806
+ * @description Unique database identifier (prefixed, e.g. db_xxx).
807
+ * @pattern ^[a-zA-Z0-9_.-]+$
808
+ * @type string
809
+ */
810
+ database_id: string;
811
+ /**
812
+ * @description xxhash64 hex of the normalized SQL.
813
+ * @minLength 16
814
+ * @maxLength 16
815
+ * @pattern ^[a-f0-9]+$
816
+ * @type string
817
+ */
818
+ query_hash: string;
819
+ };
820
+ /**
821
+ * @description Cache rule updated.
822
+ */
823
+ type UpdateCacheRule200 = UpdateCacheRuleResponse;
824
+ /**
825
+ * @description Invalid request parameters.
826
+ */
827
+ type UpdateCacheRule400 = Error$1;
828
+ /**
829
+ * @description Missing or invalid authentication.
830
+ */
831
+ type UpdateCacheRule401 = Error$1;
832
+ /**
833
+ * @description Operation not allowed by current plan limits.
834
+ */
835
+ type UpdateCacheRule403 = Error$1;
836
+ /**
837
+ * @description Resource not found.
838
+ */
839
+ type UpdateCacheRule404 = Error$1;
840
+ type UpdateCacheRuleMutationRequest = UpdateCacheRuleRequest;
841
+ type UpdateCacheRuleMutationResponse = UpdateCacheRule200;
842
+ type UpdateCacheRuleMutation = {
843
+ Response: UpdateCacheRule200;
844
+ Request: UpdateCacheRuleMutationRequest;
845
+ PathParams: UpdateCacheRulePathParams;
846
+ Errors: UpdateCacheRule400 | UpdateCacheRule401 | UpdateCacheRule403 | UpdateCacheRule404;
847
+ };
848
+
849
+ /**
850
+ * Generated by Kubb (https://kubb.dev/).
851
+ * Do not edit manually.
852
+ */
853
+ /**
854
+ * @description Query cache configuration.
855
+ */
856
+ type CacheConfig = {
857
+ /**
858
+ * @description Whether query caching is enabled. When false, all queries bypass the cache.
859
+ * @default true
860
+ * @type boolean
861
+ */
862
+ enabled: boolean;
863
+ /**
864
+ * @description Cache TTL in seconds for query results.
865
+ * @minLength 0
866
+ * @maxLength 86400
867
+ * @default 60
868
+ * @type integer
869
+ */
870
+ ttl_seconds: number;
871
+ /**
872
+ * @description Maximum number of cached query results.
873
+ * @minLength 0
874
+ * @maxLength 1000000
875
+ * @default 10000
876
+ * @type integer
877
+ */
878
+ max_entries: number;
879
+ /**
880
+ * @description Stale-while-revalidate window in seconds.
881
+ * @minLength 0
882
+ * @maxLength 86400
883
+ * @default 30
884
+ * @type integer
885
+ */
886
+ swr_seconds: number;
887
+ };
888
+
889
+ /**
890
+ * Generated by Kubb (https://kubb.dev/).
891
+ * Do not edit manually.
892
+ */
893
+ declare const databaseRoleEnum: {
894
+ readonly primary: "primary";
895
+ readonly replica: "replica";
896
+ };
897
+ type DatabaseRoleEnumKey = (typeof databaseRoleEnum)[keyof typeof databaseRoleEnum];
898
+ /**
899
+ * @description Database role. Primary receives writes, replicas receive reads.
900
+ * @default primary
901
+ */
902
+ type DatabaseRole = DatabaseRoleEnumKey;
903
+
904
+ /**
905
+ * Generated by Kubb (https://kubb.dev/).
906
+ * Do not edit manually.
907
+ */
908
+ declare const poolModeEnum: {
909
+ readonly session: "session";
910
+ readonly transaction: "transaction";
911
+ readonly statement: "statement";
912
+ };
913
+ type PoolModeEnumKey = (typeof poolModeEnum)[keyof typeof poolModeEnum];
914
+ /**
915
+ * @description Connection pool mode.
916
+ */
917
+ type PoolMode = PoolModeEnumKey;
918
+
919
+ /**
920
+ * Generated by Kubb (https://kubb.dev/).
921
+ * Do not edit manually.
922
+ */
923
+
924
+ /**
925
+ * @description Connection pool configuration.
926
+ */
927
+ type PoolConfig = {
928
+ /**
929
+ * @description Maximum connections in the pool.
930
+ * @minLength 1
931
+ * @maxLength 10000
932
+ * @default 10
933
+ * @type integer
934
+ */
935
+ pool_size: number;
936
+ /**
937
+ * @description Minimum idle connections maintained.
938
+ * @minLength 1
939
+ * @maxLength 10000
940
+ * @default 1
941
+ * @type integer
942
+ */
943
+ min_pool_size: number;
944
+ /**
945
+ * @description Connection pool mode.
946
+ * @type string
947
+ */
948
+ pool_mode: PoolMode;
949
+ };
950
+
951
+ /**
952
+ * Generated by Kubb (https://kubb.dev/).
953
+ * Do not edit manually.
954
+ */
955
+ declare const SSLModeEnum: {
956
+ readonly disable: "disable";
957
+ readonly allow: "allow";
958
+ readonly prefer: "prefer";
959
+ readonly require: "require";
960
+ readonly "verify-ca": "verify-ca";
961
+ readonly "verify-full": "verify-full";
962
+ };
963
+ type SSLModeEnumKey = (typeof SSLModeEnum)[keyof typeof SSLModeEnum];
964
+ /**
965
+ * @description PostgreSQL SSL connection mode.
966
+ */
967
+ type SSLMode = SSLModeEnumKey;
968
+
969
+ /**
970
+ * Generated by Kubb (https://kubb.dev/).
971
+ * Do not edit manually.
972
+ */
973
+
974
+ type Database = {
975
+ /**
976
+ * @description Unique database identifier (prefixed).
977
+ * @type string
978
+ */
979
+ id: string;
980
+ /**
981
+ * @description Owning project ID.
982
+ * @type string
983
+ */
984
+ project_id: string;
985
+ /**
986
+ * @description Connection string for connecting through PgBeam proxy. Password is replaced with a placeholder.
987
+ * @type string | undefined
988
+ */
989
+ readonly connection_string?: string;
990
+ /**
991
+ * @description PostgreSQL host.
992
+ * @type string
993
+ */
994
+ host: string;
995
+ /**
996
+ * @description PostgreSQL port.
997
+ * @minLength 1
998
+ * @maxLength 65535
999
+ * @type integer
1000
+ */
1001
+ port: number;
1002
+ /**
1003
+ * @description PostgreSQL database name.
1004
+ * @type string
1005
+ */
1006
+ name: string;
1007
+ /**
1008
+ * @description PostgreSQL username.
1009
+ * @type string
1010
+ */
1011
+ username: string;
1012
+ /**
1013
+ * @description PostgreSQL SSL connection mode.
1014
+ * @type string
1015
+ */
1016
+ ssl_mode: SSLMode;
1017
+ /**
1018
+ * @description Database role. Primary receives writes, replicas receive reads.
1019
+ * @default "primary"
1020
+ * @type string | undefined
1021
+ */
1022
+ role?: DatabaseRole;
1023
+ /**
1024
+ * @description AWS region where the connection pool is maintained (near the database). When set and different from the client\'s edge region, queries are relayed through the pool region\'s data plane. Empty means direct connection.\n
1025
+ * @type string | undefined
1026
+ */
1027
+ pool_region?: string;
1028
+ /**
1029
+ * @description Query cache configuration.
1030
+ * @type object
1031
+ */
1032
+ cache_config: CacheConfig;
1033
+ /**
1034
+ * @description Connection pool configuration.
1035
+ * @type object
1036
+ */
1037
+ pool_config: PoolConfig;
1038
+ /**
1039
+ * @type string, date-time
1040
+ */
1041
+ created_at: string;
1042
+ /**
1043
+ * @type string, date-time
1044
+ */
1045
+ updated_at: string;
1046
+ };
1047
+
1048
+ /**
1049
+ * Generated by Kubb (https://kubb.dev/).
1050
+ * Do not edit manually.
1051
+ */
1052
+
1053
+ type ListDatabasesResponse = {
1054
+ /**
1055
+ * @type array
1056
+ */
1057
+ databases: Database[];
1058
+ /**
1059
+ * @description Token for the next page. Empty if no more results.
1060
+ * @type string | undefined
1061
+ */
1062
+ next_page_token?: string;
1063
+ };
1064
+
1065
+ /**
1066
+ * Generated by Kubb (https://kubb.dev/).
1067
+ * Do not edit manually.
1068
+ */
1069
+
1070
+ type ListDatabasesPathParams = {
1071
+ /**
1072
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
1073
+ * @pattern ^[a-zA-Z0-9_.-]+$
1074
+ * @type string
1075
+ */
1076
+ project_id: string;
1077
+ };
1078
+ type ListDatabasesQueryParams = {
1079
+ /**
1080
+ * @description Maximum number of items to return (1-100, default 20).
1081
+ * @minLength 1
1082
+ * @maxLength 100
1083
+ * @default 20
1084
+ * @type integer | undefined
1085
+ */
1086
+ page_size?: number;
1087
+ /**
1088
+ * @description Opaque token for cursor-based pagination.
1089
+ * @pattern ^[a-zA-Z0-9_.-]+$
1090
+ * @type string | undefined
1091
+ */
1092
+ page_token?: string;
1093
+ };
1094
+ /**
1095
+ * @description List of databases.
1096
+ */
1097
+ type ListDatabases200 = ListDatabasesResponse;
1098
+ /**
1099
+ * @description Invalid request parameters.
1100
+ */
1101
+ type ListDatabases400 = Error$1;
1102
+ /**
1103
+ * @description Missing or invalid authentication.
1104
+ */
1105
+ type ListDatabases401 = Error$1;
1106
+ /**
1107
+ * @description Operation not allowed by current plan limits.
1108
+ */
1109
+ type ListDatabases403 = Error$1;
1110
+ /**
1111
+ * @description Resource not found.
1112
+ */
1113
+ type ListDatabases404 = Error$1;
1114
+ type ListDatabasesQueryResponse = ListDatabases200;
1115
+ type ListDatabasesQuery = {
1116
+ Response: ListDatabases200;
1117
+ PathParams: ListDatabasesPathParams;
1118
+ QueryParams: ListDatabasesQueryParams;
1119
+ Errors: ListDatabases400 | ListDatabases401 | ListDatabases403 | ListDatabases404;
1120
+ };
1121
+
1122
+ /**
1123
+ * Generated by Kubb (https://kubb.dev/).
1124
+ * Do not edit manually.
1125
+ */
1126
+
1127
+ type CreateDatabaseRequest = {
1128
+ /**
1129
+ * @description PostgreSQL host.
1130
+ * @minLength 1
1131
+ * @pattern ^[^\s\x00]+$
1132
+ * @type string
1133
+ */
1134
+ host: string;
1135
+ /**
1136
+ * @description PostgreSQL port.
1137
+ * @minLength 1
1138
+ * @maxLength 65535
1139
+ * @type integer
1140
+ */
1141
+ port: number;
1142
+ /**
1143
+ * @description PostgreSQL database name.
1144
+ * @minLength 1
1145
+ * @pattern ^[^\x00]+$
1146
+ * @type string
1147
+ */
1148
+ name: string;
1149
+ /**
1150
+ * @description PostgreSQL username.
1151
+ * @minLength 1
1152
+ * @pattern ^[^\x00]+$
1153
+ * @type string
1154
+ */
1155
+ username: string;
1156
+ /**
1157
+ * @description PostgreSQL password. Stored encrypted at rest.
1158
+ * @minLength 1
1159
+ * @pattern ^[^\x00]+$
1160
+ * @type string, password
1161
+ */
1162
+ password: string;
1163
+ /**
1164
+ * @description PostgreSQL SSL connection mode.
1165
+ * @type string | undefined
1166
+ */
1167
+ ssl_mode?: SSLMode;
1168
+ /**
1169
+ * @description Database role. Primary receives writes, replicas receive reads.
1170
+ * @default "primary"
1171
+ * @type string | undefined
1172
+ */
1173
+ role?: DatabaseRole;
1174
+ /**
1175
+ * @description AWS region where the connection pool is maintained (near the database). When set and different from the client\'s edge region, queries are relayed through the pool region\'s data plane. Empty means direct connection.\n
1176
+ * @type string | undefined
1177
+ */
1178
+ pool_region?: string;
1179
+ /**
1180
+ * @description Query cache configuration.
1181
+ * @type object | undefined
1182
+ */
1183
+ cache_config?: CacheConfig;
1184
+ /**
1185
+ * @description Connection pool configuration.
1186
+ * @type object | undefined
1187
+ */
1188
+ pool_config?: PoolConfig;
1189
+ };
1190
+
1191
+ /**
1192
+ * Generated by Kubb (https://kubb.dev/).
1193
+ * Do not edit manually.
1194
+ */
1195
+
1196
+ type CreateDatabasePathParams = {
1197
+ /**
1198
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
1199
+ * @pattern ^[a-zA-Z0-9_.-]+$
1200
+ * @type string
1201
+ */
1202
+ project_id: string;
1203
+ };
1204
+ /**
1205
+ * @description Database created.
1206
+ */
1207
+ type CreateDatabase201 = Database;
1208
+ /**
1209
+ * @description Invalid request parameters.
1210
+ */
1211
+ type CreateDatabase400 = Error$1;
1212
+ /**
1213
+ * @description Missing or invalid authentication.
1214
+ */
1215
+ type CreateDatabase401 = Error$1;
1216
+ /**
1217
+ * @description Operation not allowed by current plan limits.
1218
+ */
1219
+ type CreateDatabase403 = Error$1;
1220
+ /**
1221
+ * @description Resource not found.
1222
+ */
1223
+ type CreateDatabase404 = Error$1;
1224
+ type CreateDatabaseMutationRequest = CreateDatabaseRequest;
1225
+ type CreateDatabaseMutationResponse = CreateDatabase201;
1226
+ type CreateDatabaseMutation = {
1227
+ Response: CreateDatabase201;
1228
+ Request: CreateDatabaseMutationRequest;
1229
+ PathParams: CreateDatabasePathParams;
1230
+ Errors: CreateDatabase400 | CreateDatabase401 | CreateDatabase403 | CreateDatabase404;
1231
+ };
1232
+
1233
+ /**
1234
+ * Generated by Kubb (https://kubb.dev/).
1235
+ * Do not edit manually.
1236
+ */
1237
+
1238
+ type GetDatabasePathParams = {
1239
+ /**
1240
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
1241
+ * @pattern ^[a-zA-Z0-9_.-]+$
1242
+ * @type string
1243
+ */
1244
+ project_id: string;
1245
+ /**
1246
+ * @description Unique database identifier (prefixed, e.g. db_xxx).
1247
+ * @pattern ^[a-zA-Z0-9_.-]+$
1248
+ * @type string
1249
+ */
1250
+ database_id: string;
1251
+ };
1252
+ /**
1253
+ * @description Database found.
1254
+ */
1255
+ type GetDatabase200 = Database;
1256
+ /**
1257
+ * @description Invalid request parameters.
1258
+ */
1259
+ type GetDatabase400 = Error$1;
1260
+ /**
1261
+ * @description Missing or invalid authentication.
1262
+ */
1263
+ type GetDatabase401 = Error$1;
1264
+ /**
1265
+ * @description Operation not allowed by current plan limits.
1266
+ */
1267
+ type GetDatabase403 = Error$1;
1268
+ /**
1269
+ * @description Resource not found.
1270
+ */
1271
+ type GetDatabase404 = Error$1;
1272
+ type GetDatabaseQueryResponse = GetDatabase200;
1273
+ type GetDatabaseQuery = {
1274
+ Response: GetDatabase200;
1275
+ PathParams: GetDatabasePathParams;
1276
+ Errors: GetDatabase400 | GetDatabase401 | GetDatabase403 | GetDatabase404;
1277
+ };
1278
+
1279
+ /**
1280
+ * Generated by Kubb (https://kubb.dev/).
1281
+ * Do not edit manually.
1282
+ */
1283
+
1284
+ type UpdateDatabaseRequest = {
1285
+ /**
1286
+ * @description Updated PostgreSQL host.
1287
+ * @minLength 1
1288
+ * @pattern ^[^\x00]+$
1289
+ * @type string | undefined
1290
+ */
1291
+ host?: string;
1292
+ /**
1293
+ * @description Updated PostgreSQL port.
1294
+ * @minLength 1
1295
+ * @maxLength 65535
1296
+ * @type integer | undefined
1297
+ */
1298
+ port?: number;
1299
+ /**
1300
+ * @description Updated PostgreSQL database name.
1301
+ * @pattern ^[^\x00]*$
1302
+ * @type string | undefined
1303
+ */
1304
+ name?: string;
1305
+ /**
1306
+ * @description Updated PostgreSQL username.
1307
+ * @pattern ^[^\x00]*$
1308
+ * @type string | undefined
1309
+ */
1310
+ username?: string;
1311
+ /**
1312
+ * @description Updated PostgreSQL password.
1313
+ * @pattern ^[^\x00]*$
1314
+ * @type string | undefined, password
1315
+ */
1316
+ password?: string;
1317
+ /**
1318
+ * @description PostgreSQL SSL connection mode.
1319
+ * @type string | undefined
1320
+ */
1321
+ ssl_mode?: SSLMode;
1322
+ /**
1323
+ * @description Database role. Primary receives writes, replicas receive reads.
1324
+ * @default "primary"
1325
+ * @type string | undefined
1326
+ */
1327
+ role?: DatabaseRole;
1328
+ /**
1329
+ * @description AWS region where the connection pool is maintained (near the database). When set and different from the client\'s edge region, queries are relayed through the pool region\'s data plane. Empty means direct connection.\n
1330
+ * @type string | undefined
1331
+ */
1332
+ pool_region?: string;
1333
+ /**
1334
+ * @description Query cache configuration.
1335
+ * @type object | undefined
1336
+ */
1337
+ cache_config?: CacheConfig;
1338
+ /**
1339
+ * @description Connection pool configuration.
1340
+ * @type object | undefined
1341
+ */
1342
+ pool_config?: PoolConfig;
1343
+ };
1344
+
1345
+ /**
1346
+ * Generated by Kubb (https://kubb.dev/).
1347
+ * Do not edit manually.
1348
+ */
1349
+
1350
+ type UpdateDatabasePathParams = {
1351
+ /**
1352
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
1353
+ * @pattern ^[a-zA-Z0-9_.-]+$
1354
+ * @type string
1355
+ */
1356
+ project_id: string;
1357
+ /**
1358
+ * @description Unique database identifier (prefixed, e.g. db_xxx).
1359
+ * @pattern ^[a-zA-Z0-9_.-]+$
1360
+ * @type string
1361
+ */
1362
+ database_id: string;
1363
+ };
1364
+ /**
1365
+ * @description Database updated.
1366
+ */
1367
+ type UpdateDatabase200 = Database;
1368
+ /**
1369
+ * @description Invalid request parameters.
1370
+ */
1371
+ type UpdateDatabase400 = Error$1;
1372
+ /**
1373
+ * @description Missing or invalid authentication.
1374
+ */
1375
+ type UpdateDatabase401 = Error$1;
1376
+ /**
1377
+ * @description Operation not allowed by current plan limits.
1378
+ */
1379
+ type UpdateDatabase403 = Error$1;
1380
+ /**
1381
+ * @description Resource not found.
1382
+ */
1383
+ type UpdateDatabase404 = Error$1;
1384
+ type UpdateDatabaseMutationRequest = UpdateDatabaseRequest;
1385
+ type UpdateDatabaseMutationResponse = UpdateDatabase200;
1386
+ type UpdateDatabaseMutation = {
1387
+ Response: UpdateDatabase200;
1388
+ Request: UpdateDatabaseMutationRequest;
1389
+ PathParams: UpdateDatabasePathParams;
1390
+ Errors: UpdateDatabase400 | UpdateDatabase401 | UpdateDatabase403 | UpdateDatabase404;
1391
+ };
1392
+
1393
+ /**
1394
+ * Generated by Kubb (https://kubb.dev/).
1395
+ * Do not edit manually.
1396
+ */
1397
+
1398
+ type DeleteDatabasePathParams = {
1399
+ /**
1400
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
1401
+ * @pattern ^[a-zA-Z0-9_.-]+$
1402
+ * @type string
1403
+ */
1404
+ project_id: string;
1405
+ /**
1406
+ * @description Unique database identifier (prefixed, e.g. db_xxx).
1407
+ * @pattern ^[a-zA-Z0-9_.-]+$
1408
+ * @type string
1409
+ */
1410
+ database_id: string;
1411
+ };
1412
+ /**
1413
+ * @description Database deleted.
1414
+ */
1415
+ type DeleteDatabase204 = any;
1416
+ /**
1417
+ * @description Invalid request parameters.
1418
+ */
1419
+ type DeleteDatabase400 = Error$1;
1420
+ /**
1421
+ * @description Missing or invalid authentication.
1422
+ */
1423
+ type DeleteDatabase401 = Error$1;
1424
+ /**
1425
+ * @description Operation not allowed by current plan limits.
1426
+ */
1427
+ type DeleteDatabase403 = Error$1;
1428
+ /**
1429
+ * @description Resource not found.
1430
+ */
1431
+ type DeleteDatabase404 = Error$1;
1432
+ type DeleteDatabaseMutationResponse = DeleteDatabase204;
1433
+ type DeleteDatabaseMutation = {
1434
+ Response: DeleteDatabase204;
1435
+ PathParams: DeleteDatabasePathParams;
1436
+ Errors: DeleteDatabase400 | DeleteDatabase401 | DeleteDatabase403 | DeleteDatabase404;
1437
+ };
1438
+
1439
+ /**
1440
+ * Generated by Kubb (https://kubb.dev/).
1441
+ * Do not edit manually.
1442
+ */
1443
+ type TestConnectionResult = {
1444
+ /**
1445
+ * @description Whether the connection test succeeded.
1446
+ * @type boolean
1447
+ */
1448
+ ok: boolean;
1449
+ /**
1450
+ * @description Round-trip connection time in milliseconds.
1451
+ * @type number
1452
+ */
1453
+ latency_ms?: number | null;
1454
+ /**
1455
+ * @description Error message if the connection test failed.
1456
+ * @type string | undefined
1457
+ */
1458
+ error?: string;
1459
+ /**
1460
+ * @description PostgreSQL server version string, if available.
1461
+ * @type string | undefined
1462
+ */
1463
+ server_version?: string;
1464
+ };
1465
+
1466
+ /**
1467
+ * Generated by Kubb (https://kubb.dev/).
1468
+ * Do not edit manually.
1469
+ */
1470
+
1471
+ type TestDatabaseConnectionPathParams = {
1472
+ /**
1473
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
1474
+ * @pattern ^[a-zA-Z0-9_.-]+$
1475
+ * @type string
1476
+ */
1477
+ project_id: string;
1478
+ /**
1479
+ * @description Unique database identifier (prefixed, e.g. db_xxx).
1480
+ * @pattern ^[a-zA-Z0-9_.-]+$
1481
+ * @type string
1482
+ */
1483
+ database_id: string;
1484
+ };
1485
+ /**
1486
+ * @description Connection test result.
1487
+ */
1488
+ type TestDatabaseConnection200 = TestConnectionResult;
1489
+ /**
1490
+ * @description Invalid request parameters.
1491
+ */
1492
+ type TestDatabaseConnection400 = Error$1;
1493
+ /**
1494
+ * @description Missing or invalid authentication.
1495
+ */
1496
+ type TestDatabaseConnection401 = Error$1;
1497
+ /**
1498
+ * @description Operation not allowed by current plan limits.
1499
+ */
1500
+ type TestDatabaseConnection403 = Error$1;
1501
+ /**
1502
+ * @description Resource not found.
1503
+ */
1504
+ type TestDatabaseConnection404 = Error$1;
1505
+ type TestDatabaseConnectionMutationResponse = TestDatabaseConnection200;
1506
+ type TestDatabaseConnectionMutation = {
1507
+ Response: TestDatabaseConnection200;
1508
+ PathParams: TestDatabaseConnectionPathParams;
1509
+ Errors: TestDatabaseConnection400 | TestDatabaseConnection401 | TestDatabaseConnection403 | TestDatabaseConnection404;
1510
+ };
1511
+
1512
+ /**
1513
+ * Generated by Kubb (https://kubb.dev/).
1514
+ * Do not edit manually.
1515
+ */
1516
+ type CustomDomain = {
1517
+ /**
1518
+ * @description Unique domain identifier (prefixed).
1519
+ * @type string
1520
+ */
1521
+ id: string;
1522
+ /**
1523
+ * @description Owning project ID.
1524
+ * @type string
1525
+ */
1526
+ project_id: string;
1527
+ /**
1528
+ * @description The custom domain name.
1529
+ * @type string
1530
+ */
1531
+ domain: string;
1532
+ /**
1533
+ * @description Whether DNS ownership has been verified.
1534
+ * @type boolean
1535
+ */
1536
+ verified: boolean;
1537
+ /**
1538
+ * @description When DNS verification was completed.
1539
+ * @type string, date-time
1540
+ */
1541
+ verified_at?: string | null;
1542
+ /**
1543
+ * @description When the TLS certificate expires.
1544
+ * @type string, date-time
1545
+ */
1546
+ tls_cert_expiry?: string | null;
1547
+ /**
1548
+ * @description Token value for the DNS TXT record verification.
1549
+ * @type string
1550
+ */
1551
+ dns_verification_token: string;
1552
+ /**
1553
+ * @description DNS records the user needs to create.
1554
+ * @type object | undefined
1555
+ */
1556
+ dns_instructions?: {
1557
+ /**
1558
+ * @description The CNAME record host.
1559
+ * @type string | undefined
1560
+ */
1561
+ cname_host?: string;
1562
+ /**
1563
+ * @description The CNAME record target.
1564
+ * @type string | undefined
1565
+ */
1566
+ cname_target?: string;
1567
+ /**
1568
+ * @description The TXT record host for verification.
1569
+ * @type string | undefined
1570
+ */
1571
+ txt_host?: string;
1572
+ /**
1573
+ * @description The TXT record value for verification.
1574
+ * @type string | undefined
1575
+ */
1576
+ txt_value?: string;
1577
+ /**
1578
+ * @description The CNAME record host for ACME TLS certificate issuance.
1579
+ * @type string | undefined
1580
+ */
1581
+ acme_cname_host?: string;
1582
+ /**
1583
+ * @description The CNAME target for ACME challenge delegation.
1584
+ * @type string | undefined
1585
+ */
1586
+ acme_cname_target?: string;
1587
+ };
1588
+ /**
1589
+ * @type string, date-time
1590
+ */
1591
+ created_at: string;
1592
+ /**
1593
+ * @type string, date-time
1594
+ */
1595
+ updated_at: string;
1596
+ };
1597
+
1598
+ /**
1599
+ * Generated by Kubb (https://kubb.dev/).
1600
+ * Do not edit manually.
1601
+ */
1602
+
1603
+ type ListCustomDomainsResponse = {
1604
+ /**
1605
+ * @type array
1606
+ */
1607
+ domains: CustomDomain[];
1608
+ /**
1609
+ * @description Token for the next page. Empty if no more results.
1610
+ * @type string | undefined
1611
+ */
1612
+ next_page_token?: string;
1613
+ };
1614
+
1615
+ /**
1616
+ * Generated by Kubb (https://kubb.dev/).
1617
+ * Do not edit manually.
1618
+ */
1619
+
1620
+ type ListCustomDomainsPathParams = {
1621
+ /**
1622
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
1623
+ * @pattern ^[a-zA-Z0-9_.-]+$
1624
+ * @type string
1625
+ */
1626
+ project_id: string;
1627
+ };
1628
+ type ListCustomDomainsQueryParams = {
1629
+ /**
1630
+ * @description Maximum number of items to return (1-100, default 20).
1631
+ * @minLength 1
1632
+ * @maxLength 100
1633
+ * @default 20
1634
+ * @type integer | undefined
1635
+ */
1636
+ page_size?: number;
1637
+ /**
1638
+ * @description Opaque token for cursor-based pagination.
1639
+ * @pattern ^[a-zA-Z0-9_.-]+$
1640
+ * @type string | undefined
1641
+ */
1642
+ page_token?: string;
1643
+ };
1644
+ /**
1645
+ * @description List of custom domains.
1646
+ */
1647
+ type ListCustomDomains200 = ListCustomDomainsResponse;
1648
+ /**
1649
+ * @description Invalid request parameters.
1650
+ */
1651
+ type ListCustomDomains400 = Error$1;
1652
+ /**
1653
+ * @description Missing or invalid authentication.
1654
+ */
1655
+ type ListCustomDomains401 = Error$1;
1656
+ /**
1657
+ * @description Operation not allowed by current plan limits.
1658
+ */
1659
+ type ListCustomDomains403 = Error$1;
1660
+ /**
1661
+ * @description Resource not found.
1662
+ */
1663
+ type ListCustomDomains404 = Error$1;
1664
+ type ListCustomDomainsQueryResponse = ListCustomDomains200;
1665
+ type ListCustomDomainsQuery = {
1666
+ Response: ListCustomDomains200;
1667
+ PathParams: ListCustomDomainsPathParams;
1668
+ QueryParams: ListCustomDomainsQueryParams;
1669
+ Errors: ListCustomDomains400 | ListCustomDomains401 | ListCustomDomains403 | ListCustomDomains404;
1670
+ };
1671
+
1672
+ /**
1673
+ * Generated by Kubb (https://kubb.dev/).
1674
+ * Do not edit manually.
1675
+ */
1676
+ type CreateCustomDomainRequest = {
1677
+ /**
1678
+ * @description The custom domain name to add (e.g., db.example.com).
1679
+ * @minLength 1
1680
+ * @maxLength 253
1681
+ * @pattern ^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*$
1682
+ * @type string
1683
+ */
1684
+ domain: string;
1685
+ };
1686
+
1687
+ /**
1688
+ * Generated by Kubb (https://kubb.dev/).
1689
+ * Do not edit manually.
1690
+ */
1691
+
1692
+ type CreateCustomDomainPathParams = {
1693
+ /**
1694
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
1695
+ * @pattern ^[a-zA-Z0-9_.-]+$
1696
+ * @type string
1697
+ */
1698
+ project_id: string;
1699
+ };
1700
+ /**
1701
+ * @description Custom domain created.
1702
+ */
1703
+ type CreateCustomDomain201 = CustomDomain;
1704
+ /**
1705
+ * @description Invalid request parameters.
1706
+ */
1707
+ type CreateCustomDomain400 = Error$1;
1708
+ /**
1709
+ * @description Missing or invalid authentication.
1710
+ */
1711
+ type CreateCustomDomain401 = Error$1;
1712
+ /**
1713
+ * @description Custom domains require a Scale or Enterprise plan.
1714
+ */
1715
+ type CreateCustomDomain403 = Error$1;
1716
+ /**
1717
+ * @description Resource not found.
1718
+ */
1719
+ type CreateCustomDomain404 = Error$1;
1720
+ /**
1721
+ * @description Resource already exists or conflicts with current state.
1722
+ */
1723
+ type CreateCustomDomain409 = Error$1;
1724
+ type CreateCustomDomainMutationRequest = CreateCustomDomainRequest;
1725
+ type CreateCustomDomainMutationResponse = CreateCustomDomain201;
1726
+ type CreateCustomDomainMutation = {
1727
+ Response: CreateCustomDomain201;
1728
+ Request: CreateCustomDomainMutationRequest;
1729
+ PathParams: CreateCustomDomainPathParams;
1730
+ Errors: CreateCustomDomain400 | CreateCustomDomain401 | CreateCustomDomain403 | CreateCustomDomain404 | CreateCustomDomain409;
1731
+ };
1732
+
1733
+ /**
1734
+ * Generated by Kubb (https://kubb.dev/).
1735
+ * Do not edit manually.
1736
+ */
1737
+
1738
+ type DeleteCustomDomainPathParams = {
1739
+ /**
1740
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
1741
+ * @pattern ^[a-zA-Z0-9_.-]+$
1742
+ * @type string
1743
+ */
1744
+ project_id: string;
1745
+ /**
1746
+ * @description Unique custom domain identifier (prefixed, e.g. dom_xxx).
1747
+ * @pattern ^[a-zA-Z0-9_.-]+$
1748
+ * @type string
1749
+ */
1750
+ domain_id: string;
1751
+ };
1752
+ /**
1753
+ * @description Custom domain deleted.
1754
+ */
1755
+ type DeleteCustomDomain204 = any;
1756
+ /**
1757
+ * @description Invalid request parameters.
1758
+ */
1759
+ type DeleteCustomDomain400 = Error$1;
1760
+ /**
1761
+ * @description Missing or invalid authentication.
1762
+ */
1763
+ type DeleteCustomDomain401 = Error$1;
1764
+ /**
1765
+ * @description Operation not allowed by current plan limits.
1766
+ */
1767
+ type DeleteCustomDomain403 = Error$1;
1768
+ /**
1769
+ * @description Resource not found.
1770
+ */
1771
+ type DeleteCustomDomain404 = Error$1;
1772
+ type DeleteCustomDomainMutationResponse = DeleteCustomDomain204;
1773
+ type DeleteCustomDomainMutation = {
1774
+ Response: DeleteCustomDomain204;
1775
+ PathParams: DeleteCustomDomainPathParams;
1776
+ Errors: DeleteCustomDomain400 | DeleteCustomDomain401 | DeleteCustomDomain403 | DeleteCustomDomain404;
1777
+ };
1778
+
1779
+ /**
1780
+ * Generated by Kubb (https://kubb.dev/).
1781
+ * Do not edit manually.
1782
+ */
1783
+
1784
+ type VerifyCustomDomainResponse = {
1785
+ /**
1786
+ * @description Whether DNS verification succeeded.
1787
+ * @type boolean
1788
+ */
1789
+ verified: boolean;
1790
+ /**
1791
+ * @description Error message if verification failed.
1792
+ * @type string | undefined
1793
+ */
1794
+ error?: string;
1795
+ /**
1796
+ * @type object | undefined
1797
+ */
1798
+ domain?: CustomDomain;
1799
+ };
1800
+
1801
+ /**
1802
+ * Generated by Kubb (https://kubb.dev/).
1803
+ * Do not edit manually.
1804
+ */
1805
+
1806
+ type VerifyCustomDomainPathParams = {
1807
+ /**
1808
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
1809
+ * @pattern ^[a-zA-Z0-9_.-]+$
1810
+ * @type string
1811
+ */
1812
+ project_id: string;
1813
+ /**
1814
+ * @description Unique custom domain identifier (prefixed, e.g. dom_xxx).
1815
+ * @pattern ^[a-zA-Z0-9_.-]+$
1816
+ * @type string
1817
+ */
1818
+ domain_id: string;
1819
+ };
1820
+ /**
1821
+ * @description Verification result.
1822
+ */
1823
+ type VerifyCustomDomain200 = VerifyCustomDomainResponse;
1824
+ /**
1825
+ * @description Invalid request parameters.
1826
+ */
1827
+ type VerifyCustomDomain400 = Error$1;
1828
+ /**
1829
+ * @description Missing or invalid authentication.
1830
+ */
1831
+ type VerifyCustomDomain401 = Error$1;
1832
+ /**
1833
+ * @description Custom domains require a Scale or Enterprise plan.
1834
+ */
1835
+ type VerifyCustomDomain403 = Error$1;
1836
+ /**
1837
+ * @description Resource not found.
1838
+ */
1839
+ type VerifyCustomDomain404 = Error$1;
1840
+ type VerifyCustomDomainMutationResponse = VerifyCustomDomain200;
1841
+ type VerifyCustomDomainMutation = {
1842
+ Response: VerifyCustomDomain200;
1843
+ PathParams: VerifyCustomDomainPathParams;
1844
+ Errors: VerifyCustomDomain400 | VerifyCustomDomain401 | VerifyCustomDomain403 | VerifyCustomDomain404;
1845
+ };
1846
+
1847
+ /**
1848
+ * Generated by Kubb (https://kubb.dev/).
1849
+ * Do not edit manually.
1850
+ */
1851
+ declare const healthResponseStatusEnum: {
1852
+ readonly ok: "ok";
1853
+ readonly degraded: "degraded";
1854
+ };
1855
+ type HealthResponseStatusEnumKey = (typeof healthResponseStatusEnum)[keyof typeof healthResponseStatusEnum];
1856
+ type HealthResponse = {
1857
+ /**
1858
+ * @description Overall service health.
1859
+ * @type string
1860
+ */
1861
+ status: HealthResponseStatusEnumKey;
1862
+ /**
1863
+ * @description API server version.
1864
+ * @type string
1865
+ */
1866
+ version: string;
1867
+ /**
1868
+ * @description Resolved image SHA (digest or SHA tag).
1869
+ * @type string
1870
+ */
1871
+ image_sha: string;
1872
+ /**
1873
+ * @description Server time.
1874
+ * @type string | undefined, date-time
1875
+ */
1876
+ timestamp?: string;
1877
+ };
1878
+
1879
+ /**
1880
+ * Generated by Kubb (https://kubb.dev/).
1881
+ * Do not edit manually.
1882
+ */
1883
+
1884
+ /**
1885
+ * @description Service is healthy.
1886
+ */
1887
+ type GetHealth200 = HealthResponse;
1888
+ /**
1889
+ * @description Too many requests.
1890
+ */
1891
+ type GetHealth429 = any;
1892
+ type GetHealthQueryResponse = GetHealth200;
1893
+ type GetHealthQuery = {
1894
+ Response: GetHealth200;
1895
+ Errors: GetHealth429;
1896
+ };
1897
+
1898
+ /**
1899
+ * Generated by Kubb (https://kubb.dev/).
1900
+ * Do not edit manually.
1901
+ */
1902
+ type CacheSummary = {
1903
+ /**
1904
+ * @type integer, int64
1905
+ */
1906
+ total_hits: number;
1907
+ /**
1908
+ * @type integer, int64
1909
+ */
1910
+ total_misses: number;
1911
+ /**
1912
+ * @description Cache hit rate as a fraction (0.0 to 1.0).
1913
+ * @type number, double
1914
+ */
1915
+ hit_rate: number;
1916
+ };
1917
+
1918
+ /**
1919
+ * Generated by Kubb (https://kubb.dev/).
1920
+ * Do not edit manually.
1921
+ */
1922
+ type LatencySummary = {
1923
+ /**
1924
+ * @description Average latency in milliseconds across all queries.
1925
+ * @type number, double
1926
+ */
1927
+ avg_ms: number;
1928
+ /**
1929
+ * @description P99 latency in milliseconds across all queries.
1930
+ * @type number, double
1931
+ */
1932
+ p99_ms: number;
1933
+ };
1934
+
1935
+ /**
1936
+ * Generated by Kubb (https://kubb.dev/).
1937
+ * Do not edit manually.
1938
+ */
1939
+ type QueryInsight = {
1940
+ /**
1941
+ * @description xxhash64 of the normalized SQL pattern (hex).
1942
+ * @type string
1943
+ */
1944
+ query_hash: string;
1945
+ /**
1946
+ * @description Normalized SQL pattern (truncated to 500 chars).
1947
+ * @type string
1948
+ */
1949
+ query_pattern: string;
1950
+ /**
1951
+ * @description Total number of executions in the time range.
1952
+ * @type integer, int64
1953
+ */
1954
+ total_count: number;
1955
+ /**
1956
+ * @type integer, int64
1957
+ */
1958
+ total_cache_hits: number;
1959
+ /**
1960
+ * @type integer, int64
1961
+ */
1962
+ total_cache_misses: number;
1963
+ /**
1964
+ * @description Average query latency in milliseconds.
1965
+ * @type number, double
1966
+ */
1967
+ avg_latency_ms: number;
1968
+ /**
1969
+ * @description P99 query latency in milliseconds.
1970
+ * @type number, double
1971
+ */
1972
+ p99_latency_ms: number;
1973
+ };
1974
+
1975
+ /**
1976
+ * Generated by Kubb (https://kubb.dev/).
1977
+ * Do not edit manually.
1978
+ */
1979
+
1980
+ type ProjectInsights = {
1981
+ /**
1982
+ * @type array
1983
+ */
1984
+ queries: QueryInsight[];
1985
+ /**
1986
+ * @type object
1987
+ */
1988
+ cache: CacheSummary;
1989
+ /**
1990
+ * @type object
1991
+ */
1992
+ latency: LatencySummary;
1993
+ };
1994
+
1995
+ /**
1996
+ * Generated by Kubb (https://kubb.dev/).
1997
+ * Do not edit manually.
1998
+ */
1999
+
2000
+ type GetProjectInsightsPathParams = {
2001
+ /**
2002
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
2003
+ * @pattern ^[a-zA-Z0-9_.-]+$
2004
+ * @type string
2005
+ */
2006
+ project_id: string;
2007
+ };
2008
+ declare const getProjectInsightsQueryParamsRangeEnum: {
2009
+ readonly "1h": "1h";
2010
+ readonly "6h": "6h";
2011
+ readonly "24h": "24h";
2012
+ readonly "7d": "7d";
2013
+ };
2014
+ type GetProjectInsightsQueryParamsRangeEnumKey = (typeof getProjectInsightsQueryParamsRangeEnum)[keyof typeof getProjectInsightsQueryParamsRangeEnum];
2015
+ type GetProjectInsightsQueryParams = {
2016
+ /**
2017
+ * @description Time range to query. Defaults to 24h.
2018
+ * @default "24h"
2019
+ * @type string | undefined
2020
+ */
2021
+ range?: GetProjectInsightsQueryParamsRangeEnumKey;
2022
+ /**
2023
+ * @description Maximum number of top queries to return (1-100).
2024
+ * @minLength 1
2025
+ * @maxLength 100
2026
+ * @default 20
2027
+ * @type integer | undefined
2028
+ */
2029
+ limit?: number;
2030
+ };
2031
+ /**
2032
+ * @description Query insights for the project.
2033
+ */
2034
+ type GetProjectInsights200 = ProjectInsights;
2035
+ /**
2036
+ * @description Missing or invalid authentication.
2037
+ */
2038
+ type GetProjectInsights401 = Error$1;
2039
+ /**
2040
+ * @description Resource not found.
2041
+ */
2042
+ type GetProjectInsights404 = Error$1;
2043
+ type GetProjectInsightsQueryResponse = GetProjectInsights200;
2044
+ type GetProjectInsightsQuery = {
2045
+ Response: GetProjectInsights200;
2046
+ PathParams: GetProjectInsightsPathParams;
2047
+ QueryParams: GetProjectInsightsQueryParams;
2048
+ Errors: GetProjectInsights401 | GetProjectInsights404;
2049
+ };
2050
+
2051
+ /**
2052
+ * Generated by Kubb (https://kubb.dev/).
2053
+ * Do not edit manually.
2054
+ */
2055
+ type OnboardingProgress = {
2056
+ /**
2057
+ * @description Organization ID this onboarding belongs to.
2058
+ * @type string
2059
+ */
2060
+ organization_id: string;
2061
+ /**
2062
+ * @description Whether the organization has been created.
2063
+ * @type boolean
2064
+ */
2065
+ org_created: boolean;
2066
+ /**
2067
+ * @description Whether a project has been created.
2068
+ * @type boolean
2069
+ */
2070
+ project_created: boolean;
2071
+ /**
2072
+ * @description Whether a database has been added.
2073
+ * @type boolean
2074
+ */
2075
+ database_added: boolean;
2076
+ /**
2077
+ * @description Whether the database connection has been tested.
2078
+ * @type boolean
2079
+ */
2080
+ connection_tested: boolean;
2081
+ /**
2082
+ * @description Whether the connection string has been copied.
2083
+ * @type boolean
2084
+ */
2085
+ connection_string_copied: boolean;
2086
+ /**
2087
+ * @description Whether the first query has been run through PgBeam.
2088
+ * @type boolean
2089
+ */
2090
+ first_query_run: boolean;
2091
+ /**
2092
+ * @description Whether the user has dismissed the onboarding checklist.
2093
+ * @type boolean
2094
+ */
2095
+ dismissed: boolean;
2096
+ /**
2097
+ * @description Whether all onboarding steps are complete.
2098
+ * @type boolean
2099
+ */
2100
+ completed: boolean;
2101
+ /**
2102
+ * @description Number of completed onboarding steps.
2103
+ * @type integer
2104
+ */
2105
+ steps_completed: number;
2106
+ /**
2107
+ * @description Total number of onboarding steps.
2108
+ * @type integer
2109
+ */
2110
+ steps_total: number;
2111
+ /**
2112
+ * @description When onboarding was completed. Null if not yet completed.
2113
+ * @type string | undefined, date-time
2114
+ */
2115
+ completed_at?: string;
2116
+ };
2117
+
2118
+ /**
2119
+ * Generated by Kubb (https://kubb.dev/).
2120
+ * Do not edit manually.
2121
+ */
2122
+
2123
+ type GetOnboardingProgressPathParams = {
2124
+ /**
2125
+ * @description Organization ID.
2126
+ * @pattern ^[\x20-\x7E]+$
2127
+ * @type string
2128
+ */
2129
+ org_id: string;
2130
+ };
2131
+ /**
2132
+ * @description Onboarding progress.
2133
+ */
2134
+ type GetOnboardingProgress200 = OnboardingProgress;
2135
+ /**
2136
+ * @description Missing or invalid authentication.
2137
+ */
2138
+ type GetOnboardingProgress401 = Error$1;
2139
+ /**
2140
+ * @description Operation not allowed by current plan limits.
2141
+ */
2142
+ type GetOnboardingProgress403 = Error$1;
2143
+ /**
2144
+ * @description Resource not found.
2145
+ */
2146
+ type GetOnboardingProgress404 = Error$1;
2147
+ type GetOnboardingProgressQueryResponse = GetOnboardingProgress200;
2148
+ type GetOnboardingProgressQuery = {
2149
+ Response: GetOnboardingProgress200;
2150
+ PathParams: GetOnboardingProgressPathParams;
2151
+ Errors: GetOnboardingProgress401 | GetOnboardingProgress403 | GetOnboardingProgress404;
2152
+ };
2153
+
2154
+ /**
2155
+ * Generated by Kubb (https://kubb.dev/).
2156
+ * Do not edit manually.
2157
+ */
2158
+ declare const updateOnboardingRequestStepEnum: {
2159
+ readonly project_created: "project_created";
2160
+ readonly database_added: "database_added";
2161
+ readonly connection_tested: "connection_tested";
2162
+ readonly connection_string_copied: "connection_string_copied";
2163
+ readonly first_query_run: "first_query_run";
2164
+ };
2165
+ type UpdateOnboardingRequestStepEnumKey = (typeof updateOnboardingRequestStepEnum)[keyof typeof updateOnboardingRequestStepEnum];
2166
+ type UpdateOnboardingRequest = {
2167
+ /**
2168
+ * @description The onboarding step to mark as complete.
2169
+ * @type string | undefined
2170
+ */
2171
+ step?: UpdateOnboardingRequestStepEnumKey;
2172
+ /**
2173
+ * @description Set to true to dismiss the onboarding checklist.
2174
+ * @type boolean | undefined
2175
+ */
2176
+ dismiss?: boolean;
2177
+ };
2178
+
2179
+ /**
2180
+ * Generated by Kubb (https://kubb.dev/).
2181
+ * Do not edit manually.
2182
+ */
2183
+
2184
+ type UpdateOnboardingProgressPathParams = {
2185
+ /**
2186
+ * @description Organization ID.
2187
+ * @pattern ^[\x20-\x7E]+$
2188
+ * @type string
2189
+ */
2190
+ org_id: string;
2191
+ };
2192
+ /**
2193
+ * @description Updated onboarding progress.
2194
+ */
2195
+ type UpdateOnboardingProgress200 = OnboardingProgress;
2196
+ /**
2197
+ * @description Invalid request parameters.
2198
+ */
2199
+ type UpdateOnboardingProgress400 = Error$1;
2200
+ /**
2201
+ * @description Missing or invalid authentication.
2202
+ */
2203
+ type UpdateOnboardingProgress401 = Error$1;
2204
+ /**
2205
+ * @description Operation not allowed by current plan limits.
2206
+ */
2207
+ type UpdateOnboardingProgress403 = Error$1;
2208
+ /**
2209
+ * @description Resource not found.
2210
+ */
2211
+ type UpdateOnboardingProgress404 = Error$1;
2212
+ type UpdateOnboardingProgressMutationRequest = UpdateOnboardingRequest;
2213
+ type UpdateOnboardingProgressMutationResponse = UpdateOnboardingProgress200;
2214
+ type UpdateOnboardingProgressMutation = {
2215
+ Response: UpdateOnboardingProgress200;
2216
+ Request: UpdateOnboardingProgressMutationRequest;
2217
+ PathParams: UpdateOnboardingProgressPathParams;
2218
+ Errors: UpdateOnboardingProgress400 | UpdateOnboardingProgress401 | UpdateOnboardingProgress403 | UpdateOnboardingProgress404;
2219
+ };
2220
+
2221
+ /**
2222
+ * Generated by Kubb (https://kubb.dev/).
2223
+ * Do not edit manually.
2224
+ */
2225
+ declare const projectStatusEnum: {
2226
+ readonly active: "active";
2227
+ readonly suspended: "suspended";
2228
+ readonly deleted: "deleted";
2229
+ };
2230
+ type ProjectStatusEnumKey = (typeof projectStatusEnum)[keyof typeof projectStatusEnum];
2231
+ /**
2232
+ * @description Project lifecycle status.
2233
+ */
2234
+ type ProjectStatus = ProjectStatusEnumKey;
2235
+
2236
+ /**
2237
+ * Generated by Kubb (https://kubb.dev/).
2238
+ * Do not edit manually.
2239
+ */
2240
+
2241
+ type Project = {
2242
+ /**
2243
+ * @description Unique project identifier (prefixed).
2244
+ * @type string
2245
+ */
2246
+ id: string;
2247
+ /**
2248
+ * @description Better Auth organization ID that owns this project.
2249
+ * @type string
2250
+ */
2251
+ org_id: string;
2252
+ /**
2253
+ * @description Human-readable project name.
2254
+ * @minLength 1
2255
+ * @maxLength 100
2256
+ * @type string
2257
+ */
2258
+ name: string;
2259
+ /**
2260
+ * @description Optional project description.
2261
+ * @maxLength 500
2262
+ * @type string | undefined
2263
+ */
2264
+ description?: string;
2265
+ /**
2266
+ * @type array | undefined
2267
+ */
2268
+ tags?: string[];
2269
+ /**
2270
+ * @description Proxy hostname for connecting through PgBeam (e.g., myproject.gw.pgbeam.app).
2271
+ * @type string | undefined
2272
+ */
2273
+ readonly proxy_host?: string;
2274
+ /**
2275
+ * @description Maximum queries per second for this project. 0 means unlimited.
2276
+ * @minLength 0
2277
+ * @maxLength 2147483647
2278
+ * @type integer | undefined, int32
2279
+ */
2280
+ queries_per_second?: number;
2281
+ /**
2282
+ * @description Burst allowance above the steady-state rate. 0 uses queries_per_second as burst.
2283
+ * @minLength 0
2284
+ * @maxLength 2147483647
2285
+ * @type integer | undefined, int32
2286
+ */
2287
+ burst_size?: number;
2288
+ /**
2289
+ * @description Maximum concurrent proxy connections. 0 means unlimited.
2290
+ * @minLength 0
2291
+ * @maxLength 2147483647
2292
+ * @type integer | undefined, int32
2293
+ */
2294
+ max_connections?: number;
2295
+ /**
2296
+ * @description Number of databases attached to this project.
2297
+ * @type integer | undefined
2298
+ */
2299
+ readonly database_count?: number;
2300
+ /**
2301
+ * @description Current active connections (latest metrics snapshot). 0 when no metrics data.
2302
+ * @type integer | undefined
2303
+ */
2304
+ readonly active_connections?: number;
2305
+ /**
2306
+ * @description Project lifecycle status.
2307
+ * @type string
2308
+ */
2309
+ status: ProjectStatus;
2310
+ /**
2311
+ * @type string, date-time
2312
+ */
2313
+ created_at: string;
2314
+ /**
2315
+ * @type string, date-time
2316
+ */
2317
+ updated_at: string;
2318
+ };
2319
+
2320
+ /**
2321
+ * Generated by Kubb (https://kubb.dev/).
2322
+ * Do not edit manually.
2323
+ */
2324
+
2325
+ type ListProjectsResponse = {
2326
+ /**
2327
+ * @type array
2328
+ */
2329
+ projects: Project[];
2330
+ /**
2331
+ * @description Total number of projects (across all pages).
2332
+ * @type integer
2333
+ */
2334
+ total: number;
2335
+ /**
2336
+ * @description Token for the next page. Empty if no more results.
2337
+ * @type string | undefined
2338
+ */
2339
+ next_page_token?: string;
2340
+ };
2341
+
2342
+ /**
2343
+ * Generated by Kubb (https://kubb.dev/).
2344
+ * Do not edit manually.
2345
+ */
2346
+
2347
+ declare const listProjectsQueryParamsSortByEnum: {
2348
+ readonly name: "name";
2349
+ readonly created_at: "created_at";
2350
+ readonly active_connections: "active_connections";
2351
+ };
2352
+ type ListProjectsQueryParamsSortByEnumKey = (typeof listProjectsQueryParamsSortByEnum)[keyof typeof listProjectsQueryParamsSortByEnum];
2353
+ type ListProjectsQueryParams = {
2354
+ /**
2355
+ * @description Organization ID to filter projects.
2356
+ * @pattern ^[\x20-\x7E]+$
2357
+ * @type string
2358
+ */
2359
+ org_id: string;
2360
+ /**
2361
+ * @description Maximum number of items to return (1-100, default 20).
2362
+ * @minLength 1
2363
+ * @maxLength 100
2364
+ * @default 20
2365
+ * @type integer | undefined
2366
+ */
2367
+ page_size?: number;
2368
+ /**
2369
+ * @description Opaque token for cursor-based pagination.
2370
+ * @pattern ^[a-zA-Z0-9_.-]+$
2371
+ * @type string | undefined
2372
+ */
2373
+ page_token?: string;
2374
+ /**
2375
+ * @description Sort field for projects list.
2376
+ * @default "created_at"
2377
+ * @type string | undefined
2378
+ */
2379
+ sort_by?: ListProjectsQueryParamsSortByEnumKey;
2380
+ };
2381
+ /**
2382
+ * @description List of projects.
2383
+ */
2384
+ type ListProjects200 = ListProjectsResponse;
2385
+ /**
2386
+ * @description Invalid request parameters.
2387
+ */
2388
+ type ListProjects400 = Error$1;
2389
+ /**
2390
+ * @description Missing or invalid authentication.
2391
+ */
2392
+ type ListProjects401 = Error$1;
2393
+ /**
2394
+ * @description Operation not allowed by current plan limits.
2395
+ */
2396
+ type ListProjects403 = Error$1;
2397
+ type ListProjectsQueryResponse = ListProjects200;
2398
+ type ListProjectsQuery = {
2399
+ Response: ListProjects200;
2400
+ QueryParams: ListProjectsQueryParams;
2401
+ Errors: ListProjects400 | ListProjects401 | ListProjects403;
2402
+ };
2403
+
2404
+ /**
2405
+ * Generated by Kubb (https://kubb.dev/).
2406
+ * Do not edit manually.
2407
+ */
2408
+
2409
+ type CreateProjectRequest = {
2410
+ /**
2411
+ * @description Human-readable project name.
2412
+ * @minLength 1
2413
+ * @maxLength 100
2414
+ * @pattern ^[^\x00]*$
2415
+ * @type string
2416
+ */
2417
+ name: string;
2418
+ /**
2419
+ * @description Better Auth organization ID.
2420
+ * @pattern ^[^\x00]*$
2421
+ * @type string
2422
+ */
2423
+ org_id: string;
2424
+ /**
2425
+ * @maxLength 500
2426
+ * @type string | undefined
2427
+ */
2428
+ description?: string;
2429
+ /**
2430
+ * @type array | undefined
2431
+ */
2432
+ tags?: string[];
2433
+ /**
2434
+ * @description Primary database. Created atomically with the project.
2435
+ * @type object
2436
+ */
2437
+ database: CreateDatabaseRequest;
2438
+ };
2439
+
2440
+ /**
2441
+ * Generated by Kubb (https://kubb.dev/).
2442
+ * Do not edit manually.
2443
+ */
2444
+
2445
+ type CreateProjectResponse = {
2446
+ /**
2447
+ * @type object
2448
+ */
2449
+ project: Project;
2450
+ /**
2451
+ * @type object | undefined
2452
+ */
2453
+ database?: Database;
2454
+ };
2455
+
2456
+ /**
2457
+ * Generated by Kubb (https://kubb.dev/).
2458
+ * Do not edit manually.
2459
+ */
2460
+
2461
+ /**
2462
+ * @description Project created.
2463
+ */
2464
+ type CreateProject201 = CreateProjectResponse;
2465
+ /**
2466
+ * @description Invalid request parameters.
2467
+ */
2468
+ type CreateProject400 = Error$1;
2469
+ /**
2470
+ * @description Missing or invalid authentication.
2471
+ */
2472
+ type CreateProject401 = Error$1;
2473
+ /**
2474
+ * @description Operation not allowed by current plan limits.
2475
+ */
2476
+ type CreateProject403 = Error$1;
2477
+ /**
2478
+ * @description Resource already exists or conflicts with current state.
2479
+ */
2480
+ type CreateProject409 = Error$1;
2481
+ type CreateProjectMutationRequest = CreateProjectRequest;
2482
+ type CreateProjectMutationResponse = CreateProject201;
2483
+ type CreateProjectMutation = {
2484
+ Response: CreateProject201;
2485
+ Request: CreateProjectMutationRequest;
2486
+ Errors: CreateProject400 | CreateProject401 | CreateProject403 | CreateProject409;
2487
+ };
2488
+
2489
+ /**
2490
+ * Generated by Kubb (https://kubb.dev/).
2491
+ * Do not edit manually.
2492
+ */
2493
+
2494
+ type GetProjectPathParams = {
2495
+ /**
2496
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
2497
+ * @pattern ^[a-zA-Z0-9_.-]+$
2498
+ * @type string
2499
+ */
2500
+ project_id: string;
2501
+ };
2502
+ /**
2503
+ * @description Project found.
2504
+ */
2505
+ type GetProject200 = Project;
2506
+ /**
2507
+ * @description Invalid request parameters.
2508
+ */
2509
+ type GetProject400 = Error$1;
2510
+ /**
2511
+ * @description Missing or invalid authentication.
2512
+ */
2513
+ type GetProject401 = Error$1;
2514
+ /**
2515
+ * @description Operation not allowed by current plan limits.
2516
+ */
2517
+ type GetProject403 = Error$1;
2518
+ /**
2519
+ * @description Resource not found.
2520
+ */
2521
+ type GetProject404 = Error$1;
2522
+ type GetProjectQueryResponse = GetProject200;
2523
+ type GetProjectQuery = {
2524
+ Response: GetProject200;
2525
+ PathParams: GetProjectPathParams;
2526
+ Errors: GetProject400 | GetProject401 | GetProject403 | GetProject404;
2527
+ };
2528
+
2529
+ /**
2530
+ * Generated by Kubb (https://kubb.dev/).
2531
+ * Do not edit manually.
2532
+ */
2533
+
2534
+ type UpdateProjectRequest = {
2535
+ /**
2536
+ * @description Updated project name.
2537
+ * @minLength 1
2538
+ * @maxLength 100
2539
+ * @pattern ^[^\x00]*$
2540
+ * @type string | undefined
2541
+ */
2542
+ name?: string;
2543
+ /**
2544
+ * @maxLength 500
2545
+ * @type string | undefined
2546
+ */
2547
+ description?: string;
2548
+ /**
2549
+ * @type array | undefined
2550
+ */
2551
+ tags?: string[];
2552
+ /**
2553
+ * @description Project lifecycle status.
2554
+ * @type string | undefined
2555
+ */
2556
+ status?: ProjectStatus;
2557
+ /**
2558
+ * @description Maximum queries per second. 0 means unlimited.
2559
+ * @minLength 0
2560
+ * @maxLength 2147483647
2561
+ * @type integer | undefined, int32
2562
+ */
2563
+ queries_per_second?: number;
2564
+ /**
2565
+ * @description Burst allowance above steady-state rate.
2566
+ * @minLength 0
2567
+ * @maxLength 2147483647
2568
+ * @type integer | undefined, int32
2569
+ */
2570
+ burst_size?: number;
2571
+ /**
2572
+ * @description Maximum concurrent proxy connections. 0 means unlimited.
2573
+ * @minLength 0
2574
+ * @maxLength 2147483647
2575
+ * @type integer | undefined, int32
2576
+ */
2577
+ max_connections?: number;
2578
+ };
2579
+
2580
+ /**
2581
+ * Generated by Kubb (https://kubb.dev/).
2582
+ * Do not edit manually.
2583
+ */
2584
+
2585
+ type UpdateProjectPathParams = {
2586
+ /**
2587
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
2588
+ * @pattern ^[a-zA-Z0-9_.-]+$
2589
+ * @type string
2590
+ */
2591
+ project_id: string;
2592
+ };
2593
+ /**
2594
+ * @description Project updated.
2595
+ */
2596
+ type UpdateProject200 = Project;
2597
+ /**
2598
+ * @description Invalid request parameters.
2599
+ */
2600
+ type UpdateProject400 = Error$1;
2601
+ /**
2602
+ * @description Missing or invalid authentication.
2603
+ */
2604
+ type UpdateProject401 = Error$1;
2605
+ /**
2606
+ * @description Operation not allowed by current plan limits.
2607
+ */
2608
+ type UpdateProject403 = Error$1;
2609
+ /**
2610
+ * @description Resource not found.
2611
+ */
2612
+ type UpdateProject404 = Error$1;
2613
+ type UpdateProjectMutationRequest = UpdateProjectRequest;
2614
+ type UpdateProjectMutationResponse = UpdateProject200;
2615
+ type UpdateProjectMutation = {
2616
+ Response: UpdateProject200;
2617
+ Request: UpdateProjectMutationRequest;
2618
+ PathParams: UpdateProjectPathParams;
2619
+ Errors: UpdateProject400 | UpdateProject401 | UpdateProject403 | UpdateProject404;
2620
+ };
2621
+
2622
+ /**
2623
+ * Generated by Kubb (https://kubb.dev/).
2624
+ * Do not edit manually.
2625
+ */
2626
+
2627
+ type DeleteProjectPathParams = {
2628
+ /**
2629
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
2630
+ * @pattern ^[a-zA-Z0-9_.-]+$
2631
+ * @type string
2632
+ */
2633
+ project_id: string;
2634
+ };
2635
+ /**
2636
+ * @description Project deleted.
2637
+ */
2638
+ type DeleteProject204 = any;
2639
+ /**
2640
+ * @description Invalid request parameters.
2641
+ */
2642
+ type DeleteProject400 = Error$1;
2643
+ /**
2644
+ * @description Missing or invalid authentication.
2645
+ */
2646
+ type DeleteProject401 = Error$1;
2647
+ /**
2648
+ * @description Operation not allowed by current plan limits.
2649
+ */
2650
+ type DeleteProject403 = Error$1;
2651
+ /**
2652
+ * @description Resource not found.
2653
+ */
2654
+ type DeleteProject404 = Error$1;
2655
+ type DeleteProjectMutationResponse = DeleteProject204;
2656
+ type DeleteProjectMutation = {
2657
+ Response: DeleteProject204;
2658
+ PathParams: DeleteProjectPathParams;
2659
+ Errors: DeleteProject400 | DeleteProject401 | DeleteProject403 | DeleteProject404;
2660
+ };
2661
+
2662
+ /**
2663
+ * Generated by Kubb (https://kubb.dev/).
2664
+ * Do not edit manually.
2665
+ */
2666
+ type MetricsSnapshot = {
2667
+ /**
2668
+ * @type string
2669
+ */
2670
+ id: string;
2671
+ /**
2672
+ * @type string
2673
+ */
2674
+ project_id: string;
2675
+ /**
2676
+ * @type string
2677
+ */
2678
+ region: string;
2679
+ /**
2680
+ * @type integer, int64
2681
+ */
2682
+ queries_total: number;
2683
+ /**
2684
+ * @type integer, int64
2685
+ */
2686
+ cache_hits: number;
2687
+ /**
2688
+ * @type integer, int64
2689
+ */
2690
+ cache_misses: number;
2691
+ /**
2692
+ * @type integer
2693
+ */
2694
+ active_connections: number;
2695
+ /**
2696
+ * @type number, double
2697
+ */
2698
+ avg_latency_ms: number;
2699
+ /**
2700
+ * @type number, double
2701
+ */
2702
+ p99_latency_ms: number;
2703
+ /**
2704
+ * @description Average upstream connection acquisition latency in milliseconds.
2705
+ * @type number | undefined, double
2706
+ */
2707
+ avg_connect_ms?: number;
2708
+ /**
2709
+ * @description Average upstream query execution latency in milliseconds.
2710
+ * @type number | undefined, double
2711
+ */
2712
+ avg_query_ms?: number;
2713
+ /**
2714
+ * @type string, date-time
2715
+ */
2716
+ created_at: string;
2717
+ };
2718
+
2719
+ /**
2720
+ * Generated by Kubb (https://kubb.dev/).
2721
+ * Do not edit manually.
2722
+ */
2723
+
2724
+ type GetProjectMetricsPathParams = {
2725
+ /**
2726
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
2727
+ * @pattern ^[a-zA-Z0-9_.-]+$
2728
+ * @type string
2729
+ */
2730
+ project_id: string;
2731
+ };
2732
+ type GetProjectMetricsQueryParams = {
2733
+ /**
2734
+ * @minLength 1
2735
+ * @maxLength 1000
2736
+ * @default 60
2737
+ * @type integer | undefined
2738
+ */
2739
+ limit?: number;
2740
+ /**
2741
+ * @description Filter metrics by region code.
2742
+ * @type string | undefined
2743
+ */
2744
+ region?: string;
2745
+ };
2746
+ /**
2747
+ * @description Metrics snapshots
2748
+ */
2749
+ type GetProjectMetrics200 = {
2750
+ /**
2751
+ * @type array
2752
+ */
2753
+ snapshots: MetricsSnapshot[];
2754
+ };
2755
+ /**
2756
+ * @description Invalid request parameters.
2757
+ */
2758
+ type GetProjectMetrics400 = Error$1;
2759
+ /**
2760
+ * @description Missing or invalid authentication.
2761
+ */
2762
+ type GetProjectMetrics401 = Error$1;
2763
+ /**
2764
+ * @description Resource not found.
2765
+ */
2766
+ type GetProjectMetrics404 = Error$1;
2767
+ type GetProjectMetricsQueryResponse = GetProjectMetrics200;
2768
+ type GetProjectMetricsQuery = {
2769
+ Response: GetProjectMetrics200;
2770
+ PathParams: GetProjectMetricsPathParams;
2771
+ QueryParams: GetProjectMetricsQueryParams;
2772
+ Errors: GetProjectMetrics400 | GetProjectMetrics401 | GetProjectMetrics404;
2773
+ };
2774
+
2775
+ /**
2776
+ * Generated by Kubb (https://kubb.dev/).
2777
+ * Do not edit manually.
2778
+ */
2779
+ declare const regionStatusEnum: {
2780
+ readonly active: "active";
2781
+ readonly draining: "draining";
2782
+ readonly inactive: "inactive";
2783
+ };
2784
+ type RegionStatusEnumKey = (typeof regionStatusEnum)[keyof typeof regionStatusEnum];
2785
+ type Region = {
2786
+ /**
2787
+ * @description Region identifier (e.g. us-east-1).
2788
+ * @type string
2789
+ */
2790
+ id: string;
2791
+ /**
2792
+ * @description Human-readable region name.
2793
+ * @type string
2794
+ */
2795
+ name: string;
2796
+ /**
2797
+ * @description Cloud provider.
2798
+ * @type string
2799
+ */
2800
+ provider: string;
2801
+ /**
2802
+ * @description Region operational status.
2803
+ * @type string
2804
+ */
2805
+ status: RegionStatusEnumKey;
2806
+ /**
2807
+ * @type boolean
2808
+ */
2809
+ available: boolean;
2810
+ /**
2811
+ * @type string | undefined
2812
+ */
2813
+ continent?: string;
2814
+ /**
2815
+ * @type string | undefined
2816
+ */
2817
+ country?: string;
2818
+ };
2819
+
2820
+ /**
2821
+ * Generated by Kubb (https://kubb.dev/).
2822
+ * Do not edit manually.
2823
+ */
2824
+
2825
+ type ListRegionsResponse = {
2826
+ /**
2827
+ * @type array
2828
+ */
2829
+ regions: Region[];
2830
+ };
2831
+
2832
+ /**
2833
+ * Generated by Kubb (https://kubb.dev/).
2834
+ * Do not edit manually.
2835
+ */
2836
+
2837
+ /**
2838
+ * @description List of regions.
2839
+ */
2840
+ type ListRegions200 = ListRegionsResponse;
2841
+ /**
2842
+ * @description Missing or invalid authentication.
2843
+ */
2844
+ type ListRegions401 = Error$1;
2845
+ type ListRegionsQueryResponse = ListRegions200;
2846
+ type ListRegionsQuery = {
2847
+ Response: ListRegions200;
2848
+ Errors: ListRegions401;
2849
+ };
2850
+
2851
+ /**
2852
+ * Generated by Kubb (https://kubb.dev/).
2853
+ * Do not edit manually.
2854
+ */
2855
+
2856
+ type Replica = {
2857
+ /**
2858
+ * @description Unique replica identifier (prefixed).
2859
+ * @type string
2860
+ */
2861
+ id: string;
2862
+ /**
2863
+ * @description Parent database ID.
2864
+ * @type string
2865
+ */
2866
+ database_id: string;
2867
+ /**
2868
+ * @description PostgreSQL replica host.
2869
+ * @type string
2870
+ */
2871
+ host: string;
2872
+ /**
2873
+ * @description PostgreSQL replica port.
2874
+ * @minLength 1
2875
+ * @maxLength 65535
2876
+ * @type integer
2877
+ */
2878
+ port: number;
2879
+ /**
2880
+ * @description PostgreSQL SSL connection mode.
2881
+ * @type string
2882
+ */
2883
+ ssl_mode: SSLMode;
2884
+ /**
2885
+ * @type string, date-time
2886
+ */
2887
+ created_at: string;
2888
+ /**
2889
+ * @type string, date-time
2890
+ */
2891
+ updated_at: string;
2892
+ };
2893
+
2894
+ /**
2895
+ * Generated by Kubb (https://kubb.dev/).
2896
+ * Do not edit manually.
2897
+ */
2898
+
2899
+ type ListReplicasResponse = {
2900
+ /**
2901
+ * @type array
2902
+ */
2903
+ replicas: Replica[];
2904
+ };
2905
+
2906
+ /**
2907
+ * Generated by Kubb (https://kubb.dev/).
2908
+ * Do not edit manually.
2909
+ */
2910
+
2911
+ type ListReplicasPathParams = {
2912
+ /**
2913
+ * @description Unique database identifier (prefixed, e.g. db_xxx).
2914
+ * @pattern ^[a-zA-Z0-9_.-]+$
2915
+ * @type string
2916
+ */
2917
+ database_id: string;
2918
+ };
2919
+ /**
2920
+ * @description List of replicas.
2921
+ */
2922
+ type ListReplicas200 = ListReplicasResponse;
2923
+ /**
2924
+ * @description Invalid request parameters.
2925
+ */
2926
+ type ListReplicas400 = Error$1;
2927
+ /**
2928
+ * @description Missing or invalid authentication.
2929
+ */
2930
+ type ListReplicas401 = Error$1;
2931
+ /**
2932
+ * @description Operation not allowed by current plan limits.
2933
+ */
2934
+ type ListReplicas403 = Error$1;
2935
+ /**
2936
+ * @description Resource not found.
2937
+ */
2938
+ type ListReplicas404 = Error$1;
2939
+ type ListReplicasQueryResponse = ListReplicas200;
2940
+ type ListReplicasQuery = {
2941
+ Response: ListReplicas200;
2942
+ PathParams: ListReplicasPathParams;
2943
+ Errors: ListReplicas400 | ListReplicas401 | ListReplicas403 | ListReplicas404;
2944
+ };
2945
+
2946
+ /**
2947
+ * Generated by Kubb (https://kubb.dev/).
2948
+ * Do not edit manually.
2949
+ */
2950
+
2951
+ type CreateReplicaRequest = {
2952
+ /**
2953
+ * @description PostgreSQL replica host.
2954
+ * @minLength 1
2955
+ * @pattern ^[^\s\x00]+$
2956
+ * @type string
2957
+ */
2958
+ host: string;
2959
+ /**
2960
+ * @description PostgreSQL replica port.
2961
+ * @minLength 1
2962
+ * @maxLength 65535
2963
+ * @type integer
2964
+ */
2965
+ port: number;
2966
+ /**
2967
+ * @description PostgreSQL SSL connection mode.
2968
+ * @type string | undefined
2969
+ */
2970
+ ssl_mode?: SSLMode;
2971
+ };
2972
+
2973
+ /**
2974
+ * Generated by Kubb (https://kubb.dev/).
2975
+ * Do not edit manually.
2976
+ */
2977
+
2978
+ type CreateReplicaPathParams = {
2979
+ /**
2980
+ * @description Unique database identifier (prefixed, e.g. db_xxx).
2981
+ * @pattern ^[a-zA-Z0-9_.-]+$
2982
+ * @type string
2983
+ */
2984
+ database_id: string;
2985
+ };
2986
+ /**
2987
+ * @description Replica created.
2988
+ */
2989
+ type CreateReplica201 = Replica;
2990
+ /**
2991
+ * @description Invalid request parameters.
2992
+ */
2993
+ type CreateReplica400 = Error$1;
2994
+ /**
2995
+ * @description Missing or invalid authentication.
2996
+ */
2997
+ type CreateReplica401 = Error$1;
2998
+ /**
2999
+ * @description Operation not allowed by current plan limits.
3000
+ */
3001
+ type CreateReplica403 = Error$1;
3002
+ /**
3003
+ * @description Resource not found.
3004
+ */
3005
+ type CreateReplica404 = Error$1;
3006
+ type CreateReplicaMutationRequest = CreateReplicaRequest;
3007
+ type CreateReplicaMutationResponse = CreateReplica201;
3008
+ type CreateReplicaMutation = {
3009
+ Response: CreateReplica201;
3010
+ Request: CreateReplicaMutationRequest;
3011
+ PathParams: CreateReplicaPathParams;
3012
+ Errors: CreateReplica400 | CreateReplica401 | CreateReplica403 | CreateReplica404;
3013
+ };
3014
+
3015
+ /**
3016
+ * Generated by Kubb (https://kubb.dev/).
3017
+ * Do not edit manually.
3018
+ */
3019
+
3020
+ type DeleteReplicaPathParams = {
3021
+ /**
3022
+ * @description Unique database identifier (prefixed, e.g. db_xxx).
3023
+ * @pattern ^[a-zA-Z0-9_.-]+$
3024
+ * @type string
3025
+ */
3026
+ database_id: string;
3027
+ /**
3028
+ * @description Unique replica identifier (prefixed, e.g. rep_xxx).
3029
+ * @pattern ^[a-zA-Z0-9_.-]+$
3030
+ * @type string
3031
+ */
3032
+ replica_id: string;
3033
+ };
3034
+ /**
3035
+ * @description Replica deleted.
3036
+ */
3037
+ type DeleteReplica204 = any;
3038
+ /**
3039
+ * @description Invalid request parameters.
3040
+ */
3041
+ type DeleteReplica400 = Error$1;
3042
+ /**
3043
+ * @description Missing or invalid authentication.
3044
+ */
3045
+ type DeleteReplica401 = Error$1;
3046
+ /**
3047
+ * @description Operation not allowed by current plan limits.
3048
+ */
3049
+ type DeleteReplica403 = Error$1;
3050
+ /**
3051
+ * @description Resource not found.
3052
+ */
3053
+ type DeleteReplica404 = Error$1;
3054
+ type DeleteReplicaMutationResponse = DeleteReplica204;
3055
+ type DeleteReplicaMutation = {
3056
+ Response: DeleteReplica204;
3057
+ PathParams: DeleteReplicaPathParams;
3058
+ Errors: DeleteReplica400 | DeleteReplica401 | DeleteReplica403 | DeleteReplica404;
3059
+ };
3060
+
3061
+ /**
3062
+ * Generated by Kubb (https://kubb.dev/).
3063
+ * Do not edit manually.
3064
+ */
3065
+ type DailyUsage = {
3066
+ /**
3067
+ * @type string, date
3068
+ */
3069
+ day: string;
3070
+ /**
3071
+ * @type integer, int64
3072
+ */
3073
+ queries_total: number;
3074
+ /**
3075
+ * @type integer, int64
3076
+ */
3077
+ cache_hits: number;
3078
+ /**
3079
+ * @type integer, int64
3080
+ */
3081
+ cache_misses: number;
3082
+ /**
3083
+ * @type integer, int64
3084
+ */
3085
+ connection_seconds: number;
3086
+ /**
3087
+ * @description Total bytes transferred to clients.
3088
+ * @type integer, int64
3089
+ */
3090
+ bytes_transferred: number;
3091
+ };
3092
+
3093
+ /**
3094
+ * Generated by Kubb (https://kubb.dev/).
3095
+ * Do not edit manually.
3096
+ */
3097
+
3098
+ type UsageResponse = {
3099
+ /**
3100
+ * @type array
3101
+ */
3102
+ usage: DailyUsage[];
3103
+ };
3104
+
3105
+ /**
3106
+ * Generated by Kubb (https://kubb.dev/).
3107
+ * Do not edit manually.
3108
+ */
3109
+
3110
+ type GetOrganizationUsagePathParams = {
3111
+ /**
3112
+ * @type string
3113
+ */
3114
+ org_id: string;
3115
+ };
3116
+ type GetOrganizationUsageQueryParams = {
3117
+ /**
3118
+ * @description Start date (inclusive, YYYY-MM-DD).
3119
+ * @type string, date
3120
+ */
3121
+ start_date: string;
3122
+ /**
3123
+ * @description End date (inclusive, YYYY-MM-DD).
3124
+ * @type string, date
3125
+ */
3126
+ end_date: string;
3127
+ };
3128
+ /**
3129
+ * @description Daily usage data.
3130
+ */
3131
+ type GetOrganizationUsage200 = UsageResponse;
3132
+ /**
3133
+ * @description Missing or invalid authentication.
3134
+ */
3135
+ type GetOrganizationUsage401 = Error$1;
3136
+ type GetOrganizationUsageQueryResponse = GetOrganizationUsage200;
3137
+ type GetOrganizationUsageQuery = {
3138
+ Response: GetOrganizationUsage200;
3139
+ PathParams: GetOrganizationUsagePathParams;
3140
+ QueryParams: GetOrganizationUsageQueryParams;
3141
+ Errors: GetOrganizationUsage401;
3142
+ };
3143
+
3144
+ /**
3145
+ * Generated by Kubb (https://kubb.dev/).
3146
+ * Do not edit manually.
3147
+ */
3148
+ type ProjectDailyUsage = {
3149
+ /**
3150
+ * @type string, date
3151
+ */
3152
+ day: string;
3153
+ /**
3154
+ * @type string
3155
+ */
3156
+ region: string;
3157
+ /**
3158
+ * @type integer, int64
3159
+ */
3160
+ queries_total: number;
3161
+ /**
3162
+ * @type integer, int64
3163
+ */
3164
+ cache_hits: number;
3165
+ /**
3166
+ * @type integer, int64
3167
+ */
3168
+ cache_misses: number;
3169
+ /**
3170
+ * @type integer, int64
3171
+ */
3172
+ connection_seconds: number;
3173
+ /**
3174
+ * @description Total bytes transferred to clients.
3175
+ * @type integer, int64
3176
+ */
3177
+ bytes_transferred: number;
3178
+ };
3179
+
3180
+ /**
3181
+ * Generated by Kubb (https://kubb.dev/).
3182
+ * Do not edit manually.
3183
+ */
3184
+
3185
+ type ProjectUsageResponse = {
3186
+ /**
3187
+ * @type array
3188
+ */
3189
+ usage: ProjectDailyUsage[];
3190
+ };
3191
+
3192
+ /**
3193
+ * Generated by Kubb (https://kubb.dev/).
3194
+ * Do not edit manually.
3195
+ */
3196
+
3197
+ type GetProjectUsagePathParams = {
3198
+ /**
3199
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
3200
+ * @pattern ^[a-zA-Z0-9_.-]+$
3201
+ * @type string
3202
+ */
3203
+ project_id: string;
3204
+ };
3205
+ type GetProjectUsageQueryParams = {
3206
+ /**
3207
+ * @description Start date (inclusive, YYYY-MM-DD).
3208
+ * @type string, date
3209
+ */
3210
+ start_date: string;
3211
+ /**
3212
+ * @description End date (inclusive, YYYY-MM-DD).
3213
+ * @type string, date
3214
+ */
3215
+ end_date: string;
3216
+ };
3217
+ /**
3218
+ * @description Daily usage data by region.
3219
+ */
3220
+ type GetProjectUsage200 = ProjectUsageResponse;
3221
+ /**
3222
+ * @description Missing or invalid authentication.
3223
+ */
3224
+ type GetProjectUsage401 = Error$1;
3225
+ /**
3226
+ * @description Resource not found.
3227
+ */
3228
+ type GetProjectUsage404 = Error$1;
3229
+ type GetProjectUsageQueryResponse = GetProjectUsage200;
3230
+ type GetProjectUsageQuery = {
3231
+ Response: GetProjectUsage200;
3232
+ PathParams: GetProjectUsagePathParams;
3233
+ QueryParams: GetProjectUsageQueryParams;
3234
+ Errors: GetProjectUsage401 | GetProjectUsage404;
3235
+ };
3236
+
3237
+ /**
3238
+ * Generated by Kubb (https://kubb.dev/).
3239
+ * Do not edit manually.
3240
+ */
3241
+ type JoinWaitlistRequest = {
3242
+ /**
3243
+ * @type string, email
3244
+ */
3245
+ email: string;
3246
+ /**
3247
+ * @type string | undefined
3248
+ */
3249
+ name?: string;
3250
+ /**
3251
+ * @type string | undefined
3252
+ */
3253
+ company?: string;
3254
+ };
3255
+
3256
+ /**
3257
+ * Generated by Kubb (https://kubb.dev/).
3258
+ * Do not edit manually.
3259
+ */
3260
+ type WaitlistEntry = {
3261
+ /**
3262
+ * @type string
3263
+ */
3264
+ id: string;
3265
+ /**
3266
+ * @type string, email
3267
+ */
3268
+ email: string;
3269
+ /**
3270
+ * @type string
3271
+ */
3272
+ name: string;
3273
+ /**
3274
+ * @type string
3275
+ */
3276
+ company: string;
3277
+ /**
3278
+ * @type boolean
3279
+ */
3280
+ invited: boolean;
3281
+ /**
3282
+ * @type string, date-time
3283
+ */
3284
+ created_at: string;
3285
+ /**
3286
+ * @type string | undefined, date-time
3287
+ */
3288
+ invited_at?: string;
3289
+ };
3290
+
3291
+ /**
3292
+ * Generated by Kubb (https://kubb.dev/).
3293
+ * Do not edit manually.
3294
+ */
3295
+
3296
+ type JoinWaitlistResponse = {
3297
+ /**
3298
+ * @type object
3299
+ */
3300
+ entry: WaitlistEntry;
3301
+ };
3302
+
3303
+ /**
3304
+ * Generated by Kubb (https://kubb.dev/).
3305
+ * Do not edit manually.
3306
+ */
3307
+
3308
+ /**
3309
+ * @description Successfully joined or already on the waitlist.
3310
+ */
3311
+ type JoinWaitlist200 = JoinWaitlistResponse;
3312
+ /**
3313
+ * @description Invalid request parameters.
3314
+ */
3315
+ type JoinWaitlist400 = Error$1;
3316
+ type JoinWaitlistMutationRequest = JoinWaitlistRequest;
3317
+ type JoinWaitlistMutationResponse = JoinWaitlist200;
3318
+ type JoinWaitlistMutation = {
3319
+ Response: JoinWaitlist200;
3320
+ Request: JoinWaitlistMutationRequest;
3321
+ Errors: JoinWaitlist400;
3322
+ };
3323
+
3324
+ /**
3325
+ * Generated by scripts/generate-maps.ts — do not edit manually.
3326
+ * Run: pnpm --filter pgbeam generate
3327
+ */
3328
+
3329
+ interface ApiOperations {
3330
+ account: {
3331
+ exportAccountData(): Promise<ExportAccountDataQueryResponse>;
3332
+ };
3333
+ usage: {
3334
+ getOrganizationActivity(params: {
3335
+ pathParams: GetOrganizationActivityPathParams;
3336
+ queryParams?: GetOrganizationActivityQueryParams;
3337
+ }): Promise<GetOrganizationActivityQueryResponse>;
3338
+ listPlans(): Promise<ListPlansQueryResponse>;
3339
+ getOrganizationPlan(params: {
3340
+ pathParams: GetOrganizationPlanPathParams;
3341
+ }): Promise<GetOrganizationPlanQueryResponse>;
3342
+ getProjectInsights(params: {
3343
+ pathParams: GetProjectInsightsPathParams;
3344
+ queryParams?: GetProjectInsightsQueryParams;
3345
+ }): Promise<GetProjectInsightsQueryResponse>;
3346
+ getOrganizationUsage(params: {
3347
+ pathParams: GetOrganizationUsagePathParams;
3348
+ queryParams: GetOrganizationUsageQueryParams;
3349
+ }): Promise<GetOrganizationUsageQueryResponse>;
3350
+ getProjectUsage(params: {
3351
+ pathParams: GetProjectUsagePathParams;
3352
+ queryParams: GetProjectUsageQueryParams;
3353
+ }): Promise<GetProjectUsageQueryResponse>;
3354
+ };
3355
+ catalog: {
3356
+ listQueryCatalog(params: {
3357
+ pathParams: ListQueryCatalogPathParams;
3358
+ queryParams?: ListQueryCatalogQueryParams;
3359
+ }): Promise<ListQueryCatalogQueryResponse>;
3360
+ updateCacheRule(params: {
3361
+ pathParams: UpdateCacheRulePathParams;
3362
+ body: UpdateCacheRuleMutationRequest;
3363
+ }): Promise<UpdateCacheRuleMutationResponse>;
3364
+ };
3365
+ databases: {
3366
+ listDatabases(params: {
3367
+ pathParams: ListDatabasesPathParams;
3368
+ queryParams?: ListDatabasesQueryParams;
3369
+ }): Promise<ListDatabasesQueryResponse>;
3370
+ createDatabase(params: {
3371
+ pathParams: CreateDatabasePathParams;
3372
+ body: CreateDatabaseMutationRequest;
3373
+ }): Promise<CreateDatabaseMutationResponse>;
3374
+ getDatabase(params: {
3375
+ pathParams: GetDatabasePathParams;
3376
+ }): Promise<GetDatabaseQueryResponse>;
3377
+ updateDatabase(params: {
3378
+ pathParams: UpdateDatabasePathParams;
3379
+ body: UpdateDatabaseMutationRequest;
3380
+ }): Promise<UpdateDatabaseMutationResponse>;
3381
+ deleteDatabase(params: {
3382
+ pathParams: DeleteDatabasePathParams;
3383
+ }): Promise<void>;
3384
+ testDatabaseConnection(params: {
3385
+ pathParams: TestDatabaseConnectionPathParams;
3386
+ }): Promise<TestDatabaseConnectionMutationResponse>;
3387
+ };
3388
+ domains: {
3389
+ listCustomDomains(params: {
3390
+ pathParams: ListCustomDomainsPathParams;
3391
+ queryParams?: ListCustomDomainsQueryParams;
3392
+ }): Promise<ListCustomDomainsQueryResponse>;
3393
+ createCustomDomain(params: {
3394
+ pathParams: CreateCustomDomainPathParams;
3395
+ body: CreateCustomDomainMutationRequest;
3396
+ }): Promise<CreateCustomDomainMutationResponse>;
3397
+ deleteCustomDomain(params: {
3398
+ pathParams: DeleteCustomDomainPathParams;
3399
+ }): Promise<void>;
3400
+ verifyCustomDomain(params: {
3401
+ pathParams: VerifyCustomDomainPathParams;
3402
+ }): Promise<VerifyCustomDomainMutationResponse>;
3403
+ };
3404
+ health: {
3405
+ getHealth(): Promise<GetHealthQueryResponse>;
3406
+ };
3407
+ onboarding: {
3408
+ getOnboardingProgress(params: {
3409
+ pathParams: GetOnboardingProgressPathParams;
3410
+ }): Promise<GetOnboardingProgressQueryResponse>;
3411
+ updateOnboardingProgress(params: {
3412
+ pathParams: UpdateOnboardingProgressPathParams;
3413
+ body: UpdateOnboardingProgressMutationRequest;
3414
+ }): Promise<UpdateOnboardingProgressMutationResponse>;
3415
+ };
3416
+ projects: {
3417
+ listProjects(params: {
3418
+ queryParams: ListProjectsQueryParams;
3419
+ }): Promise<ListProjectsQueryResponse>;
3420
+ createProject(params: {
3421
+ body: CreateProjectMutationRequest;
3422
+ }): Promise<CreateProjectMutationResponse>;
3423
+ getProject(params: {
3424
+ pathParams: GetProjectPathParams;
3425
+ }): Promise<GetProjectQueryResponse>;
3426
+ updateProject(params: {
3427
+ pathParams: UpdateProjectPathParams;
3428
+ body: UpdateProjectMutationRequest;
3429
+ }): Promise<UpdateProjectMutationResponse>;
3430
+ deleteProject(params: {
3431
+ pathParams: DeleteProjectPathParams;
3432
+ }): Promise<void>;
3433
+ getProjectMetrics(params: {
3434
+ pathParams: GetProjectMetricsPathParams;
3435
+ queryParams?: GetProjectMetricsQueryParams;
3436
+ }): Promise<GetProjectMetricsQueryResponse>;
3437
+ };
3438
+ regions: {
3439
+ listRegions(): Promise<ListRegionsQueryResponse>;
3440
+ };
3441
+ replicas: {
3442
+ listReplicas(params: {
3443
+ pathParams: ListReplicasPathParams;
3444
+ }): Promise<ListReplicasQueryResponse>;
3445
+ createReplica(params: {
3446
+ pathParams: CreateReplicaPathParams;
3447
+ body: CreateReplicaMutationRequest;
3448
+ }): Promise<CreateReplicaMutationResponse>;
3449
+ deleteReplica(params: {
3450
+ pathParams: DeleteReplicaPathParams;
3451
+ }): Promise<void>;
3452
+ };
3453
+ waitlist: {
3454
+ joinWaitlist(params: {
3455
+ body: JoinWaitlistMutationRequest;
3456
+ }): Promise<JoinWaitlistMutationResponse>;
3457
+ };
3458
+ }
3459
+ interface RequestMap {
3460
+ "GET /v1/account/export": {
3461
+ params?: undefined;
3462
+ response: ExportAccountDataQueryResponse;
3463
+ };
3464
+ "GET /v1/organizations/{org_id}/activity": {
3465
+ params: {
3466
+ pathParams: GetOrganizationActivityPathParams;
3467
+ queryParams?: GetOrganizationActivityQueryParams;
3468
+ };
3469
+ response: GetOrganizationActivityQueryResponse;
3470
+ };
3471
+ "GET /v1/plans": {
3472
+ params?: undefined;
3473
+ response: ListPlansQueryResponse;
3474
+ };
3475
+ "GET /v1/organizations/{org_id}/plan": {
3476
+ params: {
3477
+ pathParams: GetOrganizationPlanPathParams;
3478
+ };
3479
+ response: GetOrganizationPlanQueryResponse;
3480
+ };
3481
+ "GET /v1/projects/{project_id}/databases/{database_id}/catalog": {
3482
+ params: {
3483
+ pathParams: ListQueryCatalogPathParams;
3484
+ queryParams?: ListQueryCatalogQueryParams;
3485
+ };
3486
+ response: ListQueryCatalogQueryResponse;
3487
+ };
3488
+ "PUT /v1/projects/{project_id}/databases/{database_id}/catalog/{query_hash}/cache-rule": {
3489
+ params: {
3490
+ pathParams: UpdateCacheRulePathParams;
3491
+ body: UpdateCacheRuleMutationRequest;
3492
+ };
3493
+ response: UpdateCacheRuleMutationResponse;
3494
+ };
3495
+ "GET /v1/projects/{project_id}/databases": {
3496
+ params: {
3497
+ pathParams: ListDatabasesPathParams;
3498
+ queryParams?: ListDatabasesQueryParams;
3499
+ };
3500
+ response: ListDatabasesQueryResponse;
3501
+ };
3502
+ "POST /v1/projects/{project_id}/databases": {
3503
+ params: {
3504
+ pathParams: CreateDatabasePathParams;
3505
+ body: CreateDatabaseMutationRequest;
3506
+ };
3507
+ response: CreateDatabaseMutationResponse;
3508
+ };
3509
+ "GET /v1/projects/{project_id}/databases/{database_id}": {
3510
+ params: {
3511
+ pathParams: GetDatabasePathParams;
3512
+ };
3513
+ response: GetDatabaseQueryResponse;
3514
+ };
3515
+ "PATCH /v1/projects/{project_id}/databases/{database_id}": {
3516
+ params: {
3517
+ pathParams: UpdateDatabasePathParams;
3518
+ body: UpdateDatabaseMutationRequest;
3519
+ };
3520
+ response: UpdateDatabaseMutationResponse;
3521
+ };
3522
+ "DELETE /v1/projects/{project_id}/databases/{database_id}": {
3523
+ params: {
3524
+ pathParams: DeleteDatabasePathParams;
3525
+ };
3526
+ response: void;
3527
+ };
3528
+ "POST /v1/projects/{project_id}/databases/{database_id}/test-connection": {
3529
+ params: {
3530
+ pathParams: TestDatabaseConnectionPathParams;
3531
+ };
3532
+ response: TestDatabaseConnectionMutationResponse;
3533
+ };
3534
+ "GET /v1/projects/{project_id}/domains": {
3535
+ params: {
3536
+ pathParams: ListCustomDomainsPathParams;
3537
+ queryParams?: ListCustomDomainsQueryParams;
3538
+ };
3539
+ response: ListCustomDomainsQueryResponse;
3540
+ };
3541
+ "POST /v1/projects/{project_id}/domains": {
3542
+ params: {
3543
+ pathParams: CreateCustomDomainPathParams;
3544
+ body: CreateCustomDomainMutationRequest;
3545
+ };
3546
+ response: CreateCustomDomainMutationResponse;
3547
+ };
3548
+ "DELETE /v1/projects/{project_id}/domains/{domain_id}": {
3549
+ params: {
3550
+ pathParams: DeleteCustomDomainPathParams;
3551
+ };
3552
+ response: void;
3553
+ };
3554
+ "POST /v1/projects/{project_id}/domains/{domain_id}/verify": {
3555
+ params: {
3556
+ pathParams: VerifyCustomDomainPathParams;
3557
+ };
3558
+ response: VerifyCustomDomainMutationResponse;
3559
+ };
3560
+ "GET /v1/health": {
3561
+ params?: undefined;
3562
+ response: GetHealthQueryResponse;
3563
+ };
3564
+ "GET /v1/projects/{project_id}/insights": {
3565
+ params: {
3566
+ pathParams: GetProjectInsightsPathParams;
3567
+ queryParams?: GetProjectInsightsQueryParams;
3568
+ };
3569
+ response: GetProjectInsightsQueryResponse;
3570
+ };
3571
+ "GET /v1/organizations/{org_id}/onboarding": {
3572
+ params: {
3573
+ pathParams: GetOnboardingProgressPathParams;
3574
+ };
3575
+ response: GetOnboardingProgressQueryResponse;
3576
+ };
3577
+ "PATCH /v1/organizations/{org_id}/onboarding": {
3578
+ params: {
3579
+ pathParams: UpdateOnboardingProgressPathParams;
3580
+ body: UpdateOnboardingProgressMutationRequest;
3581
+ };
3582
+ response: UpdateOnboardingProgressMutationResponse;
3583
+ };
3584
+ "GET /v1/projects": {
3585
+ params: {
3586
+ queryParams: ListProjectsQueryParams;
3587
+ };
3588
+ response: ListProjectsQueryResponse;
3589
+ };
3590
+ "POST /v1/projects": {
3591
+ params: {
3592
+ body: CreateProjectMutationRequest;
3593
+ };
3594
+ response: CreateProjectMutationResponse;
3595
+ };
3596
+ "GET /v1/projects/{project_id}": {
3597
+ params: {
3598
+ pathParams: GetProjectPathParams;
3599
+ };
3600
+ response: GetProjectQueryResponse;
3601
+ };
3602
+ "PATCH /v1/projects/{project_id}": {
3603
+ params: {
3604
+ pathParams: UpdateProjectPathParams;
3605
+ body: UpdateProjectMutationRequest;
3606
+ };
3607
+ response: UpdateProjectMutationResponse;
3608
+ };
3609
+ "DELETE /v1/projects/{project_id}": {
3610
+ params: {
3611
+ pathParams: DeleteProjectPathParams;
3612
+ };
3613
+ response: void;
3614
+ };
3615
+ "GET /v1/projects/{project_id}/metrics": {
3616
+ params: {
3617
+ pathParams: GetProjectMetricsPathParams;
3618
+ queryParams?: GetProjectMetricsQueryParams;
3619
+ };
3620
+ response: GetProjectMetricsQueryResponse;
3621
+ };
3622
+ "GET /v1/regions": {
3623
+ params?: undefined;
3624
+ response: ListRegionsQueryResponse;
3625
+ };
3626
+ "GET /v1/databases/{database_id}/replicas": {
3627
+ params: {
3628
+ pathParams: ListReplicasPathParams;
3629
+ };
3630
+ response: ListReplicasQueryResponse;
3631
+ };
3632
+ "POST /v1/databases/{database_id}/replicas": {
3633
+ params: {
3634
+ pathParams: CreateReplicaPathParams;
3635
+ body: CreateReplicaMutationRequest;
3636
+ };
3637
+ response: CreateReplicaMutationResponse;
3638
+ };
3639
+ "DELETE /v1/databases/{database_id}/replicas/{replica_id}": {
3640
+ params: {
3641
+ pathParams: DeleteReplicaPathParams;
3642
+ };
3643
+ response: void;
3644
+ };
3645
+ "GET /v1/organizations/{org_id}/usage": {
3646
+ params: {
3647
+ pathParams: GetOrganizationUsagePathParams;
3648
+ queryParams: GetOrganizationUsageQueryParams;
3649
+ };
3650
+ response: GetOrganizationUsageQueryResponse;
3651
+ };
3652
+ "GET /v1/projects/{project_id}/usage": {
3653
+ params: {
3654
+ pathParams: GetProjectUsagePathParams;
3655
+ queryParams: GetProjectUsageQueryParams;
3656
+ };
3657
+ response: GetProjectUsageQueryResponse;
3658
+ };
3659
+ "POST /v1/waitlist": {
3660
+ params: {
3661
+ body: JoinWaitlistMutationRequest;
3662
+ };
3663
+ response: JoinWaitlistMutationResponse;
3664
+ };
3665
+ }
3666
+ type Route = keyof RequestMap;
3667
+
3668
+ declare class ApiError extends Error {
3669
+ status: number;
3670
+ statusText: string;
3671
+ body: unknown;
3672
+ constructor(status: number, statusText: string, body: unknown);
3673
+ }
3674
+ /** Extract a human-readable message from an API error body. */
3675
+ declare function extractMessage(body: unknown): string | undefined;
3676
+ type OnResponseHook = (response: Response) => void | Promise<void>;
3677
+
3678
+ interface PgBeamClientOptions {
3679
+ /** JWT token, or async function that resolves one (for lazy/refreshing tokens). */
3680
+ token: string | null | (() => Promise<string | null>);
3681
+ /** Base URL of the PgBeam API (e.g. "https://api.pgbeam.com"). */
3682
+ baseUrl: string;
3683
+ /** Optional custom fetch implementation. */
3684
+ fetch?: typeof globalThis.fetch;
3685
+ /** Optional hook called after every response (e.g. for 401 redirect). */
3686
+ onResponse?: OnResponseHook;
3687
+ }
3688
+ /** Type-safe client with tag-based proxy access and .request() method. */
3689
+ type ApiClient = ApiOperations & {
3690
+ /**
3691
+ * Type-safe request by route string.
3692
+ *
3693
+ * @example
3694
+ * const projects = await api.request('GET /v1/projects', { queryParams: { org_id } });
3695
+ * const project = await api.request('GET /v1/projects/{project_id}', { pathParams: { project_id } });
3696
+ */
3697
+ request: <K extends Route>(route: K, ...args: RequestMap[K]["params"] extends undefined ? [params?: undefined] : [params: RequestMap[K]["params"]]) => Promise<RequestMap[K]["response"]>;
3698
+ };
3699
+ declare class PgBeamClient {
3700
+ private _baseUrl;
3701
+ private _tokenOrFn;
3702
+ private _fetchImpl?;
3703
+ private _onResponse?;
3704
+ private _api?;
3705
+ constructor(options: PgBeamClientOptions);
3706
+ private _resolveToken;
3707
+ private _call;
3708
+ /** Access API operations via tag-based namespaces or `.request()`. */
3709
+ get api(): ApiClient;
3710
+ }
3711
+
3712
+ export { ApiError, PgBeamClient, SSLModeEnum, databaseRoleEnum, extractMessage, getProjectInsightsQueryParamsRangeEnum, healthResponseStatusEnum, listProjectsQueryParamsSortByEnum, organizationPlanPlanEnum, organizationPlanSubscriptionStatusEnum, poolModeEnum, projectStatusEnum, queryCatalogEntryQueryTypeEnum, queryCatalogEntryRecommendationEnum, regionStatusEnum, updateOnboardingRequestStepEnum };
3713
+ export type { AccountExport, ActivityEntry, ActivityResponse, ApiClient, CacheConfig, CacheSummary, CreateCustomDomain201, CreateCustomDomain400, CreateCustomDomain401, CreateCustomDomain403, CreateCustomDomain404, CreateCustomDomain409, CreateCustomDomainMutation, CreateCustomDomainMutationRequest, CreateCustomDomainMutationResponse, CreateCustomDomainPathParams, CreateCustomDomainRequest, CreateDatabase201, CreateDatabase400, CreateDatabase401, CreateDatabase403, CreateDatabase404, CreateDatabaseMutation, CreateDatabaseMutationRequest, CreateDatabaseMutationResponse, CreateDatabasePathParams, CreateDatabaseRequest, CreateProject201, CreateProject400, CreateProject401, CreateProject403, CreateProject409, CreateProjectMutation, CreateProjectMutationRequest, CreateProjectMutationResponse, CreateProjectRequest, CreateProjectResponse, CreateReplica201, CreateReplica400, CreateReplica401, CreateReplica403, CreateReplica404, CreateReplicaMutation, CreateReplicaMutationRequest, CreateReplicaMutationResponse, CreateReplicaPathParams, CreateReplicaRequest, CustomDomain, DailyUsage, Database, DatabaseRole, DatabaseRoleEnumKey, DeleteCustomDomain204, DeleteCustomDomain400, DeleteCustomDomain401, DeleteCustomDomain403, DeleteCustomDomain404, DeleteCustomDomainMutation, DeleteCustomDomainMutationResponse, DeleteCustomDomainPathParams, DeleteDatabase204, DeleteDatabase400, DeleteDatabase401, DeleteDatabase403, DeleteDatabase404, DeleteDatabaseMutation, DeleteDatabaseMutationResponse, DeleteDatabasePathParams, DeleteProject204, DeleteProject400, DeleteProject401, DeleteProject403, DeleteProject404, DeleteProjectMutation, DeleteProjectMutationResponse, DeleteProjectPathParams, DeleteReplica204, DeleteReplica400, DeleteReplica401, DeleteReplica403, DeleteReplica404, DeleteReplicaMutation, DeleteReplicaMutationResponse, DeleteReplicaPathParams, Error$1 as Error, ExportAccountData200, ExportAccountData401, ExportAccountData429, ExportAccountDataQuery, ExportAccountDataQueryResponse, GetDatabase200, GetDatabase400, GetDatabase401, GetDatabase403, GetDatabase404, GetDatabasePathParams, GetDatabaseQuery, GetDatabaseQueryResponse, GetHealth200, GetHealth429, GetHealthQuery, GetHealthQueryResponse, GetOnboardingProgress200, GetOnboardingProgress401, GetOnboardingProgress403, GetOnboardingProgress404, GetOnboardingProgressPathParams, GetOnboardingProgressQuery, GetOnboardingProgressQueryResponse, GetOrganizationActivity200, GetOrganizationActivity401, GetOrganizationActivityPathParams, GetOrganizationActivityQuery, GetOrganizationActivityQueryParams, GetOrganizationActivityQueryResponse, GetOrganizationPlan200, GetOrganizationPlan401, GetOrganizationPlanPathParams, GetOrganizationPlanQuery, GetOrganizationPlanQueryResponse, GetOrganizationUsage200, GetOrganizationUsage401, GetOrganizationUsagePathParams, GetOrganizationUsageQuery, GetOrganizationUsageQueryParams, GetOrganizationUsageQueryResponse, GetProject200, GetProject400, GetProject401, GetProject403, GetProject404, GetProjectInsights200, GetProjectInsights401, GetProjectInsights404, GetProjectInsightsPathParams, GetProjectInsightsQuery, GetProjectInsightsQueryParams, GetProjectInsightsQueryParamsRangeEnumKey, GetProjectInsightsQueryResponse, GetProjectMetrics200, GetProjectMetrics400, GetProjectMetrics401, GetProjectMetrics404, GetProjectMetricsPathParams, GetProjectMetricsQuery, GetProjectMetricsQueryParams, GetProjectMetricsQueryResponse, GetProjectPathParams, GetProjectQuery, GetProjectQueryResponse, GetProjectUsage200, GetProjectUsage401, GetProjectUsage404, GetProjectUsagePathParams, GetProjectUsageQuery, GetProjectUsageQueryParams, GetProjectUsageQueryResponse, HealthResponse, HealthResponseStatusEnumKey, JoinWaitlist200, JoinWaitlist400, JoinWaitlistMutation, JoinWaitlistMutationRequest, JoinWaitlistMutationResponse, JoinWaitlistRequest, JoinWaitlistResponse, LatencySummary, ListCustomDomains200, ListCustomDomains400, ListCustomDomains401, ListCustomDomains403, ListCustomDomains404, ListCustomDomainsPathParams, ListCustomDomainsQuery, ListCustomDomainsQueryParams, ListCustomDomainsQueryResponse, ListCustomDomainsResponse, ListDatabases200, ListDatabases400, ListDatabases401, ListDatabases403, ListDatabases404, ListDatabasesPathParams, ListDatabasesQuery, ListDatabasesQueryParams, ListDatabasesQueryResponse, ListDatabasesResponse, ListPlans200, ListPlans401, ListPlansQuery, ListPlansQueryResponse, ListPlansResponse, ListProjects200, ListProjects400, ListProjects401, ListProjects403, ListProjectsQuery, ListProjectsQueryParams, ListProjectsQueryParamsSortByEnumKey, ListProjectsQueryResponse, ListProjectsResponse, ListQueryCatalog200, ListQueryCatalog401, ListQueryCatalog403, ListQueryCatalog404, ListQueryCatalogPathParams, ListQueryCatalogQuery, ListQueryCatalogQueryParams, ListQueryCatalogQueryResponse, ListQueryCatalogResponse, ListRegions200, ListRegions401, ListRegionsQuery, ListRegionsQueryResponse, ListRegionsResponse, ListReplicas200, ListReplicas400, ListReplicas401, ListReplicas403, ListReplicas404, ListReplicasPathParams, ListReplicasQuery, ListReplicasQueryResponse, ListReplicasResponse, MetricsSnapshot, OnboardingProgress, OrganizationPlan, OrganizationPlanPlanEnumKey, OrganizationPlanSubscriptionStatusEnumKey, PgBeamClientOptions, PlanInfo, PlanLimits, PoolConfig, PoolMode, PoolModeEnumKey, Project, ProjectDailyUsage, ProjectInsights, ProjectStatus, ProjectStatusEnumKey, ProjectUsageResponse, QueryCatalogEntry, QueryCatalogEntryQueryTypeEnumKey, QueryCatalogEntryRecommendationEnumKey, QueryInsight, Region, RegionStatusEnumKey, Replica, SSLMode, SSLModeEnumKey, TestConnectionResult, TestDatabaseConnection200, TestDatabaseConnection400, TestDatabaseConnection401, TestDatabaseConnection403, TestDatabaseConnection404, TestDatabaseConnectionMutation, TestDatabaseConnectionMutationResponse, TestDatabaseConnectionPathParams, UpdateCacheRule200, UpdateCacheRule400, UpdateCacheRule401, UpdateCacheRule403, UpdateCacheRule404, UpdateCacheRuleMutation, UpdateCacheRuleMutationRequest, UpdateCacheRuleMutationResponse, UpdateCacheRulePathParams, UpdateCacheRuleRequest, UpdateCacheRuleResponse, UpdateDatabase200, UpdateDatabase400, UpdateDatabase401, UpdateDatabase403, UpdateDatabase404, UpdateDatabaseMutation, UpdateDatabaseMutationRequest, UpdateDatabaseMutationResponse, UpdateDatabasePathParams, UpdateDatabaseRequest, UpdateOnboardingProgress200, UpdateOnboardingProgress400, UpdateOnboardingProgress401, UpdateOnboardingProgress403, UpdateOnboardingProgress404, UpdateOnboardingProgressMutation, UpdateOnboardingProgressMutationRequest, UpdateOnboardingProgressMutationResponse, UpdateOnboardingProgressPathParams, UpdateOnboardingRequest, UpdateOnboardingRequestStepEnumKey, UpdateProject200, UpdateProject400, UpdateProject401, UpdateProject403, UpdateProject404, UpdateProjectMutation, UpdateProjectMutationRequest, UpdateProjectMutationResponse, UpdateProjectPathParams, UpdateProjectRequest, UsageResponse, VerifyCustomDomain200, VerifyCustomDomain400, VerifyCustomDomain401, VerifyCustomDomain403, VerifyCustomDomain404, VerifyCustomDomainMutation, VerifyCustomDomainMutationResponse, VerifyCustomDomainPathParams, VerifyCustomDomainResponse, WaitlistEntry };