@cosmicdrift/kumiko-types 0.338.0 → 0.339.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/define-handler.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export type WriteHandlerDefinition<TName extends string = string, TSchema extend
|
|
|
12
12
|
readonly unsafeSkipTransitionGuard?: boolean;
|
|
13
13
|
readonly rateLimit?: RateLimitDeclaration;
|
|
14
14
|
readonly escapeHatch?: EscapeHatchDeclaration;
|
|
15
|
+
readonly tenantlessAnonymous?: boolean;
|
|
15
16
|
readonly handler: (event: WriteEvent<z.infer<TSchema>>, context: HandlerContext<TMap>) => Promise<WriteResult<TData>>;
|
|
16
17
|
readonly perform?: PipelineDef<z.infer<TSchema>, TData>;
|
|
17
18
|
};
|
|
@@ -24,6 +25,7 @@ export type WriteHandlerInput<TName extends string = string, TSchema extends Zod
|
|
|
24
25
|
readonly unsafeSkipTransitionGuard?: boolean;
|
|
25
26
|
readonly rateLimit?: RateLimitDeclaration;
|
|
26
27
|
readonly escapeHatch?: EscapeHatchDeclaration;
|
|
28
|
+
readonly tenantlessAnonymous?: boolean;
|
|
27
29
|
} & ({
|
|
28
30
|
readonly handler: (event: WriteEvent<z.infer<TSchema>>, context: HandlerContext<TMap>) => Promise<WriteResult<TData>>;
|
|
29
31
|
readonly perform?: never;
|
package/dist/handlers.d.ts
CHANGED
|
@@ -473,6 +473,10 @@ export type WriteHandlerDef = {
|
|
|
473
473
|
readonly unsafeSkipTransitionGuard?: boolean;
|
|
474
474
|
readonly rateLimit?: RateLimitDeclaration;
|
|
475
475
|
readonly escapeHatch?: EscapeHatchDeclaration;
|
|
476
|
+
/** Lets an anonymous `POST /api/write` for this handler proceed under
|
|
477
|
+
* SYSTEM_TENANT_ID when the host resolves no tenant. Boot requires
|
|
478
|
+
* `access.roles: ["anonymous"]` and a real `rateLimit`. */
|
|
479
|
+
readonly tenantlessAnonymous?: boolean;
|
|
476
480
|
readonly perform?: import("./step.js").PipelineDef;
|
|
477
481
|
};
|
|
478
482
|
export declare const ENTITY_CONVENTION_QUERY_BRAND = "__kumikoEntityConventionQuery";
|
|
@@ -34,9 +34,9 @@ export type TenantDb = {
|
|
|
34
34
|
readonly mode: TenantDbMode;
|
|
35
35
|
/**
|
|
36
36
|
* Unfiltered DbRunner escape hatch for handlers/hooks that declare `escapeHatch: { reason }`.
|
|
37
|
-
* Throws `AccessDeniedError` when ungranted
|
|
37
|
+
* Throws `AccessDeniedError` when ungranted. The audit entry carries the declared escapeHatch reason.
|
|
38
38
|
*/
|
|
39
|
-
unsafeRaw(
|
|
39
|
+
unsafeRaw(): DbRunner;
|
|
40
40
|
/**
|
|
41
41
|
* Reach a "global" table with the tenant filter lifted — reads always work; writes
|
|
42
42
|
* reject unless the write handler declared `escapeHatch: { reason }`. "tenant"-tenancy is a compile error here.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.339.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>",
|