@eliasrrosa/tutorhub-public-assets 0.0.2 → 0.0.4
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.cjs +341 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +21 -0
- package/package.json +14 -4
- package/dist/entities/AsaasCustomer.d.ts +0 -14
- package/dist/entities/AsaasCustomer.js +0 -13
- package/dist/entities/Class.d.ts +0 -79
- package/dist/entities/Class.js +0 -30
- package/dist/entities/ClassRequest.d.ts +0 -15
- package/dist/entities/ClassRequest.js +0 -2
- package/dist/entities/Contract.d.ts +0 -40
- package/dist/entities/Contract.js +0 -2
- package/dist/entities/Course.d.ts +0 -34
- package/dist/entities/Course.js +0 -2
- package/dist/entities/CourseToSchoolConnectionRequest.d.ts +0 -10
- package/dist/entities/CourseToSchoolConnectionRequest.js +0 -2
- package/dist/entities/Date.d.ts +0 -56
- package/dist/entities/Date.js +0 -2
- package/dist/entities/Date.test.d.ts +0 -0
- package/dist/entities/Date.test.js +0 -23
- package/dist/entities/DateTimeSlot.d.ts +0 -6
- package/dist/entities/DateTimeSlot.js +0 -2
- package/dist/entities/DateValidator.d.ts +0 -3
- package/dist/entities/DateValidator.js +0 -2
- package/dist/entities/File.d.ts +0 -23
- package/dist/entities/File.js +0 -2
- package/dist/entities/FreeTimeSlot.d.ts +0 -19
- package/dist/entities/FreeTimeSlot.js +0 -12
- package/dist/entities/GenericNotification.d.ts +0 -11
- package/dist/entities/GenericNotification.js +0 -2
- package/dist/entities/GoogleAuth.d.ts +0 -8
- package/dist/entities/GoogleAuth.js +0 -2
- package/dist/entities/GoogleCalendar.d.ts +0 -10
- package/dist/entities/GoogleCalendar.js +0 -2
- package/dist/entities/GoogleCalendarEvent.d.ts +0 -10
- package/dist/entities/GoogleCalendarEvent.js +0 -2
- package/dist/entities/ISO8601Date.d.ts +0 -35
- package/dist/entities/ISO8601Date.js +0 -86
- package/dist/entities/ISO8601Date.test.d.ts +0 -1
- package/dist/entities/ISO8601Date.test.js +0 -210
- package/dist/entities/ISO8601DateTime.d.ts +0 -41
- package/dist/entities/ISO8601DateTime.js +0 -44
- package/dist/entities/ISO8601DateTime.test.d.ts +0 -1
- package/dist/entities/ISO8601DateTime.test.js +0 -146
- package/dist/entities/ISO8601DateValidator.d.ts +0 -13
- package/dist/entities/ISO8601DateValidator.js +0 -20
- package/dist/entities/ISO8601DateValidator.test.d.ts +0 -1
- package/dist/entities/ISO8601DateValidator.test.js +0 -15
- package/dist/entities/ISO8601Time.d.ts +0 -25
- package/dist/entities/ISO8601Time.js +0 -57
- package/dist/entities/ISO8601Time.test.d.ts +0 -1
- package/dist/entities/ISO8601Time.test.js +0 -63
- package/dist/entities/ISO8601TimeValidator.d.ts +0 -12
- package/dist/entities/ISO8601TimeValidator.js +0 -19
- package/dist/entities/ISO8601TimeValidator.test.d.ts +0 -1
- package/dist/entities/ISO8601TimeValidator.test.js +0 -42
- package/dist/entities/PasswordRecovery.d.ts +0 -6
- package/dist/entities/PasswordRecovery.js +0 -2
- package/dist/entities/Payment.d.ts +0 -42
- package/dist/entities/Payment.js +0 -2
- package/dist/entities/PaymentRecognitionRequest.d.ts +0 -12
- package/dist/entities/PaymentRecognitionRequest.js +0 -2
- package/dist/entities/PreApprovedUser.d.ts +0 -12
- package/dist/entities/PreApprovedUser.js +0 -2
- package/dist/entities/RescheduleRequest.d.ts +0 -16
- package/dist/entities/RescheduleRequest.js +0 -2
- package/dist/entities/School.d.ts +0 -31
- package/dist/entities/School.js +0 -2
- package/dist/entities/SchoolConnection.d.ts +0 -10
- package/dist/entities/SchoolConnection.js +0 -2
- package/dist/entities/SchoolConnectionRequest.d.ts +0 -7
- package/dist/entities/SchoolConnectionRequest.js +0 -2
- package/dist/entities/SchoolStudent.d.ts +0 -14
- package/dist/entities/SchoolStudent.js +0 -2
- package/dist/entities/SchoolTeacher.d.ts +0 -14
- package/dist/entities/SchoolTeacher.js +0 -2
- package/dist/entities/Time.d.ts +0 -9
- package/dist/entities/Time.js +0 -2
- package/dist/entities/TimeSlot.d.ts +0 -4
- package/dist/entities/TimeSlot.js +0 -2
- package/dist/entities/TimeValidator.d.ts +0 -3
- package/dist/entities/TimeValidator.js +0 -2
- package/dist/entities/UnauthorizedUser.d.ts +0 -16
- package/dist/entities/UnauthorizedUser.js +0 -2
- package/dist/entities/UserAuth.d.ts +0 -72
- package/dist/entities/UserAuth.js +0 -2
- package/dist/entities/UserConnection.d.ts +0 -8
- package/dist/entities/UserConnection.js +0 -2
- package/dist/entities/UserConnectionRequest.d.ts +0 -9
- package/dist/entities/UserConnectionRequest.js +0 -2
- package/dist/entities/UserCredentials.d.ts +0 -16
- package/dist/entities/UserCredentials.js +0 -11
- package/dist/entities/UserNavigation.d.ts +0 -8
- package/dist/entities/UserNavigation.js +0 -2
- package/dist/entities/UserPreferences.d.ts +0 -6
- package/dist/entities/UserPreferences.js +0 -2
- package/dist/entities/UserPremium.d.ts +0 -13
- package/dist/entities/UserPremium.js +0 -2
- package/dist/entities/UserProfile.d.ts +0 -9
- package/dist/entities/UserProfile.js +0 -2
- package/dist/entities/UserRoles.d.ts +0 -11
- package/dist/entities/UserRoles.js +0 -2
- package/dist/entities/UserSharedFileTimestamps.d.ts +0 -9
- package/dist/entities/UserSharedFileTimestamps.js +0 -2
- package/dist/entities/UserUnavailableTime.d.ts +0 -49
- package/dist/entities/UserUnavailableTime.js +0 -32
- package/dist/entities/UserUnavailableTime.test.d.ts +0 -1
- package/dist/entities/UserUnavailableTime.test.js +0 -22
- package/dist/repositories/UnavailableTimeRepository.d.ts +0 -20
- package/dist/repositories/UnavailableTimeRepository.js +0 -2
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/entities/School.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/entities/Time.d.ts
DELETED
package/dist/entities/Time.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserUnavailableTime = void 0;
|
|
4
|
-
class UserUnavailableTime {
|
|
5
|
-
constructor(opts) {
|
|
6
|
-
this.getDateTimeSlot = () => {
|
|
7
|
-
return {
|
|
8
|
-
date: this.date,
|
|
9
|
-
timeSlot: {
|
|
10
|
-
endTime: this.endTime,
|
|
11
|
-
startTime: this.startTime,
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
this.id = opts.id;
|
|
16
|
-
this.userId = opts.userId;
|
|
17
|
-
this.user = opts.user;
|
|
18
|
-
this.groupId = opts.groupId;
|
|
19
|
-
this.date = opts.date;
|
|
20
|
-
this.dayOfTheWeek = this.getDayOfTheWeek();
|
|
21
|
-
this.startTime = opts.startTime;
|
|
22
|
-
this.endTime = opts.endTime;
|
|
23
|
-
this.isAvailableTime = opts.isAvailableTime;
|
|
24
|
-
this.course = opts.course;
|
|
25
|
-
this.courseId = opts.courseId;
|
|
26
|
-
this.rescheduleRequests = opts.rescheduleRequests;
|
|
27
|
-
}
|
|
28
|
-
getDayOfTheWeek() {
|
|
29
|
-
return this.date.getDayOfTheWeek();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.UserUnavailableTime = UserUnavailableTime;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const ISO8601Date_1 = require("./ISO8601Date");
|
|
4
|
-
const UserUnavailableTime_1 = require("./UserUnavailableTime");
|
|
5
|
-
describe("UserUnavailableTime", () => {
|
|
6
|
-
const availableTime = new UserUnavailableTime_1.UserUnavailableTime({
|
|
7
|
-
courseId: "courseId",
|
|
8
|
-
date: new ISO8601Date_1.ISO8601Date("2025-01-01"),
|
|
9
|
-
endTime: "15:00",
|
|
10
|
-
startTime: "14:00",
|
|
11
|
-
groupId: "groupId",
|
|
12
|
-
id: "id",
|
|
13
|
-
isAvailableTime: true,
|
|
14
|
-
userId: "userId",
|
|
15
|
-
});
|
|
16
|
-
it("Should be instantiable.", () => {
|
|
17
|
-
expect(availableTime).toBeDefined();
|
|
18
|
-
});
|
|
19
|
-
it("Should contain the proper dayOfTheWeek.", () => {
|
|
20
|
-
expect(availableTime.dayOfTheWeek).toBe(3);
|
|
21
|
-
});
|
|
22
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IUserUnavailableTime } from "../entities/UserUnavailableTime";
|
|
2
|
-
export interface IUnavailableTimeRepository {
|
|
3
|
-
findAvailableTimesByTime: (opts: {
|
|
4
|
-
startTime: string;
|
|
5
|
-
endTime: string;
|
|
6
|
-
userId?: string;
|
|
7
|
-
dateGreaterThanOrEqualTo?: Date | string;
|
|
8
|
-
dateGreaterThan?: Date | string;
|
|
9
|
-
dateLessThanOrEqualTo?: Date | string;
|
|
10
|
-
}) => Promise<IUserUnavailableTime[]>;
|
|
11
|
-
/**Does not throw. Returns empty array if query fails. */
|
|
12
|
-
findAvailableTimesByDate: (opts: {
|
|
13
|
-
dateGreaterThanOrEqualTo?: string | Date;
|
|
14
|
-
dateGreaterThan?: string | Date;
|
|
15
|
-
dateLessThanOrEqualTo: string | Date;
|
|
16
|
-
startTime?: string;
|
|
17
|
-
endTime?: string;
|
|
18
|
-
userId?: string;
|
|
19
|
-
}) => Promise<IUserUnavailableTime[]>;
|
|
20
|
-
}
|