@spfn/cms 0.1.0-alpha.8 → 0.1.0-alpha.80
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/README.md +28 -416
- package/dist/{helpers/locale.actions.d.ts → actions-BEFWwQsh.d.ts} +70 -7
- package/dist/actions.d.ts +2 -9
- package/dist/actions.js +99 -10
- package/dist/actions.js.map +1 -1
- package/dist/api.d.ts +319 -0
- package/dist/api.js +467 -0
- package/dist/api.js.map +1 -0
- package/dist/client.d.ts +135 -127
- package/dist/client.js +1318 -59
- package/dist/client.js.map +1 -1
- package/dist/{types.d.ts → index-Dh5FjWzR.d.ts} +45 -7
- package/dist/index.d.ts +112 -16
- package/dist/index.js +625 -23
- package/dist/index.js.map +1 -1
- package/dist/label-sync-generator-B0EmvtWM.d.ts +32 -0
- package/dist/lib/contracts/labels.d.ts +244 -0
- package/dist/lib/contracts/labels.js +269 -0
- package/dist/lib/contracts/labels.js.map +1 -0
- package/dist/lib/contracts/published-cache.d.ts +48 -0
- package/dist/lib/contracts/published-cache.js +49 -0
- package/dist/lib/contracts/published-cache.js.map +1 -0
- package/dist/lib/contracts/values.d.ts +71 -0
- package/dist/lib/contracts/values.js +104 -0
- package/dist/lib/contracts/values.js.map +1 -0
- package/dist/locale.constants-BNkSdNP1.d.ts +108 -0
- package/dist/{entities → server/entities}/cms-audit-logs.d.ts +15 -70
- package/dist/server/entities/cms-audit-logs.js +78 -0
- package/dist/server/entities/cms-audit-logs.js.map +1 -0
- package/dist/{entities → server/entities}/cms-draft-cache.d.ts +13 -73
- package/dist/server/entities/cms-draft-cache.js +38 -0
- package/dist/server/entities/cms-draft-cache.js.map +1 -0
- package/dist/{entities → server/entities}/cms-label-values.d.ts +16 -67
- package/dist/server/entities/cms-label-values.js +81 -0
- package/dist/server/entities/cms-label-values.js.map +1 -0
- package/dist/{entities → server/entities}/cms-labels.d.ts +17 -14
- package/dist/server/entities/cms-labels.js +42 -0
- package/dist/server/entities/cms-labels.js.map +1 -0
- package/dist/{entities → server/entities}/cms-published-cache.d.ts +14 -69
- package/dist/server/entities/cms-published-cache.js +36 -0
- package/dist/server/entities/cms-published-cache.js.map +1 -0
- package/dist/server/entities/index.d.ts +6 -0
- package/dist/server/entities/index.js +185 -0
- package/dist/server/entities/index.js.map +1 -0
- package/dist/server/generators/index.d.ts +19 -0
- package/dist/server/generators/index.js +724 -0
- package/dist/server/generators/index.js.map +1 -0
- package/dist/server/labels/index.d.ts +1 -0
- package/dist/server/labels/index.js +33 -0
- package/dist/server/labels/index.js.map +1 -0
- package/dist/server/repositories/index.d.ts +212 -0
- package/dist/server/repositories/index.js +418 -0
- package/dist/server/repositories/index.js.map +1 -0
- package/dist/server/routes/labels/[id]/admin/index.js +679 -0
- package/dist/server/routes/labels/[id]/admin/index.js.map +1 -0
- package/dist/server/routes/labels/[id]/index.js +576 -0
- package/dist/server/routes/labels/[id]/index.js.map +1 -0
- package/dist/server/routes/labels/[id]/publish/index.js +720 -0
- package/dist/server/routes/labels/[id]/publish/index.js.map +1 -0
- package/dist/server/routes/labels/[id]/versions/index.js +548 -0
- package/dist/server/routes/labels/[id]/versions/index.js.map +1 -0
- package/dist/server/routes/labels/_id_/admin/index.d.ts +11 -0
- package/dist/{routes/labels/[id] → server/routes/labels/_id_}/index.d.ts +5 -3
- package/dist/server/routes/labels/_id_/publish/index.d.ts +11 -0
- package/dist/server/routes/labels/_id_/versions/index.d.ts +11 -0
- package/dist/server/routes/labels/by-key/[key]/index.js +525 -0
- package/dist/server/routes/labels/by-key/[key]/index.js.map +1 -0
- package/dist/server/routes/labels/by-key/_key_/index.d.ts +10 -0
- package/dist/server/routes/labels/index.d.ts +12 -0
- package/dist/server/routes/labels/index.js +684 -0
- package/dist/server/routes/labels/index.js.map +1 -0
- package/dist/server/routes/published-cache/index.d.ts +11 -0
- package/dist/server/routes/published-cache/index.js +337 -0
- package/dist/server/routes/published-cache/index.js.map +1 -0
- package/dist/server/routes/values/[labelId]/[version]/index.js +457 -0
- package/dist/server/routes/values/[labelId]/[version]/index.js.map +1 -0
- package/dist/server/routes/values/[labelId]/index.js +452 -0
- package/dist/server/routes/values/[labelId]/index.js.map +1 -0
- package/dist/server/routes/values/_labelId_/_version_/index.d.ts +10 -0
- package/dist/server/routes/values/_labelId_/index.d.ts +10 -0
- package/dist/server.d.ts +77 -7
- package/dist/server.js +1740 -247
- package/dist/server.js.map +1 -1
- package/migrations/0000_init.sql +3 -0
- package/migrations/0001_far_lady_vermin.sql +86 -0
- package/migrations/0002_heavy_the_enforcers.sql +2 -0
- package/migrations/0003_rare_runaways.sql +1 -0
- package/migrations/meta/0000_snapshot.json +15 -0
- package/migrations/meta/0001_snapshot.json +687 -0
- package/migrations/meta/0002_snapshot.json +686 -0
- package/migrations/meta/0003_snapshot.json +563 -0
- package/migrations/meta/_journal.json +34 -0
- package/package.json +55 -36
- package/dist/actions.d.ts.map +0 -1
- package/dist/client.d.ts.map +0 -1
- package/dist/cms.config.d.ts +0 -77
- package/dist/cms.config.d.ts.map +0 -1
- package/dist/cms.config.js +0 -111
- package/dist/cms.config.js.map +0 -1
- package/dist/entities/cms-audit-logs.d.ts.map +0 -1
- package/dist/entities/cms-audit-logs.js +0 -103
- package/dist/entities/cms-audit-logs.js.map +0 -1
- package/dist/entities/cms-draft-cache.d.ts.map +0 -1
- package/dist/entities/cms-draft-cache.js +0 -112
- package/dist/entities/cms-draft-cache.js.map +0 -1
- package/dist/entities/cms-label-values.d.ts.map +0 -1
- package/dist/entities/cms-label-values.js +0 -105
- package/dist/entities/cms-label-values.js.map +0 -1
- package/dist/entities/cms-label-versions.d.ts +0 -207
- package/dist/entities/cms-label-versions.d.ts.map +0 -1
- package/dist/entities/cms-label-versions.js +0 -80
- package/dist/entities/cms-label-versions.js.map +0 -1
- package/dist/entities/cms-labels.d.ts.map +0 -1
- package/dist/entities/cms-labels.js +0 -48
- package/dist/entities/cms-labels.js.map +0 -1
- package/dist/entities/cms-published-cache.d.ts.map +0 -1
- package/dist/entities/cms-published-cache.js +0 -103
- package/dist/entities/cms-published-cache.js.map +0 -1
- package/dist/entities/index.d.ts +0 -10
- package/dist/entities/index.d.ts.map +0 -1
- package/dist/entities/index.js +0 -10
- package/dist/entities/index.js.map +0 -1
- package/dist/generators/index.d.ts +0 -19
- package/dist/generators/index.d.ts.map +0 -1
- package/dist/generators/index.js +0 -19
- package/dist/generators/index.js.map +0 -1
- package/dist/generators/label-sync-generator.d.ts +0 -33
- package/dist/generators/label-sync-generator.d.ts.map +0 -1
- package/dist/generators/label-sync-generator.js +0 -86
- package/dist/generators/label-sync-generator.js.map +0 -1
- package/dist/helpers/locale.actions.d.ts.map +0 -1
- package/dist/helpers/locale.actions.js +0 -210
- package/dist/helpers/locale.actions.js.map +0 -1
- package/dist/helpers/locale.constants.d.ts +0 -10
- package/dist/helpers/locale.constants.d.ts.map +0 -1
- package/dist/helpers/locale.constants.js +0 -10
- package/dist/helpers/locale.constants.js.map +0 -1
- package/dist/helpers/locale.d.ts +0 -17
- package/dist/helpers/locale.d.ts.map +0 -1
- package/dist/helpers/locale.js +0 -20
- package/dist/helpers/locale.js.map +0 -1
- package/dist/helpers/sync.d.ts +0 -41
- package/dist/helpers/sync.d.ts.map +0 -1
- package/dist/helpers/sync.js +0 -309
- package/dist/helpers/sync.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/init.d.ts +0 -31
- package/dist/init.d.ts.map +0 -1
- package/dist/init.js +0 -36
- package/dist/init.js.map +0 -1
- package/dist/labels/helpers.d.ts +0 -31
- package/dist/labels/helpers.d.ts.map +0 -1
- package/dist/labels/helpers.js +0 -60
- package/dist/labels/helpers.js.map +0 -1
- package/dist/labels/index.d.ts +0 -7
- package/dist/labels/index.d.ts.map +0 -1
- package/dist/labels/index.js +0 -7
- package/dist/labels/index.js.map +0 -1
- package/dist/repositories/cms-draft-cache.repository.d.ts +0 -62
- package/dist/repositories/cms-draft-cache.repository.d.ts.map +0 -1
- package/dist/repositories/cms-draft-cache.repository.js +0 -56
- package/dist/repositories/cms-draft-cache.repository.js.map +0 -1
- package/dist/repositories/cms-label-values.repository.d.ts +0 -32
- package/dist/repositories/cms-label-values.repository.d.ts.map +0 -1
- package/dist/repositories/cms-label-values.repository.js +0 -72
- package/dist/repositories/cms-label-values.repository.js.map +0 -1
- package/dist/repositories/cms-labels.repository.d.ts +0 -53
- package/dist/repositories/cms-labels.repository.d.ts.map +0 -1
- package/dist/repositories/cms-labels.repository.js +0 -77
- package/dist/repositories/cms-labels.repository.js.map +0 -1
- package/dist/repositories/cms-published-cache.repository.d.ts +0 -53
- package/dist/repositories/cms-published-cache.repository.d.ts.map +0 -1
- package/dist/repositories/cms-published-cache.repository.js +0 -54
- package/dist/repositories/cms-published-cache.repository.js.map +0 -1
- package/dist/repositories/index.d.ts +0 -8
- package/dist/repositories/index.d.ts.map +0 -1
- package/dist/repositories/index.js +0 -9
- package/dist/repositories/index.js.map +0 -1
- package/dist/routes/labels/[id]/contract.d.ts +0 -68
- package/dist/routes/labels/[id]/contract.d.ts.map +0 -1
- package/dist/routes/labels/[id]/contract.js +0 -84
- package/dist/routes/labels/[id]/contract.js.map +0 -1
- package/dist/routes/labels/[id]/index.d.ts.map +0 -1
- package/dist/routes/labels/[id]/index.js +0 -96
- package/dist/routes/labels/[id]/index.js.map +0 -1
- package/dist/routes/labels/by-key/[key]/contract.d.ts +0 -24
- package/dist/routes/labels/by-key/[key]/contract.d.ts.map +0 -1
- package/dist/routes/labels/by-key/[key]/contract.js +0 -28
- package/dist/routes/labels/by-key/[key]/contract.js.map +0 -1
- package/dist/routes/labels/by-key/[key]/index.d.ts +0 -8
- package/dist/routes/labels/by-key/[key]/index.d.ts.map +0 -1
- package/dist/routes/labels/by-key/[key]/index.js +0 -32
- package/dist/routes/labels/by-key/[key]/index.js.map +0 -1
- package/dist/routes/labels/contract.d.ts +0 -59
- package/dist/routes/labels/contract.d.ts.map +0 -1
- package/dist/routes/labels/contract.js +0 -75
- package/dist/routes/labels/contract.js.map +0 -1
- package/dist/routes/labels/index.d.ts +0 -10
- package/dist/routes/labels/index.d.ts.map +0 -1
- package/dist/routes/labels/index.js +0 -73
- package/dist/routes/labels/index.js.map +0 -1
- package/dist/routes/published-cache/contract.d.ts +0 -25
- package/dist/routes/published-cache/contract.d.ts.map +0 -1
- package/dist/routes/published-cache/contract.js +0 -35
- package/dist/routes/published-cache/contract.js.map +0 -1
- package/dist/routes/published-cache/index.d.ts +0 -8
- package/dist/routes/published-cache/index.d.ts.map +0 -1
- package/dist/routes/published-cache/index.js +0 -33
- package/dist/routes/published-cache/index.js.map +0 -1
- package/dist/routes/values/[labelId]/[version]/contract.d.ts +0 -29
- package/dist/routes/values/[labelId]/[version]/contract.d.ts.map +0 -1
- package/dist/routes/values/[labelId]/[version]/contract.js +0 -33
- package/dist/routes/values/[labelId]/[version]/contract.js.map +0 -1
- package/dist/routes/values/[labelId]/[version]/index.d.ts +0 -8
- package/dist/routes/values/[labelId]/[version]/index.d.ts.map +0 -1
- package/dist/routes/values/[labelId]/[version]/index.js +0 -45
- package/dist/routes/values/[labelId]/[version]/index.js.map +0 -1
- package/dist/routes/values/[labelId]/contract.d.ts +0 -38
- package/dist/routes/values/[labelId]/contract.d.ts.map +0 -1
- package/dist/routes/values/[labelId]/contract.js +0 -59
- package/dist/routes/values/[labelId]/contract.js.map +0 -1
- package/dist/routes/values/[labelId]/index.d.ts +0 -8
- package/dist/routes/values/[labelId]/index.d.ts.map +0 -1
- package/dist/routes/values/[labelId]/index.js +0 -42
- package/dist/routes/values/[labelId]/index.js.map +0 -1
- package/dist/server.d.ts.map +0 -1
- package/dist/store.d.ts +0 -87
- package/dist/store.d.ts.map +0 -1
- package/dist/store.js +0 -205
- package/dist/store.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -7
- package/dist/types.js.map +0 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB;;;;;;;GAOG;AAEH,oBAAoB;AACpB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG7E,kDAAkD;AAClD,cAAc,UAAU,CAAC;AAGzB,oCAAoC;AACpC,cAAc,gBAAgB,CAAC;AAE/B,iCAAiC;AACjC,cAAc,YAAY,CAAC;AAE3B,wDAAwD;AACxD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzF,sDAAsD;AACtD,cAAc,UAAU,CAAC;AAEzB,gDAAgD;AAChD,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../src/server/config/cms.config.ts","../src/lib/constants/index.ts","../src/lib/constants/locale.constants.ts"],"sourcesContent":["/**\n * CMS Configuration Module\n *\n * 환경변수 기반 CMS 설정 관리\n * - SPFN_CMS_DEFAULT_LOCALE: 기본 언어 (기본값: 'ko')\n * - SPFN_CMS_SUPPORTED_LOCALES: 지원 언어 목록, 쉼표로 구분 (기본값: 'ko,en')\n * - SPFN_CMS_DETECT_BROWSER_LANGUAGE: 브라우저 언어 자동 감지 (기본값: 'false')\n */\n\n/**\n * CMS 설정 타입\n */\nexport interface CmsConfig\n{\n /**\n * 기본 언어 코드\n * @example 'ko', 'en', 'ja'\n */\n defaultLocale: string;\n\n /**\n * 프로젝트에서 사용할 언어 목록\n * @example ['ko', 'en', 'ja']\n */\n locales: string[];\n\n /**\n * @deprecated Use 'locales' instead\n * @internal For backward compatibility\n */\n supportedLocales: string[];\n\n /**\n * 브라우저 언어 자동 감지 여부\n * @default true\n */\n detectBrowserLanguage: boolean;\n}\n\n/**\n * 환경변수 읽기 헬퍼\n */\nfunction getEnvVar(key: string, defaultValue: string): string\n{\n return process.env[key] || defaultValue;\n}\n\n/**\n * 환경변수에서 boolean 읽기\n */\nfunction getEnvBoolean(key: string, defaultValue: boolean): boolean\n{\n const value = process.env[key];\n if (value === undefined) return defaultValue;\n return value === 'true' || value === '1';\n}\n\n/**\n * 환경변수에서 설정 로드\n */\nfunction loadConfigFromEnv(): CmsConfig\n{\n const defaultLocale = getEnvVar('SPFN_CMS_DEFAULT_LOCALE', 'en');\n const supportedLocalesStr = getEnvVar('SPFN_CMS_SUPPORTED_LOCALES', 'en,ko');\n const detectBrowserLanguage = getEnvBoolean('SPFN_CMS_DETECT_BROWSER_LANGUAGE', true);\n\n const locales = supportedLocalesStr\n .split(',')\n .map(locale => locale.trim())\n .filter(locale => locale.length > 0);\n\n // 기본 언어가 지원 목록에 없으면 추가\n if (!locales.includes(defaultLocale))\n {\n locales.unshift(defaultLocale);\n }\n\n return {\n defaultLocale,\n locales,\n supportedLocales: locales, // backward compatibility\n detectBrowserLanguage,\n };\n}\n\n/**\n * 현재 설정 (환경변수에서 초기화)\n */\nlet currentConfig: CmsConfig = loadConfigFromEnv();\n\n/**\n * CMS 설정 조회\n *\n * @returns 현재 CMS 설정\n *\n * @example\n * ```tsx\n * import { getCmsConfig } from '@spfn/cms';\n *\n * const config = getCmsConfig();\n * console.log(config.defaultLocale); // 'en'\n * console.log(config.locales); // ['en', 'ko']\n * ```\n */\nexport function getCmsConfig(): Readonly<CmsConfig>\n{\n return currentConfig;\n}\n\n/**\n * CMS 설정 변경 (런타임 오버라이드)\n *\n * 환경변수 설정을 런타임에 오버라이드합니다.\n * 주로 테스트나 특수한 경우에 사용됩니다.\n *\n * @param config - 변경할 설정 (부분 업데이트 가능)\n *\n * @example\n * ```tsx\n * import { configureCms } from '@spfn/cms';\n *\n * // 앱 초기화 시 (선택적)\n * configureCms({\n * defaultLocale: 'en',\n * locales: ['en', 'ko', 'ja'],\n * detectBrowserLanguage: true,\n * });\n * ```\n */\nexport function configureCms(config: Partial<CmsConfig>): void\n{\n // Backward compatibility: supportedLocales → locales\n if (config.supportedLocales && !config.locales)\n {\n config = { ...config, locales: config.supportedLocales };\n }\n\n currentConfig = {\n ...currentConfig,\n ...config,\n };\n\n // Sync locales ↔ supportedLocales\n if (config.locales)\n {\n currentConfig.supportedLocales = config.locales;\n }\n else if (config.supportedLocales)\n {\n currentConfig.locales = config.supportedLocales;\n }\n\n // 기본 언어가 지원 목록에 있는지 확인\n if (config.defaultLocale && !currentConfig.locales.includes(config.defaultLocale))\n {\n console.warn(\n `[CMS Config] Default locale '${config.defaultLocale}' not in locales, adding automatically.`,\n `Locales: [${currentConfig.locales.join(', ')}]`\n );\n\n currentConfig.locales.unshift(config.defaultLocale);\n currentConfig.supportedLocales.unshift(config.defaultLocale);\n }\n}\n\n/**\n * 설정 초기화 (환경변수에서 재로드)\n *\n * @example\n * ```tsx\n * import { resetCmsConfig } from '@spfn/cms';\n *\n * // 환경변수 설정으로 되돌리기\n * resetCmsConfig();\n * ```\n */\nexport function resetCmsConfig(): void\n{\n currentConfig = loadConfigFromEnv();\n}","/**\n * CMS Constants\n *\n * CMS 패키지에서 사용하는 전역 상수\n */\n\n/**\n * 기본 라벨 디렉토리 경로\n *\n * JSON 라벨 파일이 저장되는 기본 디렉토리입니다.\n * 프로젝트 루트 기준 상대 경로입니다.\n *\n * @example\n * ```typescript\n * import { DEFAULT_LABELS_DIR } from '@spfn/cms';\n *\n * console.log(DEFAULT_LABELS_DIR); // 'src/lib/labels'\n * ```\n */\nexport const DEFAULT_LABELS_DIR = 'src/lib/labels';","/**\n * Locale Constants\n *\n * Server/Client 양쪽에서 사용 가능한 locale 관련 상수\n */\n\n/**\n * Locale 쿠키 키\n */\nexport const LOCALE_COOKIE_KEY = 'spfn-locale';\n\n/**\n * 지원하는 Locale 타입 (Type-safe)\n */\nexport type SupportedLocale =\n // 아시아-태평양\n | 'ko' // 한국어\n | 'ja' // 일본어\n | 'zh' // 중국어 (간체)\n | 'zh-TW' // 중국어 (번체, 대만)\n | 'zh-HK' // 중국어 (홍콩)\n | 'hi' // 힌디어\n | 'th' // 태국어\n | 'vi' // 베트남어\n | 'id' // 인도네시아어\n | 'ms' // 말레이어\n // 영어권\n | 'en' // 영어 (미국)\n | 'en-GB' // 영어 (영국)\n | 'en-CA' // 영어 (캐나다)\n | 'en-AU' // 영어 (호주)\n | 'en-NZ' // 영어 (뉴질랜드)\n // 서유럽\n | 'es' // 스페인어 (스페인)\n | 'es-MX' // 스페인어 (멕시코)\n | 'es-AR' // 스페인어 (아르헨티나)\n | 'es-CO' // 스페인어 (콜롬비아)\n | 'fr' // 프랑스어\n | 'de' // 독일어\n | 'it' // 이탈리아어\n | 'pt' // 포르투갈어\n | 'nl' // 네덜란드어\n // 북유럽\n | 'sv' // 스웨덴어\n | 'no' // 노르웨이어\n | 'da' // 덴마크어\n | 'fi' // 핀란드어\n // 동유럽\n | 'ru' // 러시아어\n | 'pl' // 폴란드어\n | 'uk' // 우크라이나어\n | 'cs' // 체코어\n | 'hu' // 헝가리어\n | 'ro' // 루마니아어\n | 'bg' // 불가리아어\n | 'hr' // 크로아티아어\n | 'sr' // 세르비아어\n | 'sk' // 슬로바키아어\n | 'sl' // 슬로베니아어\n | 'lt' // 리투아니아어\n | 'lv' // 라트비아어\n | 'et' // 에스토니아어\n // 남유럽\n | 'el' // 그리스어\n // 중동\n | 'tr' // 터키어\n | 'ar' // 아랍어\n | 'fa' // 페르시아어\n | 'he' // 히브리어\n // 아프리카\n | 'sw'; // 스와힐리어\n\n/**\n * 국가/지역 정보 타입\n */\nexport interface LocaleInfo\n{\n /** Locale 코드 (ISO 639-1) */\n locale: SupportedLocale;\n /** 국가 코드 (ISO 3166-1 alpha-2) */\n countryCode: string;\n /** 국기 이모지 (HTML/React용) */\n flag: string;\n /** 전화번호 국가 코드 */\n dialCode: string;\n /** 네이티브 이름 (현지어) */\n nativeName: string;\n /** 영어 이름 */\n englishName: string;\n /** RTL (Right-to-Left) 여부 */\n rtl?: boolean;\n /** 통화 코드 (ISO 4217) */\n currencyCode?: string;\n /** 날짜 형식 예시 */\n dateFormat?: string;\n}\n\n/**\n * 사전 정의된 Locale 정보 맵\n *\n * 주요 언어/국가 정보를 포함합니다.\n * 프로젝트에 맞게 추가/수정 가능합니다.\n */\nexport const LOCALE_INFO_MAP: Record<SupportedLocale, LocaleInfo> = {\n // 한국어\n ko: {\n locale: 'ko',\n countryCode: 'KR',\n flag: '🇰🇷',\n dialCode: '+82',\n nativeName: '한국어',\n englishName: 'Korean',\n currencyCode: 'KRW',\n dateFormat: 'YYYY.MM.DD',\n },\n\n // 영어 (미국)\n en: {\n locale: 'en',\n countryCode: 'US',\n flag: '🇺🇸',\n dialCode: '+1',\n nativeName: 'English',\n englishName: 'English',\n currencyCode: 'USD',\n dateFormat: 'MM/DD/YYYY',\n },\n\n // 일본어\n ja: {\n locale: 'ja',\n countryCode: 'JP',\n flag: '🇯🇵',\n dialCode: '+81',\n nativeName: '日本語',\n englishName: 'Japanese',\n currencyCode: 'JPY',\n dateFormat: 'YYYY/MM/DD',\n },\n\n // 중국어 (간체)\n zh: {\n locale: 'zh',\n countryCode: 'CN',\n flag: '🇨🇳',\n dialCode: '+86',\n nativeName: '简体中文',\n englishName: 'Chinese (Simplified)',\n currencyCode: 'CNY',\n dateFormat: 'YYYY-MM-DD',\n },\n\n // 중국어 (번체, 대만)\n 'zh-TW': {\n locale: 'zh-TW',\n countryCode: 'TW',\n flag: '🇹🇼',\n dialCode: '+886',\n nativeName: '繁體中文',\n englishName: 'Chinese (Traditional)',\n currencyCode: 'TWD',\n dateFormat: 'YYYY/MM/DD',\n },\n\n // 스페인어\n es: {\n locale: 'es',\n countryCode: 'ES',\n flag: '🇪🇸',\n dialCode: '+34',\n nativeName: 'Español',\n englishName: 'Spanish',\n currencyCode: 'EUR',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 프랑스어\n fr: {\n locale: 'fr',\n countryCode: 'FR',\n flag: '🇫🇷',\n dialCode: '+33',\n nativeName: 'Français',\n englishName: 'French',\n currencyCode: 'EUR',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 독일어\n de: {\n locale: 'de',\n countryCode: 'DE',\n flag: '🇩🇪',\n dialCode: '+49',\n nativeName: 'Deutsch',\n englishName: 'German',\n currencyCode: 'EUR',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 이탈리아어\n it: {\n locale: 'it',\n countryCode: 'IT',\n flag: '🇮🇹',\n dialCode: '+39',\n nativeName: 'Italiano',\n englishName: 'Italian',\n currencyCode: 'EUR',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 포르투갈어 (브라질)\n pt: {\n locale: 'pt',\n countryCode: 'BR',\n flag: '🇧🇷',\n dialCode: '+55',\n nativeName: 'Português',\n englishName: 'Portuguese',\n currencyCode: 'BRL',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 러시아어\n ru: {\n locale: 'ru',\n countryCode: 'RU',\n flag: '🇷🇺',\n dialCode: '+7',\n nativeName: 'Русский',\n englishName: 'Russian',\n currencyCode: 'RUB',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 아랍어\n ar: {\n locale: 'ar',\n countryCode: 'SA',\n flag: '🇸🇦',\n dialCode: '+966',\n nativeName: 'العربية',\n englishName: 'Arabic',\n rtl: true,\n currencyCode: 'SAR',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 힌디어\n hi: {\n locale: 'hi',\n countryCode: 'IN',\n flag: '🇮🇳',\n dialCode: '+91',\n nativeName: 'हिन्दी',\n englishName: 'Hindi',\n currencyCode: 'INR',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 태국어\n th: {\n locale: 'th',\n countryCode: 'TH',\n flag: '🇹🇭',\n dialCode: '+66',\n nativeName: 'ไทย',\n englishName: 'Thai',\n currencyCode: 'THB',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 베트남어\n vi: {\n locale: 'vi',\n countryCode: 'VN',\n flag: '🇻🇳',\n dialCode: '+84',\n nativeName: 'Tiếng Việt',\n englishName: 'Vietnamese',\n currencyCode: 'VND',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 인도네시아어\n id: {\n locale: 'id',\n countryCode: 'ID',\n flag: '🇮🇩',\n dialCode: '+62',\n nativeName: 'Bahasa Indonesia',\n englishName: 'Indonesian',\n currencyCode: 'IDR',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 터키어\n tr: {\n locale: 'tr',\n countryCode: 'TR',\n flag: '🇹🇷',\n dialCode: '+90',\n nativeName: 'Türkçe',\n englishName: 'Turkish',\n currencyCode: 'TRY',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 폴란드어\n pl: {\n locale: 'pl',\n countryCode: 'PL',\n flag: '🇵🇱',\n dialCode: '+48',\n nativeName: 'Polski',\n englishName: 'Polish',\n currencyCode: 'PLN',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 네덜란드어\n nl: {\n locale: 'nl',\n countryCode: 'NL',\n flag: '🇳🇱',\n dialCode: '+31',\n nativeName: 'Nederlands',\n englishName: 'Dutch',\n currencyCode: 'EUR',\n dateFormat: 'DD-MM-YYYY',\n },\n\n // 중국어 (홍콩)\n 'zh-HK': {\n locale: 'zh-HK',\n countryCode: 'HK',\n flag: '🇭🇰',\n dialCode: '+852',\n nativeName: '繁體中文 (香港)',\n englishName: 'Chinese (Hong Kong)',\n currencyCode: 'HKD',\n dateFormat: 'YYYY/MM/DD',\n },\n\n // 말레이어\n ms: {\n locale: 'ms',\n countryCode: 'MY',\n flag: '🇲🇾',\n dialCode: '+60',\n nativeName: 'Bahasa Melayu',\n englishName: 'Malay',\n currencyCode: 'MYR',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 영어 (영국)\n 'en-GB': {\n locale: 'en-GB',\n countryCode: 'GB',\n flag: '🇬🇧',\n dialCode: '+44',\n nativeName: 'English (UK)',\n englishName: 'English (United Kingdom)',\n currencyCode: 'GBP',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 영어 (캐나다)\n 'en-CA': {\n locale: 'en-CA',\n countryCode: 'CA',\n flag: '🇨🇦',\n dialCode: '+1',\n nativeName: 'English (Canada)',\n englishName: 'English (Canada)',\n currencyCode: 'CAD',\n dateFormat: 'YYYY-MM-DD',\n },\n\n // 영어 (호주)\n 'en-AU': {\n locale: 'en-AU',\n countryCode: 'AU',\n flag: '🇦🇺',\n dialCode: '+61',\n nativeName: 'English (Australia)',\n englishName: 'English (Australia)',\n currencyCode: 'AUD',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 영어 (뉴질랜드)\n 'en-NZ': {\n locale: 'en-NZ',\n countryCode: 'NZ',\n flag: '🇳🇿',\n dialCode: '+64',\n nativeName: 'English (New Zealand)',\n englishName: 'English (New Zealand)',\n currencyCode: 'NZD',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 스페인어 (멕시코)\n 'es-MX': {\n locale: 'es-MX',\n countryCode: 'MX',\n flag: '🇲🇽',\n dialCode: '+52',\n nativeName: 'Español (México)',\n englishName: 'Spanish (Mexico)',\n currencyCode: 'MXN',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 스페인어 (아르헨티나)\n 'es-AR': {\n locale: 'es-AR',\n countryCode: 'AR',\n flag: '🇦🇷',\n dialCode: '+54',\n nativeName: 'Español (Argentina)',\n englishName: 'Spanish (Argentina)',\n currencyCode: 'ARS',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 스페인어 (콜롬비아)\n 'es-CO': {\n locale: 'es-CO',\n countryCode: 'CO',\n flag: '🇨🇴',\n dialCode: '+57',\n nativeName: 'Español (Colombia)',\n englishName: 'Spanish (Colombia)',\n currencyCode: 'COP',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 스웨덴어\n sv: {\n locale: 'sv',\n countryCode: 'SE',\n flag: '🇸🇪',\n dialCode: '+46',\n nativeName: 'Svenska',\n englishName: 'Swedish',\n currencyCode: 'SEK',\n dateFormat: 'YYYY-MM-DD',\n },\n\n // 노르웨이어\n no: {\n locale: 'no',\n countryCode: 'NO',\n flag: '🇳🇴',\n dialCode: '+47',\n nativeName: 'Norsk',\n englishName: 'Norwegian',\n currencyCode: 'NOK',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 덴마크어\n da: {\n locale: 'da',\n countryCode: 'DK',\n flag: '🇩🇰',\n dialCode: '+45',\n nativeName: 'Dansk',\n englishName: 'Danish',\n currencyCode: 'DKK',\n dateFormat: 'DD-MM-YYYY',\n },\n\n // 핀란드어\n fi: {\n locale: 'fi',\n countryCode: 'FI',\n flag: '🇫🇮',\n dialCode: '+358',\n nativeName: 'Suomi',\n englishName: 'Finnish',\n currencyCode: 'EUR',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 우크라이나어\n uk: {\n locale: 'uk',\n countryCode: 'UA',\n flag: '🇺🇦',\n dialCode: '+380',\n nativeName: 'Українська',\n englishName: 'Ukrainian',\n currencyCode: 'UAH',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 체코어\n cs: {\n locale: 'cs',\n countryCode: 'CZ',\n flag: '🇨🇿',\n dialCode: '+420',\n nativeName: 'Čeština',\n englishName: 'Czech',\n currencyCode: 'CZK',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 헝가리어\n hu: {\n locale: 'hu',\n countryCode: 'HU',\n flag: '🇭🇺',\n dialCode: '+36',\n nativeName: 'Magyar',\n englishName: 'Hungarian',\n currencyCode: 'HUF',\n dateFormat: 'YYYY.MM.DD.',\n },\n\n // 루마니아어\n ro: {\n locale: 'ro',\n countryCode: 'RO',\n flag: '🇷🇴',\n dialCode: '+40',\n nativeName: 'Română',\n englishName: 'Romanian',\n currencyCode: 'RON',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 불가리아어\n bg: {\n locale: 'bg',\n countryCode: 'BG',\n flag: '🇧🇬',\n dialCode: '+359',\n nativeName: 'Български',\n englishName: 'Bulgarian',\n currencyCode: 'BGN',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 크로아티아어\n hr: {\n locale: 'hr',\n countryCode: 'HR',\n flag: '🇭🇷',\n dialCode: '+385',\n nativeName: 'Hrvatski',\n englishName: 'Croatian',\n currencyCode: 'HRK',\n dateFormat: 'DD.MM.YYYY.',\n },\n\n // 세르비아어\n sr: {\n locale: 'sr',\n countryCode: 'RS',\n flag: '🇷🇸',\n dialCode: '+381',\n nativeName: 'Српски',\n englishName: 'Serbian',\n currencyCode: 'RSD',\n dateFormat: 'DD.MM.YYYY.',\n },\n\n // 슬로바키아어\n sk: {\n locale: 'sk',\n countryCode: 'SK',\n flag: '🇸🇰',\n dialCode: '+421',\n nativeName: 'Slovenčina',\n englishName: 'Slovak',\n currencyCode: 'EUR',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 슬로베니아어\n sl: {\n locale: 'sl',\n countryCode: 'SI',\n flag: '🇸🇮',\n dialCode: '+386',\n nativeName: 'Slovenščina',\n englishName: 'Slovenian',\n currencyCode: 'EUR',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 리투아니아어\n lt: {\n locale: 'lt',\n countryCode: 'LT',\n flag: '🇱🇹',\n dialCode: '+370',\n nativeName: 'Lietuvių',\n englishName: 'Lithuanian',\n currencyCode: 'EUR',\n dateFormat: 'YYYY-MM-DD',\n },\n\n // 라트비아어\n lv: {\n locale: 'lv',\n countryCode: 'LV',\n flag: '🇱🇻',\n dialCode: '+371',\n nativeName: 'Latviešu',\n englishName: 'Latvian',\n currencyCode: 'EUR',\n dateFormat: 'DD.MM.YYYY.',\n },\n\n // 에스토니아어\n et: {\n locale: 'et',\n countryCode: 'EE',\n flag: '🇪🇪',\n dialCode: '+372',\n nativeName: 'Eesti',\n englishName: 'Estonian',\n currencyCode: 'EUR',\n dateFormat: 'DD.MM.YYYY',\n },\n\n // 그리스어\n el: {\n locale: 'el',\n countryCode: 'GR',\n flag: '🇬🇷',\n dialCode: '+30',\n nativeName: 'Ελληνικά',\n englishName: 'Greek',\n currencyCode: 'EUR',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 페르시아어\n fa: {\n locale: 'fa',\n countryCode: 'IR',\n flag: '🇮🇷',\n dialCode: '+98',\n nativeName: 'فارسی',\n englishName: 'Persian',\n rtl: true,\n currencyCode: 'IRR',\n dateFormat: 'YYYY/MM/DD',\n },\n\n // 히브리어\n he: {\n locale: 'he',\n countryCode: 'IL',\n flag: '🇮🇱',\n dialCode: '+972',\n nativeName: 'עברית',\n englishName: 'Hebrew',\n rtl: true,\n currencyCode: 'ILS',\n dateFormat: 'DD/MM/YYYY',\n },\n\n // 스와힐리어\n sw: {\n locale: 'sw',\n countryCode: 'KE',\n flag: '🇰🇪',\n dialCode: '+254',\n nativeName: 'Kiswahili',\n englishName: 'Swahili',\n currencyCode: 'KES',\n dateFormat: 'DD/MM/YYYY',\n },\n};\n\n/**\n * Locale 정보 가져오기\n *\n * @param locale - Locale 코드 (예: 'ko', 'en', 'ja')\n * @returns LocaleInfo 또는 undefined\n *\n * @example\n * ```typescript\n * const koInfo = getLocaleInfo('ko');\n * console.log(koInfo.flag); // 🇰🇷\n * console.log(koInfo.dialCode); // +82\n * ```\n */\nexport function getLocaleInfo(locale: string): LocaleInfo | undefined\n{\n return LOCALE_INFO_MAP[locale as SupportedLocale];\n}\n\n/**\n * 시스템이 지원 가능한 모든 Locale 목록 가져오기\n *\n * @returns Locale 코드 배열 (50+ locales available)\n */\nexport function getAllLocales(): SupportedLocale[]\n{\n return Object.keys(LOCALE_INFO_MAP) as SupportedLocale[];\n}\n\n/**\n * @deprecated Use getAllLocales() instead\n */\nexport function getSupportedLocales(): SupportedLocale[]\n{\n return getAllLocales();\n}\n\n/**\n * 국기 이모지만 가져오기\n *\n * @param locale - Locale 코드\n * @returns 국기 이모지 또는 빈 문자열\n *\n * @example\n * ```typescript\n * getFlag('ko'); // 🇰🇷\n * getFlag('en'); // 🇺🇸\n * ```\n */\nexport function getFlag(locale: string): string\n{\n return LOCALE_INFO_MAP[locale as SupportedLocale]?.flag ?? '';\n}\n\n/**\n * 전화번호 국가 코드 가져오기\n *\n * @param locale - Locale 코드\n * @returns 전화번호 코드 또는 빈 문자열\n *\n * @example\n * ```typescript\n * getDialCode('ko'); // +82\n * getDialCode('en'); // +1\n * ```\n */\nexport function getDialCode(locale: string): string\n{\n return LOCALE_INFO_MAP[locale as SupportedLocale]?.dialCode ?? '';\n}\n\n/**\n * RTL (Right-to-Left) 여부 확인\n *\n * @param locale - Locale 코드\n * @returns RTL 여부\n *\n * @example\n * ```typescript\n * isRTL('ar'); // true (Arabic)\n * isRTL('ko'); // false (Korean)\n * ```\n */\nexport function isRTL(locale: string): boolean\n{\n return LOCALE_INFO_MAP[locale as SupportedLocale]?.rtl ?? false;\n}"],"mappings":";AA0CA,SAAS,UAAU,KAAa,cAChC;AACI,SAAO,QAAQ,IAAI,GAAG,KAAK;AAC/B;AAKA,SAAS,cAAc,KAAa,cACpC;AACI,QAAM,QAAQ,QAAQ,IAAI,GAAG;AAC7B,MAAI,UAAU,OAAW,QAAO;AAChC,SAAO,UAAU,UAAU,UAAU;AACzC;AAKA,SAAS,oBACT;AACI,QAAM,gBAAgB,UAAU,2BAA2B,IAAI;AAC/D,QAAM,sBAAsB,UAAU,8BAA8B,OAAO;AAC3E,QAAM,wBAAwB,cAAc,oCAAoC,IAAI;AAEpF,QAAM,UAAU,oBACX,MAAM,GAAG,EACT,IAAI,YAAU,OAAO,KAAK,CAAC,EAC3B,OAAO,YAAU,OAAO,SAAS,CAAC;AAGvC,MAAI,CAAC,QAAQ,SAAS,aAAa,GACnC;AACI,YAAQ,QAAQ,aAAa;AAAA,EACjC;AAEA,SAAO;AAAA,IACH;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA;AAAA,IAClB;AAAA,EACJ;AACJ;AAKA,IAAI,gBAA2B,kBAAkB;AAgB1C,SAAS,eAChB;AACI,SAAO;AACX;AAsBO,SAAS,aAAa,QAC7B;AAEI,MAAI,OAAO,oBAAoB,CAAC,OAAO,SACvC;AACI,aAAS,EAAE,GAAG,QAAQ,SAAS,OAAO,iBAAiB;AAAA,EAC3D;AAEA,kBAAgB;AAAA,IACZ,GAAG;AAAA,IACH,GAAG;AAAA,EACP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AAAA,IACZ,aAAa;AAAA,IACb,KAAK;AAAA,IACL,cAAc;AAAA,IACd,YAAY;AAAA,EAChB;AAAA;AAAA,EAGA,IAAI;AAAA,IACA,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,MAAM;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,cAAc;AAAA,IACd,YAAY;AAAA,EAChB;AACJ;AAeO,SAAS,cAAc,QAC9B;AACI,SAAO,gBAAgB,MAAyB;AACpD;AAOO,SAAS,gBAChB;AACI,SAAO,OAAO,KAAK,eAAe;AACtC;AAKO,SAAS,sBAChB;AACI,SAAO,cAAc;AACzB;AAcO,SAAS,QAAQ,QACxB;AACI,SAAO,gBAAgB,MAAyB,GAAG,QAAQ;AAC/D;AAcO,SAAS,YAAY,QAC5B;AACI,SAAO,gBAAgB,MAAyB,GAAG,YAAY;AACnE;AAcO,SAAS,MAAM,QACtB;AACI,SAAO,gBAAgB,MAAyB,GAAG,OAAO;AAC9D;","names":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GeneratorTrigger, Generator } from '@spfn/core/codegen';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Label Sync Generator
|
|
5
|
+
*
|
|
6
|
+
* File-based label sync with JSON definitions
|
|
7
|
+
*
|
|
8
|
+
* Structure:
|
|
9
|
+
* lib/labels/
|
|
10
|
+
* layout/ # Section name
|
|
11
|
+
* nav.json # Label definitions
|
|
12
|
+
* footer.json
|
|
13
|
+
* homepage/
|
|
14
|
+
* hero.json
|
|
15
|
+
*
|
|
16
|
+
* Features:
|
|
17
|
+
* - Incremental updates: syncs only changed section on file change
|
|
18
|
+
* - Full sync on file add/delete or manual trigger
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
interface LabelSyncGeneratorConfig {
|
|
22
|
+
labelsDir?: string;
|
|
23
|
+
runOn?: GeneratorTrigger[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Create label sync generator
|
|
27
|
+
*
|
|
28
|
+
* Supports incremental updates when single files change
|
|
29
|
+
*/
|
|
30
|
+
declare function createLabelSyncGenerator(config?: LabelSyncGeneratorConfig): Generator;
|
|
31
|
+
|
|
32
|
+
export { createLabelSyncGenerator as c };
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CMS Labels Contracts
|
|
5
|
+
*
|
|
6
|
+
* 라벨 메타데이터 관리 API
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* GET /_cms/labels - 라벨 목록 조회
|
|
10
|
+
*/
|
|
11
|
+
declare const getLabelsContract: {
|
|
12
|
+
readonly method: "GET";
|
|
13
|
+
readonly path: "/_cms/labels";
|
|
14
|
+
readonly query: _sinclair_typebox.TObject<{
|
|
15
|
+
section: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
16
|
+
includeDefaultValues: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
17
|
+
}>;
|
|
18
|
+
readonly response: _sinclair_typebox.TObject<{
|
|
19
|
+
labels: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
20
|
+
id: _sinclair_typebox.TNumber;
|
|
21
|
+
key: _sinclair_typebox.TString;
|
|
22
|
+
section: _sinclair_typebox.TString;
|
|
23
|
+
type: _sinclair_typebox.TString;
|
|
24
|
+
description: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
25
|
+
publishedVersion: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TNull]>;
|
|
26
|
+
createdBy: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
27
|
+
createdAt: _sinclair_typebox.TString;
|
|
28
|
+
updatedAt: _sinclair_typebox.TString;
|
|
29
|
+
defaultValue: _sinclair_typebox.TOptional<_sinclair_typebox.TAny>;
|
|
30
|
+
}>>;
|
|
31
|
+
total: _sinclair_typebox.TNumber;
|
|
32
|
+
}>;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* POST /_cms/labels - 새 라벨 생성
|
|
36
|
+
*/
|
|
37
|
+
declare const createLabelContract: {
|
|
38
|
+
readonly method: "POST";
|
|
39
|
+
readonly path: "/_cms/labels";
|
|
40
|
+
readonly body: _sinclair_typebox.TObject<{
|
|
41
|
+
key: _sinclair_typebox.TString;
|
|
42
|
+
section: _sinclair_typebox.TString;
|
|
43
|
+
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"text">, _sinclair_typebox.TLiteral<"image">, _sinclair_typebox.TLiteral<"video">, _sinclair_typebox.TLiteral<"file">, _sinclair_typebox.TLiteral<"object">]>;
|
|
44
|
+
createdBy: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
45
|
+
}>;
|
|
46
|
+
readonly response: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
47
|
+
id: _sinclair_typebox.TNumber;
|
|
48
|
+
key: _sinclair_typebox.TString;
|
|
49
|
+
section: _sinclair_typebox.TString;
|
|
50
|
+
type: _sinclair_typebox.TString;
|
|
51
|
+
publishedVersion: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TNull]>;
|
|
52
|
+
createdBy: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
53
|
+
createdAt: _sinclair_typebox.TString;
|
|
54
|
+
updatedAt: _sinclair_typebox.TString;
|
|
55
|
+
}>, _sinclair_typebox.TObject<{
|
|
56
|
+
error: _sinclair_typebox.TString;
|
|
57
|
+
key: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
58
|
+
}>]>;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* GET /_cms/labels/:id - 라벨 단건 조회
|
|
62
|
+
*/
|
|
63
|
+
declare const getLabelContract: {
|
|
64
|
+
readonly method: "GET";
|
|
65
|
+
readonly path: "/_cms/labels/:id";
|
|
66
|
+
readonly params: _sinclair_typebox.TObject<{
|
|
67
|
+
id: _sinclair_typebox.TString;
|
|
68
|
+
}>;
|
|
69
|
+
readonly response: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
70
|
+
id: _sinclair_typebox.TNumber;
|
|
71
|
+
key: _sinclair_typebox.TString;
|
|
72
|
+
section: _sinclair_typebox.TString;
|
|
73
|
+
type: _sinclair_typebox.TString;
|
|
74
|
+
description: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
75
|
+
publishedVersion: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TNull]>;
|
|
76
|
+
createdBy: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
77
|
+
createdAt: _sinclair_typebox.TString;
|
|
78
|
+
updatedAt: _sinclair_typebox.TString;
|
|
79
|
+
}>, _sinclair_typebox.TObject<{
|
|
80
|
+
error: _sinclair_typebox.TString;
|
|
81
|
+
}>]>;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* PATCH /_cms/labels/:id - 라벨 메타데이터 수정
|
|
85
|
+
*/
|
|
86
|
+
declare const updateLabelContract: {
|
|
87
|
+
readonly method: "PATCH";
|
|
88
|
+
readonly path: "/_cms/labels/:id";
|
|
89
|
+
readonly params: _sinclair_typebox.TObject<{
|
|
90
|
+
id: _sinclair_typebox.TString;
|
|
91
|
+
}>;
|
|
92
|
+
readonly body: _sinclair_typebox.TObject<{
|
|
93
|
+
section: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
94
|
+
type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"text">, _sinclair_typebox.TLiteral<"image">, _sinclair_typebox.TLiteral<"video">, _sinclair_typebox.TLiteral<"file">, _sinclair_typebox.TLiteral<"object">]>>;
|
|
95
|
+
}>;
|
|
96
|
+
readonly response: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
97
|
+
id: _sinclair_typebox.TNumber;
|
|
98
|
+
key: _sinclair_typebox.TString;
|
|
99
|
+
section: _sinclair_typebox.TString;
|
|
100
|
+
type: _sinclair_typebox.TString;
|
|
101
|
+
description: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
102
|
+
publishedVersion: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TNull]>;
|
|
103
|
+
createdBy: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
104
|
+
createdAt: _sinclair_typebox.TString;
|
|
105
|
+
updatedAt: _sinclair_typebox.TString;
|
|
106
|
+
}>, _sinclair_typebox.TObject<{
|
|
107
|
+
error: _sinclair_typebox.TString;
|
|
108
|
+
}>]>;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* DELETE /_cms/labels/:id - 라벨 삭제
|
|
112
|
+
*/
|
|
113
|
+
declare const deleteLabelContract: {
|
|
114
|
+
readonly method: "DELETE";
|
|
115
|
+
readonly path: "/_cms/labels/:id";
|
|
116
|
+
readonly params: _sinclair_typebox.TObject<{
|
|
117
|
+
id: _sinclair_typebox.TString;
|
|
118
|
+
}>;
|
|
119
|
+
readonly response: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
120
|
+
success: _sinclair_typebox.TBoolean;
|
|
121
|
+
id: _sinclair_typebox.TNumber;
|
|
122
|
+
}>, _sinclair_typebox.TObject<{
|
|
123
|
+
error: _sinclair_typebox.TString;
|
|
124
|
+
}>]>;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* GET /_cms/labels/by-key/:key - Key로 라벨 조회
|
|
128
|
+
*/
|
|
129
|
+
declare const getLabelByKeyContract: {
|
|
130
|
+
readonly method: "GET";
|
|
131
|
+
readonly path: "/_cms/labels/by-key/:key";
|
|
132
|
+
readonly params: _sinclair_typebox.TObject<{
|
|
133
|
+
key: _sinclair_typebox.TString;
|
|
134
|
+
}>;
|
|
135
|
+
readonly response: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
136
|
+
id: _sinclair_typebox.TNumber;
|
|
137
|
+
key: _sinclair_typebox.TString;
|
|
138
|
+
section: _sinclair_typebox.TString;
|
|
139
|
+
type: _sinclair_typebox.TString;
|
|
140
|
+
description: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
141
|
+
publishedVersion: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TNull]>;
|
|
142
|
+
createdBy: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
143
|
+
createdAt: _sinclair_typebox.TString;
|
|
144
|
+
updatedAt: _sinclair_typebox.TString;
|
|
145
|
+
}>, _sinclair_typebox.TObject<{
|
|
146
|
+
error: _sinclair_typebox.TString;
|
|
147
|
+
key: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
148
|
+
}>]>;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* POST /_cms/labels/:id/publish - 라벨 발행 (Draft → Published)
|
|
152
|
+
*/
|
|
153
|
+
declare const publishLabelContract: {
|
|
154
|
+
readonly method: "POST";
|
|
155
|
+
readonly path: "/_cms/labels/:id/publish";
|
|
156
|
+
readonly params: _sinclair_typebox.TObject<{
|
|
157
|
+
id: _sinclair_typebox.TString;
|
|
158
|
+
}>;
|
|
159
|
+
readonly body: _sinclair_typebox.TObject<{
|
|
160
|
+
notes: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
161
|
+
publishedBy: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
162
|
+
}>;
|
|
163
|
+
readonly response: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
164
|
+
success: _sinclair_typebox.TBoolean;
|
|
165
|
+
id: _sinclair_typebox.TNumber;
|
|
166
|
+
version: _sinclair_typebox.TNumber;
|
|
167
|
+
message: _sinclair_typebox.TString;
|
|
168
|
+
}>, _sinclair_typebox.TObject<{
|
|
169
|
+
error: _sinclair_typebox.TString;
|
|
170
|
+
}>]>;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* GET /_cms/labels/:id/admin - 관리자용 라벨 조회 (Draft + Published + Status)
|
|
174
|
+
*/
|
|
175
|
+
declare const getAdminLabelContract: {
|
|
176
|
+
readonly method: "GET";
|
|
177
|
+
readonly path: "/_cms/labels/:id/admin";
|
|
178
|
+
readonly params: _sinclair_typebox.TObject<{
|
|
179
|
+
id: _sinclair_typebox.TString;
|
|
180
|
+
}>;
|
|
181
|
+
readonly response: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
182
|
+
label: _sinclair_typebox.TObject<{
|
|
183
|
+
id: _sinclair_typebox.TNumber;
|
|
184
|
+
key: _sinclair_typebox.TString;
|
|
185
|
+
section: _sinclair_typebox.TString;
|
|
186
|
+
type: _sinclair_typebox.TString;
|
|
187
|
+
description: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
188
|
+
publishedVersion: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TNull]>;
|
|
189
|
+
createdBy: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
190
|
+
createdAt: _sinclair_typebox.TString;
|
|
191
|
+
updatedAt: _sinclair_typebox.TString;
|
|
192
|
+
}>;
|
|
193
|
+
draft: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
194
|
+
id: _sinclair_typebox.TNumber;
|
|
195
|
+
labelId: _sinclair_typebox.TNumber;
|
|
196
|
+
version: _sinclair_typebox.TNull;
|
|
197
|
+
locale: _sinclair_typebox.TString;
|
|
198
|
+
breakpoint: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
199
|
+
value: _sinclair_typebox.TAny;
|
|
200
|
+
createdAt: _sinclair_typebox.TString;
|
|
201
|
+
}>>;
|
|
202
|
+
published: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
203
|
+
id: _sinclair_typebox.TNumber;
|
|
204
|
+
labelId: _sinclair_typebox.TNumber;
|
|
205
|
+
version: _sinclair_typebox.TNumber;
|
|
206
|
+
locale: _sinclair_typebox.TString;
|
|
207
|
+
breakpoint: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
208
|
+
value: _sinclair_typebox.TAny;
|
|
209
|
+
createdAt: _sinclair_typebox.TString;
|
|
210
|
+
}>>;
|
|
211
|
+
status: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"default-only">, _sinclair_typebox.TLiteral<"unpublished">, _sinclair_typebox.TLiteral<"published">, _sinclair_typebox.TLiteral<"modified">]>;
|
|
212
|
+
}>, _sinclair_typebox.TObject<{
|
|
213
|
+
error: _sinclair_typebox.TString;
|
|
214
|
+
}>]>;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* GET /_cms/labels/:id/versions - 라벨 버전 히스토리 조회
|
|
218
|
+
*/
|
|
219
|
+
declare const getLabelVersionsContract: {
|
|
220
|
+
readonly method: "GET";
|
|
221
|
+
readonly path: "/_cms/labels/:id/versions";
|
|
222
|
+
readonly params: _sinclair_typebox.TObject<{
|
|
223
|
+
id: _sinclair_typebox.TString;
|
|
224
|
+
}>;
|
|
225
|
+
readonly response: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
226
|
+
versions: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
227
|
+
version: _sinclair_typebox.TNumber;
|
|
228
|
+
publishedAt: _sinclair_typebox.TString;
|
|
229
|
+
publishedBy: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
230
|
+
notes: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
231
|
+
values: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
232
|
+
id: _sinclair_typebox.TNumber;
|
|
233
|
+
locale: _sinclair_typebox.TString;
|
|
234
|
+
breakpoint: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
235
|
+
value: _sinclair_typebox.TAny;
|
|
236
|
+
createdAt: _sinclair_typebox.TString;
|
|
237
|
+
}>>;
|
|
238
|
+
}>>;
|
|
239
|
+
}>, _sinclair_typebox.TObject<{
|
|
240
|
+
error: _sinclair_typebox.TString;
|
|
241
|
+
}>]>;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
export { createLabelContract, deleteLabelContract, getAdminLabelContract, getLabelByKeyContract, getLabelContract, getLabelVersionsContract, getLabelsContract, publishLabelContract, updateLabelContract };
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
// src/lib/contracts/labels.ts
|
|
2
|
+
import { Type } from "@sinclair/typebox";
|
|
3
|
+
var getLabelsContract = {
|
|
4
|
+
method: "GET",
|
|
5
|
+
path: "/_cms/labels",
|
|
6
|
+
query: Type.Object({
|
|
7
|
+
section: Type.Optional(Type.String({ description: "\uC139\uC158\uC73C\uB85C \uD544\uD130\uB9C1 (\uC608: home, why-futureplay)" })),
|
|
8
|
+
includeDefaultValues: Type.Optional(Type.Boolean({ description: "\uAE30\uBCF8\uAC12 \uD3EC\uD568 \uC5EC\uBD80" }))
|
|
9
|
+
}),
|
|
10
|
+
response: Type.Object({
|
|
11
|
+
labels: Type.Array(Type.Object({
|
|
12
|
+
id: Type.Number(),
|
|
13
|
+
key: Type.String(),
|
|
14
|
+
section: Type.String(),
|
|
15
|
+
type: Type.String(),
|
|
16
|
+
description: Type.Union([Type.String(), Type.Null()], { description: "\uB77C\uBCA8 \uC124\uBA85" }),
|
|
17
|
+
publishedVersion: Type.Union([Type.Number(), Type.Null()]),
|
|
18
|
+
createdBy: Type.Union([Type.String(), Type.Null()]),
|
|
19
|
+
createdAt: Type.String(),
|
|
20
|
+
updatedAt: Type.String(),
|
|
21
|
+
defaultValue: Type.Optional(Type.Any({ description: "\uB77C\uBCA8 \uC815\uC758 \uD30C\uC77C\uC758 \uAE30\uBCF8\uAC12" }))
|
|
22
|
+
})),
|
|
23
|
+
total: Type.Number()
|
|
24
|
+
})
|
|
25
|
+
};
|
|
26
|
+
var createLabelContract = {
|
|
27
|
+
method: "POST",
|
|
28
|
+
path: "/_cms/labels",
|
|
29
|
+
body: Type.Object({
|
|
30
|
+
key: Type.String({
|
|
31
|
+
description: "\uACE0\uC720 \uD0A4 (\uC608: home.hero.title)",
|
|
32
|
+
pattern: "^[a-z0-9-]+\\.[a-z0-9-]+\\.[a-z0-9-]+$"
|
|
33
|
+
}),
|
|
34
|
+
section: Type.String({
|
|
35
|
+
description: "\uC139\uC158 \uC774\uB984 (\uC608: home, why-futureplay)",
|
|
36
|
+
pattern: "^[a-z0-9-]+$"
|
|
37
|
+
}),
|
|
38
|
+
type: Type.Union([
|
|
39
|
+
Type.Literal("text"),
|
|
40
|
+
Type.Literal("image"),
|
|
41
|
+
Type.Literal("video"),
|
|
42
|
+
Type.Literal("file"),
|
|
43
|
+
Type.Literal("object")
|
|
44
|
+
], { description: "\uAC12 \uD0C0\uC785" }),
|
|
45
|
+
createdBy: Type.Optional(Type.String({ description: "\uC0DD\uC131\uC790 ID" }))
|
|
46
|
+
}),
|
|
47
|
+
response: Type.Union([
|
|
48
|
+
Type.Object({
|
|
49
|
+
id: Type.Number(),
|
|
50
|
+
key: Type.String(),
|
|
51
|
+
section: Type.String(),
|
|
52
|
+
type: Type.String(),
|
|
53
|
+
publishedVersion: Type.Union([Type.Number(), Type.Null()]),
|
|
54
|
+
createdBy: Type.Union([Type.String(), Type.Null()]),
|
|
55
|
+
createdAt: Type.String(),
|
|
56
|
+
updatedAt: Type.String()
|
|
57
|
+
}),
|
|
58
|
+
Type.Object({
|
|
59
|
+
error: Type.String(),
|
|
60
|
+
key: Type.Optional(Type.String())
|
|
61
|
+
})
|
|
62
|
+
])
|
|
63
|
+
};
|
|
64
|
+
var getLabelContract = {
|
|
65
|
+
method: "GET",
|
|
66
|
+
path: "/_cms/labels/:id",
|
|
67
|
+
params: Type.Object({
|
|
68
|
+
id: Type.String({ description: "\uB77C\uBCA8 ID" })
|
|
69
|
+
}),
|
|
70
|
+
response: Type.Union([
|
|
71
|
+
Type.Object({
|
|
72
|
+
id: Type.Number(),
|
|
73
|
+
key: Type.String(),
|
|
74
|
+
section: Type.String(),
|
|
75
|
+
type: Type.String(),
|
|
76
|
+
description: Type.Union([Type.String(), Type.Null()]),
|
|
77
|
+
publishedVersion: Type.Union([Type.Number(), Type.Null()]),
|
|
78
|
+
createdBy: Type.Union([Type.String(), Type.Null()]),
|
|
79
|
+
createdAt: Type.String(),
|
|
80
|
+
updatedAt: Type.String()
|
|
81
|
+
}),
|
|
82
|
+
Type.Object({
|
|
83
|
+
error: Type.String()
|
|
84
|
+
})
|
|
85
|
+
])
|
|
86
|
+
};
|
|
87
|
+
var updateLabelContract = {
|
|
88
|
+
method: "PATCH",
|
|
89
|
+
path: "/_cms/labels/:id",
|
|
90
|
+
params: Type.Object({
|
|
91
|
+
id: Type.String({ description: "\uB77C\uBCA8 ID" })
|
|
92
|
+
}),
|
|
93
|
+
body: Type.Object({
|
|
94
|
+
section: Type.Optional(Type.String({ description: "\uC139\uC158 \uBCC0\uACBD" })),
|
|
95
|
+
type: Type.Optional(Type.Union([
|
|
96
|
+
Type.Literal("text"),
|
|
97
|
+
Type.Literal("image"),
|
|
98
|
+
Type.Literal("video"),
|
|
99
|
+
Type.Literal("file"),
|
|
100
|
+
Type.Literal("object")
|
|
101
|
+
]))
|
|
102
|
+
}),
|
|
103
|
+
response: Type.Union([
|
|
104
|
+
Type.Object({
|
|
105
|
+
id: Type.Number(),
|
|
106
|
+
key: Type.String(),
|
|
107
|
+
section: Type.String(),
|
|
108
|
+
type: Type.String(),
|
|
109
|
+
description: Type.Union([Type.String(), Type.Null()]),
|
|
110
|
+
publishedVersion: Type.Union([Type.Number(), Type.Null()]),
|
|
111
|
+
createdBy: Type.Union([Type.String(), Type.Null()]),
|
|
112
|
+
createdAt: Type.String(),
|
|
113
|
+
updatedAt: Type.String()
|
|
114
|
+
}),
|
|
115
|
+
Type.Object({
|
|
116
|
+
error: Type.String()
|
|
117
|
+
})
|
|
118
|
+
])
|
|
119
|
+
};
|
|
120
|
+
var deleteLabelContract = {
|
|
121
|
+
method: "DELETE",
|
|
122
|
+
path: "/_cms/labels/:id",
|
|
123
|
+
params: Type.Object({
|
|
124
|
+
id: Type.String({ description: "\uB77C\uBCA8 ID" })
|
|
125
|
+
}),
|
|
126
|
+
response: Type.Union([
|
|
127
|
+
Type.Object({
|
|
128
|
+
success: Type.Boolean(),
|
|
129
|
+
id: Type.Number()
|
|
130
|
+
}),
|
|
131
|
+
Type.Object({
|
|
132
|
+
error: Type.String()
|
|
133
|
+
})
|
|
134
|
+
])
|
|
135
|
+
};
|
|
136
|
+
var getLabelByKeyContract = {
|
|
137
|
+
method: "GET",
|
|
138
|
+
path: "/_cms/labels/by-key/:key",
|
|
139
|
+
params: Type.Object({
|
|
140
|
+
key: Type.String({ description: "\uB77C\uBCA8 Key (\uC608: home.hero.title)" })
|
|
141
|
+
}),
|
|
142
|
+
response: Type.Union([
|
|
143
|
+
Type.Object({
|
|
144
|
+
id: Type.Number(),
|
|
145
|
+
key: Type.String(),
|
|
146
|
+
section: Type.String(),
|
|
147
|
+
type: Type.String(),
|
|
148
|
+
description: Type.Union([Type.String(), Type.Null()]),
|
|
149
|
+
publishedVersion: Type.Union([Type.Number(), Type.Null()]),
|
|
150
|
+
createdBy: Type.Union([Type.String(), Type.Null()]),
|
|
151
|
+
createdAt: Type.String(),
|
|
152
|
+
updatedAt: Type.String()
|
|
153
|
+
}),
|
|
154
|
+
Type.Object({
|
|
155
|
+
error: Type.String(),
|
|
156
|
+
key: Type.Optional(Type.String())
|
|
157
|
+
})
|
|
158
|
+
])
|
|
159
|
+
};
|
|
160
|
+
var publishLabelContract = {
|
|
161
|
+
method: "POST",
|
|
162
|
+
path: "/_cms/labels/:id/publish",
|
|
163
|
+
params: Type.Object({
|
|
164
|
+
id: Type.String({ description: "\uB77C\uBCA8 ID" })
|
|
165
|
+
}),
|
|
166
|
+
body: Type.Object({
|
|
167
|
+
notes: Type.Optional(Type.String({ description: "\uBC1C\uD589 \uB178\uD2B8 (\uBC84\uC804 \uC124\uBA85)" })),
|
|
168
|
+
publishedBy: Type.Optional(Type.String({ description: "\uBC1C\uD589\uC790 ID" }))
|
|
169
|
+
}),
|
|
170
|
+
response: Type.Union([
|
|
171
|
+
Type.Object({
|
|
172
|
+
success: Type.Boolean(),
|
|
173
|
+
id: Type.Number(),
|
|
174
|
+
version: Type.Number(),
|
|
175
|
+
message: Type.String()
|
|
176
|
+
}),
|
|
177
|
+
Type.Object({
|
|
178
|
+
error: Type.String()
|
|
179
|
+
})
|
|
180
|
+
])
|
|
181
|
+
};
|
|
182
|
+
var getAdminLabelContract = {
|
|
183
|
+
method: "GET",
|
|
184
|
+
path: "/_cms/labels/:id/admin",
|
|
185
|
+
params: Type.Object({
|
|
186
|
+
id: Type.String({ description: "\uB77C\uBCA8 ID" })
|
|
187
|
+
}),
|
|
188
|
+
response: Type.Union([
|
|
189
|
+
Type.Object({
|
|
190
|
+
label: Type.Object({
|
|
191
|
+
id: Type.Number(),
|
|
192
|
+
key: Type.String(),
|
|
193
|
+
section: Type.String(),
|
|
194
|
+
type: Type.String(),
|
|
195
|
+
description: Type.Union([Type.String(), Type.Null()]),
|
|
196
|
+
publishedVersion: Type.Union([Type.Number(), Type.Null()]),
|
|
197
|
+
createdBy: Type.Union([Type.String(), Type.Null()]),
|
|
198
|
+
createdAt: Type.String(),
|
|
199
|
+
updatedAt: Type.String()
|
|
200
|
+
}),
|
|
201
|
+
draft: Type.Array(Type.Object({
|
|
202
|
+
id: Type.Number(),
|
|
203
|
+
labelId: Type.Number(),
|
|
204
|
+
version: Type.Null(),
|
|
205
|
+
locale: Type.String(),
|
|
206
|
+
breakpoint: Type.Union([Type.String(), Type.Null()]),
|
|
207
|
+
value: Type.Any(),
|
|
208
|
+
createdAt: Type.String()
|
|
209
|
+
})),
|
|
210
|
+
published: Type.Array(Type.Object({
|
|
211
|
+
id: Type.Number(),
|
|
212
|
+
labelId: Type.Number(),
|
|
213
|
+
version: Type.Number(),
|
|
214
|
+
locale: Type.String(),
|
|
215
|
+
breakpoint: Type.Union([Type.String(), Type.Null()]),
|
|
216
|
+
value: Type.Any(),
|
|
217
|
+
createdAt: Type.String()
|
|
218
|
+
})),
|
|
219
|
+
status: Type.Union([
|
|
220
|
+
Type.Literal("default-only"),
|
|
221
|
+
Type.Literal("unpublished"),
|
|
222
|
+
Type.Literal("published"),
|
|
223
|
+
Type.Literal("modified")
|
|
224
|
+
])
|
|
225
|
+
}),
|
|
226
|
+
Type.Object({
|
|
227
|
+
error: Type.String()
|
|
228
|
+
})
|
|
229
|
+
])
|
|
230
|
+
};
|
|
231
|
+
var getLabelVersionsContract = {
|
|
232
|
+
method: "GET",
|
|
233
|
+
path: "/_cms/labels/:id/versions",
|
|
234
|
+
params: Type.Object({
|
|
235
|
+
id: Type.String({ description: "\uB77C\uBCA8 ID" })
|
|
236
|
+
}),
|
|
237
|
+
response: Type.Union([
|
|
238
|
+
Type.Object({
|
|
239
|
+
versions: Type.Array(Type.Object({
|
|
240
|
+
version: Type.Number({ description: "\uBC84\uC804 \uBC88\uD638" }),
|
|
241
|
+
publishedAt: Type.String({ description: "\uBC1C\uD589 \uC2DC\uAC01 (ISO 8601)" }),
|
|
242
|
+
publishedBy: Type.Union([Type.String(), Type.Null()], { description: "\uBC1C\uD589\uC790 ID" }),
|
|
243
|
+
notes: Type.Union([Type.String(), Type.Null()], { description: "\uBC1C\uD589 \uB178\uD2B8" }),
|
|
244
|
+
values: Type.Array(Type.Object({
|
|
245
|
+
id: Type.Number(),
|
|
246
|
+
locale: Type.String(),
|
|
247
|
+
breakpoint: Type.Union([Type.String(), Type.Null()]),
|
|
248
|
+
value: Type.Any(),
|
|
249
|
+
createdAt: Type.String()
|
|
250
|
+
}))
|
|
251
|
+
}))
|
|
252
|
+
}),
|
|
253
|
+
Type.Object({
|
|
254
|
+
error: Type.String()
|
|
255
|
+
})
|
|
256
|
+
])
|
|
257
|
+
};
|
|
258
|
+
export {
|
|
259
|
+
createLabelContract,
|
|
260
|
+
deleteLabelContract,
|
|
261
|
+
getAdminLabelContract,
|
|
262
|
+
getLabelByKeyContract,
|
|
263
|
+
getLabelContract,
|
|
264
|
+
getLabelVersionsContract,
|
|
265
|
+
getLabelsContract,
|
|
266
|
+
publishLabelContract,
|
|
267
|
+
updateLabelContract
|
|
268
|
+
};
|
|
269
|
+
//# sourceMappingURL=labels.js.map
|