@league-of-foundry-developers/foundry-vtt-types 12.331.4-beta → 12.331.5

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 (377) hide show
  1. package/package.json +18 -1
  2. package/src/configuration/configuration.d.mts +1 -1
  3. package/src/foundry/client/apps/app.d.mts +1 -1
  4. package/src/foundry/client/apps/av/av-config.d.mts +1 -1
  5. package/src/foundry/client/apps/av/cameras.d.mts +1 -1
  6. package/src/foundry/client/apps/dice/dice-config.d.mts +1 -1
  7. package/src/foundry/client/apps/form.d.mts +1 -1
  8. package/src/foundry/client/apps/forms/actor.d.mts +1 -1
  9. package/src/foundry/client/apps/forms/adventure-exporter.d.mts +1 -1
  10. package/src/foundry/client/apps/forms/adventure-importer.d.mts +1 -1
  11. package/src/foundry/client/apps/forms/base-sheet.d.mts +1 -1
  12. package/src/foundry/client/apps/forms/card-config.d.mts +1 -1
  13. package/src/foundry/client/apps/forms/cards-config.d.mts +1 -1
  14. package/src/foundry/client/apps/forms/combat-config.d.mts +1 -1
  15. package/src/foundry/client/apps/forms/effect-config.d.mts +1 -1
  16. package/src/foundry/client/apps/forms/folder-config.d.mts +7 -2
  17. package/src/foundry/client/apps/forms/fonts.d.mts +1 -1
  18. package/src/foundry/client/apps/forms/grid-config.d.mts +1 -1
  19. package/src/foundry/client/apps/forms/image-popout.d.mts +1 -1
  20. package/src/foundry/client/apps/forms/item.d.mts +1 -1
  21. package/src/foundry/client/apps/forms/journal-page-sheet.d.mts +1 -1
  22. package/src/foundry/client/apps/forms/journal-sheet.d.mts +1 -1
  23. package/src/foundry/client/apps/forms/macro-config.d.mts +1 -1
  24. package/src/foundry/client/apps/forms/measure-template.d.mts +1 -1
  25. package/src/foundry/client/apps/forms/ownership.d.mts +1 -1
  26. package/src/foundry/client/apps/forms/playlist-config.d.mts +1 -1
  27. package/src/foundry/client/apps/forms/playlist-sound-config.d.mts +1 -1
  28. package/src/foundry/client/apps/forms/roll-table-config.d.mts +1 -1
  29. package/src/foundry/client/apps/forms/scene-config.d.mts +1 -1
  30. package/src/foundry/client/apps/forms/sheet-config.d.mts +1 -1
  31. package/src/foundry/client/apps/forms/user-config.d.mts +1 -1
  32. package/src/foundry/client/apps/hud/chatbubble.d.mts +1 -1
  33. package/src/foundry/client/apps/hud/container.d.mts +1 -1
  34. package/src/foundry/client/apps/hud/controls.d.mts +1 -1
  35. package/src/foundry/client/apps/hud/hotbar.d.mts +1 -1
  36. package/src/foundry/client/apps/hud/hud.d.mts +1 -1
  37. package/src/foundry/client/apps/hud/menu.d.mts +1 -1
  38. package/src/foundry/client/apps/hud/navigation.d.mts +1 -1
  39. package/src/foundry/client/apps/hud/pause.d.mts +1 -1
  40. package/src/foundry/client/apps/hud/players.d.mts +1 -1
  41. package/src/foundry/client/apps/placeables/drawing-config.d.mts +1 -1
  42. package/src/foundry/client/apps/placeables/drawing-hud.d.mts +1 -1
  43. package/src/foundry/client/apps/placeables/note-config.d.mts +1 -1
  44. package/src/foundry/client/apps/placeables/tile-config.d.mts +1 -1
  45. package/src/foundry/client/apps/placeables/tile-hud.d.mts +1 -1
  46. package/src/foundry/client/apps/placeables/token-config.d.mts +1 -1
  47. package/src/foundry/client/apps/placeables/token-hud.d.mts +1 -1
  48. package/src/foundry/client/apps/placeables/wall-config.d.mts +1 -1
  49. package/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts +1 -1
  50. package/src/foundry/client/apps/sidebar/apps/module-management.d.mts +1 -1
  51. package/src/foundry/client/apps/sidebar/apps/support-details.d.mts +1 -1
  52. package/src/foundry/client/apps/sidebar/apps/tours-management.d.mts +1 -1
  53. package/src/foundry/client/apps/sidebar/apps/world-config.d.mts +1 -1
  54. package/src/foundry/client/apps/sidebar/directory-tab-mixin.d.mts +1 -1
  55. package/src/foundry/client/apps/sidebar/package-configuration.d.mts +1 -1
  56. package/src/foundry/client/apps/sidebar/sidebar.d.mts +1 -1
  57. package/src/foundry/client/apps/sidebar/tabs/actors-directory.d.mts +1 -1
  58. package/src/foundry/client/apps/sidebar/tabs/cards-directory.d.mts +1 -1
  59. package/src/foundry/client/apps/sidebar/tabs/chat-log.d.mts +1 -1
  60. package/src/foundry/client/apps/sidebar/tabs/combat-tracker.d.mts +1 -1
  61. package/src/foundry/client/apps/sidebar/tabs/compendium-directory.d.mts +1 -1
  62. package/src/foundry/client/apps/sidebar/tabs/items-directory.d.mts +1 -1
  63. package/src/foundry/client/apps/sidebar/tabs/journal-directory.d.mts +1 -1
  64. package/src/foundry/client/apps/sidebar/tabs/macros-directory.d.mts +1 -1
  65. package/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts +1 -1
  66. package/src/foundry/client/apps/sidebar/tabs/roll-table-directory.d.mts +1 -1
  67. package/src/foundry/client/apps/sidebar/tabs/scenes-directory.d.mts +1 -1
  68. package/src/foundry/client/apps/sidebar/tabs/settings.d.mts +1 -1
  69. package/src/foundry/client/av/client.d.mts +1 -1
  70. package/src/foundry/client/av/clients/simplepeer.d.mts +1 -1
  71. package/src/foundry/client/av/master.d.mts +1 -1
  72. package/src/foundry/client/av/settings.d.mts +1 -1
  73. package/src/foundry/client/config.d.mts +1 -1
  74. package/src/foundry/client/core/hooks.d.mts +1 -1
  75. package/src/foundry/client/core/image.d.mts +1 -1
  76. package/src/foundry/client/core/keybindings.d.mts +1 -1
  77. package/src/foundry/client/core/packages.d.mts +4 -2
  78. package/src/foundry/client/core/settings.d.mts +1 -1
  79. package/src/foundry/client/core/socket.d.mts +1 -1
  80. package/src/foundry/client/core/tooltip.d.mts +1 -1
  81. package/src/foundry/client/core/tour.d.mts +1 -1
  82. package/src/foundry/client/core/utils.d.mts +1 -1
  83. package/src/foundry/client/core/workers.d.mts +1 -1
  84. package/src/foundry/client/data/abstract/canvas-document.d.mts +9 -20
  85. package/src/foundry/client/data/abstract/client-document.d.mts +133 -71
  86. package/src/foundry/client/data/abstract/directory-collection-mixin.d.mts +2 -2
  87. package/src/foundry/client/data/abstract/document-collection.d.mts +1 -1
  88. package/src/foundry/client/data/abstract/world-collection.d.mts +8 -1
  89. package/src/foundry/client/data/collections/actors.d.mts +1 -1
  90. package/src/foundry/client/data/collections/cards.d.mts +1 -1
  91. package/src/foundry/client/data/collections/combats.d.mts +1 -1
  92. package/src/foundry/client/data/collections/compendium-collection.d.mts +5 -4
  93. package/src/foundry/client/data/collections/fog.d.mts +1 -1
  94. package/src/foundry/client/data/collections/folder.d.mts +1 -1
  95. package/src/foundry/client/data/collections/items.d.mts +1 -1
  96. package/src/foundry/client/data/collections/journal.d.mts +1 -1
  97. package/src/foundry/client/data/collections/macros.d.mts +1 -1
  98. package/src/foundry/client/data/collections/messages.d.mts +1 -1
  99. package/src/foundry/client/data/collections/playlists.d.mts +1 -1
  100. package/src/foundry/client/data/collections/scenes.d.mts +1 -1
  101. package/src/foundry/client/data/collections/settings.d.mts +1 -1
  102. package/src/foundry/client/data/collections/tables.d.mts +1 -1
  103. package/src/foundry/client/data/collections/users.d.mts +4 -4
  104. package/src/foundry/client/data/documents/active-effect.d.mts +124 -48
  105. package/src/foundry/client/data/documents/actor-delta.d.mts +53 -22
  106. package/src/foundry/client/data/documents/actor.d.mts +147 -93
  107. package/src/foundry/client/data/documents/adventure.d.mts +74 -45
  108. package/src/foundry/client/data/documents/ambient-light.d.mts +13 -10
  109. package/src/foundry/client/data/documents/ambient-sound.d.mts +12 -7
  110. package/src/foundry/client/data/documents/card.d.mts +57 -34
  111. package/src/foundry/client/data/documents/cards.d.mts +171 -135
  112. package/src/foundry/client/data/documents/chat-message.d.mts +131 -72
  113. package/src/foundry/client/data/documents/combat.d.mts +80 -60
  114. package/src/foundry/client/data/documents/combatant.d.mts +53 -20
  115. package/src/foundry/client/data/documents/drawing.d.mts +12 -7
  116. package/src/foundry/client/data/documents/fog-exploration.d.mts +57 -17
  117. package/src/foundry/client/data/documents/folder.d.mts +114 -31
  118. package/src/foundry/client/data/documents/item.d.mts +31 -21
  119. package/src/foundry/client/data/documents/journal-entry-page.d.mts +90 -57
  120. package/src/foundry/client/data/documents/journal-entry.d.mts +29 -34
  121. package/src/foundry/client/data/documents/macro.d.mts +60 -34
  122. package/src/foundry/client/data/documents/measured-template.d.mts +13 -8
  123. package/src/foundry/client/data/documents/note.d.mts +14 -7
  124. package/src/foundry/client/data/documents/playlist-sound.d.mts +29 -33
  125. package/src/foundry/client/data/documents/playlist.d.mts +74 -54
  126. package/src/foundry/client/data/documents/region-behavior.d.mts +16 -7
  127. package/src/foundry/client/data/documents/region.d.mts +53 -48
  128. package/src/foundry/client/data/documents/scene.d.mts +310 -89
  129. package/src/foundry/client/data/documents/setting.d.mts +24 -23
  130. package/src/foundry/client/data/documents/table-result.d.mts +20 -8
  131. package/src/foundry/client/data/documents/table.d.mts +19 -13
  132. package/src/foundry/client/data/documents/tile.d.mts +13 -7
  133. package/src/foundry/client/data/documents/token.d.mts +148 -117
  134. package/src/foundry/client/data/documents/user.d.mts +141 -53
  135. package/src/foundry/client/data/documents/wall.d.mts +17 -10
  136. package/src/foundry/client/game.d.mts +1 -1
  137. package/src/foundry/client/head.d.mts +1 -1
  138. package/src/foundry/client/hooks.d.mts +9 -18
  139. package/src/foundry/client/pixi/board.d.mts +3 -2
  140. package/src/foundry/client/pixi/core/containers/base-canvas-group.d.mts +1 -1
  141. package/src/foundry/client/pixi/core/containers/cached-container.d.mts +1 -1
  142. package/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts +1 -1
  143. package/src/foundry/client/pixi/core/containers/point-source-mesh.d.mts +1 -1
  144. package/src/foundry/client/pixi/core/containers/quad-mesh.d.mts +1 -1
  145. package/src/foundry/client/pixi/core/containers/quadtree.d.mts +1 -1
  146. package/src/foundry/client/pixi/core/containers/sprite-mesh.d.mts +1 -1
  147. package/src/foundry/client/pixi/core/containers/unbound-container.d.mts +1 -1
  148. package/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts +1 -1
  149. package/src/foundry/client/pixi/core/interaction/control-icon.d.mts +1 -1
  150. package/src/foundry/client/pixi/core/interaction/mouse-handler.d.mts +1 -1
  151. package/src/foundry/client/pixi/core/interaction/ping.d.mts +1 -1
  152. package/src/foundry/client/pixi/core/interaction/pings/pulse.d.mts +1 -1
  153. package/src/foundry/client/pixi/core/interaction/render-flags.d.mts +1 -8
  154. package/src/foundry/client/pixi/core/interaction/resize-handle.d.mts +1 -1
  155. package/src/foundry/client/pixi/core/interaction/targets.d.mts +1 -1
  156. package/src/foundry/client/pixi/core/loader.d.mts +1 -1
  157. package/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts +1 -1
  158. package/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts +1 -1
  159. package/src/foundry/client/pixi/core/shapes/precise-text.d.mts +1 -1
  160. package/src/foundry/client/pixi/core/shapes/ray.d.mts +1 -1
  161. package/src/foundry/client/pixi/core/shapes/source-polygon.d.mts +1 -1
  162. package/src/foundry/client/pixi/extensions/circle.d.mts +1 -1
  163. package/src/foundry/client/pixi/extensions/observable-transform.d.mts +1 -1
  164. package/src/foundry/client/pixi/extensions/polygon.d.mts +1 -1
  165. package/src/foundry/client/pixi/extensions/rectangle.d.mts +1 -1
  166. package/src/foundry/client/pixi/groups/effects.d.mts +1 -1
  167. package/src/foundry/client/pixi/groups/environment.d.mts +1 -1
  168. package/src/foundry/client/pixi/groups/hidden.d.mts +1 -1
  169. package/src/foundry/client/pixi/groups/interface.d.mts +1 -1
  170. package/src/foundry/client/pixi/groups/overlay.d.mts +1 -1
  171. package/src/foundry/client/pixi/groups/primary.d.mts +1 -1
  172. package/src/foundry/client/pixi/groups/rendered.d.mts +1 -1
  173. package/src/foundry/client/pixi/layers/base/canvas-layer.d.mts +1 -1
  174. package/src/foundry/client/pixi/layers/base/interaction-layer.d.mts +1 -1
  175. package/src/foundry/client/pixi/layers/base/placeables-layer.d.mts +1 -1
  176. package/src/foundry/client/pixi/layers/controls/cursor.d.mts +1 -1
  177. package/src/foundry/client/pixi/layers/controls/door.d.mts +1 -1
  178. package/src/foundry/client/pixi/layers/controls/layer.d.mts +1 -1
  179. package/src/foundry/client/pixi/layers/controls/ruler.d.mts +1 -1
  180. package/src/foundry/client/pixi/layers/effects/background-effects.d.mts +1 -1
  181. package/src/foundry/client/pixi/layers/effects/coloration-effects.d.mts +1 -1
  182. package/src/foundry/client/pixi/layers/effects/darkness-effects.d.mts +1 -1
  183. package/src/foundry/client/pixi/layers/effects/illumination-effects.d.mts +1 -1
  184. package/src/foundry/client/pixi/layers/effects/visibility.d.mts +1 -1
  185. package/src/foundry/client/pixi/layers/effects/weather/particles/effect.d.mts +1 -1
  186. package/src/foundry/client/pixi/layers/effects/weather/particles/leaves.d.mts +1 -1
  187. package/src/foundry/client/pixi/layers/effects/weather-effects.d.mts +1 -1
  188. package/src/foundry/client/pixi/layers/grid/highlight.d.mts +1 -1
  189. package/src/foundry/client/pixi/layers/grid/layer.d.mts +1 -1
  190. package/src/foundry/client/pixi/layers/grid/mesh.d.mts +1 -1
  191. package/src/foundry/client/pixi/layers/masks/depth.d.mts +1 -1
  192. package/src/foundry/client/pixi/layers/masks/occlusion.d.mts +1 -1
  193. package/src/foundry/client/pixi/layers/masks/vision.d.mts +1 -1
  194. package/src/foundry/client/pixi/layers/placeables/drawings.d.mts +1 -1
  195. package/src/foundry/client/pixi/layers/placeables/lighting.d.mts +1 -1
  196. package/src/foundry/client/pixi/layers/placeables/notes.d.mts +1 -1
  197. package/src/foundry/client/pixi/layers/placeables/regions.d.mts +1 -1
  198. package/src/foundry/client/pixi/layers/placeables/sounds.d.mts +1 -1
  199. package/src/foundry/client/pixi/layers/placeables/templates.d.mts +1 -1
  200. package/src/foundry/client/pixi/layers/placeables/tiles.d.mts +1 -1
  201. package/src/foundry/client/pixi/layers/placeables/tokens.d.mts +1 -1
  202. package/src/foundry/client/pixi/layers/placeables/walls.d.mts +1 -1
  203. package/src/foundry/client/pixi/perception/clockwise-sweep.d.mts +1 -1
  204. package/src/foundry/client/pixi/perception/detection-mode.d.mts +1 -1
  205. package/src/foundry/client/pixi/perception/fog.d.mts +1 -1
  206. package/src/foundry/client/pixi/perception/perception-manager.d.mts +1 -1
  207. package/src/foundry/client/pixi/perception/vision-mode.d.mts +1 -1
  208. package/src/foundry/client/pixi/perception/weiler-atherton-clipping.d.mts +1 -1
  209. package/src/foundry/client/pixi/placeable.d.mts +2 -1
  210. package/src/foundry/client/pixi/placeables/drawing.d.mts +1 -1
  211. package/src/foundry/client/pixi/placeables/light.d.mts +1 -7
  212. package/src/foundry/client/pixi/placeables/note.d.mts +1 -1
  213. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-canvas-object.d.mts +1 -1
  214. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-graphics.d.mts +1 -1
  215. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-occludable-object.d.mts +1 -1
  216. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.d.mts +1 -1
  217. package/src/foundry/client/pixi/placeables/region.d.mts +1 -1
  218. package/src/foundry/client/pixi/placeables/sound.d.mts +1 -1
  219. package/src/foundry/client/pixi/placeables/template.d.mts +1 -1
  220. package/src/foundry/client/pixi/placeables/tile.d.mts +1 -1
  221. package/src/foundry/client/pixi/placeables/token.d.mts +1 -1
  222. package/src/foundry/client/pixi/placeables/wall.d.mts +1 -1
  223. package/src/foundry/client/pixi/webgl/extensions/batch-renderer.d.mts +1 -1
  224. package/src/foundry/client/pixi/webgl/extensions/batch-shader-generator.d.mts +1 -1
  225. package/src/foundry/client/pixi/webgl/helpers/framebuffer-snapshot.d.mts +1 -1
  226. package/src/foundry/client/pixi/webgl/helpers/smooth-noise.d.mts +1 -1
  227. package/src/foundry/client/pixi/webgl/helpers/texture-extractor.d.mts +1 -1
  228. package/src/foundry/client/pixi/webgl/shaders/base-shader-mixin.d.mts +1 -1
  229. package/src/foundry/client/pixi/webgl/shaders/base-shader.d.mts +1 -1
  230. package/src/foundry/client/pixi/webgl/shaders/filters/base-filter.d.mts +1 -1
  231. package/src/foundry/client/pixi/webgl/shaders/filters/effects-masking.d.mts +1 -1
  232. package/src/foundry/client/pixi/webgl/shaders/filters/glow-overlay.d.mts +1 -1
  233. package/src/foundry/client/pixi/webgl/shaders/filters/outline-overlay.d.mts +1 -1
  234. package/src/foundry/client/pixi/webgl/shaders/filters/transition.d.mts +1 -1
  235. package/src/foundry/client/pixi/webgl/shaders/filters/visibility.d.mts +1 -1
  236. package/src/foundry/client/pixi/webgl/shaders/filters/vision-mask-filter.d.mts +1 -1
  237. package/src/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.d.mts +1 -1
  238. package/src/foundry/client/pixi/webgl/shaders/grid/grid.d.mts +1 -1
  239. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/fairy-light.d.mts +1 -1
  240. package/src/foundry/client/pixi/webgl/shaders/samplers/base-sampler.d.mts +1 -1
  241. package/src/foundry/client/pixi/webgl/shaders/samplers/token-ring.d.mts +1 -1
  242. package/src/foundry/client/pixi/webgl/shaders/weather/base-weather.d.mts +1 -1
  243. package/src/foundry/client/pixi/webgl/shaders/weather/effect.d.mts +1 -1
  244. package/src/foundry/client/pixi/workers/texture-worker.d.mts +1 -1
  245. package/src/foundry/client/ui/context.d.mts +1 -1
  246. package/src/foundry/client/ui/dialog.d.mts +1 -1
  247. package/src/foundry/client/ui/dragdrop.d.mts +1 -1
  248. package/src/foundry/client/ui/editor.d.mts +1 -1
  249. package/src/foundry/client/ui/filepicker.d.mts +1 -1
  250. package/src/foundry/client/ui/filter.d.mts +1 -1
  251. package/src/foundry/client-esm/applications/api/application.d.mts +1 -9
  252. package/src/foundry/client-esm/applications/api/dialog.d.mts +1 -1
  253. package/src/foundry/client-esm/applications/api/document-sheet.d.mts +1 -1
  254. package/src/foundry/client-esm/applications/api/handlebars-application.d.mts +1 -1
  255. package/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts +1 -1
  256. package/src/foundry/client-esm/applications/apps/permission-config.d.mts +1 -1
  257. package/src/foundry/client-esm/applications/dice/roll-resolver.d.mts +1 -1
  258. package/src/foundry/client-esm/applications/forms/fields.d.mts +1 -1
  259. package/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts +1 -1
  260. package/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts +1 -1
  261. package/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts +1 -1
  262. package/src/foundry/client-esm/applications/sheets/item-sheet.d.mts +1 -1
  263. package/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts +1 -1
  264. package/src/foundry/client-esm/applications/sheets/region-config.d.mts +1 -1
  265. package/src/foundry/client-esm/applications/sheets/user-config.d.mts +1 -1
  266. package/src/foundry/client-esm/applications/ui/region-legend.d.mts +1 -1
  267. package/src/foundry/client-esm/audio/biquad.d.mts +1 -1
  268. package/src/foundry/client-esm/audio/convolver.d.mts +1 -1
  269. package/src/foundry/client-esm/audio/helper.d.mts +1 -1
  270. package/src/foundry/client-esm/audio/sound.d.mts +2 -2
  271. package/src/foundry/client-esm/canvas/edges/collision.d.mts +1 -1
  272. package/src/foundry/client-esm/canvas/edges/edge.d.mts +1 -1
  273. package/src/foundry/client-esm/canvas/edges/vertex.d.mts +1 -1
  274. package/src/foundry/client-esm/canvas/scene-manager.d.mts +1 -1
  275. package/src/foundry/client-esm/canvas/smaa/smaa.d.mts +1 -1
  276. package/src/foundry/client-esm/canvas/sources/base-effect-source.d.mts +1 -1
  277. package/src/foundry/client-esm/canvas/sources/base-light-source.d.mts +1 -1
  278. package/src/foundry/client-esm/canvas/sources/global-light-source.d.mts +1 -1
  279. package/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts +1 -1
  280. package/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts +1 -1
  281. package/src/foundry/client-esm/canvas/sources/point-light-source.d.mts +1 -1
  282. package/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts +1 -1
  283. package/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts +1 -1
  284. package/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts +1 -1
  285. package/src/foundry/client-esm/canvas/tokens/ring-data.d.mts +3 -2
  286. package/src/foundry/client-esm/canvas/tokens/ring.d.mts +1 -1
  287. package/src/foundry/client-esm/data/client-backend.d.mts +1 -1
  288. package/src/foundry/client-esm/data/region-behaviors/adjust-darkness-level.d.mts +4 -5
  289. package/src/foundry/client-esm/data/region-behaviors/base.d.mts +1 -1
  290. package/src/foundry/client-esm/data/region-behaviors/display-scrolling-text.d.mts +1 -1
  291. package/src/foundry/client-esm/data/region-behaviors/toggle-behavior.d.mts +4 -4
  292. package/src/foundry/client-esm/dice/roll.d.mts +5 -8
  293. package/src/foundry/client-esm/dice/terms/coin.d.mts +1 -1
  294. package/src/foundry/client-esm/dice/terms/dice.d.mts +1 -1
  295. package/src/foundry/client-esm/dice/terms/die.d.mts +1 -1
  296. package/src/foundry/client-esm/dice/terms/fate.d.mts +1 -1
  297. package/src/foundry/client-esm/dice/terms/function.d.mts +1 -1
  298. package/src/foundry/client-esm/dice/terms/numeric.d.mts +1 -1
  299. package/src/foundry/client-esm/dice/terms/operator.d.mts +1 -1
  300. package/src/foundry/client-esm/dice/terms/parenthetical.d.mts +1 -1
  301. package/src/foundry/client-esm/dice/terms/pool.d.mts +1 -1
  302. package/src/foundry/client-esm/dice/terms/string.d.mts +1 -1
  303. package/src/foundry/client-esm/dice/terms/term.d.mts +1 -1
  304. package/src/foundry/common/abstract/backend.d.mts +1 -1
  305. package/src/foundry/common/abstract/data.d.mts +197 -146
  306. package/src/foundry/common/abstract/document.d.mts +198 -81
  307. package/src/foundry/common/abstract/embedded-collection-delta.d.mts +1 -1
  308. package/src/foundry/common/abstract/embedded-collection.d.mts +1 -1
  309. package/src/foundry/common/abstract/socket.d.mts +1 -1
  310. package/src/foundry/common/abstract/type-data.d.mts +4 -1
  311. package/src/foundry/common/config.d.mts +7 -1
  312. package/src/foundry/common/constants.d.mts +1 -1
  313. package/src/foundry/common/data/data.d.mts +42 -12
  314. package/src/foundry/common/data/fields.d.mts +656 -252
  315. package/src/foundry/common/documents/_types.d.mts +0 -6
  316. package/src/foundry/common/documents/active-effect.d.mts +116 -53
  317. package/src/foundry/common/documents/actor-delta.d.mts +139 -58
  318. package/src/foundry/common/documents/actor.d.mts +105 -51
  319. package/src/foundry/common/documents/adventure.d.mts +84 -39
  320. package/src/foundry/common/documents/ambient-light.d.mts +66 -38
  321. package/src/foundry/common/documents/ambient-sound.d.mts +66 -38
  322. package/src/foundry/common/documents/card.d.mts +100 -59
  323. package/src/foundry/common/documents/cards.d.mts +97 -42
  324. package/src/foundry/common/documents/chat-message.d.mts +105 -52
  325. package/src/foundry/common/documents/combat.d.mts +101 -48
  326. package/src/foundry/common/documents/combatant.d.mts +94 -50
  327. package/src/foundry/common/documents/drawing.d.mts +87 -46
  328. package/src/foundry/common/documents/fog-exploration.d.mts +87 -41
  329. package/src/foundry/common/documents/folder.d.mts +100 -46
  330. package/src/foundry/common/documents/item.d.mts +116 -45
  331. package/src/foundry/common/documents/journal-entry-page.d.mts +90 -40
  332. package/src/foundry/common/documents/journal-entry.d.mts +90 -39
  333. package/src/foundry/common/documents/macro.d.mts +116 -52
  334. package/src/foundry/common/documents/measured-template.d.mts +80 -44
  335. package/src/foundry/common/documents/note.d.mts +75 -39
  336. package/src/foundry/common/documents/playlist-sound.d.mts +88 -47
  337. package/src/foundry/common/documents/playlist.d.mts +101 -50
  338. package/src/foundry/common/documents/region-behavior.d.mts +71 -40
  339. package/src/foundry/common/documents/region.d.mts +68 -40
  340. package/src/foundry/common/documents/roll-table.d.mts +43 -9
  341. package/src/foundry/common/documents/scene.d.mts +190 -43
  342. package/src/foundry/common/documents/setting.d.mts +98 -42
  343. package/src/foundry/common/documents/table-result.d.mts +98 -48
  344. package/src/foundry/common/documents/tile.d.mts +77 -43
  345. package/src/foundry/common/documents/token.d.mts +95 -52
  346. package/src/foundry/common/documents/user.d.mts +100 -89
  347. package/src/foundry/common/documents/wall.d.mts +47 -17
  348. package/src/foundry/common/grid/base.d.mts +1 -1
  349. package/src/foundry/common/grid/gridless.d.mts +1 -1
  350. package/src/foundry/common/grid/hexagonal.d.mts +1 -1
  351. package/src/foundry/common/grid/square.d.mts +1 -1
  352. package/src/foundry/common/packages/base-package.d.mts +37 -14
  353. package/src/foundry/common/packages/base-system.d.mts +39 -0
  354. package/src/foundry/common/packages/base-world.d.mts +8 -1
  355. package/src/foundry/common/packages/sub-types.d.mts +3 -5
  356. package/src/foundry/common/primitives/array.d.mts +1 -1
  357. package/src/foundry/common/primitives/string.d.mts +1 -1
  358. package/src/foundry/common/prosemirror/dirty-plugin.d.mts +1 -1
  359. package/src/foundry/common/prosemirror/dom-parser.d.mts +1 -1
  360. package/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts +1 -1
  361. package/src/foundry/common/prosemirror/image-plugin.d.mts +1 -1
  362. package/src/foundry/common/prosemirror/paste-transformer.d.mts +1 -1
  363. package/src/foundry/common/prosemirror/plugin.d.mts +1 -1
  364. package/src/foundry/common/types.d.mts +1 -1
  365. package/src/foundry/common/utils/bitmask.d.mts +1 -1
  366. package/src/foundry/common/utils/collection.d.mts +1 -1
  367. package/src/foundry/common/utils/event-emitter.d.mts +1 -1
  368. package/src/foundry/common/utils/helpers.d.mts +1 -1
  369. package/src/foundry/public/scripts/clipper/clipper.d.mts +1 -1
  370. package/src/types/augments/particles.d.mts +1 -1
  371. package/src/types/augments/pixi.d.mts +1 -1
  372. package/src/types/augments/smooth.d.mts +1 -1
  373. package/src/types/augments/tinyMCE.d.mts +1 -1
  374. package/src/types/config.d.mts +2 -5
  375. package/src/types/documentConfiguration.d.mts +1 -1
  376. package/src/types/lib.d.mts +1 -1
  377. package/src/types/workers/image-compressor.d.mts +1 -1
