Update web/src/api/asset_interfaces/datasources/interfaces.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Nate Kelley 2025-05-28 13:22:51 -06:00 committed by GitHub
parent 47858975e0
commit c3d9a5a4f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -150,9 +150,9 @@ export const DatabricksCredentialsSchema = z.object({
export type DatabricksCredentials = z.infer<typeof DatabricksCredentialsSchema>; export type DatabricksCredentials = z.infer<typeof DatabricksCredentialsSchema>;
export const SQLServerCredentialsSchema = z.object({ export const SQLServerCredentialsSchema = z.object({
name: z.string(), name: z.string().check(z.minLength(1, 'Name must not be empty')),
type: z.literal('sqlserver'), type: z.literal('sqlserver'),
host: z.string(), host: z.string().check(z.minLength(1, 'Host must not be empty')),
port: z port: z
.number() .number()
.check( .check(
@ -161,8 +161,8 @@ export const SQLServerCredentialsSchema = z.object({
), ),
username: z.string().check(z.minLength(1, 'Username must not be empty')), username: z.string().check(z.minLength(1, 'Username must not be empty')),
password: z.string().check(z.minLength(1, 'Password must not be empty')), password: z.string().check(z.minLength(1, 'Password must not be empty')),
default_database: z.string(), default_database: z.string().check(z.minLength(1, 'Database must not be empty')),
default_schema: z.string() default_schema: z.string().check(z.minLength(1, 'Schema must not be empty'))
}); });
export type SQLServerCredentials = z.infer<typeof SQLServerCredentialsSchema>; export type SQLServerCredentials = z.infer<typeof SQLServerCredentialsSchema>;