feat: internal types
All checks were successful
Lint Codebase / lint (push) Successful in 59s

This commit is contained in:
TheClashFruit 2024-09-01 12:34:33 +02:00
parent ada5cdd47c
commit dbbefde41e
Signed by: TheClashFruit
GPG key ID: 09BB24C34C2F3204
8 changed files with 131 additions and 1 deletions

12
interfaces/company.ts Normal file
View file

@ -0,0 +1,12 @@
import { User } from './user';
export interface Company {
id: BigInt;
owners: User[];
name: string;
slogan: string;
logo: string;
}

21
interfaces/gallery.ts Normal file
View file

@ -0,0 +1,21 @@
import { Point3D } from './spacial_data';
import { User } from './user';
export interface AspectRatio {
w: number;
h: number;
}
export interface Image {
id: BigInt;
by: User;
name: string;
alt: string;
location?: Point3D;
type: 'image/jpeg' | 'image/png';
aspectRatio: AspectRatio;
}

30
interfaces/government.ts Normal file
View file

@ -0,0 +1,30 @@
import { Point2D } from './spacial_data';
import { User } from './user';
export enum GovernmentLevel {
Highest,
High,
Regular,
Low,
Lowest
}
export interface GovernmentRole {
id: BigInt;
level: GovernmentLevel;
name: string;
}
export interface GovernmentUser extends User {
role: GovernmentRole;
ordering: number;
}
export interface Government {
id: BigInt;
parliament: GovernmentUser[];
parliamentBulding: Point2D;
}

View file

@ -1 +1,8 @@
// export type * from './user';
export type * from './user';
export type * from './nation';
export type * from './government';
export type * from './company';
export type * from './gallery';
export type * from './spacial_data';
export type * from './minecraft';

21
interfaces/minecraft.ts Normal file
View file

@ -0,0 +1,21 @@
import { Point3D } from './spacial_data';
export enum MinecraftDimension {
Overworld = 'minecraft:overworld',
Nether = 'minecraft:the_nether',
End = 'minecraft:the_end',
}
export interface MinecraftPosition extends Point3D {
yaw: number;
pitch: number;
dimension: MinecraftDimension;
}
export interface MinecraftPlayer {
uuid: string;
username: string;
position: MinecraftPosition;
}

15
interfaces/nation.ts Normal file
View file

@ -0,0 +1,15 @@
import { Company } from './company';
import { Government } from './government';
import { Point2D } from './spacial_data';
export interface Nation {
id: BigInt;
code: string;
name: string;
government: Government;
companies: Company[];
borderPoints: Point2D[];
}

View file

@ -0,0 +1,8 @@
export interface Point2D {
x: number;
z: number;
}
export interface Point3D extends Point2D {
y: number;
}

View file

@ -0,0 +1,16 @@
export interface User {
id: BigInt;
username: string;
displayName: string;
email?: string;
avatar?: string;
banner?: string;
accentColor?: number;
permissions: number;
badges: number;
}