Add Northflank connection support

- Introduced Northflank as a new app connection option, including API token authentication.
- Implemented connection schemas, validation, and service functions for Northflank.
- Updated API documentation to include Northflank endpoints and integration instructions.
- Added frontend components for creating and managing Northflank connections.
This commit is contained in:
Your Name
2025-10-21 21:09:09 -03:00
parent 80aa473bca
commit 7d4e7ac44a
43 changed files with 647 additions and 4 deletions
@@ -0,0 +1,31 @@
import { logger } from "@app/lib/logger";
import { OrgServiceActor } from "@app/lib/types";
import { AppConnection } from "../app-connection-enums";
import { listProjects as getNorthflankProjects } from "./northflank-connection-fns";
import { TNorthflankConnection } from "./northflank-connection-types";
type TGetAppConnectionFunc = (
app: AppConnection,
connectionId: string,
actor: OrgServiceActor
) => Promise<TNorthflankConnection>;
export const northflankConnectionService = (getAppConnection: TGetAppConnectionFunc) => {
const listProjects = async (connectionId: string, actor: OrgServiceActor) => {
const appConnection = await getAppConnection(AppConnection.Northflank, connectionId, actor);
try {
const projects = await getNorthflankProjects(appConnection);
return projects;
} catch (error) {
logger.error(error, "Failed to establish connection with Northflank");
return [];
}
};
return {
listProjects
};
};