headplane/app/types/Machine.ts

36 lines
683 B
TypeScript
Raw Normal View History

2025-06-09 17:48:55 -04:00
import type { PreAuthKey } from './PreAuthKey';
2024-12-31 10:30:14 +05:30
import type { User } from './User';
2024-03-25 18:47:15 -04:00
export interface Machine {
2024-12-31 10:30:14 +05:30
id: string;
machineKey: string;
nodeKey: string;
discoKey: string;
ipAddresses: string[];
name: string;
2024-03-25 18:47:15 -04:00
2024-12-31 10:30:14 +05:30
user: User;
lastSeen: string;
2025-04-18 14:40:56 -04:00
expiry: string | null;
2024-03-25 18:47:15 -04:00
2025-06-09 17:48:55 -04:00
preAuthKey?: PreAuthKey;
2024-03-25 18:47:15 -04:00
2024-12-31 10:30:14 +05:30
createdAt: string;
registerMethod:
| 'REGISTER_METHOD_UNSPECIFIED'
| 'REGISTER_METHOD_AUTH_KEY'
| 'REGISTER_METHOD_CLI'
| 'REGISTER_METHOD_OIDC';
2024-03-25 18:47:15 -04:00
2024-12-31 10:30:14 +05:30
forcedTags: string[];
invalidTags: string[];
validTags: string[];
givenName: string;
online: boolean;
2025-05-16 11:05:20 -04:00
// Added in Headscale 0.26+
approvedRoutes: string[];
availableRoutes: string[];
subnetRoutes: string[];
2024-03-25 18:47:15 -04:00
}