@league-of-foundry-developers/foundry-vtt-types 13.346.0-beta.20250705112003 → 13.346.0-beta.20250705141556

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 (84) hide show
  1. package/package.json +9 -4
  2. package/src/configuration/hooks.d.mts +1 -1
  3. package/src/foundry/client/applications/api/document-sheet.d.mts +8 -1
  4. package/src/foundry/client/applications/api/handlebars-application.d.mts +2 -2
  5. package/src/foundry/client/applications/sheets/ambient-light-config.d.mts +2 -2
  6. package/src/foundry/client/applications/sheets/region-behavior-config.d.mts +1 -1
  7. package/src/foundry/client/documents/abstract/document-collection.d.mts +6 -4
  8. package/src/foundry/client/documents/active-effect.d.mts +12 -5
  9. package/src/foundry/client/documents/actor-delta.d.mts +12 -5
  10. package/src/foundry/client/documents/actor.d.mts +12 -5
  11. package/src/foundry/client/documents/adventure.d.mts +12 -5
  12. package/src/foundry/client/documents/ambient-light.d.mts +12 -5
  13. package/src/foundry/client/documents/ambient-sound.d.mts +12 -5
  14. package/src/foundry/client/documents/card.d.mts +11 -6
  15. package/src/foundry/client/documents/cards.d.mts +13 -6
  16. package/src/foundry/client/documents/chat-message.d.mts +15 -8
  17. package/src/foundry/client/documents/collections/compendium-collection.d.mts +2 -0
  18. package/src/foundry/client/documents/combat.d.mts +12 -5
  19. package/src/foundry/client/documents/combatant-group.d.mts +12 -5
  20. package/src/foundry/client/documents/combatant.d.mts +12 -5
  21. package/src/foundry/client/documents/drawing.d.mts +12 -5
  22. package/src/foundry/client/documents/fog-exploration.d.mts +12 -5
  23. package/src/foundry/client/documents/folder.d.mts +13 -6
  24. package/src/foundry/client/documents/item.d.mts +10 -5
  25. package/src/foundry/client/documents/journal-entry-category.d.mts +12 -5
  26. package/src/foundry/client/documents/journal-entry-page.d.mts +12 -5
  27. package/src/foundry/client/documents/journal-entry.d.mts +12 -5
  28. package/src/foundry/client/documents/macro.d.mts +12 -5
  29. package/src/foundry/client/documents/measured-template.d.mts +12 -5
  30. package/src/foundry/client/documents/note.d.mts +12 -5
  31. package/src/foundry/client/documents/playlist-sound.d.mts +12 -5
  32. package/src/foundry/client/documents/playlist.d.mts +12 -5
  33. package/src/foundry/client/documents/region-behavior.d.mts +12 -5
  34. package/src/foundry/client/documents/region.d.mts +12 -5
  35. package/src/foundry/client/documents/roll-table.d.mts +13 -6
  36. package/src/foundry/client/documents/scene.d.mts +12 -5
  37. package/src/foundry/client/documents/setting.d.mts +8 -1
  38. package/src/foundry/client/documents/table-result.d.mts +12 -5
  39. package/src/foundry/client/documents/tile.d.mts +12 -5
  40. package/src/foundry/client/documents/token.d.mts +15 -12
  41. package/src/foundry/client/documents/user.d.mts +10 -5
  42. package/src/foundry/client/documents/wall.d.mts +12 -5
  43. package/src/foundry/client/helpers/client-settings.d.mts +7 -3
  44. package/src/foundry/common/abstract/document.d.mts +98 -50
  45. package/src/foundry/common/abstract/type-data.d.mts +35 -10
  46. package/src/foundry/common/data/data.d.mts +2 -2
  47. package/src/foundry/common/data/fields.d.mts +71 -59
  48. package/src/foundry/common/documents/active-effect.d.mts +6 -5
  49. package/src/foundry/common/documents/actor-delta.d.mts +6 -5
  50. package/src/foundry/common/documents/actor.d.mts +6 -5
  51. package/src/foundry/common/documents/adventure.d.mts +6 -5
  52. package/src/foundry/common/documents/ambient-light.d.mts +6 -5
  53. package/src/foundry/common/documents/ambient-sound.d.mts +6 -5
  54. package/src/foundry/common/documents/card.d.mts +6 -5
  55. package/src/foundry/common/documents/cards.d.mts +6 -5
  56. package/src/foundry/common/documents/chat-message.d.mts +6 -5
  57. package/src/foundry/common/documents/combat.d.mts +6 -5
  58. package/src/foundry/common/documents/combatant-group.d.mts +6 -5
  59. package/src/foundry/common/documents/combatant.d.mts +6 -5
  60. package/src/foundry/common/documents/drawing.d.mts +6 -5
  61. package/src/foundry/common/documents/fog-exploration.d.mts +6 -5
  62. package/src/foundry/common/documents/folder.d.mts +6 -5
  63. package/src/foundry/common/documents/item.d.mts +6 -5
  64. package/src/foundry/common/documents/journal-entry-category.d.mts +6 -5
  65. package/src/foundry/common/documents/journal-entry-page.d.mts +6 -5
  66. package/src/foundry/common/documents/journal-entry.d.mts +6 -5
  67. package/src/foundry/common/documents/macro.d.mts +6 -5
  68. package/src/foundry/common/documents/measured-template.d.mts +6 -5
  69. package/src/foundry/common/documents/note.d.mts +6 -5
  70. package/src/foundry/common/documents/playlist-sound.d.mts +6 -5
  71. package/src/foundry/common/documents/playlist.d.mts +6 -5
  72. package/src/foundry/common/documents/region-behavior.d.mts +6 -5
  73. package/src/foundry/common/documents/region.d.mts +6 -5
  74. package/src/foundry/common/documents/roll-table.d.mts +6 -5
  75. package/src/foundry/common/documents/scene.d.mts +6 -5
  76. package/src/foundry/common/documents/setting.d.mts +4 -3
  77. package/src/foundry/common/documents/table-result.d.mts +6 -5
  78. package/src/foundry/common/documents/tile.d.mts +6 -5
  79. package/src/foundry/common/documents/token.d.mts +6 -5
  80. package/src/foundry/common/documents/user.d.mts +6 -5
  81. package/src/foundry/common/documents/wall.d.mts +6 -5
  82. package/src/foundry/common/packages/base-world.d.mts +31 -29
  83. package/src/types/augments/pixi.d.mts +4 -0
  84. package/tsconfig.json +2 -5
