// ----------------------------------------------------------------------------- // Enum Typedefs // ----------------------------------------------------------------------------- /** * @typedef {"Food" | "Clothes" | "Camp" | "Utensils" | "Gear"} ItemType */ // ----------------------------------------------------------------------------- // Model Typedefs // ----------------------------------------------------------------------------- /** * Represents an adventure. * @typedef {Object} Adventure * @property {string} guid * @property {string} name * @property {string} [description] * @property {string} [location] * @property {Participant[]} [participants] * @property {Item[]} [pack_lists] */ /** * Represents a validation error from the application. * @typedef {Object} Error * @property {string} code * @property {string} message */ /** * @typedef {Object} Guest * @property {string} [email] * @property {string} [name] */ /** * @typedef {Object} Item * @property {string} name * @property {number} [size] * @property {string} [description] * @property {ItemType} [type] */ /** * Represents a adventure participant and what items they will bring. * @typedef {Object} Participant * @property {Person} person * @property {Item[]} [items] */ /** * @typedef {Object} User * @property {string} guid * @property {string} [email] * @property {string} [name] */ // ----------------------------------------------------------------------------- // Union Typedefs // ----------------------------------------------------------------------------- /** * @typedef {(Guest & { discriminator: "guest" } | User & { discriminator: "user" })} Person */