@cosmicdrift/kumiko-types 0.291.0 → 0.293.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 +1 -1
- package/src/identifiers.ts +6 -0
- package/src/screen.ts +19 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.293.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>",
|
package/src/identifiers.ts
CHANGED
|
@@ -49,6 +49,12 @@ export function isSystemTenant(tenantId: TenantId | null | undefined): boolean {
|
|
|
49
49
|
return !tenantId || tenantId === SYSTEM_TENANT_ID;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
// "No human caller" marker on event-store `createdBy`. Stringified so it
|
|
53
|
+
// round-trips through SessionUser.id; not a real UUID, and createdBy is text.
|
|
54
|
+
// Lives here rather than next to createSystemUser() so client-side code (the
|
|
55
|
+
// reference-label map) can read it without importing a runtime module.
|
|
56
|
+
export const SYSTEM_USER_ID = "00000000-0000-0000-0000-000000000000";
|
|
57
|
+
|
|
52
58
|
// Primary-key identifier for any entity row. Two shapes coexist because of
|
|
53
59
|
// the entity-def `idType` switch: classic CRUD entities keep `serial` (number),
|
|
54
60
|
// while tenant + ES aggregates run on `uuid` (string). Call sites that pass
|
package/src/screen.ts
CHANGED
|
@@ -473,6 +473,8 @@ export type EntityListScreenDefinition = {
|
|
|
473
473
|
// `falseLabel`) are i18n keys resolved via `translate()` with passthrough
|
|
474
474
|
// for unknown keys (fw#2373) — not raw display strings. Sent to the server
|
|
475
475
|
// as `{field, op:"in", value}` in `payload.filters`, ANDed with `filter`.
|
|
476
|
+
// Exception: "dateRange" sends its bounds as the two top-level payload keys
|
|
477
|
+
// named in `params`, not as a `filters` entry.
|
|
476
478
|
export type ListFacetSpec =
|
|
477
479
|
| {
|
|
478
480
|
readonly field: string;
|
|
@@ -497,6 +499,20 @@ export type ListFacetSpec =
|
|
|
497
499
|
/** Row field on the referenced entity shown as the option label
|
|
498
500
|
* (default "id"). */
|
|
499
501
|
readonly labelField?: string;
|
|
502
|
+
}
|
|
503
|
+
| {
|
|
504
|
+
/** Declarative only — the date field the range narrows. It is NOT sent
|
|
505
|
+
* to the server (the bounds go under `params`); it namespaces the
|
|
506
|
+
* facet's URL keys and tells a reading agent which column this list
|
|
507
|
+
* is time-rangeable on. */
|
|
508
|
+
readonly field: string;
|
|
509
|
+
readonly type: "dateRange";
|
|
510
|
+
readonly label: string;
|
|
511
|
+
/** Query-payload keys the chosen bounds are sent under as ISO instants.
|
|
512
|
+
* Explicit rather than a `from`/`to` convention — a query is free to
|
|
513
|
+
* name its time bounds anything, and the boot-validator checks these
|
|
514
|
+
* keys against the handler's Zod schema. */
|
|
515
|
+
readonly params: { readonly from: string; readonly to: string };
|
|
500
516
|
};
|
|
501
517
|
|
|
502
518
|
export type ProjectionListScreenDefinition = {
|
|
@@ -535,7 +551,9 @@ export type ProjectionListScreenDefinition = {
|
|
|
535
551
|
readonly filter?: ScreenFilter;
|
|
536
552
|
/** User-toggleable facet dropdowns — see `ListFacetSpec` doc. `field`
|
|
537
553
|
* must be a declared column; the bound query handler must accept
|
|
538
|
-
* `filters` in its Zod schema — the boot-validator checks both.
|
|
554
|
+
* `filters` in its Zod schema — the boot-validator checks both. A
|
|
555
|
+
* "dateRange" facet instead needs its two `params` keys in that schema;
|
|
556
|
+
* it sends no `filters` entry. */
|
|
539
557
|
readonly facets?: readonly ListFacetSpec[];
|
|
540
558
|
readonly slots?: ScreenSlots;
|
|
541
559
|
readonly access?: AccessRule;
|