@@ -1,4 +1,4 @@
1
- import type { AnyMutableObject, AnyObject, InexactPartial } from "fvtt-types/utils";
1
+ import type { AnyMutableObject } from "#utils";
2
2
  import type { DataModel } from "../abstract/data.d.mts";
3
3
  import type Document from "../abstract/document.mts";
4
4
  import type * as CONST from "../constants.mts";
@@ -53,46 +53,58 @@ declare abstract class BaseToken extends Document<"Token", BaseToken.Schema, any
53
53
 
54
54
  /**
55
55
  * The default icon used for newly created Token documents
56
- * @defaultValue `CONST.DEFAULT_TOKEN` (`"icons/svg/mystery-man.svg"`)
56
+ * @defaultValue `CONST.DEFAULT_TOKEN`
57
57
  */
58
58
  static DEFAULT_ICON: string;
59
59
 
60
+ /**
61
+ * @remarks If `this.actor`, uses {@link Actor.testUserPermission | `this.actor.testUserPermission`} otherwise `super`'s. Core's `Actor` implementation
62
+ * doesn't override this method, so without further extension, that's equivalent to {@link Document.testUserPermission | `Document#testUserPermission`}
63
+ */
60
64
  // options: not null (destructured)
61
65
  override testUserPermission(
62
66
  user: User.Implementation,
63
- permission: Document.TestableOwnershipLevel,
67
+ permission: Document.ActionPermission,
64
68
  options?: Document.TestUserPermissionOptions,
65
69
  ): boolean;
