<commit_before>const queryFields = require('./query');
const Joi = require('joi');

const fields = ['startTime', 'endTime', 'status'];
const query = queryFields(fields);
const definitions = {
  status: Joi.string().valid('draft', 'published', 'canceled'),
  beforeDate: Joi.date()
    .timestamp()
    .raw(),
  afterDate: Joi.date()
    .timestamp()
    .raw(),
  isPublic: Joi.number().valid(0, 1),
  related: Joi.string().valid('sessions', 'sessions.tickets'),
  utcOffset: Joi.number().integer(),
};

const modelDefinitions = {
  name: Joi.string(),
  dojoId: Joi.string().guid(),
  type: Joi.string().valid('one-off', 'recurring'),
  description: Joi.string().allow(''),
  public: Joi.boolean(),
  // draft status is actually 'saved' string underneath
  status: Joi.string().valid('saved', 'published', 'canceled'),
  recurringType: Joi.string()
    .valid('biweekly', 'weekly')
    .optional(),
  dates: Joi.array().items(
    Joi.object({
      startTime: Joi.date(),
      endTime: Joi.date(),
    })
  ),
  ticketApproval: Joi.boolean().optional(),
  notifyOnApplicant: Joi.boolean().optional(),
  useDojoAddress: Joi.boolean(),
  country: Joi.object({
    countryName: Joi.string(),
    countryNumber: Joi.number().integer(),
    continent: Joi.string(),
    alpha2: Joi.string().length(2),
    alpha3: Joi.string().length(3),<commit_msg>Allow<commit_after>const queryFields = require('./query');
const Joi = require('joi');

const fields = ['startTime', 'endTime', 'status'];
const query = queryFields(fields);
const definitions = {
  status: Joi.string().valid('draft', 'published', 'canceled'),
  beforeDate: Joi.date()
    .timestamp()
    .raw(),
  afterDate: Joi.date()
    .timestamp()
    .raw(),
  isPublic: Joi.number().valid(0, 1),
  related: Joi.string().valid('sessions', 'sessions.tickets'),
  utcOffset: Joi.number().integer(),
};

const modelDefinitions = {
  name: Joi.string(),
  dojoId: Joi.string().guid(),
  type: Joi.string().valid('one-off', 'recurring'),
  description: Joi.string(),
  public: Joi.boolean(),
  // draft status is actually 'saved' string underneath
  status: Joi.string().valid('saved', 'published', 'canceled'),
  recurringType: Joi.string()
    .valid('biweekly', 'weekly')
    .optional(),
  dates: Joi.array().items(
    Joi.object({
      startTime: Joi.date(),
      endTime: Joi.date(),
    })
  ),
  ticketApproval: Joi.boolean().optional(),
  notifyOnApplicant: Joi.boolean().optional(),
  useDojoAddress: Joi.boolean(),
  country: Joi.object({
    countryName: Joi.string(),
    countryNumber: Joi.number().integer(),
    continent: Joi.string(),
    alpha2: Joi.string().length(2),
    alpha3: Joi.string().length(3),
{'fraction_non_alphanumeric': 0.1982823002240478, 'fraction_numerical': 0.004480955937266617, 'mean_word_length': 4.171814671814672, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7365769', 'n_tokens_mistral': 904, 'n_tokens_neox': 907, 'n_words': 179}