@eliasrrosa/tutorhub-public-assets 0.8.1 → 0.9.0
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
|
@@ -40,8 +40,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
40
40
|
// src/index.ts
|
|
41
41
|
var index_exports = {};
|
|
42
42
|
__export(index_exports, {
|
|
43
|
-
ClassCreationFormSchema: () => ClassCreationFormSchema,
|
|
44
43
|
ClassCreationRecurrenceRuleSchema: () => ClassCreationRecurrenceRuleSchema,
|
|
44
|
+
ClassSchedulingFormSchema: () => ClassSchedulingFormSchema,
|
|
45
45
|
ClassStatusSchema: () => ClassStatusSchema,
|
|
46
46
|
FreeDateTimeSlot: () => FreeDateTimeSlot,
|
|
47
47
|
ISO8601Date: () => ISO8601Date,
|
|
@@ -589,15 +589,15 @@ _ISO8601Time.fromJsDateTime = (dateTime, opts) => {
|
|
|
589
589
|
};
|
|
590
590
|
var ISO8601Time = _ISO8601Time;
|
|
591
591
|
|
|
592
|
-
// src/infrastructure/restful/requests/forms/
|
|
592
|
+
// src/infrastructure/restful/requests/forms/ClassSchedulingForm.ts
|
|
593
593
|
var import_zod2 = require("zod");
|
|
594
594
|
|
|
595
595
|
// src/domain/types/ClassStatus.ts
|
|
596
596
|
var import_zod = require("zod");
|
|
597
597
|
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"));
|
|
598
598
|
|
|
599
|
-
// src/infrastructure/restful/requests/forms/
|
|
600
|
-
var
|
|
599
|
+
// src/infrastructure/restful/requests/forms/ClassSchedulingForm.ts
|
|
600
|
+
var ClassSchedulingFormSchema = import_zod2.z.object({
|
|
601
601
|
title: import_zod2.z.string().min(1).max(255),
|
|
602
602
|
startDateTime: import_zod2.z.string().datetime(),
|
|
603
603
|
endDateTime: import_zod2.z.string().datetime(),
|
|
@@ -647,8 +647,8 @@ function filterAsync(arr, predicate) {
|
|
|
647
647
|
}
|
|
648
648
|
// Annotate the CommonJS export names for ESM import in node:
|
|
649
649
|
0 && (module.exports = {
|
|
650
|
-
ClassCreationFormSchema,
|
|
651
650
|
ClassCreationRecurrenceRuleSchema,
|
|
651
|
+
ClassSchedulingFormSchema,
|
|
652
652
|
ClassStatusSchema,
|
|
653
653
|
FreeDateTimeSlot,
|
|
654
654
|
ISO8601Date,
|
package/dist/index.d.ts
CHANGED
|
@@ -10,10 +10,10 @@ 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 {
|
|
13
|
+
import { ClassSchedulingForm, ClassSchedulingFormSchema } from "./infrastructure/restful/requests/forms/ClassSchedulingForm.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";
|
|
17
17
|
import { tryCatch, tryCatchAsync } from "./application/helpers/tryCatch.js";
|
|
18
18
|
import { filterAsync } from "./application/helpers/filterAsync.js";
|
|
19
|
-
export { filterAsync, tryCatchAsync, tryCatch, ClassStatus, IDate, IDateTimeSlot, IFreeDateTimeSlot, FreeDateTimeSlot, IDateValidator, ISO8601Date, IDateTime, ISO8601DateValidator, ISO8601Time, ISO8601TimeValidator, ITime, ITimeSlot, ITimeValidator, GetFixedAvailableTimeResponseBody, ISO8601DateTime,
|
|
19
|
+
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, };
|
package/dist/index.js
CHANGED
|
@@ -553,15 +553,15 @@ _ISO8601Time.fromJsDateTime = (dateTime, opts) => {
|
|
|
553
553
|
};
|
|
554
554
|
var ISO8601Time = _ISO8601Time;
|
|
555
555
|
|
|
556
|
-
// src/infrastructure/restful/requests/forms/
|
|
556
|
+
// src/infrastructure/restful/requests/forms/ClassSchedulingForm.ts
|
|
557
557
|
import { z as z2 } from "zod";
|
|
558
558
|
|
|
559
559
|
// src/domain/types/ClassStatus.ts
|
|
560
560
|
import { z } from "zod";
|
|
561
561
|
var ClassStatusSchema = z.literal("pending").or(z.literal("done")).or(z.literal("canceled")).or(z.literal("to reschedule"));
|
|
562
562
|
|
|
563
|
-
// src/infrastructure/restful/requests/forms/
|
|
564
|
-
var
|
|
563
|
+
// src/infrastructure/restful/requests/forms/ClassSchedulingForm.ts
|
|
564
|
+
var ClassSchedulingFormSchema = z2.object({
|
|
565
565
|
title: z2.string().min(1).max(255),
|
|
566
566
|
startDateTime: z2.string().datetime(),
|
|
567
567
|
endDateTime: z2.string().datetime(),
|
|
@@ -610,8 +610,8 @@ function filterAsync(arr, predicate) {
|
|
|
610
610
|
});
|
|
611
611
|
}
|
|
612
612
|
export {
|
|
613
|
-
ClassCreationFormSchema,
|
|
614
613
|
ClassCreationRecurrenceRuleSchema,
|
|
614
|
+
ClassSchedulingFormSchema,
|
|
615
615
|
ClassStatusSchema,
|
|
616
616
|
FreeDateTimeSlot,
|
|
617
617
|
ISO8601Date,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ClassSchedulingFormSchema: 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
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
title: string;
|
|
12
|
+
startDateTime: string;
|
|
13
|
+
endDateTime: string;
|
|
14
|
+
courseId: string;
|
|
15
|
+
status?: "pending" | "done" | "canceled" | "to reschedule" | undefined;
|
|
16
|
+
description?: string | undefined;
|
|
17
|
+
meetingLink?: string | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
title: string;
|
|
20
|
+
startDateTime: string;
|
|
21
|
+
endDateTime: string;
|
|
22
|
+
courseId: string;
|
|
23
|
+
status?: "pending" | "done" | "canceled" | "to reschedule" | undefined;
|
|
24
|
+
description?: string | undefined;
|
|
25
|
+
meetingLink?: string | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export type ClassSchedulingForm = z.infer<typeof ClassSchedulingFormSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClassSchedulingFormSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const ClassStatus_1 = require("../../../../domain/types/ClassStatus");
|
|
6
|
+
exports.ClassSchedulingFormSchema = zod_1.z.object({
|
|
7
|
+
title: zod_1.z.string().min(1).max(255),
|
|
8
|
+
startDateTime: zod_1.z.string().datetime(),
|
|
9
|
+
endDateTime: zod_1.z.string().datetime(),
|
|
10
|
+
courseId: zod_1.z.string().uuid(),
|
|
11
|
+
description: zod_1.z.string().max(255).optional(),
|
|
12
|
+
status: ClassStatus_1.ClassStatusSchema.optional(),
|
|
13
|
+
meetingLink: zod_1.z.string().url().optional(),
|
|
14
|
+
});
|