mirror of
https://github.com/harivansh-afk/betterNAS.git
synced 2026-04-16 15:02:35 +00:00
Make control-plane the real mount authority
Split node enrollment from export sync and issue Finder-compatible DAV credentials so the stack proves the real backend seam before any web UI consumes it.
This commit is contained in:
parent
5bc24fa99d
commit
b5f8ea9c52
28 changed files with 1345 additions and 423 deletions
|
|
@ -1,6 +1,7 @@
|
|||
export const FOUNDATION_API_ROUTES = {
|
||||
registerNode: "/api/v1/nodes/register",
|
||||
nodeHeartbeat: "/api/v1/nodes/:nodeId/heartbeat",
|
||||
nodeExports: "/api/v1/nodes/:nodeId/exports",
|
||||
listExports: "/api/v1/exports",
|
||||
issueMountProfile: "/api/v1/mount-profiles/issue",
|
||||
issueCloudProfile: "/api/v1/cloud-profiles/issue",
|
||||
|
|
@ -15,7 +16,7 @@ export type NasNodeStatus = "online" | "offline" | "degraded";
|
|||
export type StorageAccessProtocol = "webdav";
|
||||
export type AccessMode = "mount" | "cloud";
|
||||
export type AccessPrincipalType = "user" | "device";
|
||||
export type MountCredentialMode = "session-token" | "app-password";
|
||||
export type MountCredentialMode = "basic-auth";
|
||||
export type CloudProvider = "nextcloud";
|
||||
|
||||
export interface NasNode {
|
||||
|
|
@ -56,7 +57,14 @@ export interface MountProfile {
|
|||
displayName: string;
|
||||
mountUrl: string;
|
||||
readonly: boolean;
|
||||
credentialMode: MountCredentialMode;
|
||||
credential: MountCredential;
|
||||
}
|
||||
|
||||
export interface MountCredential {
|
||||
mode: MountCredentialMode;
|
||||
username: string;
|
||||
password: string;
|
||||
expiresAt: string;
|
||||
}
|
||||
|
||||
export interface CloudProfile {
|
||||
|
|
@ -82,6 +90,9 @@ export interface NodeRegistrationRequest {
|
|||
agentVersion: string;
|
||||
directAddress: string | null;
|
||||
relayAddress: string | null;
|
||||
}
|
||||
|
||||
export interface NodeExportsRequest {
|
||||
exports: StorageExportInput[];
|
||||
}
|
||||
|
||||
|
|
@ -92,8 +103,6 @@ export interface NodeHeartbeatRequest {
|
|||
}
|
||||
|
||||
export interface MountProfileRequest {
|
||||
userId: string;
|
||||
deviceId: string;
|
||||
exportId: string;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue