1
1
import { z } from "zod" ;
2
- import { flexibleBoolean , numericStringSchema } from "./customSchemas.js"
2
+ import { flexibleBoolean , numericStringSchema , numericStringSchemaNullable } from "./customSchemas.js"
3
3
4
4
// Base schemas for common types
5
5
export const GitLabAuthorSchema = z . object ( {
@@ -667,7 +667,7 @@ export const GitLabDiscussionNoteSchema = z.object({
667
667
noteable_id : numericStringSchema ,
668
668
noteable_type : z . enum ( [ "Issue" , "MergeRequest" , "Snippet" , "Commit" , "Epic" ] ) ,
669
669
project_id : z . coerce . string ( ) . optional ( ) ,
670
- noteable_iid : z . coerce . number ( ) . nullable ( ) ,
670
+ noteable_iid : numericStringSchemaNullable . optional ( ) ,
671
671
resolvable : flexibleBoolean . optional ( ) ,
672
672
resolved : flexibleBoolean . optional ( ) ,
673
673
resolved_by : GitLabUserSchema . nullable ( ) . optional ( ) ,
@@ -917,14 +917,14 @@ export const CreateNoteSchema = z.object({
917
917
noteable_type : z
918
918
. enum ( [ "issue" , "merge_request" ] )
919
919
. describe ( "Type of noteable (issue or merge_request)" ) ,
920
- noteable_iid : z . coerce . number ( ) . describe ( "IID of the issue or merge request" ) ,
920
+ noteable_iid : numericStringSchema . describe ( "IID of the issue or merge request" ) ,
921
921
body : z . string ( ) . describe ( "Note content" ) ,
922
922
} ) ;
923
923
924
924
// Issues API operation schemas
925
925
export const ListIssuesSchema = z . object ( {
926
926
project_id : z . coerce . string ( ) . describe ( "Project ID or URL-encoded path" ) ,
927
- assignee_id : numericStringSchema . optional ( ) . describe ( "Return issues assigned to the given user ID" ) ,
927
+ assignee_id : z . coerce . string ( ) . optional ( ) . describe ( "Return issues assigned to the given user ID. user id or none or any " ) ,
928
928
assignee_username : z . array ( z . string ( ) ) . optional ( ) . describe ( "Return issues assigned to the given username" ) ,
929
929
author_id : numericStringSchema . optional ( ) . describe ( "Return issues created by the given user ID" ) ,
930
930
author_username : z . string ( ) . optional ( ) . describe ( "Return issues created by the given username" ) ,
@@ -951,10 +951,7 @@ export const ListIssuesSchema = z.object({
951
951
// Merge Requests API operation schemas
952
952
export const ListMergeRequestsSchema = z . object ( {
953
953
project_id : z . coerce . string ( ) . describe ( "Project ID or URL-encoded path" ) ,
954
- assignee_id : z
955
- . number ( )
956
- . optional ( )
957
- . describe ( "Returns merge requests assigned to the given user ID" ) ,
954
+ assignee_id : z . coerce . string ( ) . optional ( ) . describe ( "Return issues assigned to the given user ID. user id or none or any" ) ,
958
955
assignee_username : z
959
956
. string ( )
960
957
. optional ( )
@@ -964,10 +961,9 @@ export const ListMergeRequestsSchema = z.object({
964
961
. string ( )
965
962
. optional ( )
966
963
. describe ( "Returns merge requests created by the given username" ) ,
967
- reviewer_id : z
968
- . number ( )
964
+ reviewer_id : z . coerce . string ( )
969
965
. optional ( )
970
- . describe ( "Returns merge requests which have the user as a reviewer" ) ,
966
+ . describe ( "Returns merge requests which have the user as a reviewer. user id or none or any " ) ,
971
967
reviewer_username : z
972
968
. string ( )
973
969
. optional ( )
0 commit comments