directory ========= .. py:module:: sidequest_common.schemas.directory .. autoapi-nested-parse:: The guild directory (``addon/docs/directory.md`` in the addon repo is the contract). Every member's addon keeps a record of their own character and shares it with the guild over addon messages: professions and skill levels, character basics, craft cooldowns, attunements and key reputations, what they sell and want to buy, and the crafting materials they hold. A record has five sections (``prof``, ``char``, ``cd``, ``market``, ``stock``); each travels and is stored on its own, as ``{v, at, d}`` (``relayed`` is addon-local and never sent to the site). Newest ``at`` wins per character+section; ``d: null`` is a tombstone that deletes that character's data for the section. An officer's sync carries the whole directory to the site in the ``SQX1:`` export's additive ``directory``/``item_names``/``recipe_names`` fields (``v`` stays 2; older sites ignore them). .. py:data:: MAX_DIRECTORY_ENTRIES :value: 1000 One directory record per character; matches ``MAX_ROSTER_MEMBERS``. .. py:data:: MAX_DIRECTORY_CHARACTER_LENGTH :value: 64 Mirrors ``epgp.MAX_NAME_LENGTH``; kept local here to avoid an import cycle with ``epgp.py``. .. py:data:: MAX_DIRECTORY_PROFESSIONS :value: 10 Primary + secondary professions a character can have; generous headroom over the usual 2 + 3. .. py:data:: MAX_DIRECTORY_RECIPES_PER_PROFESSION :value: 2000 .. py:data:: MAX_DIRECTORY_ATTUNEMENTS :value: 50 .. py:data:: MAX_DIRECTORY_REPUTATIONS :value: 30 .. py:data:: MAX_DIRECTORY_COOLDOWNS :value: 50 .. py:data:: MAX_MARKET_SELL :value: 100 .. py:data:: MAX_MARKET_BUY :value: 100 .. py:data:: MAX_MARKET_REQUESTS :value: 30 .. py:data:: MARKET_REQUEST_NOTE_MAX :value: 80 .. py:data:: MAX_STOCK_ENTRIES :value: 300 .. py:data:: MAX_ITEM_NAMES :value: 4000 .. py:data:: MAX_RECIPE_NAMES :value: 4000 .. py:class:: DirProfession Bases: :py:obj:`pydantic.BaseModel` One profession in a character's ``prof.professions`` list, primary or secondary. .. py:attribute:: name :type: str .. py:attribute:: skill_line :type: int | None :value: None The skill line id; ``None`` when the collector couldn't read it (e.g. the guild-roster fallback). .. py:attribute:: skill :type: int .. py:attribute:: max_skill :type: int .. py:attribute:: recipes :type: list[int] | None Learned recipe spell ids; ``None`` until the profession window has been opened once. .. py:attribute:: recipes_at :type: int | None :value: None .. py:class:: DirProfData Bases: :py:obj:`pydantic.BaseModel` The ``prof`` section's ``d``: every profession the character has. .. py:attribute:: professions :type: list[DirProfession] .. py:class:: DirReputation Bases: :py:obj:`pydantic.BaseModel` One tracked reputation, from ``SideQuest.Data.REPUTATIONS`` only. .. py:attribute:: faction_id :type: int .. py:attribute:: standing :type: int .. py:attribute:: value :type: int .. py:class:: DirCharData Bases: :py:obj:`pydantic.BaseModel` The ``char`` section's ``d``: level, class, race, spec, item level, attunements, reputations. .. py:attribute:: level :type: int .. py:attribute:: wow_class :type: sidequest_common.schemas.guild_hub.GameClass .. py:attribute:: race :type: str .. py:attribute:: spec :type: str | None .. py:attribute:: item_level :type: float | None :value: None .. py:attribute:: attunements :type: list[str] .. py:attribute:: reputations :type: list[DirReputation] .. py:attribute:: model_config .. py:class:: DirCooldown Bases: :py:obj:`pydantic.BaseModel` One craft cooldown; ``ready_at`` 0 means ready now. .. py:attribute:: key :type: str .. py:attribute:: ready_at :type: int .. py:class:: DirCdData Bases: :py:obj:`pydantic.BaseModel` The ``cd`` section's ``d``: craft cooldowns the character has. .. py:attribute:: cooldowns :type: list[DirCooldown] .. py:class:: DirMarketSell Bases: :py:obj:`pydantic.BaseModel` One item the character sells. ``price`` in copper, ``None`` means "whisper me". .. py:attribute:: item_id :type: int .. py:attribute:: price :type: int | None :value: None .. py:attribute:: qty :type: int .. py:attribute:: crafted :type: bool :value: False .. py:class:: DirMarketBuy Bases: :py:obj:`pydantic.BaseModel` A standing offer to buy a material. ``price`` in copper, ``None`` means "whisper me". .. py:attribute:: item_id :type: int .. py:attribute:: price :type: int | None :value: None .. py:class:: DirMarketRequest Bases: :py:obj:`pydantic.BaseModel` One open request for materials someone else can fill. .. py:attribute:: id :type: str .. py:attribute:: item_id :type: int .. py:attribute:: qty :type: int .. py:attribute:: price :type: int | None :value: None .. py:attribute:: note :type: str | None .. py:attribute:: at :type: int .. py:class:: DirMarketData Bases: :py:obj:`pydantic.BaseModel` The ``market`` section's ``d``: what the character sells, buys and requests. .. py:attribute:: sell :type: list[DirMarketSell] .. py:attribute:: buy :type: list[DirMarketBuy] .. py:attribute:: requests :type: list[DirMarketRequest] .. py:class:: DirStockData Bases: :py:obj:`pydantic.BaseModel` The ``stock`` section's ``d``: crafting materials in bags and bank, as ``[item_id, count]`` pairs. .. py:attribute:: bags :type: list[tuple[int, int]] .. py:attribute:: bank :type: list[tuple[int, int]] .. py:attribute:: bank_at :type: int | None :value: None .. py:class:: DirProfSection Bases: :py:obj:`pydantic.BaseModel` One stored ``prof`` section: ``{v, at, d}``. ``d: None`` is a tombstone. .. py:attribute:: v :type: str .. py:attribute:: at :type: int .. py:attribute:: d :type: DirProfData | None :value: None .. py:class:: DirCharSection Bases: :py:obj:`pydantic.BaseModel` One stored ``char`` section: ``{v, at, d}``. ``d: None`` is a tombstone. .. py:attribute:: v :type: str .. py:attribute:: at :type: int .. py:attribute:: d :type: DirCharData | None :value: None .. py:class:: DirCdSection Bases: :py:obj:`pydantic.BaseModel` One stored ``cd`` section: ``{v, at, d}``. ``d: None`` is a tombstone. .. py:attribute:: v :type: str .. py:attribute:: at :type: int .. py:attribute:: d :type: DirCdData | None :value: None .. py:class:: DirMarketSection Bases: :py:obj:`pydantic.BaseModel` One stored ``market`` section: ``{v, at, d}``. ``d: None`` is a tombstone. .. py:attribute:: v :type: str .. py:attribute:: at :type: int .. py:attribute:: d :type: DirMarketData | None :value: None .. py:class:: DirStockSection Bases: :py:obj:`pydantic.BaseModel` One stored ``stock`` section: ``{v, at, d}``. ``d: None`` is a tombstone. .. py:attribute:: v :type: str .. py:attribute:: at :type: int .. py:attribute:: d :type: DirStockData | None :value: None .. py:class:: ExportDirectorySections Bases: :py:obj:`pydantic.BaseModel` The ``sections`` object of one ``directory[]`` entry. A section absent from the export leaves that part of the character's stored record untouched (the exporting client simply didn't hold anything newer). Unknown section keys, from a newer addon, are ignored. .. py:attribute:: prof :type: DirProfSection | None :value: None .. py:attribute:: char :type: DirCharSection | None :value: None .. py:attribute:: cd :type: DirCdSection | None :value: None .. py:attribute:: market :type: DirMarketSection | None :value: None .. py:attribute:: stock :type: DirStockSection | None :value: None .. py:attribute:: model_config .. py:class:: ExportDirectoryEntry Bases: :py:obj:`pydantic.BaseModel` One character's directory record in the export payload's ``directory`` array. .. py:attribute:: character :type: str .. py:attribute:: sections :type: ExportDirectorySections .. py:class:: DirectorySectionImportCounts Bases: :py:obj:`pydantic.BaseModel` Rows applied for one directory section across an import, and rows skipped for having an older ``at``. .. py:attribute:: updated :type: int :value: 0 .. py:attribute:: skipped :type: int :value: 0 .. py:class:: DirectoryImportCounts Bases: :py:obj:`pydantic.BaseModel` Per-section counts for the ``directory`` array of one ``SQX1:`` import. .. py:attribute:: prof :type: DirectorySectionImportCounts .. py:attribute:: char :type: DirectorySectionImportCounts .. py:attribute:: cd :type: DirectorySectionImportCounts .. py:attribute:: market :type: DirectorySectionImportCounts .. py:attribute:: stock :type: DirectorySectionImportCounts .. py:class:: GuildDirectoryProfession Bases: :py:obj:`pydantic.BaseModel` One profession on a ``GET /api/guild/directory`` character row. .. py:attribute:: name :type: str .. py:attribute:: skill :type: int .. py:attribute:: max_skill :type: int .. py:class:: GuildDirectoryReputation Bases: :py:obj:`pydantic.BaseModel` One tracked reputation on a ``GET /api/guild/directory`` character row. .. py:attribute:: faction_id :type: int .. py:attribute:: standing :type: int .. py:attribute:: value :type: int .. py:class:: GuildDirectoryCooldown Bases: :py:obj:`pydantic.BaseModel` One craft cooldown on a ``GET /api/guild/directory`` character row. .. py:attribute:: key :type: str .. py:attribute:: ready_at :type: datetime.datetime .. py:class:: GuildDirectoryFreshness Bases: :py:obj:`pydantic.BaseModel` When each section was last updated for a character; ``None`` means that section was never shared. .. py:attribute:: prof :type: datetime.datetime | None :value: None .. py:attribute:: char :type: datetime.datetime | None :value: None .. py:attribute:: cd :type: datetime.datetime | None :value: None .. py:attribute:: market :type: datetime.datetime | None :value: None .. py:attribute:: stock :type: datetime.datetime | None :value: None .. py:class:: GuildDirectoryCharacter Bases: :py:obj:`pydantic.BaseModel` One character row of ``GET /api/guild/directory`` (member). .. py:attribute:: character :type: str .. py:attribute:: member_id :type: int | None .. py:attribute:: member_name :type: str | None .. py:attribute:: professions :type: list[GuildDirectoryProfession] .. py:attribute:: level :type: int | None .. py:attribute:: wow_class :type: sidequest_common.schemas.guild_hub.GameClass | None .. py:attribute:: race :type: str | None .. py:attribute:: spec :type: str | None .. py:attribute:: item_level :type: float | None .. py:attribute:: attunements :type: list[str] .. py:attribute:: reputations :type: list[GuildDirectoryReputation] .. py:attribute:: cooldowns :type: list[GuildDirectoryCooldown] .. py:attribute:: freshness :type: GuildDirectoryFreshness .. py:attribute:: model_config .. py:class:: GuildDirectory Bases: :py:obj:`pydantic.BaseModel` Response for ``GET /api/guild/directory`` (member): every character with directory data. .. py:attribute:: characters :type: list[GuildDirectoryCharacter] .. py:class:: GuildMarketSellRow Bases: :py:obj:`pydantic.BaseModel` One ``sell`` row of ``GET /api/guild/market`` (member). .. py:attribute:: character :type: str .. py:attribute:: member_name :type: str | None .. py:attribute:: item_id :type: int .. py:attribute:: item_name :type: str | None .. py:attribute:: price :type: int | None .. py:attribute:: qty :type: int .. py:attribute:: crafted :type: bool .. py:class:: GuildMarketBuyRow Bases: :py:obj:`pydantic.BaseModel` One ``buy`` row of ``GET /api/guild/market`` (member). .. py:attribute:: character :type: str .. py:attribute:: member_name :type: str | None .. py:attribute:: item_id :type: int .. py:attribute:: item_name :type: str | None .. py:attribute:: price :type: int | None .. py:class:: GuildMarketRequestRow Bases: :py:obj:`pydantic.BaseModel` One ``requests`` row of ``GET /api/guild/market`` (member). .. py:attribute:: id :type: str .. py:attribute:: character :type: str .. py:attribute:: member_name :type: str | None .. py:attribute:: item_id :type: int .. py:attribute:: item_name :type: str | None .. py:attribute:: qty :type: int .. py:attribute:: price :type: int | None .. py:attribute:: note :type: str | None .. py:attribute:: at :type: datetime.datetime .. py:class:: GuildMarket Bases: :py:obj:`pydantic.BaseModel` Response for ``GET /api/guild/market`` (member): everyone's sell/buy listings and open requests. .. py:attribute:: sell :type: list[GuildMarketSellRow] .. py:attribute:: buy :type: list[GuildMarketBuyRow] .. py:attribute:: requests :type: list[GuildMarketRequestRow] .. py:class:: GuildStockRow Bases: :py:obj:`pydantic.BaseModel` One character's holdings on ``GET /api/guild/stock`` (member). .. py:attribute:: character :type: str .. py:attribute:: member_name :type: str | None .. py:attribute:: bags :type: int .. py:attribute:: bank :type: int .. py:attribute:: bank_at :type: datetime.datetime | None .. py:class:: GuildStock Bases: :py:obj:`pydantic.BaseModel` Response for ``GET /api/guild/stock?item_id=`` (member): who holds ``item_id``, in bags or bank. .. py:attribute:: item_id :type: int .. py:attribute:: item_name :type: str | None .. py:attribute:: rows :type: list[GuildStockRow]