Skip to content

Commit 7ecb18a

Browse files
authored
[UI] Codegen rerun, NCU (#1791)
* codegen * API_URL env * openapi * ncu
1 parent b7715af commit 7ecb18a

File tree

129 files changed

+1883
-2736
lines changed

Some content is hidden

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

129 files changed

+1883
-2736
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CORS_ENABLED=true
77
CORS_ALLOW_ORIGIN=http://localhost:8080
88
# Needed for UI to work
99
JWT_SECRET=secret
10+
API_URL=http://localhost:3000
1011

1112
# Option 1 (Memory)
1213
# SlateDB storage settings

ui/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@codemirror/lang-sql": "^6.10.0",
2828
"@codemirror/language": "^6.11.3",
2929
"@codemirror/state": "^6.5.2",
30-
"@codemirror/view": "^6.38.3",
30+
"@codemirror/view": "^6.38.4",
3131
"@hookform/resolvers": "^5.2.2",
3232
"@lezer/highlight": "^1.2.1",
3333
"@radix-ui/react-alert-dialog": "^1.1.15",
@@ -49,7 +49,7 @@
4949
"@tailwindcss/vite": "^4.1.13",
5050
"@tanstack/react-query": "^5.90.2",
5151
"@tanstack/react-query-devtools": "^5.90.2",
52-
"@tanstack/react-router": "1.132.7",
52+
"@tanstack/react-router": "1.132.25",
5353
"@tanstack/react-table": "^8.21.3",
5454
"@tidbcloud/codemirror-extension-cur-sql-gutter": "^0.0.6",
5555
"@tidbcloud/codemirror-extension-events": "^0.0.7",
@@ -81,31 +81,31 @@
8181
"@eslint/js": "9.36.0",
8282
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
8383
"@julr/vite-plugin-validate-env": "^2.2.0",
84-
"@orval/core": "^7.11.2",
85-
"@tanstack/eslint-plugin-query": "^5.90.1",
86-
"@tanstack/router-devtools": "1.132.7",
87-
"@tanstack/router-plugin": "1.132.7",
88-
"@types/node": "24.5.2",
89-
"@types/react": "^19.1.13",
84+
"@orval/core": "^7.13.0",
85+
"@tanstack/eslint-plugin-query": "^5.91.0",
86+
"@tanstack/router-devtools": "1.132.25",
87+
"@tanstack/router-plugin": "1.132.25",
88+
"@types/node": "24.6.0",
89+
"@types/react": "^19.1.15",
9090
"@types/react-dom": "^19.1.9",
91-
"@vitejs/plugin-react": "^5.0.3",
91+
"@vitejs/plugin-react": "^5.0.4",
9292
"eslint": "9.36.0",
9393
"eslint-plugin-check-file": "^3.3.0",
9494
"eslint-plugin-n": "^17.23.1",
9595
"eslint-plugin-react": "^7.37.5",
9696
"eslint-plugin-react-hooks": "5.2.0",
9797
"eslint-plugin-react-refresh": "^0.4.22",
9898
"knip": "^5.64.1",
99-
"lint-staged": "^16.2.1",
100-
"npm-check-updates": "^18.3.0",
101-
"orval": "^7.11.2",
99+
"lint-staged": "^16.2.3",
100+
"npm-check-updates": "^19.0.0",
101+
"orval": "^7.13.0",
102102
"prettier": "^3.6.2",
103103
"prettier-plugin-packagejson": "^2.5.19",
104104
"prettier-plugin-tailwindcss": "^0.6.14",
105105
"simple-git-hooks": "^2.13.1",
106106
"tailwindcss": "^4.1.13",
107107
"typescript": "^5.9.2",
108-
"typescript-eslint": "^8.44.1",
108+
"typescript-eslint": "^8.45.0",
109109
"vite": "^7.1.7",
110110
"vite-tsconfig-paths": "^5.1.4"
111111
},

ui/pnpm-lock.yaml

