/**
 * sync CLI types — Input spec and output result
 */

import { z } from 'zod';

export const SyncSpecSchema = z.object({
  rebase: z.boolean().optional().default(false),
});

export type SyncSpec = z.infer<typeof SyncSpecSchema>;

export const SyncResultSchema = z.object({
  success: z.boolean(),
  error: z.string().optional(),
  branch: z.string(),
  baseBranch: z.string(),
  pushed: z.boolean(),
  pulled: z.boolean(),
  rebased: z.boolean(),
  conflicts: z.boolean(),
  conflictFiles: z.array(z.string()).optional(),
});

export type SyncResult = z.infer<typeof SyncResultSchema>;
