This is a Node.js client for lakeFS. It is generated from the api spec using openapi-generator
npm install lakefs-ts
import {Branch, getConfigFromEnv, QueryParams} from "../dist";
async function main() {
const config = getConfigFromEnv();
const branch = new Branch(config);
const params: QueryParams = {
amount: 100,
}
const branches = await branch.getBranches(params);
console.log("branches", branches)
}
main().catch(err => {
console.log("err", err)
process.exit(1);
})
- Use a client directly
import {newClient, getConfigFromEnv} from "../dist";
const config = getConfigFromEnv();
const client = newClient(config);
// get branches
const branches = await client.getBranches();
// get commits
const commits = await client.getCommits();