Lines changed: 1020 additions & 756 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/src/mocks/databases-mock.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,61 +4,61 @@ export const DATABASES_MOCK: Database[] = [
44
{
55
name: 'mydb1',
66
volume: 'myvolume',
7-
created_at: '2025-01-01',
8-
updated_at: '2025-01-01',
7+
createdAt: '2025-01-01',
8+
updatedAt: '2025-01-01',
99
},
1010
{
1111
name: 'mydb2',
1212
volume: 'myvolume',
13-
created_at: '2025-01-01',
14-
updated_at: '2025-01-01',
13+
createdAt: '2025-01-01',
14+
updatedAt: '2025-01-01',
1515
},
1616
{
1717
name: 'mydb3',
1818
volume: 'myvolume',
19-
created_at: '2025-01-01',
20-
updated_at: '2025-01-01',
19+
createdAt: '2025-01-01',
20+
updatedAt: '2025-01-01',
2121
},
2222
{
2323
name: 'mydb4',
2424
volume: 'myvolume',
25-
created_at: '2025-01-01',
26-
updated_at: '2025-01-01',
25+
createdAt: '2025-01-01',
26+
updatedAt: '2025-01-01',
2727
},
2828
{
2929
name: 'mydb5',
3030
volume: 'myvolume',
31-
created_at: '2025-01-01',
32-
updated_at: '2025-01-01',
31+
createdAt: '2025-01-01',
32+
updatedAt: '2025-01-01',
3333
},
3434
{
3535
name: 'mydb6',
3636
volume: 'myvolume',
37-
created_at: '2025-01-01',
38-
updated_at: '2025-01-01',
37+
createdAt: '2025-01-01',
38+
updatedAt: '2025-01-01',
3939
},
4040
{
4141
name: 'mydb7',
4242
volume: 'myvolume',
43-
created_at: '2025-01-01',
44-
updated_at: '2025-01-01',
43+
createdAt: '2025-01-01',
44+
updatedAt: '2025-01-01',
4545
},
4646
{
4747
name: 'mydb8',
4848
volume: 'myvolume',
49-
created_at: '2025-01-01',
50-
updated_at: '2025-01-01',
49+
createdAt: '2025-01-01',
50+
updatedAt: '2025-01-01',
5151
},
5252
{
5353
name: 'mydb9',
5454
volume: 'myvolume',
55-
created_at: '2025-01-01',
56-
updated_at: '2025-01-01',
55+
createdAt: '2025-01-01',
56+
updatedAt: '2025-01-01',
5757
},
5858
{
5959
name: 'mydb10',
6060
volume: 'myvolume',
61-
created_at: '2025-01-01',
62-
updated_at: '2025-01-01',
61+
createdAt: '2025-01-01',
62+
updatedAt: '2025-01-01',
6363
},
6464
];

