@cosmicdrift/kumiko-types 0.383.0 → 0.384.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/dist/config.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { ZodType } from "zod";
2
2
  import type { ConcurrencyMode } from "./concurrency-mode.ts";
3
3
  import type { ConfigScope } from "./config-scope.ts";
4
4
  import type { DbConnection } from "./db-connection.ts";
5
- import type { FieldDefinition, OptionsQueryPayload } from "./fields.ts";
5
+ import type { EntityFieldDefinition, OptionsQueryPayload } from "./fields.ts";
6
6
  import type { EscapeHatchDeclaration, JobContext, JobDeferral } from "./handlers.ts";
7
7
  import type { PostDeleteHookFn, PostSaveHookFn, PreDeleteHookFn, PreQueryHookFn, PreSaveHookFn } from "./hooks.ts";
8
8
  import type { TenantId } from "./identifiers.ts";
@@ -289,7 +289,7 @@ export type UiExtensionDef = {
289
289
  };
290
290
  export type RegistrarExtensionDef = {
291
291
  readonly onRegister?: (entityName: string, options?: Record<string, unknown>) => void;
292
- readonly extendSchema?: (entityName: string) => Record<string, FieldDefinition>;
292
+ readonly extendSchema?: (entityName: string) => Record<string, EntityFieldDefinition>;
293
293
  readonly hooks?: RegistrarExtensionHooks;
294
294
  readonly extendSearch?: (entityName: string) => Record<string, unknown>;
295
295
  readonly uiExtension?: UiExtensionDef;
package/dist/fields.d.ts CHANGED
@@ -739,7 +739,23 @@ export type EntityIndexDef = {
739
739
  */
740
740
  readonly where?: unknown;
741
741
  };
742
- export type FieldsMap = Readonly<Record<string, FieldDefinition>>;
742
+ export type ResolvedPiiStance = {
743
+ readonly pii: true;
744
+ } | {
745
+ readonly userOwned: NonNullable<ResolvedPiiFlags["userOwned"]>;
746
+ } | {
747
+ readonly tenantOwned: true;
748
+ } | {
749
+ readonly recordOwned: true;
750
+ } | {
751
+ readonly allowPlaintext: string;
752
+ } | {
753
+ readonly subjectRef: true;
754
+ };
755
+ export type EntityTextFieldDef = TextFieldDef & ResolvedPiiStance;
756
+ export type EntityLongTextFieldDef = LongTextFieldDef & ResolvedPiiStance;
757
+ export type EntityFieldDefinition = Exclude<FieldDefinition, TextFieldDef | LongTextFieldDef> | EntityTextFieldDef | EntityLongTextFieldDef;
758
+ export type FieldsMap = Readonly<Record<string, EntityFieldDefinition>>;
743
759
  export type ParentRefDef = {
744
760
  /** Field holding the name of the host entity this row hangs off. */
745
761
  readonly entityTypeField: string;
package/dist/screen.d.ts CHANGED
@@ -8,6 +8,15 @@ export type PlatformComponent = {
8
8
  readonly native?: unknown;
9
9
  };
10
10
  export type UnitKey = "m2" | "km" | "m" | "kg" | "percent" | "mi";
11
+ type NumberFormatOptions = {
12
+ readonly locale?: string;
13
+ readonly grouping?: boolean;
14
+ /** Intl `minimumFractionDigits` / `maximumFractionDigits` (integers 0..20,
15
+ * min <= max). Without them Intl cuts at 3 digits, so 0.0004 renders as
16
+ * "0". Invalid values are ignored. */
17
+ readonly minimumFractionDigits?: number;
18
+ readonly maximumFractionDigits?: number;
19
+ };
11
20
  export interface FieldFormatRegistry {
12
21
  timestamp: {
13
22
  readonly locale?: string;
@@ -33,14 +42,9 @@ export interface FieldFormatRegistry {
33
42
  };
34
43
  /** `grouping: false` renders without thousands-separators (e.g. a model
35
44
  * year: "2021", not "2.021"). Default `true`. */
36
- number: {
37
- readonly locale?: string;
38
- readonly grouping?: boolean;
39
- };
40
- decimal: {
41
- readonly locale?: string;
42
- readonly grouping?: boolean;
43
- };
45
+ number: NumberFormatOptions;
46
+ /** Same options as `number`. */
47
+ decimal: NumberFormatOptions;
44
48
  bigInt: {
45
49
  readonly locale?: string;
46
50
  readonly grouping?: boolean;
@@ -10,6 +10,8 @@ export type WhereOperator = {
10
10
  readonly lte?: unknown;
11
11
  readonly ne?: unknown;
12
12
  readonly in?: readonly unknown[];
13
+ /** Not for jsonb columns; an empty list matches every row. */
14
+ readonly notIn?: readonly unknown[];
13
15
  readonly like?: string;
14
16
  /** jsonb columns only; cannot be combined with other operators in the same object. */
15
17
  readonly jsonText?: JsonTextMatch | readonly JsonTextMatch[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-types",
3
- "version": "0.383.0",
3
+ "version": "0.384.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>",