/* tslint:disable */
/* eslint-disable */
/**
 * This file was automatically generated by Payload.
 * DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,
 * and re-run `payload generate:types` to regenerate this file.
 */

/**
 * Supported timezones in IANA format.
 *
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "supportedTimezones".
 */
export type SupportedTimezones =
  | 'Pacific/Midway'
  | 'Pacific/Niue'
  | 'Pacific/Honolulu'
  | 'Pacific/Rarotonga'
  | 'America/Anchorage'
  | 'Pacific/Gambier'
  | 'America/Los_Angeles'
  | 'America/Tijuana'
  | 'America/Denver'
  | 'America/Phoenix'
  | 'America/Chicago'
  | 'America/Guatemala'
  | 'America/New_York'
  | 'America/Bogota'
  | 'America/Caracas'
  | 'America/Santiago'
  | 'America/Buenos_Aires'
  | 'America/Sao_Paulo'
  | 'Atlantic/South_Georgia'
  | 'Atlantic/Azores'
  | 'Atlantic/Cape_Verde'
  | 'Europe/London'
  | 'Europe/Berlin'
  | 'Africa/Lagos'
  | 'Europe/Athens'
  | 'Africa/Cairo'
  | 'Europe/Moscow'
  | 'Asia/Riyadh'
  | 'Asia/Dubai'
  | 'Asia/Baku'
  | 'Asia/Karachi'
  | 'Asia/Tashkent'
  | 'Asia/Calcutta'
  | 'Asia/Dhaka'
  | 'Asia/Almaty'
  | 'Asia/Jakarta'
  | 'Asia/Bangkok'
  | 'Asia/Shanghai'
  | 'Asia/Singapore'
  | 'Asia/Tokyo'
  | 'Asia/Seoul'
  | 'Australia/Brisbane'
  | 'Australia/Sydney'
  | 'Pacific/Guam'
  | 'Pacific/Noumea'
  | 'Pacific/Auckland'
  | 'Pacific/Fiji';

