dl-commons 0.0.2-testing.3 → 0.0.2-testing.30
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.
- package/README.md +0 -91
- package/dist/guards/permission.guard.d.ts +1 -0
- package/dist/guards/permission.guard.js +3 -2
- package/dist/guards/permission.guard.js.map +1 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.js +68 -2
- package/dist/index.js.map +1 -1
- package/dist/models/dtos/commons/crop-area.dto.d.ts +6 -0
- package/dist/models/dtos/commons/crop-area.dto.js +37 -0
- package/dist/models/dtos/commons/crop-area.dto.js.map +1 -0
- package/dist/models/dtos/commons/id.param.d.ts +3 -0
- package/dist/models/dtos/commons/id.param.js +22 -0
- package/dist/models/dtos/commons/id.param.js.map +1 -0
- package/dist/models/enums/attachement-type.enum.d.ts +4 -0
- package/dist/models/enums/attachement-type.enum.js +9 -0
- package/dist/models/enums/attachement-type.enum.js.map +1 -0
- package/dist/models/enums/location-type.enum.d.ts +5 -0
- package/dist/models/enums/location-type.enum.js +10 -0
- package/dist/models/enums/location-type.enum.js.map +1 -0
- package/dist/models/enums/s3.enum.d.ts +11 -0
- package/dist/models/enums/s3.enum.js +17 -0
- package/dist/models/enums/s3.enum.js.map +1 -0
- package/dist/models/enums/user-type.enum.d.ts +7 -0
- package/dist/models/enums/user-type.enum.js +12 -0
- package/dist/models/enums/user-type.enum.js.map +1 -0
- package/dist/models/enums/virtual-address-type.enum.d.ts +14 -0
- package/dist/models/enums/virtual-address-type.enum.js +19 -0
- package/dist/models/enums/virtual-address-type.enum.js.map +1 -0
- package/dist/models/interfaces/archive.interface.d.ts +4 -0
- package/dist/models/interfaces/archive.interface.js +3 -0
- package/dist/models/interfaces/archive.interface.js.map +1 -0
- package/dist/models/interfaces/attachement.interface.d.ts +8 -0
- package/dist/models/interfaces/attachement.interface.js +3 -0
- package/dist/models/interfaces/attachement.interface.js.map +1 -0
- package/dist/models/interfaces/author.interface.d.ts +8 -0
- package/dist/models/interfaces/author.interface.js +3 -0
- package/dist/models/interfaces/author.interface.js.map +1 -0
- package/dist/models/interfaces/crop-area.interface.d.ts +6 -0
- package/dist/models/interfaces/crop-area.interface.js +3 -0
- package/dist/models/interfaces/crop-area.interface.js.map +1 -0
- package/dist/models/interfaces/date-time-range.interface.d.ts +4 -0
- package/dist/models/interfaces/date-time-range.interface.js +3 -0
- package/dist/models/interfaces/date-time-range.interface.js.map +1 -0
- package/dist/models/interfaces/dictionary.interface.d.ts +1 -1
- package/dist/models/interfaces/dl-storage.interface.d.ts +35 -0
- package/dist/models/interfaces/dl-storage.interface.js +7 -0
- package/dist/models/interfaces/dl-storage.interface.js.map +1 -0
- package/dist/models/interfaces/location.interface.d.ts +8 -0
- package/dist/models/interfaces/location.interface.js +3 -0
- package/dist/models/interfaces/location.interface.js.map +1 -0
- package/dist/models/interfaces/physical-address.interface.d.ts +7 -0
- package/dist/models/interfaces/physical-address.interface.js +3 -0
- package/dist/models/interfaces/physical-address.interface.js.map +1 -0
- package/dist/models/interfaces/picture.interface.d.ts +7 -0
- package/dist/models/interfaces/picture.interface.js +3 -0
- package/dist/models/interfaces/picture.interface.js.map +1 -0
- package/dist/models/interfaces/s3.interface.d.ts +46 -0
- package/dist/models/interfaces/s3.interface.js +3 -0
- package/dist/models/interfaces/s3.interface.js.map +1 -0
- package/dist/models/interfaces/user-meta.interface.d.ts +4 -0
- package/dist/models/interfaces/user-meta.interface.js +3 -0
- package/dist/models/interfaces/user-meta.interface.js.map +1 -0
- package/dist/models/interfaces/virtual-address.interface.d.ts +5 -0
- package/dist/models/interfaces/virtual-address.interface.js +3 -0
- package/dist/models/interfaces/virtual-address.interface.js.map +1 -0
- package/dist/models/schemas/base.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/archive.schema.d.ts +16 -0
- package/dist/models/schemas/embedded/archive.schema.js +29 -0
- package/dist/models/schemas/embedded/archive.schema.js.map +1 -0
- package/dist/models/schemas/embedded/attachement.schema.d.ts +20 -0
- package/dist/models/schemas/embedded/attachement.schema.js +36 -0
- package/dist/models/schemas/embedded/attachement.schema.js.map +1 -0
- package/dist/models/schemas/embedded/author.schema.d.ts +19 -0
- package/dist/models/schemas/embedded/author.schema.js +42 -0
- package/dist/models/schemas/embedded/author.schema.js.map +1 -0
- package/dist/models/schemas/embedded/contact.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/crop-area.schema.d.ts +18 -0
- package/dist/models/schemas/embedded/crop-area.schema.js +37 -0
- package/dist/models/schemas/embedded/crop-area.schema.js.map +1 -0
- package/dist/models/schemas/embedded/date-time-range.schema.d.ts +16 -0
- package/dist/models/schemas/embedded/date-time-range.schema.js +29 -0
- package/dist/models/schemas/embedded/date-time-range.schema.js.map +1 -0
- package/dist/models/schemas/embedded/dictionary-embedded.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/group-session.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/group-session.schema.js +1 -1
- package/dist/models/schemas/embedded/i18n.embedded.d.ts +2 -2
- package/dist/models/schemas/embedded/location.schema.d.ts +20 -0
- package/dist/models/schemas/embedded/location.schema.js +36 -0
- package/dist/models/schemas/embedded/location.schema.js.map +1 -0
- package/dist/models/schemas/embedded/person.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/physical-address.schema.d.ts +19 -0
- package/dist/models/schemas/embedded/physical-address.schema.js +38 -0
- package/dist/models/schemas/embedded/physical-address.schema.js.map +1 -0
- package/dist/models/schemas/embedded/picture.schema.d.ts +19 -0
- package/dist/models/schemas/embedded/picture.schema.js +35 -0
- package/dist/models/schemas/embedded/picture.schema.js.map +1 -0
- package/dist/models/schemas/embedded/record.embedded.d.ts +2 -2
- package/dist/models/schemas/embedded/residence.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/s3.schema.d.ts +127 -0
- package/dist/models/schemas/embedded/s3.schema.js +184 -0
- package/dist/models/schemas/embedded/s3.schema.js.map +1 -0
- package/dist/models/schemas/embedded/session-user.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/student-embedded.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/teacher.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/time.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/virtual-address.schema.d.ts +17 -0
- package/dist/models/schemas/embedded/virtual-address.schema.js +30 -0
- package/dist/models/schemas/embedded/virtual-address.schema.js.map +1 -0
- package/dist/models/schemas/identifable.schema.d.ts +2 -2
- package/dist/models/schemas/parent.schema.d.ts +2 -2
- package/dist/models/schemas/session.schema.d.ts +2 -2
- package/dist/services/dictionaries.service.js +14 -4
- package/dist/services/dictionaries.service.js.map +1 -1
- package/dist/services/iam.service.d.ts +15 -0
- package/dist/services/iam.service.js +95 -0
- package/dist/services/iam.service.js.map +1 -0
- package/dist/services/permissions-scanner.service.d.ts +10 -0
- package/dist/services/permissions-scanner.service.js +50 -0
- package/dist/services/permissions-scanner.service.js.map +1 -0
- package/dist/services/sessions.service.d.ts +2 -0
- package/dist/services/sessions.service.js +34 -0
- package/dist/services/sessions.service.js.map +1 -1
- package/dist/services/storage.service.d.ts +18 -0
- package/dist/services/storage.service.js +81 -0
- package/dist/services/storage.service.js.map +1 -0
- package/dist/transformers/common.transformer.d.ts +1 -0
- package/dist/transformers/common.transformer.js +4 -0
- package/dist/transformers/common.transformer.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/helper.utils.d.ts +2 -1
- package/dist/utils/helper.utils.js +17 -1
- package/dist/utils/helper.utils.js.map +1 -1
- package/package.json +1 -1
- package/src/guards/permission.guard.ts +3 -1
- package/src/index.ts +136 -0
- package/src/models/dtos/commons/crop-area.dto.ts +20 -0
- package/src/models/dtos/commons/id.param.ts +7 -0
- package/src/models/enums/attachement-type.enum.ts +4 -0
- package/src/models/enums/location-type.enum.ts +5 -0
- package/src/models/enums/s3.enum.ts +12 -0
- package/src/models/enums/user-type.enum.ts +7 -0
- package/src/models/enums/virtual-address-type.enum.ts +14 -0
- package/src/models/interfaces/archive.interface.ts +4 -0
- package/src/models/interfaces/attachement.interface.ts +9 -0
- package/src/models/interfaces/author.interface.ts +9 -0
- package/src/models/interfaces/crop-area.interface.ts +6 -0
- package/src/models/interfaces/date-time-range.interface.ts +4 -0
- package/src/models/interfaces/dictionary.interface.ts +1 -1
- package/src/models/interfaces/dl-storage.interface.ts +41 -0
- package/src/models/interfaces/location.interface.ts +9 -0
- package/src/models/interfaces/physical-address.interface.ts +8 -0
- package/src/models/interfaces/picture.interface.ts +8 -0
- package/src/models/interfaces/s3.interface.ts +54 -0
- package/src/models/interfaces/user-meta.interface.ts +4 -0
- package/src/models/interfaces/virtual-address.interface.ts +6 -0
- package/src/models/schemas/embedded/archive.schema.ts +15 -0
- package/src/models/schemas/embedded/attachement.schema.ts +22 -0
- package/src/models/schemas/embedded/author.schema.ts +24 -0
- package/src/models/schemas/embedded/crop-area.schema.ts +21 -0
- package/src/models/schemas/embedded/date-time-range.schema.ts +15 -0
- package/src/models/schemas/embedded/group-session.schema.ts +1 -1
- package/src/models/schemas/embedded/location.schema.ts +23 -0
- package/src/models/schemas/embedded/physical-address.schema.ts +23 -0
- package/src/models/schemas/embedded/picture.schema.ts +22 -0
- package/src/models/schemas/embedded/s3.schema.ts +130 -0
- package/src/models/schemas/embedded/virtual-address.schema.ts +16 -0
- package/src/services/dictionaries.service.ts +19 -10
- package/src/services/iam.service.ts +102 -0
- package/src/services/permissions-scanner.service.ts +44 -0
- package/src/services/sessions.service.ts +36 -0
- package/src/services/storage.service.ts +84 -0
- package/src/transformers/common.transformer.ts +6 -1
- package/src/utils/helper.utils.ts +22 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LocationSchema = exports.Location = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const location_type_enum_1 = require("../../enums/location-type.enum");
|
|
15
|
+
const physical_address_schema_1 = require("./physical-address.schema");
|
|
16
|
+
const virtual_address_schema_1 = require("./virtual-address.schema");
|
|
17
|
+
let Location = class Location {
|
|
18
|
+
};
|
|
19
|
+
exports.Location = Location;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, mongoose_1.Prop)({ type: String, enum: location_type_enum_1.LocationType, required: true, default: location_type_enum_1.LocationType.Uncategorized }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], Location.prototype, "type", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, mongoose_1.Prop)({ type: physical_address_schema_1.PhysicalAddressSchema, required: false, default: null }),
|
|
26
|
+
__metadata("design:type", Object)
|
|
27
|
+
], Location.prototype, "physicalAddress", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, mongoose_1.Prop)({ type: virtual_address_schema_1.VirtualAddressSchema, required: false, default: null }),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], Location.prototype, "virtualAddress", void 0);
|
|
32
|
+
exports.Location = Location = __decorate([
|
|
33
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
34
|
+
], Location);
|
|
35
|
+
exports.LocationSchema = mongoose_1.SchemaFactory.createForClass(Location);
|
|
36
|
+
//# sourceMappingURL=location.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location.schema.js","sourceRoot":"","sources":["../../../../src/models/schemas/embedded/location.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAG/D,uEAA8D;AAE9D,uEAAkE;AAElE,qEAAgE;AAGzD,IAAM,QAAQ,GAAd,MAAM,QAAQ;CASpB,CAAA;AATY,4BAAQ;AAEjB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iCAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,iCAAY,CAAC,aAAa,EAAE,CAAC;;sCAC7E;AAGnB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,+CAAqB,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iDACjB;AAGrD;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,6CAAoB,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;gDAClB;mBAR1C,QAAQ;IADpB,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;GACV,QAAQ,CASpB;AAEY,QAAA,cAAc,GAAG,wBAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -10,11 +10,11 @@ export declare class Person implements IPerson {
|
|
|
10
10
|
gender: IDictionary;
|
|
11
11
|
residence: IResidence;
|
|
12
12
|
}
|
|
13
|
-
export declare const PersonSchema: import("mongoose").Schema<Person, import("mongoose").Model<Person, any, any, any, import("mongoose").Document<unknown, any, Person> & Person & {
|
|
13
|
+
export declare const PersonSchema: import("mongoose").Schema<Person, import("mongoose").Model<Person, any, any, any, import("mongoose").Document<unknown, any, Person, any> & Person & {
|
|
14
14
|
_id: import("mongoose").Types.ObjectId;
|
|
15
15
|
} & {
|
|
16
16
|
__v: number;
|
|
17
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Person, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Person
|
|
17
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Person, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Person>, {}> & import("mongoose").FlatRecord<Person> & {
|
|
18
18
|
_id: import("mongoose").Types.ObjectId;
|
|
19
19
|
} & {
|
|
20
20
|
__v: number;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HydratedDocument } from 'mongoose';
|
|
2
|
+
import { IDictionary } from '../../interfaces/dictionary.interface';
|
|
3
|
+
import { IPhysicalAddress } from '../../interfaces/physical-address.interface';
|
|
4
|
+
export declare class PhysicalAddress implements IPhysicalAddress {
|
|
5
|
+
country: IDictionary;
|
|
6
|
+
city: IDictionary;
|
|
7
|
+
address1: string;
|
|
8
|
+
address2: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const PhysicalAddressSchema: import("mongoose").Schema<PhysicalAddress, import("mongoose").Model<PhysicalAddress, any, any, any, import("mongoose").Document<unknown, any, PhysicalAddress, any> & PhysicalAddress & {
|
|
11
|
+
_id: import("mongoose").Types.ObjectId;
|
|
12
|
+
} & {
|
|
13
|
+
__v: number;
|
|
14
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PhysicalAddress, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<PhysicalAddress>, {}> & import("mongoose").FlatRecord<PhysicalAddress> & {
|
|
15
|
+
_id: import("mongoose").Types.ObjectId;
|
|
16
|
+
} & {
|
|
17
|
+
__v: number;
|
|
18
|
+
}>;
|
|
19
|
+
export type PhysicalAddressDocument = HydratedDocument<PhysicalAddress>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PhysicalAddressSchema = exports.PhysicalAddress = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const dictionary_embedded_schema_1 = require("./dictionary-embedded.schema");
|
|
15
|
+
let PhysicalAddress = class PhysicalAddress {
|
|
16
|
+
};
|
|
17
|
+
exports.PhysicalAddress = PhysicalAddress;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, mongoose_1.Prop)({ type: dictionary_embedded_schema_1.DictionaryEmbeddedSchema, required: false, default: null }),
|
|
20
|
+
__metadata("design:type", Object)
|
|
21
|
+
], PhysicalAddress.prototype, "country", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, mongoose_1.Prop)({ type: dictionary_embedded_schema_1.DictionaryEmbeddedSchema, required: false, default: null }),
|
|
24
|
+
__metadata("design:type", Object)
|
|
25
|
+
], PhysicalAddress.prototype, "city", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, mongoose_1.Prop)({ type: String, required: false, default: null }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], PhysicalAddress.prototype, "address1", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, mongoose_1.Prop)({ type: String, required: false, default: null }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], PhysicalAddress.prototype, "address2", void 0);
|
|
34
|
+
exports.PhysicalAddress = PhysicalAddress = __decorate([
|
|
35
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
36
|
+
], PhysicalAddress);
|
|
37
|
+
exports.PhysicalAddressSchema = mongoose_1.SchemaFactory.createForClass(PhysicalAddress);
|
|
38
|
+
//# sourceMappingURL=physical-address.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"physical-address.schema.js","sourceRoot":"","sources":["../../../../src/models/schemas/embedded/physical-address.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAG/D,6EAAwE;AAIjE,IAAM,eAAe,GAArB,MAAM,eAAe;CAY3B,CAAA;AAZY,0CAAe;AAExB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,qDAAwB,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;gDACpD;AAGrB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,qDAAwB,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;6CACvD;AAGlB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iDACtC;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iDACtC;0BAXR,eAAe;IAD3B,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;GACV,eAAe,CAY3B;AAEY,QAAA,qBAAqB,GAAG,wBAAa,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HydratedDocument } from 'mongoose';
|
|
2
|
+
import { IFileEmbedded } from '../../interfaces/s3.interface';
|
|
3
|
+
import { IPicture } from '../../interfaces/picture.interface';
|
|
4
|
+
import { ICropArea } from '../../interfaces/crop-area.interface';
|
|
5
|
+
export declare class Picture implements IPicture {
|
|
6
|
+
original: IFileEmbedded;
|
|
7
|
+
cropped: IFileEmbedded | null | undefined;
|
|
8
|
+
cropArea: ICropArea | null | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare const PictureSchema: import("mongoose").Schema<Picture, import("mongoose").Model<Picture, any, any, any, import("mongoose").Document<unknown, any, Picture, any> & Picture & {
|
|
11
|
+
_id: import("mongoose").Types.ObjectId;
|
|
12
|
+
} & {
|
|
13
|
+
__v: number;
|
|
14
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Picture, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Picture>, {}> & import("mongoose").FlatRecord<Picture> & {
|
|
15
|
+
_id: import("mongoose").Types.ObjectId;
|
|
16
|
+
} & {
|
|
17
|
+
__v: number;
|
|
18
|
+
}>;
|
|
19
|
+
export type PictureDocument = HydratedDocument<Picture>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PictureSchema = exports.Picture = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const s3_schema_1 = require("./s3.schema");
|
|
15
|
+
const crop_area_schema_1 = require("./crop-area.schema");
|
|
16
|
+
let Picture = class Picture {
|
|
17
|
+
};
|
|
18
|
+
exports.Picture = Picture;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, mongoose_1.Prop)({ type: s3_schema_1.FileEmbeddedSchema, required: true, default: null }),
|
|
21
|
+
__metadata("design:type", Object)
|
|
22
|
+
], Picture.prototype, "original", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, mongoose_1.Prop)({ type: s3_schema_1.FileEmbeddedSchema, required: false, default: null }),
|
|
25
|
+
__metadata("design:type", Object)
|
|
26
|
+
], Picture.prototype, "cropped", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, mongoose_1.Prop)({ type: crop_area_schema_1.CropAreaSchema, required: false, default: null }),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], Picture.prototype, "cropArea", void 0);
|
|
31
|
+
exports.Picture = Picture = __decorate([
|
|
32
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
33
|
+
], Picture);
|
|
34
|
+
exports.PictureSchema = mongoose_1.SchemaFactory.createForClass(Picture);
|
|
35
|
+
//# sourceMappingURL=picture.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"picture.schema.js","sourceRoot":"","sources":["../../../../src/models/schemas/embedded/picture.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAG/D,2CAAiD;AAGjD,yDAAoD;AAG7C,IAAM,OAAO,GAAb,MAAM,OAAO;CASnB,CAAA;AATY,0BAAO;AAEhB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,8BAAkB,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;yCAC1C;AAGxB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,8BAAkB,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;wCACzB;AAG1C;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,iCAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;yCACxB;kBAR9B,OAAO;IADnB,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;GACV,OAAO,CASnB;AAEY,QAAA,aAAa,GAAG,wBAAa,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -8,11 +8,11 @@ export declare class Record implements IRecord {
|
|
|
8
8
|
updatedAt: Date;
|
|
9
9
|
deletedAt: Date;
|
|
10
10
|
}
|
|
11
|
-
export declare const RecordSchema: import("mongoose").Schema<Record, import("mongoose").Model<Record, any, any, any, import("mongoose").Document<unknown, any, Record> & Record & {
|
|
11
|
+
export declare const RecordSchema: import("mongoose").Schema<Record, import("mongoose").Model<Record, any, any, any, import("mongoose").Document<unknown, any, Record, any> & Record & {
|
|
12
12
|
_id: import("mongoose").Types.ObjectId;
|
|
13
13
|
} & {
|
|
14
14
|
__v: number;
|
|
15
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Record, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Record
|
|
15
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Record, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Record>, {}> & import("mongoose").FlatRecord<Record> & {
|
|
16
16
|
_id: import("mongoose").Types.ObjectId;
|
|
17
17
|
} & {
|
|
18
18
|
__v: number;
|
|
@@ -7,11 +7,11 @@ export declare class Residence implements IResidence {
|
|
|
7
7
|
address1: string;
|
|
8
8
|
address2: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const ResidenceSchema: import("mongoose").Schema<Residence, import("mongoose").Model<Residence, any, any, any, import("mongoose").Document<unknown, any, Residence> & Residence & {
|
|
10
|
+
export declare const ResidenceSchema: import("mongoose").Schema<Residence, import("mongoose").Model<Residence, any, any, any, import("mongoose").Document<unknown, any, Residence, any> & Residence & {
|
|
11
11
|
_id: import("mongoose").Types.ObjectId;
|
|
12
12
|
} & {
|
|
13
13
|
__v: number;
|
|
14
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Residence, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Residence
|
|
14
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Residence, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Residence>, {}> & import("mongoose").FlatRecord<Residence> & {
|
|
15
15
|
_id: import("mongoose").Types.ObjectId;
|
|
16
16
|
} & {
|
|
17
17
|
__v: number;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { HydratedDocument, mongo } from 'mongoose';
|
|
2
|
+
import { IFileEmbedded, IFileLog, IFileMeta, IFileRecord, IFileState, ILogInitiator, IS3, IS3File } from '../../interfaces/s3.interface';
|
|
3
|
+
import { FileLogInitType, S3FileState } from '../../enums/s3.enum';
|
|
4
|
+
export declare class S3 implements IS3 {
|
|
5
|
+
key: string;
|
|
6
|
+
bucket: string;
|
|
7
|
+
etag: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class LogInitiator implements ILogInitiator {
|
|
10
|
+
type: FileLogInitType;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class FileLog implements IFileLog {
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
value: S3FileState;
|
|
16
|
+
initiator: LogInitiator;
|
|
17
|
+
}
|
|
18
|
+
export declare class FileMeta implements IFileMeta {
|
|
19
|
+
name: string;
|
|
20
|
+
size: number;
|
|
21
|
+
mimeType: string;
|
|
22
|
+
extension: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class FileState implements IFileState {
|
|
25
|
+
value: S3FileState;
|
|
26
|
+
log: FileLog[];
|
|
27
|
+
}
|
|
28
|
+
export declare class FileRecord implements IFileRecord {
|
|
29
|
+
createdAt: Date;
|
|
30
|
+
updatedAt: Date;
|
|
31
|
+
}
|
|
32
|
+
export declare class S3File implements IS3File {
|
|
33
|
+
id: mongo.ObjectId;
|
|
34
|
+
fileMeta: FileMeta;
|
|
35
|
+
state: FileState;
|
|
36
|
+
s3: S3;
|
|
37
|
+
record: FileRecord;
|
|
38
|
+
owner: string;
|
|
39
|
+
}
|
|
40
|
+
export declare class FileEmbedded implements IFileEmbedded {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
size: number;
|
|
44
|
+
mimeType: string;
|
|
45
|
+
s3: S3;
|
|
46
|
+
createdAt: Date;
|
|
47
|
+
}
|
|
48
|
+
export declare const S3Schema: import("mongoose").Schema<S3, import("mongoose").Model<S3, any, any, any, import("mongoose").Document<unknown, any, S3, any> & S3 & {
|
|
49
|
+
_id: import("mongoose").Types.ObjectId;
|
|
50
|
+
} & {
|
|
51
|
+
__v: number;
|
|
52
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, S3, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<S3>, {}> & import("mongoose").FlatRecord<S3> & {
|
|
53
|
+
_id: import("mongoose").Types.ObjectId;
|
|
54
|
+
} & {
|
|
55
|
+
__v: number;
|
|
56
|
+
}>;
|
|
57
|
+
export declare const LogInitiatorSchema: import("mongoose").Schema<LogInitiator, import("mongoose").Model<LogInitiator, any, any, any, import("mongoose").Document<unknown, any, LogInitiator, any> & LogInitiator & {
|
|
58
|
+
_id: import("mongoose").Types.ObjectId;
|
|
59
|
+
} & {
|
|
60
|
+
__v: number;
|
|
61
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, LogInitiator, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<LogInitiator>, {}> & import("mongoose").FlatRecord<LogInitiator> & {
|
|
62
|
+
_id: import("mongoose").Types.ObjectId;
|
|
63
|
+
} & {
|
|
64
|
+
__v: number;
|
|
65
|
+
}>;
|
|
66
|
+
export declare const FileLogSchema: import("mongoose").Schema<FileLog, import("mongoose").Model<FileLog, any, any, any, import("mongoose").Document<unknown, any, FileLog, any> & FileLog & {
|
|
67
|
+
_id: import("mongoose").Types.ObjectId;
|
|
68
|
+
} & {
|
|
69
|
+
__v: number;
|
|
70
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FileLog, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FileLog>, {}> & import("mongoose").FlatRecord<FileLog> & {
|
|
71
|
+
_id: import("mongoose").Types.ObjectId;
|
|
72
|
+
} & {
|
|
73
|
+
__v: number;
|
|
74
|
+
}>;
|
|
75
|
+
export declare const FileMetaSchema: import("mongoose").Schema<FileMeta, import("mongoose").Model<FileMeta, any, any, any, import("mongoose").Document<unknown, any, FileMeta, any> & FileMeta & {
|
|
76
|
+
_id: import("mongoose").Types.ObjectId;
|
|
77
|
+
} & {
|
|
78
|
+
__v: number;
|
|
79
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FileMeta, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FileMeta>, {}> & import("mongoose").FlatRecord<FileMeta> & {
|
|
80
|
+
_id: import("mongoose").Types.ObjectId;
|
|
81
|
+
} & {
|
|
82
|
+
__v: number;
|
|
83
|
+
}>;
|
|
84
|
+
export declare const FileStateSchema: import("mongoose").Schema<FileState, import("mongoose").Model<FileState, any, any, any, import("mongoose").Document<unknown, any, FileState, any> & FileState & {
|
|
85
|
+
_id: import("mongoose").Types.ObjectId;
|
|
86
|
+
} & {
|
|
87
|
+
__v: number;
|
|
88
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FileState, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FileState>, {}> & import("mongoose").FlatRecord<FileState> & {
|
|
89
|
+
_id: import("mongoose").Types.ObjectId;
|
|
90
|
+
} & {
|
|
91
|
+
__v: number;
|
|
92
|
+
}>;
|
|
93
|
+
export declare const FileRecordSchema: import("mongoose").Schema<FileRecord, import("mongoose").Model<FileRecord, any, any, any, import("mongoose").Document<unknown, any, FileRecord, any> & FileRecord & {
|
|
94
|
+
_id: import("mongoose").Types.ObjectId;
|
|
95
|
+
} & {
|
|
96
|
+
__v: number;
|
|
97
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FileRecord, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FileRecord>, {}> & import("mongoose").FlatRecord<FileRecord> & {
|
|
98
|
+
_id: import("mongoose").Types.ObjectId;
|
|
99
|
+
} & {
|
|
100
|
+
__v: number;
|
|
101
|
+
}>;
|
|
102
|
+
export declare const S3FileSchema: import("mongoose").Schema<S3File, import("mongoose").Model<S3File, any, any, any, import("mongoose").Document<unknown, any, S3File, any> & S3File & {
|
|
103
|
+
_id: import("mongoose").Types.ObjectId;
|
|
104
|
+
} & {
|
|
105
|
+
__v: number;
|
|
106
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, S3File, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<S3File>, {}> & import("mongoose").FlatRecord<S3File> & {
|
|
107
|
+
_id: import("mongoose").Types.ObjectId;
|
|
108
|
+
} & {
|
|
109
|
+
__v: number;
|
|
110
|
+
}>;
|
|
111
|
+
export declare const FileEmbeddedSchema: import("mongoose").Schema<FileEmbedded, import("mongoose").Model<FileEmbedded, any, any, any, import("mongoose").Document<unknown, any, FileEmbedded, any> & FileEmbedded & {
|
|
112
|
+
_id: import("mongoose").Types.ObjectId;
|
|
113
|
+
} & {
|
|
114
|
+
__v: number;
|
|
115
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FileEmbedded, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FileEmbedded>, {}> & import("mongoose").FlatRecord<FileEmbedded> & {
|
|
116
|
+
_id: import("mongoose").Types.ObjectId;
|
|
117
|
+
} & {
|
|
118
|
+
__v: number;
|
|
119
|
+
}>;
|
|
120
|
+
export type S3Document = HydratedDocument<S3>;
|
|
121
|
+
export type LogInitiatorDocument = HydratedDocument<LogInitiator>;
|
|
122
|
+
export type FileLogDocument = HydratedDocument<FileLog>;
|
|
123
|
+
export type FileMetaDocument = HydratedDocument<FileMeta>;
|
|
124
|
+
export type FileStateDocument = HydratedDocument<FileState>;
|
|
125
|
+
export type FileRecordDocument = HydratedDocument<FileRecord>;
|
|
126
|
+
export type S3FileDocument = HydratedDocument<S3File>;
|
|
127
|
+
export type FileEmbeddedDocument = HydratedDocument<FileEmbedded>;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FileEmbeddedSchema = exports.S3FileSchema = exports.FileRecordSchema = exports.FileStateSchema = exports.FileMetaSchema = exports.FileLogSchema = exports.LogInitiatorSchema = exports.S3Schema = exports.FileEmbedded = exports.S3File = exports.FileRecord = exports.FileState = exports.FileMeta = exports.FileLog = exports.LogInitiator = exports.S3 = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
const s3_enum_1 = require("../../enums/s3.enum");
|
|
16
|
+
let S3 = class S3 {
|
|
17
|
+
};
|
|
18
|
+
exports.S3 = S3;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], S3.prototype, "key", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], S3.prototype, "bucket", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], S3.prototype, "etag", void 0);
|
|
31
|
+
exports.S3 = S3 = __decorate([
|
|
32
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
33
|
+
], S3);
|
|
34
|
+
let LogInitiator = class LogInitiator {
|
|
35
|
+
};
|
|
36
|
+
exports.LogInitiator = LogInitiator;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, mongoose_1.Prop)({ type: String, enum: s3_enum_1.FileLogInitType, required: false }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], LogInitiator.prototype, "type", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], LogInitiator.prototype, "name", void 0);
|
|
45
|
+
exports.LogInitiator = LogInitiator = __decorate([
|
|
46
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
47
|
+
], LogInitiator);
|
|
48
|
+
let FileLog = class FileLog {
|
|
49
|
+
};
|
|
50
|
+
exports.FileLog = FileLog;
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, mongoose_1.Prop)({ type: Date, required: true }),
|
|
53
|
+
__metadata("design:type", Date)
|
|
54
|
+
], FileLog.prototype, "createdAt", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, mongoose_1.Prop)({ type: String, enum: s3_enum_1.S3FileState, required: true }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], FileLog.prototype, "value", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, mongoose_1.Prop)({ type: LogInitiator, required: false }),
|
|
61
|
+
__metadata("design:type", LogInitiator)
|
|
62
|
+
], FileLog.prototype, "initiator", void 0);
|
|
63
|
+
exports.FileLog = FileLog = __decorate([
|
|
64
|
+
(0, mongoose_1.Schema)()
|
|
65
|
+
], FileLog);
|
|
66
|
+
let FileMeta = class FileMeta {
|
|
67
|
+
};
|
|
68
|
+
exports.FileMeta = FileMeta;
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], FileMeta.prototype, "name", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
75
|
+
__metadata("design:type", Number)
|
|
76
|
+
], FileMeta.prototype, "size", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], FileMeta.prototype, "mimeType", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], FileMeta.prototype, "extension", void 0);
|
|
85
|
+
exports.FileMeta = FileMeta = __decorate([
|
|
86
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
87
|
+
], FileMeta);
|
|
88
|
+
let FileState = class FileState {
|
|
89
|
+
};
|
|
90
|
+
exports.FileState = FileState;
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, mongoose_1.Prop)({ type: String, enum: s3_enum_1.S3FileState, required: true }),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], FileState.prototype, "value", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, mongoose_1.Prop)({ type: [FileLog], required: true, default: [] }),
|
|
97
|
+
__metadata("design:type", Array)
|
|
98
|
+
], FileState.prototype, "log", void 0);
|
|
99
|
+
exports.FileState = FileState = __decorate([
|
|
100
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
101
|
+
], FileState);
|
|
102
|
+
let FileRecord = class FileRecord {
|
|
103
|
+
};
|
|
104
|
+
exports.FileRecord = FileRecord;
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, mongoose_1.Prop)({ type: Date, required: true }),
|
|
107
|
+
__metadata("design:type", Date)
|
|
108
|
+
], FileRecord.prototype, "createdAt", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
111
|
+
__metadata("design:type", Date)
|
|
112
|
+
], FileRecord.prototype, "updatedAt", void 0);
|
|
113
|
+
exports.FileRecord = FileRecord = __decorate([
|
|
114
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
115
|
+
], FileRecord);
|
|
116
|
+
let S3File = class S3File {
|
|
117
|
+
};
|
|
118
|
+
exports.S3File = S3File;
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.SchemaTypes.ObjectId, required: true }),
|
|
121
|
+
__metadata("design:type", mongoose_2.mongo.ObjectId)
|
|
122
|
+
], S3File.prototype, "id", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, mongoose_1.Prop)({ type: FileMeta, required: true, default: null }),
|
|
125
|
+
__metadata("design:type", FileMeta)
|
|
126
|
+
], S3File.prototype, "fileMeta", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, mongoose_1.Prop)({ type: FileState, required: true, default: null }),
|
|
129
|
+
__metadata("design:type", FileState)
|
|
130
|
+
], S3File.prototype, "state", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, mongoose_1.Prop)({ type: S3, required: true, default: null }),
|
|
133
|
+
__metadata("design:type", S3)
|
|
134
|
+
], S3File.prototype, "s3", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, mongoose_1.Prop)({ type: FileRecord, required: true }),
|
|
137
|
+
__metadata("design:type", FileRecord)
|
|
138
|
+
], S3File.prototype, "record", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
141
|
+
__metadata("design:type", String)
|
|
142
|
+
], S3File.prototype, "owner", void 0);
|
|
143
|
+
exports.S3File = S3File = __decorate([
|
|
144
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
145
|
+
], S3File);
|
|
146
|
+
let FileEmbedded = class FileEmbedded {
|
|
147
|
+
};
|
|
148
|
+
exports.FileEmbedded = FileEmbedded;
|
|
149
|
+
__decorate([
|
|
150
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
151
|
+
__metadata("design:type", String)
|
|
152
|
+
], FileEmbedded.prototype, "id", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
155
|
+
__metadata("design:type", String)
|
|
156
|
+
], FileEmbedded.prototype, "name", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
159
|
+
__metadata("design:type", Number)
|
|
160
|
+
], FileEmbedded.prototype, "size", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
163
|
+
__metadata("design:type", String)
|
|
164
|
+
], FileEmbedded.prototype, "mimeType", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
(0, mongoose_1.Prop)({ type: S3, required: true, default: null }),
|
|
167
|
+
__metadata("design:type", S3)
|
|
168
|
+
], FileEmbedded.prototype, "s3", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
(0, mongoose_1.Prop)({ type: Date, required: true }),
|
|
171
|
+
__metadata("design:type", Date)
|
|
172
|
+
], FileEmbedded.prototype, "createdAt", void 0);
|
|
173
|
+
exports.FileEmbedded = FileEmbedded = __decorate([
|
|
174
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
175
|
+
], FileEmbedded);
|
|
176
|
+
exports.S3Schema = mongoose_1.SchemaFactory.createForClass(S3);
|
|
177
|
+
exports.LogInitiatorSchema = mongoose_1.SchemaFactory.createForClass(LogInitiator);
|
|
178
|
+
exports.FileLogSchema = mongoose_1.SchemaFactory.createForClass(FileLog);
|
|
179
|
+
exports.FileMetaSchema = mongoose_1.SchemaFactory.createForClass(FileMeta);
|
|
180
|
+
exports.FileStateSchema = mongoose_1.SchemaFactory.createForClass(FileState);
|
|
181
|
+
exports.FileRecordSchema = mongoose_1.SchemaFactory.createForClass(FileRecord);
|
|
182
|
+
exports.S3FileSchema = mongoose_1.SchemaFactory.createForClass(S3File);
|
|
183
|
+
exports.FileEmbeddedSchema = mongoose_1.SchemaFactory.createForClass(FileEmbedded);
|
|
184
|
+
//# sourceMappingURL=s3.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"s3.schema.js","sourceRoot":"","sources":["../../../../src/models/schemas/embedded/s3.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAAgE;AAEhE,iDAAmE;AAG5D,IAAM,EAAE,GAAR,MAAM,EAAE;CASd,CAAA;AATY,gBAAE;AAEX;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+BAC3B;AAGZ;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kCACxB;AAGf;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KA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tB;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC9C,EAAE;wCAAC;AAGP;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC1B,IAAI;+CAAC;uBAjBP,YAAY;IADxB,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;GACV,YAAY,CAkBxB;AAEY,QAAA,QAAQ,GAAG,wBAAa,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;AAC5C,QAAA,kBAAkB,GAAG,wBAAa,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;AAChE,QAAA,aAAa,GAAG,wBAAa,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AACtD,QAAA,cAAc,GAAG,wBAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AACxD,QAAA,eAAe,GAAG,wBAAa,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;AAC1D,QAAA,gBAAgB,GAAG,wBAAa,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;AAC5D,QAAA,YAAY,GAAG,wBAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;AACpD,QAAA,kBAAkB,GAAG,wBAAa,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -11,11 +11,11 @@ export declare class SessionUser implements ISessionUser {
|
|
|
11
11
|
permissions: string[];
|
|
12
12
|
verificationLevel: UserVerificationLevel;
|
|
13
13
|
}
|
|
14
|
-
export declare const SessionUserSchema: import("mongoose").Schema<SessionUser, import("mongoose").Model<SessionUser, any, any, any, import("mongoose").Document<unknown, any, SessionUser> & SessionUser & Required<{
|
|
14
|
+
export declare const SessionUserSchema: import("mongoose").Schema<SessionUser, import("mongoose").Model<SessionUser, any, any, any, import("mongoose").Document<unknown, any, SessionUser, any> & SessionUser & Required<{
|
|
15
15
|
_id: string;
|
|
16
16
|
}> & {
|
|
17
17
|
__v: number;
|
|
18
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, SessionUser, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<SessionUser
|
|
18
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, SessionUser, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<SessionUser>, {}> & import("mongoose").FlatRecord<SessionUser> & Required<{
|
|
19
19
|
_id: string;
|
|
20
20
|
}> & {
|
|
21
21
|
__v: number;
|
|
@@ -10,11 +10,11 @@ export declare class StudentEmbedded extends Identifable implements IStudentEmbe
|
|
|
10
10
|
person: IPerson;
|
|
11
11
|
knowladgeLevel: IDictionary;
|
|
12
12
|
}
|
|
13
|
-
export declare const StudentEmbeddedSchema: import("mongoose").Schema<StudentEmbedded, import("mongoose").Model<StudentEmbedded, any, any, any, import("mongoose").Document<unknown, any, StudentEmbedded> & StudentEmbedded & Required<{
|
|
13
|
+
export declare const StudentEmbeddedSchema: import("mongoose").Schema<StudentEmbedded, import("mongoose").Model<StudentEmbedded, any, any, any, import("mongoose").Document<unknown, any, StudentEmbedded, any> & StudentEmbedded & Required<{
|
|
14
14
|
_id: import("mongoose").Types.ObjectId;
|
|
15
15
|
}> & {
|
|
16
16
|
__v: number;
|
|
17
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, StudentEmbedded, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<StudentEmbedded
|
|
17
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, StudentEmbedded, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<StudentEmbedded>, {}> & import("mongoose").FlatRecord<StudentEmbedded> & Required<{
|
|
18
18
|
_id: import("mongoose").Types.ObjectId;
|
|
19
19
|
}> & {
|
|
20
20
|
__v: number;
|
|
@@ -5,11 +5,11 @@ export declare class Teacher implements ITeacher {
|
|
|
5
5
|
userId: Types.ObjectId | string;
|
|
6
6
|
person: IPerson;
|
|
7
7
|
}
|
|
8
|
-
export declare const TeacherSchema: MongooseSchema<Teacher, import("mongoose").Model<Teacher, any, any, any, import("mongoose").Document<unknown, any, Teacher> & Teacher & {
|
|
8
|
+
export declare const TeacherSchema: MongooseSchema<Teacher, import("mongoose").Model<Teacher, any, any, any, import("mongoose").Document<unknown, any, Teacher, any> & Teacher & {
|
|
9
9
|
_id: Types.ObjectId;
|
|
10
10
|
} & {
|
|
11
11
|
__v: number;
|
|
12
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Teacher, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Teacher
|
|
12
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Teacher, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Teacher>, {}> & import("mongoose").FlatRecord<Teacher> & {
|
|
13
13
|
_id: Types.ObjectId;
|
|
14
14
|
} & {
|
|
15
15
|
__v: number;
|
|
@@ -5,11 +5,11 @@ export declare class Time implements ITime {
|
|
|
5
5
|
inNumber: number;
|
|
6
6
|
zone: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const TimeSchema: import("mongoose").Schema<Time, import("mongoose").Model<Time, any, any, any, import("mongoose").Document<unknown, any, Time> & Time & {
|
|
8
|
+
export declare const TimeSchema: import("mongoose").Schema<Time, import("mongoose").Model<Time, any, any, any, import("mongoose").Document<unknown, any, Time, any> & Time & {
|
|
9
9
|
_id: import("mongoose").Types.ObjectId;
|
|
10
10
|
} & {
|
|
11
11
|
__v: number;
|
|
12
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Time, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Time
|
|
12
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Time, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Time>, {}> & import("mongoose").FlatRecord<Time> & {
|
|
13
13
|
_id: import("mongoose").Types.ObjectId;
|
|
14
14
|
} & {
|
|
15
15
|
__v: number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HydratedDocument } from 'mongoose';
|
|
2
|
+
import { IVirtualAddress } from '../../interfaces/virtual-address.interface';
|
|
3
|
+
import { VirtualAddressType } from '../../enums/virtual-address-type.enum';
|
|
4
|
+
export declare class VirtualAddress implements IVirtualAddress {
|
|
5
|
+
type: VirtualAddressType;
|
|
6
|
+
link: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const VirtualAddressSchema: import("mongoose").Schema<VirtualAddress, import("mongoose").Model<VirtualAddress, any, any, any, import("mongoose").Document<unknown, any, VirtualAddress, any> & VirtualAddress & {
|
|
9
|
+
_id: import("mongoose").Types.ObjectId;
|
|
10
|
+
} & {
|
|
11
|
+
__v: number;
|
|
12
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, VirtualAddress, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<VirtualAddress>, {}> & import("mongoose").FlatRecord<VirtualAddress> & {
|
|
13
|
+
_id: import("mongoose").Types.ObjectId;
|
|
14
|
+
} & {
|
|
15
|
+
__v: number;
|
|
16
|
+
}>;
|
|
17
|
+
export type VirtualAddressDocument = HydratedDocument<VirtualAddress>;
|