/** 옮길 수 없는 이유 — 언어 중립 코드(발견 오류·인제스트 거절과 같은 규약). */ export type MoveSpaceRefusalCode = 'twin-not-found' | 'space-not-found' | 'same-space' | 'bench-copy'; /** 옮겨도 되지만 알아야 하는 것 — 같은 규약. */ export type MoveSpaceWarningCode = 'areas-left-behind' | 'timezone-differs' | 'representations-left-behind' | 'running'; export interface MoveSpaceNote { code: C; params?: Record; /** 영어 canonical — 로그에 남고, 번역이 없으면 그대로 보인다. */ message: string; } export type MoveSpaceRefusal = MoveSpaceNote; export type MoveSpaceWarning = MoveSpaceNote; export interface MoveSpaceInput { /** 옮길 트윈. 없으면 거절한다. */ instanceId?: string; /** 지금 속한 공간(없을 수 있다 — 옛 트윈). */ fromSpaceId?: string; /** 옮겨 갈 공간. */ toSpaceId: string; /** 그 공간이 이 테넌트에 실제로 있나(호출측이 조회해 넘긴다). */ toSpaceExists: boolean; /** 운영 트윈인가 벤치 사본인가 — 사본은 원본의 공간을 따라야 하므로 옮기지 않는다. */ purpose?: string; /** 지금 실행 중인가 — 시간대 변화는 재기동 뒤에 커널에 실린다. */ running?: boolean; /** 두 공간의 시간대(IANA). 다르면 앞으로의 시각 해석이 달라진다. */ fromTimezone?: string; toTimezone?: string; /** 이 트윈의 로케이션들이 소속으로 가리키는 구역 id 들(중복 포함 가능). */ areaRefs?: readonly (string | undefined | null)[]; /** 옮겨 갈 공간에 있는 구역 id 들. */ toAreaIds?: readonly string[]; /** 옛 공간의 표현 수 — 그 표현의 폴리곤이 이 트윈을 가리키고 있었을 수 있다. */ fromRepresentationCount?: number; } export interface MoveSpaceJudgement { /** 있으면 옮기지 않는다. */ refusal?: MoveSpaceRefusal; /** 옮기되 함께 알린다. 비어 있으면 잃는 것이 없다. */ warnings: MoveSpaceWarning[]; } /** 옮겨도 되나 — 되면 무엇을 알려야 하나. */ export declare function judgeMoveTwinSpace(input: MoveSpaceInput): MoveSpaceJudgement; /** 뗄 수 없는 이유 — 언어 중립 코드. */ export type DetachSpaceRefusalCode = 'twin-not-found' | 'no-space' | 'bench-copy'; /** 떼도 되지만 알아야 하는 것. */ export type DetachSpaceWarningCode = 'no-stage' | 'representations-left-behind' | 'timebase-kept'; export type DetachSpaceRefusal = MoveSpaceNote; export type DetachSpaceWarning = MoveSpaceNote; export interface DetachSpaceInput { instanceId?: string; /** 지금 속한 공간 — 없으면 뗄 것이 없다. */ fromSpaceId?: string; purpose?: string; /** 옛 공간의 표현 수. */ fromRepresentationCount?: number; /** 옛 공간의 시간대 — 있으면 그 기준이 model 에 남는다. */ fromTimezone?: string; } export interface DetachSpaceJudgement { refusal?: DetachSpaceRefusal; warnings: DetachSpaceWarning[]; } /** 떼도 되나 — 되면 무엇을 알려야 하나. */ export declare function judgeDetachTwinSpace(input: DetachSpaceInput): DetachSpaceJudgement;