"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchApplicationStorePackageGoods = exports.fetchApplicationStoreProjectGoods = exports.offlineFromStore = exports.commitToStore = exports.addVariableGoods = exports.addPackageGoods = exports.addPageGoods = exports.fetchVariableResources = exports.fetchPackageResources = exports.fetchProjectResources = void 0;
const api_agent_1 = __importDefault(require("@/utils/api-agent"));
const fetchProjectResources = (params) => new Promise((resolve) => {
    api_agent_1.default.post('/stores/project-searchs', params, (rs) => {
        resolve(rs);
    });
});
exports.fetchProjectResources = fetchProjectResources;
const fetchPackageResources = (params) => new Promise((resolve) => {
    api_agent_1.default.post('/stores/package-searchs', params, (rs) => {
        resolve(rs);
    });
});
exports.fetchPackageResources = fetchPackageResources;
const fetchVariableResources = (params) => new Promise((resolve) => {
    api_agent_1.default.post('/stores/goods-searchs', params, (rs) => {
        resolve(rs);
    });
});
exports.fetchVariableResources = fetchVariableResources;
const addPageGoods = (params) => new Promise((resolve) => {
    api_agent_1.default.post('/stores/pages', params, (rs) => {
        resolve(rs);
    });
});
exports.addPageGoods = addPageGoods;
const addPackageGoods = (params) => new Promise((resolve) => {
    api_agent_1.default.post('/stores/packages', params, (rs) => {
        resolve(rs);
    });
});
exports.addPackageGoods = addPackageGoods;
const addVariableGoods = (params) => new Promise((resolve) => {
    api_agent_1.default.post('/stores/items', params, (rs) => {
        resolve(rs);
    });
});
exports.addVariableGoods = addVariableGoods;
const commitToStore = (params) => new Promise((resolve) => {
    api_agent_1.default.post('/stores/goods', params, (rs) => {
        resolve(rs);
    });
});
exports.commitToStore = commitToStore;
const offlineFromStore = (params) => new Promise((resolve) => {
    api_agent_1.default.put('/stores/goods-offline', params, (rs) => {
        resolve(rs);
    });
});
exports.offlineFromStore = offlineFromStore;
const fetchApplicationStoreProjectGoods = (params) => new Promise((resolve) => {
    api_agent_1.default.get('/applications/project-goods-searchs', params, (rs) => {
        resolve(rs);
    });
});
exports.fetchApplicationStoreProjectGoods = fetchApplicationStoreProjectGoods;
const fetchApplicationStorePackageGoods = (params) => new Promise((resolve) => {
    api_agent_1.default.get('/applications/package-goods-searchs', params, (rs) => {
        resolve(rs);
    });
});
exports.fetchApplicationStorePackageGoods = fetchApplicationStorePackageGoods;
