feat: normalize node tags before leaving the api

This commit is contained in:
Aarnav Tale
2026-01-24 12:18:43 -05:00
committed by Paul Kronenwetter
parent 5777a5f509
commit 696e08dbcc
9 changed files with 1039 additions and 1082 deletions
+25 -28
View File
@@ -1,36 +1,33 @@
import type { PreAuthKey } from './PreAuthKey';
import type { User } from './User';
import type { PreAuthKey } from "./PreAuthKey";
import type { User } from "./User";
export interface Machine {
id: string;
machineKey: string;
nodeKey: string;
discoKey: string;
ipAddresses: string[];
name: string;
id: string;
machineKey: string;
nodeKey: string;
discoKey: string;
ipAddresses: string[];
name: string;
user: User;
lastSeen: string;
expiry: string | null;
user: User;
lastSeen: string;
expiry: string | null;
preAuthKey?: PreAuthKey;
preAuthKey?: PreAuthKey;
createdAt: string;
registerMethod:
| 'REGISTER_METHOD_UNSPECIFIED'
| 'REGISTER_METHOD_AUTH_KEY'
| 'REGISTER_METHOD_CLI'
| 'REGISTER_METHOD_OIDC';
createdAt: string;
registerMethod:
| "REGISTER_METHOD_UNSPECIFIED"
| "REGISTER_METHOD_AUTH_KEY"
| "REGISTER_METHOD_CLI"
| "REGISTER_METHOD_OIDC";
forcedTags: string[];
invalidTags: string[];
validTags: string[];
tags: string[];
givenName: string;
online: boolean;
tags: string[];
givenName: string;
online: boolean;
// Added in Headscale 0.26+
approvedRoutes: string[];
availableRoutes: string[];
subnetRoutes: string[];
// Added in Headscale 0.26+
approvedRoutes: string[];
availableRoutes: string[];
subnetRoutes: string[];
}