66
70
 
67
- updateSource(changes?: TokenDocument.UpdateData, options?: DataModel.UpdateSourceOptions): TokenDocument.UpdateData;
71
+ // changes, options: not null (parameter default only)
72
+ override updateSource(
73
+ changes?: TokenDocument.UpdateData,
74
+ options?: DataModel.UpdateOptions,
75
+ ): TokenDocument.UpdateData;
68
76
 
69
77
  // TODO: Update with the Delta conditionality
70
- toObject(source: true): this["_source"];
71
- toObject(source?: boolean): ReturnType<this["schema"]["toObject"]>;
78
+ override toObject(source?: boolean | null): TokenDocument.Source;
72
79
 
73
80
  /**
74
- * @remarks Migrates:
75
- * - `actorData` to `delta`
81
+ * @remarks
82
+ * Migrations:
83
+ * - `actorData` to `delta` (since v11, no specified end)
76
84
  */
77
85
  static override migrateData(source: AnyMutableObject): AnyMutableObject;
78
86
 
79
87
  /**
80
- * @remarks Shims:
81
- * - `actorData` to `delta` since v11, until v13
82
- * - `effects` to nothing since v12, until v14 ("TokenDocument#effects is deprecated in favor of using ActiveEffect documents on the associated Actor")
83
- * - `overlayEffect` to nothing since v12, until v14 ("TokenDocument#overlayEffect is deprecated in favor of using ActiveEffect documents on the associated Actor")
88
+ * @remarks
89
+ * Shims:
90
+ * - `actorData` to `delta` (since v11, until v13)
91
+ * - `effects` to nothing (since v12, until v14)
92
+ * - "`TokenDocument#effects` is deprecated in favor of using {@linkcode ActiveEffect} documents on the associated `Actor`")
93
+ * - `overlayEffect` to nothing (since v12, until v14)
94
+ * - "`TokenDocument#overlayEffect` is deprecated in favor of using `ActiveEffect` documents on the associated `Actor`")
84
95
  */
