[main] refactor: update label_id schema to use string type
🚀 Breaking Changes: - label_id now requires a string type instead of a union of number and string. 📝 Details: - Improved consistency in schema definitions for label handling.
This commit is contained in:
36
schemas.ts
36
schemas.ts
@ -171,11 +171,25 @@ export const GitLabTreeItemSchema = z.object({
|
|||||||
export const GetRepositoryTreeSchema = z.object({
|
export const GetRepositoryTreeSchema = z.object({
|
||||||
project_id: z.string().describe("The ID or URL-encoded path of the project"),
|
project_id: z.string().describe("The ID or URL-encoded path of the project"),
|
||||||
path: z.string().optional().describe("The path inside the repository"),
|
path: z.string().optional().describe("The path inside the repository"),
|
||||||
ref: z.string().optional().describe("The name of a repository branch or tag. Defaults to the default branch."),
|
ref: z
|
||||||
recursive: z.boolean().optional().describe("Boolean value to get a recursive tree"),
|
.string()
|
||||||
per_page: z.number().optional().describe("Number of results to show per page"),
|
.optional()
|
||||||
page_token: z.string().optional().describe("The tree record ID for pagination"),
|
.describe(
|
||||||
pagination: z.string().optional().describe("Pagination method (keyset)")
|
"The name of a repository branch or tag. Defaults to the default branch."
|
||||||
|
),
|
||||||
|
recursive: z
|
||||||
|
.boolean()
|
||||||
|
.optional()
|
||||||
|
.describe("Boolean value to get a recursive tree"),
|
||||||
|
per_page: z
|
||||||
|
.number()
|
||||||
|
.optional()
|
||||||
|
.describe("Number of results to show per page"),
|
||||||
|
page_token: z
|
||||||
|
.string()
|
||||||
|
.optional()
|
||||||
|
.describe("The tree record ID for pagination"),
|
||||||
|
pagination: z.string().optional().describe("Pagination method (keyset)"),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const GitLabTreeSchema = z.object({
|
export const GitLabTreeSchema = z.object({
|
||||||
@ -849,9 +863,7 @@ export const ListLabelsSchema = z.object({
|
|||||||
|
|
||||||
export const GetLabelSchema = z.object({
|
export const GetLabelSchema = z.object({
|
||||||
project_id: z.string().describe("Project ID or URL-encoded path"),
|
project_id: z.string().describe("Project ID or URL-encoded path"),
|
||||||
label_id: z
|
label_id: z.string().describe("The ID or title of a project's label"),
|
||||||
.union([z.number(), z.string()])
|
|
||||||
.describe("The ID or title of a project's label"),
|
|
||||||
include_ancestor_groups: z
|
include_ancestor_groups: z
|
||||||
.boolean()
|
.boolean()
|
||||||
.optional()
|
.optional()
|
||||||
@ -876,9 +888,7 @@ export const CreateLabelSchema = z.object({
|
|||||||
|
|
||||||
export const UpdateLabelSchema = z.object({
|
export const UpdateLabelSchema = z.object({
|
||||||
project_id: z.string().describe("Project ID or URL-encoded path"),
|
project_id: z.string().describe("Project ID or URL-encoded path"),
|
||||||
label_id: z
|
label_id: z.string().describe("The ID or title of a project's label"),
|
||||||
.union([z.number(), z.string()])
|
|
||||||
.describe("The ID or title of a project's label"),
|
|
||||||
new_name: z.string().optional().describe("The new name of the label"),
|
new_name: z.string().optional().describe("The new name of the label"),
|
||||||
color: z
|
color: z
|
||||||
.string()
|
.string()
|
||||||
@ -899,9 +909,7 @@ export const UpdateLabelSchema = z.object({
|
|||||||
|
|
||||||
export const DeleteLabelSchema = z.object({
|
export const DeleteLabelSchema = z.object({
|
||||||
project_id: z.string().describe("Project ID or URL-encoded path"),
|
project_id: z.string().describe("Project ID or URL-encoded path"),
|
||||||
label_id: z
|
label_id: z.string().describe("The ID or title of a project's label"),
|
||||||
.union([z.number(), z.string()])
|
|
||||||
.describe("The ID or title of a project's label"),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Group projects schema
|
// Group projects schema
|
||||||
|
Reference in New Issue
Block a user