"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const sdk_1 = require("./sdk");
var Content;
(function (Content) {
    function getEntry(entryId, query) {
        return sdk_1.getClient()
            .getEntries(Object.assign({ 'sys.id': entryId }, query))
            .then((res) => {
            if (res.total > 0) {
                return res.items[0];
            }
            throw new Error(`Entry with ID: ${entryId} not found.`);
        });
    }
    Content.getEntry = getEntry;
    function getEntries(query) {
        return sdk_1.getClient().getEntries(query);
    }
    Content.getEntries = getEntries;
    function getSpace() {
        return sdk_1.getClient().getSpace();
    }
    Content.getSpace = getSpace;
    function getAsset(id) {
        return sdk_1.getClient().getAsset(id);
    }
    Content.getAsset = getAsset;
    function getAssets(query) {
        return sdk_1.getClient().getAssets(query);
    }
    Content.getAssets = getAssets;
})(Content = exports.Content || (exports.Content = {}));
//# sourceMappingURL=index.js.map