| 1 | interface TopicsInfoDto { |
| 2 | view_num: number; |
| 3 | type: string; |
| 4 | smart: boolean; |
| 5 | id: string; |
| 6 | name: string; |
| 7 | link: string; |
| 8 | } |
| 9 | |
| 10 | interface TopicsResult { |
| 11 | success: boolean; |
| 12 | } |
| 13 | |
| 14 | interface TopicsData { |
| 15 | topic_info_dtos: TopicsInfoDto[]; |
| 16 | result: TopicsResult; |
| 17 | } |
| 18 | |
| 19 | interface CommonResponse<T> { |
| 20 | code: number; |
| 21 | success: boolean; |
| 22 | msg: string; |
| 23 | data: T; |
| 24 | } |
| 25 | |
| 26 | interface Poi { |
| 27 | poi_id: string; |
| 28 | poi_type: number; |
| 29 | city_name: string; |
| 30 | longitude: number; |
| 31 | type: string; |
| 32 | address: string; |
| 33 | name: string; |
| 34 | full_address: string; |
| 35 | latitude: number; |
| 36 | } |
| 37 | |
| 38 | interface LocationData { |
| 39 | poi_list: Poi[]; |
| 40 | search_context: string; |
| 41 | } |
| 42 | |
| 43 | interface XiaohongshuUserBaseDTO { |
| 44 | desc: string; |
| 45 | image_size_large: string; |
| 46 | followed: boolean; |
| 47 | show_red_official_verify_icon: boolean; |
| 48 | red_id: string; |
| 49 | user_id: string; |
| 50 | user_nickname: string; |
| 51 | image: string; |
| 52 | red_official_verified: boolean; |
| 53 | red_official_verify_type: number; |
| 54 | } |
| 55 | |
| 56 | interface XiaohongshuUserInfoDTO { |
| 57 | user_base_dto: XiaohongshuUserBaseDTO; |
| 58 | fans_total: number; |
| 59 | discovery_total: number; |
| 60 | } |
| 61 | |
| 62 | interface XiaohongshuResult { |
| 63 | success: boolean; |
| 64 | code: number; |
| 65 | message: string; |
| 66 | } |
| 67 | |
| 68 | interface XiaohongshuData { |
| 69 | result: XiaohongshuResult; |
| 70 | user_info_dtos: XiaohongshuUserInfoDTO[]; |
| 71 | } |
| 72 | |
| 73 | export interface IXHSWorks { |
| 74 | collected_count: number; |
| 75 | comments_count: number; |
| 76 | display_title: string; |
| 77 | id: string; |
| 78 | images_list: { |
| 79 | url: string; |
| 80 | }[]; |
| 81 | level: number; |
| 82 | permission_code: number; |
| 83 | likes: number; |
| 84 | permission_msg: string; |
| 85 | schedule_post_time: number; |
| 86 | shared_count: number; |
| 87 | sticky: boolean; |
| 88 | tab_status: number; |
| 89 | time: string; |
| 90 | type: string; |
| 91 | video_info: { |
| 92 | duration: number; |
| 93 | }; |
| 94 | view_count: number; |
| 95 | xsec_source: string; |
| 96 | xsec_token: string; |
| 97 | } |
| 98 | |
| 99 | export type IXHSGetWorksResponse = CommonResponse<{ |
| 100 | page: number; |
| 101 | notes: IXHSWorks[]; |
| 102 | tags: { |
| 103 | checked: boolean; |
| 104 | id: string; |
| 105 | name: string; |
| 106 | notes_count: number; |
| 107 | }[]; |
| 108 | }>; |
| 109 | |
| 110 | // 搜索用户 |
| 111 | export type XiaohongshuApiResponse = CommonResponse<XiaohongshuData>; |
| 112 | |
| 113 | // 话题列表返回值 |
| 114 | export type IXHSTopicsResponse = CommonResponse<TopicsData>; |
| 115 | |
| 116 | // 地点列表返回值 |
| 117 | export type IXHSLocationResponse = CommonResponse<LocationData>; |
| 118 | |
| 119 | // 评论列表返回值 |
| 120 | export type XhsCommentListResponse = { |
| 121 | code: number; // 0; |
| 122 | success: boolean; // true; |
| 123 | msg: string; // '成功'; |
| 124 | data: { |
| 125 | user_id: string; // '6433a78b000000000e01d2bf'; |
| 126 | comments: [ |
| 127 | { |
| 128 | note_id: string; // '64477a32000000000800db6b'; |
| 129 | liked: boolean; // false; |
| 130 | user_info: { |
| 131 | user_id: string; // '6433a78b000000000e01d2bf'; |
| 132 | nickname: string; // '快乐的不快乐'; |
| 133 | image: string; // 'https://sns-avatar-qc.xhscdn.com/avatar/64469a41b2b360267e424ade.jpg?imageView2/2/w/120/format/jpg'; |
| 134 | xsec_token: string; // 'ABwV2_E6v08_HB53bZla7rsC7W5ZvWpAmbowx4iPyhhTQ='; |
| 135 | }; |
| 136 | sub_comment_has_more: boolean; // false; |
| 137 | content: string; // '哈哈哈'; |
| 138 | like_count: string; // '0'; |
| 139 | ip_location: string; // '河北'; |
| 140 | id: string; // '67d028670000000019034092'; |
| 141 | at_users: []; |
| 142 | show_tags: string[]; // ['is_author']; |
| 143 | create_time: number; // 1741695080000; |
| 144 | sub_comment_count: string; // '1'; |
| 145 | sub_comments: { |
| 146 | status: number; // 0; |
| 147 | content: string; // '嘿嘿'; |
| 148 | at_users: []; |
| 149 | liked: false; |
| 150 | create_time: number; // 1741695086000; |
| 151 | ip_location: string; // '河北'; |
| 152 | id: string; // '67d0286d0000000019018ff5'; |
| 153 | like_count: string; // '0'; |
| 154 | user_info: { |
| 155 | user_id: string; // '6433a78b000000000e01d2bf'; |
| 156 | nickname: string; // '快乐的不快乐'; |
| 157 | image: string; // 'https://sns-avatar-qc.xhscdn.com/avatar/64469a41b2b360267e424ade.jpg?imageView2/2/w/120/format/jpg'; |
| 158 | xsec_token: string; // 'ABwV2_E6v08_HB53bZla7rsC7W5ZvWpAmbowx4iPyhhTQ='; |
| 159 | }; |
| 160 | show_tags: string[]; // ['is_author']; |
| 161 | target_comment: { |
| 162 | id: string; // '67d028670000000019034092'; |
| 163 | user_info: { |
| 164 | image: string; // 'https://sns-avatar-qc.xhscdn.com/avatar/64469a41b2b360267e424ade.jpg?imageView2/2/w/120/format/jpg'; |
| 165 | xsec_token: string; // 'ABwV2_E6v08_HB53bZla7rsC7W5ZvWpAmbowx4iPyhhTQ='; |
| 166 | user_id: string; // '6433a78b000000000e01d2bf'; |
| 167 | nickname: string; // '快乐的不快乐'; |
| 168 | }; |
| 169 | }; |
| 170 | note_id: string; // '64477a32000000000800db6b'; |
| 171 | }[]; |
| 172 | sub_comment_cursor: string; // '67d0286d0000000019018ff5'; |
| 173 | status: number; // 0; |
| 174 | }, |
| 175 | ]; |
| 176 | cursor: string; // '67d028670000000019034092'; |
| 177 | has_more: boolean; // false; |
| 178 | time: number; // 1741951532993; |
| 179 | xsec_token: string; // 'ABwV2_E6v08_HB53bZla7rsC7W5ZvWpAmbowx4iPyhhTQ='; |
| 180 | }; |
| 181 | }; |
| 182 | |
| 183 | // 评论作品 |
| 184 | export type XhsCommentPostResponse = { |
| 185 | success: boolean; // true; |
| 186 | msg: string; // '成功'; |
| 187 | data: { |
| 188 | comment: { |
| 189 | show_tags: string[]; // ['is_author']; |
| 190 | create_time: number; // 1741952083568; |
| 191 | at_users: string[]; // []; |
| 192 | liked: boolean; // false; |
| 193 | user_info: { |
| 194 | nickname: string; // '快乐的不快乐'; |
| 195 | image: string; // 'https://sns-avatar-qc.xhscdn.com/avatar/64469a41b2b360267e424ade.jpg?imageView2/2/w/120/format/jpg'; |
| 196 | user_id: string; // '6433a78b000000000e01d2bf'; |
| 197 | }; |
| 198 | content: string; // '背景不错'; |
| 199 | like_count: string; // '0'; |
| 200 | ip_location: string; // '河北'; |
| 201 | id: string; // '67d4145300000000190210ba'; |
| 202 | note_id: string; // '64477a32000000000800db6b'; |
| 203 | status: number; // 2; |
| 204 | target_comment?: { |
| 205 | // 被回复的评论信息 |
| 206 | id: string; // '67d4145300000000190210ba'; |
| 207 | user_info: { |
| 208 | user_id: string; // '6433a78b000000000e01d2bf'; |
| 209 | nickname: string; // '快乐的不快乐'; |
| 210 | image: string; // 'https://sns-avatar-qc.xhscdn.com/avatar/64469a41b2b360267e424ade.jpg?imageView2/2/w/120/format/jpg'; |
| 211 | }; |
| 212 | }; |
| 213 | }; |
| 214 | time: number; // 1741952083585; |
| 215 | toast: string; // '评论已发布'; // 你的回复已发布 |
| 216 | }; |
| 217 | code: number; // 0; |
| 218 | }; |
| 219 |