@@ -469,26 +469,33 @@ declare namespace Combat {
469
469
  interface DialogCreateOptions extends InexactPartial<Create> {}
470
470
  }
471
471
 
472
+ /**
473
+ * If `Temporary` is true then `Combat.Implementation`, otherwise `Combat.Stored`.
474
+ */
475
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary
476
+ ? Combat.Implementation
477
+ : Combat.Stored;
478
+
472
479
  /**
473
480
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
474
481
  */
475
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
482
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name> {}
476
483
 
477
484
  namespace Flags {
478
485
  /**
479
486
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
480
487
  */
481
- type Scope = Document.FlagKeyOf<Flags>;
488
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
482
489
 
483
490
  /**
484
491
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
485
492
  */
486
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
493
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
487
494
 
488
495
  /**
489
496
  * Gets the type of a particular flag given a `Scope` and a `Key`.
490
497
  */
491
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
498
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
492
499
  }
493
500
 
494
501
  interface DropData extends Document.Internal.DropData<Name> {}
@@ -580,7 +587,7 @@ declare namespace Combat {
580
587
  /**
581
588
  * The arguments to construct the document.
582
589
  *
583
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
590
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
584
591
  * now recommended.
585
592
  */
586
593
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -371,26 +371,33 @@ declare namespace CombatantGroup {
371
371
  interface DialogCreateOptions extends InexactPartial<Create> {}
372
372
  }
373
373
 
374
+ /**
375
+ * If `Temporary` is true then `CombatantGroup.Implementation`, otherwise `CombatantGroup.Stored`.
376
+ */
377
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary
378
+ ? CombatantGroup.Implementation
379
+ : CombatantGroup.Stored;
380
+
374
381
  /**
375
382
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
376
383
  */
377
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
384
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name> {}
378
385
 
379
386
  namespace Flags {
380
387
  /**
381
388
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
382
389
  */
383
- type Scope = Document.FlagKeyOf<Flags>;
390
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
384
391
 
385
392
  /**
386
393
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
387
394
  */
388
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
395
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
389
396
 
390
397
  /**
391
398
  * Gets the type of a particular flag given a `Scope` and a `Key`.
392
399
  */
393
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
400
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
394
401
  }
395
402
 
396
403
  interface DropData extends Document.Internal.DropData<Name> {}
@@ -421,7 +428,7 @@ declare namespace CombatantGroup {
421
428
  /**
422
429
  * The arguments to construct the document.
423
430
  *
424
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
431
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
425
432
  * now recommended.
426
433
  */
427
434
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -409,26 +409,33 @@ declare namespace Combatant {
409
409
  interface DialogCreateOptions extends InexactPartial<Create> {}
410
410
  }
411
411
 
412
+ /**
413
+ * If `Temporary` is true then `Combatant.Implementation`, otherwise `Combatant.Stored`.
414
+ */
415
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary
416
+ ? Combatant.Implementation
417
+ : Combatant.Stored;
418
+
412
419
  /**
413
420
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
414
421
  */
415
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
422
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name> {}
416
423
 
417
424
  namespace Flags {
418
425
  /**
419
426
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
420
427
  */
421
- type Scope = Document.FlagKeyOf<Flags>;
428
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
422
429
 
423
430
  /**
424
431
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
425
432
  */
426
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
433
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
427
434
 
428
435
  /**
429
436
  * Gets the type of a particular flag given a `Scope` and a `Key`.
430
437
  */
431
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
438
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
432
439
  }
433
440
 
434
441
  interface DropData extends Document.Internal.DropData<Name> {}
@@ -459,7 +466,7 @@ declare namespace Combatant {
459
466
  /**
460
467
  * The arguments to construct the document.
461
468
  *
462
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
469
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
463
470
  * now recommended.
464
471
  */
465
472
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -462,26 +462,33 @@ declare namespace DrawingDocument {
462
462
  interface DialogCreateOptions extends InexactPartial<Create> {}
463
463
  }
464
464
 
465
+ /**
466
+ * If `Temporary` is true then `DrawingDocument.Implementation`, otherwise `DrawingDocument.Stored`.
467
+ */
468
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary
469
+ ? DrawingDocument.Implementation
470
+ : DrawingDocument.Stored;
471
+
465
472
  /**
466
473
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
467
474
  */
468
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
475
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name> {}
469
476
 
470
477
  namespace Flags {
471
478
  /**
472
479
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
473
480
  */
474
- type Scope = Document.FlagKeyOf<Flags>;
481
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
475
482
 
476
483
  /**
477
484
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
478
485
  */
479
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
486
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
480
487
 
481
488
  /**
482
489
  * Gets the type of a particular flag given a `Scope` and a `Key`.
483
490
  */
484
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
491
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
485
492
  }
486
493
 
487
494
  interface DropData extends Document.Internal.DropData<Name> {}
@@ -502,7 +509,7 @@ declare namespace DrawingDocument {
502
509
  /**
503
510
  * The arguments to construct the document.
504
511
  *
505
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
512
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
506
513
  * now recommended.
507
514
  */
508
515
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -337,26 +337,33 @@ declare namespace FogExploration {
337
337
  interface DialogCreateOptions extends InexactPartial<Create> {}
338
338
  }
339
339
 
340
+ /**
341
+ * If `Temporary` is true then `FogExploration.Implementation`, otherwise `FogExploration.Stored`.
342
+ */
343
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary
344
+ ? FogExploration.Implementation
345
+ : FogExploration.Stored;
346
+
340
347
  /**
341
348
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
342
349
  */
343
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
350
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name> {}
344
351
 
345
352
  namespace Flags {
346
353
  /**
347
354
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
348
355
  */
349
- type Scope = Document.FlagKeyOf<Flags>;
356
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
350
357
 
351
358
  /**
352
359
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
353
360
  */
354
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
361
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
355
362
 
356
363
  /**
357
364
  * Gets the type of a particular flag given a `Scope` and a `Key`.
358
365
  */
359
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
366
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
360
367
  }
361
368
 
362
369
  interface DropData extends Document.Internal.DropData<Name> {}
@@ -392,7 +399,7 @@ declare namespace FogExploration {
392
399
  /**
393
400
  * The arguments to construct the document.
394
401
  *
395
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
402
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
396
403
  * now recommended.
397
404
  */
398
405
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -371,26 +371,33 @@ declare namespace Folder {
371
371
  interface DialogCreateOptions extends InexactPartial<Create> {}
372
372
  }
373
373
 
374
+ /**
375
+ * If `Temporary` is true then `Folder.Implementation`, otherwise `Folder.Stored`.
376
+ */
377
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary
378
+ ? Folder.Implementation
379
+ : Folder.Stored;
380
+
374
381
  /**
375
382
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
376
383
  */
377
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
384
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name> {}
378
385
 
379
386
  namespace Flags {
380
387
  /**
381
388
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
382
389
  */
383
- type Scope = Document.FlagKeyOf<Flags>;
390
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
384
391
 
385
392
  /**
386
393
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
387
394
  */
388
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
395
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
389
396
 
390
397
  /**
391
398
  * Gets the type of a particular flag given a `Scope` and a `Key`.
392
399
  */
393
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
400
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
394
401
  }
395
402
 
396
403
  interface DropData extends Document.Internal.DropData<Name> {}
@@ -495,7 +502,7 @@ declare namespace Folder {
495
502
  /**
496
503
  * The arguments to construct the document.
497
504
  *
498
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
505
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
499
506
  * now recommended.
500
507
  */
501
508
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -570,7 +577,7 @@ declare class Folder<out SubType extends Folder.SubType = Folder.SubType> extend
570
577
  /**
571
578
  * Return the list of ancestors of this folder, starting with the parent.
572
579
  */
573
- get ancestors(): Folder.Implementation[];
580
+ get ancestors(): Folder.Stored[];
574
581
 
575
582
  override get inCompendium(): boolean;
576
583
 
@@ -460,26 +460,31 @@ declare namespace Item {
460
460
  interface DialogCreateOptions extends InexactPartial<Create> {}
461
461
  }
462
462
 
463
+ /**
464
+ * If `Temporary` is true then `Item.Implementation`, otherwise `Item.Stored`.
465
+ */
466
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary ? Item.Implementation : Item.Stored;
467
+
463
468
  /**
464
469
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
465
470
  */
466
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
471
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name> {}
467
472
 
468
473
  namespace Flags {
469
474
  /**
470
475
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
471
476
  */
472
- type Scope = Document.FlagKeyOf<Flags>;
477
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
473
478
 
474
479
  /**
475
480
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
476
481
  */
477
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
482
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
478
483
 
479
484
  /**
480
485
  * Gets the type of a particular flag given a `Scope` and a `Key`.
481
486
  */
482
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
487
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
483
488
  }
484
489
 
485
490
  interface DropData extends Document.Internal.DropData<Name> {}
@@ -534,7 +539,7 @@ declare namespace Item {
534
539
  /**
535
540
  * The arguments to construct the document.
536
541
  *
537
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
542
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
538
543
  * now recommended.
539
544
  */
540
545
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -299,26 +299,33 @@ declare namespace JournalEntryCategory {
299
299
  interface DialogCreateOptions extends InexactPartial<Create> {}
300
300
  }
301
301
 
302
+ /**
303
+ * If `Temporary` is true then `JournalEntryCategory.Implementation`, otherwise `JournalEntryCategory.Stored`.
304
+ */
305
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary
306
+ ? JournalEntryCategory.Implementation
307
+ : JournalEntryCategory.Stored;
308
+
302
309
  /**
303
310
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
304
311
  */
305
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
312
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name> {}
306
313
 
307
314
  namespace Flags {
308
315
  /**
309
316
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
310
317
  */
311
- type Scope = Document.FlagKeyOf<Flags>;
318
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
312
319
 
313
320
  /**
314
321
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
315
322
  */
316
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
323
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
317
324
 
318
325
  /**
319
326
  * Gets the type of a particular flag given a `Scope` and a `Key`.
320
327
  */
321
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
328
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
322
329
  }
323
330
 
324
331
  interface DropData extends Document.Internal.DropData<Name> {}
@@ -349,7 +356,7 @@ declare namespace JournalEntryCategory {
349
356
  /**
350
357
  * The arguments to construct the document.
351
358
  *
352
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
359
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
353
360
  * now recommended.
354
361
  */
355
362
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -523,26 +523,33 @@ declare namespace JournalEntryPage {
523
523
  interface DialogCreateOptions extends InexactPartial<Create> {}
524
524
  }
525
525
 
526
+ /**
527
+ * If `Temporary` is true then `JournalEntryPage.Implementation`, otherwise `JournalEntryPage.Stored`.
528
+ */
529
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary
530
+ ? JournalEntryPage.Implementation
531
+ : JournalEntryPage.Stored;
532
+
526
533
  /**
527
534
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
528
535
  */
529
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
536
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name> {}
530
537
 
531
538
  namespace Flags {
532
539
  /**
533
540
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
534
541
  */
535
- type Scope = Document.FlagKeyOf<Flags>;
542
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
536
543
 
537
544
  /**
538
545
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
539
546
  */
540
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
547
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
541
548
 
542
549
  /**
543
550
  * Gets the type of a particular flag given a `Scope` and a `Key`.
544
551
  */
545
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
552
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
546
553
  }
547
554
 
548
555
  interface DropData extends Document.Internal.DropData<Name> {}
@@ -615,7 +622,7 @@ declare namespace JournalEntryPage {
615
622
  /**
616
623
  * The arguments to construct the document.
617
624
  *
618
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
625
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
619
626
  * now recommended.
620
627
  */
621
628
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -407,26 +407,33 @@ declare namespace JournalEntry {
407
407
  interface DialogCreateOptions extends InexactPartial<Create> {}
408
408
  }
409
409
 
410
+ /**
411
+ * If `Temporary` is true then `JournalEntry.Implementation`, otherwise `JournalEntry.Stored`.
412
+ */
413
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary
414
+ ? JournalEntry.Implementation
415
+ : JournalEntry.Stored;
416
+
410
417
  /**
411
418
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
412
419
  */
413
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
420
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name>, CoreFlags {}
414
421
 
415
422
  namespace Flags {
416
423
  /**
417
424
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
418
425
  */
419
- type Scope = Document.FlagKeyOf<Flags>;
426
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
420
427
 
421
428
  /**
422
429
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
423
430
  */
424
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
431
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
425
432
 
426
433
  /**
427
434
  * Gets the type of a particular flag given a `Scope` and a `Key`.
428
435
  */
429
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
436
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
430
437
  }
431
438
 
432
439
  interface CoreFlags {
@@ -483,7 +490,7 @@ declare namespace JournalEntry {
483
490
  /**
484
491
  * The arguments to construct the document.
485
492
  *
486
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
493
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
487
494
  * now recommended.
488
495
  */
489
496
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -411,26 +411,33 @@ declare namespace Macro {
411
411
  interface DialogCreateOptions extends InexactPartial<Create> {}
412
412
  }
413
413
 
414
+ /**
415
+ * If `Temporary` is true then `Macro.Implementation`, otherwise `Macro.Stored`.
416
+ */
417
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary
418
+ ? Macro.Implementation
419
+ : Macro.Stored;
420
+
414
421
  /**
415
422
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
416
423
  */
417
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
424
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name> {}
418
425
 
419
426
  namespace Flags {
420
427
  /**
421
428
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
422
429
  */
423
- type Scope = Document.FlagKeyOf<Flags>;
430
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
424
431
 
425
432
  /**
426
433
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
427
434
  */
428
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
435
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
429
436
 
430
437
  /**
431
438
  * Gets the type of a particular flag given a `Scope` and a `Key`.
432
439
  */
433
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
440
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
434
441
  }
435
442
 
436
443
  interface DropData extends Document.Internal.DropData<Name> {}
@@ -508,7 +515,7 @@ declare namespace Macro {
508
515
  /**
509
516
  * The arguments to construct the document.
510
517
  *
511
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
518
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
512
519
  * now recommended.
513
520
  */
514
521
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -401,26 +401,33 @@ declare namespace MeasuredTemplateDocument {
401
401
  interface DialogCreateOptions extends InexactPartial<Create> {}
402
402
  }
403
403
 
404
+ /**
405
+ * If `Temporary` is true then `MeasuredTemplate.Implementation`, otherwise `MeasuredTemplate.Stored`.
406
+ */
407
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary
408
+ ? MeasuredTemplateDocument.Implementation
409
+ : MeasuredTemplateDocument.Stored;
410
+
404
411
  /**
405
412
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
406
413
  */
407
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
414
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name> {}
408
415
 
409
416
  namespace Flags {
410
417
  /**
411
418
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
412
419
  */
413
- type Scope = Document.FlagKeyOf<Flags>;
420
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
414
421
 
415
422
  /**
416
423
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
417
424
  */
418
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
425
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
419
426
 
420
427
  /**
421
428
  * Gets the type of a particular flag given a `Scope` and a `Key`.
422
429
  */
423
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
430
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
424
431
  }
425
432
 
426
433
  interface DropData extends Document.Internal.DropData<Name> {}
@@ -434,7 +441,7 @@ declare namespace MeasuredTemplateDocument {
434
441
  /**
435
442
  * The arguments to construct the document.
436
443
  *
437
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
444
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
438
445
  * now recommended.
439
446
  */
440
447
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -409,26 +409,33 @@ declare namespace NoteDocument {
409
409
  interface DialogCreateOptions extends InexactPartial<Create> {}
410
410
  }
411
411
 
412
+ /**
413
+ * If `Temporary` is true then `NoteDocument.Implementation`, otherwise `NoteDocument.Stored`.
414
+ */
415
+ type TemporaryIf<Temporary extends boolean | undefined> = true extends Temporary
416
+ ? NoteDocument.Implementation
417
+ : NoteDocument.Stored;
418
+
412
419
  /**
413
420
  * The flags that are available for this document in the form `{ [scope: string]: { [key: string]: unknown } }`.
414
421
  */
415
- interface Flags extends Document.ConfiguredFlagsForName<Name> {}
422
+ interface Flags extends Document.Internal.ConfiguredFlagsForName<Name> {}
416
423
 
417
424
  namespace Flags {
418
425
  /**
419
426
  * The valid scopes for the flags on this document e.g. `"core"` or `"dnd5e"`.
420
427
  */
421
- type Scope = Document.FlagKeyOf<Flags>;
428
+ type Scope = Document.Internal.FlagKeyOf<Flags>;
422
429
 
423
430
  /**
424
431
  * The valid keys for a certain scope for example if the scope is "core" then a valid key may be `"sheetLock"` or `"viewMode"`.
425
432
  */
426
- type Key<Scope extends Flags.Scope> = Document.FlagKeyOf<Document.FlagGetKey<Flags, Scope>>;
433
+ type Key<Scope extends Flags.Scope> = Document.Internal.FlagKeyOf<Document.Internal.FlagGetKey<Flags, Scope>>;
427
434
 
428
435
  /**
429
436
  * Gets the type of a particular flag given a `Scope` and a `Key`.
430
437
  */
431
- type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
438
+ type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.Internal.GetFlag<Flags, Scope, Key>;
432
439
  }
433
440
 
434
441
  interface DropData extends Document.Internal.DropData<Name> {}
@@ -442,7 +449,7 @@ declare namespace NoteDocument {
442
449
  /**
443
450
  * The arguments to construct the document.
444
451
  *
445
- * @deprecated - Writing the signature directly has helped reduce circularities and therefore is
452
+ * @deprecated Writing the signature directly has helped reduce circularities and therefore is
446
453
  * now recommended.
447
454
  */
448
455
  // eslint-disable-next-line @typescript-eslint/no-deprecated