dl-commons 0.0.1-testing.3 → 0.0.1-testing.57
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/dist/index.d.ts +12 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/dist/models/enums/group-state.enum.d.ts +5 -0
- package/dist/models/enums/group-state.enum.js +10 -0
- package/dist/models/enums/group-state.enum.js.map +1 -0
- package/dist/models/enums/week-day.enum.d.ts +9 -0
- package/dist/models/enums/week-day.enum.js +14 -0
- package/dist/models/enums/week-day.enum.js.map +1 -0
- package/dist/models/interfaces/group-embedded.interface.d.ts +17 -0
- package/dist/models/interfaces/group-embedded.interface.js +3 -0
- package/dist/models/interfaces/group-embedded.interface.js.map +1 -0
- package/dist/models/interfaces/group-session.interface.d.ts +9 -0
- package/dist/models/interfaces/group-session.interface.js +3 -0
- package/dist/models/interfaces/group-session.interface.js.map +1 -0
- package/dist/models/interfaces/identifable.interface.d.ts +1 -1
- package/dist/models/interfaces/parent.interface.d.ts +7 -0
- package/dist/models/interfaces/parent.interface.js +3 -0
- package/dist/models/interfaces/parent.interface.js.map +1 -0
- package/dist/models/interfaces/person.interface.d.ts +2 -0
- package/dist/models/interfaces/student-embedded.interface.d.ts +10 -0
- package/dist/models/interfaces/student-embedded.interface.js +3 -0
- package/dist/models/interfaces/student-embedded.interface.js.map +1 -0
- package/dist/models/interfaces/teacher.interface.d.ts +6 -0
- package/dist/models/interfaces/teacher.interface.js +3 -0
- package/dist/models/interfaces/teacher.interface.js.map +1 -0
- package/dist/models/schemas/embedded/group-session.schema.d.ts +21 -0
- package/dist/models/schemas/embedded/group-session.schema.js +40 -0
- package/dist/models/schemas/embedded/group-session.schema.js.map +1 -0
- package/dist/models/schemas/embedded/person.schema.d.ts +2 -0
- package/dist/models/schemas/embedded/person.schema.js +5 -0
- package/dist/models/schemas/embedded/person.schema.js.map +1 -1
- package/dist/models/schemas/embedded/student-embedded.schema.d.ts +22 -0
- package/dist/models/schemas/embedded/student-embedded.schema.js +41 -0
- package/dist/models/schemas/embedded/student-embedded.schema.js.map +1 -0
- package/dist/models/schemas/embedded/teacher.schema.d.ts +17 -0
- package/dist/models/schemas/embedded/teacher.schema.js +31 -0
- package/dist/models/schemas/embedded/teacher.schema.js.map +1 -0
- package/dist/models/schemas/parent.schema.d.ts +19 -0
- package/dist/models/schemas/parent.schema.js +36 -0
- package/dist/models/schemas/parent.schema.js.map +1 -0
- package/dist/services/dictionaries.service.d.ts +1 -0
- package/dist/services/dictionaries.service.js +27 -2
- package/dist/services/dictionaries.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/index.ts +28 -0
- package/src/models/enums/group-state.enum.ts +5 -0
- package/src/models/enums/week-day.enum.ts +9 -0
- package/src/models/interfaces/group-embedded.interface.ts +18 -0
- package/src/models/interfaces/group-session.interface.ts +10 -0
- package/src/models/interfaces/identifable.interface.ts +1 -1
- package/src/models/interfaces/parent.interface.ts +8 -0
- package/src/models/interfaces/person.interface.ts +2 -0
- package/src/models/interfaces/student-embedded.interface.ts +12 -0
- package/src/models/interfaces/teacher.interface.ts +7 -0
- package/src/models/schemas/embedded/group-session.schema.ts +25 -0
- package/src/models/schemas/embedded/person.schema.ts +5 -0
- package/src/models/schemas/embedded/student-embedded.schema.ts +28 -0
- package/src/models/schemas/embedded/teacher.schema.ts +17 -0
- package/src/models/schemas/parent.schema.ts +22 -0
- package/src/services/dictionaries.service.ts +44 -2
package/dist/index.d.ts
CHANGED
|
@@ -38,4 +38,15 @@ import { transformers } from './transformers/common.transformer';
|
|
|
38
38
|
import { IUser } from './models/interfaces/user.interface';
|
|
39
39
|
import { SessionUser, SessionUserDocument, SessionUserSchema } from './models/schemas/embedded/session-user.schema';
|
|
40
40
|
import { Session, SessionDocument, SessionSchema } from './models/schemas/session.schema';
|
|
41
|
-
|
|
41
|
+
import { DictionariesService } from './services/dictionaries.service';
|
|
42
|
+
import { IParent } from './models/interfaces/parent.interface';
|
|
43
|
+
import { IGroupEmbedded } from './models/interfaces/group-embedded.interface';
|
|
44
|
+
import { IStudentEmbedded } from './models/interfaces/student-embedded.interface';
|
|
45
|
+
import { StudentEmbedded, StudentEmbeddedDocument, StudentEmbeddedSchema } from './models/schemas/embedded/student-embedded.schema';
|
|
46
|
+
import { ITeacher } from './models/interfaces/teacher.interface';
|
|
47
|
+
import { WeekDay } from './models/enums/week-day.enum';
|
|
48
|
+
import { IGroupSession } from './models/interfaces/group-session.interface';
|
|
49
|
+
import { GroupState } from './models/enums/group-state.enum';
|
|
50
|
+
import { GroupSessionSchema, GroupSessionDocument, GroupSession } from './models/schemas/embedded/group-session.schema';
|
|
51
|
+
import { TeacherSchema, TeacherDocument, Teacher } from './models/schemas/embedded/teacher.schema';
|
|
52
|
+
export { SessionsService, DictionariesService, RESTError, RESTPage, RESTPaging, RESTQueryParams, RESTRequestBody, RESTResponseBody, RESTResult, RESTSort, SortDirection, IMongoPage, AccessTokenGuard, PermissionGuard, AllowPermissions, APP__PORT, APP__DEBUG, APP__ACCESS_TOKEN, MONGO__CS, REDIS__CS, KAFKA__BROKERS, RecordState, ContactType, UserVerificationLevel, WeekDay, GroupState, I18nDTO, IIdentifable, IBase, IRecord, II18n, IDictionary, IPermission, IRole, IContact, IPerson, IResidence, ISessionUser, ISession, IUser, IParent, IGroupEmbedded, IStudentEmbedded, ITeacher, IGroupSession, Identifable, IdentifableSchema, IdentifableDocument, Base, BaseSchema, BaseDocument, Record, RecordSchema, RecordDocument, I18n, I18nSchema, I18nDocument, Residence, ResidenceSchema, ResidenceDocument, Contact, ContactSchema, ContactDocument, Person, PersonSchema, PersonDocument, DictionaryEmbedded, DictionaryEmbeddedSchema, DictionaryEmbeddedDocument, SessionUser, SessionUserSchema, SessionUserDocument, Session, SessionSchema, SessionDocument, GroupSessionSchema, GroupSessionDocument, GroupSession, TeacherSchema, TeacherDocument, Teacher, StudentEmbeddedSchema, StudentEmbeddedDocument, StudentEmbedded, BaseExceptionsFilter, validationExceptionFactory, HandledException, IsMapOfStrings, transformers, MongoIdPipe, MongoIdsPipe, DLCommonsModule, };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.DLCommonsModule = void 0;
|
|
3
|
+
exports.Teacher = exports.TeacherSchema = exports.GroupSession = exports.GroupSessionSchema = exports.SessionSchema = exports.Session = exports.SessionUserSchema = exports.SessionUser = exports.DictionaryEmbeddedSchema = exports.DictionaryEmbedded = exports.PersonSchema = exports.Person = exports.ContactSchema = exports.Contact = exports.ResidenceSchema = exports.Residence = exports.I18nSchema = exports.I18n = exports.RecordSchema = exports.Record = exports.BaseSchema = exports.Base = exports.IdentifableSchema = exports.Identifable = exports.I18nDTO = exports.GroupState = exports.WeekDay = exports.UserVerificationLevel = exports.ContactType = exports.RecordState = exports.KAFKA__BROKERS = exports.REDIS__CS = exports.MONGO__CS = exports.APP__ACCESS_TOKEN = exports.APP__DEBUG = exports.APP__PORT = exports.AllowPermissions = exports.PermissionGuard = exports.AccessTokenGuard = exports.SortDirection = exports.RESTSort = exports.RESTResult = exports.RESTResponseBody = exports.RESTRequestBody = exports.RESTQueryParams = exports.RESTPaging = exports.RESTPage = exports.RESTError = exports.DictionariesService = exports.SessionsService = void 0;
|
|
4
|
+
exports.DLCommonsModule = exports.MongoIdsPipe = exports.MongoIdPipe = exports.transformers = exports.IsMapOfStrings = exports.HandledException = exports.validationExceptionFactory = exports.BaseExceptionsFilter = exports.StudentEmbedded = exports.StudentEmbeddedSchema = void 0;
|
|
5
5
|
const is_map_of_strings_decorator_1 = require("./decorators/is-map-of-strings.decorator");
|
|
6
6
|
Object.defineProperty(exports, "IsMapOfStrings", { enumerable: true, get: function () { return is_map_of_strings_decorator_1.IsMapOfStrings; } });
|
|
7
7
|
const dl_commons_module_1 = require("./dl-commons.module");
|
|
@@ -80,4 +80,19 @@ Object.defineProperty(exports, "SessionUserSchema", { enumerable: true, get: fun
|
|
|
80
80
|
const session_schema_1 = require("./models/schemas/session.schema");
|
|
81
81
|
Object.defineProperty(exports, "Session", { enumerable: true, get: function () { return session_schema_1.Session; } });
|
|
82
82
|
Object.defineProperty(exports, "SessionSchema", { enumerable: true, get: function () { return session_schema_1.SessionSchema; } });
|
|
83
|
+
const dictionaries_service_1 = require("./services/dictionaries.service");
|
|
84
|
+
Object.defineProperty(exports, "DictionariesService", { enumerable: true, get: function () { return dictionaries_service_1.DictionariesService; } });
|
|
85
|
+
const student_embedded_schema_1 = require("./models/schemas/embedded/student-embedded.schema");
|
|
86
|
+
Object.defineProperty(exports, "StudentEmbedded", { enumerable: true, get: function () { return student_embedded_schema_1.StudentEmbedded; } });
|
|
87
|
+
Object.defineProperty(exports, "StudentEmbeddedSchema", { enumerable: true, get: function () { return student_embedded_schema_1.StudentEmbeddedSchema; } });
|
|
88
|
+
const week_day_enum_1 = require("./models/enums/week-day.enum");
|
|
89
|
+
Object.defineProperty(exports, "WeekDay", { enumerable: true, get: function () { return week_day_enum_1.WeekDay; } });
|
|
90
|
+
const group_state_enum_1 = require("./models/enums/group-state.enum");
|
|
91
|
+
Object.defineProperty(exports, "GroupState", { enumerable: true, get: function () { return group_state_enum_1.GroupState; } });
|
|
92
|
+
const group_session_schema_1 = require("./models/schemas/embedded/group-session.schema");
|
|
93
|
+
Object.defineProperty(exports, "GroupSessionSchema", { enumerable: true, get: function () { return group_session_schema_1.GroupSessionSchema; } });
|
|
94
|
+
Object.defineProperty(exports, "GroupSession", { enumerable: true, get: function () { return group_session_schema_1.GroupSession; } });
|
|
95
|
+
const teacher_schema_1 = require("./models/schemas/embedded/teacher.schema");
|
|
96
|
+
Object.defineProperty(exports, "TeacherSchema", { enumerable: true, get: function () { return teacher_schema_1.TeacherSchema; } });
|
|
97
|
+
Object.defineProperty(exports, "Teacher", { enumerable: true, get: function () { return teacher_schema_1.Teacher; } });
|
|
83
98
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,0FAA0E;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,0FAA0E;AAsMtE,+FAtMK,4CAAc,OAsML;AArMlB,2DAAsD;AAqNlD,gGArNK,mCAAe,OAqNL;AApNnB,oEAAiE;AA+L7D,iGA/LK,mCAAgB,OA+LL;AA9LpB,qEAA2E;AAyLvE,2GAzLK,8CAA0B,OAyLL;AAxL9B,2EAAuE;AAmLnE,qGAnLK,4CAAoB,OAmLL;AAlLxB,oEAA+D;AAkF3D,iGAlFK,qCAAgB,OAkFL;AAjFpB,gEAA8E;AAmF1E,iGAnFK,mCAAgB,OAmFL;AADhB,gGAlFuB,kCAAe,OAkFvB;AAjFnB,mEAAgI;AAuF5H,0FAvFK,0BAAS,OAuFL;AACT,2FAxFgB,2BAAU,OAwFhB;AACV,kGAzF4B,kCAAiB,OAyF5B;AACjB,0FA1F+C,0BAAS,OA0F/C;AACT,0FA3F0D,0BAAS,OA2F1D;AACT,+FA5FqE,+BAAc,OA4FrE;AA3FlB,6DAAyD;AAyGrD,wFAzGK,kBAAO,OAyGL;AAxGX,kFAWmD;AAqD/C,0FA9DA,8BAAS,OA8DA;AACT,yFA9DA,6BAAQ,OA8DA;AACR,2FA9DA,+BAAU,OA8DA;AACV,gGA9DA,oCAAe,OA8DA;AACf,gGA9DA,oCAAe,OA8DA;AACf,iGA9DA,qCAAgB,OA8DA;AAChB,2FA9DA,+BAAU,OA8DA;AACV,yFA9DA,6BAAQ,OA8DA;AACR,8FA9DA,kCAAa,OA8DA;AA5DjB,wEAA+D;AAoF3D,4FApFK,+BAAW,OAoFL;AAnFf,wEAA+D;AAkF3D,4FAlFK,+BAAW,OAkFL;AAjFf,4FAAmF;AAmF/E,sGAnFK,mDAAqB,OAmFL;AAtEzB,8DAA8E;AA2G1E,qFA3GK,kBAAI,OA2GL;AACJ,2FA5GyB,wBAAU,OA4GzB;AA3Gd,6EAAmG;AAsH/F,wFAtHK,wBAAO,OAsHL;AACP,8FAvH+B,8BAAa,OAuH/B;AAtHjB,qGAAgJ;AA2H5I,mGA3HK,+CAAkB,OA2HL;AAClB,yGA5HqD,qDAAwB,OA4HrD;AA3H5B,2EAAyF;AA8GrF,qFA9GK,oBAAI,OA8GL;AACJ,2FA/GW,0BAAU,OA+GX;AA9Gd,2EAA+F;AAsH3F,uFAtHK,sBAAM,OAsHL;AACN,6FAvHa,4BAAY,OAuHb;AAtHhB,+EAAiG;AAyG7F,uFAzGK,wBAAM,OAyGL;AACN,6FA1Ga,8BAAY,OA0Gb;AAzGhB,iFAA2G;AA8GvG,0FA9GK,4BAAS,OA8GL;AACT,gGA/GmC,kCAAe,OA+GnC;AA9GnB,4EAA0G;AAiGtG,4FAjGK,gCAAW,OAiGL;AACX,kGAlGuC,sCAAiB,OAkGvC;AAjGrB,yDAAoD;AAoKhD,4FApKK,2BAAW,OAoKL;AAnKf,2DAAsD;AAoKlD,6FApKK,6BAAY,OAoKL;AAnKhB,kEAA8D;AAqB1D,gGArBK,kCAAe,OAqBL;AApBnB,0EAAiE;AA4J7D,6FA5JK,iCAAY,OA4JL;AA1JhB,uFAAoH;AAmHhH,4FAnHK,iCAAW,OAmHL;AACX,kGApHuC,uCAAiB,OAoHvC;AAnHrB,oEAA0F;AAqHtF,wFArHK,wBAAO,OAqHL;AACP,8FAtH+B,8BAAa,OAsH/B;AArHjB,0EAAsE;AAiBlE,oGAjBK,0CAAmB,OAiBL;AAbvB,+FAAoI;AA2HhI,gGA3HK,yCAAe,OA2HL;AAFf,sGAzH+C,+CAAqB,OAyH/C;AAvHzB,gEAAuD;AAkDnD,wFAlDK,uBAAO,OAkDL;AAhDX,sEAA6D;AAiDzD,2FAjDK,6BAAU,OAiDL;AAhDd,yFAAwH;AA8GpH,mGA9GK,yCAAkB,OA8GL;AAElB,6FAhH+C,mCAAY,OAgH/C;AA/GhB,6EAAmG;AAgH/F,8FAhHK,8BAAa,OAgHL;AAEb,wFAlHqC,wBAAO,OAkHrC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupState = void 0;
|
|
4
|
+
var GroupState;
|
|
5
|
+
(function (GroupState) {
|
|
6
|
+
GroupState["Pending"] = "pending";
|
|
7
|
+
GroupState["InProgress"] = "in-progress";
|
|
8
|
+
GroupState["Finished"] = "finished";
|
|
9
|
+
})(GroupState || (exports.GroupState = GroupState = {}));
|
|
10
|
+
//# sourceMappingURL=group-state.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-state.enum.js","sourceRoot":"","sources":["../../../src/models/enums/group-state.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,iCAAmB,CAAA;IACnB,wCAA0B,CAAA;IAC1B,mCAAqB,CAAA;AACzB,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WeekDay = void 0;
|
|
4
|
+
var WeekDay;
|
|
5
|
+
(function (WeekDay) {
|
|
6
|
+
WeekDay[WeekDay["Monday"] = 1] = "Monday";
|
|
7
|
+
WeekDay[WeekDay["Tuesday"] = 2] = "Tuesday";
|
|
8
|
+
WeekDay[WeekDay["Wednesday"] = 3] = "Wednesday";
|
|
9
|
+
WeekDay[WeekDay["Thursday"] = 4] = "Thursday";
|
|
10
|
+
WeekDay[WeekDay["Friday"] = 5] = "Friday";
|
|
11
|
+
WeekDay[WeekDay["Saturday"] = 6] = "Saturday";
|
|
12
|
+
WeekDay[WeekDay["Sunday"] = 7] = "Sunday";
|
|
13
|
+
})(WeekDay || (exports.WeekDay = WeekDay = {}));
|
|
14
|
+
//# sourceMappingURL=week-day.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"week-day.enum.js","sourceRoot":"","sources":["../../../src/models/enums/week-day.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,OAQX;AARD,WAAY,OAAO;IACf,yCAAU,CAAA;IACV,2CAAW,CAAA;IACX,+CAAa,CAAA;IACb,6CAAY,CAAA;IACZ,yCAAU,CAAA;IACV,6CAAY,CAAA;IACZ,yCAAU,CAAA;AACd,CAAC,EARW,OAAO,uBAAP,OAAO,QAQlB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GroupState } from '../enums/group-state.enum';
|
|
2
|
+
import { IBase } from './base.interface';
|
|
3
|
+
import { IDictionary } from './dictionary.interface';
|
|
4
|
+
import { IGroupSession } from './group-session.interface';
|
|
5
|
+
import { II18n } from './i18n.interface';
|
|
6
|
+
import { IStudentEmbedded } from './student-embedded.interface';
|
|
7
|
+
import { ITeacher } from './teacher.interface';
|
|
8
|
+
export interface IGroupEmbedded extends IBase {
|
|
9
|
+
teacher: ITeacher;
|
|
10
|
+
students: IStudentEmbedded[];
|
|
11
|
+
sessions: IGroupSession[];
|
|
12
|
+
knowladgeLevels: IDictionary[];
|
|
13
|
+
description: II18n;
|
|
14
|
+
state: GroupState;
|
|
15
|
+
startDate: Date;
|
|
16
|
+
endDate: Date;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-embedded.interface.js","sourceRoot":"","sources":["../../../src/models/interfaces/group-embedded.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WeekDay } from '../enums/week-day.enum';
|
|
2
|
+
import { II18n } from './i18n.interface';
|
|
3
|
+
import { IIdentifable } from './identifable.interface';
|
|
4
|
+
export interface IGroupSession extends IIdentifable {
|
|
5
|
+
description: II18n;
|
|
6
|
+
day: WeekDay;
|
|
7
|
+
time: string;
|
|
8
|
+
timeZone: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-session.interface.js","sourceRoot":"","sources":["../../../src/models/interfaces/group-session.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parent.interface.js","sourceRoot":"","sources":["../../../src/models/interfaces/parent.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { IDictionary } from './dictionary.interface';
|
|
1
2
|
import { IResidence } from './residence.interface';
|
|
2
3
|
export interface IPerson {
|
|
3
4
|
pid?: string | null | undefined;
|
|
4
5
|
firstName: string;
|
|
5
6
|
lastName: string;
|
|
7
|
+
gender?: IDictionary | null | undefined;
|
|
6
8
|
birthDate?: Date | null | undefined;
|
|
7
9
|
residence?: IResidence | null | undefined;
|
|
8
10
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IDictionary } from "./dictionary.interface";
|
|
2
|
+
import { IIdentifable } from "./identifable.interface";
|
|
3
|
+
import { IParent } from "./parent.interface";
|
|
4
|
+
import { IPerson } from "./person.interface";
|
|
5
|
+
export interface IStudentEmbedded extends IIdentifable {
|
|
6
|
+
parent: IParent;
|
|
7
|
+
person: IPerson;
|
|
8
|
+
knowladgeLevel: IDictionary;
|
|
9
|
+
description?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"student-embedded.interface.js","sourceRoot":"","sources":["../../../src/models/interfaces/student-embedded.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teacher.interface.js","sourceRoot":"","sources":["../../../src/models/interfaces/teacher.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HydratedDocument } from 'mongoose';
|
|
2
|
+
import { Identifable } from '../identifable.schema';
|
|
3
|
+
import { IGroupSession } from '../../interfaces/group-session.interface';
|
|
4
|
+
import { WeekDay } from '../../enums/week-day.enum';
|
|
5
|
+
import { II18n } from '../../interfaces/i18n.interface';
|
|
6
|
+
export declare class GroupSession extends Identifable implements IGroupSession {
|
|
7
|
+
description: II18n;
|
|
8
|
+
day: WeekDay;
|
|
9
|
+
time: string;
|
|
10
|
+
timeZone: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const GroupSessionSchema: import("mongoose").Schema<GroupSession, import("mongoose").Model<GroupSession, any, any, any, import("mongoose").Document<unknown, any, GroupSession> & GroupSession & Required<{
|
|
13
|
+
_id: import("mongoose").Types.ObjectId;
|
|
14
|
+
}> & {
|
|
15
|
+
__v?: number;
|
|
16
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, GroupSession, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<GroupSession>> & import("mongoose").FlatRecord<GroupSession> & Required<{
|
|
17
|
+
_id: import("mongoose").Types.ObjectId;
|
|
18
|
+
}> & {
|
|
19
|
+
__v?: number;
|
|
20
|
+
}>;
|
|
21
|
+
export type GroupSessionDocument = HydratedDocument<GroupSession>;
|
|
@@ -0,0 +1,40 @@
|
|
|
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.GroupSessionSchema = exports.GroupSession = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const identifable_schema_1 = require("../identifable.schema");
|
|
15
|
+
const week_day_enum_1 = require("../../enums/week-day.enum");
|
|
16
|
+
const i18n_embedded_1 = require("./i18n.embedded");
|
|
17
|
+
let GroupSession = class GroupSession extends identifable_schema_1.Identifable {
|
|
18
|
+
};
|
|
19
|
+
exports.GroupSession = GroupSession;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, mongoose_1.Prop)({ type: i18n_embedded_1.I18nSchema, required: false }),
|
|
22
|
+
__metadata("design:type", Object)
|
|
23
|
+
], GroupSession.prototype, "description", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, mongoose_1.Prop)({ type: String, enum: week_day_enum_1.WeekDay, required: true }),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], GroupSession.prototype, "day", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], GroupSession.prototype, "time", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], GroupSession.prototype, "timeZone", void 0);
|
|
36
|
+
exports.GroupSession = GroupSession = __decorate([
|
|
37
|
+
(0, mongoose_1.Schema)()
|
|
38
|
+
], GroupSession);
|
|
39
|
+
exports.GroupSessionSchema = mongoose_1.SchemaFactory.createForClass(GroupSession);
|
|
40
|
+
//# sourceMappingURL=group-session.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-session.schema.js","sourceRoot":"","sources":["../../../../src/models/schemas/embedded/group-session.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAE/D,8DAAoD;AAEpD,6DAAoD;AACpD,mDAA6C;AAItC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,gCAAW;CAY5C,CAAA;AAZY,oCAAY;AAErB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,0BAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;iDACzB;AAGnB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACzC;AAGb;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC1B;AAGb;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACtB;uBAXR,YAAY;IADxB,IAAA,iBAAM,GAAE;GACI,YAAY,CAYxB;AAEY,QAAA,kBAAkB,GAAG,wBAAa,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { IPerson } from '../../interfaces/person.interface';
|
|
2
2
|
import { HydratedDocument } from 'mongoose';
|
|
3
3
|
import { IResidence } from '../../interfaces/residence.interface';
|
|
4
|
+
import { IDictionary } from '../../interfaces/dictionary.interface';
|
|
4
5
|
export declare class Person implements IPerson {
|
|
5
6
|
pid: string;
|
|
6
7
|
firstName: string;
|
|
7
8
|
lastName: string;
|
|
8
9
|
birthDate: Date;
|
|
10
|
+
gender: IDictionary;
|
|
9
11
|
residence: IResidence;
|
|
10
12
|
}
|
|
11
13
|
export declare const PersonSchema: import("mongoose").Schema<Person, import("mongoose").Model<Person, any, any, any, import("mongoose").Document<unknown, any, Person> & Person & {
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.PersonSchema = exports.Person = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const residence_schema_1 = require("./residence.schema");
|
|
15
|
+
const dictionary_embedded_schema_1 = require("./dictionary-embedded.schema");
|
|
15
16
|
let Person = class Person {
|
|
16
17
|
};
|
|
17
18
|
exports.Person = Person;
|
|
@@ -31,6 +32,10 @@ __decorate([
|
|
|
31
32
|
(0, mongoose_1.Prop)({ type: Date, required: false, default: null }),
|
|
32
33
|
__metadata("design:type", Date)
|
|
33
34
|
], Person.prototype, "birthDate", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, mongoose_1.Prop)({ type: dictionary_embedded_schema_1.DictionaryEmbeddedSchema, required: false }),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], Person.prototype, "gender", void 0);
|
|
34
39
|
__decorate([
|
|
35
40
|
(0, mongoose_1.Prop)({ type: residence_schema_1.ResidenceSchema, required: true, default: () => new residence_schema_1.Residence() }),
|
|
36
41
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.schema.js","sourceRoot":"","sources":["../../../../src/models/schemas/embedded/person.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAI/D,yDAAgE;
|
|
1
|
+
{"version":3,"file":"person.schema.js","sourceRoot":"","sources":["../../../../src/models/schemas/embedded/person.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAI/D,yDAAgE;AAChE,6EAAwE;AAIjE,IAAM,MAAM,GAAZ,MAAM,MAAM;CAkBlB,CAAA;AAlBY,wBAAM;AAEf;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;mCAC3C;AAGZ;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACrB;AAGlB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACtB;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC1C,IAAI;yCAAC;AAGhB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,qDAAwB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;sCACtC;AAGpB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,kCAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,4BAAS,EAAE,EAAE,CAAC;;yCAC1D;iBAjBb,MAAM;IADlB,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;GACV,MAAM,CAkBlB;AAEY,QAAA,YAAY,GAAG,wBAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HydratedDocument } from 'mongoose';
|
|
2
|
+
import { Identifable } from '../identifable.schema';
|
|
3
|
+
import { IStudentEmbedded } from '../../interfaces/student-embedded.interface';
|
|
4
|
+
import { IParent } from '../../interfaces/parent.interface';
|
|
5
|
+
import { IPerson } from '../../interfaces/person.interface';
|
|
6
|
+
import { IDictionary } from '../../interfaces/dictionary.interface';
|
|
7
|
+
export declare class StudentEmbedded extends Identifable implements IStudentEmbedded {
|
|
8
|
+
description: string;
|
|
9
|
+
parent: IParent;
|
|
10
|
+
person: IPerson;
|
|
11
|
+
knowladgeLevel: IDictionary;
|
|
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<{
|
|
14
|
+
_id: import("mongoose").Types.ObjectId;
|
|
15
|
+
}> & {
|
|
16
|
+
__v?: number;
|
|
17
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, StudentEmbedded, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<StudentEmbedded>> & import("mongoose").FlatRecord<StudentEmbedded> & Required<{
|
|
18
|
+
_id: import("mongoose").Types.ObjectId;
|
|
19
|
+
}> & {
|
|
20
|
+
__v?: number;
|
|
21
|
+
}>;
|
|
22
|
+
export type StudentEmbeddedDocument = HydratedDocument<StudentEmbedded>;
|
|
@@ -0,0 +1,41 @@
|
|
|
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.StudentEmbeddedSchema = exports.StudentEmbedded = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const identifable_schema_1 = require("../identifable.schema");
|
|
15
|
+
const dictionary_embedded_schema_1 = require("./dictionary-embedded.schema");
|
|
16
|
+
const person_schema_1 = require("./person.schema");
|
|
17
|
+
const parent_schema_1 = require("../parent.schema");
|
|
18
|
+
let StudentEmbedded = class StudentEmbedded extends identifable_schema_1.Identifable {
|
|
19
|
+
};
|
|
20
|
+
exports.StudentEmbedded = StudentEmbedded;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, mongoose_1.Prop)({ required: false, type: String }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], StudentEmbedded.prototype, "description", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, mongoose_1.Prop)({ type: parent_schema_1.ParentSchema, required: true }),
|
|
27
|
+
__metadata("design:type", Object)
|
|
28
|
+
], StudentEmbedded.prototype, "parent", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, mongoose_1.Prop)({ type: person_schema_1.PersonSchema, required: true }),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], StudentEmbedded.prototype, "person", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, mongoose_1.Prop)({ type: dictionary_embedded_schema_1.DictionaryEmbeddedSchema, required: true }),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], StudentEmbedded.prototype, "knowladgeLevel", void 0);
|
|
37
|
+
exports.StudentEmbedded = StudentEmbedded = __decorate([
|
|
38
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
39
|
+
], StudentEmbedded);
|
|
40
|
+
exports.StudentEmbeddedSchema = mongoose_1.SchemaFactory.createForClass(StudentEmbedded);
|
|
41
|
+
//# sourceMappingURL=student-embedded.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"student-embedded.schema.js","sourceRoot":"","sources":["../../../../src/models/schemas/embedded/student-embedded.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAE/D,8DAAoD;AAKpD,6EAAwE;AACxE,mDAA+C;AAC/C,oDAAgD;AAGzC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,gCAAW;CAY/C,CAAA;AAZY,0CAAe;AAExB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDACpB;AAGpB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,4BAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAC7B;AAGhB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,4BAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAC7B;AAGhB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,qDAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDAC7B;0BAXnB,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,17 @@
|
|
|
1
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
2
|
+
import { ITeacher } from '../../interfaces/teacher.interface';
|
|
3
|
+
import { IPerson } from '../../interfaces/person.interface';
|
|
4
|
+
export declare class Teacher implements ITeacher {
|
|
5
|
+
userId: Types.ObjectId | string;
|
|
6
|
+
person: IPerson;
|
|
7
|
+
}
|
|
8
|
+
export declare const TeacherSchema: MongooseSchema<Teacher, import("mongoose").Model<Teacher, any, any, any, import("mongoose").Document<unknown, any, Teacher> & Teacher & {
|
|
9
|
+
_id: Types.ObjectId;
|
|
10
|
+
} & {
|
|
11
|
+
__v?: number;
|
|
12
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Teacher, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Teacher>> & import("mongoose").FlatRecord<Teacher> & {
|
|
13
|
+
_id: Types.ObjectId;
|
|
14
|
+
} & {
|
|
15
|
+
__v?: number;
|
|
16
|
+
}>;
|
|
17
|
+
export type TeacherDocument = HydratedDocument<Teacher>;
|
|
@@ -0,0 +1,31 @@
|
|
|
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.TeacherSchema = exports.Teacher = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
const person_schema_1 = require("./person.schema");
|
|
16
|
+
let Teacher = class Teacher {
|
|
17
|
+
};
|
|
18
|
+
exports.Teacher = Teacher;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, required: true }),
|
|
21
|
+
__metadata("design:type", Object)
|
|
22
|
+
], Teacher.prototype, "userId", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, mongoose_1.Prop)({ type: person_schema_1.PersonSchema, required: true }),
|
|
25
|
+
__metadata("design:type", Object)
|
|
26
|
+
], Teacher.prototype, "person", void 0);
|
|
27
|
+
exports.Teacher = Teacher = __decorate([
|
|
28
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
29
|
+
], Teacher);
|
|
30
|
+
exports.TeacherSchema = mongoose_1.SchemaFactory.createForClass(Teacher);
|
|
31
|
+
//# sourceMappingURL=teacher.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teacher.schema.js","sourceRoot":"","sources":["../../../../src/models/schemas/embedded/teacher.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAA6E;AAG7E,mDAA+C;AAGxC,IAAM,OAAO,GAAb,MAAM,OAAO;CAMnB,CAAA;AANY,0BAAO;AAEhB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,iBAAc,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCAC9B;AAGhC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,4BAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCAC7B;kBALP,OAAO;IADnB,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;GACV,OAAO,CAMnB;AAEY,QAAA,aAAa,GAAG,wBAAa,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
2
|
+
import { IParent } from '../interfaces/parent.interface';
|
|
3
|
+
import { IContact } from '../interfaces/contact.interface';
|
|
4
|
+
import { IPerson } from '../interfaces/person.interface';
|
|
5
|
+
export declare class Parent implements IParent {
|
|
6
|
+
userId: string;
|
|
7
|
+
person: IPerson;
|
|
8
|
+
contacts: IContact[];
|
|
9
|
+
}
|
|
10
|
+
export declare const ParentSchema: MongooseSchema<Parent, import("mongoose").Model<Parent, any, any, any, import("mongoose").Document<unknown, any, Parent> & Parent & {
|
|
11
|
+
_id: Types.ObjectId;
|
|
12
|
+
} & {
|
|
13
|
+
__v?: number;
|
|
14
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Parent, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Parent>> & import("mongoose").FlatRecord<Parent> & {
|
|
15
|
+
_id: Types.ObjectId;
|
|
16
|
+
} & {
|
|
17
|
+
__v?: number;
|
|
18
|
+
}>;
|
|
19
|
+
export type ParentDocument = HydratedDocument<Parent>;
|
|
@@ -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.ParentSchema = exports.Parent = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
const contact_schema_1 = require("./embedded/contact.schema");
|
|
16
|
+
const person_schema_1 = require("./embedded/person.schema");
|
|
17
|
+
let Parent = class Parent {
|
|
18
|
+
};
|
|
19
|
+
exports.Parent = Parent;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, mongoose_1.Prop)({ required: true, type: mongoose_2.Schema.Types.ObjectId }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], Parent.prototype, "userId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, mongoose_1.Prop)({ type: person_schema_1.PersonSchema, required: true }),
|
|
26
|
+
__metadata("design:type", Object)
|
|
27
|
+
], Parent.prototype, "person", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, mongoose_1.Prop)({ type: [contact_schema_1.ContactSchema], required: true, default: [] }),
|
|
30
|
+
__metadata("design:type", Array)
|
|
31
|
+
], Parent.prototype, "contacts", void 0);
|
|
32
|
+
exports.Parent = Parent = __decorate([
|
|
33
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
34
|
+
], Parent);
|
|
35
|
+
exports.ParentSchema = mongoose_1.SchemaFactory.createForClass(Parent);
|
|
36
|
+
//# sourceMappingURL=parent.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parent.schema.js","sourceRoot":"","sources":["../../../src/models/schemas/parent.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAA6E;AAI7E,8DAA0D;AAC1D,4DAAwD;AAGjD,IAAM,MAAM,GAAZ,MAAM,MAAM;CASlB,CAAA;AATY,wBAAM;AAEf;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAc,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;;sCAC/C;AAGf;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,4BAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCAC7B;AAGhB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,8BAAa,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;wCACxC;iBARZ,MAAM;IADlB,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;GACV,MAAM,CASlB;AAEY,QAAA,YAAY,GAAG,wBAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -8,4 +8,5 @@ export declare class DictionariesService {
|
|
|
8
8
|
constructor(_httpService: HttpService, _configService: ConfigService);
|
|
9
9
|
fetchById(id: string): Promise<IDictionary>;
|
|
10
10
|
fetchByKeyword(keyword: string): Promise<IDictionary>;
|
|
11
|
+
validateIds(ids: string[]): Promise<IDictionary[]>;
|
|
11
12
|
}
|
|
@@ -15,6 +15,7 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const config_1 = require("@nestjs/config");
|
|
16
16
|
const rest_wrapper_class_1 = require("../models/dtos/wrappers/rest-wrapper.class");
|
|
17
17
|
const rxjs_1 = require("rxjs");
|
|
18
|
+
const mongoose_1 = require("mongoose");
|
|
18
19
|
let DictionariesService = class DictionariesService {
|
|
19
20
|
constructor(_httpService, _configService) {
|
|
20
21
|
this._httpService = _httpService;
|
|
@@ -32,7 +33,8 @@ let DictionariesService = class DictionariesService {
|
|
|
32
33
|
if (!response.data || !response.data.result) {
|
|
33
34
|
throw new rest_wrapper_class_1.RESTError('dictionaries_api_error', 'empty response');
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
+
const result = Object.assign(Object.assign({}, response.data.result.data), { _id: new mongoose_1.Types.ObjectId(response.data.result.data._id) });
|
|
37
|
+
return result;
|
|
36
38
|
}
|
|
37
39
|
catch (e) {
|
|
38
40
|
throw rest_wrapper_class_1.RESTError.createFromCatch(e, { keyword: 'unknown', debug: e });
|
|
@@ -49,7 +51,30 @@ let DictionariesService = class DictionariesService {
|
|
|
49
51
|
if (!response.data || !response.data.result) {
|
|
50
52
|
throw new rest_wrapper_class_1.RESTError('dictionaries_api_error', 'empty response');
|
|
51
53
|
}
|
|
52
|
-
|
|
54
|
+
const result = Object.assign(Object.assign({}, response.data.result.data), { _id: new mongoose_1.Types.ObjectId(response.data.result.data._id) });
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
catch (e) {
|
|
58
|
+
throw rest_wrapper_class_1.RESTError.createFromCatch(e, { keyword: 'unknown', debug: e });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async validateIds(ids) {
|
|
62
|
+
try {
|
|
63
|
+
const endpoint = `${this._baseUrl}/v1/dictionaries/validate/by-ids`;
|
|
64
|
+
const requestBody = { data: { ids } };
|
|
65
|
+
const response$ = this._httpService.post(endpoint, requestBody);
|
|
66
|
+
const response = await (0, rxjs_1.firstValueFrom)(response$);
|
|
67
|
+
if (response.data.errors) {
|
|
68
|
+
throw new rest_wrapper_class_1.RESTError('dictionaries_api_error', response.data.errors);
|
|
69
|
+
}
|
|
70
|
+
if (!response.data || !response.data.result) {
|
|
71
|
+
throw new rest_wrapper_class_1.RESTError('dictionaries_api_error', 'empty response');
|
|
72
|
+
}
|
|
73
|
+
const result = [];
|
|
74
|
+
for (let item of response.data.result.data) {
|
|
75
|
+
result.push(Object.assign(Object.assign({}, item), { _id: new mongoose_1.Types.ObjectId(item._id) }));
|
|
76
|
+
}
|
|
77
|
+
return result;
|
|
53
78
|
}
|
|
54
79
|
catch (e) {
|
|
55
80
|
throw rest_wrapper_class_1.RESTError.createFromCatch(e, { keyword: 'unknown', debug: e });
|