@eliasrrosa/tutorhub-public-assets 0.0.1
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/entities/AsaasCustomer.d.ts +14 -0
- package/dist/entities/AsaasCustomer.js +13 -0
- package/dist/entities/Class.d.ts +79 -0
- package/dist/entities/Class.js +30 -0
- package/dist/entities/ClassRequest.d.ts +15 -0
- package/dist/entities/ClassRequest.js +2 -0
- package/dist/entities/Contract.d.ts +40 -0
- package/dist/entities/Contract.js +2 -0
- package/dist/entities/Course.d.ts +34 -0
- package/dist/entities/Course.js +2 -0
- package/dist/entities/CourseToSchoolConnectionRequest.d.ts +10 -0
- package/dist/entities/CourseToSchoolConnectionRequest.js +2 -0
- package/dist/entities/Date.d.ts +56 -0
- package/dist/entities/Date.js +2 -0
- package/dist/entities/Date.test.d.ts +0 -0
- package/dist/entities/Date.test.js +23 -0
- package/dist/entities/DateTimeSlot.d.ts +6 -0
- package/dist/entities/DateTimeSlot.js +2 -0
- package/dist/entities/DateValidator.d.ts +3 -0
- package/dist/entities/DateValidator.js +2 -0
- package/dist/entities/File.d.ts +23 -0
- package/dist/entities/File.js +2 -0
- package/dist/entities/FreeTimeSlot.d.ts +19 -0
- package/dist/entities/FreeTimeSlot.js +12 -0
- package/dist/entities/GenericNotification.d.ts +11 -0
- package/dist/entities/GenericNotification.js +2 -0
- package/dist/entities/GoogleAuth.d.ts +8 -0
- package/dist/entities/GoogleAuth.js +2 -0
- package/dist/entities/GoogleCalendar.d.ts +10 -0
- package/dist/entities/GoogleCalendar.js +2 -0
- package/dist/entities/GoogleCalendarEvent.d.ts +10 -0
- package/dist/entities/GoogleCalendarEvent.js +2 -0
- package/dist/entities/ISO8601Date.d.ts +35 -0
- package/dist/entities/ISO8601Date.js +86 -0
- package/dist/entities/ISO8601Date.test.d.ts +1 -0
- package/dist/entities/ISO8601Date.test.js +210 -0
- package/dist/entities/ISO8601DateTime.d.ts +41 -0
- package/dist/entities/ISO8601DateTime.js +44 -0
- package/dist/entities/ISO8601DateTime.test.d.ts +1 -0
- package/dist/entities/ISO8601DateTime.test.js +146 -0
- package/dist/entities/ISO8601DateValidator.d.ts +13 -0
- package/dist/entities/ISO8601DateValidator.js +20 -0
- package/dist/entities/ISO8601DateValidator.test.d.ts +1 -0
- package/dist/entities/ISO8601DateValidator.test.js +15 -0
- package/dist/entities/ISO8601Time.d.ts +25 -0
- package/dist/entities/ISO8601Time.js +57 -0
- package/dist/entities/ISO8601Time.test.d.ts +1 -0
- package/dist/entities/ISO8601Time.test.js +63 -0
- package/dist/entities/ISO8601TimeValidator.d.ts +12 -0
- package/dist/entities/ISO8601TimeValidator.js +19 -0
- package/dist/entities/ISO8601TimeValidator.test.d.ts +1 -0
- package/dist/entities/ISO8601TimeValidator.test.js +42 -0
- package/dist/entities/PasswordRecovery.d.ts +6 -0
- package/dist/entities/PasswordRecovery.js +2 -0
- package/dist/entities/Payment.d.ts +42 -0
- package/dist/entities/Payment.js +2 -0
- package/dist/entities/PaymentRecognitionRequest.d.ts +12 -0
- package/dist/entities/PaymentRecognitionRequest.js +2 -0
- package/dist/entities/PreApprovedUser.d.ts +12 -0
- package/dist/entities/PreApprovedUser.js +2 -0
- package/dist/entities/RescheduleRequest.d.ts +16 -0
- package/dist/entities/RescheduleRequest.js +2 -0
- package/dist/entities/School.d.ts +31 -0
- package/dist/entities/School.js +2 -0
- package/dist/entities/SchoolConnection.d.ts +10 -0
- package/dist/entities/SchoolConnection.js +2 -0
- package/dist/entities/SchoolConnectionRequest.d.ts +7 -0
- package/dist/entities/SchoolConnectionRequest.js +2 -0
- package/dist/entities/SchoolStudent.d.ts +14 -0
- package/dist/entities/SchoolStudent.js +2 -0
- package/dist/entities/SchoolTeacher.d.ts +14 -0
- package/dist/entities/SchoolTeacher.js +2 -0
- package/dist/entities/Time.d.ts +9 -0
- package/dist/entities/Time.js +2 -0
- package/dist/entities/TimeSlot.d.ts +4 -0
- package/dist/entities/TimeSlot.js +2 -0
- package/dist/entities/TimeValidator.d.ts +3 -0
- package/dist/entities/TimeValidator.js +2 -0
- package/dist/entities/UnauthorizedUser.d.ts +16 -0
- package/dist/entities/UnauthorizedUser.js +2 -0
- package/dist/entities/UserAuth.d.ts +72 -0
- package/dist/entities/UserAuth.js +2 -0
- package/dist/entities/UserConnection.d.ts +8 -0
- package/dist/entities/UserConnection.js +2 -0
- package/dist/entities/UserConnectionRequest.d.ts +9 -0
- package/dist/entities/UserConnectionRequest.js +2 -0
- package/dist/entities/UserCredentials.d.ts +16 -0
- package/dist/entities/UserCredentials.js +11 -0
- package/dist/entities/UserNavigation.d.ts +8 -0
- package/dist/entities/UserNavigation.js +2 -0
- package/dist/entities/UserPreferences.d.ts +6 -0
- package/dist/entities/UserPreferences.js +2 -0
- package/dist/entities/UserPremium.d.ts +13 -0
- package/dist/entities/UserPremium.js +2 -0
- package/dist/entities/UserProfile.d.ts +9 -0
- package/dist/entities/UserProfile.js +2 -0
- package/dist/entities/UserRoles.d.ts +11 -0
- package/dist/entities/UserRoles.js +2 -0
- package/dist/entities/UserSharedFileTimestamps.d.ts +9 -0
- package/dist/entities/UserSharedFileTimestamps.js +2 -0
- package/dist/entities/UserUnavailableTime.d.ts +49 -0
- package/dist/entities/UserUnavailableTime.js +32 -0
- package/dist/entities/UserUnavailableTime.test.d.ts +1 -0
- package/dist/entities/UserUnavailableTime.test.js +22 -0
- package/dist/repositories/UnavailableTimeRepository.d.ts +20 -0
- package/dist/repositories/UnavailableTimeRepository.js +2 -0
- package/package.json +33 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ISO8601TimeValidator = void 0;
|
|
4
|
+
class ISO8601TimeValidator {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.hhMMssPattern = new RegExp("^([0-1][0-9]|[2][0-3]):[0-5][0-9]:[0-5][0-9]$");
|
|
7
|
+
this.hhMMPattern = new RegExp("^([0-1][0-9]|[2][0-3]):[0-5][0-9]$");
|
|
8
|
+
}
|
|
9
|
+
formatIsValid(time) {
|
|
10
|
+
return this.isHHmm(time) || this.isHHmmSS(time);
|
|
11
|
+
}
|
|
12
|
+
isHHmmSS(time) {
|
|
13
|
+
return this.hhMMssPattern.test(time);
|
|
14
|
+
}
|
|
15
|
+
isHHmm(time) {
|
|
16
|
+
return this.hhMMPattern.test(time);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ISO8601TimeValidator = ISO8601TimeValidator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ISO8601TimeValidator_1 = require("./ISO8601TimeValidator");
|
|
4
|
+
describe("ISO8601TimeValidator", () => {
|
|
5
|
+
const validator = new ISO8601TimeValidator_1.ISO8601TimeValidator();
|
|
6
|
+
describe("ISO8601TimeValidator.formatIsValid()", () => {
|
|
7
|
+
it("Should not accept ISO8601 timestamp with offset.", () => {
|
|
8
|
+
const time = "00:00:00-03:00";
|
|
9
|
+
expect(validator.formatIsValid(time)).toBe(false);
|
|
10
|
+
});
|
|
11
|
+
it("Should not accept ISO8601 format with timestamp.", () => {
|
|
12
|
+
const time = "00:00:00-02:00";
|
|
13
|
+
expect(validator.formatIsValid(time)).toBe(false);
|
|
14
|
+
});
|
|
15
|
+
it("Should not accept non-ISO8601 formats.", () => {
|
|
16
|
+
const moreCharactersAtTheEnd = "00:00:00-03:000";
|
|
17
|
+
const moreCharactersAtTheStart = "000:00:00-03:00";
|
|
18
|
+
expect(validator.formatIsValid(moreCharactersAtTheEnd)).toBe(false);
|
|
19
|
+
expect(validator.formatIsValid(moreCharactersAtTheStart)).toBe(false);
|
|
20
|
+
});
|
|
21
|
+
it("Should accept HH:MM format", () => {
|
|
22
|
+
const time = "00:00";
|
|
23
|
+
expect(validator.formatIsValid(time)).toBe(true);
|
|
24
|
+
});
|
|
25
|
+
it("Should accept HH:MM:SS format", () => {
|
|
26
|
+
const time = "00:00:00";
|
|
27
|
+
expect(validator.formatIsValid(time)).toBe(true);
|
|
28
|
+
});
|
|
29
|
+
it("Should not accept hours over 23", () => {
|
|
30
|
+
const time = "24:00:00";
|
|
31
|
+
expect(validator.formatIsValid(time)).toBe(false);
|
|
32
|
+
});
|
|
33
|
+
it("Should not accept minutes over 59", () => {
|
|
34
|
+
const time = "00:60:00";
|
|
35
|
+
expect(validator.formatIsValid(time)).toBe(false);
|
|
36
|
+
});
|
|
37
|
+
it("Should not accept seconds over 59", () => {
|
|
38
|
+
const time = "00:00:60";
|
|
39
|
+
expect(validator.formatIsValid(time)).toBe(false);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IClass } from "./Class";
|
|
2
|
+
import { IContract } from "./Contract";
|
|
3
|
+
import { ICourse } from "./Course";
|
|
4
|
+
import { IFile } from "./File";
|
|
5
|
+
import { IPaymentRecognitionRequest } from "./PaymentRecognitionRequest";
|
|
6
|
+
import { IPreApprovedUser } from "./PreApprovedUser";
|
|
7
|
+
import { ISchool } from "./School";
|
|
8
|
+
import { IUserAuth } from "./UserAuth";
|
|
9
|
+
export interface IPayment {
|
|
10
|
+
id: string;
|
|
11
|
+
title: string | null;
|
|
12
|
+
fileId: string | null;
|
|
13
|
+
value: number;
|
|
14
|
+
currency: string;
|
|
15
|
+
description: string | null;
|
|
16
|
+
creatorId: string | null;
|
|
17
|
+
confirmed: boolean;
|
|
18
|
+
createdAt: Date | null;
|
|
19
|
+
updatedAt: Date | null;
|
|
20
|
+
payerId: string | null;
|
|
21
|
+
payeeId: string | null;
|
|
22
|
+
schoolPayerId: string | null;
|
|
23
|
+
schoolPayeeId: string | null;
|
|
24
|
+
preApprovedUserPayerEmail: string | null;
|
|
25
|
+
payerConfirmed: boolean | null;
|
|
26
|
+
payeeConfirmed: boolean | null;
|
|
27
|
+
status: string | null;
|
|
28
|
+
courseId: string | null;
|
|
29
|
+
classId: string | null;
|
|
30
|
+
contractId: string | null;
|
|
31
|
+
dueDate: Date | null;
|
|
32
|
+
file?: IFile;
|
|
33
|
+
payer?: IUserAuth;
|
|
34
|
+
schoolPayer?: ISchool;
|
|
35
|
+
preApprovedUserPayer?: IPreApprovedUser;
|
|
36
|
+
payee?: IUserAuth;
|
|
37
|
+
schoolPayee?: ISchool;
|
|
38
|
+
course?: ICourse;
|
|
39
|
+
classes?: IClass[];
|
|
40
|
+
contract?: IContract;
|
|
41
|
+
recognitionRequests?: IPaymentRecognitionRequest[];
|
|
42
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IPayment } from "./Payment";
|
|
2
|
+
import { IUserAuth } from "./UserAuth";
|
|
3
|
+
import { ISchool } from "./School";
|
|
4
|
+
export interface IPaymentRecognitionRequest {
|
|
5
|
+
id: string;
|
|
6
|
+
paymentId: string;
|
|
7
|
+
requestedUserId: string | null;
|
|
8
|
+
requestedSchoolId: string | null;
|
|
9
|
+
payment?: IPayment;
|
|
10
|
+
requestedUser?: IUserAuth | null;
|
|
11
|
+
requestedSchool?: ISchool | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IUserAuth } from "./UserAuth";
|
|
2
|
+
import { IPayment } from "./Payment";
|
|
3
|
+
import { IContract } from "./Contract";
|
|
4
|
+
import { ICourse } from "./Course";
|
|
5
|
+
export interface IPreApprovedUser {
|
|
6
|
+
email: string;
|
|
7
|
+
creatorId: string | null;
|
|
8
|
+
creator?: IUserAuth | null;
|
|
9
|
+
paymentsMade?: IPayment[];
|
|
10
|
+
contractsContracted?: IContract[];
|
|
11
|
+
enrolledCourses?: ICourse[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IClass } from "./Class";
|
|
2
|
+
import { IUserAuth } from "./UserAuth";
|
|
3
|
+
import { IUserUnavailableTime } from "./UserUnavailableTime";
|
|
4
|
+
export interface IRescheduleRequest {
|
|
5
|
+
id: string;
|
|
6
|
+
isRecurrent: boolean;
|
|
7
|
+
requesterId: string;
|
|
8
|
+
targetClassId: string;
|
|
9
|
+
targetAvailableTimeId: string;
|
|
10
|
+
createdAt: Date | null;
|
|
11
|
+
requester?: IUserAuth;
|
|
12
|
+
targetClass?: IClass;
|
|
13
|
+
targetAvailableTime?: IUserUnavailableTime;
|
|
14
|
+
usersThatAccepted?: IUserAuth[];
|
|
15
|
+
usersThatDenied?: IUserAuth[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IUserAuth } from "./UserAuth";
|
|
2
|
+
import { ICourse } from "./Course";
|
|
3
|
+
import { IContract } from "./Contract";
|
|
4
|
+
import { IPayment } from "./Payment";
|
|
5
|
+
import { ISchoolStudent } from "./SchoolStudent";
|
|
6
|
+
import { ISchoolTeacher } from "./SchoolTeacher";
|
|
7
|
+
import { ISchoolConnection } from "./SchoolConnection";
|
|
8
|
+
import { IPaymentRecognitionRequest } from "./PaymentRecognitionRequest";
|
|
9
|
+
import { ICourseToSchoolConnectionRequest } from "./CourseToSchoolConnectionRequest";
|
|
10
|
+
export interface ISchool {
|
|
11
|
+
id: string;
|
|
12
|
+
creatorId: string;
|
|
13
|
+
ownerId: string;
|
|
14
|
+
title: string;
|
|
15
|
+
createdAt: Date | null;
|
|
16
|
+
updatedAt: Date | null;
|
|
17
|
+
creator?: IUserAuth;
|
|
18
|
+
owner?: IUserAuth;
|
|
19
|
+
courses?: ICourse[];
|
|
20
|
+
contracts?: IContract[];
|
|
21
|
+
students?: ISchoolStudent[];
|
|
22
|
+
teachers?: ISchoolTeacher[];
|
|
23
|
+
paymentsMade?: IPayment[];
|
|
24
|
+
paymentsReceived?: IPayment[];
|
|
25
|
+
requestedPaymentRecognition?: IPaymentRecognitionRequest[];
|
|
26
|
+
connections1?: ISchoolConnection[];
|
|
27
|
+
connections2?: ISchoolConnection[];
|
|
28
|
+
courseToSchoolConnectionRequests?: ICourseToSchoolConnectionRequest[];
|
|
29
|
+
contractedContracts?: IContract[];
|
|
30
|
+
offeredContracts?: IContract[];
|
|
31
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ISchool } from "./School";
|
|
2
|
+
import { ISchoolConnectionRequest } from "./SchoolConnectionRequest";
|
|
3
|
+
export interface ISchoolConnection {
|
|
4
|
+
requestingSchoolId: string;
|
|
5
|
+
requestedSchoolId: string;
|
|
6
|
+
accepted: boolean;
|
|
7
|
+
requestingSchool?: ISchool;
|
|
8
|
+
requestedSchool?: ISchool;
|
|
9
|
+
connectionRequests?: ISchoolConnectionRequest | null;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IUserAuth } from "./UserAuth";
|
|
2
|
+
import { ISchool } from "./School";
|
|
3
|
+
export interface ISchoolStudent {
|
|
4
|
+
studentId: string;
|
|
5
|
+
schoolId: string;
|
|
6
|
+
status: string;
|
|
7
|
+
updatedAt: Date;
|
|
8
|
+
joinedAt: Date;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
creatorId: string;
|
|
11
|
+
student?: IUserAuth;
|
|
12
|
+
school?: ISchool;
|
|
13
|
+
creator?: IUserAuth;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IUserAuth } from "./UserAuth";
|
|
2
|
+
import { ISchool } from "./School";
|
|
3
|
+
export interface ISchoolTeacher {
|
|
4
|
+
teacherId: string;
|
|
5
|
+
schoolId: string;
|
|
6
|
+
status: string;
|
|
7
|
+
joinedAt: Date;
|
|
8
|
+
updatedAt: Date;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
creatorId: string;
|
|
11
|
+
teacher?: IUserAuth;
|
|
12
|
+
school?: ISchool;
|
|
13
|
+
creator?: IUserAuth;
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IUserRoles } from "./UserRoles";
|
|
2
|
+
export interface IUnauthorizedUser {
|
|
3
|
+
id: string;
|
|
4
|
+
email: string;
|
|
5
|
+
name: string;
|
|
6
|
+
password?: string;
|
|
7
|
+
authorizationKey: string;
|
|
8
|
+
googleAccessToken?: string;
|
|
9
|
+
googleRefreshToken?: string;
|
|
10
|
+
invitingTeacherId?: string;
|
|
11
|
+
invitingCourseId?: string;
|
|
12
|
+
availableTimeId?: string;
|
|
13
|
+
role?: IUserRoles;
|
|
14
|
+
authorized: boolean;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { IClassRequest } from "./ClassRequest";
|
|
2
|
+
import { IContract } from "./Contract";
|
|
3
|
+
import { ICourse } from "./Course";
|
|
4
|
+
import { IFile } from "./File";
|
|
5
|
+
import { IGenericNotification } from "./GenericNotification";
|
|
6
|
+
import { IGoogleAuth } from "./GoogleAuth";
|
|
7
|
+
import { IGoogleCalendarEvent } from "./GoogleCalendarEvent";
|
|
8
|
+
import { IPasswordRecovery } from "./PasswordRecovery";
|
|
9
|
+
import { IPayment } from "./Payment";
|
|
10
|
+
import { IPaymentRecognitionRequest } from "./PaymentRecognitionRequest";
|
|
11
|
+
import { IPreApprovedUser } from "./PreApprovedUser";
|
|
12
|
+
import { IRescheduleRequest } from "./RescheduleRequest";
|
|
13
|
+
import { ISchool } from "./School";
|
|
14
|
+
import { ISchoolStudent } from "./SchoolStudent";
|
|
15
|
+
import { ISchoolTeacher } from "./SchoolTeacher";
|
|
16
|
+
import { IUserConnection } from "./UserConnection";
|
|
17
|
+
import { IUserConnectionRequest } from "./UserConnectionRequest";
|
|
18
|
+
import { IUserNavigation } from "./UserNavigation";
|
|
19
|
+
import { IUserPreferences } from "./UserPreferences";
|
|
20
|
+
import { IUserPremium } from "./UserPremium";
|
|
21
|
+
import { IUserProfile } from "./UserProfile";
|
|
22
|
+
import { IUserRoles } from "./UserRoles";
|
|
23
|
+
import { IUserSharedFileTimestamps } from "./UserSharedFileTimestamps";
|
|
24
|
+
import { IUserUnavailableTime } from "./UserUnavailableTime";
|
|
25
|
+
export interface IUserAuth {
|
|
26
|
+
id: string;
|
|
27
|
+
email: string;
|
|
28
|
+
password: string | null;
|
|
29
|
+
createdAt: Date | null;
|
|
30
|
+
updatedAt: Date | null;
|
|
31
|
+
role?: IUserRoles | null;
|
|
32
|
+
userProfile?: IUserProfile | null;
|
|
33
|
+
userNavigation?: IUserNavigation | null;
|
|
34
|
+
ownedCourses?: ICourse[];
|
|
35
|
+
engagedCourses?: ICourse[];
|
|
36
|
+
paymentsMade?: IPayment[];
|
|
37
|
+
paymentsReceived?: IPayment[];
|
|
38
|
+
uploadedFiles?: IFile[];
|
|
39
|
+
sharedFiles?: IFile[];
|
|
40
|
+
UserSharedFileTimestamps?: IUserSharedFileTimestamps[];
|
|
41
|
+
sentConnectionRequests?: IUserConnectionRequest[];
|
|
42
|
+
receivedConnectionRequests?: IUserConnectionRequest[];
|
|
43
|
+
connections1?: IUserConnection[];
|
|
44
|
+
connections2?: IUserConnection[];
|
|
45
|
+
unavailableTime?: IUserUnavailableTime[];
|
|
46
|
+
classRequestsSent?: IClassRequest[];
|
|
47
|
+
classRequestsReceived?: IClassRequest[];
|
|
48
|
+
notificationsSent?: IGenericNotification[];
|
|
49
|
+
notificationsReceived?: IGenericNotification[];
|
|
50
|
+
notificationsSeen?: IGenericNotification[];
|
|
51
|
+
premium?: IUserPremium | null;
|
|
52
|
+
passwordRecovery?: IPasswordRecovery | null;
|
|
53
|
+
rescheduleRequestsSent?: IRescheduleRequest[];
|
|
54
|
+
rescheduleRequestsAccepted?: IRescheduleRequest[];
|
|
55
|
+
rescheduleRequestsDenied?: IRescheduleRequest[];
|
|
56
|
+
googleCalendar?: IGoogleCalendarEvent | null;
|
|
57
|
+
preferences?: IUserPreferences | null;
|
|
58
|
+
googleAuth?: IGoogleAuth | null;
|
|
59
|
+
contractorContracts?: IContract[];
|
|
60
|
+
contractantContracts?: IContract[];
|
|
61
|
+
responsibleTeacherContracts?: IContract[];
|
|
62
|
+
createdContracts?: IContract[];
|
|
63
|
+
createdSchools?: ISchool[];
|
|
64
|
+
ownedSchools?: ISchool[];
|
|
65
|
+
studentProfiles?: ISchoolStudent[];
|
|
66
|
+
schoolStudentsCreated?: ISchoolStudent[];
|
|
67
|
+
schoolTeacherProfiles?: ISchoolTeacher[];
|
|
68
|
+
schoolTeachersCreated?: ISchoolTeacher[];
|
|
69
|
+
requestedPaymentRecognition?: IPaymentRecognitionRequest[];
|
|
70
|
+
createdPreApprovedUsers?: IPreApprovedUser[];
|
|
71
|
+
coursesTaught?: ICourse[];
|
|
72
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IUserAuth } from "./UserAuth";
|
|
2
|
+
export interface IUserCredentials {
|
|
3
|
+
user: IUserAuth;
|
|
4
|
+
email: string;
|
|
5
|
+
password: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class UserCredentials implements IUserCredentials {
|
|
8
|
+
user: IUserAuth;
|
|
9
|
+
email: string;
|
|
10
|
+
password: string;
|
|
11
|
+
constructor(opts: {
|
|
12
|
+
email: string;
|
|
13
|
+
password: string;
|
|
14
|
+
user: IUserAuth;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserCredentials = void 0;
|
|
4
|
+
class UserCredentials {
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
this.email = opts.email;
|
|
7
|
+
this.password = opts.password;
|
|
8
|
+
this.user = opts.user;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.UserCredentials = UserCredentials;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IUserAuth } from "./UserAuth";
|
|
2
|
+
export interface IUserPremium {
|
|
3
|
+
id: string;
|
|
4
|
+
userId: string | null;
|
|
5
|
+
user?: IUserAuth | null;
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
stripeEmail: string | null;
|
|
8
|
+
stripeSubscriptionId: string | null;
|
|
9
|
+
stripeCostumerId: string | null;
|
|
10
|
+
stripeLastChargeId: string | null;
|
|
11
|
+
createdAt: Date | null;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IUnauthorizedUser } from "./UnauthorizedUser";
|
|
2
|
+
import { IUserAuth } from "./UserAuth";
|
|
3
|
+
export interface IUserRoles {
|
|
4
|
+
userId: string;
|
|
5
|
+
teacher: boolean;
|
|
6
|
+
student: boolean;
|
|
7
|
+
admin: boolean;
|
|
8
|
+
superUser: boolean | null;
|
|
9
|
+
user?: IUserAuth;
|
|
10
|
+
unauthorizedUser?: IUnauthorizedUser;
|
|
11
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { IUserAuth } from "./UserAuth";
|
|
2
|
+
import { ICourse } from "./Course";
|
|
3
|
+
import { IRescheduleRequest } from "./RescheduleRequest";
|
|
4
|
+
import { IDateTimeSlot } from "./DateTimeSlot";
|
|
5
|
+
import { IDate } from "./Date";
|
|
6
|
+
export interface IUserUnavailableTime {
|
|
7
|
+
id: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
user?: IUserAuth;
|
|
10
|
+
groupId: string;
|
|
11
|
+
date: IDate;
|
|
12
|
+
dayOfTheWeek: number;
|
|
13
|
+
startTime: string;
|
|
14
|
+
endTime: string;
|
|
15
|
+
isAvailableTime: boolean;
|
|
16
|
+
course?: ICourse;
|
|
17
|
+
courseId: string | null;
|
|
18
|
+
rescheduleRequests?: IRescheduleRequest[];
|
|
19
|
+
getDateTimeSlot: () => IDateTimeSlot;
|
|
20
|
+
}
|
|
21
|
+
export declare class UserUnavailableTime implements IUserUnavailableTime {
|
|
22
|
+
id: string;
|
|
23
|
+
userId: string;
|
|
24
|
+
user?: IUserAuth;
|
|
25
|
+
groupId: string;
|
|
26
|
+
date: IDate;
|
|
27
|
+
startTime: string;
|
|
28
|
+
endTime: string;
|
|
29
|
+
isAvailableTime: boolean;
|
|
30
|
+
dayOfTheWeek: number;
|
|
31
|
+
course?: ICourse;
|
|
32
|
+
courseId: string | null;
|
|
33
|
+
rescheduleRequests?: IRescheduleRequest[];
|
|
34
|
+
constructor(opts: {
|
|
35
|
+
id: string;
|
|
36
|
+
userId: string;
|
|
37
|
+
user?: IUserAuth;
|
|
38
|
+
groupId: string;
|
|
39
|
+
date: IDate;
|
|
40
|
+
startTime: string;
|
|
41
|
+
endTime: string;
|
|
42
|
+
isAvailableTime: boolean;
|
|
43
|
+
course?: ICourse;
|
|
44
|
+
courseId: string | null;
|
|
45
|
+
rescheduleRequests?: IRescheduleRequest[];
|
|
46
|
+
});
|
|
47
|
+
private getDayOfTheWeek;
|
|
48
|
+
getDateTimeSlot: () => IDateTimeSlot;
|
|
49
|
+
}
|