forest-cli
Version:
The Lumberjacks' toolbelt is the Forest CLI which makes easy to manage your back office application directly from the terminal.
35 lines • 970 B
TypeScript
/**
* Format an array of full role objects into a wide CSV string.
* @param {Array<{ id: string, name: string, permissions: { environments: Array } }>} roles
* @param {string|number} envId
* @returns {string}
*/
export function formatWide(roles: Array<{
id: string;
name: string;
permissions: {
environments: any[];
};
}>, envId: string | number): string;
/**
* Parse a wide CSV string back into a structured desired-state array.
* @param {string} csvContent
* @param {string|number} envId
*/
export function parseWide(csvContent: string, envId: string | number): {
name: any;
enabled: boolean;
envId: string;
collections: any[];
}[];
/**
* Compute the diff between the current state and the desired state.
* @param {Array} current
* @param {Array} parsed
*/
export function computeDiff(current: any[], parsed: any[]): {
roleName: any;
roleId: any;
ops: any[];
}[];
//# sourceMappingURL=roles-csv.d.ts.map