| 1 | export interface KwaiApiCommonResponse { |
| 2 | result: number |
| 3 | error_msg?: string |
| 4 | } |
| 5 | |
| 6 | export type KwaiApiResponse<T> = T & KwaiApiCommonResponse |
| 7 | |
| 8 | export interface KwaiOAuthCredentialsResponse { |
| 9 | result: number |
| 10 | refresh_token: string |
| 11 | access_token: string |
| 12 | expires_in: number |
| 13 | refresh_token_expires_in: number |
| 14 | open_id: string |
| 15 | scopes: string[] |
| 16 | } |
| 17 | |
| 18 | export interface KwaiUserInfoResponse { |
| 19 | user_info: { |
| 20 | name: string |
| 21 | sex: 'M' | 'F' |
| 22 | fan: number |
| 23 | follow: number |
| 24 | head: string |
| 25 | bigHead: string |
| 26 | city: string |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | export interface KwaiStartUploadResponse { |
| 31 | upload_token: string |
| 32 | endpoint: string |
| 33 | } |
| 34 | |
| 35 | export interface KwaiVideoUploadResponse { |
| 36 | result: number |
| 37 | } |
| 38 | |
| 39 | export interface KwaiVideoInfo { |
| 40 | photo_id: string |
| 41 | caption: string |
| 42 | cover: string |
| 43 | play_url?: string |
| 44 | create_time: number |
| 45 | like_count: number |
| 46 | comment_count: number |
| 47 | view_count: number |
| 48 | pending: boolean |
| 49 | } |
| 50 | |
| 51 | export interface KwaiPublishVideoResponse { |
| 52 | video_info: KwaiVideoInfo |
| 53 | } |
| 54 | |
| 55 | export interface KwaiPhotoInfo { |
| 56 | photo_id?: string |
| 57 | caption?: string |
| 58 | cover?: string |
| 59 | play_url?: string |
| 60 | create_time?: number |
| 61 | like_count?: number |
| 62 | comment_count?: number |
| 63 | view_count?: number |
| 64 | pending?: boolean |
| 65 | } |
| 66 | |
| 67 | export interface KwaiPhotoListResponse { |
| 68 | video_list?: KwaiPhotoInfo[] |
| 69 | } |
| 70 |