@eliasrrosa/tutorhub-public-assets 0.0.18 → 0.0.19
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/domain/types/ClassCreationRecurrenceRule.d.ts +3 -1
- package/dist/domain/types/ClassCreationRecurrenceRule.js +6 -0
- package/dist/domain/types/ClassStatus.d.ts +3 -1
- package/dist/domain/types/ClassStatus.js +7 -0
- package/dist/index.cjs +29 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +26 -0
- package/dist/infrastructure/restful/requests/forms/ClassCreationForm.d.ts +26 -12
- package/dist/infrastructure/restful/requests/forms/ClassCreationForm.js +13 -0
- package/package.json +4 -1
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ClassCreationRecurrenceRuleSchema: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"daily">, z.ZodLiteral<"weekly">]>, z.ZodLiteral<"week days">]>;
|
|
3
|
+
export type ClassCreationRecurrenceRule = z.infer<typeof ClassCreationRecurrenceRuleSchema>;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClassCreationRecurrenceRuleSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.ClassCreationRecurrenceRuleSchema = zod_1.z
|
|
6
|
+
.literal("daily")
|
|
7
|
+
.or(zod_1.z.literal("weekly"))
|
|
8
|
+
.or(zod_1.z.literal("week days"));
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ClassStatusSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"done">]>, z.ZodLiteral<"canceled">]>, z.ZodLiteral<"to reschedule">]>;
|
|
3
|
+
export type ClassStatus = z.infer<typeof ClassStatusSchema>;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClassStatusSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.ClassStatusSchema = zod_1.z
|
|
6
|
+
.literal("pending")
|
|
7
|
+
.or(zod_1.z.literal("done"))
|
|
8
|
+
.or(zod_1.z.literal("canceled"))
|
|
9
|
+
.or(zod_1.z.literal("to reschedule"));
|
package/dist/index.cjs
CHANGED
|
@@ -22,6 +22,9 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
AsaasCustomer: () => AsaasCustomer,
|
|
24
24
|
Class: () => Class,
|
|
25
|
+
ClassCreationFormSchema: () => ClassCreationFormSchema,
|
|
26
|
+
ClassCreationRecurrenceRuleSchema: () => ClassCreationRecurrenceRuleSchema,
|
|
27
|
+
ClassStatusSchema: () => ClassStatusSchema,
|
|
25
28
|
FreeDateTimeSlot: () => FreeDateTimeSlot,
|
|
26
29
|
ISO8601Date: () => ISO8601Date,
|
|
27
30
|
ISO8601DateTime: () => ISO8601DateTime,
|
|
@@ -525,6 +528,29 @@ var ISO8601Time = class _ISO8601Time {
|
|
|
525
528
|
}
|
|
526
529
|
};
|
|
527
530
|
|
|
531
|
+
// src/infrastructure/restful/requests/forms/ClassCreationForm.ts
|
|
532
|
+
var import_zod2 = require("zod");
|
|
533
|
+
|
|
534
|
+
// src/domain/types/ClassStatus.ts
|
|
535
|
+
var import_zod = require("zod");
|
|
536
|
+
var ClassStatusSchema = import_zod.z.literal("pending").or(import_zod.z.literal("done")).or(import_zod.z.literal("canceled")).or(import_zod.z.literal("to reschedule"));
|
|
537
|
+
|
|
538
|
+
// src/infrastructure/restful/requests/forms/ClassCreationForm.ts
|
|
539
|
+
var ClassCreationFormSchema = import_zod2.z.object({
|
|
540
|
+
title: import_zod2.z.string().min(1).max(255),
|
|
541
|
+
date: import_zod2.z.string().date(),
|
|
542
|
+
startTime: import_zod2.z.string(),
|
|
543
|
+
endTime: import_zod2.z.string(),
|
|
544
|
+
courseId: import_zod2.z.string().uuid(),
|
|
545
|
+
description: import_zod2.z.string().max(255).optional(),
|
|
546
|
+
status: ClassStatusSchema.optional(),
|
|
547
|
+
meetingLink: import_zod2.z.string().url().optional()
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
// src/domain/types/ClassCreationRecurrenceRule.ts
|
|
551
|
+
var import_zod3 = require("zod");
|
|
552
|
+
var ClassCreationRecurrenceRuleSchema = import_zod3.z.literal("daily").or(import_zod3.z.literal("weekly")).or(import_zod3.z.literal("week days"));
|
|
553
|
+
|
|
528
554
|
// src/domain/entities/UserUnavailableTime.ts
|
|
529
555
|
var UserUnavailableTime = class {
|
|
530
556
|
constructor(opts) {
|
|
@@ -568,6 +594,9 @@ var FreeDateTimeSlot = class {
|
|
|
568
594
|
0 && (module.exports = {
|
|
569
595
|
AsaasCustomer,
|
|
570
596
|
Class,
|
|
597
|
+
ClassCreationFormSchema,
|
|
598
|
+
ClassCreationRecurrenceRuleSchema,
|
|
599
|
+
ClassStatusSchema,
|
|
571
600
|
FreeDateTimeSlot,
|
|
572
601
|
ISO8601Date,
|
|
573
602
|
ISO8601DateTime,
|
package/dist/index.d.ts
CHANGED
|
@@ -43,9 +43,9 @@ import { IUserRoles } from "./domain/entities/UserRoles.js";
|
|
|
43
43
|
import { IUserSharedFileTimestamps } from "./domain/entities/UserSharedFileTimestamps.js";
|
|
44
44
|
import { IUnavailableTimeRepository } from "./domain/repositories/UnavailableTimeRepository.js";
|
|
45
45
|
import { GetFixedAvailableTimeResponseBody } from "./infrastructure/restful/responses/GetFixedAvailableTimesResponseBody.js";
|
|
46
|
-
import { ClassCreationForm } from "./infrastructure/restful/requests/forms/ClassCreationForm.js";
|
|
47
|
-
import { ClassStatus } from "./domain/types/ClassStatus.js";
|
|
48
|
-
import { ClassCreationRecurrenceRule } from "./domain/types/ClassCreationRecurrenceRule.js";
|
|
46
|
+
import { ClassCreationForm, ClassCreationFormSchema } from "./infrastructure/restful/requests/forms/ClassCreationForm.js";
|
|
47
|
+
import { ClassStatus, ClassStatusSchema } from "./domain/types/ClassStatus.js";
|
|
48
|
+
import { ClassCreationRecurrenceRule, ClassCreationRecurrenceRuleSchema } from "./domain/types/ClassCreationRecurrenceRule.js";
|
|
49
49
|
import { IUserUnavailableTime, UserUnavailableTime } from "./domain/entities/UserUnavailableTime.js";
|
|
50
50
|
import { IFreeDateTimeSlot, FreeDateTimeSlot } from "./domain/entities/FreeTimeSlot.js";
|
|
51
|
-
export { AsaasCustomer, Class, IClass, IClassRequest, IContract, ICourse, ICourseToSchoolConnectionRequest, IDate, IDateTimeSlot, IFreeDateTimeSlot, FreeDateTimeSlot, IUserUnavailableTime, UserUnavailableTime, IDateValidator, IFile, IGenericNotification, IGoogleAuth, IGoogleCalendar, IGoogleCalendarEvent, ISO8601Date, IDateTime, ISO8601DateValidator, ISO8601Time, ISO8601TimeValidator, IPasswordRecovery, IPayment, IPaymentRecognitionRequest, IPreApprovedUser, IRescheduleRequest, ISchool, ISchoolConnection, ISchoolConnectionRequest, ISchoolStudent, ISchoolTeacher, ITime, ITimeSlot, ITimeValidator, IUnauthorizedUser, IUserAuth, IUserConnection, IUserConnectionRequest, IUserCredentials, IUserNavigation, IUserPreferences, IUserPremium, IUserProfile, IUserRoles, IUserSharedFileTimestamps, IUnavailableTimeRepository, GetFixedAvailableTimeResponseBody, ISO8601DateTime, ClassCreationForm, ClassCreationRecurrenceRule, ClassStatus };
|
|
51
|
+
export { AsaasCustomer, Class, IClass, IClassRequest, IContract, ICourse, ICourseToSchoolConnectionRequest, IDate, IDateTimeSlot, IFreeDateTimeSlot, FreeDateTimeSlot, IUserUnavailableTime, UserUnavailableTime, IDateValidator, IFile, IGenericNotification, IGoogleAuth, IGoogleCalendar, IGoogleCalendarEvent, ISO8601Date, IDateTime, ISO8601DateValidator, ISO8601Time, ISO8601TimeValidator, IPasswordRecovery, IPayment, IPaymentRecognitionRequest, IPreApprovedUser, IRescheduleRequest, ISchool, ISchoolConnection, ISchoolConnectionRequest, ISchoolStudent, ISchoolTeacher, ITime, ITimeSlot, ITimeValidator, IUnauthorizedUser, IUserAuth, IUserConnection, IUserConnectionRequest, IUserCredentials, IUserNavigation, IUserPreferences, IUserPremium, IUserProfile, IUserRoles, IUserSharedFileTimestamps, IUnavailableTimeRepository, GetFixedAvailableTimeResponseBody, ISO8601DateTime, ClassCreationForm, ClassCreationRecurrenceRule, ClassStatus, ClassCreationFormSchema, ClassCreationRecurrenceRuleSchema, ClassStatusSchema };
|
package/dist/index.js
CHANGED
|
@@ -491,6 +491,29 @@ var ISO8601Time = class _ISO8601Time {
|
|
|
491
491
|
}
|
|
492
492
|
};
|
|
493
493
|
|
|
494
|
+
// src/infrastructure/restful/requests/forms/ClassCreationForm.ts
|
|
495
|
+
import { z as z2 } from "zod";
|
|
496
|
+
|
|
497
|
+
// src/domain/types/ClassStatus.ts
|
|
498
|
+
import { z } from "zod";
|
|
499
|
+
var ClassStatusSchema = z.literal("pending").or(z.literal("done")).or(z.literal("canceled")).or(z.literal("to reschedule"));
|
|
500
|
+
|
|
501
|
+
// src/infrastructure/restful/requests/forms/ClassCreationForm.ts
|
|
502
|
+
var ClassCreationFormSchema = z2.object({
|
|
503
|
+
title: z2.string().min(1).max(255),
|
|
504
|
+
date: z2.string().date(),
|
|
505
|
+
startTime: z2.string(),
|
|
506
|
+
endTime: z2.string(),
|
|
507
|
+
courseId: z2.string().uuid(),
|
|
508
|
+
description: z2.string().max(255).optional(),
|
|
509
|
+
status: ClassStatusSchema.optional(),
|
|
510
|
+
meetingLink: z2.string().url().optional()
|
|
511
|
+
});
|
|
512
|
+
|
|
513
|
+
// src/domain/types/ClassCreationRecurrenceRule.ts
|
|
514
|
+
import { z as z3 } from "zod";
|
|
515
|
+
var ClassCreationRecurrenceRuleSchema = z3.literal("daily").or(z3.literal("weekly")).or(z3.literal("week days"));
|
|
516
|
+
|
|
494
517
|
// src/domain/entities/UserUnavailableTime.ts
|
|
495
518
|
var UserUnavailableTime = class {
|
|
496
519
|
constructor(opts) {
|
|
@@ -533,6 +556,9 @@ var FreeDateTimeSlot = class {
|
|
|
533
556
|
export {
|
|
534
557
|
AsaasCustomer,
|
|
535
558
|
Class,
|
|
559
|
+
ClassCreationFormSchema,
|
|
560
|
+
ClassCreationRecurrenceRuleSchema,
|
|
561
|
+
ClassStatusSchema,
|
|
536
562
|
FreeDateTimeSlot,
|
|
537
563
|
ISO8601Date,
|
|
538
564
|
ISO8601DateTime,
|
|
@@ -1,16 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ClassCreationFormSchema: z.ZodObject<{
|
|
3
|
+
title: z.ZodString;
|
|
4
|
+
date: z.ZodString;
|
|
5
|
+
startTime: z.ZodString;
|
|
6
|
+
endTime: z.ZodString;
|
|
7
|
+
courseId: z.ZodString;
|
|
8
|
+
description: z.ZodOptional<z.ZodString>;
|
|
9
|
+
status: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"done">]>, z.ZodLiteral<"canceled">]>, z.ZodLiteral<"to reschedule">]>>;
|
|
10
|
+
meetingLink: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
date: string;
|
|
4
13
|
title: string;
|
|
14
|
+
startTime: string;
|
|
15
|
+
endTime: string;
|
|
16
|
+
courseId: string;
|
|
17
|
+
status?: "pending" | "done" | "canceled" | "to reschedule" | undefined;
|
|
18
|
+
description?: string | undefined;
|
|
19
|
+
meetingLink?: string | undefined;
|
|
20
|
+
}, {
|
|
5
21
|
date: string;
|
|
6
|
-
|
|
22
|
+
title: string;
|
|
23
|
+
startTime: string;
|
|
7
24
|
endTime: string;
|
|
8
25
|
courseId: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
groupId?: string;
|
|
15
|
-
meetingLink?: string;
|
|
16
|
-
};
|
|
26
|
+
status?: "pending" | "done" | "canceled" | "to reschedule" | undefined;
|
|
27
|
+
description?: string | undefined;
|
|
28
|
+
meetingLink?: string | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
export type ClassCreationForm = z.infer<typeof ClassCreationFormSchema>;
|
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClassCreationFormSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const ClassStatus_1 = require("../../../../domain/types/ClassStatus");
|
|
6
|
+
exports.ClassCreationFormSchema = zod_1.z.object({
|
|
7
|
+
title: zod_1.z.string().min(1).max(255),
|
|
8
|
+
date: zod_1.z.string().date(),
|
|
9
|
+
startTime: zod_1.z.string(),
|
|
10
|
+
endTime: zod_1.z.string(),
|
|
11
|
+
courseId: zod_1.z.string().uuid(),
|
|
12
|
+
description: zod_1.z.string().max(255).optional(),
|
|
13
|
+
status: ClassStatus_1.ClassStatusSchema.optional(),
|
|
14
|
+
meetingLink: zod_1.z.string().url().optional(),
|
|
15
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eliasrrosa/tutorhub-public-assets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "Assets, mainly interfaces, to be shared among different Tutorhub apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -39,5 +39,8 @@
|
|
|
39
39
|
"ts-jest": "^29.3.2",
|
|
40
40
|
"tsup": "^8.4.0",
|
|
41
41
|
"typescript": "^5.8.3"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"zod": "^3.25.67"
|
|
42
45
|
}
|
|
43
46
|
}
|