96
+ // options: not null (destructured)
85
97
  static override shimData(data: AnyMutableObject, options?: DataModel.ShimDataOptions): AnyMutableObject;
86
98
 
87
99
  /**
88
100
  * @deprecated since v12, until v14
89
- * @remarks "TokenDocument#overlayEffect is deprecated in favor of using ActiveEffect documents on the associated Actor"
101
+ * @remarks "TokenDocument#overlayEffect is deprecated in favor of using {@linkcode ActiveEffect} documents on the associated Actor"
90
102
  */
91
103
  get effects(): [];
92
104
 
93
105
  /**
94
106
  * @deprecated since v12, until v14
95
- * @remarks "TokenDocument# is deprecated in favor of using ActiveEffect documents on the associated Actor"
107
+ * @remarks "TokenDocument# is deprecated in favor of using {@linkcode ActiveEffect} documents on the associated Actor"
96
108
  */
97
109
  get overlayEffect(): "";
98
110
 
@@ -113,37 +125,37 @@ declare abstract class BaseToken extends Document<"Token", BaseToken.Schema, any
113
125
  // Same as Document for now
114
126
  protected static override _initializationOrder(): Generator<[string, DataField.Any]>;
115
127
 
116
- readonly parentCollection: TokenDocument.ParentCollectionName | null;
128
+ override readonly parentCollection: TokenDocument.ParentCollectionName | null;
117
129
 
