@spfn/cms 0.1.0-alpha.9 → 0.2.0-beta.1

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.
Files changed (171) hide show
  1. package/README.md +320 -359
  2. package/dist/actions.d.ts +12 -6
  3. package/dist/actions.js +25 -10
  4. package/dist/actions.js.map +1 -1
  5. package/dist/config.d.ts +39 -0
  6. package/dist/config.js +39 -0
  7. package/dist/config.js.map +1 -0
  8. package/dist/errors.d.ts +149 -0
  9. package/dist/errors.js +164 -0
  10. package/dist/errors.js.map +1 -0
  11. package/dist/index.d.ts +138 -20
  12. package/dist/index.js +212 -23
  13. package/dist/index.js.map +1 -1
  14. package/dist/server.d.ts +44 -81
  15. package/dist/server.js +610 -256
  16. package/dist/server.js.map +1 -1
  17. package/migrations/0000_medical_ozymandias.sql +44 -0
  18. package/migrations/meta/0000_snapshot.json +336 -0
  19. package/migrations/meta/_journal.json +13 -0
  20. package/package.json +54 -44
  21. package/dist/actions.d.ts.map +0 -1
  22. package/dist/client.d.ts +0 -138
  23. package/dist/client.d.ts.map +0 -1
  24. package/dist/client.js +0 -62
  25. package/dist/client.js.map +0 -1
  26. package/dist/cms.config.d.ts +0 -77
  27. package/dist/cms.config.d.ts.map +0 -1
  28. package/dist/cms.config.js +0 -111
  29. package/dist/cms.config.js.map +0 -1
  30. package/dist/entities/cms-audit-logs.d.ts +0 -213
  31. package/dist/entities/cms-audit-logs.d.ts.map +0 -1
  32. package/dist/entities/cms-audit-logs.js +0 -103
  33. package/dist/entities/cms-audit-logs.js.map +0 -1
  34. package/dist/entities/cms-draft-cache.d.ts +0 -188
  35. package/dist/entities/cms-draft-cache.d.ts.map +0 -1
  36. package/dist/entities/cms-draft-cache.js +0 -112
  37. package/dist/entities/cms-draft-cache.js.map +0 -1
  38. package/dist/entities/cms-label-values.d.ts +0 -192
  39. package/dist/entities/cms-label-values.d.ts.map +0 -1
  40. package/dist/entities/cms-label-values.js +0 -105
  41. package/dist/entities/cms-label-values.js.map +0 -1
  42. package/dist/entities/cms-label-versions.d.ts +0 -207
  43. package/dist/entities/cms-label-versions.d.ts.map +0 -1
  44. package/dist/entities/cms-label-versions.js +0 -80
  45. package/dist/entities/cms-label-versions.js.map +0 -1
  46. package/dist/entities/cms-labels.d.ts +0 -189
  47. package/dist/entities/cms-labels.d.ts.map +0 -1
  48. package/dist/entities/cms-labels.js +0 -48
  49. package/dist/entities/cms-labels.js.map +0 -1
  50. package/dist/entities/cms-published-cache.d.ts +0 -199
  51. package/dist/entities/cms-published-cache.d.ts.map +0 -1
  52. package/dist/entities/cms-published-cache.js +0 -103
  53. package/dist/entities/cms-published-cache.js.map +0 -1
  54. package/dist/entities/index.d.ts +0 -10
  55. package/dist/entities/index.d.ts.map +0 -1
  56. package/dist/entities/index.js +0 -10
  57. package/dist/entities/index.js.map +0 -1
  58. package/dist/generators/index.d.ts +0 -19
  59. package/dist/generators/index.d.ts.map +0 -1
  60. package/dist/generators/index.js +0 -19
  61. package/dist/generators/index.js.map +0 -1
  62. package/dist/generators/label-sync-generator.d.ts +0 -33
  63. package/dist/generators/label-sync-generator.d.ts.map +0 -1
  64. package/dist/generators/label-sync-generator.js +0 -86
  65. package/dist/generators/label-sync-generator.js.map +0 -1
  66. package/dist/helpers/locale.actions.d.ts +0 -132
  67. package/dist/helpers/locale.actions.d.ts.map +0 -1
  68. package/dist/helpers/locale.actions.js +0 -210
  69. package/dist/helpers/locale.actions.js.map +0 -1
  70. package/dist/helpers/locale.constants.d.ts +0 -10
  71. package/dist/helpers/locale.constants.d.ts.map +0 -1
  72. package/dist/helpers/locale.constants.js +0 -10
  73. package/dist/helpers/locale.constants.js.map +0 -1
  74. package/dist/helpers/locale.d.ts +0 -17
  75. package/dist/helpers/locale.d.ts.map +0 -1
  76. package/dist/helpers/locale.js +0 -20
  77. package/dist/helpers/locale.js.map +0 -1
  78. package/dist/helpers/sync.d.ts +0 -41
  79. package/dist/helpers/sync.d.ts.map +0 -1
  80. package/dist/helpers/sync.js +0 -309
  81. package/dist/helpers/sync.js.map +0 -1
  82. package/dist/index.d.ts.map +0 -1
  83. package/dist/init.d.ts +0 -31
  84. package/dist/init.d.ts.map +0 -1
  85. package/dist/init.js +0 -36
  86. package/dist/init.js.map +0 -1
  87. package/dist/labels/helpers.d.ts +0 -31
  88. package/dist/labels/helpers.d.ts.map +0 -1
  89. package/dist/labels/helpers.js +0 -60
  90. package/dist/labels/helpers.js.map +0 -1
  91. package/dist/labels/index.d.ts +0 -7
  92. package/dist/labels/index.d.ts.map +0 -1
  93. package/dist/labels/index.js +0 -7
  94. package/dist/labels/index.js.map +0 -1
  95. package/dist/repositories/cms-draft-cache.repository.d.ts +0 -62
  96. package/dist/repositories/cms-draft-cache.repository.d.ts.map +0 -1
  97. package/dist/repositories/cms-draft-cache.repository.js +0 -56
  98. package/dist/repositories/cms-draft-cache.repository.js.map +0 -1
  99. package/dist/repositories/cms-label-values.repository.d.ts +0 -32
  100. package/dist/repositories/cms-label-values.repository.d.ts.map +0 -1
  101. package/dist/repositories/cms-label-values.repository.js +0 -72
  102. package/dist/repositories/cms-label-values.repository.js.map +0 -1
  103. package/dist/repositories/cms-labels.repository.d.ts +0 -53
  104. package/dist/repositories/cms-labels.repository.d.ts.map +0 -1
  105. package/dist/repositories/cms-labels.repository.js +0 -77
  106. package/dist/repositories/cms-labels.repository.js.map +0 -1
  107. package/dist/repositories/cms-published-cache.repository.d.ts +0 -53
  108. package/dist/repositories/cms-published-cache.repository.d.ts.map +0 -1
  109. package/dist/repositories/cms-published-cache.repository.js +0 -54
  110. package/dist/repositories/cms-published-cache.repository.js.map +0 -1
  111. package/dist/repositories/index.d.ts +0 -8
  112. package/dist/repositories/index.d.ts.map +0 -1
  113. package/dist/repositories/index.js +0 -9
  114. package/dist/repositories/index.js.map +0 -1
  115. package/dist/routes/labels/[id]/contract.d.ts +0 -68
  116. package/dist/routes/labels/[id]/contract.d.ts.map +0 -1
  117. package/dist/routes/labels/[id]/contract.js +0 -84
  118. package/dist/routes/labels/[id]/contract.js.map +0 -1
  119. package/dist/routes/labels/[id]/index.d.ts +0 -10
  120. package/dist/routes/labels/[id]/index.d.ts.map +0 -1
  121. package/dist/routes/labels/[id]/index.js +0 -96
  122. package/dist/routes/labels/[id]/index.js.map +0 -1
  123. package/dist/routes/labels/by-key/[key]/contract.d.ts +0 -24
  124. package/dist/routes/labels/by-key/[key]/contract.d.ts.map +0 -1
  125. package/dist/routes/labels/by-key/[key]/contract.js +0 -28
  126. package/dist/routes/labels/by-key/[key]/contract.js.map +0 -1
  127. package/dist/routes/labels/by-key/[key]/index.d.ts +0 -8
  128. package/dist/routes/labels/by-key/[key]/index.d.ts.map +0 -1
  129. package/dist/routes/labels/by-key/[key]/index.js +0 -32
  130. package/dist/routes/labels/by-key/[key]/index.js.map +0 -1
  131. package/dist/routes/labels/contract.d.ts +0 -59
  132. package/dist/routes/labels/contract.d.ts.map +0 -1
  133. package/dist/routes/labels/contract.js +0 -75
  134. package/dist/routes/labels/contract.js.map +0 -1
  135. package/dist/routes/labels/index.d.ts +0 -10
  136. package/dist/routes/labels/index.d.ts.map +0 -1
  137. package/dist/routes/labels/index.js +0 -73
  138. package/dist/routes/labels/index.js.map +0 -1
  139. package/dist/routes/published-cache/contract.d.ts +0 -25
  140. package/dist/routes/published-cache/contract.d.ts.map +0 -1
  141. package/dist/routes/published-cache/contract.js +0 -35
  142. package/dist/routes/published-cache/contract.js.map +0 -1
  143. package/dist/routes/published-cache/index.d.ts +0 -8
  144. package/dist/routes/published-cache/index.d.ts.map +0 -1
  145. package/dist/routes/published-cache/index.js +0 -33
  146. package/dist/routes/published-cache/index.js.map +0 -1
  147. package/dist/routes/values/[labelId]/[version]/contract.d.ts +0 -29
  148. package/dist/routes/values/[labelId]/[version]/contract.d.ts.map +0 -1
  149. package/dist/routes/values/[labelId]/[version]/contract.js +0 -33
  150. package/dist/routes/values/[labelId]/[version]/contract.js.map +0 -1
  151. package/dist/routes/values/[labelId]/[version]/index.d.ts +0 -8
  152. package/dist/routes/values/[labelId]/[version]/index.d.ts.map +0 -1
  153. package/dist/routes/values/[labelId]/[version]/index.js +0 -45
  154. package/dist/routes/values/[labelId]/[version]/index.js.map +0 -1
  155. package/dist/routes/values/[labelId]/contract.d.ts +0 -38
  156. package/dist/routes/values/[labelId]/contract.d.ts.map +0 -1
  157. package/dist/routes/values/[labelId]/contract.js +0 -59
  158. package/dist/routes/values/[labelId]/contract.js.map +0 -1
  159. package/dist/routes/values/[labelId]/index.d.ts +0 -8
  160. package/dist/routes/values/[labelId]/index.d.ts.map +0 -1
  161. package/dist/routes/values/[labelId]/index.js +0 -42
  162. package/dist/routes/values/[labelId]/index.js.map +0 -1
  163. package/dist/server.d.ts.map +0 -1
  164. package/dist/store.d.ts +0 -87
  165. package/dist/store.d.ts.map +0 -1
  166. package/dist/store.js +0 -205
  167. package/dist/store.js.map +0 -1
  168. package/dist/types.d.ts +0 -74
  169. package/dist/types.d.ts.map +0 -1
  170. package/dist/types.js +0 -7
  171. package/dist/types.js.map +0 -1
