import { CmsLabel, NewCmsLabel } from '../entities/cms-labels.js'; import { CmsLabelValue, NewCmsLabelValue } from '../entities/cms-label-values.js'; import { NewCmsDraftCache } from '../entities/cms-draft-cache.js'; import { NewCmsPublishedCache } from '../entities/cms-published-cache.js'; import 'drizzle-orm/pg-core'; /** * CMS Labels Repository * * 라벨 메타데이터 관리를 위한 Repository */ /** * 라벨 목록 조회 */ declare function findMany(options?: { section?: string; }): Promise; /** * 전체 라벨 수 조회 */ declare function count(section?: string): Promise; /** * ID로 라벨 조회 */ declare function findById(id: number): Promise; /** * Key로 라벨 조회 */ declare function findByKey(key: string): Promise; /** * 섹션으로 모든 라벨 조회 */ declare function findBySection$1(section: string): Promise; /** * 라벨 생성 */ declare function create(data: NewCmsLabel): Promise; /** * 라벨 수정 */ declare function updateById(id: number, data: Partial): Promise; /** * 라벨 삭제 */ declare function deleteById(id: number): Promise; declare const cmsLabelsRepository: { findMany: typeof findMany; count: typeof count; findById: typeof findById; findByKey: typeof findByKey; findBySection: typeof findBySection$1; create: typeof create; updateById: typeof updateById; deleteById: typeof deleteById; }; /** * CMS Label Values Repository * * 라벨 값 관리를 위한 Repository */ /** * 특정 라벨의 특정 버전 값들 조회 */ declare function findByLabelIdAndVersion(labelId: number, version: number, options?: { locale?: string; breakpoint?: string | null; }): Promise; /** * 값 저장 (upsert) * - version: null → Draft 저장 (덮어쓰기) * - version: number → Published 버전 생성 (불변) */ declare function upsert$2(data: NewCmsLabelValue): Promise; /** * Draft 값들 조회 (version = null) */ declare function findDraftsByLabelId(labelId: number): Promise; /** * 여러 값 일괄 저장 */ declare function upsertMany(values: NewCmsLabelValue[]): Promise; /** * 특정 버전의 모든 값 삭제 */ declare function deleteByVersion(labelId: number, version: number): Promise; declare const cmsLabelValuesRepository: { findByLabelIdAndVersion: typeof findByLabelIdAndVersion; findDraftsByLabelId: typeof findDraftsByLabelId; upsert: typeof upsert$2; upsertMany: typeof upsertMany; deleteByVersion: typeof deleteByVersion; }; /** * CMS Draft Cache Repository * * 관리자별 초안 캐시 관리 (동시 편집 지원) */ /** * 섹션 + 언어 + 사용자로 초안 캐시 조회 */ declare function findByUser(section: string, locale: string, userId: string): Promise<{ id: number; section: string; locale: string; content: unknown; updatedAt: Date; userId: string; } | null>; /** * 초안 캐시 생성 또는 업데이트 (UPSERT) */ declare function upsert$1(data: NewCmsDraftCache): Promise<{ id: number; section: string; locale: string; content: unknown; updatedAt: Date; userId: string; }>; /** * 특정 사용자의 모든 초안 조회 */ declare function findAllByUser(userId: string): Promise<{ id: number; section: string; locale: string; content: unknown; updatedAt: Date; userId: string; }[]>; /** * 초안 삭제 */ declare function deleteByUser(section: string, locale: string, userId: string): Promise; /** * 오래된 초안 정리 (30일 이상 미사용) */ declare function cleanupOldDrafts(daysOld?: number): Promise<{ id: number; section: string; locale: string; content: unknown; updatedAt: Date; userId: string; }[]>; declare const cmsDraftCacheRepository: { findByUser: typeof findByUser; upsert: typeof upsert$1; findAllByUser: typeof findAllByUser; deleteByUser: typeof deleteByUser; cleanupOldDrafts: typeof cleanupOldDrafts; }; /** * CMS Published Cache Repository * * 발행된 콘텐츠 캐시 관리 (초고속 조회) */ /** * 섹션 + 언어로 발행된 캐시 조회 */ declare function findBySection(section: string, locale?: string): Promise<{ id: number; section: string; locale: string; content: unknown; version: number; publishedAt: Date; publishedBy: string | null; } | null>; /** * 캐시 생성 또는 업데이트 (UPSERT) */ declare function upsert(data: NewCmsPublishedCache): Promise<{ id: number; section: string; locale: string; content: unknown; version: number; publishedAt: Date; publishedBy: string | null; }>; /** * 섹션별 모든 언어 캐시 조회 */ declare function findAllLanguages(section: string): Promise<{ id: number; section: string; locale: string; content: unknown; version: number; publishedAt: Date; publishedBy: string | null; }[]>; /** * 캐시 삭제 */ declare function deleteBySection(section: string, locale?: string): Promise; declare const cmsPublishedCacheRepository: { findBySection: typeof findBySection; upsert: typeof upsert; findAllLanguages: typeof findAllLanguages; deleteBySection: typeof deleteBySection; }; export { cmsDraftCacheRepository, cmsLabelValuesRepository, cmsLabelsRepository, cmsPublishedCacheRepository };