@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.
Files changed (110) hide show
  1. package/dist/index.cjs +341 -0
  2. package/dist/index.d.ts +48 -0
  3. package/dist/index.js +21 -0
  4. package/package.json +14 -4
  5. package/dist/entities/AsaasCustomer.d.ts +0 -14
  6. package/dist/entities/AsaasCustomer.js +0 -13
  7. package/dist/entities/Class.d.ts +0 -79
  8. package/dist/entities/Class.js +0 -30
  9. package/dist/entities/ClassRequest.d.ts +0 -15
  10. package/dist/entities/ClassRequest.js +0 -2
  11. package/dist/entities/Contract.d.ts +0 -40
  12. package/dist/entities/Contract.js +0 -2
  13. package/dist/entities/Course.d.ts +0 -34
  14. package/dist/entities/Course.js +0 -2
  15. package/dist/entities/CourseToSchoolConnectionRequest.d.ts +0 -10
  16. package/dist/entities/CourseToSchoolConnectionRequest.js +0 -2
  17. package/dist/entities/Date.d.ts +0 -56
  18. package/dist/entities/Date.js +0 -2
  19. package/dist/entities/Date.test.d.ts +0 -0
  20. package/dist/entities/Date.test.js +0 -23
  21. package/dist/entities/DateTimeSlot.d.ts +0 -6
  22. package/dist/entities/DateTimeSlot.js +0 -2
  23. package/dist/entities/DateValidator.d.ts +0 -3
  24. package/dist/entities/DateValidator.js +0 -2
  25. package/dist/entities/File.d.ts +0 -23
  26. package/dist/entities/File.js +0 -2
  27. package/dist/entities/FreeTimeSlot.d.ts +0 -19
  28. package/dist/entities/FreeTimeSlot.js +0 -12
  29. package/dist/entities/GenericNotification.d.ts +0 -11
  30. package/dist/entities/GenericNotification.js +0 -2
  31. package/dist/entities/GoogleAuth.d.ts +0 -8
  32. package/dist/entities/GoogleAuth.js +0 -2
  33. package/dist/entities/GoogleCalendar.d.ts +0 -10
  34. package/dist/entities/GoogleCalendar.js +0 -2
  35. package/dist/entities/GoogleCalendarEvent.d.ts +0 -10
  36. package/dist/entities/GoogleCalendarEvent.js +0 -2
  37. package/dist/entities/ISO8601Date.d.ts +0 -35
  38. package/dist/entities/ISO8601Date.js +0 -86
  39. package/dist/entities/ISO8601Date.test.d.ts +0 -1
  40. package/dist/entities/ISO8601Date.test.js +0 -210
  41. package/dist/entities/ISO8601DateTime.d.ts +0 -41
  42. package/dist/entities/ISO8601DateTime.js +0 -44
  43. package/dist/entities/ISO8601DateTime.test.d.ts +0 -1
  44. package/dist/entities/ISO8601DateTime.test.js +0 -146
  45. package/dist/entities/ISO8601DateValidator.d.ts +0 -13
  46. package/dist/entities/ISO8601DateValidator.js +0 -20
  47. package/dist/entities/ISO8601DateValidator.test.d.ts +0 -1
  48. package/dist/entities/ISO8601DateValidator.test.js +0 -15
  49. package/dist/entities/ISO8601Time.d.ts +0 -25
  50. package/dist/entities/ISO8601Time.js +0 -57
  51. package/dist/entities/ISO8601Time.test.d.ts +0 -1
  52. package/dist/entities/ISO8601Time.test.js +0 -63
  53. package/dist/entities/ISO8601TimeValidator.d.ts +0 -12
  54. package/dist/entities/ISO8601TimeValidator.js +0 -19
  55. package/dist/entities/ISO8601TimeValidator.test.d.ts +0 -1
  56. package/dist/entities/ISO8601TimeValidator.test.js +0 -42
  57. package/dist/entities/PasswordRecovery.d.ts +0 -6
  58. package/dist/entities/PasswordRecovery.js +0 -2
  59. package/dist/entities/Payment.d.ts +0 -42
  60. package/dist/entities/Payment.js +0 -2
  61. package/dist/entities/PaymentRecognitionRequest.d.ts +0 -12
  62. package/dist/entities/PaymentRecognitionRequest.js +0 -2
  63. package/dist/entities/PreApprovedUser.d.ts +0 -12
  64. package/dist/entities/PreApprovedUser.js +0 -2
  65. package/dist/entities/RescheduleRequest.d.ts +0 -16
  66. package/dist/entities/RescheduleRequest.js +0 -2
  67. package/dist/entities/School.d.ts +0 -31
  68. package/dist/entities/School.js +0 -2
  69. package/dist/entities/SchoolConnection.d.ts +0 -10
  70. package/dist/entities/SchoolConnection.js +0 -2
  71. package/dist/entities/SchoolConnectionRequest.d.ts +0 -7
  72. package/dist/entities/SchoolConnectionRequest.js +0 -2
  73. package/dist/entities/SchoolStudent.d.ts +0 -14
  74. package/dist/entities/SchoolStudent.js +0 -2
  75. package/dist/entities/SchoolTeacher.d.ts +0 -14
  76. package/dist/entities/SchoolTeacher.js +0 -2
  77. package/dist/entities/Time.d.ts +0 -9
  78. package/dist/entities/Time.js +0 -2
  79. package/dist/entities/TimeSlot.d.ts +0 -4
  80. package/dist/entities/TimeSlot.js +0 -2
  81. package/dist/entities/TimeValidator.d.ts +0 -3
  82. package/dist/entities/TimeValidator.js +0 -2
  83. package/dist/entities/UnauthorizedUser.d.ts +0 -16
  84. package/dist/entities/UnauthorizedUser.js +0 -2
  85. package/dist/entities/UserAuth.d.ts +0 -72
  86. package/dist/entities/UserAuth.js +0 -2
  87. package/dist/entities/UserConnection.d.ts +0 -8
  88. package/dist/entities/UserConnection.js +0 -2
  89. package/dist/entities/UserConnectionRequest.d.ts +0 -9
  90. package/dist/entities/UserConnectionRequest.js +0 -2
  91. package/dist/entities/UserCredentials.d.ts +0 -16
  92. package/dist/entities/UserCredentials.js +0 -11
  93. package/dist/entities/UserNavigation.d.ts +0 -8
  94. package/dist/entities/UserNavigation.js +0 -2
  95. package/dist/entities/UserPreferences.d.ts +0 -6
  96. package/dist/entities/UserPreferences.js +0 -2
  97. package/dist/entities/UserPremium.d.ts +0 -13
  98. package/dist/entities/UserPremium.js +0 -2
  99. package/dist/entities/UserProfile.d.ts +0 -9
  100. package/dist/entities/UserProfile.js +0 -2
  101. package/dist/entities/UserRoles.d.ts +0 -11
  102. package/dist/entities/UserRoles.js +0 -2
  103. package/dist/entities/UserSharedFileTimestamps.d.ts +0 -9
  104. package/dist/entities/UserSharedFileTimestamps.js +0 -2
  105. package/dist/entities/UserUnavailableTime.d.ts +0 -49
  106. package/dist/entities/UserUnavailableTime.js +0 -32
  107. package/dist/entities/UserUnavailableTime.test.d.ts +0 -1
  108. package/dist/entities/UserUnavailableTime.test.js +0 -22
  109. package/dist/repositories/UnavailableTimeRepository.d.ts +0 -20
  110. 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
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- import { ISchoolConnection } from "./SchoolConnection";
2
- export interface ISchoolConnectionRequest {
3
- requestingSchoolId: string;
4
- requestedSchoolId: string;
5
- createdAt: Date;
6
- schoolConnection?: ISchoolConnection;
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- import { ITimeValidator } from "./TimeValidator";
2
- export interface ITime {
3
- validator: ITimeValidator;
4
- getTime: () => string;
5
- getHours: () => string;
6
- getMinutes: () => string;
7
- getSeconds: () => string;
8
- getNow: () => string;
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- export interface ITimeSlot {
2
- startTime: string;
3
- endTime: string;
4
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- export interface ITimeValidator {
2
- formatIsValid: (time: string) => boolean;
3
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- import { IUserAuth } from "./UserAuth";
2
- export interface IUserConnection {
3
- createdAt: Date;
4
- user1Id: string;
5
- user2Id: string;
6
- user1?: IUserAuth;
7
- user2?: IUserAuth;
8
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- import { IUserAuth } from "./UserAuth";
2
- export interface IUserConnectionRequest {
3
- id: string;
4
- createdAt: Date;
5
- requesterId: string;
6
- requestedId: string;
7
- requester?: IUserAuth;
8
- requested?: IUserAuth;
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,8 +0,0 @@
1
- import { IUserAuth } from "./UserAuth";
2
- export interface IUserNavigation {
3
- userId: string;
4
- firstLogin: boolean;
5
- totalLogins: number;
6
- updatedAt: Date | null;
7
- user?: IUserAuth;
8
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- import { IUserAuth } from "./UserAuth";
2
- export interface IUserPreferences {
3
- userId: string;
4
- user?: IUserAuth;
5
- syncWithGoogle: boolean;
6
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- import { IUserAuth } from "./UserAuth";
2
- export interface IUserProfile {
3
- name: string;
4
- country: string;
5
- birthday: Date;
6
- updatedAt: Date | null;
7
- userId: string;
8
- user?: IUserAuth;
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- import { IFile } from "./File";
2
- import { IUserAuth } from "./UserAuth";
3
- export interface IUserSharedFileTimestamps {
4
- timestamp: Date;
5
- fileId: string;
6
- userAuthId: string;
7
- file?: IFile;
8
- user?: IUserAuth;
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });