@sync-in/server
Version:
The secure, open-source platform for file storage, sharing, collaboration, and sync
104 lines (103 loc) • 2.99 kB
JavaScript
/*
* Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
* This file is part of Sync-in | The open source file sync and share solution
* See the LICENSE file for licensing details
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: Object.getOwnPropertyDescriptor(all, name).get
});
}
_export(exports, {
get SPACE_ALIAS () {
return SPACE_ALIAS;
},
get SPACE_ALL_OPERATIONS () {
return SPACE_ALL_OPERATIONS;
},
get SPACE_HTTP_PERMISSION () {
return SPACE_HTTP_PERMISSION;
},
get SPACE_MAX_DISABLED_DAYS () {
return SPACE_MAX_DISABLED_DAYS;
},
get SPACE_OPERATION () {
return SPACE_OPERATION;
},
get SPACE_PERMS_SEP () {
return SPACE_PERMS_SEP;
},
get SPACE_PERSONAL () {
return SPACE_PERSONAL;
},
get SPACE_REPOSITORY () {
return SPACE_REPOSITORY;
},
get SPACE_ROLE () {
return SPACE_ROLE;
},
get SPACE_SHARES () {
return SPACE_SHARES;
}
});
const SPACE_MAX_DISABLED_DAYS = 30 //days
;
const SPACE_PERMS_SEP = ':';
var SPACE_OPERATION = /*#__PURE__*/ function(SPACE_OPERATION) {
SPACE_OPERATION["ADD"] = "a";
SPACE_OPERATION["MODIFY"] = "m";
SPACE_OPERATION["DELETE"] = "d";
SPACE_OPERATION["SHARE_INSIDE"] = "si";
SPACE_OPERATION["SHARE_OUTSIDE"] = "so"; // Outside a space (create a share)
return SPACE_OPERATION;
}({});
var SPACE_REPOSITORY = /*#__PURE__*/ function(SPACE_REPOSITORY) {
SPACE_REPOSITORY["FILES"] = "files";
SPACE_REPOSITORY["TRASH"] = "trash";
SPACE_REPOSITORY["SHARES"] = "shares";
return SPACE_REPOSITORY;
}({});
var SPACE_ALIAS = /*#__PURE__*/ function(SPACE_ALIAS) {
SPACE_ALIAS["PERSONAL"] = "personal";
SPACE_ALIAS["SPACES"] = "spaces";
SPACE_ALIAS["SHARES"] = "shares";
SPACE_ALIAS["TRASH"] = "trash";
return SPACE_ALIAS;
}({});
var SPACE_ROLE = /*#__PURE__*/ function(SPACE_ROLE) {
SPACE_ROLE[SPACE_ROLE["IS_MEMBER"] = 0] = "IS_MEMBER";
SPACE_ROLE[SPACE_ROLE["IS_MANAGER"] = 1] = "IS_MANAGER";
return SPACE_ROLE;
}({});
const SPACE_ALL_OPERATIONS = Object.values(SPACE_OPERATION).sort().join(SPACE_PERMS_SEP);
const SPACE_HTTP_PERMISSION = {
GET: null,
POST: "a",
PUT: "a",
MKCOL: "a",
PATCH: "m",
PROPPATCH: "m",
DELETE: "d",
MOVE: "d",
COPY: null,
LOCK: "m",
UNLOCK: "m"
};
const SPACE_PERSONAL = {
id: 0,
alias: "personal",
name: "personal",
permissions: '' // by default no rights are given on the space unless a resource is targeted
};
const SPACE_SHARES = {
// this space lists the shares
id: 0,
alias: "shares",
name: "shares",
permissions: '' // by default no rights are given on the share unless a resource is targeted
};
//# sourceMappingURL=spaces.js.map