export interface Config {
  auth: {
    users: UserAuthOperations;
  };
  blocks: {};
  collections: {
    users: User;
    tenants: Tenant;
    residents: Resident;
    'meal-orders': MealOrder;
    meals: Meal;
    media: Media;
    'payload-kv': PayloadKv;
    'payload-locked-documents': PayloadLockedDocument;
    'payload-preferences': PayloadPreference;
    'payload-migrations': PayloadMigration;
  };
  collectionsJoins: {};
  collectionsSelect: {
    users: UsersSelect<false> | UsersSelect<true>;
    tenants: TenantsSelect<false> | TenantsSelect<true>;
    residents: ResidentsSelect<false> | ResidentsSelect<true>;
    'meal-orders': MealOrdersSelect<false> | MealOrdersSelect<true>;
    meals: MealsSelect<false> | MealsSelect<true>;
    media: MediaSelect<false> | MediaSelect<true>;
    'payload-kv': PayloadKvSelect<false> | PayloadKvSelect<true>;
    'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
    'payload-preferences': PayloadPreferencesSelect<false> | PayloadPreferencesSelect<true>;
    'payload-migrations': PayloadMigrationsSelect<false> | PayloadMigrationsSelect<true>;
  };
  db: {
    defaultIDType: number;
  };
  fallbackLocale: null;
  globals: {};
  globalsSelect: {};
  locale: null;
  user: User & {
    collection: 'users';
  };
  jobs: {
    tasks: unknown;
    workflows: unknown;
  };
}
export interface UserAuthOperations {
  forgotPassword: {
    email: string;
    password: string;
  };
  login: {
    email: string;
    password: string;
  };
  registerFirstUser: {
    email: string;
    password: string;
  };
  unlock: {
    email: string;
    password: string;
  };
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "users".
 */
export interface User {
  id: number;
  /**
   * Full name of the user
   */
  name?: string | null;
  password?: string | null;
  /**
   * Global system role
   */
  roles?: ('super-admin' | 'user')[] | null;
  username?: string | null;
  /**
   * Care homes this user has access to
   */
  tenants?:
    | {
        tenant: number | Tenant;
        /**
         * Role(s) for this user within the care home
         */
        roles: ('admin' | 'caregiver' | 'kitchen')[];
        id?: string | null;
      }[]
    | null;
  updatedAt: string;
  createdAt: string;
  email: string;
  resetPasswordToken?: string | null;
  resetPasswordExpiration?: string | null;
  salt?: string | null;
  hash?: string | null;
  loginAttempts?: number | null;
  lockUntil?: string | null;
  sessions?:
    | {
        id: string;
        createdAt?: string | null;
        expiresAt: string;
      }[]
    | null;
}
/**
 * Manage care homes in the system
 *
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "tenants".
 */
export interface Tenant {
  id: number;
  /**
   * Care home name
   */
  name: string;
  /**
   * URL-friendly identifier (e.g., sunny-meadows)
   */
  slug: string;
  /**
   * Optional custom domain (e.g., sunny-meadows.localhost)
   */
  domain?: string | null;
  /**
   * Physical address of the care home
   */
  address?: string | null;
  /**
   * Contact phone number
   */
  phone?: string | null;
  updatedAt: string;
  createdAt: string;
}
/**
 * Manage residents in your care home
 *
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "residents".
 */
export interface Resident {
  id: number;
  tenant?: (number | null) | Tenant;
  /**
   * Full name of the resident
   */
  name: string;
  /**
   * Room number (Zimmer)
   */
  room: string;
  /**
   * Table assignment in dining area (Tisch)
   */
  table?: string | null;
  /**
   * Station or ward
   */
  station?: string | null;
  /**
   * Requires high-caloric meals (Hochkalorisch)
   */
  highCaloric?: boolean | null;
  /**
   * Is the resident currently active?
   */
  active?: boolean | null;
  /**
   * Food aversions and dislikes (Abneigungen)
   */
  aversions?: string | null;
  /**
   * Other notes and special requirements (Sonstiges)
   */
  notes?: string | null;
  updatedAt: string;
  createdAt: string;
}
/**
 * Batch meals by date and meal type
 *
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "meal-orders".
 */
export interface MealOrder {
  id: number;
  tenant?: (number | null) | Tenant;
  /**
   * Auto-generated title
   */
  title?: string | null;
  date: string;
  mealType: 'breakfast' | 'lunch' | 'dinner';
  /**
   * Order status for workflow tracking
   */
  status: 'draft' | 'submitted' | 'preparing' | 'completed';
  /**
   * Number of meals in this order
   */
  mealCount?: number | null;
  /**
   * When the order was submitted to kitchen
   */
  submittedAt?: string | null;
  /**
   * User who created this order
   */
  createdBy?: (number | null) | User;
  /**
   * General notes for this batch of meals
   */
  notes?: string | null;
  updatedAt: string;
  createdAt: string;
}
/**
 * Manage meals for residents
 *
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "meals".
 */
export interface Meal {
  id: number;
  tenant?: (number | null) | Tenant;
  /**
   * Auto-generated title
   */
  title?: string | null;
  /**
   * The meal order this meal belongs to
   */
  order?: (number | null) | MealOrder;
  /**
   * Select the resident for this meal
   */
  resident: number | Resident;
  date: string;
  mealType: 'breakfast' | 'lunch' | 'dinner';
  /**
   * Meal status for kitchen tracking
   */
  status: 'pending' | 'preparing' | 'prepared';
  /**
   * Photo of the paper meal order form
   */
  formImage?: (number | null) | Media;
  /**
   * User who created this meal
   */
  createdBy?: (number | null) | User;
  /**
   * Override: high-caloric requirement for this meal
   */
  highCaloric?: boolean | null;
  /**
   * Override: specific aversions for this meal
   */
  aversions?: string | null;
  /**
   * Special notes for this meal
   */
  notes?: string | null;
  breakfast?: {
    accordingToPlan?: boolean | null;
    bread?: {
      breadRoll?: boolean | null;
      wholeGrainRoll?: boolean | null;
      greyBread?: boolean | null;
      wholeGrainBread?: boolean | null;
      whiteBread?: boolean | null;
      crispbread?: boolean | null;
    };
    porridge?: boolean | null;
    preparation?: {
      sliced?: boolean | null;
      spread?: boolean | null;
    };
    spreads?: {
      butter?: boolean | null;
      margarine?: boolean | null;
      jam?: boolean | null;
      diabeticJam?: boolean | null;
      honey?: boolean | null;
      cheese?: boolean | null;
      quark?: boolean | null;
      sausage?: boolean | null;
    };
    beverages?: {
      coffee?: boolean | null;
      tea?: boolean | null;
      hotMilk?: boolean | null;
      coldMilk?: boolean | null;
    };
    additions?: {
      sugar?: boolean | null;
      sweetener?: boolean | null;
      coffeeCreamer?: boolean | null;
    };
  };
  lunch?: {
    portionSize?: ('small' | 'large' | 'vegetarian') | null;
    soup?: boolean | null;
    dessert?: boolean | null;
    specialPreparations?: {
      pureedFood?: boolean | null;
      pureedMeat?: boolean | null;
      slicedMeat?: boolean | null;
      mashedPotatoes?: boolean | null;
    };
    restrictions?: {
      noFish?: boolean | null;
      fingerFood?: boolean | null;
      onlySweet?: boolean | null;
    };
  };
  dinner?: {
    accordingToPlan?: boolean | null;
    bread?: {
      greyBread?: boolean | null;
      wholeGrainBread?: boolean | null;
      whiteBread?: boolean | null;
      crispbread?: boolean | null;
    };
    preparation?: {
      spread?: boolean | null;
      sliced?: boolean | null;
    };
    spreads?: {
      butter?: boolean | null;
      margarine?: boolean | null;
    };
    soup?: boolean | null;
    porridge?: boolean | null;
    noFish?: boolean | null;
    beverages?: {
      tea?: boolean | null;
      cocoa?: boolean | null;
      hotMilk?: boolean | null;
      coldMilk?: boolean | null;
    };
    additions?: {
      sugar?: boolean | null;
      sweetener?: boolean | null;
    };
  };
  updatedAt: string;
  createdAt: string;
}
/**
 * Uploaded images and files
 *
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "media".
 */
export interface Media {
  id: number;
  /**
   * Alternative text for accessibility
   */
  alt?: string | null;
  /**
   * Optional caption for the image
   */
  caption?: string | null;
  updatedAt: string;
  createdAt: string;
  url?: string | null;
  thumbnailURL?: string | null;
  filename?: string | null;
  mimeType?: string | null;
  filesize?: number | null;
  width?: number | null;
  height?: number | null;
  focalX?: number | null;
  focalY?: number | null;
  sizes?: {
    thumbnail?: {
      url?: string | null;
      width?: number | null;
      height?: number | null;
      mimeType?: string | null;
      filesize?: number | null;
      filename?: string | null;
    };
    preview?: {
      url?: string | null;
      width?: number | null;
      height?: number | null;
      mimeType?: string | null;
      filesize?: number | null;
      filename?: string | null;
    };
  };
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "payload-kv".
 */
export interface PayloadKv {
  id: number;
  key: string;
  data:
    | {
        [k: string]: unknown;
      }
    | unknown[]
    | string
    | number
    | boolean
    | null;
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "payload-locked-documents".
 */
export interface PayloadLockedDocument {
  id: number;
  document?:
    | ({
        relationTo: 'users';
        value: number | User;
      } | null)
    | ({
        relationTo: 'tenants';
        value: number | Tenant;
      } | null)
    | ({
        relationTo: 'residents';
        value: number | Resident;
      } | null)
    | ({
        relationTo: 'meal-orders';
        value: number | MealOrder;
      } | null)
    | ({
        relationTo: 'meals';
        value: number | Meal;
      } | null)
    | ({
        relationTo: 'media';
        value: number | Media;
      } | null);
  globalSlug?: string | null;
  user: {
    relationTo: 'users';
    value: number | User;
  };
  updatedAt: string;
  createdAt: string;
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "payload-preferences".
 */
export interface PayloadPreference {
  id: number;
  user: {
    relationTo: 'users';
    value: number | User;
  };
  key?: string | null;
  value?:
    | {
        [k: string]: unknown;
      }
    | unknown[]
    | string
    | number
    | boolean
    | null;
  updatedAt: string;
  createdAt: string;
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "payload-migrations".
 */
export interface PayloadMigration {
  id: number;
  name?: string | null;
  batch?: number | null;
  updatedAt: string;
  createdAt: string;
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "users_select".
 */
export interface UsersSelect<T extends boolean = true> {
  name?: T;
  password?: T;
  roles?: T;
  username?: T;
  tenants?:
    | T
    | {
        tenant?: T;
        roles?: T;
        id?: T;
      };
  updatedAt?: T;
  createdAt?: T;
  email?: T;
  resetPasswordToken?: T;
  resetPasswordExpiration?: T;
  salt?: T;
  hash?: T;
  loginAttempts?: T;
  lockUntil?: T;
  sessions?:
    | T
    | {
        id?: T;
        createdAt?: T;
        expiresAt?: T;
      };
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "tenants_select".
 */
export interface TenantsSelect<T extends boolean = true> {
  name?: T;
  slug?: T;
  domain?: T;
  address?: T;
  phone?: T;
  updatedAt?: T;
  createdAt?: T;
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "residents_select".
 */
export interface ResidentsSelect<T extends boolean = true> {
  tenant?: T;
  name?: T;
  room?: T;
  table?: T;
  station?: T;
  highCaloric?: T;
  active?: T;
  aversions?: T;
  notes?: T;
  updatedAt?: T;
  createdAt?: T;
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "meal-orders_select".
 */
export interface MealOrdersSelect<T extends boolean = true> {
  tenant?: T;
  title?: T;
  date?: T;
  mealType?: T;
  status?: T;
  mealCount?: T;
  submittedAt?: T;
  createdBy?: T;
  notes?: T;
  updatedAt?: T;
  createdAt?: T;
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "meals_select".
 */
export interface MealsSelect<T extends boolean = true> {
  tenant?: T;
  title?: T;
  order?: T;
  resident?: T;
  date?: T;
  mealType?: T;
  status?: T;
  formImage?: T;
  createdBy?: T;
  highCaloric?: T;
  aversions?: T;
  notes?: T;
  breakfast?:
    | T
    | {
        accordingToPlan?: T;
        bread?:
          | T
          | {
              breadRoll?: T;
              wholeGrainRoll?: T;
              greyBread?: T;
              wholeGrainBread?: T;
              whiteBread?: T;
              crispbread?: T;
            };
        porridge?: T;
        preparation?:
          | T
          | {
              sliced?: T;
              spread?: T;
            };
        spreads?:
          | T
          | {
              butter?: T;
              margarine?: T;
              jam?: T;
              diabeticJam?: T;
              honey?: T;
              cheese?: T;
              quark?: T;
              sausage?: T;
            };
        beverages?:
          | T
          | {
              coffee?: T;
              tea?: T;
              hotMilk?: T;
              coldMilk?: T;
            };
        additions?:
          | T
          | {
              sugar?: T;
              sweetener?: T;
              coffeeCreamer?: T;
            };
      };
  lunch?:
    | T
    | {
        portionSize?: T;
        soup?: T;
        dessert?: T;
        specialPreparations?:
          | T
          | {
              pureedFood?: T;
              pureedMeat?: T;
              slicedMeat?: T;
              mashedPotatoes?: T;
            };
        restrictions?:
          | T
          | {
              noFish?: T;
              fingerFood?: T;
              onlySweet?: T;
            };
      };
  dinner?:
    | T
    | {
        accordingToPlan?: T;
        bread?:
          | T
          | {
              greyBread?: T;
              wholeGrainBread?: T;
              whiteBread?: T;
              crispbread?: T;
            };
        preparation?:
          | T
          | {
              spread?: T;
              sliced?: T;
            };
        spreads?:
          | T
          | {
              butter?: T;
              margarine?: T;
            };
        soup?: T;
        porridge?: T;
        noFish?: T;
        beverages?:
          | T
          | {
              tea?: T;
              cocoa?: T;
              hotMilk?: T;
              coldMilk?: T;
            };
        additions?:
          | T
          | {
              sugar?: T;
              sweetener?: T;
            };
      };
  updatedAt?: T;
  createdAt?: T;
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "media_select".
 */
export interface MediaSelect<T extends boolean = true> {
  alt?: T;
  caption?: T;
  updatedAt?: T;
  createdAt?: T;
  url?: T;
  thumbnailURL?: T;
  filename?: T;
  mimeType?: T;
  filesize?: T;
  width?: T;
  height?: T;
  focalX?: T;
  focalY?: T;
  sizes?:
    | T
    | {
        thumbnail?:
          | T
          | {
              url?: T;
              width?: T;
              height?: T;
              mimeType?: T;
              filesize?: T;
              filename?: T;
            };
        preview?:
          | T
          | {
              url?: T;
              width?: T;
              height?: T;
              mimeType?: T;
              filesize?: T;
              filename?: T;
            };
      };
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "payload-kv_select".
 */
export interface PayloadKvSelect<T extends boolean = true> {
  key?: T;
  data?: T;
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "payload-locked-documents_select".
 */
export interface PayloadLockedDocumentsSelect<T extends boolean = true> {
  document?: T;
  globalSlug?: T;
  user?: T;
  updatedAt?: T;
  createdAt?: T;
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "payload-preferences_select".
 */
export interface PayloadPreferencesSelect<T extends boolean = true> {
  user?: T;
  key?: T;
  value?: T;
  updatedAt?: T;
  createdAt?: T;
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "payload-migrations_select".
 */
export interface PayloadMigrationsSelect<T extends boolean = true> {
  name?: T;
  batch?: T;
  updatedAt?: T;
  createdAt?: T;
}
/**
 * This interface was referenced by `Config`'s JSON-Schema
 * via the `definition` "auth".
 */
export interface Auth {
  [k: string]: unknown;
}


declare module 'payload' {
  export interface GeneratedTypes extends Config {}
}