import type { components } from "./generated.ts"; type Schemas = components["schemas"]; export type RecordKind = Schemas["RecordKind"]; export type WorkingCopy = Schemas["WorkingCopy"]; export type WorkingCopyInput = Schemas["WorkingCopyInput"]; export type WorkingCopyDetail = Schemas["WorkingCopyDetail"]; export type StudioDashboard = Schemas["StudioDashboard"]; export type DocumentPage = Schemas["DocumentPage"]; export type CreateDocumentInput = Schemas["CreateDocumentInput"]; export type SaveDocumentCommand = Schemas["SaveDocumentCommand"]; export type ValidateDocumentCommand = Schemas["ValidateDocumentCommand"]; export type ValidationReport = Schemas["ValidationReport"]; export type CreatePreviewCommand = Schemas["CreatePreviewCommand"]; export type PublicPreview = Schemas["PublicPreview"]; export type PreviewDetail = Schemas["PreviewDetail"]; export type PublishDocumentCommand = Schemas["PublishDocumentCommand"]; export type PublishResult = Schemas["PublishResult"]; export type UnpublishCommand = Schemas["UnpublishCommand"]; export type PublicationAggregate = Schemas["PublicationAggregate"]; export type PublicationEvent = Schemas["PublicationEvent"]; export type PublicationListItem = Schemas["PublicationListItem"]; export type PublicationPage = Schemas["PublicationPage"]; export type PublicationSnapshot = Schemas["PublicationSnapshot"]; export type CatalogPage = Schemas["CatalogPage"]; /** * ADR-006으로 canonical 계약의 오류가 봉투(`ErrorEnvelope`/`ApiError`)로 * 바뀌면서 `ProblemDetails` 스키마 자체는 canonical에서 삭제됐다. 더 이상 * 생성된 스키마에서 뽑지 않고 여기서 손으로 유지하되, 이 모양은 전송 경계 * (`tech-log-studio-contract-contribution.ts`의 `envelopeError`)가 실제로 * 만드는 모양과 **동일해야 한다** — 그게 이 값이 production에서 채워지는 * 유일한 경로다. `ApiError`가 옮겨주는 필드(`type/title/status/detail/code/ * category/retryable/details`)만 갖는다. * * (Task 3 fix round 1) 이전에는 ADR-006 이전 평면 wire 모양에서 넘어온 * `instance`/`traceId`/`fieldErrors`/`latestDocument`/`latestPublication`/ * `conflictingFields`를 최상위 필드로 따로 두고 있었다. `envelopeError`는 * 그 필드들을 채우지 않으므로(옮길 대상이 없음) production 값에서는 항상 * `undefined`였고, mock 게이트웨이만 채웠다 — 타입은 있는데 mock에 대고 * 짜면 통과하고 실제 HTTP 경로에서는 조용히 비는, 봉투 검증 설계가 막으려던 * 함정이었다. 그 데이터는 이제 wire와 동일하게 `details` 안에 둔다 — mock도 * 여기 채운다(`mock-studio-gateway.ts`, `cursor.ts`). */ export type ValidationErrorDetails = Schemas["ValidationErrorDetails"]; export type VersionConflictDetails = Schemas["VersionConflictDetails"]; export type PublicationConflictDetails = Schemas["PublicationConflictDetails"]; export type ProblemDetailsPayload = | ValidationErrorDetails | VersionConflictDetails | PublicationConflictDetails | null; export type ProblemDetails = Readonly<{ /** Format: uri-reference */ type: string; title: string; status: number; detail: string; code: Schemas["ApiError"]["code"]; category?: Schemas["ApiError"]["category"]; // optional 유지: 기존 호출부(테스트의 `new StudioGatewayError({...})` 리터럴 // 다수, `synthetic()`의 일부 경로)가 `retryable`을 생략한다. 이번 fix // round의 finding은 `details`/평면 필드 문제이지 이 필드의 필수 여부가 // 아니다 — required로 좁히면 무관한 파일들이 깨진다. retryable?: boolean; details?: ProblemDetailsPayload; }>; export type PublicRenderModel = Schemas["PublicRenderModel"]; export type Asset = Schemas["Asset"]; export type AssetDetail = Schemas["AssetDetail"]; export type AssetPage = Schemas["AssetPage"]; export type AssetUsage = Schemas["AssetUsage"]; export type AssetKind = Schemas["AssetKind"]; export type AssetManagementStatus = Schemas["AssetManagementStatus"]; export type UpdateAssetCommand = Schemas["UpdateAssetCommand"]; export type StudioSession = Schemas["StudioSession"];