Skip to content

Commit d7c8340

Browse files
committed
chore(sdk): upgrade kubb to v5 beta (#787)
Synced from sferarc/pgbeam@ee400c1
1 parent e7b5512 commit d7c8340

92 files changed

Lines changed: 2497 additions & 1371 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

kubb.config.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { defineConfig } from "@kubb/core";
2-
import { pluginOas } from "@kubb/plugin-oas";
1+
import { adapterOas } from "@kubb/adapter-oas";
2+
import { middlewareBarrel } from "@kubb/middleware-barrel";
33
import { pluginTs } from "@kubb/plugin-ts";
4+
import { defineConfig } from "kubb";
45

56
export default defineConfig({
7+
root: ".",
68
input: { path: "../../../backend/openapi/bundles/public.yaml" },
79
output: {
810
path: "./src/generated",
@@ -15,8 +17,11 @@ export default defineConfig({
1517
// Formatting is handled by biome via the fix-frontend pre-commit hook.
1618
format: false,
1719
},
20+
// integerType: "number" preserves v4 behavior; v5 defaults int64 to bigint
21+
// which would require arithmetic-site changes across dashboard/CLI.
22+
adapter: adapterOas({ validate: false, integerType: "number" }),
23+
middleware: [middlewareBarrel()],
1824
plugins: [
19-
pluginOas({ validate: false }),
2025
pluginTs({
2126
output: { path: "./types", barrelType: "named" },
2227
enumType: "asConst",

src/generated/index.ts

Lines changed: 46 additions & 53 deletions
Large diffs are not rendered by default.

src/generated/operations-map.gen.ts

Lines changed: 99 additions & 99 deletions
Large diffs are not rendered by default.

src/generated/types/AccountExport.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* Do not edit manually.
44
*/
55

6-
76
/**
87
* @description Full account data export for privacy and data-portability requests.
8+
* @type object
99
*/
1010
export type AccountExport = {
1111
/**
@@ -25,7 +25,7 @@ export type AccountExport = {
2525
name: string;
2626
/**
2727
* @description Primary account email address.
28-
* @type string, email
28+
* @type string
2929
*/
3030
email: string;
3131
/**
@@ -40,12 +40,12 @@ export type AccountExport = {
4040
image?: string;
4141
/**
4242
* @description When the user account was created.
43-
* @type string, date-time
43+
* @type string
4444
*/
4545
created_at: string;
4646
/**
4747
* @description When the user profile was last updated.
48-
* @type string, date-time
48+
* @type string
4949
*/
5050
updated_at: string;
5151
};
@@ -76,7 +76,7 @@ export type AccountExport = {
7676
role: string;
7777
/**
7878
* @description When the organization membership was created.
79-
* @type string, date-time
79+
* @type string
8080
*/
8181
created_at: string;
8282
}[];
@@ -112,7 +112,7 @@ export type AccountExport = {
112112
status: string;
113113
/**
114114
* @description When the project was created.
115-
* @type string, date-time
115+
* @type string
116116
*/
117117
created_at: string;
118118
}[];
@@ -158,7 +158,7 @@ export type AccountExport = {
158158
role: string;
159159
/**
160160
* @description When the database registration was created.
161-
* @type string, date-time
161+
* @type string
162162
*/
163163
created_at: string;
164164
}[];
@@ -174,12 +174,12 @@ export type AccountExport = {
174174
id: string;
175175
/**
176176
* @description When the session expires.
177-
* @type string, date-time
177+
* @type string
178178
*/
179179
expires_at: string;
180180
/**
181181
* @description When the session was created.
182-
* @type string, date-time
182+
* @type string
183183
*/
184184
created_at: string;
185185
/**
@@ -231,7 +231,7 @@ export type AccountExport = {
231231
document_version: string;
232232
/**
233233
* @description When the document was accepted.
234-
* @type string, date-time
234+
* @type string
235235
*/
236236
accepted_at: string;
237237
/**
@@ -272,13 +272,13 @@ export type AccountExport = {
272272
ip_address?: string;
273273
/**
274274
* @description When the audit log entry was recorded.
275-
* @type string, date-time
275+
* @type string
276276
*/
277277
created_at: string;
278278
}[];
279279
/**
280280
* @description When the export was generated.
281-
* @type string, date-time
281+
* @type string
282282
*/
283283
exported_at: string;
284284
};

src/generated/types/CacheConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* Do not edit manually.
44
*/
55

6-
76
/**
87
* @description Query cache configuration.
8+
* @type object
99
*/
1010
export type CacheConfig = {
1111
/**

src/generated/types/CacheRuleEntry.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Do not edit manually.
44
*/
55

6-
76
export const cacheRuleEntryQueryTypeEnum = {
87
read: "read",
98
write: "write",
@@ -23,15 +22,18 @@ export type CacheRuleEntryRecommendationEnumKey = (typeof cacheRuleEntryRecommen
2322

2423
/**
2524
* @description Observed query shape and its cache recommendation for a database.
25+
* @type object
2626
*/
2727
export type CacheRuleEntry = {
2828
/**
2929
* @description xxhash64 hex of the normalized SQL.
30+
* @example a1b2c3d4e5f60718
3031
* @type string
3132
*/
3233
query_hash: string;
3334
/**
3435
* @description SQL with literals replaced by $N placeholders.
36+
* @example SELECT * FROM users WHERE id = $1
3537
* @type string
3638
*/
3739
normalized_sql: string;
@@ -48,38 +50,40 @@ export type CacheRuleEntry = {
4850
/**
4951
* @description TTL override in seconds. Null means use project default.
5052
* @minLength 0
53+
* @example 300
5154
* @type integer
5255
*/
5356
cache_ttl_seconds?: number | null;
5457
/**
5558
* @description SWR override in seconds. Null means use project default.
5659
* @minLength 0
60+
* @example 60
5761
* @type integer
5862
*/
5963
cache_swr_seconds?: number | null;
6064
/**
6165
* @description Total number of executions observed.
62-
* @type integer, int64
66+
* @type integer
6367
*/
6468
call_count: number;
6569
/**
6670
* @description Average query latency in milliseconds.
67-
* @type number, double
71+
* @type number
6872
*/
6973
avg_latency_ms: number;
7074
/**
7175
* @description 95th percentile latency in milliseconds.
72-
* @type number, double
76+
* @type number
7377
*/
7478
p95_latency_ms: number;
7579
/**
7680
* @description Average response size in bytes.
77-
* @type integer, int64
81+
* @type integer
7882
*/
7983
avg_response_bytes: number;
8084
/**
8185
* @description Response stability rate (0.0 to 1.0). Higher means more stable.
82-
* @type number, double
86+
* @type number
8387
*/
8488
stability_rate: number;
8589
/**
@@ -89,12 +93,12 @@ export type CacheRuleEntry = {
8993
recommendation: CacheRuleEntryRecommendationEnumKey;
9094
/**
9195
* @description When this query was first observed.
92-
* @type string, date-time
96+
* @type string
9397
*/
9498
first_seen_at: string;
9599
/**
96100
* @description When this query was last observed.
97-
* @type string, date-time
101+
* @type string
98102
*/
99103
last_seen_at: string;
100104
};

src/generated/types/CacheSummary.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
* Do not edit manually.
44
*/
55

6-
76
/**
87
* @description Aggregate cache performance metrics for the selected time range.
8+
* @type object
99
*/
1010
export type CacheSummary = {
1111
/**
1212
* @description Total number of cache hits in the selected time range.
13-
* @type integer, int64
13+
* @type integer
1414
*/
1515
total_hits: number;
1616
/**
1717
* @description Total number of cache misses in the selected time range.
18-
* @type integer, int64
18+
* @type integer
1919
*/
2020
total_misses: number;
2121
/**
2222
* @description Cache hit rate as a fraction (0.0 to 1.0).
23-
* @type number, double
23+
* @type number
2424
*/
2525
hit_rate: number;
2626
};

src/generated/types/CancellationFeedbackRequest.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
* Do not edit manually.
44
*/
55

6-
76
/**
87
* @description Request body for capturing cancellation feedback from a user.
8+
* @type object
99
*/
1010
export type CancellationFeedbackRequest = {
1111
/**
1212
* @description Predefined cancellation reason.
13+
* @example too-expensive
1314
* @type string | undefined
1415
*/
1516
reason?: string;
1617
/**
1718
* @description Free-text feedback from the user.
19+
* @example Switching to a self-hosted solution.
1820
* @type string | undefined
1921
*/
2022
feedback?: string;

src/generated/types/CidrEntry.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@
33
* Do not edit manually.
44
*/
55

6-
76
/**
87
* @description An IP filtering rule with a CIDR range and optional human-readable label.
8+
* @type object
99
*/
1010
export type CidrEntry = {
1111
/**
1212
* @description CIDR range in IPv4 (e.g. 203.0.113.0/24) or IPv6 (e.g. 2001:db8::/32) notation. A plain IP without prefix length defaults to /32 (IPv4) or /128 (IPv6).\n
1313
* @pattern ^[0-9a-fA-F.:]+(/[0-9]+)?$
14+
* @example 10.0.0.0/8
1415
* @type string
1516
*/
1617
cidr: string;
1718
/**
1819
* @description Optional human-readable label for this CIDR entry (e.g. \"Office\", \"VPC\").
1920
* @maxLength 100
21+
* @example Office network
2022
* @type string | undefined
2123
*/
2224
label?: string;

0 commit comments

Comments
 (0)