2023-03-17 15:13:37 +00:00
|
|
|
import { Ref } from 'vue';
|
2023-11-27 16:17:22 +00:00
|
|
|
import { DateTime } from 'luxon';
|
|
|
|
|
|
|
|
export interface User {
|
|
|
|
id: number;
|
|
|
|
login: string;
|
|
|
|
email: string;
|
|
|
|
password: string;
|
|
|
|
createdAt: DateTime;
|
|
|
|
updatedAt: DateTime;
|
|
|
|
roles: Array<Role>;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Role {
|
|
|
|
id: number;
|
|
|
|
display_name: string;
|
|
|
|
name: string;
|
|
|
|
description: string;
|
|
|
|
created_at: DateTime;
|
|
|
|
updated_at: DateTime;
|
|
|
|
}
|
2024-04-29 09:25:50 +00:00
|
|
|
export interface License {
|
|
|
|
id: any;
|
|
|
|
// Add other properties as needed
|
|
|
|
}
|
2023-03-17 15:13:37 +00:00
|
|
|
export interface Dataset {
|
2023-06-22 15:20:04 +00:00
|
|
|
[key: string]:
|
|
|
|
| string
|
|
|
|
| Ref<string>
|
|
|
|
| boolean
|
|
|
|
| Array<Title>
|
|
|
|
| Array<Description>
|
|
|
|
| Array<Person>
|
|
|
|
| number
|
|
|
|
| (IErrorMessage | undefined)
|
|
|
|
| Coverage
|
2023-08-01 15:06:51 +00:00
|
|
|
| Array<DatasetReference>
|
2023-11-22 16:06:55 +00:00
|
|
|
| Array<File>
|
2024-04-29 09:25:50 +00:00
|
|
|
| (Array<number> | Array<License>)
|
|
|
|
| Array<TethysFile>;
|
2024-02-02 13:00:54 +00:00
|
|
|
language: string;
|
2024-04-29 09:25:50 +00:00
|
|
|
licenses: Array<number> | Array<License>;
|
2023-06-22 15:20:04 +00:00
|
|
|
rights: boolean;
|
|
|
|
type: string;
|
|
|
|
creating_corporation: string;
|
2023-03-17 15:13:37 +00:00
|
|
|
titles: Array<Title>;
|
|
|
|
descriptions: Array<Description>;
|
2023-03-24 10:41:52 +00:00
|
|
|
authors: Array<Person>;
|
|
|
|
contributors: Array<Person>;
|
|
|
|
project_id?: number;
|
2023-12-12 14:22:25 +00:00
|
|
|
reviewer_id?: number;
|
2023-06-22 15:20:04 +00:00
|
|
|
embargo_date?: string;
|
|
|
|
coverage: Coverage;
|
2023-03-17 15:13:37 +00:00
|
|
|
errors?: IErrorMessage;
|
2023-06-22 15:20:04 +00:00
|
|
|
// async (user): Promise<void>;
|
|
|
|
subjects: Array<Subject>;
|
2023-08-01 15:06:51 +00:00
|
|
|
references: Array<DatasetReference>;
|
2023-11-22 16:06:55 +00:00
|
|
|
files: Array<TethysFile>;
|
2023-06-16 14:44:28 +00:00
|
|
|
// upload: TethysFile
|
2023-06-01 12:29:56 +00:00
|
|
|
}
|
|
|
|
|
2023-06-16 14:44:28 +00:00
|
|
|
/** Provides information about files and allows JavaScript in a web page to access their content. */
|
2023-11-22 16:06:55 +00:00
|
|
|
// export interface TethysFile {
|
|
|
|
|
|
|
|
// readonly lastModified: number;
|
|
|
|
// readonly name: string;
|
|
|
|
// readonly webkitRelativePath: string;
|
|
|
|
// id: number;
|
|
|
|
// label: string;
|
|
|
|
// sorting: number;
|
|
|
|
// filePath: string;
|
|
|
|
// fileSrc: string;
|
|
|
|
// }
|
|
|
|
|
|
|
|
export interface TethysFile {
|
2023-06-16 14:44:28 +00:00
|
|
|
readonly lastModified: number;
|
|
|
|
readonly name: string;
|
|
|
|
readonly webkitRelativePath: string;
|
2023-11-22 16:06:55 +00:00
|
|
|
id?: number;
|
2023-06-22 15:20:04 +00:00
|
|
|
label: string;
|
2023-11-22 16:06:55 +00:00
|
|
|
// sorting: number;
|
|
|
|
// path_name?: string; //only db path_name
|
|
|
|
filePath?: string;
|
|
|
|
fileSrc?: string;
|
|
|
|
blob: Blob;
|
|
|
|
fileData?: any;
|
2023-05-19 09:30:49 +00:00
|
|
|
|
2023-11-22 16:06:55 +00:00
|
|
|
//additional:
|
|
|
|
comment?: string;
|
|
|
|
document_id?: number;
|
|
|
|
file_size: number;
|
|
|
|
language?: string;
|
|
|
|
mime_type: string;
|
|
|
|
type?: string;
|
|
|
|
|
|
|
|
size: number;
|
|
|
|
sort_order: number;
|
|
|
|
visible_in_frontdoor: boolean;
|
|
|
|
visible_in_oai: boolean;
|
|
|
|
}
|
2023-06-16 14:44:28 +00:00
|
|
|
|
2023-05-19 09:30:49 +00:00
|
|
|
export interface Subject {
|
2023-11-27 16:17:22 +00:00
|
|
|
id?: number;
|
2023-06-22 15:20:04 +00:00
|
|
|
language: string;
|
|
|
|
type: string;
|
2023-05-19 09:30:49 +00:00
|
|
|
value: string;
|
2023-06-22 15:20:04 +00:00
|
|
|
external_key?: string;
|
2023-11-29 15:52:41 +00:00
|
|
|
dataset_count?: number;
|
2023-03-17 15:13:37 +00:00
|
|
|
}
|
2023-08-01 15:06:51 +00:00
|
|
|
export interface DatasetReference {
|
2023-09-05 16:18:42 +00:00
|
|
|
// id: number;
|
2023-08-01 15:06:51 +00:00
|
|
|
value: string;
|
|
|
|
label: string;
|
|
|
|
type: string;
|
|
|
|
relation: string;
|
|
|
|
}
|
2023-03-17 15:13:37 +00:00
|
|
|
|
|
|
|
export interface Title {
|
2023-11-22 16:06:55 +00:00
|
|
|
id?: number;
|
2023-03-17 15:13:37 +00:00
|
|
|
value: string;
|
|
|
|
type: string;
|
|
|
|
language: string | Ref<string>;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Description {
|
2023-11-22 16:06:55 +00:00
|
|
|
id?: number;
|
2023-03-17 15:13:37 +00:00
|
|
|
value: string;
|
|
|
|
type: string;
|
|
|
|
language: string | Ref<string>;
|
|
|
|
}
|
|
|
|
|
2023-03-24 10:41:52 +00:00
|
|
|
export interface Person {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
email: string;
|
|
|
|
name_type: string;
|
|
|
|
identifier_orcid: string;
|
|
|
|
datasetCount: string;
|
|
|
|
created_at: string;
|
|
|
|
}
|
|
|
|
|
2023-03-17 15:13:37 +00:00
|
|
|
interface IErrorMessage {
|
2023-06-22 15:20:04 +00:00
|
|
|
[key: string]: Array<string>;
|
2023-03-31 12:54:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface Coverage {
|
2023-05-02 16:10:32 +00:00
|
|
|
x_min?: number;
|
|
|
|
y_min?: number;
|
|
|
|
x_max?: number;
|
|
|
|
y_max?: number;
|
2023-03-31 12:54:15 +00:00
|
|
|
elevation_min?: number;
|
|
|
|
elevation_max?: number;
|
|
|
|
elevation_absolut?: number;
|
|
|
|
|
|
|
|
depth_min?: number;
|
|
|
|
depth_max?: number;
|
|
|
|
depth_absolut?: number;
|
|
|
|
|
2023-06-22 15:20:04 +00:00
|
|
|
time_min?: number;
|
|
|
|
time_max?: number;
|
|
|
|
time_absolut?: number;
|
|
|
|
}
|
2023-10-23 13:27:39 +00:00
|
|
|
|
|
|
|
export interface OpensearchDocument {
|
|
|
|
abstract_additional: Array<string>;
|
|
|
|
abstract_output: string;
|
|
|
|
author: Array<string>;
|
|
|
|
author_sort: Array<string>;
|
|
|
|
belongs_to_bibliography: boolean;
|
|
|
|
creating_corporation: string;
|
|
|
|
doctype: string;
|
|
|
|
geo_location: string;
|
|
|
|
id: number;
|
|
|
|
identifier: Identifier;
|
|
|
|
language: string;
|
|
|
|
licence: string;
|
|
|
|
publisher_name: string;
|
|
|
|
server_date_published: Array<number>;
|
|
|
|
subject: Array<string>;
|
|
|
|
title_output: string;
|
|
|
|
year: number;
|
|
|
|
year_inverted: number;
|
|
|
|
}
|
|
|
|
export interface Identifier {
|
|
|
|
created_at: string;
|
|
|
|
dataset_id: number;
|
|
|
|
id: number;
|
|
|
|
status: string; //'findable'
|
|
|
|
type: string; //'doi'
|
|
|
|
updated_at: string; //'2023-03-09T09:48:28.000Z'
|
|
|
|
value: string; //'10.24341/tethys.209'
|
2023-10-31 14:38:43 +00:00
|
|
|
}
|
2024-02-16 14:32:47 +00:00
|
|
|
|
|
|
|
// export enum LoginState {
|
|
|
|
// STATE_DISABLED = 0,
|
|
|
|
// STATE_VALIDATED = 1,
|
|
|
|
// STATE_2FA_AUTHENTICATED = 1,
|
|
|
|
// }
|