feat: TFS Sync
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
import { TfsConfig } from '@/services/tfs';
|
||||
|
||||
// Types de base pour les tâches
|
||||
// Note: TaskStatus et TaskPriority sont maintenant gérés par la configuration centralisée dans lib/status-config.ts
|
||||
export type TaskStatus = 'backlog' | 'todo' | 'in_progress' | 'done' | 'cancelled' | 'freeze' | 'archived';
|
||||
export type TaskStatus =
|
||||
| 'backlog'
|
||||
| 'todo'
|
||||
| 'in_progress'
|
||||
| 'done'
|
||||
| 'cancelled'
|
||||
| 'freeze'
|
||||
| 'archived';
|
||||
export type TaskPriority = 'low' | 'medium' | 'high' | 'urgent';
|
||||
export type TaskSource = 'reminders' | 'jira' | 'manual';
|
||||
export type TaskSource = 'reminders' | 'jira' | 'tfs' | 'manual';
|
||||
|
||||
// Interface centralisée pour les statistiques
|
||||
export interface TaskStats {
|
||||
@@ -31,11 +40,19 @@ export interface Task {
|
||||
completedAt?: Date;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
|
||||
|
||||
// Métadonnées Jira
|
||||
jiraProject?: string;
|
||||
jiraKey?: string;
|
||||
jiraType?: string; // Type de ticket Jira: Story, Task, Bug, Epic, etc.
|
||||
|
||||
// Métadonnées TFS/Azure DevOps
|
||||
tfsProject?: string;
|
||||
tfsPullRequestId?: number;
|
||||
tfsRepository?: string;
|
||||
tfsSourceBranch?: string;
|
||||
tfsTargetBranch?: string;
|
||||
|
||||
assignee?: string;
|
||||
}
|
||||
|
||||
@@ -71,7 +88,16 @@ export interface ViewPreferences {
|
||||
objectivesCollapsed: boolean;
|
||||
theme: 'light' | 'dark';
|
||||
fontSize: 'small' | 'medium' | 'large';
|
||||
[key: string]: boolean | 'tags' | 'priority' | 'light' | 'dark' | 'small' | 'medium' | 'large' | undefined;
|
||||
[key: string]:
|
||||
| boolean
|
||||
| 'tags'
|
||||
| 'priority'
|
||||
| 'light'
|
||||
| 'dark'
|
||||
| 'small'
|
||||
| 'medium'
|
||||
| 'large'
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export interface ColumnVisibility {
|
||||
@@ -88,6 +114,7 @@ export interface JiraConfig {
|
||||
ignoredProjects?: string[]; // Liste des clés de projets à ignorer (ex: ["DEMO", "TEST"])
|
||||
}
|
||||
|
||||
|
||||
export interface UserPreferences {
|
||||
kanbanFilters: KanbanFilters;
|
||||
viewPreferences: ViewPreferences;
|
||||
@@ -95,6 +122,9 @@ export interface UserPreferences {
|
||||
jiraConfig: JiraConfig;
|
||||
jiraAutoSync: boolean;
|
||||
jiraSyncInterval: 'hourly' | 'daily' | 'weekly';
|
||||
tfsConfig: TfsConfig;
|
||||
tfsAutoSync: boolean;
|
||||
tfsSyncInterval: 'hourly' | 'daily' | 'weekly';
|
||||
}
|
||||
|
||||
// Interface pour les logs de synchronisation
|
||||
@@ -161,6 +191,45 @@ export interface JiraTask {
|
||||
storyPoints?: number; // Ajout pour les story points
|
||||
}
|
||||
|
||||
// Types pour TFS/Azure DevOps
|
||||
export interface TfsPullRequest {
|
||||
pullRequestId: number;
|
||||
title: string;
|
||||
description?: string;
|
||||
status: 'active' | 'completed' | 'abandoned';
|
||||
createdBy: {
|
||||
displayName: string;
|
||||
uniqueName: string; // email
|
||||
id: string;
|
||||
};
|
||||
creationDate: string;
|
||||
lastMergeSourceCommit?: {
|
||||
commitId: string;
|
||||
};
|
||||
sourceRefName: string; // refs/heads/feature-branch
|
||||
targetRefName: string; // refs/heads/main
|
||||
repository: {
|
||||
id: string;
|
||||
name: string;
|
||||
project: {
|
||||
id: string;
|
||||
name: string;
|
||||
};
|
||||
};
|
||||
reviewers?: Array<{
|
||||
displayName: string;
|
||||
uniqueName: string;
|
||||
vote: number; // -10=rejected, -5=waiting for author, 0=no vote, 5=approved, 10=approved with suggestions
|
||||
}>;
|
||||
labels?: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
}>;
|
||||
isDraft: boolean;
|
||||
mergeStatus: 'succeeded' | 'failed' | 'conflicts' | 'queued';
|
||||
closedDate?: string;
|
||||
}
|
||||
|
||||
// Types pour l'analytics Jira
|
||||
export interface JiraAnalytics {
|
||||
project: {
|
||||
@@ -315,14 +384,20 @@ export interface MemberStats {
|
||||
|
||||
// Types d'erreur
|
||||
export class BusinessError extends Error {
|
||||
constructor(message: string, public code?: string) {
|
||||
constructor(
|
||||
message: string,
|
||||
public code?: string
|
||||
) {
|
||||
super(message);
|
||||
this.name = 'BusinessError';
|
||||
}
|
||||
}
|
||||
|
||||
export class ValidationError extends Error {
|
||||
constructor(message: string, public field?: string) {
|
||||
constructor(
|
||||
message: string,
|
||||
public field?: string
|
||||
) {
|
||||
super(message);
|
||||
this.name = 'ValidationError';
|
||||
}
|
||||
@@ -367,5 +442,5 @@ export interface UpdateDailyCheckboxData {
|
||||
export interface DailyView {
|
||||
date: Date;
|
||||
yesterday: DailyCheckbox[]; // Checkboxes de la veille
|
||||
today: DailyCheckbox[]; // Checkboxes du jour
|
||||
today: DailyCheckbox[]; // Checkboxes du jour
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user