feat: complete TechLog Studio publication flow

This commit is contained in:
DongHyeonka
2026-08-16 00:35:11 +09:00
parent 9c6906fc6f
commit c5c8b9423c
60 changed files with 2028 additions and 2948 deletions
@@ -6,6 +6,7 @@ import type {
RouteDefinition,
RouteLayoutGroup,
} from "../../../contracts/routes.ts";
import type { SchemaDefinition } from "../../../contracts/schema-registry.ts";
type RouteSpec = Readonly<{
routeId: string;
@@ -52,6 +53,79 @@ const TECH_LOG_ROUTE_SPECS = [
export type TechLogRouteId = (typeof TECH_LOG_ROUTE_SPECS)[number]["routeId"];
const routeSchema = (
schemaId: string,
boundary: "route-params" | "route-search",
unknownFieldPolicy: "REJECT_UNKNOWN" | "STRIP_UNKNOWN",
): SchemaDefinition =>
Object.freeze({
schemaId,
boundary,
owner: "feature-tech-log",
runtime: "zod",
schemaVersion: 1,
direction: "REQUEST",
unknownFieldPolicy,
});
export const TECH_LOG_ROUTE_SCHEMA_REGISTRY = Object.freeze({
TechLogExploreKindParams: routeSchema(
"TechLogExploreKindParams",
"route-params",
"REJECT_UNKNOWN",
),
TechLogSlugParams: routeSchema(
"TechLogSlugParams",
"route-params",
"REJECT_UNKNOWN",
),
TechLogVersionParams: routeSchema(
"TechLogVersionParams",
"route-params",
"REJECT_UNKNOWN",
),
TechLogDocumentIdParams: routeSchema(
"TechLogDocumentIdParams",
"route-params",
"REJECT_UNKNOWN",
),
TechLogPublicationEventIdParams: routeSchema(
"TechLogPublicationEventIdParams",
"route-params",
"REJECT_UNKNOWN",
),
TechLogStudioSplat: routeSchema(
"TechLogStudioSplat",
"route-params",
"REJECT_UNKNOWN",
),
TechLogHomeSearch: routeSchema(
"TechLogHomeSearch",
"route-search",
"STRIP_UNKNOWN",
),
TechLogExploreSearch: routeSchema(
"TechLogExploreSearch",
"route-search",
"STRIP_UNKNOWN",
),
TechLogExploreKindSearch: routeSchema(
"TechLogExploreKindSearch",
"route-search",
"STRIP_UNKNOWN",
),
TechLogSearchQuery: routeSchema(
"TechLogSearchQuery",
"route-search",
"STRIP_UNKNOWN",
),
TechLogCaseStateSearch: routeSchema(
"TechLogCaseStateSearch",
"route-search",
"STRIP_UNKNOWN",
),
});
function chunkId(routeId: TechLogRouteId): string {
return routeId === "NOT_FOUND"
? "route-not-found"
@@ -92,4 +166,5 @@ export const TECH_LOG_ROUTE_RUNTIME_CONTRACT = Object.freeze(
export const TECH_LOG_ROUTE_CONTRACT = Object.freeze({
routes: TECH_LOG_ROUTE_REGISTRY,
routeRuntimeContracts: TECH_LOG_ROUTE_RUNTIME_CONTRACT,
schemas: TECH_LOG_ROUTE_SCHEMA_REGISTRY,
});