86133 | aaa3f5d | 2025-04-20 21:33:29 +0800 | [diff] [blame] | 1 | declare namespace API { |
| 2 | type CurrentUser = UserInfo & { |
| 3 | signature?: string; |
| 4 | title?: string; |
| 5 | group?: string; |
| 6 | tags?: { key?: string; label?: string }[]; |
| 7 | notifyCount?: number; |
| 8 | unreadCount?: number; |
| 9 | country?: string; |
| 10 | access?: string; |
| 11 | geographic?: { |
| 12 | province?: { label?: string; key?: string }; |
| 13 | city?: { label?: string; key?: string }; |
| 14 | }; |
| 15 | address?: string; |
| 16 | phone?: string; |
| 17 | }; |
| 18 | |
| 19 | type ErrorResponse = { |
| 20 | /** 业务约定的错误码 */ |
| 21 | errorCode: string; |
| 22 | /** 业务上的错误信息 */ |
| 23 | errorMessage?: string; |
| 24 | /** 业务上的请求是否成功 */ |
| 25 | success?: boolean; |
| 26 | }; |
| 27 | |
| 28 | type FakeCaptcha = { |
| 29 | code?: number; |
| 30 | status?: string; |
| 31 | }; |
| 32 | |
| 33 | type getFakeCaptchaParams = { |
| 34 | /** 手机号 */ |
| 35 | phone?: string; |
| 36 | }; |
| 37 | |
| 38 | type LoginParams = { |
| 39 | username?: string; |
| 40 | password?: string; |
| 41 | uuid?: string; |
| 42 | autoLogin?: boolean; |
| 43 | type?: string; |
| 44 | }; |
| 45 | |
| 46 | type LoginResult = { |
| 47 | code: number; |
| 48 | msg?: string; |
| 49 | type?: string; |
| 50 | token?: string; |
| 51 | }; |
| 52 | |
| 53 | type NoticeIconItem = { |
| 54 | id?: string; |
| 55 | extra?: string; |
| 56 | key?: string; |
| 57 | read?: boolean; |
| 58 | avatar?: string; |
| 59 | title?: string; |
| 60 | status?: string; |
| 61 | datetime?: string; |
| 62 | description?: string; |
| 63 | type?: NoticeIconItemType; |
| 64 | }; |
| 65 | |
| 66 | type NoticeIconItemType = 'notification' | 'message' | 'event'; |
| 67 | |
| 68 | type NoticeIconList = { |
| 69 | data?: NoticeIconItem[]; |
| 70 | /** 列表的内容总数 */ |
| 71 | total?: number; |
| 72 | success?: boolean; |
| 73 | }; |
| 74 | |
| 75 | type PageParams = { |
| 76 | current?: number; |
| 77 | pageSize?: number; |
| 78 | }; |
| 79 | |
| 80 | type RuleList = { |
| 81 | data?: RuleListItem[]; |
| 82 | /** 列表的内容总数 */ |
| 83 | total?: number; |
| 84 | success?: boolean; |
| 85 | }; |
| 86 | |
| 87 | type RuleListItem = { |
| 88 | key?: number; |
| 89 | disabled?: boolean; |
| 90 | href?: string; |
| 91 | avatar?: string; |
| 92 | name?: string; |
| 93 | owner?: string; |
| 94 | desc?: string; |
| 95 | callNo?: number; |
| 96 | status?: number; |
| 97 | updatedAt?: string; |
| 98 | createdAt?: string; |
| 99 | progress?: number; |
| 100 | }; |
| 101 | |
| 102 | type ruleParams = { |
| 103 | /** 当前的页码 */ |
| 104 | current?: number; |
| 105 | /** 页面的容量 */ |
| 106 | pageSize?: number; |
| 107 | }; |
| 108 | } |