mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-28 03:49:37 +00:00

refactors comments feature: initial get comments and create comment updates tsconfig to support es2017 object prototype methods: values, entries, creates user-avatar component, adds styles, converts constants files to ts updates comment editor. updates styling. adds auto focus on click adds comment deletion adds confirmation dialog for comment deletion adds string union generic constraint type. adds comment stream header. adds comment update feature. adds style modifications and additions for comment components. refactors actions for comments using strategy pattern to allow for abstraction. adds dataset-constants constants module
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>;
|
|
};
|
|
}
|