@@ -1,32 +0,0 @@
1
- /**
2
- * CMS Label Values Repository
3
- *
4
- * 라벨 값 관리를 위한 Repository
5
- */
6
- import { type CmsLabelValue, type NewCmsLabelValue } from '../entities/index.js';
7
- /**
8
- * 특정 라벨의 특정 버전 값들 조회
9
- */
10
- export declare function findByLabelIdAndVersion(labelId: number, version: number, options?: {
11
- locale?: string;
12
- breakpoint?: string | null;
13
- }): Promise<CmsLabelValue[]>;
14
- /**
15
- * 값 저장 (upsert)
16
- */
17
- export declare function upsert(data: NewCmsLabelValue): Promise<CmsLabelValue>;
18
- /**
19
- * 여러 값 일괄 저장
20
- */
21
- export declare function upsertMany(values: NewCmsLabelValue[]): Promise<CmsLabelValue[]>;
22
- /**
23
- * 특정 버전의 모든 값 삭제
24
- */
25
- export declare function deleteByVersion(labelId: number, version: number): Promise<CmsLabelValue[]>;
26
- export declare const cmsLabelValuesRepository: {
27
- findByLabelIdAndVersion: typeof findByLabelIdAndVersion;
28
- upsert: typeof upsert;
29
- upsertMany: typeof upsertMany;
30
- deleteByVersion: typeof deleteByVersion;
31
- };
32
- //# sourceMappingURL=cms-label-values.repository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cms-label-values.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/cms-label-values.repository.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEjG;;GAEG;AACH,wBAAsB,uBAAuB,CACzC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;IACN,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,GACF,OAAO,CAAC,aAAa,EAAE,CAAC,CA0B1B;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC,CA8B3E;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CASrF;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAShG;AAGD,eAAO,MAAM,wBAAwB;;;;;CAKpC,CAAC"}
@@ -1,72 +0,0 @@
1
- /**
2
- * CMS Label Values Repository
3
- *
4
- * 라벨 값 관리를 위한 Repository
5
- */
6
- import { findOne, findMany, create, updateOne, deleteMany } from '@spfn/core/db';
7
- import { eq, and, isNull } from 'drizzle-orm';
8
- import { cmsLabelValues } from '../entities/index.js';
9
- /**
10
- * 특정 라벨의 특정 버전 값들 조회
11
- */
12
- export async function findByLabelIdAndVersion(labelId, version, options) {
13
- const { locale, breakpoint } = options || {};
14
- const conditions = [
15
- eq(cmsLabelValues.labelId, labelId),
16
- eq(cmsLabelValues.version, version)
17
- ];
18
- if (locale) {
19
- conditions.push(eq(cmsLabelValues.locale, locale));
20
- }
21
- if (breakpoint !== undefined) {
22
- conditions.push(breakpoint === null
23
- ? isNull(cmsLabelValues.breakpoint)
24
- : eq(cmsLabelValues.breakpoint, breakpoint));
25
- }
26
- return findMany(cmsLabelValues, {
27
- where: and(...conditions)
28
- });
29
- }
30
- /**
31
- * 값 저장 (upsert)
32
- */
33
- export async function upsert(data) {
34
- // 기존 값이 있는지 확인
35
- const existing = await findOne(cmsLabelValues, and(eq(cmsLabelValues.labelId, data.labelId), eq(cmsLabelValues.version, data.version ?? 1), eq(cmsLabelValues.locale, data.locale || 'ko'), data.breakpoint
36
- ? eq(cmsLabelValues.breakpoint, data.breakpoint)
37
- : isNull(cmsLabelValues.breakpoint)));
38
- if (existing) {
39
- // UPDATE
40
- const updated = await updateOne(cmsLabelValues, { id: existing.id }, { value: data.value });
41
- return updated;
42
- }
43
- else {
44
- // INSERT
45
- return create(cmsLabelValues, data);
46
- }
47
- }
48
- /**
49
- * 여러 값 일괄 저장
50
- */
51
- export async function upsertMany(values) {
52
- const results = [];
53
- for (const value of values) {
54
- const result = await upsert(value);
55
- results.push(result);
56
- }
57
- return results;
58
- }
59
- /**
60
- * 특정 버전의 모든 값 삭제
61
- */
62
- export async function deleteByVersion(labelId, version) {
63
- return deleteMany(cmsLabelValues, and(eq(cmsLabelValues.labelId, labelId), eq(cmsLabelValues.version, version)));
64
- }
65
- // Legacy export for backward compatibility
66
- export const cmsLabelValuesRepository = {
67
- findByLabelIdAndVersion,
68
- upsert,
69
- upsertMany,
70
- deleteByVersion
71
- };
72
- //# sourceMappingURL=cms-label-values.repository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cms-label-values.repository.js","sourceRoot":"","sources":["../../src/repositories/cms-label-values.repository.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,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,UAAU;IACV,eAAe;CAClB,CAAC"}
@@ -1,53 +0,0 @@
1
- /**
2
- * CMS Labels Repository
3
- *
4
- * 라벨 메타데이터 관리를 위한 Repository
5
- */
6
- import { type CmsLabel, type NewCmsLabel } from '../entities/index.js';
7
- /**
8
- * 라벨 목록 조회 (페이지네이션)
9
- */
10
- export declare function findMany(options?: {
11
- section?: string;
12
- limit?: number;
13
- offset?: number;
14
- }): Promise<CmsLabel[]>;
15
- /**
16
- * 전체 라벨 수 조회
17
- */
18
- export declare function count(section?: string): Promise<number>;
19
- /**
20
- * ID로 라벨 조회
21
- */
22
- export declare function findById(id: number): Promise<CmsLabel | null>;
23
- /**
24
- * Key로 라벨 조회
25
- */
26
- export declare function findByKey(key: string): Promise<CmsLabel | null>;
27
- /**
28
- * 섹션으로 모든 라벨 조회
29
- */
30
- export declare function findBySection(section: string): Promise<CmsLabel[]>;
31
- /**
32
- * 라벨 생성
33
- */
34
- export declare function create(data: NewCmsLabel): Promise<CmsLabel>;
35
- /**
36
- * 라벨 수정
37
- */
38
- export declare function updateById(id: number, data: Partial<NewCmsLabel>): Promise<CmsLabel | null>;
39
- /**
40
- * 라벨 삭제
41
- */
42
- export declare function deleteById(id: number): Promise<CmsLabel | null>;
43
- export declare const cmsLabelsRepository: {
44
- findMany: typeof findMany;
45
- count: typeof count;
46
- findById: typeof findById;
47
- findByKey: typeof findByKey;
48
- findBySection: typeof findBySection;
49
- create: typeof create;
50
- updateById: typeof updateById;
51
- deleteById: typeof deleteById;
52
- };
53
- //# sourceMappingURL=cms-labels.repository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cms-labels.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/cms-labels.repository.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAa,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAElF;;GAEG;AACH,wBAAsB,QAAQ,CAAC,OAAO,CAAC,EAAE;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAUtB;AAED;;GAEG;AACH,wBAAsB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAG7D;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAGnE;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAGrE;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAMxE;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAGjE;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAGjG;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAGrE;AAGD,eAAO,MAAM,mBAAmB;;;;;;;;;CAS/B,CAAC"}
@@ -1,77 +0,0 @@
1
- /**
2
- * CMS Labels Repository
3
- *
4
- * 라벨 메타데이터 관리를 위한 Repository
5
- */
6
- import { findOne, findMany as findManyHelper, create as createHelper, updateOne, deleteOne, count as countHelper } from '@spfn/core/db';
7
- import { desc } from 'drizzle-orm';
8
- import { cmsLabels } from '../entities/index.js';
9
- /**
10
- * 라벨 목록 조회 (페이지네이션)
11
- */
12
- export async function findMany(options) {
13
- const { section, limit = 20, offset = 0 } = options || {};
14
- return findManyHelper(cmsLabels, {
15
- where: section ? { section } : undefined,
16
- orderBy: desc(cmsLabels.updatedAt),
17
- limit,
18
- offset
19
- });
20
- }
21
- /**
22
- * 전체 라벨 수 조회
23
- */
24
- export async function count(section) {
25
- return countHelper(cmsLabels, section ? { section } : undefined);
26
- }
27
- /**
28
- * ID로 라벨 조회
29
- */
30
- export async function findById(id) {
31
- return findOne(cmsLabels, { id });
32
- }
33
- /**
34
- * Key로 라벨 조회
35
- */
36
- export async function findByKey(key) {
37
- return findOne(cmsLabels, { key });
38
- }
39
- /**
40
- * 섹션으로 모든 라벨 조회
41
- */
42
- export async function findBySection(section) {
43
- return findManyHelper(cmsLabels, {
44
- where: { section },
45
- orderBy: desc(cmsLabels.updatedAt),
46
- });
47
- }
48
- /**
49
- * 라벨 생성
50
- */
51
- export async function create(data) {
52
- return createHelper(cmsLabels, data);
53
- }
54
- /**
55
- * 라벨 수정
56
- */
57
- export async function updateById(id, data) {
58
- return updateOne(cmsLabels, { id }, { ...data, updatedAt: new Date() });
59
- }
60
- /**
61
- * 라벨 삭제
62
- */
63
- export async function deleteById(id) {
64
- return deleteOne(cmsLabels, { id });
65
- }
66
- // Legacy export for backward compatibility
67
- export const cmsLabelsRepository = {
68
- findMany,
69
- count,
70
- findById,
71
- findByKey,
72
- findBySection,
73
- create,
74
- updateById,
75
- deleteById
76
- };
77
- //# sourceMappingURL=cms-labels.repository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cms-labels.repository.js","sourceRoot":"","sources":["../../src/repositories/cms-labels.repository.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,IAAI,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACxI,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE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C,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,EAAU,EAAE,IAA0B;IAEnE,OAAO,SAAS,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,EAAU;IAEvC,OAAO,SAAS,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC;AAED,2CAA2C;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,SAAS;IACT,aAAa;IACb,MAAM;IACN,UAAU;IACV,UAAU;CACb,CAAC"}
@@ -1,53 +0,0 @@
1
- /**
2
- * CMS Published Cache Repository
3
- *
4
- * 발행된 콘텐츠 캐시 관리 (초고속 조회)
5
- */
6
- import { type NewCmsPublishedCache } from '../entities/index.js';
7
- /**
8
- * 섹션 + 언어로 발행된 캐시 조회
9
- */
10
- export declare function findBySection(section: string, locale?: string): Promise<{
11
- section: string;
12
- id: number;
13
- locale: string;
14
- content: unknown;
15
- version: number;
16
- publishedAt: Date;
17
- publishedBy: string | null;
18
- } | null>;
19
- /**
20
- * 캐시 생성 또는 업데이트 (UPSERT)
21
- */
22
- export declare function upsert(data: NewCmsPublishedCache): Promise<{
23
- section: string;
24
- id: number;
25
- locale: string;
26
- content: unknown;
27
- version: number;
28
- publishedAt: Date;
29
- publishedBy: string | null;
30
- }>;
31
- /**
32
- * 섹션별 모든 언어 캐시 조회
33
- */
34
- export declare function findAllLanguages(section: string): Promise<{
35
- section: string;
36
- id: number;
37
- locale: string;
38
- content: unknown;
39
- version: number;
40
- publishedAt: Date;
41
- publishedBy: string | null;
42
- }[]>;
43
- /**
44
- * 캐시 삭제
45
- */
46
- export declare function deleteBySection(section: string, locale?: string): Promise<void>;
47
- export declare const cmsPublishedCacheRepository: {
48
- findBySection: typeof findBySection;
49
- upsert: typeof upsert;
50
- findAllLanguages: typeof findAllLanguages;
51
- deleteBySection: typeof deleteBySection;
52
- };
53
- //# sourceMappingURL=cms-published-cache.repository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cms-published-cache.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/cms-published-cache.repository.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAqB,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEpF;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,MAAa;;;;;;;;UASzE;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,oBAAoB;;;;;;;;GAWtD;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,MAAM;;;;;;;;KAKrD;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,iBAmBrE;AAED,eAAO,MAAM,2BAA2B;;;;;CAKvC,CAAC"}
@@ -1,54 +0,0 @@
1
- /**
2
- * CMS Published Cache Repository
3
- *
4
- * 발행된 콘텐츠 캐시 관리 (초고속 조회)
5
- */
6
- import { findOne, findMany, deleteOne, deleteMany, upsert as upsertHelper } from '@spfn/core/db';
7
- import { eq, and, sql } from 'drizzle-orm';
8
- import { cmsPublishedCache } from '../entities/index.js';
9
- /**
10
- * 섹션 + 언어로 발행된 캐시 조회
11
- */
12
- export async function findBySection(section, locale = 'ko') {
13
- return findOne(cmsPublishedCache, and(eq(cmsPublishedCache.section, section), eq(cmsPublishedCache.locale, locale)));
14
- }
15
- /**
16
- * 캐시 생성 또는 업데이트 (UPSERT)
17
- */
18
- export async function upsert(data) {
19
- return upsertHelper(cmsPublishedCache, data, {
20
- target: [cmsPublishedCache.section, cmsPublishedCache.locale],
21
- set: {
22
- content: data.content,
23
- publishedAt: data.publishedAt,
24
- publishedBy: data.publishedBy,
25
- version: sql `${cmsPublishedCache.version} + 1`, // 버전 증가로 클라이언트 캐시 무효화
26
- }
27
- });
28
- }
29
- /**
30
- * 섹션별 모든 언어 캐시 조회
31
- */
32
- export async function findAllLanguages(section) {
33
- return findMany(cmsPublishedCache, {
34
- where: eq(cmsPublishedCache.section, section)
35
- });
36
- }
37
- /**
38
- * 캐시 삭제
39
- */
40
- export async function deleteBySection(section, locale) {
41
- if (locale) {
42
- await deleteOne(cmsPublishedCache, and(eq(cmsPublishedCache.section, section), eq(cmsPublishedCache.locale, locale)));
43
- }
44
- else {
45
- await deleteMany(cmsPublishedCache, eq(cmsPublishedCache.section, section));
46
- }
47
- }
48
- export const cmsPublishedCacheRepository = {
49
- findBySection,
50
- upsert,
51
- findAllLanguages,
52
- deleteBySection,
53
- };
54
- //# sourceMappingURL=cms-published-cache.repository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cms-published-cache.repository.js","sourceRoot":"","sources":["../../src/repositories/cms-published-cache.repository.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAA6B,MAAM,sBAAsB,CAAC;AAEpF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAe,EAAE,SAAiB,IAAI;IAEtE,OAAO,OAAO,CACV,iBAAiB,EACjB,GAAG,CACC,EAAE,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,EACtC,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CACvC,CACJ,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAA0B;IAEnD,OAAO,YAAY,CAAC,iBAAiB,EAAE,IAAI,EAAE;QACzC,MAAM,EAAE,CAAC,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,CAAC,MAAM,CAAC;QAC7D,GAAG,EAAE;YACD,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,OAAO,EAAE,GAAG,CAAA,GAAG,iBAAiB,CAAC,OAAO,MAAM,EAAE,sBAAsB;SACzE;KACJ,CAAC,CAAC;AACP,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,OAAe;IAElD,OAAO,QAAQ,CAAC,iBAAiB,EAAE;QAC/B,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC;KAChD,CAAC,CAAC;AACP,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAAe,EAAE,MAAe;IAElE,IAAI,MAAM,EACV,CAAC;QACG,MAAM,SAAS,CACX,iBAAiB,EACjB,GAAG,CACC,EAAE,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,EACtC,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CACvC,CACJ,CAAC;IACN,CAAC;SAED,CAAC;QACG,MAAM,UAAU,CACZ,iBAAiB,EACjB,EAAE,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,CACzC,CAAC;IACN,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACvC,aAAa;IACb,MAAM;IACN,gBAAgB;IAChB,eAAe;CAClB,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * CMS Database Repositories
3
- */
4
- export { cmsLabelsRepository } from './cms-labels.repository.js';
5
- export { cmsLabelValuesRepository } from './cms-label-values.repository.js';
6
- export { cmsDraftCacheRepository } from './cms-draft-cache.repository.js';
7
- export { cmsPublishedCacheRepository } from './cms-published-cache.repository.js';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * CMS Database Repositories
3
- */
4
- // Export repositories as namespaced objects to avoid naming conflicts
5
- export { cmsLabelsRepository } from './cms-labels.repository.js';
6
- export { cmsLabelValuesRepository } from './cms-label-values.repository.js';
7
- export { cmsDraftCacheRepository } from './cms-draft-cache.repository.js';
8
- export { cmsPublishedCacheRepository } from './cms-published-cache.repository.js';
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,sEAAsE;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC"}
@@ -1,68 +0,0 @@
1
- /**
2
- * CMS Label Detail Contracts
3
- */
4
- /**
5
- * GET /cms/labels/:id - 라벨 단건 조회
6
- */
7
- export declare const getLabelContract: {
8
- readonly method: "GET";
9
- readonly path: "/:id";
10
- readonly params: import("@sinclair/typebox").TObject<{
11
- id: import("@sinclair/typebox").TString;
12
- }>;
13
- readonly response: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
14
- id: import("@sinclair/typebox").TNumber;
15
- key: import("@sinclair/typebox").TString;
16
- section: import("@sinclair/typebox").TString;
17
- type: import("@sinclair/typebox").TString;
18
- publishedVersion: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>;
19
- createdBy: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
20
- createdAt: import("@sinclair/typebox").TString;
21
- updatedAt: import("@sinclair/typebox").TString;
22
- }>, import("@sinclair/typebox").TObject<{
23
- error: import("@sinclair/typebox").TString;
24
- }>]>;
25
- };
26
- /**
27
- * PATCH /cms/labels/:id - 라벨 메타데이터 수정
28
- */
29
- export declare const updateLabelContract: {
30
- readonly method: "PATCH";
31
- readonly path: "/:id";
32
- readonly params: import("@sinclair/typebox").TObject<{
33
- id: import("@sinclair/typebox").TString;
34
- }>;
35
- readonly body: import("@sinclair/typebox").TObject<{
36
- section: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
37
- type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"text">, import("@sinclair/typebox").TLiteral<"image">, import("@sinclair/typebox").TLiteral<"video">, import("@sinclair/typebox").TLiteral<"file">, import("@sinclair/typebox").TLiteral<"object">]>>;
38
- }>;
39
- readonly response: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
40
- id: import("@sinclair/typebox").TNumber;
41
- key: import("@sinclair/typebox").TString;
42
- section: import("@sinclair/typebox").TString;
43
- type: import("@sinclair/typebox").TString;
44
- publishedVersion: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>;
45
- createdBy: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
46
- createdAt: import("@sinclair/typebox").TString;
47
- updatedAt: import("@sinclair/typebox").TString;
48
- }>, import("@sinclair/typebox").TObject<{
49
- error: import("@sinclair/typebox").TString;
50
- }>]>;
51
- };
52
- /**
53
- * DELETE /cms/labels/:id - 라벨 삭제
54
- */
55
- export declare const deleteLabelContract: {
56
- readonly method: "DELETE";
57
- readonly path: "/:id";
58
- readonly params: import("@sinclair/typebox").TObject<{
59
- id: import("@sinclair/typebox").TString;
60
- }>;
61
- readonly response: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
62
- success: import("@sinclair/typebox").TBoolean;
63
- id: import("@sinclair/typebox").TNumber;
64
- }>, import("@sinclair/typebox").TObject<{
65
- error: import("@sinclair/typebox").TString;
66
- }>]>;
67
- };
68
- //# sourceMappingURL=contract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../src/routes/labels/[id]/contract.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;CAqBK,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;CA+BE,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;CAeE,CAAC"}
@@ -1,84 +0,0 @@
1
- import { Type } from '@sinclair/typebox';
2
- /**
3
- * CMS Label Detail Contracts
4
- */
5
- /**
6
- * GET /cms/labels/:id - 라벨 단건 조회
7
- */
8
- export const getLabelContract = {
9
- method: 'GET',
10
- path: '/:id',
11
- params: Type.Object({
12
- id: Type.String({ description: '라벨 ID' })
13
- }),
14
- response: Type.Union([
15
- Type.Object({
16
- id: Type.Number(),
17
- key: Type.String(),
18
- section: Type.String(),
19
- type: Type.String(),
20
- publishedVersion: Type.Union([Type.Number(), Type.Null()]),
21
- createdBy: Type.Union([Type.String(), Type.Null()]),
22
- createdAt: Type.String(),
23
- updatedAt: Type.String()
24
- }),
25
- Type.Object({
26
- error: Type.String()
27
- })
28
- ])
29
- };
30
- /**
31
- * PATCH /cms/labels/:id - 라벨 메타데이터 수정
32
- */
33
- export const updateLabelContract = {
34
- method: 'PATCH',
35
- path: '/:id',
36
- params: Type.Object({
37
- id: Type.String({ description: '라벨 ID' })
38
- }),
39
- body: Type.Object({
40
- section: Type.Optional(Type.String({ description: '섹션 변경' })),
41
- type: Type.Optional(Type.Union([
42
- Type.Literal('text'),
43
- Type.Literal('image'),
44
- Type.Literal('video'),
45
- Type.Literal('file'),
46
- Type.Literal('object')
47
- ]))
48
- }),
49
- response: Type.Union([
50
- Type.Object({
51
- id: Type.Number(),
52
- key: Type.String(),
53
- section: Type.String(),
54
- type: Type.String(),
55
- publishedVersion: Type.Union([Type.Number(), Type.Null()]),
56
- createdBy: Type.Union([Type.String(), Type.Null()]),
57
- createdAt: Type.String(),
58
- updatedAt: Type.String()
59
- }),
60
- Type.Object({
61
- error: Type.String()
62
- })
63
- ])
64
- };
65
- /**
66
- * DELETE /cms/labels/:id - 라벨 삭제
67
- */
68
- export const deleteLabelContract = {
69
- method: 'DELETE',
70
- path: '/:id',
71
- params: Type.Object({
72
- id: Type.String({ description: '라벨 ID' })
73
- }),
74
- response: Type.Union([
75
- Type.Object({
76
- success: Type.Boolean(),
77
- id: Type.Number()
78
- }),
79
- Type.Object({
80
- error: Type.String()
81
- })
82
- ])
83
- };
84
- //# sourceMappingURL=contract.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../../src/routes/labels/[id]/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGzC;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,MAAM,EAAE,KAAc;IACtB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;QAChB,EAAE,EAAE,IAAI,CAAC,MAAM,CA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,IAAI,CAAC,MAAM,EAAE;SACpB,CAAC;QACF,IAAI,CAAC,MAAM,CAAC;YACR,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;SACvB,CAAC;KACL,CAAC;CAC4B,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * CMS Label Detail Routes
3
- *
4
- * - GET /cms/labels/:id - 라벨 단건 조회
5
- * - PATCH /cms/labels/:id - 라벨 메타데이터 수정
6
- * - DELETE /cms/labels/:id - 라벨 삭제
7
- */
8
- declare const app: import("@spfn/core/route").SPFNApp;
9
- export default app;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/routes/labels/[id]/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAWH,QAAA,MAAM,GAAG,oCAAc,CAAC;AAiHxB,eAAe,GAAG,CAAC"}