mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-11 21:28:59 +00:00
Add Northflank sync features and enhance documentation
- Implemented new Northflank sync functionality, including routes for listing secret groups and managing syncs. - Added types and schemas for Northflank projects and secret groups to improve data handling. - Updated frontend components to support Northflank sync configuration and review. - Enhanced API documentation with detailed instructions for Northflank integration and usage. - Included new images and examples in the documentation for better clarity.
This commit is contained in:
@@ -2,8 +2,11 @@ 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";
|
||||
import {
|
||||
listProjects as getNorthflankProjects,
|
||||
listSecretGroups as getNorthflankSecretGroups
|
||||
} from "./northflank-connection-fns";
|
||||
import { TNorthflankConnection, TNorthflankSecretGroup } from "./northflank-connection-types";
|
||||
|
||||
type TGetAppConnectionFunc = (
|
||||
app: AppConnection,
|
||||
@@ -24,7 +27,24 @@ export const northflankConnectionService = (getAppConnection: TGetAppConnectionF
|
||||
}
|
||||
};
|
||||
|
||||
const listSecretGroups = async (
|
||||
connectionId: string,
|
||||
projectId: string,
|
||||
actor: OrgServiceActor
|
||||
): Promise<TNorthflankSecretGroup[]> => {
|
||||
const appConnection = await getAppConnection(AppConnection.Northflank, connectionId, actor);
|
||||
try {
|
||||
const secretGroups = await getNorthflankSecretGroups(appConnection, projectId);
|
||||
|
||||
return secretGroups;
|
||||
} catch (error) {
|
||||
logger.error({ error, connectionId, projectId, actor: actor.type }, "Failed to list Northflank secret groups");
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
listProjects
|
||||
listProjects,
|
||||
listSecretGroups
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user