mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-11-04 04:39:10 +00:00 
			
		
		
		
	
		
			
	
	
		
			41 lines
		
	
	
		
			865 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
		
		
			
		
	
	
			41 lines
		
	
	
		
			865 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| 
								 | 
							
								import { ApiStatus } from 'wherehows-web/utils/api/shared';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// Allowable values for the Comment type property
							 | 
						||
| 
								 | 
							
								export type CommentTypeUnion =
							 | 
						||
| 
								 | 
							
								  | 'Comment'
							 | 
						||
| 
								 | 
							
								  | 'Question'
							 | 
						||
| 
								 | 
							
								  | 'Description'
							 | 
						||
| 
								 | 
							
								  | 'Partition'
							 | 
						||
| 
								 | 
							
								  | 'ETL Schedule'
							 | 
						||
| 
								 | 
							
								  | 'Grain'
							 | 
						||
| 
								 | 
							
								  | 'DQ Issue';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * Describes the interface for a Dataset Comment
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								export interface IDatasetComment {
							 | 
						||
| 
								 | 
							
								  type: CommentTypeUnion;
							 | 
						||
| 
								 | 
							
								  text: string;
							 | 
						||
| 
								 | 
							
								  isAuthor: boolean;
							 | 
						||
| 
								 | 
							
								  authorName: string;
							 | 
						||
| 
								 | 
							
								  authorEmail: string;
							 | 
						||
| 
								 | 
							
								  authorUserName: string;
							 | 
						||
| 
								 | 
							
								  created: string; // should be in epoch ms
							 | 
						||
| 
								 | 
							
								  modified: string; // should be in epoch ms
							 | 
						||
| 
								 | 
							
								  datasetId: number;
							 | 
						||
| 
								 | 
							
								  id: number;
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * Describes the response from the comment api get request
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								export interface IDatasetCommentsGetResponse {
							 | 
						||
| 
								 | 
							
								  status: ApiStatus;
							 | 
						||
| 
								 | 
							
								  data: {
							 | 
						||
| 
								 | 
							
								    count: number;
							 | 
						||
| 
								 | 
							
								    itemsPerPage: number;
							 | 
						||
| 
								 | 
							
								    totalPages: number;
							 | 
						||
| 
								 | 
							
								    comments: Array<IDatasetComment>;
							 | 
						||
| 
								 | 
							
								  };
							 | 
						||
| 
								 | 
							
								}
							 |