-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmy-document.interface.ts
More file actions
138 lines (128 loc) · 4.92 KB
/
my-document.interface.ts
File metadata and controls
138 lines (128 loc) · 4.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// Copyright The Linux Foundation and each contributor to LFX.
// SPDX-License-Identifier: MIT
/** Source type for My Documents page */
export type MyDocumentSource = 'link' | 'meeting' | 'file' | 'recording' | 'transcript' | 'summary' | 'mailing_list';
// ─── Query Result Shapes ─────────────────────────────────────────────────────
/** Raw shape returned by query service for `committee_link` resource type */
export interface CommitteeLinkQueryResult {
uid: string;
name: string;
url?: string;
created_at?: string;
committee_uid?: string;
}
/** Raw shape returned by query service for `groupsio_artifact` resource type */
export interface GroupsIOArtifactQueryResult {
artifact_id: string;
group_id: number;
project_uid?: string;
committee_uid?: string;
type?: string;
filename?: string;
link_url?: string;
download_url?: string;
media_type?: string;
last_posted_at?: string;
created_at: string;
}
/** Raw shape returned by query service for `v1_meeting_registrant` resource type */
export interface MeetingRegistrantQueryResult {
meeting_id: string;
}
/** Raw shape returned by query service for `v1_past_meeting_participant` resource type */
export interface PastMeetingParticipantQueryResult {
meeting_and_occurrence_id: string;
}
/** Raw shape returned by query service for `v1_past_meeting_transcript` resource type */
export interface PastMeetingTranscriptQueryResult {
id: string;
meeting_and_occurrence_id: string;
meeting_id: string;
title: string;
start_time: string;
created_at: string;
recording_files?: { file_type?: string; download_url?: string }[];
sessions?: { share_url?: string }[];
}
/** Raw shape returned by query service for `v1_past_meeting_summary` resource type */
export interface PastMeetingSummaryQueryResult {
id: string;
meeting_and_occurrence_id: string;
meeting_id: string;
summary_title?: string;
zoom_meeting_topic?: string;
summary_start_time?: string;
created_at: string;
/** Consolidated markdown of the summary (indexer contract field) */
content?: string;
/** Edited markdown content, takes precedence over content when present */
edited_content?: string;
}
/** Raw shape returned by query service for `v1_past_meeting_recording` resource type */
export interface PastMeetingRecordingQueryResult {
id: string;
meeting_and_occurrence_id: string;
meeting_id: string;
title: string;
start_time: string;
created_at: string;
recording_files?: { file_type?: string; play_url?: string }[];
sessions?: { share_url?: string }[];
}
/**
* Unified document row for the My Documents table.
* Aggregates attachments across groups, meetings, and mailing lists.
*/
export interface MyDocumentItem {
/** Unique identifier (source:uid) */
id: string;
/** Display name of the document */
name: string;
/** Where the document came from */
source: MyDocumentSource;
/** Foundation display name */
foundationName: string;
/** Foundation UID — undefined when the source has no associated foundation */
foundationUid?: string;
/** Committee/group name or meeting title */
groupOrMeetingName: string;
/** Committee UID or meeting ID */
groupOrMeetingUid: string;
/** ISO date string for display */
date: string;
/** URL for link-type documents */
url?: string;
/** Attachment UID for download */
attachmentUid?: string;
/** Meeting ID for upcoming meeting attachments */
meetingId?: string;
/** Past meeting occurrence ID for past meeting attachments */
pastMeetingId?: string;
/** Mailing list (groups.io) ID for mailing list attachments */
mailingListId?: string;
/** File extension or MIME type for icon display (e.g., 'pdf', 'pptx') */
fileType?: string;
/** Raw markdown content for summary-type documents — used by the preview dialog */
summaryContent?: string;
/** Summary record UID — used by the preview dialog to support edit/approve actions */
summaryUid?: string;
/** Parent folder UID — present for committee links/files that live inside a folder */
parentUid?: string;
/** When true, the row is rendered with an indent to indicate it sits inside a parent folder */
isChild?: boolean;
/**
* When true, the row represents a folder (container). The table renders the name as a
* clickable button that emits `folderOpen` instead of opening a URL.
*/
isFolder?: boolean;
/** Number of items inside this folder — shown next to the folder name when isFolder is true */
childCount?: number;
/**
* Direct BFF download endpoint for files served by lfx-self-serve itself (with proper
* Content-Disposition). When set, the download button navigates here instead of routing
* through the generic /api/documents/download proxy that fetches external URLs.
*/
downloadUrl?: string;
/** Display name of the user who shared/uploaded the document, when available. */
uploadedBy?: string;
}