UNPKG

@sync-in/server

Version:

The secure, open-source platform for file storage, sharing, collaboration, and sync

95 lines (94 loc) 4.05 kB
/* * 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 }); Object.defineProperty(exports, "CreateOrUpdateLinkDto", { enumerable: true, get: function() { return CreateOrUpdateLinkDto; } }); const _classtransformer = require("class-transformer"); const _classvalidator = require("class-validator"); const _shared = require("../../../common/shared"); const _user = require("../../users/constants/user"); function _ts_decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function _ts_metadata(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } let CreateOrUpdateLinkDto = class CreateOrUpdateLinkDto { }; _ts_decorate([ (0, _classvalidator.IsOptional)(), (0, _classvalidator.IsString)(), _ts_metadata("design:type", String) ], CreateOrUpdateLinkDto.prototype, "uuid", void 0); _ts_decorate([ (0, _classvalidator.IsOptional)(), (0, _classvalidator.IsString)(), _ts_metadata("design:type", String) ], CreateOrUpdateLinkDto.prototype, "name", void 0); _ts_decorate([ (0, _classvalidator.IsOptional)(), (0, _classvalidator.IsString)(), _ts_metadata("design:type", String) ], CreateOrUpdateLinkDto.prototype, "email", void 0); _ts_decorate([ (0, _classvalidator.IsOptional)(), (0, _classvalidator.IsString)(), _ts_metadata("design:type", String) ], CreateOrUpdateLinkDto.prototype, "language", void 0); _ts_decorate([ (0, _classvalidator.IsOptional)(), (0, _classtransformer.Transform)(({ value })=>value || 0), _ts_metadata("design:type", Number) ], CreateOrUpdateLinkDto.prototype, "limitAccess", void 0); _ts_decorate([ (0, _classvalidator.IsOptional)(), (0, _classtransformer.Transform)(({ value })=>value ? (0, _shared.currentDate)(value) : null), (0, _classvalidator.IsDate)(), _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date) ], CreateOrUpdateLinkDto.prototype, "expiresAt", void 0); _ts_decorate([ (0, _classvalidator.IsOptional)(), (0, _classtransformer.Transform)(({ value })=>!!value), (0, _classvalidator.IsBoolean)(), _ts_metadata("design:type", Boolean) ], CreateOrUpdateLinkDto.prototype, "requireAuth", void 0); _ts_decorate([ (0, _classvalidator.IsOptional)(), (0, _classtransformer.Transform)(({ value })=>!!value), (0, _classvalidator.IsBoolean)(), _ts_metadata("design:type", Boolean) ], CreateOrUpdateLinkDto.prototype, "isActive", void 0); _ts_decorate([ (0, _classvalidator.IsOptional)(), (0, _classvalidator.IsString)(), _ts_metadata("design:type", String) ], CreateOrUpdateLinkDto.prototype, "permissions", void 0); _ts_decorate([ (0, _classvalidator.IsOptional)(), (0, _classvalidator.IsString)(), (0, _classvalidator.MinLength)(_user.USER_PASSWORD_MIN_LENGTH), _ts_metadata("design:type", String) ], CreateOrUpdateLinkDto.prototype, "password", void 0); _ts_decorate([ (0, _classvalidator.IsOptional)(), (0, _classvalidator.IsString)(), _ts_metadata("design:type", String) ], CreateOrUpdateLinkDto.prototype, "shareName", void 0); _ts_decorate([ (0, _classvalidator.IsOptional)(), (0, _classvalidator.IsString)(), _ts_metadata("design:type", String) ], CreateOrUpdateLinkDto.prototype, "shareDescription", void 0); //# sourceMappingURL=create-or-update-link.dto.js.map