2017-09-20 14:25:27 -07:00
|
|
|
import { IUser } from 'wherehows-web/typings/api/authentication/user';
|
|
|
|
import { ApiStatus } from 'wherehows-web/utils/api';
|
2017-10-25 02:11:28 -07:00
|
|
|
import { DatasetPlatform } from 'wherehows-web/constants';
|
2017-09-20 14:25:27 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Describes the properties of a Dataset object
|
2017-10-25 02:11:28 -07:00
|
|
|
* @interface IDataset
|
2017-09-20 14:25:27 -07:00
|
|
|
*/
|
|
|
|
interface IDataset {
|
|
|
|
created: number;
|
|
|
|
formatedModified: string;
|
|
|
|
hasSchemaHistory: boolean;
|
|
|
|
hdfsBrowserLink: null | string;
|
|
|
|
id: number;
|
|
|
|
isFavorite: boolean;
|
|
|
|
isOwned: boolean;
|
|
|
|
isWatched: false;
|
|
|
|
modified: number;
|
|
|
|
name: string;
|
|
|
|
owners: Array<IUser>;
|
|
|
|
properties: null;
|
2017-10-24 00:11:23 -07:00
|
|
|
schema: string; //JSON string
|
2017-09-20 14:25:27 -07:00
|
|
|
source: string;
|
|
|
|
urn: string;
|
|
|
|
watchId: number;
|
|
|
|
}
|
|
|
|
|
2017-10-25 02:11:28 -07:00
|
|
|
/**
|
|
|
|
* Describes the interface for a DatasetView. This represents a resource
|
|
|
|
* derived from TMS (The Metadata Store)
|
|
|
|
* @interface IDatasetView
|
|
|
|
*/
|
|
|
|
interface IDatasetView {
|
|
|
|
platform: DatasetPlatform;
|
|
|
|
nativeName: string;
|
|
|
|
fabric: string; // get enum for fabric
|
|
|
|
uri: string;
|
|
|
|
description: string;
|
|
|
|
nativeType: string;
|
|
|
|
properties: string | null;
|
|
|
|
tags: Array<string>;
|
|
|
|
removed: boolean | null;
|
|
|
|
deprecated: boolean | null;
|
|
|
|
deprecationNote: string | null;
|
|
|
|
createdTime: number;
|
|
|
|
modifiedTime: number;
|
|
|
|
}
|
|
|
|
|
2017-09-20 14:25:27 -07:00
|
|
|
/**
|
|
|
|
* Describes the response from the GET Dataset endpoint
|
2017-10-25 02:11:28 -07:00
|
|
|
* @interface IDatasetGetResponse
|
2017-09-20 14:25:27 -07:00
|
|
|
*/
|
|
|
|
interface IDatasetGetResponse {
|
|
|
|
status: ApiStatus;
|
2017-11-06 09:48:37 -08:00
|
|
|
message?: string;
|
2017-09-20 14:25:27 -07:00
|
|
|
dataset?: IDataset;
|
|
|
|
}
|
2017-10-25 02:11:28 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Describes the interface of a response from the GET datasetView endpoint
|
|
|
|
* @interface IDatasetViewGetResponse
|
|
|
|
*/
|
|
|
|
interface IDatasetViewGetResponse {
|
|
|
|
status: ApiStatus;
|
|
|
|
dataset?: IDatasetView;
|
|
|
|
}
|
|
|
|
|
|
|
|
export { IDatasetViewGetResponse, IDatasetView, IDatasetGetResponse, IDataset };
|