|
| 1 | +import * as Theming from "./theming"; |
| 2 | + |
| 3 | +export type MemberType = "admin" | "normal" | "observer"; |
| 4 | + |
| 5 | +export interface Organization { |
| 6 | + id: string; |
| 7 | + name: string; |
| 8 | + paidStatus: string; // One of "free" or "paid", I suspect. I can only verify "free". |
| 9 | +} |
| 10 | + |
| 11 | +export interface Member { |
| 12 | + id: string; |
| 13 | + fullName: string | null; |
| 14 | + username: string | null; |
| 15 | + initials: string | null; |
| 16 | + avatar: string | null; |
| 17 | +} |
| 18 | + |
| 19 | +export interface Membership { |
| 20 | + deactivated: boolean; |
| 21 | + id: string; |
| 22 | + idMember: string; |
| 23 | + memberType: MemberType; |
| 24 | + unconfirmed: boolean; |
| 25 | +} |
| 26 | + |
| 27 | +export interface Label { |
| 28 | + id: string; |
| 29 | + name: string; |
| 30 | + color: Theming.ColorName; |
| 31 | +} |
| 32 | + |
| 33 | +export interface CustomFieldValue { |
| 34 | + checked?: string; |
| 35 | + date?: string; |
| 36 | + text?: string; |
| 37 | + number?: string; |
| 38 | +} |
| 39 | + |
| 40 | +export interface CustomField { |
| 41 | + id: string; |
| 42 | + idCustomField: string; |
| 43 | + idValue?: string; |
| 44 | + value?: CustomFieldValue; |
| 45 | +} |
| 46 | + |
| 47 | +export interface AttachmentPreview { |
| 48 | + bytes: number; |
| 49 | + height: number; |
| 50 | + scaled: boolean; |
| 51 | + url: string; |
| 52 | + width: number; |
| 53 | +} |
| 54 | + |
| 55 | +export interface Attachment { |
| 56 | + date: string; |
| 57 | + edgeColor: string; |
| 58 | + id: string; |
| 59 | + idMember: string; |
| 60 | + name: string; |
| 61 | + previews: AttachmentPreview[]; |
| 62 | + url: string; |
| 63 | +} |
| 64 | + |
| 65 | +export interface Coordinates { |
| 66 | + latitude: number; |
| 67 | + longitude: number; |
| 68 | +} |
| 69 | + |
| 70 | +export interface AttachmentsByType { |
| 71 | + [key: string]: { |
| 72 | + board: number; |
| 73 | + card: number; |
| 74 | + }; |
| 75 | +} |
| 76 | + |
| 77 | +export interface BadgesInfo { |
| 78 | + attachments: number; |
| 79 | + attachmentsByType: AttachmentsByType; |
| 80 | + checkItems: number; |
| 81 | + checkItemsChecked: number; |
| 82 | + comments: number; |
| 83 | + description: boolean; |
| 84 | + due: string; // timestamp |
| 85 | + dueComplete: boolean; |
| 86 | + fogbugz: string; |
| 87 | + location: boolean; |
| 88 | + subscribed: boolean; |
| 89 | + viewingMemberVoted: boolean; |
| 90 | + votes: number; |
| 91 | +} |
| 92 | + |
| 93 | +export interface Board { |
| 94 | + id: string; |
| 95 | + name: string; |
| 96 | + url: string; // https://trello.com/c/I5nAdteE/9-test |
| 97 | + shortLink: string; |
| 98 | + members: Member[]; |
| 99 | + dateLastActivity: string; // "2025-05-21T09:14:24.641Z" |
| 100 | + idOrganization: string; |
| 101 | + customFields: CustomField[]; |
| 102 | + labels: Label[]; |
| 103 | + memberships: Membership[]; |
| 104 | + paidStatus: string; // One of "free" or "paid", I suspect. I can only verify "free". |
| 105 | +} |
| 106 | + |
| 107 | +export interface Card { |
| 108 | + address: string | null; |
| 109 | + attachments: Attachment[]; |
| 110 | + badges: BadgesInfo; |
| 111 | + closed: boolean; |
| 112 | + coordinates: Coordinates | null; |
| 113 | + cover: Attachment | null; |
| 114 | + customFieldItems: CustomField[]; |
| 115 | + dateLastActivity: string; // "2019-11-28T15:53:19.709Z" |
| 116 | + desc: string; |
| 117 | + due: string | null; // "2019-11-28T15:53:19.709Z" |
| 118 | + dueComplete: boolean; |
| 119 | + id: string; |
| 120 | + idList: string; |
| 121 | + idShort: number; |
| 122 | + labels: Label[]; |
| 123 | + locationName: string | null; |
| 124 | + members: Member[]; |
| 125 | + name: string; |
| 126 | + pos: number; |
| 127 | + shortLink: string; |
| 128 | + url: string; // https://trello.com/c/I5nAdteE/9-test |
| 129 | +} |
| 130 | + |
| 131 | +export interface List { |
| 132 | + id: string; |
| 133 | + name: string; |
| 134 | + cards: Card[]; |
| 135 | +} |
0 commit comments