Seyi Adebajo ef065d0e1d refactors login flow. adds profile avatar. updates dependencies
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
2017-09-13 14:18:24 -07:00

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>;
};
}