@cosmicdrift/kumiko-types 0.355.0 → 0.357.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/event-store-executor-types.d.ts +2 -1
- package/dist/fields.d.ts +8 -0
- package/dist/handlers.d.ts +13 -0
- package/dist/screen.d.ts +15 -3
- package/package.json +1 -1
- package/src/changes.json +6 -0
|
@@ -13,7 +13,7 @@ export type StreamTenantOption = {
|
|
|
13
13
|
readonly streamTenantId?: TenantId | undefined;
|
|
14
14
|
};
|
|
15
15
|
export type EventStoreExecutor = {
|
|
16
|
-
create: (payload: Record<string, unknown>, user: SessionUser, db: TenantDb, options?: {
|
|
16
|
+
create: (payload: Record<string, unknown>, user: SessionUser, db: TenantDb, options?: StreamTenantOption & {
|
|
17
17
|
preSave?: PreSaveRunner;
|
|
18
18
|
}) => Promise<WriteResult<SaveContext>>;
|
|
19
19
|
update: (payload: {
|
|
@@ -23,6 +23,7 @@ export type EventStoreExecutor = {
|
|
|
23
23
|
}, user: SessionUser, db: TenantDb, options?: StreamTenantOption & {
|
|
24
24
|
skipOptimisticLock?: boolean;
|
|
25
25
|
skipUnchanged?: boolean;
|
|
26
|
+
includeDeleted?: boolean;
|
|
26
27
|
preSave?: PreSaveRunner;
|
|
27
28
|
expect?: Readonly<Record<string, string | number | boolean | null>>;
|
|
28
29
|
}) => Promise<WriteResult<SaveContext>>;
|
package/dist/fields.d.ts
CHANGED
|
@@ -85,6 +85,9 @@ export type TextFieldDef = {
|
|
|
85
85
|
/** Lower bound enforced by the generated write schema, so short input is
|
|
86
86
|
* rejected by validation instead of reaching the handler. */
|
|
87
87
|
readonly minLength?: number;
|
|
88
|
+
/** HTML `autocomplete` token for the rendered input (e.g. "one-time-code"),
|
|
89
|
+
* so browsers and password managers offer or suppress autofill correctly. */
|
|
90
|
+
readonly autoComplete?: string;
|
|
88
91
|
readonly required?: boolean;
|
|
89
92
|
readonly searchable?: boolean;
|
|
90
93
|
readonly sortable?: boolean;
|
|
@@ -273,6 +276,11 @@ export type MultiSelectFieldDef<TOptions extends readonly string[] = readonly st
|
|
|
273
276
|
* `"checkboxes"` grid becomes scrollable. Omitted = the grid grows with its
|
|
274
277
|
* content and never scrolls. Ignored unless `display: "checkboxes"`. */
|
|
275
278
|
readonly maxRows?: number;
|
|
279
|
+
/** Query returning `{ rows: { value, disabled?, hint? }[] }`. The renderer hides
|
|
280
|
+
* options whose row has `disabled: true` unless the value is currently selected;
|
|
281
|
+
* `hint` is ignored. Static `options` stay authoritative and the write path must
|
|
282
|
+
* enforce the same rule, the renderer only mirrors it. Called with an empty payload. */
|
|
283
|
+
readonly optionsAvailabilityQuery?: string;
|
|
276
284
|
} & ResolvedPiiFlags;
|
|
277
285
|
/**
|
|
278
286
|
* Storage: `integer` flag decides the Postgres column type, not just Zod
|
package/dist/handlers.d.ts
CHANGED
|
@@ -183,6 +183,10 @@ export type EscapeHatchUseEvent = {
|
|
|
183
183
|
};
|
|
184
184
|
export type EscapeHatchAuditSink = (event: EscapeHatchUseEvent) => Promise<void>;
|
|
185
185
|
export type EscapeHatchReporter = (kind: EscapeHatchKind, reason: string, target?: EscapeHatchTarget) => void;
|
|
186
|
+
export type TenantWriteTarget = {
|
|
187
|
+
readonly db: TenantDb;
|
|
188
|
+
readonly streamTenantId: TenantId | undefined;
|
|
189
|
+
};
|
|
186
190
|
type SharedContextFields = {
|
|
187
191
|
readonly redis?: Redis;
|
|
188
192
|
readonly cacheSync?: CacheSyncBus;
|
|
@@ -197,6 +201,15 @@ type SharedContextFields = {
|
|
|
197
201
|
* the config feature wired its accessor factory.
|
|
198
202
|
*/
|
|
199
203
|
readonly configFor?: (tenantId: TenantId) => ConfigAccessor;
|
|
204
|
+
/**
|
|
205
|
+
* Write target for ANOTHER tenant: a tenant-mode db bound to it plus the
|
|
206
|
+
* `streamTenantId` to hand the executor, so the event actor stays the
|
|
207
|
+
* operator. Cross-tenant calls throw AccessDeniedError unless the caller is
|
|
208
|
+
* SystemAdmin (the tenantIdOverride gate); the caller's own tenant needs no
|
|
209
|
+
* privilege and yields `streamTenantId: undefined`. Write handlers only;
|
|
210
|
+
* absent for r.systemScope() handlers and without a db.
|
|
211
|
+
*/
|
|
212
|
+
readonly forTenant?: (tenantId: TenantId) => TenantWriteTarget;
|
|
200
213
|
readonly _configAccessorFactory?: ConfigAccessorFactory;
|
|
201
214
|
readonly configEncryption?: import("./envelope-cipher-types.js").EnvelopeCipher;
|
|
202
215
|
readonly rateLimit?: import("./rate-limit-types.js").RateLimitResolver;
|
package/dist/screen.d.ts
CHANGED
|
@@ -1299,16 +1299,24 @@ export type EntityEditScreenDefinition = {
|
|
|
1299
1299
|
* das `mask.title`-Label des Config-Keys. Fehlt ein Eintrag, gilt die
|
|
1300
1300
|
* Konvention. */
|
|
1301
1301
|
readonly fieldLabels?: Readonly<Record<string, string>>;
|
|
1302
|
-
/**
|
|
1302
|
+
/** Record actions. Reuses `RowAction` — analogous to
|
|
1303
1303
|
* `ProjectionDetailScreenDefinition.actions` (the loaded record stands
|
|
1304
1304
|
* in for the "row"). `rowClick` has no target here and is rejected by
|
|
1305
1305
|
* the boot-validator, same as on projectionDetail. Not rendered in
|
|
1306
1306
|
* create mode — every action targets an existing record, which the
|
|
1307
|
-
* create branch doesn't have yet.
|
|
1308
|
-
|
|
1307
|
+
* create branch doesn't have yet. By default an action renders with the
|
|
1308
|
+
* secondary form actions (footer, next to copy-link/delete/cancel);
|
|
1309
|
+
* `placement: "menu"` moves it into the header "…" menu, ahead of
|
|
1310
|
+
* copy-link/delete. Without a header menu (drawer, card form, shell
|
|
1311
|
+
* without a header slot) a "menu" action falls back to inline. */
|
|
1312
|
+
readonly actions?: readonly EntityEditAction[];
|
|
1309
1313
|
readonly slots?: ScreenSlots;
|
|
1310
1314
|
readonly access?: AccessRule;
|
|
1311
1315
|
};
|
|
1316
|
+
export type EntityEditActionPlacement = "inline" | "menu";
|
|
1317
|
+
export type EntityEditAction = RowAction & {
|
|
1318
|
+
readonly placement?: EntityEditActionPlacement;
|
|
1319
|
+
};
|
|
1312
1320
|
export type ActionFormScreenDefinition = {
|
|
1313
1321
|
readonly id: string;
|
|
1314
1322
|
readonly type: "actionForm";
|
|
@@ -1480,6 +1488,10 @@ export type SecretReveal = {
|
|
|
1480
1488
|
readonly warning?: string;
|
|
1481
1489
|
/** i18n key for the acknowledge button. Default "kumiko.secretMint.confirm". */
|
|
1482
1490
|
readonly confirmLabel?: string;
|
|
1491
|
+
/** i18n key for a checkbox on the reveal card ("I have saved my recovery
|
|
1492
|
+
* codes"). While unchecked, the confirm step's submit or the acknowledge
|
|
1493
|
+
* button stays disabled. The tick is UI-only and never part of a payload. */
|
|
1494
|
+
readonly acknowledge?: string;
|
|
1483
1495
|
};
|
|
1484
1496
|
/** Mint form → one-time reveal → explicit confirm. The secret (API token,
|
|
1485
1497
|
* recovery codes) lives only in the write-handler's own success payload —
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.357.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/changes.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.357.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "MultiSelectFieldDef.optionsAvailabilityQuery hides static multiSelect options per caller",
|
|
6
|
+
"detail": "The query returns { rows: { value, disabled?, hint? }[] }; disabled options are hidden unless currently selected."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.352.0",
|
|
4
10
|
"type": "improvement",
|