@league-of-foundry-developers/foundry-vtt-types 9.280.1 → 12.331.1-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (938) hide show
  1. package/README.md +21 -18
  2. package/index-lenient.d.mts +7 -0
  3. package/index.d.mts +5 -0
  4. package/package.json +67 -39
  5. package/src/foundry/client/apps/app.d.mts +595 -0
  6. package/src/foundry/client/apps/av/av-config.d.mts +93 -0
  7. package/src/foundry/client/apps/av/cameras.d.mts +189 -0
  8. package/src/foundry/client/apps/av/index.d.mts +3 -0
  9. package/src/foundry/client/apps/dialogs/folder-export.d.mts +16 -0
  10. package/src/foundry/client/apps/dialogs/index.d.mts +1 -0
  11. package/src/foundry/client/apps/form.d.mts +469 -0
  12. package/src/foundry/client/apps/forms/actor.d.mts +176 -0
  13. package/src/foundry/client/apps/forms/adventure-exporter.d.mts +132 -0
  14. package/src/foundry/client/apps/forms/adventure-importer.d.mts +85 -0
  15. package/src/foundry/client/apps/forms/base-sheet.d.mts +45 -0
  16. package/src/foundry/client/apps/forms/card-config.d.mts +48 -0
  17. package/src/foundry/client/apps/forms/cards-config.d.mts +141 -0
  18. package/src/foundry/client/apps/forms/combat-config.d.mts +51 -0
  19. package/src/foundry/client/apps/forms/combatant-config.d.mts +45 -0
  20. package/src/foundry/client/apps/forms/default-sheets-config.d.mts +46 -0
  21. package/src/foundry/client/apps/forms/effect-config.d.mts +77 -0
  22. package/src/foundry/client/apps/forms/folder-config.d.mts +60 -0
  23. package/src/foundry/client/apps/forms/fonts.d.mts +168 -0
  24. package/src/foundry/client/apps/forms/grid-config.d.mts +144 -0
  25. package/src/foundry/client/apps/forms/image-popout.d.mts +179 -0
  26. package/src/foundry/client/apps/forms/index.d.mts +26 -0
  27. package/src/foundry/client/apps/forms/item.d.mts +58 -0
  28. package/src/foundry/client/apps/forms/journal-page-sheet.d.mts +313 -0
  29. package/src/foundry/client/apps/forms/journal-sheet.d.mts +312 -0
  30. package/src/foundry/client/apps/forms/macro-config.d.mts +59 -0
  31. package/src/foundry/client/apps/forms/measure-template.d.mts +59 -0
  32. package/src/foundry/client/apps/forms/ownership.d.mts +66 -0
  33. package/src/foundry/client/apps/forms/playlist-config.d.mts +46 -0
  34. package/src/foundry/client/apps/forms/playlist-sound-config.d.mts +63 -0
  35. package/src/foundry/client/apps/forms/roll-table-config.d.mts +160 -0
  36. package/src/foundry/client/apps/forms/scene-config.d.mts +157 -0
  37. package/src/foundry/client/apps/forms/sheet-config.d.mts +202 -0
  38. package/src/foundry/client/apps/forms/user-config.d.mts +71 -0
  39. package/src/foundry/client/apps/hud/chatbubble.d.mts +113 -0
  40. package/src/foundry/client/apps/hud/container.d.mts +54 -0
  41. package/src/foundry/client/apps/hud/controls.d.mts +166 -0
  42. package/src/foundry/client/apps/hud/hotbar.d.mts +169 -0
  43. package/src/foundry/client/apps/hud/hud.d.mts +87 -0
  44. package/src/foundry/client/apps/hud/index.d.mts +9 -0
  45. package/src/foundry/client/apps/hud/menu.d.mts +77 -0
  46. package/src/foundry/client/apps/hud/navigation.d.mts +116 -0
  47. package/src/foundry/client/apps/hud/pause.d.mts +32 -0
  48. package/src/foundry/client/apps/hud/players.d.mts +82 -0
  49. package/src/foundry/client/apps/i18n.d.mts +162 -0
  50. package/src/foundry/client/apps/index.d.mts +10 -0
  51. package/src/foundry/client/apps/placeables/drawing-config.d.mts +80 -0
  52. package/src/foundry/client/apps/placeables/drawing-hud.d.mts +31 -0
  53. package/src/foundry/client/apps/placeables/index.d.mts +10 -0
  54. package/src/foundry/client/apps/placeables/light-config.d.mts +100 -0
  55. package/src/foundry/client/apps/placeables/note-config.d.mts +65 -0
  56. package/src/foundry/client/apps/placeables/sound-config.d.mts +43 -0
  57. package/src/foundry/client/apps/placeables/tile-config.d.mts +54 -0
  58. package/src/foundry/client/apps/placeables/tile-hud.d.mts +37 -0
  59. package/src/foundry/client/apps/placeables/token-config.d.mts +244 -0
  60. package/src/foundry/client/apps/placeables/token-hud.d.mts +134 -0
  61. package/src/foundry/client/apps/placeables/wall-config.d.mts +63 -0
  62. package/src/foundry/client/apps/sidebar/apps/chat-popout.d.mts +39 -0
  63. package/src/foundry/client/apps/sidebar/apps/client-settings.d.mts +98 -0
  64. package/src/foundry/client/apps/sidebar/apps/compendium.d.mts +93 -0
  65. package/src/foundry/client/apps/sidebar/apps/index.d.mts +10 -0
  66. package/src/foundry/client/apps/sidebar/apps/invitation-links.d.mts +32 -0
  67. package/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts +180 -0
  68. package/src/foundry/client/apps/sidebar/apps/module-management.d.mts +135 -0
  69. package/src/foundry/client/apps/sidebar/apps/permission-config.d.mts +72 -0
  70. package/src/foundry/client/apps/sidebar/apps/support-details.d.mts +121 -0
  71. package/src/foundry/client/apps/sidebar/apps/tours-management.d.mts +54 -0
  72. package/src/foundry/client/apps/sidebar/apps/world-config.d.mts +57 -0
  73. package/src/foundry/client/apps/sidebar/directory-tab-mixin.d.mts +276 -0
  74. package/src/foundry/client/apps/sidebar/document-directory.d.mts +164 -0
  75. package/src/foundry/client/apps/sidebar/index.d.mts +7 -0
  76. package/src/foundry/client/apps/sidebar/package-configuration.d.mts +86 -0
  77. package/src/foundry/client/apps/sidebar/sidebar-tab.d.mts +80 -0
  78. package/src/foundry/client/apps/sidebar/sidebar.d.mts +95 -0
  79. package/src/foundry/client/apps/sidebar/tabs/actors-directory.d.mts +20 -0
  80. package/src/foundry/client/apps/sidebar/tabs/cards-directory.d.mts +12 -0
  81. package/src/foundry/client/apps/sidebar/tabs/chat-log.d.mts +364 -0
  82. package/src/foundry/client/apps/sidebar/tabs/combat-tracker.d.mts +156 -0
  83. package/src/foundry/client/apps/sidebar/tabs/compendium-directory.d.mts +105 -0
  84. package/src/foundry/client/apps/sidebar/tabs/index.d.mts +12 -0
  85. package/src/foundry/client/apps/sidebar/tabs/items-directory.d.mts +14 -0
  86. package/src/foundry/client/apps/sidebar/tabs/journal-directory.d.mts +13 -0
  87. package/src/foundry/client/apps/sidebar/tabs/macros-directory.d.mts +16 -0
  88. package/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts +275 -0
  89. package/src/foundry/client/apps/sidebar/tabs/roll-table-directory.d.mts +13 -0
  90. package/src/foundry/client/apps/sidebar/tabs/scenes-directory.d.mts +34 -0
  91. package/src/foundry/client/apps/sidebar/tabs/settings.d.mts +72 -0
  92. package/src/foundry/client/apps/templates.d.mts +546 -0
  93. package/src/foundry/client/audio/audio.d.mts +390 -0
  94. package/src/foundry/client/audio/container.d.mts +176 -0
  95. package/src/foundry/client/audio/index.d.mts +3 -0
  96. package/src/foundry/client/audio/sound.d.mts +307 -0
  97. package/src/foundry/client/av/client.d.mts +162 -0
  98. package/src/foundry/client/av/clients/index.d.mts +1 -0
  99. package/src/foundry/client/av/clients/simplepeer.d.mts +155 -0
  100. package/src/foundry/client/av/index.d.mts +4 -0
  101. package/src/foundry/client/av/master.d.mts +191 -0
  102. package/src/foundry/client/av/settings.d.mts +315 -0
  103. package/src/foundry/client/config.d.mts +2856 -0
  104. package/src/foundry/client/core/clipboard.d.mts +20 -0
  105. package/src/foundry/client/core/document-index.d.mts +118 -0
  106. package/src/foundry/client/core/gamepad.d.mts +62 -0
  107. package/src/foundry/client/core/hooks.d.mts +132 -0
  108. package/src/foundry/client/core/image.d.mts +190 -0
  109. package/src/foundry/client/core/index.d.mts +20 -0
  110. package/src/foundry/client/core/issues.d.mts +102 -0
  111. package/src/foundry/client/core/keybindings.d.mts +312 -0
  112. package/src/foundry/client/core/keyboard.d.mts +224 -0
  113. package/src/foundry/client/core/mouse.d.mts +28 -0
  114. package/src/foundry/client/core/nue.d.mts +38 -0
  115. package/src/foundry/client/core/packages.d.mts +185 -0
  116. package/src/foundry/client/core/settings.d.mts +260 -0
  117. package/src/foundry/client/core/socket.d.mts +16 -0
  118. package/src/foundry/client/core/sorting.d.mts +76 -0
  119. package/src/foundry/client/core/time.d.mts +73 -0
  120. package/src/foundry/client/core/tooltip.d.mts +198 -0
  121. package/src/foundry/client/core/tour.d.mts +279 -0
  122. package/src/foundry/client/core/tours.d.mts +22 -0
  123. package/src/foundry/client/core/utils.d.mts +71 -0
  124. package/src/foundry/client/core/video.d.mts +161 -0
  125. package/src/foundry/client/core/workers.d.mts +128 -0
  126. package/src/foundry/client/data/abstract/canvas-document.d.mts +63 -0
  127. package/src/foundry/client/data/abstract/client-document.d.mts +717 -0
  128. package/src/foundry/client/data/abstract/directory-collection-mixin.d.mts +135 -0
  129. package/src/foundry/client/data/abstract/document-collection.d.mts +204 -0
  130. package/src/foundry/client/data/abstract/index.d.mts +5 -0
  131. package/src/foundry/client/data/abstract/world-collection.d.mts +171 -0
  132. package/src/foundry/client/data/collections/actors.d.mts +41 -0
  133. package/src/foundry/client/data/collections/cards.d.mts +12 -0
  134. package/src/foundry/client/data/collections/combats.d.mts +43 -0
  135. package/src/foundry/client/data/collections/compendium-collection.d.mts +504 -0
  136. package/src/foundry/client/data/collections/compendium-folders.d.mts +13 -0
  137. package/src/foundry/client/data/collections/compendium-packs.d.mts +27 -0
  138. package/src/foundry/client/data/collections/fog.d.mts +17 -0
  139. package/src/foundry/client/data/collections/folder.d.mts +27 -0
  140. package/src/foundry/client/data/collections/index.d.mts +17 -0
  141. package/src/foundry/client/data/collections/items.d.mts +14 -0
  142. package/src/foundry/client/data/collections/journal.d.mts +62 -0
  143. package/src/foundry/client/data/collections/macros.d.mts +32 -0
  144. package/src/foundry/client/data/collections/messages.d.mts +35 -0
  145. package/src/foundry/client/data/collections/playlists.d.mts +34 -0
  146. package/src/foundry/client/data/collections/scenes.d.mts +68 -0
  147. package/src/foundry/client/data/collections/settings.d.mts +29 -0
  148. package/src/foundry/client/data/collections/tables.d.mts +21 -0
  149. package/src/foundry/client/data/collections/users.d.mts +50 -0
  150. package/src/foundry/client/data/documents/active-effect.d.mts +348 -0
  151. package/src/foundry/client/data/documents/actor-delta.d.mts +88 -0
  152. package/src/foundry/client/data/documents/actor.d.mts +301 -0
  153. package/src/foundry/client/data/documents/adventure.d.mts +94 -0
  154. package/src/foundry/client/data/documents/ambient-light.d.mts +32 -0
  155. package/src/foundry/client/data/documents/ambient-sound.d.mts +19 -0
  156. package/src/foundry/client/data/documents/card.d.mts +115 -0
  157. package/src/foundry/client/data/documents/cards.d.mts +342 -0
  158. package/src/foundry/client/data/documents/chat-message.d.mts +218 -0
  159. package/src/foundry/client/data/documents/combat.d.mts +315 -0
  160. package/src/foundry/client/data/documents/combatant.d.mts +90 -0
  161. package/src/foundry/client/data/documents/drawing.d.mts +24 -0
  162. package/src/foundry/client/data/documents/fog-exploration.d.mts +51 -0
  163. package/src/foundry/client/data/documents/folder.d.mts +123 -0
  164. package/src/foundry/client/data/documents/index.d.mts +30 -0
  165. package/src/foundry/client/data/documents/item.d.mts +55 -0
  166. package/src/foundry/client/data/documents/journal-entry-page.d.mts +219 -0
  167. package/src/foundry/client/data/documents/journal-entry.d.mts +71 -0
  168. package/src/foundry/client/data/documents/macro.d.mts +73 -0
  169. package/src/foundry/client/data/documents/measured-template.d.mts +29 -0
  170. package/src/foundry/client/data/documents/note.d.mts +35 -0
  171. package/src/foundry/client/data/documents/playlist-sound.d.mts +114 -0
  172. package/src/foundry/client/data/documents/playlist.d.mts +196 -0
  173. package/src/foundry/client/data/documents/scene.d.mts +228 -0
  174. package/src/foundry/client/data/documents/setting.d.mts +43 -0
  175. package/src/foundry/client/data/documents/table-result.d.mts +29 -0
  176. package/src/foundry/client/data/documents/table.d.mts +310 -0
  177. package/src/foundry/client/data/documents/tile.d.mts +21 -0
  178. package/src/foundry/client/data/documents/token.d.mts +342 -0
  179. package/src/foundry/client/data/documents/user.d.mts +153 -0
  180. package/src/foundry/client/data/documents/wall.d.mts +19 -0
  181. package/src/foundry/client/data/index.d.mts +3 -0
  182. package/src/foundry/client/game.d.mts +702 -0
  183. package/src/foundry/client/head.d.mts +87 -0
  184. package/src/foundry/client/hooks.d.mts +1184 -0
  185. package/src/foundry/client/index.d.mts +13 -0
  186. package/src/foundry/client/pixi/board.d.mts +927 -0
  187. package/src/foundry/client/pixi/core/containers/base-canvas-group.d.mts +83 -0
  188. package/src/foundry/client/pixi/core/containers/cached-container.d.mts +116 -0
  189. package/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts +35 -0
  190. package/src/foundry/client/pixi/core/containers/index.d.mts +8 -0
  191. package/src/foundry/client/pixi/core/containers/point-source-mesh.d.mts +62 -0
  192. package/src/foundry/client/pixi/core/containers/quad-mesh.d.mts +43 -0
  193. package/src/foundry/client/pixi/core/containers/quadtree.d.mts +199 -0
  194. package/src/foundry/client/pixi/core/containers/sprite-mesh.d.mts +326 -0
  195. package/src/foundry/client/pixi/core/containers/unbound-container.d.mts +21 -0
  196. package/src/foundry/client/pixi/core/index.d.mts +4 -0
  197. package/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts +160 -0
  198. package/src/foundry/client/pixi/core/interaction/control-icon.d.mts +80 -0
  199. package/src/foundry/client/pixi/core/interaction/index.d.mts +8 -0
  200. package/src/foundry/client/pixi/core/interaction/mouse-handler.d.mts +264 -0
  201. package/src/foundry/client/pixi/core/interaction/ping.d.mts +58 -0
  202. package/src/foundry/client/pixi/core/interaction/pings/chevron.d.mts +73 -0
  203. package/src/foundry/client/pixi/core/interaction/pings/index.d.mts +2 -0
  204. package/src/foundry/client/pixi/core/interaction/pings/pulse.d.mts +115 -0
  205. package/src/foundry/client/pixi/core/interaction/render-flags.d.mts +103 -0
  206. package/src/foundry/client/pixi/core/interaction/resize-handle.d.mts +52 -0
  207. package/src/foundry/client/pixi/core/interaction/targets.d.mts +45 -0
  208. package/src/foundry/client/pixi/core/loader.d.mts +206 -0
  209. package/src/foundry/client/pixi/core/shapes/index.d.mts +6 -0
  210. package/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts +119 -0
  211. package/src/foundry/client/pixi/core/shapes/polygon-helpers.d.mts +31 -0
  212. package/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts +110 -0
  213. package/src/foundry/client/pixi/core/shapes/precise-text.d.mts +27 -0
  214. package/src/foundry/client/pixi/core/shapes/ray.d.mts +165 -0
  215. package/src/foundry/client/pixi/core/shapes/source-polygon.d.mts +251 -0
  216. package/src/foundry/client/pixi/extensions/circle.d.mts +130 -0
  217. package/src/foundry/client/pixi/extensions/index.d.mts +3 -0
  218. package/src/foundry/client/pixi/extensions/polygon.d.mts +152 -0
  219. package/src/foundry/client/pixi/extensions/rectangle.d.mts +226 -0
  220. package/src/foundry/client/pixi/groups/effects.d.mts +189 -0
  221. package/src/foundry/client/pixi/groups/environment.d.mts +80 -0
  222. package/src/foundry/client/pixi/groups/hidden.d.mts +40 -0
  223. package/src/foundry/client/pixi/groups/index.d.mts +7 -0
  224. package/src/foundry/client/pixi/groups/interface.d.mts +74 -0
  225. package/src/foundry/client/pixi/groups/overlay.d.mts +18 -0
  226. package/src/foundry/client/pixi/groups/primary.d.mts +207 -0
  227. package/src/foundry/client/pixi/groups/rendered.d.mts +18 -0
  228. package/src/foundry/client/pixi/index.d.mts +10 -0
  229. package/src/foundry/client/pixi/layers/base/canvas-layer.d.mts +79 -0
  230. package/src/foundry/client/pixi/layers/base/index.d.mts +3 -0
  231. package/src/foundry/client/pixi/layers/base/interaction-layer.d.mts +139 -0
  232. package/src/foundry/client/pixi/layers/base/placeables-layer.d.mts +598 -0
  233. package/src/foundry/client/pixi/layers/controls/cursor.d.mts +27 -0
  234. package/src/foundry/client/pixi/layers/controls/door.d.mts +70 -0
  235. package/src/foundry/client/pixi/layers/controls/hud.d.mts +114 -0
  236. package/src/foundry/client/pixi/layers/controls/index.d.mts +5 -0
  237. package/src/foundry/client/pixi/layers/controls/layer.d.mts +229 -0
  238. package/src/foundry/client/pixi/layers/controls/ruler.d.mts +316 -0
  239. package/src/foundry/client/pixi/layers/effects/background-effects.d.mts +34 -0
  240. package/src/foundry/client/pixi/layers/effects/coloration-effects.d.mts +27 -0
  241. package/src/foundry/client/pixi/layers/effects/illumination-effects.d.mts +74 -0
  242. package/src/foundry/client/pixi/layers/effects/index.d.mts +6 -0
  243. package/src/foundry/client/pixi/layers/effects/visibility.d.mts +194 -0
  244. package/src/foundry/client/pixi/layers/effects/weather/particles/effect.d.mts +47 -0
  245. package/src/foundry/client/pixi/layers/effects/weather/particles/index.d.mts +2 -0
  246. package/src/foundry/client/pixi/layers/effects/weather/particles/leaves.d.mts +20 -0
  247. package/src/foundry/client/pixi/layers/effects/weather-effects.d.mts +172 -0
  248. package/src/foundry/client/pixi/layers/grid/highlight.d.mts +32 -0
  249. package/src/foundry/client/pixi/layers/grid/index.d.mts +2 -0
  250. package/src/foundry/client/pixi/layers/grid/layer.d.mts +225 -0
  251. package/src/foundry/client/pixi/layers/index.d.mts +6 -0
  252. package/src/foundry/client/pixi/layers/masks/depth.d.mts +37 -0
  253. package/src/foundry/client/pixi/layers/masks/index.d.mts +3 -0
  254. package/src/foundry/client/pixi/layers/masks/occlusion.d.mts +55 -0
  255. package/src/foundry/client/pixi/layers/masks/vision.d.mts +85 -0
  256. package/src/foundry/client/pixi/layers/placeables/drawings.d.mts +92 -0
  257. package/src/foundry/client/pixi/layers/placeables/index.d.mts +8 -0
  258. package/src/foundry/client/pixi/layers/placeables/lighting.d.mts +137 -0
  259. package/src/foundry/client/pixi/layers/placeables/notes.d.mts +99 -0
  260. package/src/foundry/client/pixi/layers/placeables/sounds.d.mts +129 -0
  261. package/src/foundry/client/pixi/layers/placeables/templates.d.mts +60 -0
  262. package/src/foundry/client/pixi/layers/placeables/tiles.d.mts +114 -0
  263. package/src/foundry/client/pixi/layers/placeables/tokens.d.mts +180 -0
  264. package/src/foundry/client/pixi/layers/placeables/walls.d.mts +210 -0
  265. package/src/foundry/client/pixi/perception/clockwise-sweep.d.mts +169 -0
  266. package/src/foundry/client/pixi/perception/color-manager.d.mts +86 -0
  267. package/src/foundry/client/pixi/perception/detection-mode.d.mts +196 -0
  268. package/src/foundry/client/pixi/perception/fog.d.mts +102 -0
  269. package/src/foundry/client/pixi/perception/index.d.mts +7 -0
  270. package/src/foundry/client/pixi/perception/perception-manager.d.mts +166 -0
  271. package/src/foundry/client/pixi/perception/vision-mode.d.mts +197 -0
  272. package/src/foundry/client/pixi/perception/weiler-atherton-clipping.d.mts +152 -0
  273. package/src/foundry/client/pixi/placeable.d.mts +586 -0
  274. package/src/foundry/client/pixi/placeables/drawing.d.mts +292 -0
  275. package/src/foundry/client/pixi/placeables/index.d.mts +9 -0
  276. package/src/foundry/client/pixi/placeables/light.d.mts +140 -0
  277. package/src/foundry/client/pixi/placeables/note.d.mts +114 -0
  278. package/src/foundry/client/pixi/placeables/primary-canvas-objects/drawing-shape.d.mts +143 -0
  279. package/src/foundry/client/pixi/placeables/primary-canvas-objects/index.d.mts +5 -0
  280. package/src/foundry/client/pixi/placeables/primary-canvas-objects/occludable-object.d.mts +175 -0
  281. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-canvas-object.d.mts +159 -0
  282. package/src/foundry/client/pixi/placeables/primary-canvas-objects/tile-mesh.d.mts +52 -0
  283. package/src/foundry/client/pixi/placeables/primary-canvas-objects/token-mesh.d.mts +62 -0
  284. package/src/foundry/client/pixi/placeables/sound.d.mts +133 -0
  285. package/src/foundry/client/pixi/placeables/template.d.mts +211 -0
  286. package/src/foundry/client/pixi/placeables/tile.d.mts +284 -0
  287. package/src/foundry/client/pixi/placeables/token.d.mts +825 -0
  288. package/src/foundry/client/pixi/placeables/wall.d.mts +275 -0
  289. package/src/foundry/client/pixi/webgl/extensions/batch-renderer.d.mts +60 -0
  290. package/src/foundry/client/pixi/webgl/extensions/batch-shader-generator.d.mts +21 -0
  291. package/src/foundry/client/pixi/webgl/extensions/blend-modes.d.mts +53 -0
  292. package/src/foundry/client/pixi/webgl/extensions/index.d.mts +3 -0
  293. package/src/foundry/client/pixi/webgl/helpers/framebugger-snapshot.d.mts +22 -0
  294. package/src/foundry/client/pixi/webgl/helpers/index.d.mts +3 -0
  295. package/src/foundry/client/pixi/webgl/helpers/smooth-noise.d.mts +61 -0
  296. package/src/foundry/client/pixi/webgl/helpers/texture-extractor.d.mts +80 -0
  297. package/src/foundry/client/pixi/webgl/index.d.mts +3 -0
  298. package/src/foundry/client/pixi/webgl/shaders/base.d.mts +691 -0
  299. package/src/foundry/client/pixi/webgl/shaders/effects/index.d.mts +3 -0
  300. package/src/foundry/client/pixi/webgl/shaders/effects/lighting.d.mts +642 -0
  301. package/src/foundry/client/pixi/webgl/shaders/effects/vision.d.mts +216 -0
  302. package/src/foundry/client/pixi/webgl/shaders/effects/weather/base.d.mts +102 -0
  303. package/src/foundry/client/pixi/webgl/shaders/effects/weather/effect.d.mts +38 -0
  304. package/src/foundry/client/pixi/webgl/shaders/effects/weather/fog.d.mts +34 -0
  305. package/src/foundry/client/pixi/webgl/shaders/effects/weather/index.d.mts +5 -0
  306. package/src/foundry/client/pixi/webgl/shaders/effects/weather/rain.d.mts +24 -0
  307. package/src/foundry/client/pixi/webgl/shaders/effects/weather/snow.d.mts +20 -0
  308. package/src/foundry/client/pixi/webgl/shaders/filters/blur.d.mts +163 -0
  309. package/src/foundry/client/pixi/webgl/shaders/filters/filters.d.mts +462 -0
  310. package/src/foundry/client/pixi/webgl/shaders/filters/fxaa.d.mts +74 -0
  311. package/src/foundry/client/pixi/webgl/shaders/filters/index.d.mts +3 -0
  312. package/src/foundry/client/pixi/webgl/shaders/index.d.mts +4 -0
  313. package/src/foundry/client/pixi/webgl/shaders/samplers/color-adjustment.d.mts +101 -0
  314. package/src/foundry/client/pixi/webgl/shaders/samplers/fog-of-war.d.mts +16 -0
  315. package/src/foundry/client/pixi/webgl/shaders/samplers/index.d.mts +6 -0
  316. package/src/foundry/client/pixi/webgl/shaders/samplers/inverse-occlusion.d.mts +47 -0
  317. package/src/foundry/client/pixi/webgl/shaders/samplers/invisibility.d.mts +28 -0
  318. package/src/foundry/client/pixi/webgl/shaders/samplers/monochromatic.d.mts +30 -0
  319. package/src/foundry/client/pixi/webgl/shaders/samplers/occlusion.d.mts +69 -0
  320. package/src/foundry/client/pixi/workers/index.d.mts +1 -0
  321. package/src/foundry/client/pixi/workers/texture-worker.d.mts +125 -0
  322. package/src/foundry/client/tours/canvas-tour.d.mts +9 -0
  323. package/src/foundry/client/tours/index.d.mts +3 -0
  324. package/src/foundry/client/tours/setup-tour.d.mts +26 -0
  325. package/src/foundry/client/tours/sidebar-tour.d.mts +9 -0
  326. package/src/foundry/client/ui/context.d.mts +213 -0
  327. package/src/foundry/client/ui/dialog.d.mts +326 -0
  328. package/src/foundry/client/ui/drag.d.mts +128 -0
  329. package/src/foundry/client/ui/dragdrop.d.mts +124 -0
  330. package/src/foundry/client/ui/editor.d.mts +546 -0
  331. package/src/foundry/client/ui/filepicker.d.mts +477 -0
  332. package/src/foundry/client/ui/filter.d.mts +148 -0
  333. package/src/foundry/client/ui/forms.d.mts +85 -0
  334. package/src/foundry/client/ui/index.d.mts +12 -0
  335. package/src/foundry/client/ui/notifications.d.mts +136 -0
  336. package/src/foundry/client/ui/prosemirror.d.mts +171 -0
  337. package/src/foundry/client/ui/secrets.d.mts +75 -0
  338. package/src/foundry/client/ui/tabs.d.mts +117 -0
  339. package/src/foundry/client-esm/applications/_module.d.mts +25 -0
  340. package/src/foundry/client-esm/applications/_types.d.mts +38 -0
  341. package/src/foundry/client-esm/applications/api/_module.d.mts +9 -0
  342. package/src/foundry/client-esm/applications/api/application.d.mts +705 -0
  343. package/src/foundry/client-esm/applications/api/dialog.d.mts +268 -0
  344. package/src/foundry/client-esm/applications/api/document-sheet.d.mts +119 -0
  345. package/src/foundry/client-esm/applications/api/handlebars-application.d.mts +180 -0
  346. package/src/foundry/client-esm/applications/apps/_module.d.mts +7 -0
  347. package/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts +53 -0
  348. package/src/foundry/client-esm/applications/apps/permission-config.d.mts +60 -0
  349. package/src/foundry/client-esm/applications/dice/_module.d.mts +6 -0
  350. package/src/foundry/client-esm/applications/dice/roll-resolver.d.mts +98 -0
  351. package/src/foundry/client-esm/applications/elements/_module.d.mts +16 -0
  352. package/src/foundry/client-esm/applications/elements/color-picker.d.mts +26 -0
  353. package/src/foundry/client-esm/applications/elements/document-tags.d.mts +90 -0
  354. package/src/foundry/client-esm/applications/elements/file-picker.d.mts +62 -0
  355. package/src/foundry/client-esm/applications/elements/form-element.d.mts +106 -0
  356. package/src/foundry/client-esm/applications/elements/hue-slider.d.mts +20 -0
  357. package/src/foundry/client-esm/applications/elements/multi-select.d.mts +95 -0
  358. package/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts +53 -0
  359. package/src/foundry/client-esm/applications/elements/range-picker.d.mts +41 -0
  360. package/src/foundry/client-esm/applications/elements/string-tags.d.mts +73 -0
  361. package/src/foundry/client-esm/applications/forms/fields.d.mts +219 -0
  362. package/src/foundry/client-esm/applications/sheets/_module.d.mts +12 -0
  363. package/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts +31 -0
  364. package/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts +18 -0
  365. package/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts +18 -0
  366. package/src/foundry/client-esm/applications/sheets/item-sheet.d.mts +22 -0
  367. package/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts +13 -0
  368. package/src/foundry/client-esm/applications/sheets/region-config.d.mts +13 -0
  369. package/src/foundry/client-esm/applications/sheets/user-config.d.mts +18 -0
  370. package/src/foundry/client-esm/applications/ui/_module.d.mts +6 -0
  371. package/src/foundry/client-esm/applications/ui/region-legend.d.mts +12 -0
  372. package/src/foundry/client-esm/audio/_module.d.mts +13 -0
  373. package/src/foundry/client-esm/audio/_types.d.mts +1 -0
  374. package/src/foundry/client-esm/canvas/_module.d.mts +11 -0
  375. package/src/foundry/client-esm/canvas/edges/_module.d.mts +9 -0
  376. package/src/foundry/client-esm/canvas/edges/collision.d.mts +93 -0
  377. package/src/foundry/client-esm/canvas/edges/edge.d.mts +184 -0
  378. package/src/foundry/client-esm/canvas/edges/edges.d.mts +23 -0
  379. package/src/foundry/client-esm/canvas/edges/vertex.d.mts +134 -0
  380. package/src/foundry/client-esm/canvas/regions/_module.d.mts +10 -0
  381. package/src/foundry/client-esm/canvas/scene-manager.d.mts +1 -0
  382. package/src/foundry/client-esm/canvas/smaa/blend.d.mts +6 -0
  383. package/src/foundry/client-esm/canvas/smaa/edges.d.mts +6 -0
  384. package/src/foundry/client-esm/canvas/smaa/smaa.d.mts +56 -0
  385. package/src/foundry/client-esm/canvas/smaa/weights.d.mts +6 -0
  386. package/src/foundry/client-esm/canvas/sources/_module.d.mts +15 -0
  387. package/src/foundry/client-esm/canvas/sources/base-effect-source.d.mts +243 -0
  388. package/src/foundry/client-esm/canvas/sources/base-light-source.d.mts +162 -0
  389. package/src/foundry/client-esm/canvas/sources/global-light-source.d.mts +47 -0
  390. package/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts +77 -0
  391. package/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts +91 -0
  392. package/src/foundry/client-esm/canvas/sources/point-light-source.d.mts +43 -0
  393. package/src/foundry/client-esm/canvas/sources/point-movement-source.d.mts +15 -0
  394. package/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts +29 -0
  395. package/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts +206 -0
  396. package/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts +328 -0
  397. package/src/foundry/client-esm/canvas/tokens/_module.d.mts +7 -0
  398. package/src/foundry/client-esm/client.d.mts +291 -0
  399. package/src/foundry/client-esm/data/_module.d.mts +8 -0
  400. package/src/foundry/client-esm/data/client-backend.d.mts +52 -0
  401. package/src/foundry/client-esm/data/region-behaviors/_module.d.mts +14 -0
  402. package/src/foundry/client-esm/dice/_module.d.mts +13 -0
  403. package/src/foundry/client-esm/dice/_types.d.mts +61 -0
  404. package/src/foundry/client-esm/dice/parser.d.mts +205 -0
  405. package/src/foundry/client-esm/dice/roll.d.mts +645 -0
  406. package/src/foundry/client-esm/dice/terms/_module.d.mts +17 -0
  407. package/src/foundry/client-esm/dice/terms/coin.d.mts +68 -0
  408. package/src/foundry/client-esm/dice/terms/dice.d.mts +381 -0
  409. package/src/foundry/client-esm/dice/terms/die.d.mts +241 -0
  410. package/src/foundry/client-esm/dice/terms/fate.d.mts +50 -0
  411. package/src/foundry/client-esm/dice/terms/function.d.mts +104 -0
  412. package/src/foundry/client-esm/dice/terms/numeric.d.mts +56 -0
  413. package/src/foundry/client-esm/dice/terms/operator.d.mts +55 -0
  414. package/src/foundry/client-esm/dice/terms/parenthetical.d.mts +105 -0
  415. package/src/foundry/client-esm/dice/terms/pool.d.mts +278 -0
  416. package/src/foundry/client-esm/dice/terms/string.d.mts +34 -0
  417. package/src/foundry/client-esm/dice/terms/term.d.mts +160 -0
  418. package/src/foundry/client-esm/dice/twister.d.mts +134 -0
  419. package/src/foundry/client-esm/helpers/_module.d.mts +8 -0
  420. package/src/foundry/client-esm/helpers/_types.d.mts +51 -0
  421. package/src/foundry/client-esm/helpers/compendium-art.d.mts +47 -0
  422. package/src/foundry/clipper/clipper.d.mts +927 -0
  423. package/src/foundry/clipper/index.d.mts +1 -0
  424. package/src/foundry/common/abstract/_types.d.mts +274 -0
  425. package/src/foundry/common/abstract/backend.d.mts +190 -0
  426. package/src/foundry/common/abstract/data.d.mts +457 -0
  427. package/src/foundry/common/abstract/document.d.mts +1372 -0
  428. package/src/foundry/common/abstract/embedded-collection-delta.d.mts +96 -0
  429. package/src/foundry/common/abstract/embedded-collection.d.mts +252 -0
  430. package/src/foundry/common/abstract/module.d.mts +13 -0
  431. package/src/foundry/common/abstract/singleton-collection.d.mts +19 -0
  432. package/src/foundry/common/abstract/socket.d.mts +36 -0
  433. package/src/foundry/common/abstract/type-data.d.mts +337 -0
  434. package/src/foundry/common/config.d.mts +302 -0
  435. package/src/foundry/common/constants.d.mts +2054 -0
  436. package/src/foundry/common/data/data.d.mts +667 -0
  437. package/src/foundry/common/data/fields.d.mts +3388 -0
  438. package/src/foundry/common/data/module.d.mts +9 -0
  439. package/src/foundry/common/data/validation-failure.d.mts +174 -0
  440. package/src/foundry/common/data/validators.d.mts +30 -0
  441. package/src/foundry/common/documents/_module.d.mts +35 -0
  442. package/src/foundry/common/documents/_types.d.mts +143 -0
  443. package/src/foundry/common/documents/active-effect.d.mts +229 -0
  444. package/src/foundry/common/documents/actor-delta.d.mts +132 -0
  445. package/src/foundry/common/documents/actor.d.mts +209 -0
  446. package/src/foundry/common/documents/adventure.d.mts +212 -0
  447. package/src/foundry/common/documents/ambient-light.d.mts +107 -0
  448. package/src/foundry/common/documents/ambient-sound.d.mts +142 -0
  449. package/src/foundry/common/documents/card.d.mts +254 -0
  450. package/src/foundry/common/documents/cards.d.mts +191 -0
  451. package/src/foundry/common/documents/chat-message.d.mts +208 -0
  452. package/src/foundry/common/documents/combat.d.mts +124 -0
  453. package/src/foundry/common/documents/combatant.d.mts +127 -0
  454. package/src/foundry/common/documents/drawing.d.mts +255 -0
  455. package/src/foundry/common/documents/fog-exploration.d.mts +110 -0
  456. package/src/foundry/common/documents/folder.d.mts +130 -0
  457. package/src/foundry/common/documents/item.d.mts +181 -0
  458. package/src/foundry/common/documents/journal-entry-page.d.mts +229 -0
  459. package/src/foundry/common/documents/journal-entry.d.mts +133 -0
  460. package/src/foundry/common/documents/macro.d.mts +190 -0
  461. package/src/foundry/common/documents/measured-template.d.mts +183 -0
  462. package/src/foundry/common/documents/module.d.mts +35 -0
  463. package/src/foundry/common/documents/note.d.mts +195 -0
  464. package/src/foundry/common/documents/playlist-sound.d.mts +131 -0
  465. package/src/foundry/common/documents/playlist.d.mts +160 -0
  466. package/src/foundry/common/documents/roll-table.d.mts +153 -0
  467. package/src/foundry/common/documents/scene.d.mts +395 -0
  468. package/src/foundry/common/documents/setting.d.mts +88 -0
  469. package/src/foundry/common/documents/table-result.d.mts +157 -0
  470. package/src/foundry/common/documents/tile.d.mts +204 -0
  471. package/src/foundry/common/documents/token.d.mts +515 -0
  472. package/src/foundry/common/documents/user.d.mts +247 -0
  473. package/src/foundry/common/documents/wall.d.mts +196 -0
  474. package/src/foundry/common/grid/_module.d.mts +10 -0
  475. package/src/foundry/common/grid/base.d.mts +640 -0
  476. package/src/foundry/common/grid/grid-hex.d.mts +55 -0
  477. package/src/foundry/common/grid/gridless.d.mts +71 -0
  478. package/src/foundry/common/grid/hexagonal.d.mts +391 -0
  479. package/src/foundry/common/grid/square.d.mts +100 -0
  480. package/src/foundry/common/packages/base-module.d.mts +46 -0
  481. package/src/foundry/common/packages/base-package.d.mts +677 -0
  482. package/src/foundry/common/packages/base-system.d.mts +90 -0
  483. package/src/foundry/common/packages/base-world.d.mts +116 -0
  484. package/src/foundry/common/packages/module.d.mts +28 -0
  485. package/src/foundry/common/packages/sub-types.d.mts +42 -0
  486. package/src/foundry/common/primitives/array.d.mts +56 -0
  487. package/src/foundry/common/primitives/date.d.mts +24 -0
  488. package/src/foundry/common/primitives/math.d.mts +103 -0
  489. package/src/foundry/common/primitives/module.d.mts +8 -0
  490. package/src/foundry/common/primitives/number.d.mts +91 -0
  491. package/src/foundry/common/primitives/regex.d.mts +12 -0
  492. package/src/foundry/common/primitives/regexp.d.mts +12 -0
  493. package/src/foundry/common/primitives/set.d.mts +105 -0
  494. package/src/foundry/common/primitives/string.d.mts +58 -0
  495. package/src/foundry/common/primitives/url.d.mts +18 -0
  496. package/src/foundry/common/prosemirror/_module.d.mts +82 -0
  497. package/src/foundry/common/prosemirror/click-handler.d.mts +34 -0
  498. package/src/foundry/common/prosemirror/content-link-plugin.d.mts +47 -0
  499. package/src/foundry/common/prosemirror/dirty-plugin.d.mts +13 -0
  500. package/src/foundry/common/prosemirror/dom-parser.d.mts +9 -0
  501. package/src/foundry/common/prosemirror/dropdown.d.mts +65 -0
  502. package/src/foundry/common/prosemirror/extensions.d.mts +12 -0
  503. package/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts +82 -0
  504. package/src/foundry/common/prosemirror/image-plugin.d.mts +82 -0
  505. package/src/foundry/common/prosemirror/index.d.mts +22 -0
  506. package/src/foundry/common/prosemirror/input-rules.d.mts +34 -0
  507. package/src/foundry/common/prosemirror/keymaps.d.mts +47 -0
  508. package/src/foundry/common/prosemirror/menu.d.mts +255 -0
  509. package/src/foundry/common/prosemirror/paste-transformer.d.mts +22 -0
  510. package/src/foundry/common/prosemirror/plugin.d.mts +24 -0
  511. package/src/foundry/common/prosemirror/schema/attribute-capture.d.mts +39 -0
  512. package/src/foundry/common/prosemirror/schema/core.d.mts +51 -0
  513. package/src/foundry/common/prosemirror/schema/image-link-node.d.mts +29 -0
  514. package/src/foundry/common/prosemirror/schema/image-node.d.mts +19 -0
  515. package/src/foundry/common/prosemirror/schema/index.d.mts +12 -0
  516. package/src/foundry/common/prosemirror/schema/link-mark.d.mts +30 -0
  517. package/src/foundry/common/prosemirror/schema/lists.d.mts +55 -0
  518. package/src/foundry/common/prosemirror/schema/marks.d.mts +44 -0
  519. package/src/foundry/common/prosemirror/schema/other.d.mts +149 -0
  520. package/src/foundry/common/prosemirror/schema/schema-definition.d.mts +39 -0
  521. package/src/foundry/common/prosemirror/schema/secret-node.d.mts +27 -0
  522. package/src/foundry/common/prosemirror/schema/tables.d.mts +106 -0
  523. package/src/foundry/common/prosemirror/schema/utils.d.mts +37 -0
  524. package/src/foundry/common/prosemirror/schema.d.mts +138 -0
  525. package/src/foundry/common/prosemirror/string-serializer.d.mts +120 -0
  526. package/src/foundry/common/prosemirror/util.d.mts +43 -0
  527. package/src/foundry/common/types.d.mts +332 -0
  528. package/src/foundry/common/utils/bitmask.d.mts +110 -0
  529. package/src/foundry/common/utils/collection.d.mts +176 -0
  530. package/src/foundry/common/utils/color.d.mts +291 -0
  531. package/src/foundry/common/utils/event-emitter.d.mts +62 -0
  532. package/src/foundry/common/utils/geometry.d.mts +198 -0
  533. package/src/foundry/common/utils/helpers.d.mts +752 -0
  534. package/src/foundry/common/utils/http.d.mts +52 -0
  535. package/src/foundry/common/utils/iterable-weak-map.d.mts +80 -0
  536. package/src/foundry/common/utils/iterable-weak-set.d.mts +47 -0
  537. package/src/foundry/common/utils/logging.d.mts +42 -0
  538. package/src/foundry/common/utils/module.d.mts +18 -0
  539. package/src/foundry/common/utils/semaphore.d.mts +82 -0
  540. package/src/foundry/common/utils/string-tree.d.mts +95 -0
  541. package/src/foundry/common/utils/word-tree.d.mts +66 -0
  542. package/src/foundry/index.d.mts +5 -0
  543. package/src/foundry/public/index.d.mts +1 -0
  544. package/src/foundry/public/scripts/earcut-edges/earcut-edges.d.mts +11 -0
  545. package/src/foundry/public/scripts/earcut-edges/index.d.mts +1 -0
  546. package/src/foundry/public/scripts/index.d.mts +1 -0
  547. package/src/index.d.mts +2 -0
  548. package/src/types/augments/index.d.mts +4 -0
  549. package/src/types/augments/pixi.d.mts +38 -0
  550. package/src/types/augments/simple-peer.d.mts +13 -0
  551. package/src/types/augments/socket.io-client.d.mts +12 -0
  552. package/src/types/augments/tinyMCE.d.mts +72 -0
  553. package/src/types/config.d.mts +331 -0
  554. package/src/types/configuredDocuments.d.mts +103 -0
  555. package/src/types/helperTypes.d.mts +261 -0
  556. package/src/types/index.d.mts +4 -0
  557. package/src/types/utils.d.mts +406 -0
  558. package/index-lenient.d.ts +0 -10
  559. package/index.d.ts +0 -4
  560. package/src/foundry/client/apps/app.d.ts +0 -560
  561. package/src/foundry/client/apps/av/av-config.d.ts +0 -85
  562. package/src/foundry/client/apps/av/cameras.d.ts +0 -174
  563. package/src/foundry/client/apps/av/index.d.ts +0 -3
  564. package/src/foundry/client/apps/form.d.ts +0 -384
  565. package/src/foundry/client/apps/forms/actor.d.ts +0 -192
  566. package/src/foundry/client/apps/forms/card-config.d.ts +0 -51
  567. package/src/foundry/client/apps/forms/cards-config.d.ts +0 -128
  568. package/src/foundry/client/apps/forms/combat-config.d.ts +0 -41
  569. package/src/foundry/client/apps/forms/combatant-config.d.ts +0 -49
  570. package/src/foundry/client/apps/forms/effect-config.d.ts +0 -65
  571. package/src/foundry/client/apps/forms/folder-config.d.ts +0 -63
  572. package/src/foundry/client/apps/forms/grid-config.d.ts +0 -151
  573. package/src/foundry/client/apps/forms/image-popout.d.ts +0 -166
  574. package/src/foundry/client/apps/forms/index.d.ts +0 -20
  575. package/src/foundry/client/apps/forms/item.d.ts +0 -71
  576. package/src/foundry/client/apps/forms/journal-sheet.d.ts +0 -107
  577. package/src/foundry/client/apps/forms/macro-config.d.ts +0 -71
  578. package/src/foundry/client/apps/forms/measure-template.d.ts +0 -53
  579. package/src/foundry/client/apps/forms/permission.d.ts +0 -58
  580. package/src/foundry/client/apps/forms/playlist-config.d.ts +0 -43
  581. package/src/foundry/client/apps/forms/playlist-sound-config.d.ts +0 -61
  582. package/src/foundry/client/apps/forms/roll-table-config.d.ts +0 -175
  583. package/src/foundry/client/apps/forms/scene-config.d.ts +0 -148
  584. package/src/foundry/client/apps/forms/sheet-config.d.ts +0 -184
  585. package/src/foundry/client/apps/forms/user-config.d.ts +0 -74
  586. package/src/foundry/client/apps/hud/chatbubble.d.ts +0 -89
  587. package/src/foundry/client/apps/hud/container.d.ts +0 -46
  588. package/src/foundry/client/apps/hud/controls.d.ts +0 -156
  589. package/src/foundry/client/apps/hud/hotbar.d.ts +0 -143
  590. package/src/foundry/client/apps/hud/hud.d.ts +0 -84
  591. package/src/foundry/client/apps/hud/index.d.ts +0 -9
  592. package/src/foundry/client/apps/hud/menu.d.ts +0 -71
  593. package/src/foundry/client/apps/hud/navigation.d.ts +0 -110
  594. package/src/foundry/client/apps/hud/pause.d.ts +0 -20
  595. package/src/foundry/client/apps/hud/players.d.ts +0 -55
  596. package/src/foundry/client/apps/i18n.d.ts +0 -136
  597. package/src/foundry/client/apps/index.d.ts +0 -9
  598. package/src/foundry/client/apps/placeables/drawing-config.d.ts +0 -99
  599. package/src/foundry/client/apps/placeables/drawing-hud.d.ts +0 -32
  600. package/src/foundry/client/apps/placeables/index.d.ts +0 -10
  601. package/src/foundry/client/apps/placeables/light-config.d.ts +0 -95
  602. package/src/foundry/client/apps/placeables/note-config.d.ts +0 -57
  603. package/src/foundry/client/apps/placeables/sound-config.d.ts +0 -47
  604. package/src/foundry/client/apps/placeables/tile-config.d.ts +0 -55
  605. package/src/foundry/client/apps/placeables/tile-hud.d.ts +0 -37
  606. package/src/foundry/client/apps/placeables/token-config.d.ts +0 -226
  607. package/src/foundry/client/apps/placeables/token-hud.d.ts +0 -140
  608. package/src/foundry/client/apps/placeables/wall-config.d.ts +0 -75
  609. package/src/foundry/client/apps/sidebar/apps/chat-popout.d.ts +0 -34
  610. package/src/foundry/client/apps/sidebar/apps/client-settings.d.ts +0 -116
  611. package/src/foundry/client/apps/sidebar/apps/compendium.d.ts +0 -86
  612. package/src/foundry/client/apps/sidebar/apps/controls-reference.d.ts +0 -30
  613. package/src/foundry/client/apps/sidebar/apps/index.d.ts +0 -10
  614. package/src/foundry/client/apps/sidebar/apps/invitation-links.d.ts +0 -37
  615. package/src/foundry/client/apps/sidebar/apps/keybindings-config.d.ts +0 -247
  616. package/src/foundry/client/apps/sidebar/apps/module-management.d.ts +0 -120
  617. package/src/foundry/client/apps/sidebar/apps/permission-config.d.ts +0 -64
  618. package/src/foundry/client/apps/sidebar/apps/support-details.d.ts +0 -76
  619. package/src/foundry/client/apps/sidebar/apps/world-config.d.ts +0 -77
  620. package/src/foundry/client/apps/sidebar/index.d.ts +0 -5
  621. package/src/foundry/client/apps/sidebar/sidebar.d.ts +0 -102
  622. package/src/foundry/client/apps/sidebar/tab-base.d.ts +0 -68
  623. package/src/foundry/client/apps/sidebar/tab-directory.d.ts +0 -236
  624. package/src/foundry/client/apps/sidebar/tabs/actors-directory.d.ts +0 -16
  625. package/src/foundry/client/apps/sidebar/tabs/cards-directory.d.ts +0 -6
  626. package/src/foundry/client/apps/sidebar/tabs/chat-log.d.ts +0 -351
  627. package/src/foundry/client/apps/sidebar/tabs/combat-tracker.d.ts +0 -205
  628. package/src/foundry/client/apps/sidebar/tabs/compendium-directory.d.ts +0 -77
  629. package/src/foundry/client/apps/sidebar/tabs/index.d.ts +0 -12
  630. package/src/foundry/client/apps/sidebar/tabs/items-directory.d.ts +0 -10
  631. package/src/foundry/client/apps/sidebar/tabs/journal-directory.d.ts +0 -11
  632. package/src/foundry/client/apps/sidebar/tabs/macros-directory.d.ts +0 -12
  633. package/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.ts +0 -306
  634. package/src/foundry/client/apps/sidebar/tabs/roll-table-directory.d.ts +0 -9
  635. package/src/foundry/client/apps/sidebar/tabs/scenes-directory.d.ts +0 -18
  636. package/src/foundry/client/apps/sidebar/tabs/settings.d.ts +0 -88
  637. package/src/foundry/client/apps/templates.d.ts +0 -425
  638. package/src/foundry/client/audio/audio.d.ts +0 -343
  639. package/src/foundry/client/audio/container.d.ts +0 -175
  640. package/src/foundry/client/audio/index.d.ts +0 -3
  641. package/src/foundry/client/audio/sound.d.ts +0 -303
  642. package/src/foundry/client/av/client.d.ts +0 -158
  643. package/src/foundry/client/av/clients/index.d.ts +0 -1
  644. package/src/foundry/client/av/clients/simplepeer.d.ts +0 -151
  645. package/src/foundry/client/av/index.d.ts +0 -4
  646. package/src/foundry/client/av/master.d.ts +0 -187
  647. package/src/foundry/client/av/settings.d.ts +0 -236
  648. package/src/foundry/client/config.d.ts +0 -1425
  649. package/src/foundry/client/core/gamepad.d.ts +0 -53
  650. package/src/foundry/client/core/hooks.d.ts +0 -967
  651. package/src/foundry/client/core/image.d.ts +0 -129
  652. package/src/foundry/client/core/index.d.ts +0 -13
  653. package/src/foundry/client/core/keybindings.d.ts +0 -298
  654. package/src/foundry/client/core/keyboard.d.ts +0 -247
  655. package/src/foundry/client/core/mouse.d.ts +0 -18
  656. package/src/foundry/client/core/nue.d.ts +0 -34
  657. package/src/foundry/client/core/settings.d.ts +0 -222
  658. package/src/foundry/client/core/socket.d.ts +0 -46
  659. package/src/foundry/client/core/sorting.d.ts +0 -78
  660. package/src/foundry/client/core/time.d.ts +0 -67
  661. package/src/foundry/client/core/utils.d.ts +0 -33
  662. package/src/foundry/client/core/video.d.ts +0 -65
  663. package/src/foundry/client/data/abstract/canvas-document.d.ts +0 -70
  664. package/src/foundry/client/data/abstract/client-backend.d.ts +0 -206
  665. package/src/foundry/client/data/abstract/client-document.d.ts +0 -439
  666. package/src/foundry/client/data/abstract/document-collection.d.ts +0 -192
  667. package/src/foundry/client/data/abstract/index.d.ts +0 -5
  668. package/src/foundry/client/data/abstract/world-collection.d.ts +0 -167
  669. package/src/foundry/client/data/collections/actors.d.ts +0 -35
  670. package/src/foundry/client/data/collections/cards.d.ts +0 -8
  671. package/src/foundry/client/data/collections/combats.d.ts +0 -43
  672. package/src/foundry/client/data/collections/compendium.d.ts +0 -321
  673. package/src/foundry/client/data/collections/fog.d.ts +0 -7
  674. package/src/foundry/client/data/collections/folder.d.ts +0 -27
  675. package/src/foundry/client/data/collections/index.d.ts +0 -15
  676. package/src/foundry/client/data/collections/items.d.ts +0 -10
  677. package/src/foundry/client/data/collections/journal.d.ts +0 -26
  678. package/src/foundry/client/data/collections/macros.d.ts +0 -26
  679. package/src/foundry/client/data/collections/messages.d.ts +0 -39
  680. package/src/foundry/client/data/collections/playlists.d.ts +0 -41
  681. package/src/foundry/client/data/collections/scenes.d.ts +0 -62
  682. package/src/foundry/client/data/collections/settings.d.ts +0 -25
  683. package/src/foundry/client/data/collections/tables.d.ts +0 -17
  684. package/src/foundry/client/data/collections/users.d.ts +0 -43
  685. package/src/foundry/client/data/documents/active-effect.d.ts +0 -172
  686. package/src/foundry/client/data/documents/actor.d.ts +0 -231
  687. package/src/foundry/client/data/documents/ambient-light.d.ts +0 -18
  688. package/src/foundry/client/data/documents/ambient-sound.d.ts +0 -9
  689. package/src/foundry/client/data/documents/card.d.ts +0 -133
  690. package/src/foundry/client/data/documents/cards.d.ts +0 -376
  691. package/src/foundry/client/data/documents/chat-message.d.ts +0 -267
  692. package/src/foundry/client/data/documents/combat.d.ts +0 -227
  693. package/src/foundry/client/data/documents/combatant.d.ts +0 -104
  694. package/src/foundry/client/data/documents/drawing.d.ts +0 -19
  695. package/src/foundry/client/data/documents/fog-exploration.d.ts +0 -64
  696. package/src/foundry/client/data/documents/folder.d.ts +0 -115
  697. package/src/foundry/client/data/documents/index.d.ts +0 -27
  698. package/src/foundry/client/data/documents/item.d.ts +0 -59
  699. package/src/foundry/client/data/documents/journal-entry.d.ts +0 -71
  700. package/src/foundry/client/data/documents/macro.d.ts +0 -60
  701. package/src/foundry/client/data/documents/measured-template.d.ts +0 -21
  702. package/src/foundry/client/data/documents/note.d.ts +0 -19
  703. package/src/foundry/client/data/documents/playlist-sound.d.ts +0 -117
  704. package/src/foundry/client/data/documents/playlist.d.ts +0 -192
  705. package/src/foundry/client/data/documents/scene.d.ts +0 -465
  706. package/src/foundry/client/data/documents/setting.d.ts +0 -35
  707. package/src/foundry/client/data/documents/table-result.d.ts +0 -30
  708. package/src/foundry/client/data/documents/table.d.ts +0 -220
  709. package/src/foundry/client/data/documents/tile.d.ts +0 -13
  710. package/src/foundry/client/data/documents/token.d.ts +0 -281
  711. package/src/foundry/client/data/documents/user.d.ts +0 -155
  712. package/src/foundry/client/data/documents/wall.d.ts +0 -9
  713. package/src/foundry/client/data/index.d.ts +0 -3
  714. package/src/foundry/client/dice/dice/coin.d.ts +0 -49
  715. package/src/foundry/client/dice/dice/die.d.ts +0 -230
  716. package/src/foundry/client/dice/dice/fate.d.ts +0 -37
  717. package/src/foundry/client/dice/dice/index.d.ts +0 -3
  718. package/src/foundry/client/dice/index.d.ts +0 -5
  719. package/src/foundry/client/dice/roll.d.ts +0 -495
  720. package/src/foundry/client/dice/term.d.ts +0 -123
  721. package/src/foundry/client/dice/terms/dice.d.ts +0 -277
  722. package/src/foundry/client/dice/terms/index.d.ts +0 -7
  723. package/src/foundry/client/dice/terms/math.d.ts +0 -69
  724. package/src/foundry/client/dice/terms/numeric.d.ts +0 -53
  725. package/src/foundry/client/dice/terms/operator.d.ts +0 -18
  726. package/src/foundry/client/dice/terms/parenthetical.d.ts +0 -51
  727. package/src/foundry/client/dice/terms/pool.d.ts +0 -235
  728. package/src/foundry/client/dice/terms/string.d.ts +0 -31
  729. package/src/foundry/client/dice/twister.d.ts +0 -134
  730. package/src/foundry/client/game.d.ts +0 -682
  731. package/src/foundry/client/head.d.ts +0 -44
  732. package/src/foundry/client/index.d.ts +0 -12
  733. package/src/foundry/client/pixi/board.d.ts +0 -632
  734. package/src/foundry/client/pixi/core/containers/cached-container.d.ts +0 -64
  735. package/src/foundry/client/pixi/core/containers/index.d.ts +0 -3
  736. package/src/foundry/client/pixi/core/containers/quadtree.d.ts +0 -166
  737. package/src/foundry/client/pixi/core/containers/sampler-mesh.d.ts +0 -22
  738. package/src/foundry/client/pixi/core/culling.d.ts +0 -37
  739. package/src/foundry/client/pixi/core/index.d.ts +0 -5
  740. package/src/foundry/client/pixi/core/interaction/canvas-animation.d.ts +0 -148
  741. package/src/foundry/client/pixi/core/interaction/control-icon.d.ts +0 -58
  742. package/src/foundry/client/pixi/core/interaction/index.d.ts +0 -5
  743. package/src/foundry/client/pixi/core/interaction/mouse-handler.d.ts +0 -323
  744. package/src/foundry/client/pixi/core/interaction/resize-handle.d.ts +0 -48
  745. package/src/foundry/client/pixi/core/interaction/targets.d.ts +0 -51
  746. package/src/foundry/client/pixi/core/loader.d.ts +0 -157
  747. package/src/foundry/client/pixi/core/shapes/index.d.ts +0 -5
  748. package/src/foundry/client/pixi/core/shapes/normalized-rectangle.d.ts +0 -31
  749. package/src/foundry/client/pixi/core/shapes/polygon-helpers.d.ts +0 -263
  750. package/src/foundry/client/pixi/core/shapes/precise-text.d.ts +0 -18
  751. package/src/foundry/client/pixi/core/shapes/ray.d.ts +0 -200
  752. package/src/foundry/client/pixi/core/shapes/source-polygon.d.ts +0 -110
  753. package/src/foundry/client/pixi/groups/effects.d.ts +0 -29
  754. package/src/foundry/client/pixi/groups/index.d.ts +0 -3
  755. package/src/foundry/client/pixi/groups/interface.d.ts +0 -27
  756. package/src/foundry/client/pixi/groups/primary.d.ts +0 -40
  757. package/src/foundry/client/pixi/index.d.ts +0 -10
  758. package/src/foundry/client/pixi/layer.d.ts +0 -105
  759. package/src/foundry/client/pixi/layers/controls/cursor.d.ts +0 -27
  760. package/src/foundry/client/pixi/layers/controls/door.d.ts +0 -67
  761. package/src/foundry/client/pixi/layers/controls/hud.d.ts +0 -117
  762. package/src/foundry/client/pixi/layers/controls/index.d.ts +0 -4
  763. package/src/foundry/client/pixi/layers/controls/ruler.d.ts +0 -207
  764. package/src/foundry/client/pixi/layers/controls.d.ts +0 -144
  765. package/src/foundry/client/pixi/layers/drawings.d.ts +0 -116
  766. package/src/foundry/client/pixi/layers/effects/effect.d.ts +0 -133
  767. package/src/foundry/client/pixi/layers/effects/index.d.ts +0 -4
  768. package/src/foundry/client/pixi/layers/effects/leaves.d.ts +0 -79
  769. package/src/foundry/client/pixi/layers/effects/rain.d.ts +0 -107
  770. package/src/foundry/client/pixi/layers/effects/snow.d.ts +0 -62
  771. package/src/foundry/client/pixi/layers/effects.d.ts +0 -61
  772. package/src/foundry/client/pixi/layers/grid/grid.d.ts +0 -171
  773. package/src/foundry/client/pixi/layers/grid/hex.d.ts +0 -118
  774. package/src/foundry/client/pixi/layers/grid/highlight.d.ts +0 -28
  775. package/src/foundry/client/pixi/layers/grid/index.d.ts +0 -4
  776. package/src/foundry/client/pixi/layers/grid/square.d.ts +0 -48
  777. package/src/foundry/client/pixi/layers/grid.d.ts +0 -204
  778. package/src/foundry/client/pixi/layers/index.d.ts +0 -15
  779. package/src/foundry/client/pixi/layers/lighting.d.ts +0 -229
  780. package/src/foundry/client/pixi/layers/map.d.ts +0 -263
  781. package/src/foundry/client/pixi/layers/notes.d.ts +0 -64
  782. package/src/foundry/client/pixi/layers/sight.d.ts +0 -313
  783. package/src/foundry/client/pixi/layers/sounds.d.ts +0 -112
  784. package/src/foundry/client/pixi/layers/templates.d.ts +0 -51
  785. package/src/foundry/client/pixi/layers/tokens.d.ts +0 -169
  786. package/src/foundry/client/pixi/layers/walls.d.ts +0 -321
  787. package/src/foundry/client/pixi/perception/clockwise-sweep.d.ts +0 -406
  788. package/src/foundry/client/pixi/perception/index.d.ts +0 -2
  789. package/src/foundry/client/pixi/perception/perception-manager.d.ts +0 -107
  790. package/src/foundry/client/pixi/placeable.d.ts +0 -414
  791. package/src/foundry/client/pixi/placeables/drawing.d.ts +0 -289
  792. package/src/foundry/client/pixi/placeables/index.d.ts +0 -8
  793. package/src/foundry/client/pixi/placeables/light.d.ts +0 -126
  794. package/src/foundry/client/pixi/placeables/note.d.ts +0 -67
  795. package/src/foundry/client/pixi/placeables/sound.d.ts +0 -131
  796. package/src/foundry/client/pixi/placeables/template.d.ts +0 -153
  797. package/src/foundry/client/pixi/placeables/tile.d.ts +0 -315
  798. package/src/foundry/client/pixi/placeables/token.d.ts +0 -722
  799. package/src/foundry/client/pixi/placeables/wall.d.ts +0 -268
  800. package/src/foundry/client/pixi/placeables.d.ts +0 -520
  801. package/src/foundry/client/pixi/sources/base-source.d.ts +0 -145
  802. package/src/foundry/client/pixi/sources/index.d.ts +0 -4
  803. package/src/foundry/client/pixi/sources/light-source.d.ts +0 -413
  804. package/src/foundry/client/pixi/sources/sound-source.d.ts +0 -45
  805. package/src/foundry/client/pixi/sources/vision-source.d.ts +0 -123
  806. package/src/foundry/client/pixi/webgl/base.d.ts +0 -69
  807. package/src/foundry/client/pixi/webgl/blend_modes.d.ts +0 -33
  808. package/src/foundry/client/pixi/webgl/filters.d.ts +0 -182
  809. package/src/foundry/client/pixi/webgl/index.d.ts +0 -5
  810. package/src/foundry/client/pixi/webgl/lighting.d.ts +0 -480
  811. package/src/foundry/client/pixi/webgl/sampler.d.ts +0 -19
  812. package/src/foundry/client/ui/context.d.ts +0 -136
  813. package/src/foundry/client/ui/dialog.d.ts +0 -286
  814. package/src/foundry/client/ui/drag.d.ts +0 -105
  815. package/src/foundry/client/ui/dragdrop.d.ts +0 -118
  816. package/src/foundry/client/ui/editor.d.ts +0 -321
  817. package/src/foundry/client/ui/filepicker.d.ts +0 -510
  818. package/src/foundry/client/ui/filter.d.ts +0 -106
  819. package/src/foundry/client/ui/forms.d.ts +0 -47
  820. package/src/foundry/client/ui/index.d.ts +0 -10
  821. package/src/foundry/client/ui/notifications.d.ts +0 -110
  822. package/src/foundry/client/ui/tabs.d.ts +0 -103
  823. package/src/foundry/common/abstract/backend.mjs.d.ts +0 -253
  824. package/src/foundry/common/abstract/data.mjs.d.ts +0 -316
  825. package/src/foundry/common/abstract/document.mjs.d.ts +0 -838
  826. package/src/foundry/common/abstract/embedded-collection.mjs.d.ts +0 -79
  827. package/src/foundry/common/abstract/module.mjs.d.ts +0 -6
  828. package/src/foundry/common/config.mjs/index.d.ts +0 -1
  829. package/src/foundry/common/config.mjs/releaseData.d.ts +0 -100
  830. package/src/foundry/common/constants.mjs.d.ts +0 -940
  831. package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +0 -168
  832. package/src/foundry/common/data/data.mjs/actorData.d.ts +0 -219
  833. package/src/foundry/common/data/data.mjs/adventureData.d.ts +0 -166
  834. package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +0 -154
  835. package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +0 -195
  836. package/src/foundry/common/data/data.mjs/animationData.d.ts +0 -91
  837. package/src/foundry/common/data/data.mjs/cardData.d.ts +0 -264
  838. package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +0 -67
  839. package/src/foundry/common/data/data.mjs/cardsData.d.ts +0 -237
  840. package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +0 -220
  841. package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +0 -80
  842. package/src/foundry/common/data/data.mjs/combatData.d.ts +0 -149
  843. package/src/foundry/common/data/data.mjs/combatantData.d.ts +0 -136
  844. package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +0 -55
  845. package/src/foundry/common/data/data.mjs/drawingData.d.ts +0 -407
  846. package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +0 -80
  847. package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +0 -109
  848. package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +0 -115
  849. package/src/foundry/common/data/data.mjs/folderData.d.ts +0 -155
  850. package/src/foundry/common/data/data.mjs/index.d.ts +0 -31
  851. package/src/foundry/common/data/data.mjs/itemData.d.ts +0 -184
  852. package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +0 -132
  853. package/src/foundry/common/data/data.mjs/lightData.d.ts +0 -227
  854. package/src/foundry/common/data/data.mjs/macroData.d.ts +0 -199
  855. package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +0 -212
  856. package/src/foundry/common/data/data.mjs/noteData.d.ts +0 -233
  857. package/src/foundry/common/data/data.mjs/playlistData.d.ts +0 -201
  858. package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +0 -159
  859. package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +0 -75
  860. package/src/foundry/common/data/data.mjs/rollTableData.d.ts +0 -189
  861. package/src/foundry/common/data/data.mjs/sceneData.d.ts +0 -665
  862. package/src/foundry/common/data/data.mjs/settingData.d.ts +0 -86
  863. package/src/foundry/common/data/data.mjs/tableResultData.d.ts +0 -167
  864. package/src/foundry/common/data/data.mjs/tileData.d.ts +0 -246
  865. package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +0 -62
  866. package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +0 -47
  867. package/src/foundry/common/data/data.mjs/tokenData.d.ts +0 -505
  868. package/src/foundry/common/data/data.mjs/userData.d.ts +0 -177
  869. package/src/foundry/common/data/data.mjs/videoData.d.ts +0 -70
  870. package/src/foundry/common/data/data.mjs/wallData.d.ts +0 -222
  871. package/src/foundry/common/data/fields.mjs.d.ts +0 -526
  872. package/src/foundry/common/data/module.mjs.d.ts +0 -3
  873. package/src/foundry/common/data/validators.mjs.d.ts +0 -56
  874. package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +0 -44
  875. package/src/foundry/common/documents.mjs/baseActor.d.ts +0 -68
  876. package/src/foundry/common/documents.mjs/baseAdventure.d.ts +0 -38
  877. package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +0 -31
  878. package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +0 -29
  879. package/src/foundry/common/documents.mjs/baseCard.d.ts +0 -58
  880. package/src/foundry/common/documents.mjs/baseCards.d.ts +0 -39
  881. package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +0 -49
  882. package/src/foundry/common/documents.mjs/baseCombat.d.ts +0 -40
  883. package/src/foundry/common/documents.mjs/baseCombatant.d.ts +0 -48
  884. package/src/foundry/common/documents.mjs/baseDrawing.d.ts +0 -54
  885. package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +0 -41
  886. package/src/foundry/common/documents.mjs/baseFolder.d.ts +0 -30
  887. package/src/foundry/common/documents.mjs/baseItem.d.ts +0 -57
  888. package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +0 -26
  889. package/src/foundry/common/documents.mjs/baseMacro.d.ts +0 -42
  890. package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +0 -66
  891. package/src/foundry/common/documents.mjs/baseNote.d.ts +0 -39
  892. package/src/foundry/common/documents.mjs/basePlaylist.d.ts +0 -32
  893. package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +0 -37
  894. package/src/foundry/common/documents.mjs/baseRollTable.d.ts +0 -31
  895. package/src/foundry/common/documents.mjs/baseScene.d.ts +0 -120
  896. package/src/foundry/common/documents.mjs/baseSetting.d.ts +0 -38
  897. package/src/foundry/common/documents.mjs/baseTableResult.d.ts +0 -52
  898. package/src/foundry/common/documents.mjs/baseTile.d.ts +0 -29
  899. package/src/foundry/common/documents.mjs/baseToken.d.ts +0 -44
  900. package/src/foundry/common/documents.mjs/baseUser.d.ts +0 -102
  901. package/src/foundry/common/documents.mjs/baseWall.d.ts +0 -43
  902. package/src/foundry/common/documents.mjs/index.d.ts +0 -28
  903. package/src/foundry/common/module.mjs.d.ts +0 -114
  904. package/src/foundry/common/packages.mjs/index.d.ts +0 -8
  905. package/src/foundry/common/packages.mjs/moduleData.d.ts +0 -55
  906. package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +0 -58
  907. package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +0 -88
  908. package/src/foundry/common/packages.mjs/packageData.d.ts +0 -319
  909. package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +0 -69
  910. package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +0 -75
  911. package/src/foundry/common/packages.mjs/systemData.d.ts +0 -58
  912. package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +0 -9
  913. package/src/foundry/common/packages.mjs/worldData.d.ts +0 -76
  914. package/src/foundry/common/types.mjs.d.ts +0 -299
  915. package/src/foundry/common/utils/collection.mjs.d.ts +0 -151
  916. package/src/foundry/common/utils/geometry.mjs.d.ts +0 -148
  917. package/src/foundry/common/utils/helpers.mjs.d.ts +0 -498
  918. package/src/foundry/common/utils/http.mjs.d.ts +0 -52
  919. package/src/foundry/common/utils/module.mjs.d.ts +0 -5
  920. package/src/foundry/common/utils/primitives.mjs.d.ts +0 -287
  921. package/src/foundry/common/utils/semaphore.mjs.d.ts +0 -83
  922. package/src/foundry/index.d.ts +0 -3
  923. package/src/foundry/templates/index.d.ts +0 -1
  924. package/src/foundry/templates/views/layouts/main.hbs.d.ts +0 -11
  925. package/src/index.d.ts +0 -2
  926. package/src/types/augments/index.d.ts +0 -6
  927. package/src/types/augments/pixiGraphicsSmooth.d.ts +0 -7
  928. package/src/types/augments/pixiLegacyGraphics.d.ts +0 -7
  929. package/src/types/augments/pixiParticles.d.ts +0 -7
  930. package/src/types/augments/simple-peer.d.ts +0 -13
  931. package/src/types/augments/socket.io-client.d.ts +0 -12
  932. package/src/types/augments/tinyMCE.d.ts +0 -82
  933. package/src/types/config.d.ts +0 -183
  934. package/src/types/helperTypes.d.ts +0 -151
  935. package/src/types/index.d.ts +0 -3
  936. package/src/types/utils.d.ts +0 -143
  937. /package/src/foundry/client/apps/av/{camera-popout.d.ts → camera-popout.d.mts} +0 -0
  938. /package/src/foundry/client/{tail.d.ts → tail.d.mts} +0 -0
