@cosmicdrift/kumiko-types 0.188.0 → 0.189.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-types",
3
- "version": "0.188.0",
3
+ "version": "0.189.0",
4
4
  "description": "Framework-Type-Definitions für Kumiko — FeatureDefinition, BootCheck-Types und die reinen Engine-Types. Erlaubt Downstream-Konsumenten, gegen die Type-Contracts zu bauen, ohne das ganze Framework-Package zu importieren. Enthaelt keine identitaets-sensitiven Runtime-Werte mehr (Error-Klassen leben seit #1629 in kumiko-framework, Brand-Symbole nutzen Symbol.for) und ist deshalb eine plain dependency, keine peerDependency.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -21,6 +21,10 @@ export type PgType =
21
21
  | "jsonb"
22
22
  | "timestamptz"
23
23
  | "timestamptz(3)"
24
+ // Calendar day, no time-of-day/timezone component — Temporal.PlainDate.
25
+ // Distinct from timestamptz: a `date` field is a pure calendar concept
26
+ // (invoice date, lease term) and must never round-trip through an Instant.
27
+ | "date"
24
28
  // Exact decimal — precision/scale are encoded in the type string so the
25
29
  // DDL renderer and read-coercion need no side-channel metadata.
26
30
  | `numeric(${number},${number})`;
package/src/screen.ts CHANGED
@@ -593,6 +593,22 @@ export type EntityEditScreenDefinition = {
593
593
  * (History-/Audit-Erhalt): unterdrückt den Löschen-Button im
594
594
  * Update-Form. */
595
595
  readonly allowDelete?: boolean;
596
+ /** Default false. `true` for singleton entities (exactly one record per
597
+ * tenant: organization, settings, tenant profile). A call without an
598
+ * `entityId` first resolves the existing record via `<entity>:list`
599
+ * (limit 1) and renders the update branch with prefill on a hit,
600
+ * instead of blindly creating another one. The create branch only
601
+ * fires when the table is empty (and `allowCreate: false` still
602
+ * applies there). */
603
+ readonly singleton?: boolean;
604
+ /** Navigate to this screen ID after a successful save (create or update).
605
+ * Either a same-feature short screen-ID, or a fully-qualified
606
+ * cross-feature screen QN (`<feature>:screen:<id>`) — the nav-router
607
+ * resolves both against the schema; boot-validator checks the target
608
+ * resolves to a registered screen. Overrides the default post-save
609
+ * target (the entity's list screen); delete is unaffected and still
610
+ * always navigates to the list. */
611
+ readonly redirect?: string;
596
612
  /** Optionaler per-Field-Label-i18n-Key (Field-Name → Key), überschreibt
597
613
  * die Default-Konvention `<feature>:entity:<entity>:field:<name>`.
598
614
  * Primär für configEdit: dessen Pseudo-Entity `__config-edit__` hat
@@ -639,18 +655,20 @@ export type ActionFormScreenDefinition = {
639
655
  /** i18n-key für den Submit-Button. Default: i18n-Default des
640
656
  * Renderers (typischerweise "actions.submit"). */
641
657
  readonly submitLabel?: string;
642
- /** Nach erfolgreichem Submit zu dieser Screen-ID navigieren (kurze
643
- * ID, z.B. "item-list" — gleiche Feature, der nav-Router resolved
644
- * zum vollen Pfad). Cross-Feature-Redirect ist nicht supported.
645
- * Wenn nicht gesetzt, bleibt der User auf dem Form-Screen. Boot-
646
- * Validator prüft dass die ID einen registrierten Screen meint. */
658
+ /** Nach erfolgreichem Submit zu dieser Screen-ID navigieren: entweder
659
+ * kurze ID (z.B. "item-list" — gleiche Feature, der nav-Router
660
+ * resolved zum vollen Pfad) oder voll-qualifizierte Cross-Feature-QN
661
+ * (`<feature>:screen:<id>`). Wenn nicht gesetzt, bleibt der User auf
662
+ * dem Form-Screen. Boot-Validator prüft dass das Ziel einen
663
+ * registrierten Screen meint. */
647
664
  readonly redirect?: string;
648
665
  /** Ziel des Abbrechen-Buttons. Default: `redirect` (historisches
649
666
  * Verhalten — Cancel und Submit-Redirect landen dann am selben Ort).
650
667
  * `false` = kein Abbrechen-Button; richtig für Single-Action-Screens
651
668
  * ohne verwerfbaren Zustand (z.B. "Test-Mail senden"), wo Abbrechen
652
- * nur ein zweiter Weg zum selben Ziel wäre. Boot-Validator prüft
653
- * String-Targets wie `redirect`. */
669
+ * nur ein zweiter Weg zum selben Ziel wäre. Akzeptiert dieselben
670
+ * String-Targets wie `redirect` (kurze ID oder Cross-Feature-QN);
671
+ * Boot-Validator prüft das. */
654
672
  readonly cancelTarget?: string | false;
655
673
  readonly slots?: ScreenSlots;
656
674
  readonly access?: AccessRule;