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