@eliasrrosa/tutorhub-public-assets 0.9.13 → 0.9.15

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 CHANGED
@@ -41,7 +41,7 @@ var __async = (__this, __arguments, generator) => {
41
41
  var index_exports = {};
42
42
  __export(index_exports, {
43
43
  ClassCreationRecurrenceRuleSchema: () => ClassCreationRecurrenceRuleSchema,
44
- ClassSchedulingFormSchema: () => ClassSchedulingFormSchema,
44
+ ClassSchedulingFormSchema: () => ScheduleClassFormSchema,
45
45
  ClassStatusSchema: () => ClassStatusSchema,
46
46
  FreeDateTimeSlot: () => FreeDateTimeSlot,
47
47
  ISO8601Date: () => ISO8601Date,
@@ -604,28 +604,32 @@ _ISO8601Time.fromJsDateTime = (dateTime, opts) => {
604
604
  };
605
605
  var ISO8601Time = _ISO8601Time;
606
606
 
607
- // src/infrastructure/restful/requests/forms/ClassSchedulingForm.ts
608
- var import_zod2 = require("zod");
607
+ // src/infrastructure/restful/requests/forms/ScheduleClassForm.ts
608
+ var import_zod3 = require("zod");
609
609
 
610
610
  // src/domain/types/ClassStatus.ts
611
611
  var import_zod = require("zod");
612
612
  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"));
613
613
 
614
- // src/infrastructure/restful/requests/forms/ClassSchedulingForm.ts
615
- var ClassSchedulingFormSchema = import_zod2.z.object({
616
- title: import_zod2.z.string().min(1).max(255),
617
- startDateTime: import_zod2.z.string().datetime(),
618
- endDateTime: import_zod2.z.string().datetime(),
619
- courseId: import_zod2.z.string().uuid(),
620
- description: import_zod2.z.string().max(255).optional(),
614
+ // src/domain/types/ClassCreationRecurrenceRule.ts
615
+ var import_zod2 = require("zod");
616
+ var ClassCreationRecurrenceRuleSchema = import_zod2.z.literal("daily").or(import_zod2.z.literal("weekly")).or(import_zod2.z.literal("week days"));
617
+
618
+ // src/infrastructure/restful/requests/forms/ScheduleClassForm.ts
619
+ var ScheduleClassFormSchema = import_zod3.z.object({
620
+ title: import_zod3.z.string().min(1).max(255),
621
+ startDateTime: import_zod3.z.string().datetime(),
622
+ endDateTime: import_zod3.z.string().datetime(),
623
+ courseId: import_zod3.z.string().uuid(),
624
+ description: import_zod3.z.string().max(255).optional(),
621
625
  status: ClassStatusSchema.optional(),
622
- meetingLink: import_zod2.z.string().url().optional()
626
+ meetingLink: import_zod3.z.string().url().optional(),
627
+ groupId: import_zod3.z.string().uuid().optional(),
628
+ recurrenceEndDate: import_zod3.z.string().datetime().optional(),
629
+ recurrenceRule: ClassCreationRecurrenceRuleSchema.optional(),
630
+ id: import_zod3.z.string().uuid().optional()
623
631
  });
624
632
 
625
- // src/domain/types/ClassCreationRecurrenceRule.ts
626
- var import_zod3 = require("zod");
627
- var ClassCreationRecurrenceRuleSchema = import_zod3.z.literal("daily").or(import_zod3.z.literal("weekly")).or(import_zod3.z.literal("week days"));
628
-
629
633
  // src/domain/entities/FreeTimeSlot.ts
630
634
  var FreeDateTimeSlot = class {
631
635
  constructor(opts) {
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ import { ITime } from "./domain/entities/Time.js";
10
10
  import { ITimeSlot } from "./domain/entities/TimeSlot.js";
11
11
  import { ITimeValidator } from "./domain/entities/TimeValidator.js";
12
12
  import { GetFixedAvailableTimeResponseBody } from "./infrastructure/restful/responses/GetFixedAvailableTimesResponseBody.js";
13
- import { ClassSchedulingForm, ClassSchedulingFormSchema } from "./infrastructure/restful/requests/forms/ClassSchedulingForm.js";
13
+ import { ScheduleClassForm, ScheduleClassFormSchema } from "./infrastructure/restful/requests/forms/ScheduleClassForm.js";
14
14
  import { ClassStatus, ClassStatusSchema } from "./domain/types/ClassStatus.js";
15
15
  import { ClassCreationRecurrenceRule, ClassCreationRecurrenceRuleSchema } from "./domain/types/ClassCreationRecurrenceRule.js";
16
16
  import { IFreeDateTimeSlot, FreeDateTimeSlot } from "./domain/entities/FreeTimeSlot.js";
@@ -24,4 +24,4 @@ import { GetReceivedStudentToTeacherConnectionConfirmationResponseBody } from ".
24
24
  import { PutStudentToTeacherConnectionConfirmationRequestUrlQueryParams } from "./infrastructure/restful/requests/queryParams/PutStudentToTeacherConnectionConfirmationExpressRequestUrlQueryParams.js";
25
25
  import { GetReceivedStudentToTeacherConnectionConfirmationsQueryParams } from "./infrastructure/restful/requests/queryParams/GetReceivedStudentToTeacherConnectionConfirmationsQueryParams.js";
26
26
  import { RescheduleClassForm } from "./infrastructure/restful/requests/forms/RescheduleClassForm.js";
27
- export { filterAsync, tryCatchAsync, tryCatch, ClassStatus, IDate, IDateTimeSlot, IFreeDateTimeSlot, FreeDateTimeSlot, IDateValidator, ISO8601Date, IDateTime, ISO8601DateValidator, ISO8601Time, ISO8601TimeValidator, ITime, ITimeSlot, ITimeValidator, GetFixedAvailableTimeResponseBody, ISO8601DateTime, ClassSchedulingForm, ClassCreationRecurrenceRule, ClassSchedulingFormSchema, ClassCreationRecurrenceRuleSchema, ClassStatusSchema, PublicTeacherDTO, GetPublicTeachersResponseBody, ConnectStudentToTeacherQueryParams, StudentToTeacherConnectionConfirmationDTO, GetReceivedStudentToTeacherConnectionConfirmationResponseBody, PutStudentToTeacherConnectionConfirmationRequestUrlQueryParams, GetReceivedStudentToTeacherConnectionConfirmationsQueryParams, RescheduleClassForm, };
27
+ export { filterAsync, tryCatchAsync, tryCatch, ClassStatus, IDate, IDateTimeSlot, IFreeDateTimeSlot, FreeDateTimeSlot, IDateValidator, ISO8601Date, IDateTime, ISO8601DateValidator, ISO8601Time, ISO8601TimeValidator, ITime, ITimeSlot, ITimeValidator, GetFixedAvailableTimeResponseBody, ISO8601DateTime, ScheduleClassForm as ClassSchedulingForm, ClassCreationRecurrenceRule, ScheduleClassFormSchema as ClassSchedulingFormSchema, ClassCreationRecurrenceRuleSchema, ClassStatusSchema, PublicTeacherDTO, GetPublicTeachersResponseBody, ConnectStudentToTeacherQueryParams, StudentToTeacherConnectionConfirmationDTO, GetReceivedStudentToTeacherConnectionConfirmationResponseBody, PutStudentToTeacherConnectionConfirmationRequestUrlQueryParams, GetReceivedStudentToTeacherConnectionConfirmationsQueryParams, RescheduleClassForm, };
package/dist/index.js CHANGED
@@ -568,28 +568,32 @@ _ISO8601Time.fromJsDateTime = (dateTime, opts) => {
568
568
  };
569
569
  var ISO8601Time = _ISO8601Time;
570
570
 
571
- // src/infrastructure/restful/requests/forms/ClassSchedulingForm.ts
572
- import { z as z2 } from "zod";
571
+ // src/infrastructure/restful/requests/forms/ScheduleClassForm.ts
572
+ import { z as z3 } from "zod";
573
573
 
574
574
  // src/domain/types/ClassStatus.ts
575
575
  import { z } from "zod";
576
576
  var ClassStatusSchema = z.literal("pending").or(z.literal("done")).or(z.literal("canceled")).or(z.literal("to reschedule"));
577
577
 
578
- // src/infrastructure/restful/requests/forms/ClassSchedulingForm.ts
579
- var ClassSchedulingFormSchema = z2.object({
580
- title: z2.string().min(1).max(255),
581
- startDateTime: z2.string().datetime(),
582
- endDateTime: z2.string().datetime(),
583
- courseId: z2.string().uuid(),
584
- description: z2.string().max(255).optional(),
578
+ // src/domain/types/ClassCreationRecurrenceRule.ts
579
+ import { z as z2 } from "zod";
580
+ var ClassCreationRecurrenceRuleSchema = z2.literal("daily").or(z2.literal("weekly")).or(z2.literal("week days"));
581
+
582
+ // src/infrastructure/restful/requests/forms/ScheduleClassForm.ts
583
+ var ScheduleClassFormSchema = z3.object({
584
+ title: z3.string().min(1).max(255),
585
+ startDateTime: z3.string().datetime(),
586
+ endDateTime: z3.string().datetime(),
587
+ courseId: z3.string().uuid(),
588
+ description: z3.string().max(255).optional(),
585
589
  status: ClassStatusSchema.optional(),
586
- meetingLink: z2.string().url().optional()
590
+ meetingLink: z3.string().url().optional(),
591
+ groupId: z3.string().uuid().optional(),
592
+ recurrenceEndDate: z3.string().datetime().optional(),
593
+ recurrenceRule: ClassCreationRecurrenceRuleSchema.optional(),
594
+ id: z3.string().uuid().optional()
587
595
  });
588
596
 
589
- // src/domain/types/ClassCreationRecurrenceRule.ts
590
- import { z as z3 } from "zod";
591
- var ClassCreationRecurrenceRuleSchema = z3.literal("daily").or(z3.literal("weekly")).or(z3.literal("week days"));
592
-
593
597
  // src/domain/entities/FreeTimeSlot.ts
594
598
  var FreeDateTimeSlot = class {
595
599
  constructor(opts) {
@@ -626,7 +630,7 @@ function filterAsync(arr, predicate) {
626
630
  }
627
631
  export {
628
632
  ClassCreationRecurrenceRuleSchema,
629
- ClassSchedulingFormSchema,
633
+ ScheduleClassFormSchema as ClassSchedulingFormSchema,
630
634
  ClassStatusSchema,
631
635
  FreeDateTimeSlot,
632
636
  ISO8601Date,
@@ -0,0 +1,39 @@
1
+ import { z } from "zod";
2
+ export declare const ScheduleClassFormSchema: z.ZodObject<{
3
+ title: z.ZodString;
4
+ startDateTime: z.ZodString;
5
+ endDateTime: z.ZodString;
6
+ courseId: z.ZodString;
7
+ description: z.ZodOptional<z.ZodString>;
8
+ status: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"done">]>, z.ZodLiteral<"canceled">]>, z.ZodLiteral<"to reschedule">]>>;
9
+ meetingLink: z.ZodOptional<z.ZodString>;
10
+ groupId: z.ZodOptional<z.ZodString>;
11
+ recurrenceEndDate: z.ZodOptional<z.ZodString>;
12
+ recurrenceRule: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"daily">, z.ZodLiteral<"weekly">]>, z.ZodLiteral<"week days">]>>;
13
+ id: z.ZodOptional<z.ZodString>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ title: string;
16
+ startDateTime: string;
17
+ endDateTime: string;
18
+ courseId: string;
19
+ status?: "pending" | "done" | "canceled" | "to reschedule" | undefined;
20
+ description?: string | undefined;
21
+ meetingLink?: string | undefined;
22
+ groupId?: string | undefined;
23
+ recurrenceEndDate?: string | undefined;
24
+ recurrenceRule?: "daily" | "weekly" | "week days" | undefined;
25
+ id?: string | undefined;
26
+ }, {
27
+ title: string;
28
+ startDateTime: string;
29
+ endDateTime: string;
30
+ courseId: string;
31
+ status?: "pending" | "done" | "canceled" | "to reschedule" | undefined;
32
+ description?: string | undefined;
33
+ meetingLink?: string | undefined;
34
+ groupId?: string | undefined;
35
+ recurrenceEndDate?: string | undefined;
36
+ recurrenceRule?: "daily" | "weekly" | "week days" | undefined;
37
+ id?: string | undefined;
38
+ }>;
39
+ export type ScheduleClassForm = z.infer<typeof ScheduleClassFormSchema>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScheduleClassFormSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const ClassStatus_1 = require("../../../../domain/types/ClassStatus");
6
+ const ClassCreationRecurrenceRule_1 = require("../../../../domain/types/ClassCreationRecurrenceRule");
7
+ exports.ScheduleClassFormSchema = zod_1.z.object({
8
+ title: zod_1.z.string().min(1).max(255),
9
+ startDateTime: zod_1.z.string().datetime(),
10
+ endDateTime: zod_1.z.string().datetime(),
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
+ groupId: zod_1.z.string().uuid().optional(),
16
+ recurrenceEndDate: zod_1.z.string().datetime().optional(),
17
+ recurrenceRule: ClassCreationRecurrenceRule_1.ClassCreationRecurrenceRuleSchema.optional(),
18
+ id: zod_1.z.string().uuid().optional()
19
+ });
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.9.13",
2
+ "version": "0.9.15",
3
3
  "name": "@eliasrrosa/tutorhub-public-assets",
4
4
  "description": "Assets, mainly interfaces, to be shared among different Tutorhub apps.",
5
5
  "type": "module",