|
| 1 | +import type { LiteralUnion } from '../utils/typings' |
| 2 | + |
1 | 3 | /** |
2 | 4 | * 头像图片 |
3 | 5 | */ |
@@ -152,7 +154,7 @@ export interface School { |
152 | 154 | * - `PUBLIC`: 公开 |
153 | 155 | * - `ALUMNI_ONLY`: 仅校友可见 |
154 | 156 | */ |
155 | | - privacyType: 'PUBLIC' | 'ALUMNI_ONLY' |
| 157 | + privacyType: LiteralUnion<'PUBLIC' | 'ALUMNI_ONLY'> |
156 | 158 | } |
157 | 159 |
|
158 | 160 | /** |
@@ -490,42 +492,60 @@ export interface LinkInfo { |
490 | 492 | export type ReadTrackInfo = Record<string, any> |
491 | 493 |
|
492 | 494 | export interface ActionItem { |
493 | | - type: string |
| 495 | + type: LiteralUnion<'COMMENT' | 'LIKE' | 'FOLLOW'> |
494 | 496 | users: SimpleUser[] |
495 | 497 | usersCount: number |
496 | 498 | id: string |
497 | 499 | content: string |
498 | 500 | pictures: any[] |
499 | 501 | enablePictureComments: boolean |
500 | | - status: string |
| 502 | + status: LiteralUnion<'NORMAL' | 'DELETED'> |
501 | 503 | targetId: string |
502 | | - targetType: string |
| 504 | + targetType: LiteralUnion<TargetType> |
503 | 505 | collapsible: boolean |
504 | 506 | collapsed: boolean |
505 | 507 | } |
506 | 508 |
|
| 509 | +export type TargetType = PostTypeRaw | 'STORY' |
| 510 | + |
507 | 511 | export interface ReferenceItem { |
508 | 512 | id: string |
509 | 513 | type: string |
510 | 514 | content: string |
511 | | - status: string |
| 515 | + status: LiteralUnion<'NORMAL' | 'DELETED'> |
512 | 516 | targetId: string |
513 | | - targetType: string |
| 517 | + targetType: LiteralUnion<TargetType> |
514 | 518 | /** 引用图片地址 */ |
515 | 519 | referenceImageUrl?: string |
516 | 520 | } |
517 | 521 |
|
518 | 522 | export interface Notification { |
519 | 523 | id: string |
520 | | - type: string |
| 524 | + type: LiteralUnion< |
| 525 | + | 'LIKE_STORY' |
| 526 | + | 'REPLIED_TO_STORY_COMMENT' |
| 527 | + | 'COMMENT_STORY' |
| 528 | + | 'LIKE_PERSONAL_UPDATE' |
| 529 | + | 'COMMENT_PERSONAL_UPDATE' |
| 530 | + | 'REPLIED_TO_PERSONAL_UPDATE_COMMENT' |
| 531 | + | 'LIKE_PERSONAL_UPDATE_COMMENT' |
| 532 | + | 'COMMENT_AND_REPOST' |
| 533 | + | 'USER_RESPECT' |
| 534 | + | 'MENTION' |
| 535 | + | 'USER_FOLLOWED' |
| 536 | + | 'USER_SILENT_FOLLOWED' |
| 537 | + | 'PERSONAL_UPDATE_REPOSTED' |
| 538 | + | 'LIKE_AVATAR' |
| 539 | + | 'AVATAR_GREET' |
| 540 | + > |
521 | 541 | createdAt: string |
522 | 542 | updatedAt: string |
523 | 543 | stoppable: boolean |
524 | 544 | stopped: boolean |
525 | | - actionType: string |
| 545 | + actionType: LiteralUnion<'actionType' | 'USER_LIST'> |
526 | 546 | actionItem: ActionItem |
527 | 547 | linkUrl: string |
528 | | - linkType: string |
| 548 | + linkType: LiteralUnion<PostTypeRaw> |
529 | 549 | referenceItem: ReferenceItem |
530 | 550 | } |
531 | 551 |
|
|
0 commit comments