"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WebServices = void 0;
var rest_webservice_1 = require("./rest.webservice");
var changes_webservice_1 = require("./changes.webservice");
var storage_webservice_1 = require("./storage.webservice");
var WebServices = (function () {
    function WebServices(restController, rulesController, updateRuleController, securityController, databaseController, authController, storageController, authAdapter, databaseAdapter, filesAdapter, options) {
        this.restController = restController;
        this.rulesController = rulesController;
        this.updateRuleController = updateRuleController;
        this.securityController = securityController;
        this.databaseController = databaseController;
        this.authController = authController;
        this.storageController = storageController;
        this.authAdapter = authAdapter;
        this.databaseAdapter = databaseAdapter;
        this.filesAdapter = filesAdapter;
        this.options = options;
    }
    WebServices.prototype.storage = function (prefix) {
        if (prefix === void 0) { prefix = '/'; }
        var storageWebservice = new storage_webservice_1.StorageWebservice();
        return {
            fileV1Api: storageWebservice.getFileStorageV1(prefix, this.restController, this.securityController, this.databaseController, this.authController, this.storageController, this.databaseAdapter, this.filesAdapter, this.options),
            fileApi: storageWebservice.getFileFromStorage(prefix, this.restController, this.securityController, this.databaseController, this.authController, this.storageController, this.databaseAdapter, this.filesAdapter, this.options),
            fileV2Api: storageWebservice.getFileFromStorageV2(prefix, this.restController, this.securityController, this.databaseController, this.authController, this.storageController, this.databaseAdapter, this.filesAdapter, this.options),
            fileThumbnailApi: storageWebservice.geThumbnailFromStorage(prefix, this.restController, this.securityController, this.databaseController, this.authController, this.storageController, this.databaseAdapter, this.filesAdapter, this.options),
            fileThumbnailV2Api: storageWebservice.geThumbnailFromStorageV2(prefix, this.restController, this.securityController, this.databaseController, this.authController, this.storageController, this.databaseAdapter, this.filesAdapter, this.options),
            fileListApi: storageWebservice.getFilesFromStorage(prefix, this.restController, this.securityController, this.databaseController, this.authController, this.storageController, this.databaseAdapter, this.filesAdapter, this.options),
            fileListV2Api: storageWebservice.getFilesFromStorageV2(prefix, this.restController, this.securityController, this.databaseController, this.authController, this.storageController, this.databaseAdapter, this.filesAdapter, this.options),
            fileUploadApi: storageWebservice.uploadMultiPartFile(prefix, this.restController, this.securityController, this.databaseController, this.authController, this.storageController, this.databaseAdapter, this.filesAdapter, this.options),
            fileUploadV2Api: storageWebservice.uploadMultiPartFileV2(prefix, this.restController, this.securityController, this.databaseController, this.authController, this.storageController, this.databaseAdapter, this.filesAdapter, this.options),
            getUploadFileV2: storageWebservice.getUploadFileV2(prefix),
        };
    };
    WebServices.prototype.realtime = function (config, prefix) {
        if (prefix === void 0) { prefix = '/'; }
        var changesWebService = new changes_webservice_1.ChangesWebservice();
        return {
            changes: changesWebService.changesV2(config, prefix, this.databaseController, this.securityController, this.databaseAdapter)
        };
    };
    WebServices.prototype.rest = function (prefix) {
        if (prefix === void 0) { prefix = '/'; }
        var restWebService = new rest_webservice_1.RestWebservice();
        return {
            rules: restWebService.rulesV2(prefix, this.securityController, this.restController, this.rulesController, this.authController, this.updateRuleController, this.databaseController, this.storageController, this.authAdapter, this.filesAdapter, this.databaseAdapter, this.options),
            jwk: restWebService.authJwk(this.options),
        };
    };
    return WebServices;
}());
exports.WebServices = WebServices;
