-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTypes.ts
126 lines (108 loc) · 2.07 KB
/
Types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
import type { ReactNode } from "react";
export interface IContextMenuOption {
label: string;
icon: ReactNode;
onClick: () => void;
}
export interface IRectDimensions {
width: number;
height: number;
}
export interface ICircleDimensions {
radius: number;
}
export interface IReservation {
isReserved: boolean;
by?: string;
}
export interface IObject {
id: string;
coords: {
x: number;
y: number;
};
type?: ObjectMode;
rotation: number;
dimensions: IRectDimensions | ICircleDimensions;
reservation?: IReservation;
}
export type ManagableObject = Omit<IObject, "id" | "coords">;
export interface IManagedObjectContext {
object?: Partial<IObject>;
manageObject?: (object: Partial<ManagableObject>) => void;
}
export interface ISeatObjectsContext {
objects?: IObject[];
addObject?: (object: IObject) => void;
}
export interface WeatherForecast {
latitude: number;
longitude: number;
generationtime_ms: number;
utc_offset_seconds: number;
timezone: string;
timezone_abbreviation: string;
elevation: number;
daily_units: DailyUnits;
daily: Daily;
}
export interface Daily {
time: Date[];
weather_code: number[];
temperature_2m_max: number[];
temperature_2m_min: number[];
sunrise: string[];
sunset: string[];
}
export interface ISingleWeather {
sunrise: string;
sunset: string;
temp_max: number;
temp_min: number;
time: Date;
weather_code: number;
}
export interface IAppCalendarEvent {
id?: number;
start: Date;
end: Date;
info: string;
}
interface ICategory {
id: number;
name: string;
}
interface IAuthor {
id: string;
name: string;
}
export interface IBasicNews {
id: number;
author: IAuthor;
image: string;
title: string;
categories: ICategory[];
}
export interface ICardNews {
id: bigint;
title: string;
description: string;
image: string;
authorId: string;
tags: {
id: bigint;
name: string;
}[];
author: {
id: string;
name: string;
};
}
[];
type DailyUnits = {
[Property in keyof ISingleWeather]: string;
};
export enum ObjectMode {
RECT,
CIRCLE,
}