wgutils
Version:
Tools for managing working groups
59 lines • 2.64 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.configSchema = void 0;
const zod_1 = require("zod");
const annualItemSchema = zod_1.z.object({
/** `1.` prefix and indentation will be handled for you */
text: zod_1.z.string(),
/** 1 - January, 12 - December */
month: zod_1.z.number(),
/**
* By default we only add the item to the primary meeting; set true if the
* item should be added to all meetings.
*/
allMeetings: zod_1.z.boolean().optional(),
});
const secondaryMeetingSchema = zod_1.z.object({
dayOffset: zod_1.z
.number()
.describe('If this is on a different day, set this to the "offset", e.g. if the main meeting is Thursday but the secondary is the next Wednesday, use `-1`')
.optional(),
nth: zod_1.z.number(),
time: zod_1.z.string(),
name: zod_1.z.string().optional().default("Secondary"),
description: zod_1.z.string().optional(),
filenameFragment: zod_1.z.string().optional(),
});
exports.configSchema = zod_1.z.object({
name: zod_1.z.string(),
repoUrl: zod_1.z.string(),
videoConferenceDetails: zod_1.z.string(),
liveNotesUrl: zod_1.z.string().optional(),
repoSubpath: zod_1.z.string().optional(),
description: zod_1.z.string().optional(),
agendaTemplateBottom: zod_1.z.string().optional(),
// linksMarkdown: z.string().optional(),
links: zod_1.z.record(zod_1.z.string()).optional(),
attendeesTemplate: zod_1.z.string(),
/* From dateandtime.com URL query string: p1=...&p2=...&... */
dateAndTimeLocations: zod_1.z.string().optional(),
/** In the agenda file name */
filenameFragment: zod_1.z.string().optional(),
agendasFolder: zod_1.z.string().optional(),
joiningAMeetingFile: zod_1.z.string().optional(),
// TODO: support more timezones
timezone: zod_1.z.enum(["US/Pacific", "US/Eastern", "UTC", "Europe/Berlin"]),
frequency: zod_1.z.enum(["weekly", "monthly"]),
/** If weekly, which meeting is the primary? */
primaryN: zod_1.z.number().optional(),
weekday: zod_1.z.enum(["M", "Tu", "W", "Th", "F", "Sa", "Su"]),
/** If frequency="monthly", the nth weekday will be used */
nth: zod_1.z.number().optional(),
/** 24h range, e.g. `"09:15-19:45"` */
time: zod_1.z.string(),
/** If this WG has annual items, specify them here. */
annualItems: zod_1.z.array(annualItemSchema).optional(),
/** If this WG has secondary meetings, specify them here. Only for monthly. */
secondaryMeetings: zod_1.z.array(secondaryMeetingSchema).optional(),
});
//# sourceMappingURL=configSchema.js.map