Files
nianxx-h5/src/shared/request-types.ts
duanshuwen 548df7020c feat: initial project setup with core infrastructure and api clients
- Add environment configs for dev/staging/prod environments
- Implement centralized axios request utility with standardized error handling
- Add shared TypeScript types for API responses and requests
- Create comprehensive API client modules for all core endpoints
- Configure vue router with all application page routes
- Add icon fonts, static assets, and loading animations
- Set up project documentation and collaboration guidelines
- Remove deprecated uni-app bridge component files
2026-05-26 21:42:36 +08:00

30 lines
594 B
TypeScript

export interface ApiResponse<T> {
code: number;
message?: string;
data: T;
}
export interface RequestOptions {
signal?: AbortSignal;
headers?: Record<string, string>;
skipAuth?: boolean;
}
export type RequestContext = {
token: string | null;
clientId: string | null;
latitude: number | null;
longitude: number | null;
language: string | null;
};
export type NormalizedErrorKind = "business" | "http" | "network" | "unknown";
export interface NormalizedError extends Error {
kind: NormalizedErrorKind;
code?: number;
httpStatus?: number;
response?: unknown;
}