[INT-CLEANUP-004] Add barrel exports for clean imports
This commit is contained in:
parent
b716b0fac5
commit
1d7cd3cce0
4 changed files with 48 additions and 12 deletions
|
|
@ -765,7 +765,8 @@
|
|||
"description": "Créer des fichiers index.ts pour faciliter les imports.",
|
||||
"priority": "P3",
|
||||
"priority_rank": 23,
|
||||
"status": "todo",
|
||||
"status": "completed",
|
||||
"completed_at": "2025-01-27T17:15:00Z",
|
||||
"estimated_hours": 1,
|
||||
"side": "frontend_only",
|
||||
"files_to_modify": [
|
||||
|
|
@ -1104,13 +1105,13 @@
|
|||
},
|
||||
"progress_tracking": {
|
||||
"total_tasks": 32,
|
||||
"completed": 22,
|
||||
"completed": 23,
|
||||
"in_progress": 0,
|
||||
"todo": 10,
|
||||
"todo": 9,
|
||||
"blocked": 0,
|
||||
"completion_percentage": 69,
|
||||
"last_updated": "2025-01-27T17:00:00Z",
|
||||
"completion_percentage": 72,
|
||||
"last_updated": "2025-01-27T17:15:00Z",
|
||||
"estimated_completion_date": null,
|
||||
"estimated_hours_remaining": 15
|
||||
"estimated_hours_remaining": 13.5
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,14 +47,15 @@ export async function verifyEmail(token: string): Promise<VerifyEmailResponse> {
|
|||
axiosError.response.data?.message ||
|
||||
'Verification failed';
|
||||
|
||||
const responseData = axiosError.response.data as Record<string, unknown> | undefined;
|
||||
const apiError: ApiError = {
|
||||
code: axiosError.response.status,
|
||||
message: errorMessage,
|
||||
timestamp: new Date().toISOString(),
|
||||
details: Array.isArray(axiosError.response.data?.details)
|
||||
? axiosError.response.data.details
|
||||
details: Array.isArray(responseData?.details)
|
||||
? responseData.details
|
||||
: undefined,
|
||||
context: axiosError.response.data as Record<string, unknown>,
|
||||
context: responseData,
|
||||
};
|
||||
|
||||
throw apiError;
|
||||
|
|
@ -111,14 +112,15 @@ export async function resendVerificationEmail(
|
|||
axiosError.response.data?.message ||
|
||||
'Failed to resend verification email';
|
||||
|
||||
const responseData = axiosError.response.data as Record<string, unknown> | undefined;
|
||||
const apiError: ApiError = {
|
||||
code: axiosError.response.status,
|
||||
message: errorMessage,
|
||||
timestamp: new Date().toISOString(),
|
||||
details: Array.isArray(axiosError.response.data?.details)
|
||||
? axiosError.response.data.details
|
||||
details: Array.isArray(responseData?.details)
|
||||
? responseData.details
|
||||
: undefined,
|
||||
context: axiosError.response.data as Record<string, unknown>,
|
||||
context: responseData,
|
||||
};
|
||||
|
||||
throw apiError;
|
||||
|
|
|
|||
18
apps/web/src/services/api/index.ts
Normal file
18
apps/web/src/services/api/index.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* INT-CLEANUP-004: Barrel export for API services
|
||||
* This file exports all API-related services and clients for clean imports
|
||||
*/
|
||||
|
||||
// Export the main API client
|
||||
export { apiClient, API_TIMEOUTS, createCancellableRequest, createRequestWithTimeout, deduplicatedApiClient } from './client';
|
||||
|
||||
// Export validated API client
|
||||
export { validatedApiClient, validatedRequest } from './clientWithValidation';
|
||||
|
||||
// Export typed API client
|
||||
export { typedApiClient, createTypedRequest, isApiResponseWrapper } from './typedClient';
|
||||
export type { TypedRequestConfig, TypedApiClient, ApiResponseData, UnwrappedApiResponse, TypedApiRequestBuilder } from './typedClient';
|
||||
|
||||
// Export auth API
|
||||
export * from './auth';
|
||||
|
||||
|
|
@ -1,3 +1,18 @@
|
|||
/**
|
||||
* INT-CLEANUP-004: Barrel export for all types
|
||||
* This file exports all types from the types/ directory for clean imports
|
||||
*/
|
||||
|
||||
// Re-export all types from other files
|
||||
export * from './api';
|
||||
export * from './dto';
|
||||
export * from './forms';
|
||||
export * from './routes';
|
||||
export * from './marketplace';
|
||||
export * from './webhook';
|
||||
export * from './websocket';
|
||||
export * from './queryParams';
|
||||
|
||||
// Types globaux de l'application
|
||||
|
||||
export interface User {
|
||||
|
|
|
|||
Loading…
Reference in a new issue