| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- // API response type definitions
- export interface ApiResponse<T = unknown> {
- code: number
- data: T
- msg: string
- }
- /**
- * /base/consts/config 返回的 data 结构
- */
- export interface CommonAreaConstItem {
- code: string
- name: string
- }
- export interface BaseConstsConfig {
- commonAreaConsts?: CommonAreaConstItem[]
- /**
- * 汇率配置(示例):
- * [
- * { "IDR": 1000, "goldCoin": 1 },
- * { "IDR": 1, "bean": 1 },
- * { "diamond": 1, "IDR": 1 }
- * ]
- */
- commonCoinExchangeConsts?: Array<Record<string, number>>
- [key: string]: unknown
- }
- // Request config type
- export interface RequestConfig {
- method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'
- headers?: Record<string, string>
- params?: Record<string, unknown>
- data?: unknown
- timeout?: number
- needAuth?: boolean
- }
- // Pagination request
- export interface PaginationParams {
- page: number
- pageSize: number
- }
- // Pagination response
- export interface PaginationResponse<T> {
- list: T[]
- total: number
- page: number
- pageSize: number
- }
|