feat: add machine data
This commit is contained in:
parent
b38eb0885f
commit
abaf71636e
10 changed files with 246 additions and 32 deletions
28
app/types/Machine.ts
Normal file
28
app/types/Machine.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import type { User } from './User'
|
||||
|
||||
export type Machine = {
|
||||
id: string;
|
||||
machineKey: string;
|
||||
nodeKey: string;
|
||||
discoKey: string;
|
||||
ipAddresses: string[];
|
||||
name: string;
|
||||
|
||||
user: User;
|
||||
lastSeen: Date;
|
||||
expiry: Date;
|
||||
|
||||
preAuthKey?: unknown; // TODO
|
||||
|
||||
createdAt: Date;
|
||||
registerMethod: 'REGISTER_METHOD_UNSPECIFIED'
|
||||
| 'REGISTER_METHOD_AUTH_KEY'
|
||||
| 'REGISTER_METHOD_CLI'
|
||||
| 'REGISTER_METHOD_OIDC';
|
||||
|
||||
forcedTags: string[];
|
||||
invalidTags: string[];
|
||||
validTags: string[];
|
||||
givenName: string;
|
||||
online: boolean;
|
||||
}
|
||||
13
app/types/Route.ts
Normal file
13
app/types/Route.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import type { Machine } from './Machine'
|
||||
|
||||
export type Route = {
|
||||
id: string;
|
||||
node: Machine;
|
||||
prefix: string;
|
||||
advertised: boolean;
|
||||
enabled: boolean;
|
||||
isPrimary: boolean;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
deletedAt: Date;
|
||||
}
|
||||
5
app/types/User.ts
Normal file
5
app/types/User.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export type User = {
|
||||
id: string;
|
||||
name: string;
|
||||
createdAt: Date;
|
||||
}
|
||||
3
app/types/index.ts
Normal file
3
app/types/index.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export * from './Machine'
|
||||
export * from './Route'
|
||||
export * from './User'
|
||||
Loading…
Add table
Add a link
Reference in a new issue