@hestia-earth/api 0.24.45 → 0.24.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -167,11 +167,14 @@ export declare const analysesFolder = "analyses";
|
|
|
167
167
|
export declare const glossaryFolder = "glossary";
|
|
168
168
|
export declare const termFolder = "term";
|
|
169
169
|
export declare const reconciliationFolder = "reconciliation";
|
|
170
|
+
export declare const isAnalysis: (path: string) => boolean;
|
|
170
171
|
export declare const isReconciliation: (path: string) => boolean;
|
|
171
172
|
export declare const isGlossary: (path: string) => boolean;
|
|
172
173
|
export declare const isTerm: (path: string) => boolean;
|
|
173
174
|
export declare const aggregationFolder = "aggregation";
|
|
174
175
|
export declare const isAggregation: (path: string) => boolean;
|
|
176
|
+
export type adminFolder = typeof termFolder | typeof analysesFolder | typeof aggregationFolder | typeof reconciliationFolder;
|
|
177
|
+
export declare const isAdminFolder: (path: string) => boolean;
|
|
175
178
|
export declare const isFolderUpload: (path: string, termsOnly?: boolean) => boolean;
|
|
176
179
|
export declare const userFolder: (user: User) => any;
|
|
177
180
|
export declare const isOwner: (file: Partial<File>, user: User) => boolean;
|
|
@@ -25,8 +25,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
25
25
|
};
|
|
26
26
|
var _a;
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.
|
|
29
|
-
exports.canCommitHestiaData = exports.canEditComment = exports.isDraft = exports.canFeedback = exports.canSubmit = void 0;
|
|
28
|
+
exports.validatedStatuses = exports.canRemove = exports.isAssigned = exports.isAuthorized = exports.isOwner = exports.userFolder = exports.isFolderUpload = exports.isAdminFolder = exports.isAggregation = exports.aggregationFolder = exports.isTerm = exports.isGlossary = exports.isReconciliation = exports.isAnalysis = exports.reconciliationFolder = exports.termFolder = exports.glossaryFolder = exports.analysesFolder = exports.filenameFromPath = exports.rootFolderFromPath = exports.folderFromPath = exports.normalizeFolder = exports.isFilepathValid = exports.isFilenameValid = exports.canUploadFolderFile = exports.canUseFolder = exports.replaceInvalidChars = exports.validPathChars = exports.filenameWithoutExt = exports.fileToExt = exports.isSupportedExt = exports.fileExt = exports.filepathSearch = exports.filenameSearch = exports.File = exports.FilePipelineError = exports.FilePipelineProgress = exports.FilePipelineStatus = exports.FileError = exports.FileStatus = exports.FileProgress = exports.FileFindFields = exports.HestiaExtensions = exports.finalFormatExtensions = exports.maxFileSizeByFile = exports.SupportedExtensions = exports.maxFileSize = exports.maxFileSizeMb = exports.sizeInMb = exports.mb = void 0;
|
|
29
|
+
exports.canCommitHestiaData = exports.canEditComment = exports.isDraft = exports.canFeedback = exports.canSubmit = exports.isValidated = exports.canValidate = void 0;
|
|
30
30
|
var model_base_1 = require("../../db/model.base");
|
|
31
31
|
var model_1 = require("../../users/model/model");
|
|
32
32
|
exports.mb = 1048576;
|
|
@@ -240,6 +240,8 @@ exports.analysesFolder = 'analyses';
|
|
|
240
240
|
exports.glossaryFolder = 'glossary';
|
|
241
241
|
exports.termFolder = 'term';
|
|
242
242
|
exports.reconciliationFolder = 'reconciliation';
|
|
243
|
+
var isAnalysis = function (path) { return (0, exports.rootFolderFromPath)(path) === exports.analysesFolder; };
|
|
244
|
+
exports.isAnalysis = isAnalysis;
|
|
243
245
|
var isReconciliation = function (path) { return (0, exports.rootFolderFromPath)(path) === exports.reconciliationFolder; };
|
|
244
246
|
exports.isReconciliation = isReconciliation;
|
|
245
247
|
var isGlossary = function (path) { return (0, exports.rootFolderFromPath)(path) === exports.glossaryFolder; };
|
|
@@ -249,6 +251,8 @@ exports.isTerm = isTerm;
|
|
|
249
251
|
exports.aggregationFolder = 'aggregation';
|
|
250
252
|
var isAggregation = function (path) { return (0, exports.rootFolderFromPath)(path) === exports.aggregationFolder; };
|
|
251
253
|
exports.isAggregation = isAggregation;
|
|
254
|
+
var isAdminFolder = function (path) { return [exports.isTerm, exports.isAnalysis, exports.isAggregation, exports.isReconciliation].some(function (f) { return f(path); }); };
|
|
255
|
+
exports.isAdminFolder = isAdminFolder;
|
|
252
256
|
var isFolderUpload = function (path, termsOnly) {
|
|
253
257
|
if (termsOnly === void 0) { termsOnly = false; }
|
|
254
258
|
return __spreadArray([exports.isGlossary, exports.isTerm], (termsOnly ? [] : [exports.isAggregation, exports.isReconciliation]), true).some(function (f) { return f(path); });
|