growthbook
Version:
The GrowthBook command-line interface (CLI) for working with the GrowthBook A/B testing, feature flagging, and experimentation platform
22 lines (21 loc) • 820 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataSourcesRepository = void 0;
const base_repository_1 = require("./base.repository");
const api_1 = require("../generated/api");
class DataSourcesRepository extends base_repository_1.BaseRepository {
async getDataSource(id) {
const dataSourcesApi = this.api();
const result = await dataSourcesApi.getDataSource(id);
return result.data.dataSource;
}
async listDataSources(limit, offset, projectId) {
const dataSourcesApi = this.api();
const result = await dataSourcesApi.listDataSources(limit, offset, projectId);
return result.data;
}
api() {
return new api_1.DataSourcesApi(this.apiConfig());
}
}
exports.DataSourcesRepository = DataSourcesRepository;