@@ -47,7 +47,7 @@ export const CloudCredentialResponseSchema = z.object({
4747 name : z . string ( ) ,
4848 description : z . string ( ) ,
4949 } ) ,
50- fields : z . record ( CredentialFieldResponseSchema ) ,
50+ fields : z . record ( z . string ( ) , CredentialFieldResponseSchema ) ,
5151 createdBy : z . union ( [ UserInfoSchema , z . string ( ) ] ) . describe ( 'User object when available, fallback to user ID' ) ,
5252 createdAt : z . string ( ) ,
5353 updatedAt : z . string ( ) ,
@@ -73,7 +73,7 @@ export const CreateCloudCredentialSchema = z.object({
7373 providerId : z . string ( ) . min ( 1 , 'Provider ID is required' ) ,
7474 name : z . string ( ) . min ( 1 , 'Name is required' ) . max ( 100 , 'Name must be 100 characters or less' ) ,
7575 comment : z . string ( ) . max ( 500 , 'Comment must be 500 characters or less' ) . optional ( ) ,
76- credentials : z . record ( z . string ( ) ) . refine (
76+ credentials : z . record ( z . string ( ) , z . string ( ) ) . refine (
7777 ( data ) => Object . keys ( data ) . length > 0 ,
7878 'At least one credential field is required'
7979 ) ,
@@ -82,7 +82,7 @@ export const CreateCloudCredentialSchema = z.object({
8282export const UpdateCloudCredentialSchema = z . object ( {
8383 name : z . string ( ) . min ( 1 , 'Name is required' ) . max ( 100 , 'Name must be 100 characters or less' ) . optional ( ) ,
8484 comment : z . string ( ) . max ( 500 , 'Comment must be 500 characters or less' ) . optional ( ) ,
85- credentials : z . record ( z . string ( ) ) . optional ( ) ,
85+ credentials : z . record ( z . string ( ) , z . string ( ) ) . optional ( ) ,
8686} ) ;
8787
8888export const SearchCredentialsQuerySchema = z . object ( {
0 commit comments