118
- readonly pack: string | null;
130
+ override readonly pack: string | null;
119
131
 
120
132
  static override get implementation(): TokenDocument.ImplementationClass;
121
133
 
122
- static get baseDocument(): typeof BaseToken;
134
+ static override get baseDocument(): typeof BaseToken;
123
135
 
124
- static get collectionName(): TokenDocument.ParentCollectionName;
136
+ static override get collectionName(): TokenDocument.ParentCollectionName;
125
137
 
126
- static get documentName(): TokenDocument.Name;
138
+ static override get documentName(): TokenDocument.Name;
127
139
 
128
- static get TYPES(): CONST.BASE_DOCUMENT_TYPE[];
140
+ static override get TYPES(): CONST.BASE_DOCUMENT_TYPE[];
129
141
 
130
- static get hasTypeData(): undefined;
142
+ static override get hasTypeData(): undefined;
131
143
 
132
- static get hierarchy(): TokenDocument.Hierarchy;
144
+ static override get hierarchy(): TokenDocument.Hierarchy;
133
145
 
134
146
  override parent: TokenDocument.Parent;
135
147
 
136
- static createDocuments<Temporary extends boolean | undefined = false>(
148
+ static override createDocuments<Temporary extends boolean | undefined = false>(
137
149
  data: Array<TokenDocument.Implementation | TokenDocument.CreateData> | undefined,
138
150
  operation?: Document.Database.CreateOperation<TokenDocument.Database.Create<Temporary>>,
139
151
  ): Promise<Array<Document.TemporaryIf<TokenDocument.Implementation, Temporary>>>;
140
152
 
141
- static updateDocuments(
153
+ static override updateDocuments(
142
154
  updates: TokenDocument.UpdateData[] | undefined,
143
155
  operation?: Document.Database.UpdateDocumentsOperation<TokenDocument.Database.Update>,
144
156
  ): Promise<TokenDocument.Implementation[]>;
145
157
 
146
- static deleteDocuments(
158
+ static override deleteDocuments(
147
159
  ids: readonly string[] | undefined,
148
160
  operation?: Document.Database.DeleteDocumentsOperation<TokenDocument.Database.Delete>,
149
161
  ): Promise<TokenDocument.Implementation[]>;
@@ -174,7 +186,7 @@ declare abstract class BaseToken extends Document<"Token", BaseToken.Schema, any
174
186
  * runtime, namely returning a `EmbeddedCollection` corresponding to a field in `BaseToken`'s
175
187
  * schema. However {@link TokenDocument.getEmbeddedCollection | `TokenDocument#getEmbeddedCollection`}
176
188
  * is overridden to add new cases and since `BaseToken` is a superclass it had to be widened to
177
- * accomodate that.
189
+ * accommodate that.
178
190
  */
179
191
  override getEmbeddedCollection(embeddedName: TokenDocument.Embedded.CollectionName): Collection.Any;
180
192
 
@@ -224,68 +236,68 @@ declare abstract class BaseToken extends Document<"Token", BaseToken.Schema, any
224
236
  key: Key,
225
237
  ): Promise<this>;
226
238
 
227
- protected _preCreate(
239
+ protected override _preCreate(
228
240
  data: TokenDocument.CreateData,
229
241
  options: TokenDocument.Database.PreCreateOptions,
230
242
  user: User.Implementation,
231
243
  ): Promise<boolean | void>;
232
244
 
233
- protected _onCreate(
245
+ protected override _onCreate(
234
246
  data: TokenDocument.CreateData,
235
247
  options: TokenDocument.Database.OnCreateOperation,
236
248
  userId: string,
237
249
  ): void;
238
250
 
239
- protected static _preCreateOperation(
251
+ protected static override _preCreateOperation(
240
252
  documents: TokenDocument.Implementation[],
241
253
  operation: Document.Database.PreCreateOperationStatic<TokenDocument.Database.Create>,
242
254
  user: User.Implementation,
243
255
  ): Promise<boolean | void>;
244
256
 
245
- protected static _onCreateOperation(
257
+ protected static override _onCreateOperation(
246
258
  documents: TokenDocument.Implementation[],
247
259
  operation: TokenDocument.Database.Create,
248
260
  user: User.Implementation,
249
261
  ): Promise<void>;
250
262
 
251
- protected _preUpdate(
263
+ protected override _preUpdate(
252
264
  changed: TokenDocument.UpdateData,
253
265
  options: TokenDocument.Database.PreUpdateOptions,
254
266
  user: User.Implementation,
255
267
  ): Promise<boolean | void>;
256
268
 
257
- protected _onUpdate(
269
+ protected override _onUpdate(
258
270
  changed: TokenDocument.UpdateData,
259
271
  options: TokenDocument.Database.OnUpdateOperation,
260
272
  userId: string,
261
273
  ): void;
262
274
 
263
- protected static _preUpdateOperation(
275
+ protected static override _preUpdateOperation(
264
276
  documents: TokenDocument.Implementation[],
265
277
  operation: TokenDocument.Database.Update,
266
278
  user: User.Implementation,
267
279
  ): Promise<boolean | void>;
268
280
 
269
- protected static _onUpdateOperation(
281
+ protected static override _onUpdateOperation(
270
282
  documents: TokenDocument.Implementation[],
271
283
  operation: TokenDocument.Database.Update,
272
284
  user: User.Implementation,
273
285
  ): Promise<void>;
274
286
 
275
- protected _preDelete(
287
+ protected override _preDelete(
276
288
  options: TokenDocument.Database.PreUpdateOptions,
277
289
  user: User.Implementation,
278
290
  ): Promise<boolean | void>;
279
291
 
280
- protected _onDelete(options: TokenDocument.Database.OnDeleteOperation, userId: string): void;
292
+ protected override _onDelete(options: TokenDocument.Database.OnDeleteOperation, userId: string): void;
281
293
 
282
- protected static _preDeleteOperation(
294
+ protected static override _preDeleteOperation(
283
295
  documents: TokenDocument.Implementation[],
284
296
  operation: TokenDocument.Database.Delete,
285
297
  user: User.Implementation,
286
298
  ): Promise<boolean | void>;
287
299
 
288
- protected static _onDeleteOperation(
300
+ protected static override _onDeleteOperation(
289
301
  documents: TokenDocument.Implementation[],
290
302
  operation: TokenDocument.Database.Delete,
291
303
  user: User.Implementation,
@@ -293,50 +305,80 @@ declare abstract class BaseToken extends Document<"Token", BaseToken.Schema, any
293
305
 
294
306
  // These data field things have been ticketed but will probably go into backlog hell for a while.
295
307
  // We'll end up copy and pasting without modification for now I think. It makes it a tiny bit easier to update though.
296
- protected static _addDataFieldShims(data: AnyObject, shims: AnyObject, options?: Document.DataFieldShimOptions): void;
297
308
 
298
- protected static _addDataFieldMigration(
299
- data: AnyObject,
309
+ // options: not null (parameter default only in _addDataFieldShim)
310
+ protected static override _addDataFieldShims(
311
+ data: AnyMutableObject,
312
+ shims: Record<string, string>,
313
+ options?: Document.DataFieldShimOptions,
314
+ ): void;
315
+
316
+ // options: not null (parameter default only)
317
+ protected static override _addDataFieldShim(
318
+ data: AnyMutableObject,
300
319
  oldKey: string,
301
320
  newKey: string,
302
- apply?: (data: AnyObject) => unknown,
303
- ): unknown;
321
+ options?: Document.DataFieldShimOptions,
322
+ ): void;
304
323
 
305
- protected static _logDataFieldMigration(
324
+ protected static override _addDataFieldMigration(
325
+ data: AnyMutableObject,
326
+ oldKey: string,
327
+ newKey: string,
328
+ apply?: ((data: AnyMutableObject) => unknown) | null,
329
+ ): boolean;
330
+
331
+ // options: not null (destructured where forwarded)
332
+ protected static override _logDataFieldMigration(
306
333
  oldKey: string,
307
334
  newKey: string,
308
335
  options?: LogCompatibilityWarningOptions,
309
336
  ): void;
310
337
 
311
- protected static _onCreateDocuments(
338
+ /**
339
+ * @deprecated since v12, will be removed in v14
340
+ * @remarks "The `Document._onCreateDocuments` static method is deprecated in favor of {@link Document._onCreateOperation | `Document._onCreateOperation`}"
341
+ */
342
+ protected static override _onCreateDocuments(
312
343
  documents: TokenDocument.Implementation[],
313
344
  context: Document.ModificationContext<TokenDocument.Parent>,
314
345
  ): Promise<void>;
315
346
 
316
- protected static _onUpdateDocuments(
347
+ /**
348
+ * @deprecated since v12, will be removed in v14
349
+ * @remarks "The `Document._onUpdateDocuments` static method is deprecated in favor of {@link Document._onUpdateOperation | `Document._onUpdateOperation`}"
350
+ */
351
+ protected static override _onUpdateDocuments(
317
352
  documents: TokenDocument.Implementation[],
318
353
  context: Document.ModificationContext<TokenDocument.Parent>,
319
354
  ): Promise<void>;
320
355
 
321
- protected static _onDeleteDocuments(
356
+ /**
357
+ * @deprecated since v12, will be removed in v14
358
+ * @remarks "The `Document._onDeleteDocuments` static method is deprecated in favor of {@link Document._onDeleteOperation | `Document._onDeleteOperation`}"
359
+ */
360
+ protected static override _onDeleteDocuments(
322
361
  documents: TokenDocument.Implementation[],
323
362
  context: Document.ModificationContext<TokenDocument.Parent>,
324
363
  ): Promise<void>;
325
364
 
326
365
  /* DataModel overrides */
327
366
 
328
- protected static _schema: SchemaField<TokenDocument.Schema>;
367
+ protected static override _schema: SchemaField<TokenDocument.Schema>;
329
368
 
330
- static get schema(): SchemaField<TokenDocument.Schema>;
369
+ static override get schema(): SchemaField<TokenDocument.Schema>;
331
370
 
332
- static validateJoint(data: TokenDocument.Source): void;
371
+ static override validateJoint(data: TokenDocument.Source): void;
333
372
 
373
+ // options: not null (parameter default only, destructured in super)
334
374
  static override fromSource(
335
375
  source: TokenDocument.CreateData,
336
- { strict, ...context }?: DataModel.FromSourceOptions,
376
+ context?: DataModel.FromSourceOptions,
337
377
  ): TokenDocument.Implementation;
338
378
 
339
379
  static override fromJSON(json: string): TokenDocument.Implementation;
380
+
381
+ static #BaseToken: true;
340
382
  }
341
383
 
342
384
  /**
@@ -346,10 +388,11 @@ export class ActorDeltaField<
346
388
  DocumentType extends Document.AnyConstructor,
347
389
  Options extends fields.EmbeddedDocumentField.Options<DocumentType> = fields.EmbeddedDocumentField.DefaultOptions,
348
390
  > extends fields.EmbeddedDocumentField<DocumentType, Options> {
391
+ // options: not null (parameter default only)
349
392
  override initialize(
350
393
  value: fields.EmbeddedDocumentField.PersistedType<DocumentType, Options>,
351
394
  model: DataModel.Any,
352
- options?: InexactPartial<DataModel.DataValidationOptions>,
395
+ options?: DataField.InitializeOptions,
353
396
  ):
354
397
  | fields.EmbeddedDocumentField.InitializedType<DocumentType, Options>
355
398
  | (() => fields.EmbeddedDocumentField.InitializedType<DocumentType, Options> | null);
@@ -1,4 +1,4 @@
1
- import type { AnyObject } from "fvtt-types/utils";
1
+ import type { AnyMutableObject } from "#utils";
2
2
  import type DataModel from "../abstract/data.d.mts";
3
3
  import type Document from "../abstract/document.mts";
4
4
  import type * as CONST from "../constants.mts";
@@ -26,23 +26,29 @@ declare abstract class BaseUser extends Document<"User", BaseUser.Schema, any> {
26
26
  */
27
27
  constructor(...args: User.ConstructorArgs);
28
28
 
29
- static override metadata: User.Metadata;
30
-
31
- static override defineSchema(): BaseUser.Schema;
32
-
33
29
  /**
34
- * Validate the structure of the User hotbar object
35
- * @param bar - The attempted hotbar data
36
- * @internal
30
+ * @defaultValue
31
+ * ```js
32
+ * mergeObject(super.metadata, {
33
+ * name: "User",
34
+ * collection: "users",
35
+ * label: "DOCUMENT.User",
36
+ * labelPlural: "DOCUMENT.Users",
37
+ * permissions: {
38
+ * create: this.#canCreate,
39
+ * update: this.#canUpdate,
40
+ * delete: this.#canDelete
41
+ * },
42
+ * schemaVersion: "12.324",
43
+ * });
44
+ * ```
37
45
  */
38
- static #validateHotbar(bar: AnyObject): boolean;
46
+ static override metadata: User.Metadata;
39
47
 
40
- /**
41
- * Validate the structure of the User permissions object
42
- * @param perms - The attempted permissions data
43
- * @internal
44
- */
45
- static #validatePermissions(perms: AnyObject): boolean;
48
+ /** @defaultValue `["USER"]` */
49
+ static override LOCALIZATION_PREFIXES: string[];
50
+
51
+ static override defineSchema(): BaseUser.Schema;
46
52
 
47
53
  /**
48
54
  * A convenience test for whether this User has the NONE role.
@@ -57,14 +63,14 @@ declare abstract class BaseUser extends Document<"User", BaseUser.Schema, any> {
57
63
  /**
58
64
  * Test whether the User is able to perform a certain permission action.
59
65
  * The provided permission string may pertain to an explicit permission setting or a named user role.
60
- * Alternatively, Gamemaster users are assumed to be allowed to take all actions.
61
66
  *
62
67
  * @param action - The action to test
63
68
  * @returns Does the user have the ability to perform this action?
64
69
  */
65
- can(action: keyof typeof CONST.USER_PERMISSIONS | CONST.USER_ROLE_NAMES | CONST.USER_ROLES): boolean;
70
+ can(action: BaseUser.ActionPermission): boolean;
66
71
 
67
- override getUserLevel(user?: User.Internal.Implementation): CONST.DOCUMENT_OWNERSHIP_LEVELS | null;
72
+ /** @remarks Returns `.OWNER` for the User in question, `.NONE` for everyone else */
73
+ override getUserLevel(user?: User.Internal.Implementation | null): CONST.DOCUMENT_OWNERSHIP_LEVELS;
68
74
 
69
75
  /**
70
76
  * Test whether the User has at least a specific permission
@@ -78,34 +84,8 @@ declare abstract class BaseUser extends Document<"User", BaseUser.Schema, any> {
78
84
  * @param role - The role name from USER_ROLES to test
79
85
  * @returns Does the user have at this role level (or greater)?
80
86
  */
81
- hasRole(role: CONST.USER_ROLE_NAMES | CONST.USER_ROLES, { exact }?: User.HasRoleOptions): boolean;
82
-
83
- /**
84
- * Is a user able to create an existing User?
85
- * @param user - The user attempting the creation.
86
- * @param doc - The User document being created.
87
- * @param data - The supplied creation data.
88
- * @internal
89
- */
90
- static #canCreate(user: User.Implementation, doc: BaseUser, data?: BaseUser.CreateData): boolean;
91
-
92
- /**
93
- * Is a user able to update an existing User?
94
- * @param user - The user attempting the update.
95
- * @param doc - The User document being updated.
96
- * @param changes - Proposed changes.
97
- * @internal
98
- */
99
- static #canUpdate(user: User.Implementation, doc: BaseUser, changes: BaseUser.CreateData): boolean;
100
-
101
- /**
102
- * Is a user able to delete an existing User?
103
- * Only Assistants and Gamemasters can delete users, and only if the target user has a lesser or equal role.
104
- * @param user - The user attempting the deletion.
105
- * @param doc - The User document being deleted.
106
- * @internal
107
- */
108
- static #canDelete(user: User.Implementation, doc: BaseUser): boolean;
87
+ // options: not null (destructured)
88
+ hasRole(role: CONST.USER_ROLE_NAMES | CONST.USER_ROLES, options?: BaseUser.HasRoleOptions): boolean;
109
89
 
110
90
  /*
111
91
  * After this point these are not really overridden methods.
@@ -124,37 +104,37 @@ declare abstract class BaseUser extends Document<"User", BaseUser.Schema, any> {
124
104
  // Same as Document for now
125
105
  protected static override _initializationOrder(): Generator<[string, DataField.Any]>;
126
106
 
127
- readonly parentCollection: User.ParentCollectionName | null;
107
+ override readonly parentCollection: User.ParentCollectionName | null;
128
108
 
129
- readonly pack: null;
109
+ override readonly pack: null;
130
110
 
131
- static get implementation(): User.ImplementationClass;
111
+ static override get implementation(): User.ImplementationClass;
132
112
 
133
- static get baseDocument(): typeof BaseUser;
113
+ static override get baseDocument(): typeof BaseUser;
134
114
 
135
- static get collectionName(): User.ParentCollectionName;
115
+ static override get collectionName(): User.ParentCollectionName;
136
116
 
137
- static get documentName(): User.Name;
117
+ static override get documentName(): User.Name;
138
118
 
139
- static get TYPES(): CONST.BASE_DOCUMENT_TYPE[];
119
+ static override get TYPES(): CONST.BASE_DOCUMENT_TYPE[];
140
120
 
141
- static get hasTypeData(): undefined;
121
+ static override get hasTypeData(): undefined;
142
122
 
143
- static get hierarchy(): User.Hierarchy;
123
+ static override get hierarchy(): User.Hierarchy;
144
124
 
145
125
  override parent: User.Parent;
146
126
 
147
- static createDocuments<Temporary extends boolean | undefined = false>(
127
+ static override createDocuments<Temporary extends boolean | undefined = false>(
148
128
  data: Array<User.Implementation | User.CreateData> | undefined,
149
129
  operation?: Document.Database.CreateOperation<User.Database.Create<Temporary>>,
150
130
  ): Promise<Array<Document.TemporaryIf<User.Implementation, Temporary>>>;
151
131
 
152
- static updateDocuments(
132
+ static override updateDocuments(
153
133
  updates: User.UpdateData[] | undefined,
154
134
  operation?: Document.Database.UpdateDocumentsOperation<User.Database.Update>,
155
135
  ): Promise<User.Implementation[]>;
156
136
 
157
- static deleteDocuments(
137
+ static override deleteDocuments(
158
138
  ids: readonly string[] | undefined,
159
139
  operation?: Document.Database.DeleteDocumentsOperation<User.Database.Delete>,
160
140
  ): Promise<User.Implementation[]>;
@@ -171,7 +151,7 @@ declare abstract class BaseUser extends Document<"User", BaseUser.Schema, any> {
171
151
 
172
152
  override delete(operation?: User.Database.DeleteOperation): Promise<this | undefined>;
173
153
 
174
- static get(documentId: string, options?: User.Database.GetOptions): User.Implementation | null;
154
+ static override get(documentId: string, options?: User.Database.GetOptions): User.Implementation | null;
175
155
 
176
156
  static override getCollectionName(name: string): null;
177
157
 
@@ -194,112 +174,143 @@ declare abstract class BaseUser extends Document<"User", BaseUser.Schema, any> {
194
174
  key: Key,
195
175
  ): Promise<this>;
196
176
 
197
- protected _preCreate(
177
+ protected override _preCreate(
198
178
  data: User.CreateData,
199
179
  options: User.Database.PreCreateOptions,
200
180
  user: User.Internal.Implementation,
201
181
  ): Promise<boolean | void>;
202
182
 
203
- protected _onCreate(data: User.CreateData, options: User.Database.OnCreateOperation, userId: string): void;
183
+ protected override _onCreate(data: User.CreateData, options: User.Database.OnCreateOperation, userId: string): void;
204
184
 
205
- protected static _preCreateOperation(
185
+ protected static override _preCreateOperation(
206
186
  documents: User.Implementation[],
207
187
  operation: Document.Database.PreCreateOperationStatic<User.Database.Create>,
208
188
  user: User.Implementation,
209
189
  ): Promise<boolean | void>;
210
190
 
211
- protected static _onCreateOperation(
191
+ protected static override _onCreateOperation(
212
192
  documents: User.Implementation[],
213
193
  operation: User.Database.Create,
214
194
  user: User.Implementation,
215
195
  ): Promise<void>;
216
196
 
217
- protected _preUpdate(
197
+ protected override _preUpdate(
218
198
  changed: User.UpdateData,
219
199
  options: User.Database.PreUpdateOptions,
220
200
  user: User.Internal.Implementation,
221
201
  ): Promise<boolean | void>;
222
202
 
223
- protected _onUpdate(changed: User.UpdateData, options: User.Database.OnUpdateOperation, userId: string): void;
203
+ protected override _onUpdate(
204
+ changed: User.UpdateData,
205
+ options: User.Database.OnUpdateOperation,
206
+ userId: string,
207
+ ): void;
224
208
 
225
- protected static _preUpdateOperation(
209
+ protected static override _preUpdateOperation(
226
210
  documents: User.Implementation[],
227
211
  operation: User.Database.Update,
228
212
  user: User.Implementation,
229
213
  ): Promise<boolean | void>;
230
214
 
231
- protected static _onUpdateOperation(
215
+ protected static override _onUpdateOperation(
232
216
  documents: User.Implementation[],
233
217
  operation: User.Database.Update,
234
218
  user: User.Implementation,
235
219
  ): Promise<void>;
236
220
 
237
- protected _preDelete(
221
+ protected override _preDelete(
238
222
  options: User.Database.PreDeleteOptions,
239
223
  user: User.Internal.Implementation,
240
224
  ): Promise<boolean | void>;
241
225
 
242
- protected _onDelete(options: User.Database.OnDeleteOperation, userId: string): void;
226
+ protected override _onDelete(options: User.Database.OnDeleteOperation, userId: string): void;
243
227
 
244
- protected static _preDeleteOperation(
228
+ protected static override _preDeleteOperation(
245
229
  documents: User.Implementation[],
246
230
  operation: User.Database.Delete,
247
231
  user: User.Implementation,
248
232
  ): Promise<boolean | void>;
249
233
 
250
- protected static _onDeleteOperation(
234
+ protected static override _onDeleteOperation(
251
235
  documents: User.Implementation[],
252
236
  operation: User.Database.Delete,
253
237
  user: User.Implementation,
254
238
  ): Promise<void>;
255
239
 
256
- static get hasSystemData(): undefined;
240
+ static override get hasSystemData(): undefined;
257
241
 
258
242
  // These data field things have been ticketed but will probably go into backlog hell for a while.
259
- protected static _addDataFieldShims(data: AnyObject, shims: AnyObject, options?: Document.DataFieldShimOptions): void;
260
243
 
261
- protected static _addDataFieldMigration(
262
- data: AnyObject,
244
+ // options: not null (parameter default only in _addDataFieldShim)
245
+ protected static override _addDataFieldShims(
246
+ data: AnyMutableObject,
247
+ shims: Record<string, string>,
248
+ options?: Document.DataFieldShimOptions,
249
+ ): void;
250
+
251
+ // options: not null (parameter default only)
252
+ protected static override _addDataFieldShim(
253
+ data: AnyMutableObject,
254
+ oldKey: string,
255
+ newKey: string,
256
+ options?: Document.DataFieldShimOptions,
257
+ ): void;
258
+
259
+ protected static override _addDataFieldMigration(
260
+ data: AnyMutableObject,
263
261
  oldKey: string,
264
262
  newKey: string,
265
- apply?: (data: AnyObject) => unknown,
266
- ): unknown;
263
+ apply?: ((data: AnyMutableObject) => unknown) | null,
264
+ ): boolean;
267
265
 
268
- protected static _logDataFieldMigration(
266
+ // options: not null (destructured where forwarded)
267
+ protected static override _logDataFieldMigration(
269
268
  oldKey: string,
270
269
  newKey: string,
271
270
  options?: LogCompatibilityWarningOptions,
272
271
  ): void;
273
272
 
274
- protected static _onCreateDocuments(
273
+ /**
274
+ * @deprecated since v12, will be removed in v14
275
+ * @remarks "The `Document._onCreateDocuments` static method is deprecated in favor of {@link Document._onCreateOperation | `Document._onCreateOperation`}"
276
+ */
277
+ protected static override _onCreateDocuments(
275
278
  documents: User.Implementation[],
276
279
  context: Document.ModificationContext<User.Parent>,
277
280
  ): Promise<void>;
278
281
 
279
- protected static _onUpdateDocuments(
282
+ /**
283
+ * @deprecated since v12, will be removed in v14
284
+ * @remarks "The `Document._onUpdateDocuments` static method is deprecated in favor of {@link Document._onUpdateOperation | `Document._onUpdateOperation`}"
285
+ */
286
+ protected static override _onUpdateDocuments(
280
287
  documents: User.Implementation[],
281
288
  context: Document.ModificationContext<User.Parent>,
282
289
  ): Promise<void>;
283
290
 
284
- protected static _onDeleteDocuments(
291
+ /**
292
+ * @deprecated since v12, will be removed in v14
293
+ * @remarks "The `Document._onDeleteDocuments` static method is deprecated in favor of {@link Document._onDeleteOperation | `Document._onDeleteOperation`}"
294
+ */
295
+ protected static override _onDeleteDocuments(
285
296
  documents: User.Implementation[],
286
297
  context: Document.ModificationContext<User.Parent>,
287
298
  ): Promise<void>;
288
299
 
289
300
  /* DataModel overrides */
290
301
 
291
- protected static _schema: SchemaField<User.Schema>;
302
+ protected static override _schema: SchemaField<User.Schema>;
292
303
 
293
- static get schema(): SchemaField<User.Schema>;
304
+ static override get schema(): SchemaField<User.Schema>;
294
305
 
295
- static validateJoint(data: User.Source): void;
306
+ static override validateJoint(data: User.Source): void;
296
307
 
297
- static override fromSource(
298
- source: User.CreateData,
299
- { strict, ...context }?: DataModel.FromSourceOptions,
300
- ): User.Implementation;
308
+ // options: not null (parameter default only, destructured in super)
309
+ static override fromSource(source: User.CreateData, context?: DataModel.FromSourceOptions): User.Implementation;
301
310
 
302
311
  static override fromJSON(json: string): User.Implementation;
312
+
313
+ static #BaseUser: true;
303
314
  }
304
315
 
305
316
  export default BaseUser;
@@ -330,7 +341,7 @@ declare namespace BaseUser {
330
341
  export import PingData = User.PingData;
331
342
  export import ActivityData = User.ActivityData;
332
343
  export import HasRoleOptions = User.HasRoleOptions;
333
-
344
+ export import ActionPermission = User.ActionPermission;
334
345
  /**
335
346
  * @deprecated This type is used by Foundry too vaguely.
336
347
  * In one context the most correct type is after initialization whereas in another one it should be