import { z } from 'zod';
import { ScmOperationErrorCodeSchema, ScmRequestBaseSchema } from './scm.js';
export const ScmStashKindSchema = z.enum(['branch', 'transient']);
export const ScmStashEntrySchema = z.object({
    stashRef: z.string(),
    kind: ScmStashKindSchema,
    branch: z.string().optional(),
    createdAt: z.number().int().optional(),
    message: z.string().optional(),
});
export const ScmStashListRequestSchema = ScmRequestBaseSchema.extend({
    includeAll: z.boolean().optional(),
});
export const ScmStashListResponseSchema = z.object({
    success: z.boolean(),
    managedStashes: z.array(ScmStashEntrySchema).optional(),
    managedCount: z.number().int().nonnegative().optional(),
    totalCount: z.number().int().nonnegative().optional(),
    error: z.string().optional(),
    errorCode: ScmOperationErrorCodeSchema.optional(),
});
export const ScmStashDropRequestSchema = ScmRequestBaseSchema.extend({
    stashRef: z.string(),
});
export const ScmStashDropResponseSchema = z.object({
    success: z.boolean(),
    stdout: z.string().optional(),
    stderr: z.string().optional(),
    error: z.string().optional(),
    errorCode: ScmOperationErrorCodeSchema.optional(),
});
export const ScmStashPopRequestSchema = ScmRequestBaseSchema.extend({
    stashRef: z.string(),
});
export const ScmStashPopResponseSchema = z.object({
    success: z.boolean(),
    stdout: z.string().optional(),
    stderr: z.string().optional(),
    error: z.string().optional(),
    errorCode: ScmOperationErrorCodeSchema.optional(),
});
export const ScmStashApplyRequestSchema = ScmRequestBaseSchema.extend({
    stashRef: z.string(),
});
export const ScmStashApplyResponseSchema = z.object({
    success: z.boolean(),
    stdout: z.string().optional(),
    stderr: z.string().optional(),
    error: z.string().optional(),
    errorCode: ScmOperationErrorCodeSchema.optional(),
});
export const ScmStashShowRequestSchema = ScmRequestBaseSchema.extend({
    stashRef: z.string(),
    maxBytes: z.number().int().positive().optional(),
});
export const ScmStashShowResponseSchema = z.object({
    success: z.boolean(),
    diff: z.string().optional(),
    truncated: z.boolean().optional(),
    error: z.string().optional(),
    errorCode: ScmOperationErrorCodeSchema.optional(),
});
//# sourceMappingURL=scmStash.js.map