"use client"
const require_state = require('./state-CTITyT0R.js');
require('./const-CvdZO0FN.js');
const require_version = require('./version-B9s8yne-.js');

//#region recce-source/js/src/lib/api/rowcount.ts
async function submitRowCountDiff(params, options, client = require_state.axiosClient) {
	return await require_state.submitRun("row_count_diff", params, options, client);
}

//#endregion
//#region recce-source/js/src/lib/api/models.ts
async function fetchModelRowCount(modelName, client = require_state.axiosClient) {
	return (await client.get(`/api/models/${modelName}/row_count`)).data;
}
async function queryModelRowCount(modelName, client = require_state.axiosClient) {
	const { result } = await queryRowCount([modelName], client);
	return result[modelName];
}
async function queryRowCount(modelNames, client = require_state.axiosClient) {
	if (modelNames.length === 0) throw new Error("No model names provided");
	const { run_id } = await submitRowCountDiff({ node_names: modelNames }, { nowait: true }, client);
	return {
		runId: run_id,
		result: (await require_state.waitRun(run_id, void 0, client)).result
	};
}

//#endregion
//#region recce-source/js/src/lib/api/profile.ts
async function submitProfileDiff(params, options, client = require_state.axiosClient) {
	return await require_state.submitRun("profile_diff", params, options, client);
}

//#endregion
//#region recce-source/js/src/lib/api/valuediff.ts
async function submitValueDiff(params, options, client = require_state.axiosClient) {
	return await require_state.submitRun("value_diff", params, options, client);
}
async function submitValueDiffDetail(params, options, client = require_state.axiosClient) {
	return await require_state.submitRun("value_diff_detail", params, options, client);
}

//#endregion
exports.aggregateRuns = require_state.aggregateRuns;
exports.axiosClient = require_state.axiosClient;
exports.cancelRun = require_state.cancelRun;
exports.connectToCloud = require_version.connectToCloud;
exports.createCheckByRun = require_version.createCheckByRun;
exports.createLineageDiffCheck = require_version.createLineageDiffCheck;
exports.createSchemaDiffCheck = require_version.createSchemaDiffCheck;
exports.createSimpleCheck = require_version.createSimpleCheck;
exports.deleteCheck = require_version.deleteCheck;
exports.exportState = require_state.exportState;
exports.fetchGitHubAvatar = require_version.fetchGitHubAvatar;
exports.fetchModelRowCount = fetchModelRowCount;
exports.fetchUser = require_version.fetchUser;
exports.getCheck = require_version.getCheck;
exports.getCll = require_version.getCll;
exports.getLineage = require_state.getLineage;
exports.getLineageDiff = require_state.getLineageDiff;
exports.getLineageWithError = require_state.getLineageWithError;
exports.getModelInfo = require_state.getModelInfo;
exports.getRun = require_state.getRun;
exports.getServerFlag = require_state.getServerFlag;
exports.getServerInfo = require_state.getServerInfo;
exports.getVersion = require_version.getVersion;
exports.importState = require_state.importState;
exports.isStateSyncing = require_state.isStateSyncing;
exports.listChecks = require_version.listChecks;
exports.listRuns = require_state.listRuns;
exports.localStorageKeys = require_version.localStorageKeys;
exports.markAsPresetCheck = require_version.markAsPresetCheck;
exports.markOnboardingCompleted = require_state.markOnboardingCompleted;
exports.markRelaunchHintCompleted = require_state.markRelaunchHintCompleted;
exports.queryModelRowCount = queryModelRowCount;
exports.queryRowCount = queryRowCount;
exports.reactQueryClient = require_state.reactQueryClient;
exports.rename = require_state.rename;
exports.reorderChecks = require_version.reorderChecks;
exports.saveAs = require_state.saveAs;
exports.searchRuns = require_state.searchRuns;
exports.select = require_version.select;
exports.sessionStorageKeys = require_version.sessionStorageKeys;
exports.shareState = require_state.shareState;
exports.submitProfileDiff = submitProfileDiff;
exports.submitQuery = require_version.submitQuery;
exports.submitQueryBase = require_version.submitQueryBase;
exports.submitQueryDiff = require_version.submitQueryDiff;
exports.submitRowCountDiff = submitRowCountDiff;
exports.submitRun = require_state.submitRun;
exports.submitRunFromCheck = require_state.submitRunFromCheck;
exports.submitValueDiff = submitValueDiff;
exports.submitValueDiffDetail = submitValueDiffDetail;
exports.syncState = require_state.syncState;
exports.updateCheck = require_version.updateCheck;
exports.useChecks = require_version.useChecks;
exports.useVersionNumber = require_version.useVersionNumber;
exports.waitRun = require_state.waitRun;
//# sourceMappingURL=api.js.map