@@ -0,0 +1,1372 @@
1
+ import type { ConfiguredDocuments } from "../../../types/configuredDocuments.d.mts";
2
+ import type { DatabaseOperationsFor, GetKey, MakeConform, MustConform } from "../../../types/helperTypes.mts";
3
+ import type {
4
+ AnyObject,
5
+ DeepPartial,
6
+ EmptyObject,
7
+ InexactPartial,
8
+ RemoveIndexSignatures,
9
+ } from "../../../types/utils.mts";
10
+ import type * as CONST from "../constants.mts";
11
+ import type { DataField, EmbeddedCollectionField, EmbeddedDocumentField } from "../data/fields.d.mts";
12
+ import type { fields } from "../data/module.mts";
13
+ import type { LogCompatibilityWarningOptions } from "../utils/logging.mts";
14
+ import type {
15
+ DatabaseCreateOperation,
16
+ DatabaseDeleteOperation,
17
+ DatabaseGetOperation,
18
+ DatabaseUpdateOperation,
19
+ } from "./_types.d.mts";
20
+ import type DataModel from "./data.mts";
21
+
22
+ export default Document;
23
+
24
+ declare const __DocumentBrand: unique symbol;
25
+
26
+ declare const __Schema: unique symbol;
27
+ declare const __ConcreteMetadata: unique symbol;
28
+ declare const __Parent: unique symbol;
29
+
30
+ type _ClassMustBeAssignableToInternal = MustConform<typeof Document, Document.Internal.Constructor>;
31
+ type _InstanceMustBeAssignableToInternal = MustConform<Document.Any, Document.Internal.Instance.Any>;
32
+
33
+ /**
34
+ * An extension of the base DataModel which defines a Document.
35
+ * Documents are special in that they are persisted to the database and referenced by _id.
36
+ */
37
+ declare abstract class Document<
38
+ Schema extends DataSchema,
39
+ ConcreteMetadata extends Document.Metadata.Any = Document.Metadata.Any,
40
+ Parent extends Document.Any | null = null,
41
+ > extends DataModel<Schema, Parent> {
42
+ static [__DocumentBrand]: never;
43
+
44
+ [__Schema]: Schema;
45
+ [__ConcreteMetadata]: ConcreteMetadata;
46
+ [__Parent]: Parent;
47
+
48
+ /**
49
+ * @param data - Initial data provided to construct the Document
50
+ * @param context - Construction context options
51
+ */
52
+ constructor(data?: fields.SchemaField.InnerConstructorType<Schema>, context?: Document.ConstructionContext<Parent>);
53
+
54
+ override parent: Parent;
55
+
56
+ protected override _configure(options?: { pack?: string | null }): void;
57
+
58
+ /**
59
+ * An immutable reverse-reference to the name of the collection that this Document exists in on its parent, if any.
60
+ */
61
+ readonly parentCollection: string | null;
62
+
63
+ /**
64
+ * An immutable reference to a containing Compendium collection to which this Document belongs.
65
+ */
66
+ readonly pack: string | null;
67
+
68
+ /**
69
+ * A mapping of embedded Document collections which exist in this model.
70
+ */
71
+ readonly collections: Document.CollectionRecord<Schema>;
72
+
73
+ /**
74
+ * Ensure that all Document classes share the same schema of their base declaration.
75
+ */
76
+ static get schema(): foundry.data.fields.SchemaField.Any;
77
+
78
+ protected _initialize(options?: any): void;
79
+
80
+ /**
81
+ * A mapping of singleton embedded Documents which exist in this model.
82
+ */
83
+ readonly singletons: Record<string, Document.AnyChild<this>>;
84
+
85
+ protected static override _initializationOrder(): Generator<[string, DataField.Any]>;
86
+
87
+ /**
88
+ * Default metadata which applies to each instance of this Document type.
89
+ * @defaultValue
90
+ * ```typescript
91
+ * {
92
+ * name: "Document",
93
+ * collection: "documents",
94
+ * indexed: false,
95
+ * compendiumIndexFields: [],
96
+ * label: "DOCUMENT.Document",
97
+ * coreTypes: [],
98
+ * embedded: {},
99
+ * permissions: {
100
+ * create: "ASSISTANT",
101
+ * update: "ASSISTANT",
102
+ * delete: "ASSISTANT"
103
+ * },
104
+ * preserveOnImport: ["_id", "sort", "ownership"],
105
+ * schemaVersion: undefined
106
+ * }
107
+ * ```
108
+ */
109
+ static metadata: Document.Metadata.Any;
110
+
111
+ /**
112
+ * The database backend used to execute operations and handle results
113
+ */
114
+ static get database(): CONFIG["DatabaseBackend"];
115
+
116
+ /**
117
+ * Return a reference to the implemented subclass of this base document type.
118
+ */
119
+ // Referencing the concrete class the config is not possible because accessors cannot be generic and there is not
120
+ // static polymorphic this type
121
+ static get implementation(): Document.AnyConstructor;
122
+
123
+ /**
124
+ * The base document definition that this document class extends from.
125
+ */
126
+ static get baseDocument(): Document.AnyConstructor;
127
+
128
+ /**
129
+ * The named collection to which this Document belongs.
130
+ */
131
+ static get collectionName(): string;
132
+
133
+ /**
134
+ * The named collection to which this Document belongs.
135
+ */
136
+ get collectionName(): ConcreteMetadata["collection"];
137
+
138
+ /**
139
+ * The canonical name of this Document type, for example "Actor".
140
+ */
141
+ static get documentName(): string;
142
+
143
+ /**
144
+ * The canonical name of this Document type, for example "Actor".
145
+ */
146
+ get documentName(): ConcreteMetadata["name"];
147
+
148
+ /**
149
+ * The allowed types which may exist for this Document class
150
+ */
151
+ static get TYPES(): string[];
152
+
153
+ /**
154
+ * Does this Document support additional subtypes?
155
+ */
156
+ static get hasTypeData(): boolean;
157
+
158
+ /**
159
+ * The Embedded Document hierarchy for this Document.
160
+ */
161
+ static get hierarchy(): Record<string, EmbeddedCollectionField<any, any> | EmbeddedDocumentField<any>>;
162
+
163
+ /**
164
+ * Identify the collection in a parent Document that this Document exists belongs to, if any.
165
+ * @param parentCollection - An explicitly provided parent collection name.
166
+ */
167
+ _getParentCollection(parentCollection?: string): string | null;
168
+
169
+ /**
170
+ * The canonical identifier for this Document
171
+ */
172
+ get id(): string | null;
173
+
174
+ /**
175
+ * Test whether this Document is embedded within a parent Document
176
+ */
177
+ get isEmbedded(): boolean;
178
+
179
+ /**
180
+ * A Universally Unique Identifier (uuid) for this Document instance.
181
+ */
182
+ get uuid(): string;
183
+
184
+ /**
185
+ * Test whether a given User has a sufficient role in order to create Documents of this type in general.
186
+ * @param user - The User being tested
187
+ * @returns Does the User have a sufficient role to create?
188
+ */
189
+ static canUserCreate(user: foundry.documents.BaseUser): boolean;
190
+
191
+ /**
192
+ * Get the explicit permission level that a specific User has over this Document, a value in CONST.DOCUMENT_OWNERSHIP_LEVELS.
193
+ * This method returns the value recorded in Document ownership, regardless of the User's role.
194
+ * To test whether a user has a certain capability over the document, testUserPermission should be used.
195
+ * @param user - The User being tested
196
+ * (default: `game.user`)
197
+ * @returns A numeric permission level from CONST.DOCUMENT_OWNERSHIP_LEVELS or null
198
+ */
199
+ getUserLevel(user?: foundry.documents.BaseUser): CONST.DOCUMENT_OWNERSHIP_LEVELS | null;
200
+
201
+ /**
202
+ * Test whether a certain User has a requested permission level (or greater) over the Document
203
+ * @param user - The User being tested
204
+ * @param permission - The permission level from DOCUMENT_PERMISSION_LEVELS to test
205
+ * @param options - Additional options involved in the permission test
206
+ * @returns Does the user have this permission level over the Document?
207
+ */
208
+ testUserPermission(
209
+ user: foundry.documents.BaseUser,
210
+ permission: keyof typeof CONST.DOCUMENT_OWNERSHIP_LEVELS | CONST.DOCUMENT_OWNERSHIP_LEVELS,
211
+ options?: InexactPartial<{
212
+ /**
213
+ * Require the exact permission level requested?
214
+ * @defaultValue `false`
215
+ */
216
+ exact: boolean;
217
+ }>,
218
+ ): boolean;
219
+
220
+ /**
221
+ * Test whether a given User has permission to perform some action on this Document
222
+ * @param user - The User attempting modification
223
+ * @param action - The attempted action
224
+ * @param data - Data involved in the attempted action
225
+ * (default: `{}`)
226
+ * @returns Does the User have permission?
227
+ */
228
+ canUserModify(user: foundry.documents.BaseUser, action: "create" | "update" | "delete", data?: object): boolean;
229
+
230
+ /**
231
+ * Clone a document, creating a new document by combining current data with provided overrides.
232
+ * The cloned document is ephemeral and not yet saved to the database.
233
+ * @param data - Additional data which overrides current document data at the time of creation
234
+ * @param context - Additional context options passed to the create method
235
+ * @returns The cloned Document instance
236
+ */
237
+ override clone<Save extends boolean = false>(
238
+ data?: fields.SchemaField.AssignmentType<Schema, EmptyObject>,
239
+ context?: InexactPartial<
240
+ {
241
+ /**
242
+ * Save the clone to the World database?
243
+ * @defaultValue `false`
244
+ */
245
+ save: Save;
246
+
247
+ /**
248
+ * Keep the same ID of the original document
249
+ * @defaultValue `false`
250
+ */
251
+ keepId: boolean;
252
+
253
+ /**
254
+ * Track the clone source
255
+ * @defaultValue `false`
256
+ */
257
+ addSource: boolean;
258
+ } & Document.ConstructionContext<this["parent"]>
259
+ >, // FIXME(LukeAbby): Adding Document.Stored to the return causes a recursive type error in Scene
260
+ ): Save extends true ? Promise<this> : this;
261
+
262
+ /**
263
+ * For Documents which include game system data, migrate the system data object to conform to its latest data model.
264
+ * The data model is defined by the template.json specification included by the game system.
265
+ * @returns The migrated system data object
266
+ */
267
+ migrateSystemData(): object;
268
+
269
+ override toObject(source: true): this["_source"];
270
+ override toObject(source?: boolean): ReturnType<this["schema"]["toObject"]>;
271
+
272
+ /**
273
+ * Create multiple Documents using provided input data.
274
+ * Data is provided as an array of objects where each individual object becomes one new Document.
275
+ *
276
+ * @param data - An array of data objects or existing Documents to persist.
277
+ * (default: `[]`)
278
+ * @param operation - Parameters of the requested creation operation
279
+ * (default: `{}`)
280
+ * @returns An array of created Document instances
281
+ *
282
+ * @example Create a single Document
283
+ * ```typescript
284
+ * const data = [{name: "New Actor", type: "character", img: "path/to/profile.jpg"}];
285
+ * const created = await Actor.createDocuments(data);
286
+ * ```
287
+ *
288
+ * @example Create multiple Documents
289
+ * ```typescript
290
+ * const data = [{name: "Tim", type: "npc"], [{name: "Tom", type: "npc"}];
291
+ * const created = await Actor.createDocuments(data);
292
+ * ```
293
+ *
294
+ * @example Create multiple embedded Documents within a parent
295
+ * ```typescript
296
+ * const actor = game.actors.getName("Tim");
297
+ * const data = [{name: "Sword", type: "weapon"}, {name: "Breastplate", type: "equipment"}];
298
+ * const created = await Item.createDocuments(data, {parent: actor});
299
+ * ```
300
+ *
301
+ * @example Create a Document within a Compendium pack
302
+ * ```typescript
303
+ * const data = [{name: "Compendium Actor", type: "character", img: "path/to/profile.jpg"}];
304
+ * const created = await Actor.createDocuments(data, {pack: "mymodule.mypack"});
305
+ * ```
306
+ */
307
+ static createDocuments<T extends Document.AnyConstructor, Temporary extends boolean | undefined>(
308
+ this: T,
309
+ data: Array<fields.SchemaField.AssignmentType<InstanceType<T>["schema"]["fields"]> & Record<string, unknown>>,
310
+ operation?: InexactPartial<Omit<DatabaseOperationsFor<T["metadata"]["name"], "create">, "data">> & {
311
+ temporary?: Temporary;
312
+ },
313
+ ): Promise<Document.ToStoredIf<T, Temporary>[] | undefined>;
314
+
315
+ /**
316
+ * Update multiple Document instances using provided differential data.
317
+ * Data is provided as an array of objects where each individual object updates one existing Document.
318
+ *
319
+ * @param updates - An array of differential data objects, each used to update a single Document
320
+ * (default: `[]`)
321
+ * @param operation - Parameters of the database update operation
322
+ * (default: `{}`)
323
+ * @returns An array of updated Document instances
324
+ *
325
+ * @example Update a single Document
326
+ * ```typescript
327
+ * const updates = [{_id: "12ekjf43kj2312ds", name: "Timothy"}];
328
+ * const updated = await Actor.updateDocuments(updates);
329
+ * ```
330
+ *
331
+ * @example Update multiple Documents
332
+ * ```typescript
333
+ * const updates = [{_id: "12ekjf43kj2312ds", name: "Timothy"}, {_id: "kj549dk48k34jk34", name: "Thomas"}]};
334
+ * const updated = await Actor.updateDocuments(updates);
335
+ * ```
336
+ *
337
+ * @example Update multiple embedded Documents within a parent
338
+ * ```typescript
339
+ * const actor = game.actors.getName("Timothy");
340
+ * const updates = [{_id: sword.id, name: "Magic Sword"}, {_id: shield.id, name: "Magic Shield"}];
341
+ * const updated = await Item.updateDocuments(updates, {parent: actor});
342
+ * ```
343
+ *
344
+ * @example Update Documents within a Compendium pack
345
+ * ```typescript
346
+ * const actor = await pack.getDocument(documentId);
347
+ * const updated = await Actor.updateDocuments([{_id: actor.id, name: "New Name"}], {pack: "mymodule.mypack"});
348
+ * ```
349
+ */
350
+ static updateDocuments<T extends Document.AnyConstructor>(
351
+ this: T,
352
+ updates?: Array<DeepPartial<Document.ConstructorDataFor<T> & Record<string, unknown>>>,
353
+ operation?: InexactPartial<Omit<DatabaseOperationsFor<InstanceType<T>["documentName"], "update">, "updates">>,
354
+ ): Promise<Document.ToConfiguredInstance<T>[]>;
355
+
356
+ /**
357
+ * Delete one or multiple existing Documents using an array of provided ids.
358
+ * Data is provided as an array of string ids for the documents to delete.
359
+ *
360
+ * @param ids - An array of string ids for the documents to be deleted
361
+ * (default: `[]`)
362
+ * @param operation - Parameters of the database deletion operation
363
+ * (default: `{}`)
364
+ * @returns An array of deleted Document instances
365
+ *
366
+ * @example Delete a single Document
367
+ * ```typescript
368
+ * const tim = game.actors.getName("Tim");
369
+ * const deleted = await Actor.deleteDocuments([tim.id]);
370
+ * ```
371
+ *
372
+ * @example Delete multiple Documents
373
+ * ```typescript
374
+ * const tim = game.actors.getName("Tim");
375
+ * const tom = game.actors.getName("Tom");
376
+ * const deleted = await Actor.deleteDocuments([tim.id, tom.id]);
377
+ * ```
378
+ *
379
+ * @example Delete multiple embedded Documents within a parent
380
+ * ```typescript
381
+ * const tim = game.actors.getName("Tim");
382
+ * const sword = tim.items.getName("Sword");
383
+ * const shield = tim.items.getName("Shield");
384
+ * const deleted = await Item.deleteDocuments([sword.id, shield.id], parent: actor});
385
+ * ```
386
+ *
387
+ * @example Delete Documents within a Compendium pack
388
+ * ```typescript
389
+ * const actor = await pack.getDocument(documentId);
390
+ * const deleted = await Actor.deleteDocuments([actor.id], {pack: "mymodule.mypack"});
391
+ * ```
392
+ */
393
+ static deleteDocuments<T extends Document.AnyConstructor>(
394
+ this: T,
395
+ ids?: string[],
396
+ operation?: InexactPartial<Omit<DatabaseOperationsFor<InstanceType<T>["documentName"], "delete">, "ids">>,
397
+ ): Promise<Document.ToConfiguredInstance<T>[]>;
398
+
399
+ /**
400
+ * Create a new Document using provided input data, saving it to the database.
401
+ * @see {@link Document.createDocuments}
402
+ * @param data - Initial data used to create this Document, or a Document instance to persist.
403
+ * @param operation - Parameters of the creation operation
404
+ * (default: `{}`)
405
+ * @returns The created Document instance
406
+ *
407
+ * @example Create a World-level Item
408
+ * ```typescript
409
+ * const data = [{name: "Special Sword", type: "weapon"}];
410
+ * const created = await Item.create(data);
411
+ * ```
412
+ *
413
+ * @example Create an Actor-owned Item
414
+ * ```typescript
415
+ * const data = [{name: "Special Sword", type: "weapon"}];
416
+ * const actor = game.actors.getName("My Hero");
417
+ * const created = await Item.create(data, {parent: actor});
418
+ * ```
419
+ *
420
+ * @example Create an Item in a Compendium pack
421
+ * ```typescript
422
+ * const data = [{name: "Special Sword", type: "weapon"}];
423
+ * const created = await Item.create(data, {pack: "mymodule.mypack"});
424
+ * ```
425
+ *
426
+ * @remarks If no document has actually been created, the returned {@link Promise} resolves to `undefined`.
427
+ */
428
+ static create<T extends Document.AnyConstructor, Temporary extends boolean | undefined>(
429
+ this: T,
430
+ data: Document.ConstructorDataFor<T> | Document.ConstructorDataFor<T>[],
431
+ operation?: InexactPartial<Omit<DatabaseOperationsFor<T["metadata"]["name"], "create">, "data">> & {
432
+ temporary?: Temporary;
433
+ },
434
+ ): Promise<Document.ToStoredIf<T, Temporary> | undefined>;
435
+ /**
436
+ * Update this Document using incremental data, saving it to the database.
437
+ * @see {@link Document.updateDocuments}
438
+ * @param data - Differential update data which modifies the existing values of this document data
439
+ * (default: `{}`)
440
+ * @param operation - Parameters of the update operation
441
+ * (default: `{}`)
442
+ * @returns The updated Document instance
443
+ *
444
+ * @remarks If no document has actually been updated, the returned {@link Promise} resolves to `undefined`.
445
+ */
446
+ override update(
447
+ // TODO: Determine if this is Partial, DeepPartial, or InexactPartial.
448
+ data?: Partial<Document.ConstructorDataForSchema<Schema>>,
449
+ operation?: InexactPartial<Omit<DatabaseOperationsFor<ConcreteMetadata["name"], "update">, "updates">>,
450
+ ): Promise<this | undefined>;
451
+
452
+ /**
453
+ * Delete this Document, removing it from the database.
454
+ * @see {@link Document.deleteDocuments}
455
+ * @param operation - Parameters of the deletion operation
456
+ * (default: `{}`)
457
+ * @returns The deleted Document instance
458
+ *
459
+ * @remarks If no document has actually been deleted, the returned {@link Promise} resolves to `undefined`.
460
+ */
461
+ delete(
462
+ operation?: InexactPartial<Omit<DatabaseOperationsFor<ConcreteMetadata["name"], "delete">, "ids">>,
463
+ ): Promise<this | undefined>;
464
+
465
+ /**
466
+ * Get a World-level Document of this type by its id.
467
+ * @param documentId - The Document ID
468
+ * @param options - Additional options which customize the request
469
+ * @returns The retrieved Document, or null
470
+ */
471
+ static get(documentId: string, options?: InexactPartial<DatabaseGetOperation>): Document.Any | null;
472
+
473
+ /**
474
+ * A compatibility method that returns the appropriate name of an embedded collection within this Document.
475
+ * @param name - An existing collection name or a document name.
476
+ * @returns The provided collection name if it exists, the first available collection for the
477
+ * document name provided, or null if no appropriate embedded collection could be found.
478
+ * @example Passing an existing collection name.
479
+ * ```js
480
+ * Actor.getCollectionName("items");
481
+ * // returns "items"
482
+ * ```
483
+ *
484
+ * @example Passing a document name.
485
+ * ```js
486
+ * Actor.getCollectionName("Item");
487
+ * // returns "items"
488
+ * ```
489
+ */
490
+ static getCollectionName(name: string): string | null;
491
+
492
+ /**
493
+ * Obtain a reference to the Array of source data within the data object for a certain embedded Document name
494
+ * @param embeddedName - The name of the embedded Document type
495
+ * @returns The Collection instance of embedded Documents of the requested type
496
+ * @remarks Usually returns some form of DocumentCollection, but not always (e.g. Token["actors"])
497
+ */
498
+ // TODO: After regions are defined, change first parameter to `extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES`
499
+ getEmbeddedCollection<
500
+ EmbeddedName extends Exclude<foundry.CONST.EMBEDDED_DOCUMENT_TYPES, "Region" | "RegionBehavior">,
501
+ >(embeddedName: EmbeddedName): Collection<Document.ConfiguredInstanceForName<EmbeddedName>>;
502
+
503
+ /**
504
+ * Get an embedded document by its id from a named collection in the parent document.
505
+ * @param embeddedName - The name of the embedded Document type
506
+ * @param id - The id of the child document to retrieve
507
+ * @param options - Additional options which modify how embedded documents are retrieved
508
+ * @returns The retrieved embedded Document instance, or undefined
509
+ * @throws If the embedded collection does not exist, or if strict is true and the Embedded Document could not be found.
510
+ */
511
+ getEmbeddedDocument(
512
+ embeddedName: string,
513
+ id: string,
514
+ options: InexactPartial<{
515
+ /**
516
+ * Throw an Error if the requested id does not exist. See Collection#get
517
+ * @defaultValue `false`
518
+ */
519
+ strict: boolean;
520
+ /**
521
+ * Allow retrieving an invalid Embedded Document.
522
+ * @defaultValue `false`
523
+ */
524
+ invalid: boolean;
525
+ }>,
526
+ ): Document.AnyChild<this> | undefined;
527
+
528
+ /**
529
+ * Create multiple embedded Document instances within this parent Document using provided input data.
530
+ * @see {@link Document.createDocuments}
531
+ * @param embeddedName - The name of the embedded Document type
532
+ * @param data - An array of data objects used to create multiple documents
533
+ * (default: `[]`)
534
+ * @param operation - Parameters of the database creation workflow
535
+ * (default: `{}`)
536
+ * @returns An array of created Document instances
537
+ */
538
+ // TODO: After regions are defined, change first parameter to `extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES`
539
+ // TODO: I think we could do a better job on all the embedded methods of limiting the types here based on the
540
+ // allowed embedded types of the parent (vs. allowing any document to create embedded
541
+ // documents of any type)
542
+ createEmbeddedDocuments<
543
+ EmbeddedName extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES,
544
+ Temporary extends boolean | undefined,
545
+ >(
546
+ embeddedName: EmbeddedName,
547
+ data?: Array<AnyObject>,
548
+ operation?: InexactPartial<DatabaseOperationsFor<Extract<EmbeddedName, Document.Type>, "create">> & {
549
+ temporary?: Temporary;
550
+ },
551
+ ): Promise<Array<Document.ConfiguredClassForName<Extract<EmbeddedName, Document.Type>>> | undefined>;
552
+
553
+ /**
554
+ * Update multiple embedded Document instances within a parent Document using provided differential data.
555
+ * @see {@link Document.updateDocuments}
556
+ * @param embeddedName - The name of the embedded Document type
557
+ * @param updates - An array of differential data objects, each used to update a single Document
558
+ * (default: `[]`)
559
+ * @param operation - Parameters of the database update workflow
560
+ * (default: `{}`)
561
+ * @returns An array of updated Document instances
562
+ */
563
+ // TODO: After regions are defined, change first parameter to `extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES`
564
+ updateEmbeddedDocuments<EmbeddedName extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES>(
565
+ embeddedName: EmbeddedName,
566
+ updates?: Array<AnyObject>,
567
+ context?: Document.ModificationContext<this["parent"]>,
568
+ ): Promise<Array<Document.Stored<Document.ConfiguredInstanceForName<Extract<EmbeddedName, Document.Type>>>>>;
569
+
570
+ /**
571
+ * Delete multiple embedded Document instances within a parent Document using provided string ids.
572
+ * @see {@link Document.deleteDocuments}
573
+ * @param embeddedName - The name of the embedded Document type
574
+ * @param ids - An array of string ids for each Document to be deleted
575
+ * @param operation - Parameters of the database deletion workflow
576
+ * (default: `{}`)
577
+ * @returns An array of deleted Document instances
578
+ */
579
+ // TODO: After regions are defined, change first parameter to `extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES`
580
+ deleteEmbeddedDocuments<
581
+ EmbeddedName extends Exclude<foundry.CONST.EMBEDDED_DOCUMENT_TYPES, "Region" | "RegionBehavior">,
582
+ >(
583
+ embeddedName: EmbeddedName,
584
+ ids: Array<string>,
585
+ operation?: DatabaseOperationsFor<ConcreteMetadata["name"], "delete">,
586
+ ): Promise<Array<Document.Stored<Document.ConfiguredInstanceForName<EmbeddedName>>>>;
587
+
588
+ /**
589
+ * Iterate over all embedded Documents that are hierarchical children of this Document.
590
+ * @param _parentPath - A parent field path already traversed
591
+ * @remarks Not called within Foundry's client-side code, likely exists for server documents
592
+ */
593
+ traverseEmbeddedDocuments(_parentPath?: string): Generator<[string, Document.Any]>;
594
+
595
+ /**
596
+ * Get the value of a "flag" for this document
597
+ * See the setFlag method for more details on flags
598
+ *
599
+ * @param scope - The flag scope which namespaces the key
600
+ * @param key - The flag key
601
+ * @returns The flag value
602
+ */
603
+ getFlag<
604
+ S extends Document.FlagKeyOf<Document.FlagsFor<this>>,
605
+ K extends Document.FlagKeyOf<GetKey<Document.FlagsFor<this>, S>>,
606
+ >(scope: S, key: K): Document.GetFlag<this, S, K>;
607
+
608
+ /**
609
+ * Assign a "flag" to this document.
610
+ * Flags represent key-value type data which can be used to store flexible or arbitrary data required by either
611
+ * the core software, game systems, or user-created modules.
612
+ *
613
+ * Each flag should be set using a scope which provides a namespace for the flag to help prevent collisions.
614
+ *
615
+ * Flags set by the core software use the "core" scope.
616
+ * Flags set by game systems or modules should use the canonical name attribute for the module
617
+ * Flags set by an individual world should "world" as the scope.
618
+ *
619
+ * Flag values can assume almost any data type. Setting a flag value to null will delete that flag.
620
+ *
621
+ * @param scope - The flag scope which namespaces the key
622
+ * @param key - The flag key
623
+ * @param value - The flag value
624
+ * @returns A Promise resolving to the updated document
625
+ */
626
+ setFlag<
627
+ S extends keyof GetKey<this, "flags">,
628
+ K extends keyof NonNullable<GetKey<this, "flags">>[S],
629
+ V extends NonNullable<GetKey<this, "flags">>[S][K],
630
+ >(scope: S, key: K, value: V): Promise<this>;
631
+
632
+ /**
633
+ * Remove a flag assigned to the document
634
+ * @param scope - The flag scope which namespaces the key
635
+ * @param key - The flag key
636
+ * @returns The updated document instance
637
+ */
638
+ unsetFlag(scope: string, key: string): Promise<this>;
639
+
640
+ /**
641
+ * Pre-process a creation operation for a single Document instance.
642
+ * Pre-operation events only occur for the client which requested the operation.
643
+ * Modifications to the pending Document instance must be performed using {@link Document#updateSource}.
644
+ * @param data - The initial data object provided to the document creation request
645
+ * @param options - Additional options which modify the creation request
646
+ * @param user - The User requesting the document creation
647
+ * @returns Return false to exclude this Document from the creation operation
648
+ */
649
+ protected _preCreate(
650
+ data: fields.SchemaField.AssignmentType<Schema>,
651
+ options: Document.PreCreateOptions<ConcreteMetadata["name"]>,
652
+ user: foundry.documents.BaseUser,
653
+ ): Promise<boolean | void>;
654
+
655
+ /**
656
+ * Post-process a creation operation for a single Document instance.
657
+ * Post-operation events occur for all connected clients.
658
+ * @param data - The initial data object provided to the document creation request
659
+ * @param options - Additional options which modify the creation request
660
+ * @param userId - The id of the User requesting the document update
661
+ */
662
+ protected _onCreate(
663
+ data: fields.SchemaField.InnerAssignmentType<Schema>,
664
+ options: Document.OnCreateOptions<ConcreteMetadata["name"]>,
665
+ userId: string,
666
+ ): void;
667
+
668
+ /**
669
+ * Pre-process a creation operation, potentially altering its instructions or input data. Pre-operation events only
670
+ * occur for the client which requested the operation.
671
+ *
672
+ * This batch-wise workflow occurs after individual {@link Document#_preCreate} workflows and provides a final
673
+ * pre-flight check before a database operation occurs.
674
+ *
675
+ * Modifications to pending documents must mutate the documents array or alter individual document instances using
676
+ * {@link Document#updateSource}.
677
+ * @param documents - Pending document instances ot be created
678
+ * @param operation - Parameters of the database creation operation
679
+ * @param user - The User requesting the creation operation
680
+ * @returns Return false to cancel the creation operation entirely
681
+ */
682
+ protected static _preCreateOperation<T extends Document.AnyConstructor>(
683
+ this: T,
684
+ documents: InstanceType<Document.ConfiguredClass<T>>[],
685
+ operation: DatabaseOperationsFor<T["metadata"]["name"], "create">,
686
+ user: foundry.documents.BaseUser,
687
+ ): Promise<boolean | void>;
688
+
689
+ /**
690
+ * Post-process a creation operation, reacting to database changes which have occurred. Post-operation events occur
691
+ * for all connected clients.
692
+ *
693
+ * This batch-wise workflow occurs after individual {@link Document#_onCreate} workflows.
694
+ *
695
+ * @param documents - The Document instances which were created
696
+ * @param operation - Parameters of the database creation operation
697
+ * @param user - The User who performed the creation operation
698
+ */
699
+ protected static _onCreateOperation<T extends Document.AnyConstructor>(
700
+ this: T,
701
+ documents: InstanceType<Document.ConfiguredClass<T>>[],
702
+ operation: DatabaseOperationsFor<T["metadata"]["name"], "create">,
703
+ user: foundry.documents.BaseUser,
704
+ ): Promise<void>;
705
+
706
+ /**
707
+ * Perform preliminary operations before a Document of this type is updated.
708
+ * Pre-update operations only occur for the client which requested the operation.
709
+ * @param changed - The differential data that is changed relative to the documents prior values
710
+ * @param options - Additional options which modify the update request
711
+ * @param user - The User requesting the document update
712
+ * @returns A return value of false indicates the update operation should be cancelled
713
+ */
714
+ protected _preUpdate(
715
+ changed: fields.SchemaField.AssignmentType<Schema>,
716
+ options: Document.PreUpdateOptions<ConcreteMetadata["name"]>,
717
+ user: foundry.documents.BaseUser,
718
+ ): Promise<boolean | void>;
719
+
720
+ /**
721
+ * Perform follow-up operations after a Document of this type is updated.
722
+ * Post-update operations occur for all clients after the update is broadcast.
723
+ * @param changed - The differential data that was changed relative to the documents prior values
724
+ * @param options - Additional options which modify the update request
725
+ * @param userId - The id of the User requesting the document update
726
+ */
727
+ protected _onUpdate(
728
+ changed: fields.SchemaField.InnerAssignmentType<Schema>,
729
+ options: Document.OnUpdateOptions<ConcreteMetadata["name"]>,
730
+ userId: string,
731
+ ): void;
732
+
733
+ /**
734
+ * Pre-process an update operation, potentially altering its instructions or input data. Pre-operation events only
735
+ * occur for the client which requested the operation.
736
+ *
737
+ * This batch-wise workflow occurs after individual {@link Document#_preUpdate} workflows and provides a final
738
+ * pre-flight check before a database operation occurs.
739
+ *
740
+ * Modifications to the requested updates are performed by mutating the data array of the operation.
741
+ * {@link Document#updateSource}.
742
+ *
743
+ * @param documents - Document instances to be updated
744
+ * @param operation - Parameters of the database update operation
745
+ * @param user - The User requesting the update operation
746
+ * @returns Return false to cancel the update operation entirely
747
+ */
748
+ protected static _preUpdateOperation<T extends Document.AnyConstructor>(
749
+ this: T,
750
+ documents: InstanceType<Document.ConfiguredClass<T>>[],
751
+ operation: DatabaseOperationsFor<InstanceType<T>["documentName"], "update">,
752
+ user: foundry.documents.BaseUser,
753
+ ): Promise<boolean | void>;
754
+
755
+ /**
756
+ * Post-process an update operation, reacting to database changes which have occurred. Post-operation events occur
757
+ * for all connected clients.
758
+ *
759
+ * This batch-wise workflow occurs after individual {@link Document#_onUpdate} workflows.
760
+ *
761
+ * @param documents - The Document instances which were updated
762
+ * @param operation - Parameters of the database update operation
763
+ * @param user - The User who performed the update operation
764
+ */
765
+ protected static _onUpdateOperation<T extends Document.AnyConstructor>(
766
+ this: T,
767
+ documents: InstanceType<Document.ConfiguredClass<T>>[],
768
+ operation: DatabaseOperationsFor<InstanceType<T>["documentName"], "update">,
769
+ user: foundry.documents.BaseUser,
770
+ ): Promise<void>;
771
+
772
+ /**
773
+ * Perform preliminary operations before a Document of this type is deleted.
774
+ * Pre-delete operations only occur for the client which requested the operation.
775
+ * @param options - Additional options which modify the deletion request
776
+ * @param user - The User requesting the document deletion
777
+ * @returns A return value of false indicates the delete operation should be cancelled
778
+ */
779
+ protected _preDelete(
780
+ options: Document.PreDeleteOptions<ConcreteMetadata["name"]>,
781
+ user: foundry.documents.BaseUser,
782
+ ): Promise<boolean | void>;
783
+
784
+ /**
785
+ * Perform follow-up operations after a Document of this type is deleted.
786
+ * Post-deletion operations occur for all clients after the deletion is broadcast.
787
+ * @param options - Additional options which modify the deletion request
788
+ * @param userId - The id of the User requesting the document update
789
+ */
790
+ protected _onDelete(options: Document.OnDeleteOptions<ConcreteMetadata["name"]>, userId: string): void;
791
+
792
+ /**
793
+ * Pre-process a deletion operation, potentially altering its instructions or input data. Pre-operation events only
794
+ * occur for the client which requested the operation.
795
+ *
796
+ * This batch-wise workflow occurs after individual {@link Document#_preDelete} workflows and provides a final
797
+ * pre-flight check before a database operation occurs.
798
+ *
799
+ * Modifications to the requested deletions are performed by mutating the operation object.
800
+ * {@link Document#updateSource}.
801
+ *
802
+ * @param documents - Document instances to be deleted
803
+ * @param operation - Parameters of the database update operation
804
+ * @param user - The User requesting the deletion operation
805
+ * @returns Return false to cancel the deletion operation entirely
806
+ * @internal
807
+ */
808
+ protected static _preDeleteOperation<T extends Document.AnyConstructor>(
809
+ this: T,
810
+ documents: Array<Document.ToConfiguredInstance<T>>,
811
+ operation: DatabaseOperationsFor<InstanceType<T>["documentName"], "delete">,
812
+ user: foundry.documents.BaseUser,
813
+ ): Promise<unknown>;
814
+
815
+ /**
816
+ * Post-process a deletion operation, reacting to database changes which have occurred. Post-operation events occur
817
+ * for all connected clients.
818
+ *
819
+ * This batch-wise workflow occurs after individual {@link Document#_onDelete} workflows.
820
+ *
821
+ * @param documents - The Document instances which were deleted
822
+ * @param operation - Parameters of the database deletion operation
823
+ * @param user - The User who performed the deletion operation
824
+ */
825
+ protected static _onDeleteOperation<T extends Document.AnyConstructor>(
826
+ this: T,
827
+ documents: Array<Document.ToConfiguredInstance<T>>,
828
+ operation: DatabaseOperationsFor<InstanceType<T>["documentName"], "delete">,
829
+ user: foundry.documents.BaseUser,
830
+ ): Promise<unknown>;
831
+
832
+ /**
833
+ * Configure whether V10 Document Model migration warnings should be logged for this class.
834
+ */
835
+ static LOG_V10_COMPATIBILITY_WARNINGS: boolean;
836
+
837
+ /**
838
+ * @deprecated since v11, will be removed in v13
839
+ * @remarks "You are accessing `Document.hasSystemData` which is deprecated. Please use `Document.hasTypeData` instead."
840
+ */
841
+ static get hasSystemData(): boolean;
842
+
843
+ /**
844
+ * A reusable helper for adding migration shims.
845
+ */
846
+ protected static _addDataFieldShims(data: object, shims: object, options: object): unknown;
847
+
848
+ /**
849
+ * A reusable helper for adding a migration shim
850
+ */
851
+ protected static _addDataFieldShim(data: object, oldKey: string, newKey: string, options?: object): unknown;
852
+
853
+ /**
854
+ * Define a simple migration from one field name to another.
855
+ * The value of the data can be transformed during the migration by an optional application function.
856
+ * @param data - The data object being migrated
857
+ * @param oldKey - The old field name
858
+ * @param newKey - The new field name
859
+ * @param apply - An application function, otherwise the old value is applied
860
+ * @internal
861
+ */
862
+ protected static _addDataFieldMigration(
863
+ data: object,
864
+ oldKey: string,
865
+ newKey: string,
866
+ apply?: (data: object) => any,
867
+ ): unknown;
868
+
869
+ protected static _logDataFieldMigration(
870
+ oldKey: string,
871
+ newKey: string,
872
+ options?: LogCompatibilityWarningOptions,
873
+ ): void;
874
+
875
+ /**
876
+ * @deprecated since v12, will be removed in v14
877
+ * @remarks `"The Document._onCreateDocuments static method is deprecated in favor of Document._onCreateOperation"`
878
+ */
879
+ protected static _onCreateDocuments<T extends Document.AnyConstructor>(
880
+ this: T,
881
+ documents: Array<Document.ToConfiguredInstance<T>>,
882
+ context: Document.ModificationContext<Document.Any | null>,
883
+ ): Promise<void>;
884
+
885
+ /**
886
+ * @deprecated since v12, will be removed in v14
887
+ * @remarks `"The Document._onUpdateDocuments static method is deprecated in favor of Document._onUpdateOperation"`
888
+ */
889
+ protected static _onUpdateDocuments<T extends Document.AnyConstructor>(
890
+ this: T,
891
+ documents: Array<Document.ToConfiguredInstance<T>>,
892
+ context: Document.ModificationContext<Document.Any | null>,
893
+ ): Promise<unknown>;
894
+
895
+ /**
896
+ * @deprecated since v12, will be removed in v14
897
+ * @remarks `"The Document._onDeleteDocuments static method is deprecated in favor of Document._onDeleteOperation"`
898
+ */
899
+ protected static _onDeleteDocuments<T extends Document.AnyConstructor>(
900
+ this: T,
901
+ documents: Array<Document.ToConfiguredInstance<T>>,
902
+ context: Document.ModificationContext<Document.Any | null>,
903
+ ): Promise<unknown>;
904
+ }
905
+
906
+ declare class AnyDocument extends Document<any, any, any> {
907
+ constructor(arg0: never, ...args: never[]);
908
+
909
+ // Note(LukeAbby): Specifically adding the `__DocumentBrand` should be redundant but in practice it seems to help tsc more efficiently deduce that it's actually inheriting from `Document`.
910
+ // This is odd but probably is because it bails from looking up the parent class properties at times or something.
911
+ static [__DocumentBrand]: never;
912
+
913
+ // `getFlag` does some unusual introspection on effectively `GetKey<this, "flags">`.
914
+ // This is because not all documents have flags.
915
+ flags?: unknown;
916
+
917
+ getFlag(scope: never, key: never): any;
918
+ }
919
+
920
+ declare namespace Document {
921
+ /** Any Document, except for Settings */
922
+ type Any = Document<any, any, any>;
923
+
924
+ type Type =
925
+ | "ActiveEffect"
926
+ | "ActorDelta"
927
+ | "Actor"
928
+ | "Adventure"
929
+ | "Card"
930
+ | "Cards"
931
+ | "ChatMessage"
932
+ | "Combat"
933
+ | "Combatant"
934
+ | "FogExploration"
935
+ | "Folder"
936
+ | "Item"
937
+ | "JournalEntryPage"
938
+ | "JournalEntry"
939
+ | "Macro"
940
+ | "PlaylistSound"
941
+ | "Playlist"
942
+ | "RollTable"
943
+ | "Scene"
944
+ | "Setting"
945
+ | "TableResult"
946
+ | "User"
947
+ // All placeables also have a corresponding document class.
948
+ | PlaceableType;
949
+
950
+ type PlaceableType =
951
+ | "AmbientLight"
952
+ | "AmbientSound"
953
+ | "Drawing"
954
+ | "MeasuredTemplate"
955
+ | "Note"
956
+ | "Tile"
957
+ | "Token"
958
+ | "Wall";
959
+
960
+ // TODO: Probably a way to auto-determine this
961
+ type SystemType = "Actor" | "Card" | "Cards" | "Item" | "JournalEntryPage";
962
+
963
+ type EmbeddableNamesFor<ConcreteDocument extends Document.Internal.Instance.Any> = {
964
+ [K in keyof ConfiguredDocuments]: IsParentOf<ConcreteDocument, InstanceType<ConfiguredDocuments[K]>> extends true
965
+ ? K
966
+ : never;
967
+ };
968
+
969
+ type ParentOf<ConcreteDocument extends Document.Internal.Instance.Any> =
970
+ ConcreteDocument extends Document.Internal.Instance<any, any, infer Parent> ? Parent : never;
971
+
972
+ type NameOf<ConcreteDocument extends Document.Internal.Instance.Any> =
973
+ ConcreteDocument extends Document.Internal.Instance<any, infer ConcreteMetadata, any>
974
+ ? ConcreteMetadata["name"]
975
+ : never;
976
+
977
+ type IsParentOf<
978
+ ParentDocument extends Document.Internal.Instance.Any,
979
+ ChildDocument extends Document.Internal.Instance.Any,
980
+ > = NameOf<ParentDocument> extends NameOf<ParentOf<ChildDocument>> ? true : false;
981
+
982
+ // Documented at https://gist.github.com/LukeAbby/c7420b053d881db4a4d4496b95995c98
983
+ namespace Internal {
984
+ type Constructor = (abstract new (arg0: never, ...args: never[]) => Instance.Any) & {
985
+ [__DocumentBrand]: never;
986
+ };
987
+
988
+ interface Instance<
989
+ Schema extends DataSchema,
990
+ ConcreteMetadata extends Metadata.Any,
991
+ Parent extends Document.Internal.Instance.Any | null,
992
+ > {
993
+ [__Schema]: Schema;
994
+ [__ConcreteMetadata]: ConcreteMetadata;
995
+ [__Parent]: Parent;
996
+ }
997
+
998
+ type SchemaFor<ConcreteInstance extends Instance.Any> =
999
+ ConcreteInstance extends Instance<infer Schema, any, any> ? Schema : never;
1000
+
1001
+ type MetadataFor<ConcreteInstance extends Instance.Any> =
1002
+ ConcreteInstance extends Instance<any, infer ConcreteMetadata, any> ? ConcreteMetadata : never;
1003
+
1004
+ type ParentFor<ConcreteInstance extends Instance.Any> =
1005
+ ConcreteInstance extends Instance<any, infer Parent, any> ? Parent : never;
1006
+
1007
+ namespace Instance {
1008
+ type Any = Instance<any, any, any>;
1009
+
1010
+ type Complete<T extends Any> = T extends Document.Any ? T : never;
1011
+ }
1012
+ }
1013
+
1014
+ /** Any Document, that is a child of the given parent Document. */
1015
+ type AnyChild<Parent extends Any | null> = Document<any, any, Parent>;
1016
+
1017
+ type AnyConstructor = typeof AnyDocument;
1018
+
1019
+ /**
1020
+ * Returns the type of the constructor data for the given {@link foundry.abstract.Document}.
1021
+ */
1022
+ type ConstructorDataFor<T extends Document.Internal.Constructor> = ConstructorDataForSchema<
1023
+ T extends { defineSchema: () => infer R extends DataSchema } ? R : never
1024
+ >;
1025
+
1026
+ type ConstructorDataForSchema<Schema extends DataSchema> =
1027
+ foundry.data.fields.SchemaField.InnerAssignmentType<Schema>;
1028
+
1029
+ type SystemConstructor = AnyConstructor & {
1030
+ metadata: { name: SystemType; coreTypes?: readonly string[] | undefined };
1031
+ };
1032
+
1033
+ type ConfiguredClass<T extends { metadata: Metadata.Any }> = ConfiguredClassForName<T["metadata"]["name"]>;
1034
+
1035
+ type ConfiguredClassForName<Name extends Type> = MakeConform<ConfiguredDocuments[Name], Document.AnyConstructor>;
1036
+
1037
+ type SubTypesOf<T extends Type> =
1038
+ ConfiguredInstanceForName<T> extends { type: infer Types } ? Types : typeof foundry.CONST.BASE_DOCUMENT_TYPE;
1039
+
1040
+ type ToConfiguredClass<ConcreteDocument extends Document.Internal.Constructor> = MakeConform<
1041
+ ConfiguredDocuments[NameFor<ConcreteDocument>],
1042
+ Document.AnyConstructor
1043
+ >;
1044
+
1045
+ type ToConfiguredInstance<ConcreteDocument extends Document.Internal.Constructor> = MakeConform<
1046
+ // NOTE(LukeAbby): This avoids calling `Document.ToConfiguredClass` because that checks the static side of the class which can be expensive and even lead to loops.
1047
+ InstanceType<ConfiguredDocuments[NameFor<ConcreteDocument>]>,
1048
+ Document.Any
1049
+ >;
1050
+
1051
+ type ToConfiguredStored<D extends Document.Internal.Constructor> = Stored<ToConfiguredInstance<D>>;
1052
+
1053
+ type Stored<D extends Document.Internal.Instance.Any> = D & {
1054
+ id: string;
1055
+ _id: string;
1056
+ _source: GetKey<D, "_source"> & { _id: string };
1057
+ };
1058
+
1059
+ type ToStoredIf<
1060
+ D extends Document.Internal.Constructor,
1061
+ Temporary extends boolean | undefined,
1062
+ > = Temporary extends true ? ToConfiguredStored<D> : ToConfiguredInstance<D>;
1063
+
1064
+ type Temporary<D extends Document.Internal.Instance.Any> = D extends Stored<infer U> ? U : D;
1065
+
1066
+ type NameFor<ConcreteDocument extends Document.Internal.Constructor> = ConcreteDocument extends {
1067
+ readonly metadata: { readonly name: infer Name extends Type };
1068
+ }
1069
+ ? Name
1070
+ : never;
1071
+
1072
+ type ConfiguredInstanceForName<Name extends Type> = MakeConform<
1073
+ InstanceType<ConfiguredDocuments[Name]>,
1074
+ Document.Any
1075
+ >;
1076
+
1077
+ type ConfiguredObjectClassForName<Name extends PlaceableType> = CONFIG[Name]["objectClass"];
1078
+ type ConfiguredObjectInstanceForName<Name extends PlaceableType> = InstanceType<CONFIG[Name]["objectClass"]>;
1079
+
1080
+ type ConfiguredDataForName<Name extends Type> = GetKey<DataConfig, Name, EmptyObject>;
1081
+
1082
+ type ConfiguredSourceForName<Name extends Type> = GetKey<SourceConfig, Name, EmptyObject>;
1083
+
1084
+ type ConfiguredFlagsForName<Name extends Type> = GetKey<FlagConfig, Name, EmptyObject>;
1085
+
1086
+ type ToObjectFalseType<T extends Document.Internal.Instance.Any> = T extends {
1087
+ toObject: (source: false) => infer U;
1088
+ }
1089
+ ? U
1090
+ : T;
1091
+
1092
+ type SchemaFor<ConcreteDocument extends Internal.Instance.Any> =
1093
+ ConcreteDocument extends Internal.Instance<infer Schema, any, any> ? Schema : never;
1094
+
1095
+ type MetadataFor<ConcreteDocument extends Internal.Instance.Any> =
1096
+ ConcreteDocument extends Internal.Instance<any, infer ConcreteMetadata, any> ? ConcreteMetadata : never;
1097
+
1098
+ type CollectionRecord<Schema extends DataSchema> = {
1099
+ [Key in keyof Schema]: Schema[Key] extends fields.EmbeddedCollectionField.Any ? Schema[Key] : never;
1100
+ };
1101
+
1102
+ type Flags<ConcreteDocument extends Internal.Instance.Any> = OptionsForSchema<SchemaFor<ConcreteDocument>>;
1103
+
1104
+ interface OptionsInFlags<Options extends DataFieldOptions.Any> {
1105
+ readonly flags?: DataField<Options, any>;
1106
+ }
1107
+
1108
+ // These types only exists to simplify solving the `Document` type. Using `Document.Flags<this>` means the constraint `this extends Document.Any` has to be proved.
1109
+ // This is much more complex than proving the constraint for `Document.FlagsInternal<Schema>` that `Schema extends DataSchema`.
1110
+
1111
+ // TODO: This needs to use the derived flags not just how they're initialized.
1112
+ type OptionsForSchema<Schema extends DataSchema> =
1113
+ RemoveIndexSignatures<Schema> extends OptionsInFlags<infer Options> ? DataField.InitializedType<Options> : never;
1114
+
1115
+ // Like `keyof` but handles properties desirable for flags:
1116
+ // - `never` returns `never` (instead of `PropertyKey`)
1117
+ // - `unknown` returns `string` (instead of `never`)
1118
+ // - Strips out non string keys.
1119
+ type FlagKeyOf<T> = unknown extends T ? string : [T] extends [never] ? never : keyof T & string;
1120
+
1121
+ type FlagGetKey<T, K extends PropertyKey> = K extends keyof T ? T[K] : never;
1122
+
1123
+ // Note(LukeAbby): It's at times been very important for `GetFlag` to be covariant over `ConcreteDocument`.
1124
+ // If it isn't then issues arise where the `Document` type ends up becoming invaraint.
1125
+ // Currently it is actually contravariant over `ConcreteDocument` and this may cause issues (because of the usage of `keyof`).
1126
+ // Unfortunately it's not easy to avoid because the typical `GetKey` trick has issues between `never`, not defined at all, and `unknown` etc.
1127
+ type GetFlag<ConcreteDocument extends Internal.Instance.Any, S extends string, K extends string> = FlagGetKey<
1128
+ FlagGetKey<Document.FlagsFor<ConcreteDocument>, S>,
1129
+ K
1130
+ >;
1131
+
1132
+ type FlagsFor<ConcreteDocument extends Internal.Instance.Any> = GetKey<ConcreteDocument, "flags", never>;
1133
+
1134
+ interface ConstructionContext<Parent extends Document.Any | null> {
1135
+ /**
1136
+ * The parent Document of this one, if this one is embedded
1137
+ * @defaultValue `null`
1138
+ */
1139
+ parent?: Parent | undefined;
1140
+
1141
+ /**
1142
+ * The compendium collection ID which contains this Document, if any
1143
+ * @defaultValue `null`
1144
+ */
1145
+ pack?: string | null | undefined;
1146
+
1147
+ /**
1148
+ * Whether to validate initial data strictly?
1149
+ * @defaultValue `true`
1150
+ */
1151
+ strict?: boolean | undefined;
1152
+ }
1153
+
1154
+ interface ModificationContext<Parent extends Document.Any | null> {
1155
+ /**
1156
+ * A parent Document within which these Documents should be embedded
1157
+ */
1158
+ parent?: Parent | undefined;
1159
+
1160
+ /**
1161
+ * A Compendium pack identifier within which the Documents should be modified
1162
+ */
1163
+ pack?: string | undefined;
1164
+
1165
+ /**
1166
+ * Block the dispatch of preCreate hooks for this operation
1167
+ * @defaultValue `false`
1168
+ */
1169
+ noHook?: boolean | undefined;
1170
+
1171
+ /**
1172
+ * Return an index of the Document collection, used only during a get operation.
1173
+ * @defaultValue `false`
1174
+ */
1175
+ index?: boolean | undefined;
1176
+
1177
+ /**
1178
+ * An array of fields to retrieve when indexing the collection
1179
+ */
1180
+ indexFields?: string[] | undefined;
1181
+
1182
+ /**
1183
+ * When performing a creation operation, keep the provided _id instead of clearing it.
1184
+ * @defaultValue `false`
1185
+ */
1186
+ keepId?: boolean | undefined;
1187
+
1188
+ /**
1189
+ * When performing a creation operation, keep existing _id values of documents embedded within the one being
1190
+ * created instead of generating new ones.
1191
+ * @defaultValue `true`
1192
+ */
1193
+ keepEmbeddedIds?: boolean | undefined;
1194
+
1195
+ /**
1196
+ * Create a temporary document which is not saved to the database. Only used during creation.
1197
+ * @defaultValue `false`
1198
+ */
1199
+ temporary?: boolean | undefined;
1200
+
1201
+ /**
1202
+ * Automatically re-render existing applications associated with the document.
1203
+ * @defaultValue `true`
1204
+ */
1205
+ render?: boolean | undefined;
1206
+
1207
+ /**
1208
+ * Automatically create and render the Document sheet when the Document is first created.
1209
+ * @defaultValue `false`
1210
+ */
1211
+ renderSheet?: boolean | undefined;
1212
+
1213
+ /**
1214
+ * Difference each update object against current Document data to reduce the size of the transferred data. Only
1215
+ * used during update.
1216
+ * @defaultValue `true`
1217
+ */
1218
+ diff?: boolean | undefined;
1219
+
1220
+ /**
1221
+ * Merge objects recursively. If false, inner objects will be replaced explicitly. Use with caution!
1222
+ * @defaultValue `true`
1223
+ */
1224
+ recursive?: boolean | undefined;
1225
+
1226
+ /**
1227
+ * Is the operation undoing a previous operation, only used by embedded Documents within a Scene
1228
+ */
1229
+ isUndo?: boolean | undefined;
1230
+
1231
+ /**
1232
+ * Whether to delete all documents of a given type, regardless of the array of ids provided. Only used during a
1233
+ * delete operation.
1234
+ */
1235
+ deleteAll?: boolean | undefined;
1236
+ }
1237
+
1238
+ type ModificationOptions = Omit<Document.ModificationContext<Document.Any | null>, "parent" | "pack">;
1239
+
1240
+ type PreCreateOptions<Name extends Type> = Omit<
1241
+ DatabaseOperationsFor<Name, "create">,
1242
+ "data" | "noHook" | "pack" | "parent"
1243
+ >;
1244
+ type OnCreateOptions<Name extends Type> = Omit<
1245
+ DatabaseOperationsFor<Name, "create">,
1246
+ "pack" | "parentUuid" | "syntheticActorUpdate"
1247
+ >;
1248
+
1249
+ type PreUpdateOptions<Name extends Type> = Omit<
1250
+ DatabaseOperationsFor<Name, "update">,
1251
+ "updates" | "restoreDelta" | "noHook" | "parent" | "pack"
1252
+ >;
1253
+ type OnUpdateOptions<Name extends Type> = Omit<
1254
+ DatabaseOperationsFor<Name, "update">,
1255
+ "pack" | "parentUuid" | "syntheticActorUpdate"
1256
+ >;
1257
+
1258
+ type PreDeleteOptions<Name extends Type> = Omit<
1259
+ DatabaseOperationsFor<Name, "delete">,
1260
+ "ids" | "deleteAll" | "noHook" | "pack" | "parent"
1261
+ >;
1262
+ type OnDeleteOptions<Name extends Type> = Omit<
1263
+ DatabaseOperationsFor<Name, "delete">,
1264
+ "deleteAll" | "pack" | "parentUuid" | "syntheticActorUpdate"
1265
+ >;
1266
+
1267
+ type PreUpsertOptions<Name extends Type> = PreCreateOptions<Name> | PreUpdateOptions<Name>;
1268
+ type OnUpsertOptions<Name extends Type> = OnCreateOptions<Name> | OnUpdateOptions<Name>;
1269
+
1270
+ interface Metadata<ConcreteDocument extends Document.Any> {
1271
+ name: Document.Type;
1272
+ collection: string;
1273
+ indexed?: boolean | undefined;
1274
+ compendiumIndexFields?: string[] | undefined;
1275
+ label: string;
1276
+ coreTypes?: readonly string[] | undefined;
1277
+ embedded: Record<string, string>;
1278
+ permissions: {
1279
+ create:
1280
+ | string
1281
+ | ((
1282
+ user: foundry.documents.BaseUser,
1283
+ doc: ConcreteDocument,
1284
+ data: fields.SchemaField.InnerAssignmentType<ConcreteDocument["schema"]["fields"]>,
1285
+ ) => boolean);
1286
+ update:
1287
+ | string
1288
+ | ((
1289
+ user: foundry.documents.BaseUser,
1290
+ doc: ConcreteDocument,
1291
+ data: fields.SchemaField.InnerAssignmentType<ConcreteDocument["schema"]["fields"]>,
1292
+ ) => boolean);
1293
+ delete: string | ((user: foundry.documents.BaseUser, doc: ConcreteDocument, data: EmptyObject) => boolean);
1294
+ };
1295
+ preserveOnImport?: string[];
1296
+ schemaVersion: string | undefined;
1297
+ labelPlural: string; // This is not set for the Document class but every class that implements Document actually provides it.
1298
+ types: readonly string[];
1299
+ hasSystemData: boolean;
1300
+ pack: any;
1301
+ }
1302
+
1303
+ namespace Metadata {
1304
+ type Any = Metadata<any>;
1305
+
1306
+ export interface Default {
1307
+ name: "Document";
1308
+ collection: "documents";
1309
+ label: "DOCUMENT.Document";
1310
+ types: [];
1311
+ embedded: EmptyObject;
1312
+ hasSystemData: false;
1313
+ permissions: {
1314
+ create: "ASSISTANT";
1315
+ update: "ASSISTANT";
1316
+ delete: "ASSISTANT";
1317
+ };
1318
+ pack: null;
1319
+ }
1320
+ }
1321
+ }
1322
+
1323
+ export type Operation = "create" | "update" | "delete";
1324
+
1325
+ /* eslint-disable @typescript-eslint/no-empty-object-type */
1326
+ export interface DocumentDatabaseOperations<
1327
+ T extends Document.Internal.Instance.Any = Document.Internal.Instance.Any,
1328
+ ExtraCreateOptions extends AnyObject = {},
1329
+ ExtraUpdateOptions extends AnyObject = {},
1330
+ ExtraDeleteOptions extends AnyObject = {},
1331
+ > {
1332
+ create: DatabaseCreateOperation<T> & InexactPartial<ExtraCreateOptions>;
1333
+ update: DatabaseUpdateOperation<T> & InexactPartial<ExtraUpdateOptions>;
1334
+ delete: DatabaseDeleteOperation & InexactPartial<ExtraDeleteOptions>;
1335
+ }
1336
+ /* eslint-enable @typescript-eslint/no-empty-object-type */
1337
+
1338
+ export interface DatabaseOperationMap {
1339
+ ActiveEffect: ActiveEffect.DatabaseOperations;
1340
+ Actor: Actor.DatabaseOperations;
1341
+ ActorDelta: ActorDelta.DatabaseOperations;
1342
+ Adventure: Adventure.DatabaseOperations;
1343
+ AmbientLight: AmbientLightDocument.DatabaseOperations;
1344
+ AmbientSound: AmbientSoundDocument.DatabaseOperations;
1345
+ Card: Card.DatabaseOperations;
1346
+ Cards: Cards.DatabaseOperations;
1347
+ ChatMessage: ChatMessage.DatabaseOperations;
1348
+ Combat: Combat.DatabaseOperations;
1349
+ Combatant: Combatant.DatabaseOperations;
1350
+ Drawing: DrawingDocument.DatabaseOperations;
1351
+ FogExploration: FogExploration.DatabaseOperations;
1352
+ Folder: Folder.DatabaseOperations;
1353
+ Item: Item.DatabaseOperations;
1354
+ JournalEntry: JournalEntry.DatabaseOperations;
1355
+ JournalEntryPage: JournalEntryPage.DatabaseOperations;
1356
+ Macro: Macro.DatabaseOperations;
1357
+ MeasuredTemplate: MeasuredTemplateDocument.DatabaseOperations;
1358
+ Note: NoteDocument.DatabaseOperations;
1359
+ Playlist: Playlist.DatabaseOperations;
1360
+ PlaylistSound: PlaylistSound.DatabaseOperations;
1361
+ // TODO: Add these once documents are done
1362
+ // Region: ActiveEffect.DatabaseOperations;
1363
+ // RegionBehavior: ActiveEffect.DatabaseOperations;
1364
+ RollTable: RollTable.DatabaseOperations;
1365
+ Scene: Scene.DatabaseOperations;
1366
+ Setting: Setting.DatabaseOperations;
1367
+ TableResult: TableResult.DatabaseOperations;
1368
+ Tile: TileDocument.DatabaseOperations;
1369
+ Token: TokenDocument.DatabaseOperations;
1370
+ User: User.DatabaseOperations;
1371
+ Wall: WallDocument.DatabaseOperations;
1372
+ }