ui/src/modules/databases/databases-page-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function DatabasesTable({ isLoading, databases }: DatabasesTableProps) {
2121
columnHelper.accessor('volume', {
2222
header: 'Volume',
2323
}),
24-
columnHelper.accessor('created_at', {
24+
columnHelper.accessor('createdAt', {
2525
header: 'Created',
2626
cell: (info) => {
2727
return <span>{formatTime(info.getValue())}</span>;

ui/src/modules/schemas/schemas-page-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function SchemasTable({ isLoading, schemas }: SchemasTableProps) {
1818
columnHelper.accessor('name', {
1919
header: 'Name',
2020
}),
21-
columnHelper.accessor('created_at', {
21+
columnHelper.accessor('createdAt', {
2222
header: 'Created',
2323
cell: (info) => {
2424
return <span>{formatTime(info.getValue())}</span>;

ui/src/orval/account.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Generated by orval v7.10.0 🍺
2+
* Generated by orval v7.13.0 🍺
33
* Do not edit manually.
44
* UI Router API
55
* Defines the specification for the UI Catalog API

ui/src/orval/auth.ts

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Generated by orval v7.10.0 🍺
2+
* Generated by orval v7.13.0 🍺
33
* Do not edit manually.
44
* UI Router API
55
* Defines the specification for the UI Catalog API
@@ -37,7 +37,7 @@ export const login = (
3737
};
3838

3939
export const getLoginMutationOptions = <
40-
TError = ErrorType<AuthErrorResponse>,
40+
TError = ErrorType<AuthErrorResponse | AuthErrorResponse>,
4141
TContext = unknown,
4242
>(options?: {
4343
mutation?: UseMutationOptions<
@@ -73,9 +73,12 @@ export const getLoginMutationOptions = <
7373

7474
export type LoginMutationResult = NonNullable<Awaited<ReturnType<typeof login>>>;
7575
export type LoginMutationBody = LoginPayload;
76-
export type LoginMutationError = ErrorType<AuthErrorResponse>;
76+
export type LoginMutationError = ErrorType<AuthErrorResponse | AuthErrorResponse>;
7777

78-
export const useLogin = <TError = ErrorType<AuthErrorResponse>, TContext = unknown>(
78+
export const useLogin = <
79+
TError = ErrorType<AuthErrorResponse | AuthErrorResponse>,
80+
TContext = unknown,
81+
>(
7982
options?: {
8083
mutation?: UseMutationOptions<
8184
Awaited<ReturnType<typeof login>>,
@@ -101,7 +104,7 @@ export const logout = (options?: SecondParameter<typeof useAxiosMutator>, signal
101104
};
102105

103106
export const getLogoutMutationOptions = <
104-
TError = ErrorType<AuthErrorResponse>,
107+
TError = ErrorType<AuthErrorResponse | AuthErrorResponse>,
105108
TContext = unknown,
106109
>(options?: {
107110
mutation?: UseMutationOptions<Awaited<ReturnType<typeof logout>>, TError, void, TContext>;
@@ -123,9 +126,12 @@ export const getLogoutMutationOptions = <
123126

124127
export type LogoutMutationResult = NonNullable<Awaited<ReturnType<typeof logout>>>;
125128

126-
export type LogoutMutationError = ErrorType<AuthErrorResponse>;
129+
export type LogoutMutationError = ErrorType<AuthErrorResponse | AuthErrorResponse>;
127130

128-
export const useLogout = <TError = ErrorType<AuthErrorResponse>, TContext = unknown>(
131+
export const useLogout = <
132+
TError = ErrorType<AuthErrorResponse | AuthErrorResponse>,
133+
TContext = unknown,
134+
>(
129135
options?: {
130136
mutation?: UseMutationOptions<Awaited<ReturnType<typeof logout>>, TError, void, TContext>;
131137
request?: SecondParameter<typeof useAxiosMutator>;
@@ -147,7 +153,7 @@ export const refreshAuthToken = (
147153
};
148154

149155
export const getRefreshAuthTokenMutationOptions = <
150-
TError = ErrorType<AuthErrorResponse>,
156+
TError = ErrorType<AuthErrorResponse | AuthErrorResponse>,
151157
TContext = unknown,
152158
>(options?: {
153159
mutation?: UseMutationOptions<
@@ -176,9 +182,12 @@ export type RefreshAuthTokenMutationResult = NonNullable<
176182
Awaited<ReturnType<typeof refreshAuthToken>>
177183
>;
178184

179-
export type RefreshAuthTokenMutationError = ErrorType<AuthErrorResponse>;
185+
export type RefreshAuthTokenMutationError = ErrorType<AuthErrorResponse | AuthErrorResponse>;
180186

181-
export const useRefreshAuthToken = <TError = ErrorType<AuthErrorResponse>, TContext = unknown>(
187+
export const useRefreshAuthToken = <
188+
TError = ErrorType<AuthErrorResponse | AuthErrorResponse>,
189+
TContext = unknown,
190+
>(
182191
options?: {
183192
mutation?: UseMutationOptions<
184193
Awaited<ReturnType<typeof refreshAuthToken>>,

ui/src/orval/dashboard.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Generated by orval v7.10.0 🍺
2+
* Generated by orval v7.13.0 🍺
33
* Do not edit manually.
44
* UI Router API
55
* Defines the specification for the UI Catalog API
@@ -37,7 +37,7 @@ export const getGetDashboardQueryKey = () => {
3737

3838
export const getGetDashboardQueryOptions = <
3939
TData = Awaited<ReturnType<typeof getDashboard>>,
40-
TError = ErrorType<ErrorResponse>,
40+
TError = ErrorType<ErrorResponse | ErrorResponse>,
4141
>(options?: {
4242
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDashboard>>, TError, TData>>;
4343
request?: SecondParameter<typeof useAxiosMutator>;
@@ -57,11 +57,11 @@ export const getGetDashboardQueryOptions = <
5757
};
5858

5959
export type GetDashboardQueryResult = NonNullable<Awaited<ReturnType<typeof getDashboard>>>;
60-
export type GetDashboardQueryError = ErrorType<ErrorResponse>;
60+
export type GetDashboardQueryError = ErrorType<ErrorResponse | ErrorResponse>;
6161

6262
export function useGetDashboard<
6363
TData = Awaited<ReturnType<typeof getDashboard>>,
64-
TError = ErrorType<ErrorResponse>,
64+
TError = ErrorType<ErrorResponse | ErrorResponse>,
6565
>(
6666
options: {
6767
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDashboard>>, TError, TData>> &
@@ -79,7 +79,7 @@ export function useGetDashboard<
7979
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
8080
export function useGetDashboard<
8181
TData = Awaited<ReturnType<typeof getDashboard>>,
82-
TError = ErrorType<ErrorResponse>,
82+
TError = ErrorType<ErrorResponse | ErrorResponse>,
8383
>(
8484
options?: {
8585
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDashboard>>, TError, TData>> &
@@ -97,7 +97,7 @@ export function useGetDashboard<
9797
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
9898
export function useGetDashboard<
9999
TData = Awaited<ReturnType<typeof getDashboard>>,
100-
TError = ErrorType<ErrorResponse>,
100+
TError = ErrorType<ErrorResponse | ErrorResponse>,
101101
>(
102102
options?: {
103103
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDashboard>>, TError, TData>>;
@@ -108,7 +108,7 @@ export function useGetDashboard<
108108

109109
export function useGetDashboard<
110110
TData = Awaited<ReturnType<typeof getDashboard>>,
111-
TError = ErrorType<ErrorResponse>,
111+
TError = ErrorType<ErrorResponse | ErrorResponse>,
112112
>(
113113
options?: {
114114
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDashboard>>, TError, TData>>;

0 commit comments

Comments
 (0)