@im-nobsidian/core 0.4.1 → 0.9.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.
- package/dist/index.d.ts +599 -196
- package/dist/index.js +4882 -1997
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -88,7 +88,10 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
88
88
|
fullReconcileInterval: z.ZodDefault<z.ZodNumber>;
|
|
89
89
|
deleteSync: z.ZodDefault<z.ZodBoolean>;
|
|
90
90
|
syncFiles: z.ZodDefault<z.ZodBoolean>;
|
|
91
|
+
createDatabases: z.ZodDefault<z.ZodBoolean>;
|
|
92
|
+
notifications: z.ZodDefault<z.ZodEnum<["silent", "default"]>>;
|
|
91
93
|
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
notifications: "silent" | "default";
|
|
92
95
|
direction: "push" | "both" | "pull";
|
|
93
96
|
conflictStrategy: "manual" | "local-first" | "remote-first" | "duplicate";
|
|
94
97
|
autoSync: boolean;
|
|
@@ -96,7 +99,9 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
96
99
|
fullReconcileInterval: number;
|
|
97
100
|
deleteSync: boolean;
|
|
98
101
|
syncFiles: boolean;
|
|
102
|
+
createDatabases: boolean;
|
|
99
103
|
}, {
|
|
104
|
+
notifications?: "silent" | "default" | undefined;
|
|
100
105
|
direction?: "push" | "both" | "pull" | undefined;
|
|
101
106
|
conflictStrategy?: "manual" | "local-first" | "remote-first" | "duplicate" | undefined;
|
|
102
107
|
autoSync?: boolean | undefined;
|
|
@@ -104,6 +109,7 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
104
109
|
fullReconcileInterval?: number | undefined;
|
|
105
110
|
deleteSync?: boolean | undefined;
|
|
106
111
|
syncFiles?: boolean | undefined;
|
|
112
|
+
createDatabases?: boolean | undefined;
|
|
107
113
|
}>;
|
|
108
114
|
paths: z.ZodObject<{
|
|
109
115
|
include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -209,6 +215,7 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
209
215
|
workspaceId?: string | undefined;
|
|
210
216
|
};
|
|
211
217
|
sync: {
|
|
218
|
+
notifications: "silent" | "default";
|
|
212
219
|
direction: "push" | "both" | "pull";
|
|
213
220
|
conflictStrategy: "manual" | "local-first" | "remote-first" | "duplicate";
|
|
214
221
|
autoSync: boolean;
|
|
@@ -216,6 +223,7 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
216
223
|
fullReconcileInterval: number;
|
|
217
224
|
deleteSync: boolean;
|
|
218
225
|
syncFiles: boolean;
|
|
226
|
+
createDatabases: boolean;
|
|
219
227
|
};
|
|
220
228
|
paths: {
|
|
221
229
|
attachments: string;
|
|
@@ -265,6 +273,7 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
265
273
|
}[] | undefined;
|
|
266
274
|
};
|
|
267
275
|
sync: {
|
|
276
|
+
notifications?: "silent" | "default" | undefined;
|
|
268
277
|
direction?: "push" | "both" | "pull" | undefined;
|
|
269
278
|
conflictStrategy?: "manual" | "local-first" | "remote-first" | "duplicate" | undefined;
|
|
270
279
|
autoSync?: boolean | undefined;
|
|
@@ -272,6 +281,7 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
272
281
|
fullReconcileInterval?: number | undefined;
|
|
273
282
|
deleteSync?: boolean | undefined;
|
|
274
283
|
syncFiles?: boolean | undefined;
|
|
284
|
+
createDatabases?: boolean | undefined;
|
|
275
285
|
};
|
|
276
286
|
paths: {
|
|
277
287
|
attachments?: string | undefined;
|
|
@@ -437,6 +447,8 @@ interface PullOptions extends BaseSyncOptions {
|
|
|
437
447
|
}
|
|
438
448
|
type SyncOptions = BaseSyncOptions;
|
|
439
449
|
interface PushResult {
|
|
450
|
+
/** 사이드카로 만든(dry-run 은 만들) Notion DB 수(ADR-036). 없으면 0. */
|
|
451
|
+
readonly createdDatabases?: number;
|
|
440
452
|
readonly created: number;
|
|
441
453
|
readonly updated: number;
|
|
442
454
|
readonly deleted: number;
|
|
@@ -695,6 +707,22 @@ interface ViewConfig {
|
|
|
695
707
|
readonly datePropertyId?: string;
|
|
696
708
|
readonly datePropertyName?: string;
|
|
697
709
|
readonly viewRange?: "week" | "month";
|
|
710
|
+
/**
|
|
711
|
+
* 보기 설정 원본(`views.retrieve` 의 `configuration`) — push 가 새 DB 에 같은 보기를 만들 때 속성 id 만
|
|
712
|
+
* 바꿔 그대로 보낸다(ADR-036). 위의 낱낱 항목은 `.base` 와 격하 보고가 읽는다.
|
|
713
|
+
*/
|
|
714
|
+
readonly configuration?: Readonly<Record<string, unknown>>;
|
|
715
|
+
/** 빠른 필터 — 속성 id → 조건. */
|
|
716
|
+
readonly quickFilters?: Readonly<Record<string, unknown>>;
|
|
717
|
+
}
|
|
718
|
+
/** `views.create` 에 보낼 보기 — `database_id` · `data_source_id` 는 보내는 쪽이 붙인다. */
|
|
719
|
+
interface ViewRequest {
|
|
720
|
+
readonly name: string;
|
|
721
|
+
readonly type: string;
|
|
722
|
+
readonly filter?: unknown;
|
|
723
|
+
readonly sorts?: unknown[];
|
|
724
|
+
readonly quick_filters?: Record<string, unknown>;
|
|
725
|
+
readonly configuration?: Record<string, unknown>;
|
|
698
726
|
}
|
|
699
727
|
interface DatabaseViewsConfig {
|
|
700
728
|
readonly databaseId: string;
|
|
@@ -732,6 +760,8 @@ interface BasePropertySchema {
|
|
|
732
760
|
readonly type: string;
|
|
733
761
|
readonly options?: BasePropertyOption[];
|
|
734
762
|
readonly groups?: BaseStatusGroup[];
|
|
763
|
+
/** 이 속성을 다시 만드는 데 드는 타입별 설정(`view/property-definition.ts`) — 사이드카가 적는다. */
|
|
764
|
+
readonly definition?: Readonly<Record<string, unknown>>;
|
|
735
765
|
}
|
|
736
766
|
interface PageCover {
|
|
737
767
|
readonly type: "file" | "external";
|
|
@@ -739,7 +769,7 @@ interface PageCover {
|
|
|
739
769
|
readonly expiryTime?: string;
|
|
740
770
|
}
|
|
741
771
|
interface PageIcon {
|
|
742
|
-
readonly type: "emoji" | "external" | "file" | "icon";
|
|
772
|
+
readonly type: "emoji" | "external" | "file" | "icon" | "custom_emoji";
|
|
743
773
|
readonly value: string;
|
|
744
774
|
readonly color?: string;
|
|
745
775
|
}
|
|
@@ -782,6 +812,8 @@ interface IStateDB {
|
|
|
782
812
|
updatePath(id: string, newPath: string): void;
|
|
783
813
|
delete(id: string): void;
|
|
784
814
|
resolveWikilink(text: string): WikilinkEntry | null;
|
|
815
|
+
/** relation 값의 위키링크 — 대상 DB(`parentIds`)의 행 가운데서만 찾는다(`wikilinkLookupsIn`). */
|
|
816
|
+
resolveWikilinkIn(text: string, parentIds: readonly string[]): WikilinkEntry | null;
|
|
785
817
|
resolvePageId(pageId: string): WikilinkEntry | null;
|
|
786
818
|
upsertWikilink(entry: WikilinkEntry): void;
|
|
787
819
|
/** 레코드 삭제 시 해당 경로의 wikilink 항목을 제거한다 (stale 링크 방지). */
|
|
@@ -833,6 +865,7 @@ declare class StateDB implements IStateDB {
|
|
|
833
865
|
updatePath(id: string, newPath: string): void;
|
|
834
866
|
delete(id: string): void;
|
|
835
867
|
resolveWikilink(text: string): WikilinkEntry | null;
|
|
868
|
+
resolveWikilinkIn(text: string, parentIds: readonly string[]): WikilinkEntry | null;
|
|
836
869
|
resolvePageId(pageId: string): WikilinkEntry | null;
|
|
837
870
|
upsertWikilink(entry: WikilinkEntry): void;
|
|
838
871
|
deleteWikilink(obsidianPath: string): void;
|
|
@@ -979,6 +1012,15 @@ interface WikilinkLookup {
|
|
|
979
1012
|
readonly params: (text: string) => string[];
|
|
980
1013
|
}
|
|
981
1014
|
declare const WIKILINK_LOOKUPS: readonly WikilinkLookup[];
|
|
1015
|
+
/**
|
|
1016
|
+
* relation 값의 위키링크 → 대상 DB(`parentIds` — DB id · data source id)의 행만 보는 조회들.
|
|
1017
|
+
*
|
|
1018
|
+
* - 대상 DB 밖 페이지는 고르지 않는다. Notion 은 relation 에 다른 DB 의 페이지를 넣으면 오류 없이 빼 버린다
|
|
1019
|
+
* (2026-10-23 실측: 200 응답 · 값만 빠짐) — 제목이 같은 다른 DB 의 행으로 풀리면 relation 이 조용히 사라졌다.
|
|
1020
|
+
* - 파일 이름 → 제목 → 별칭 차례. pull 은 relation 값을 파일 이름으로 적는다. 제목을 먼저 보면 제목이 같은
|
|
1021
|
+
* 두 행(한쪽 파일 이름에 `(id)` 가 붙은) 가운데 엉뚱한 행을 걸었다.
|
|
1022
|
+
*/
|
|
1023
|
+
declare function wikilinkLookupsIn(parentIds: readonly string[]): WikilinkLookup[];
|
|
982
1024
|
|
|
983
1025
|
/** 상태 DB 파일 옆의 잠금 파일. */
|
|
984
1026
|
declare function stateDbLockPath(dbPath: string): string;
|
|
@@ -1067,11 +1109,22 @@ declare function pendingWalBytes(dbPath: string): number;
|
|
|
1067
1109
|
*/
|
|
1068
1110
|
declare function assertNoPendingWal(dbPath: string): void;
|
|
1069
1111
|
|
|
1112
|
+
/** DB 속성 스키마 한 칸 — {@link NotionClient.getDatabaseSchema} 가 내는 꼴. */
|
|
1113
|
+
interface DatabasePropertySchema {
|
|
1114
|
+
readonly id: string;
|
|
1115
|
+
readonly type: string;
|
|
1116
|
+
/** relation 이 가리키는 DB — DB id · data source id. */
|
|
1117
|
+
readonly relationTargets?: readonly string[];
|
|
1118
|
+
}
|
|
1070
1119
|
type NotionPropertyValue = Record<string, unknown>;
|
|
1071
1120
|
interface WikilinkResolver$1 {
|
|
1072
1121
|
resolve(title: string): string | null;
|
|
1122
|
+
/** 대상 DB(`parentIds`)의 행 가운데서만 — relation 값. 없으면 {@link resolve} 로 찾는다. */
|
|
1123
|
+
resolveIn?(title: string, parentIds: readonly string[]): string | null;
|
|
1073
1124
|
resolvePageId(pageId: string): string | null;
|
|
1074
1125
|
}
|
|
1126
|
+
/** 이름으로 적힌 사람의 사용자 id — 워크스페이스에 없거나 같은 이름이 여럿이면 null. */
|
|
1127
|
+
type PeopleResolver = (name: string) => string | null;
|
|
1075
1128
|
interface PropertyMapperOptions {
|
|
1076
1129
|
/**
|
|
1077
1130
|
* 날짜시각을 적고 보낼 시간대(IANA 이름, 설정 `conversion.timeZone`). 없으면 이 컴퓨터의 시간대.
|
|
@@ -1090,19 +1143,31 @@ interface PropertyChangeContext {
|
|
|
1090
1143
|
* ({@link patchRichText}). 없으면 평문으로 보낸다.
|
|
1091
1144
|
*/
|
|
1092
1145
|
readonly remote?: Readonly<Record<string, unknown>>;
|
|
1146
|
+
/**
|
|
1147
|
+
* 파일 속성의 볼트 첨부(`[[attachments/…]]` 의 경로)를 올린 것 — 있으면 그 첨부를 올린 파일로 보낸다
|
|
1148
|
+
* ({@link PropertyMapper.localFileTargets}). 없는 첨부가 섞인 값은 보내지 않는다.
|
|
1149
|
+
*/
|
|
1150
|
+
readonly uploads?: ReadonlyMap<string, UploadedFile>;
|
|
1151
|
+
}
|
|
1152
|
+
/** Notion 에 올린 볼트 파일 — 파일 속성 값으로 보낸다. */
|
|
1153
|
+
interface UploadedFile {
|
|
1154
|
+
readonly fileUploadId: string;
|
|
1155
|
+
/** Notion 에 보일 이름 — 받을 때 붙인 내용 해시를 뗀 것. */
|
|
1156
|
+
readonly name: string;
|
|
1093
1157
|
}
|
|
1094
1158
|
declare class PropertyMapper {
|
|
1095
1159
|
private readonly options;
|
|
1096
1160
|
private schema;
|
|
1097
1161
|
private wikilinkResolver;
|
|
1162
|
+
private peopleResolver;
|
|
1098
1163
|
constructor(options?: PropertyMapperOptions);
|
|
1099
1164
|
/** 설정의 변환 옵션으로 만든다 — 시간대를 이 한 곳에서 읽는다. */
|
|
1100
1165
|
static fromConfig(config: Pick<Config, "conversion">): PropertyMapper;
|
|
1101
1166
|
setWikilinkResolver(resolver: WikilinkResolver$1): void;
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1167
|
+
setPeopleResolver(resolver: PeopleResolver): void;
|
|
1168
|
+
/** 스키마에 사람 속성이 있는가 — 있을 때만 사용자 목록을 읽는다. */
|
|
1169
|
+
hasPeopleProperty(): boolean;
|
|
1170
|
+
loadSchema(properties: Record<string, DatabasePropertySchema>): void;
|
|
1106
1171
|
/**
|
|
1107
1172
|
* frontmatter 전체를 Notion 속성 값으로 바꾼다 — 비교할 기준이 없는 새 행을 만들 때 쓴다.
|
|
1108
1173
|
*
|
|
@@ -1129,6 +1194,27 @@ declare class PropertyMapper {
|
|
|
1129
1194
|
properties: Record<string, NotionPropertyValue>;
|
|
1130
1195
|
skipped: string[];
|
|
1131
1196
|
};
|
|
1197
|
+
/** Notion 이 값을 정하는 속성(수식 · 롤업 · ID · 생성일 …)이 스키마에 있는가 — 버튼은 값이 없다. */
|
|
1198
|
+
hasComputedProperties(): boolean;
|
|
1199
|
+
/**
|
|
1200
|
+
* 바뀐 값 가운데 파일 속성이 가리키는 볼트 첨부의 경로 — 호출측이 올려 {@link PropertyChangeContext.uploads} 로 준다.
|
|
1201
|
+
*
|
|
1202
|
+
* pull 은 Notion 에 올라간 파일을 받아 `[[attachments/…]]` 로 적는다. 그 값을 새 행이나 바뀐 값으로 보낼 때
|
|
1203
|
+
* 첨부를 다시 올리지 않으면 보낼 수가 없다 — 다른 페이지로 옮겨 올린 행의 파일 속성이 비었다(2026-10-23 E2E 9건).
|
|
1204
|
+
*/
|
|
1205
|
+
localFileTargets(changed: Readonly<Record<string, unknown>>): string[];
|
|
1206
|
+
/** relation 값(위키링크 · 페이지 id 목록)이 가리키는 페이지 가운데 알아본 것. */
|
|
1207
|
+
relationTargets(value: unknown): string[];
|
|
1208
|
+
/**
|
|
1209
|
+
* @param targets relation 이 가리키는 DB. 알면 그 DB 의 행으로만 푼다 — 다른 DB 의 페이지는 Notion 이 오류
|
|
1210
|
+
* 없이 빼 버리므로, 못 찾은 것으로 두어 보내지 않고 알린다.
|
|
1211
|
+
*/
|
|
1212
|
+
private relationTargetOf;
|
|
1213
|
+
/**
|
|
1214
|
+
* 이 속성들 가운데 relation. 보내지 못한 relation 은 대상 노트가 아직 Notion 에 없었을 수 있다 —
|
|
1215
|
+
* 호출측이 기준에서 빼 두고 다시 보낸다.
|
|
1216
|
+
*/
|
|
1217
|
+
relationKeys(keys: readonly string[]): string[];
|
|
1132
1218
|
/**
|
|
1133
1219
|
* 값을 보낼 수 있는 속성만, pull 이 적는 모양으로 — 원격 값과 로컬 값을 견줄 때 쓴다.
|
|
1134
1220
|
*
|
|
@@ -1178,6 +1264,15 @@ declare class PropertyMapper {
|
|
|
1178
1264
|
private extractValue;
|
|
1179
1265
|
}
|
|
1180
1266
|
|
|
1267
|
+
/**
|
|
1268
|
+
* 동기화가 쓴 페이지가 사람에게 알림을 보내나(2026-10-08 changelog «Control notifications from page writes»).
|
|
1269
|
+
*
|
|
1270
|
+
* - `silent` — 페이지 수정 · @멘션 · 사람 속성 알림을 보내지 않는다. DB 자동화 · 리마인더 · 웹훅은 그대로다
|
|
1271
|
+
* - `default` — Notion 이 정한 대로 보낸다
|
|
1272
|
+
*/
|
|
1273
|
+
declare const NOTIFICATION_MODES: readonly ["silent", "default"];
|
|
1274
|
+
type NotificationMode = (typeof NOTIFICATION_MODES)[number];
|
|
1275
|
+
|
|
1181
1276
|
/**
|
|
1182
1277
|
* 취소 신호. `AbortSignal` 과 호환되며, 테스트에서 가벼운 목 객체로도 쓸 수 있다.
|
|
1183
1278
|
*/
|
|
@@ -1243,6 +1338,18 @@ interface DatabaseMeta {
|
|
|
1243
1338
|
* source 가 없으면 DB 객체의 속성.
|
|
1244
1339
|
*/
|
|
1245
1340
|
readonly properties: Readonly<Record<string, unknown>>;
|
|
1341
|
+
/** 페이지 본문 안에 놓인 인라인 DB 인가. */
|
|
1342
|
+
readonly isInline: boolean;
|
|
1343
|
+
/** DB 의 아이콘 · 커버 · 설명 · 제목 표시 — 받은 그대로. */
|
|
1344
|
+
readonly appearance?: DatabaseAppearance;
|
|
1345
|
+
}
|
|
1346
|
+
/** DB 자체의 꾸밈 — 행이 아니라 DB 의 것이다. 값은 Notion 이 준 그대로(`icon` · `cover` 는 페이지와 같은 꼴). */
|
|
1347
|
+
interface DatabaseAppearance {
|
|
1348
|
+
readonly icon: unknown;
|
|
1349
|
+
readonly cover: unknown;
|
|
1350
|
+
readonly description: readonly unknown[];
|
|
1351
|
+
/** 보기 위에 DB 제목을 보이나(2026-10-20 changelog). */
|
|
1352
|
+
readonly showTitle: boolean;
|
|
1246
1353
|
}
|
|
1247
1354
|
interface NotionClientOptions {
|
|
1248
1355
|
readonly token: string;
|
|
@@ -1258,6 +1365,8 @@ interface NotionClientOptions {
|
|
|
1258
1365
|
readonly markdownCompletionMaxBlocks?: number;
|
|
1259
1366
|
/** 페이지 속성의 날짜시각을 적을 시간대(`conversion.timeZone`) — 없으면 이 컴퓨터의 시간대. */
|
|
1260
1367
|
readonly timeZone?: string;
|
|
1368
|
+
/** 쓰기가 알림을 보내나(`sync.notifications`). */
|
|
1369
|
+
readonly notifications?: NotificationMode;
|
|
1261
1370
|
readonly fetch?: typeof globalThis.fetch;
|
|
1262
1371
|
}
|
|
1263
1372
|
declare class NotionClient {
|
|
@@ -1275,6 +1384,13 @@ declare class NotionClient {
|
|
|
1275
1384
|
private botUserId;
|
|
1276
1385
|
/** {@link getUserNames} 가 물은 사용자 이름 — 읽지 못한 사용자는 null. */
|
|
1277
1386
|
private readonly userNames;
|
|
1387
|
+
/**
|
|
1388
|
+
* {@link getDatabaseSyncability} 가 읽은 DB — 바로 뒤 {@link getDatabaseMeta} 가 한 번 쓰고 버린다.
|
|
1389
|
+
* 발견한 DB 는 곧장 행을 받으므로 같은 두 요청(DB · data source)을 되풀이하지 않는다.
|
|
1390
|
+
*/
|
|
1391
|
+
private readonly checkedDatabases;
|
|
1392
|
+
/** 보낸 요청 수(재시도는 세지 않는다) — 순회 예산을 잰다. */
|
|
1393
|
+
private requestsSent;
|
|
1278
1394
|
constructor(options: NotionClientOptions);
|
|
1279
1395
|
/** config.advanced 의 운영 튜닝값으로 클라이언트를 생성한다 (매직넘버 단일 진실원). */
|
|
1280
1396
|
static fromConfig(config: Config, fetch?: typeof globalThis.fetch): NotionClient;
|
|
@@ -1294,6 +1410,11 @@ declare class NotionClient {
|
|
|
1294
1410
|
* 자체는 id 로 보존된다.
|
|
1295
1411
|
*/
|
|
1296
1412
|
getUserNames(ids: readonly string[]): Promise<Map<string, string>>;
|
|
1413
|
+
/** 워크스페이스 사용자 전부(사람 · 봇) — 손님은 API 가 돌려주지 않는다. */
|
|
1414
|
+
listUsers(): Promise<Array<{
|
|
1415
|
+
id: string;
|
|
1416
|
+
name?: string | null;
|
|
1417
|
+
}>>;
|
|
1297
1418
|
getPage(pageId: string): Promise<PageObjectResponse>;
|
|
1298
1419
|
createPage(params: {
|
|
1299
1420
|
parentId: string;
|
|
@@ -1302,6 +1423,33 @@ declare class NotionClient {
|
|
|
1302
1423
|
properties?: Record<string, unknown>;
|
|
1303
1424
|
children?: BlockObjectResponse[];
|
|
1304
1425
|
}): Promise<PageObjectResponse>;
|
|
1426
|
+
/**
|
|
1427
|
+
* 페이지 아래에 DB 를 만든다(ADR-036). 같은 요청이 두 번 적용되면 DB 가 둘이 된다 — 다시 보내지 않는다.
|
|
1428
|
+
* 부른 쪽이 만들기 전에 자리를 적어 두고, 응답을 잃으면 다음 push 가 부모에서 찾는다.
|
|
1429
|
+
*
|
|
1430
|
+
* @returns 만든 DB 와 그 data source(DB 를 만들면 하나 생긴다)
|
|
1431
|
+
*/
|
|
1432
|
+
createDatabase(params: {
|
|
1433
|
+
parentPageId: string;
|
|
1434
|
+
title: string;
|
|
1435
|
+
isInline: boolean;
|
|
1436
|
+
properties: Record<string, unknown>;
|
|
1437
|
+
/** 아이콘 · 커버 · 설명 · 제목 표시 — 요청 꼴 그대로(`databases.create` 의 같은 이름 칸). */
|
|
1438
|
+
appearance?: Readonly<Record<string, unknown>>;
|
|
1439
|
+
}): Promise<{
|
|
1440
|
+
databaseId: string;
|
|
1441
|
+
dataSourceId: string;
|
|
1442
|
+
}>;
|
|
1443
|
+
/** DB 의 첫 data source — 행 · 스키마가 사는 곳. 없으면 null. */
|
|
1444
|
+
primaryDataSourceId(databaseId: string): Promise<string | null>;
|
|
1445
|
+
/**
|
|
1446
|
+
* data source 에 속성을 더하거나 바꾼다. 같은 이름이면 그 속성을 바꾼다 — 다시 보내도 결과가 같다.
|
|
1447
|
+
*
|
|
1448
|
+
* @returns 바꾼 뒤의 속성 전체(이름 → 정의)
|
|
1449
|
+
*/
|
|
1450
|
+
updateDataSourceProperties(dataSourceId: string, properties: Record<string, unknown>): Promise<Record<string, Record<string, unknown>>>;
|
|
1451
|
+
/** data source 의 속성(이름 → 정의). */
|
|
1452
|
+
getDataSourceProperties(dataSourceId: string): Promise<Record<string, Record<string, unknown>>>;
|
|
1305
1453
|
createPageWithMarkdown(params: {
|
|
1306
1454
|
parentId: string;
|
|
1307
1455
|
parentType: "page" | "database";
|
|
@@ -1320,6 +1468,16 @@ declare class NotionClient {
|
|
|
1320
1468
|
*/
|
|
1321
1469
|
restoreLeadingHeading(pageId: string, markdown: string): Promise<boolean>;
|
|
1322
1470
|
updatePageProperties(pageId: string, properties: Record<string, unknown>): Promise<PageObjectResponse>;
|
|
1471
|
+
/**
|
|
1472
|
+
* 페이지의 아이콘 · 커버만 바꾼다 — `null` 은 지운다. 값은 `notion/decoration-values.ts` 가 만든 객체다.
|
|
1473
|
+
* 모르는 아이콘 이름 · 색이면 Notion 이 `validation_error` 로 거절하고 아무것도 바꾸지 않는다.
|
|
1474
|
+
*/
|
|
1475
|
+
updatePageDecorations(pageId: string, decorations: {
|
|
1476
|
+
readonly icon?: unknown;
|
|
1477
|
+
readonly cover?: unknown;
|
|
1478
|
+
}): Promise<PageObjectResponse>;
|
|
1479
|
+
/** 워크스페이스 사용자 이모지의 id — 이름이 꼭 같은 것. 없으면 null. */
|
|
1480
|
+
findCustomEmojiId(name: string): Promise<string | null>;
|
|
1323
1481
|
/**
|
|
1324
1482
|
* 페이지 마크다운. 블록이 많아 잘린 부분은 블록 ID 로 다시 받아 채운다(S-06 —
|
|
1325
1483
|
* {@link completeTruncatedMarkdown}). 돌려준 `unknown_block_ids` 는 권한이 닿지 않아 끝내
|
|
@@ -1362,6 +1520,8 @@ declare class NotionClient {
|
|
|
1362
1520
|
* SDK(`databases.retrieve`/`dataSources.retrieve`)는 동일 토큰으로 정상 동작한다.
|
|
1363
1521
|
*/
|
|
1364
1522
|
getDatabaseMeta(databaseId: string): Promise<DatabaseMeta>;
|
|
1523
|
+
/** DB 와 그 data source 들을 읽는다 — `owners` 는 data source 마다 그 부모 DB(읽지 못했으면 undefined). */
|
|
1524
|
+
private readDatabase;
|
|
1365
1525
|
/** `from` 이 이 DB 를 받은 것이면 그것을, 아니면 새로 받는다. */
|
|
1366
1526
|
private metaOf;
|
|
1367
1527
|
/** @param from 이미 받은 이 DB — 주면 다시 받지 않는다. */
|
|
@@ -1395,10 +1555,7 @@ declare class NotionClient {
|
|
|
1395
1555
|
viewName: string;
|
|
1396
1556
|
} | null>;
|
|
1397
1557
|
/** @param from 이미 받은 이 DB — 주면 다시 받지 않는다. */
|
|
1398
|
-
getDatabaseSchema(databaseId: string, from?: DatabaseMeta): Promise<Record<string,
|
|
1399
|
-
id: string;
|
|
1400
|
-
type: string;
|
|
1401
|
-
}>>;
|
|
1558
|
+
getDatabaseSchema(databaseId: string, from?: DatabaseMeta): Promise<Record<string, DatabasePropertySchema>>;
|
|
1402
1559
|
/**
|
|
1403
1560
|
* DB 속성 스키마 전체(선택지·status 그룹 포함).
|
|
1404
1561
|
*
|
|
@@ -1412,6 +1569,14 @@ declare class NotionClient {
|
|
|
1412
1569
|
getDatabaseSchemaFull(databaseId: string, from?: DatabaseMeta): Promise<Record<string, BasePropertySchema>>;
|
|
1413
1570
|
/** 특정 data source 1개를 직접 쿼리한다(저수준). 다중 data source 순회의 빌딩블록. */
|
|
1414
1571
|
private queryDataSource;
|
|
1572
|
+
/**
|
|
1573
|
+
* data source 하나의 행을 모두 읽는다. 조회 하나는 결과 10,000건에서 멈추고 `request_status.incomplete` 를
|
|
1574
|
+
* 단다(API 2026-04-20) — 그러면 만든 시각 차례로 처음부터 다시 읽되, 한도에 걸릴 때마다 마지막 행의 만든 시각부터
|
|
1575
|
+
* 새 조회를 연다(SDK `iterateAllDataSourceRows` 와 같은 방법 — 그 도우미는 속도 제한을 거치지 않는다).
|
|
1576
|
+
* 한도 밑이면 예전처럼 정렬 없이 한 번 읽는다 — 행 차례(같은 제목의 파일 이름)가 그대로다.
|
|
1577
|
+
*/
|
|
1578
|
+
private queryAllRowsOf;
|
|
1579
|
+
private queryRowsByCreatedTime;
|
|
1415
1580
|
/**
|
|
1416
1581
|
* database 의 1차 data source 1페이지를 쿼리한다(증분 detect 등 단일 소스 경로용).
|
|
1417
1582
|
* 전 행을 빠짐없이 받으려면 {@link queryAllDatabasePages} 를 쓴다(전 data source 순회).
|
|
@@ -1549,7 +1714,7 @@ declare class NotionClient {
|
|
|
1549
1714
|
* root 서브트리를 직접 BFS 순회해 하위 페이지를 모두 수집한다(중첩 깊이 무관·무손실).
|
|
1550
1715
|
* 비용은 서브트리 전체 블록 수에 비례한다.
|
|
1551
1716
|
*
|
|
1552
|
-
* @param opts.
|
|
1717
|
+
* @param opts.maxRequests 이 순회가 쓸 요청 수. 각 페이지 처리 전 초과를 검사해
|
|
1553
1718
|
* 초과 시 {@link DiscoveryTooLargeError}를 던진다(대규모 서브트리 → search 폴백 유도).
|
|
1554
1719
|
* **그때까지 찾은 페이지는 에러의 `partial` 에 실어 보낸다** — 버리면 호출측이 두
|
|
1555
1720
|
* 경로를 경합시키게 되고, 어느 쪽이 이기는지를 벽시계가 정하게 된다(R12-A).
|
|
@@ -1557,7 +1722,7 @@ declare class NotionClient {
|
|
|
1557
1722
|
* @param opts.signal 취소되면 다음 페이지로 가기 전에 `OperationAbortedError` 로 멈춘다.
|
|
1558
1723
|
*/
|
|
1559
1724
|
getChildPagesRecursive(parentId: string, opts?: {
|
|
1560
|
-
|
|
1725
|
+
maxRequests?: number;
|
|
1561
1726
|
signal?: AbortLike;
|
|
1562
1727
|
}): Promise<PageObjectResponse[]>;
|
|
1563
1728
|
/** 워크스페이스에서 통합에 공유된 모든 페이지를 bulk search 로 열거한다(100/요청). */
|
|
@@ -1578,9 +1743,18 @@ declare class NotionClient {
|
|
|
1578
1743
|
*/
|
|
1579
1744
|
getPagesUnderRootViaSearch(rootId: string, signal?: AbortLike): Promise<PageObjectResponse[]>;
|
|
1580
1745
|
listDatabaseViews(databaseId: string): Promise<ViewConfig[]>;
|
|
1746
|
+
/** DB 에 보기를 만든다. 다시 보내면 같은 보기가 둘 생긴다 — 재시도하지 않는다. @returns 만든 보기 id */
|
|
1747
|
+
createView(params: {
|
|
1748
|
+
databaseId: string;
|
|
1749
|
+
dataSourceId: string;
|
|
1750
|
+
request: ViewRequest;
|
|
1751
|
+
}): Promise<string>;
|
|
1752
|
+
/** 보기를 지운다. DB 의 마지막 보기는 지우지 못한다(400). */
|
|
1753
|
+
deleteView(viewId: string): Promise<void>;
|
|
1581
1754
|
getView(viewId: string): Promise<ViewConfig | null>;
|
|
1582
1755
|
getDatabaseViewsConfig(databaseId: string): Promise<DatabaseViewsConfig>;
|
|
1583
1756
|
extractCover(page: PageObjectResponse): PageCover | null;
|
|
1757
|
+
/** 페이지 아이콘 — `value` 는 frontmatter 에 적는 꼴이다(`notion/decoration-values.ts`). */
|
|
1584
1758
|
extractIcon(page: PageObjectResponse): PageIcon | null;
|
|
1585
1759
|
extractTitle(page: PageObjectResponse): string;
|
|
1586
1760
|
/**
|
|
@@ -1935,6 +2109,10 @@ interface VaultFS {
|
|
|
1935
2109
|
listMarkdownFileStats(): Promise<FileStatInfo[]>;
|
|
1936
2110
|
listNonMarkdownFiles(): Promise<NonMdFileInfo[]>;
|
|
1937
2111
|
getFileStat(path: string): Promise<FileStatInfo | null>;
|
|
2112
|
+
/**
|
|
2113
|
+
* 이 볼트(연결)가 맡은 경로인가 — 볼트 안의 다른 연결 폴더(ADR-038)는 false. 없으면 전부 맡는다.
|
|
2114
|
+
*/
|
|
2115
|
+
ownsPath?(path: string): boolean;
|
|
1938
2116
|
}
|
|
1939
2117
|
|
|
1940
2118
|
type ResolutionChoice = "local" | "remote" | "merge" | "duplicate";
|
|
@@ -1991,6 +2169,225 @@ declare class ConflictResolver {
|
|
|
1991
2169
|
generateDiff(conflict: Conflict): string;
|
|
1992
2170
|
}
|
|
1993
2171
|
|
|
2172
|
+
interface BaseFileOptions {
|
|
2173
|
+
readonly databaseId: string;
|
|
2174
|
+
readonly databaseName: string;
|
|
2175
|
+
readonly schema: Record<string, BasePropertySchema>;
|
|
2176
|
+
readonly viewsConfig: DatabaseViewsConfig;
|
|
2177
|
+
readonly folderPath: string;
|
|
2178
|
+
/**
|
|
2179
|
+
* 날짜 속성 이름 → 기간의 끝을 적는 짝 키(`<이름>_end`). 행 노트는 기간을 두 키로 적으므로 표에 그 속성이
|
|
2180
|
+
* 보이면 끝 열도 바로 뒤에 둔다(B13). 받은 행 가운데 기간이 있는 속성만 — 기간을 쓰지 않는 날짜 속성에
|
|
2181
|
+
* 늘 빈 열을 두지 않는다.
|
|
2182
|
+
*/
|
|
2183
|
+
readonly rangeEnds?: ReadonlyMap<string, string>;
|
|
2184
|
+
}
|
|
2185
|
+
type BasesViewType = "table" | "cards" | "list";
|
|
2186
|
+
/** Notion 뷰 하나를 Bases 로 옮길 때의 판정. */
|
|
2187
|
+
interface BasesViewMapping {
|
|
2188
|
+
/** Bases 뷰 타입. `null` = 대응이 없어 `.base` 에 실을 수 없음. */
|
|
2189
|
+
readonly type: BasesViewType | null;
|
|
2190
|
+
/**
|
|
2191
|
+
* 값이 있으면 **정확한 대응이 아니라 격하**라는 뜻(사람용 사유).
|
|
2192
|
+
* 뷰 자체는 살아남지만 원래 뷰의 표현 일부(달력 격자·타임라인 축)는 재현되지 않는다.
|
|
2193
|
+
*/
|
|
2194
|
+
readonly degradeReason?: string;
|
|
2195
|
+
}
|
|
2196
|
+
/**
|
|
2197
|
+
* Notion 뷰 타입 → Obsidian Bases 뷰 매핑(SSOT).
|
|
2198
|
+
*
|
|
2199
|
+
* 뷰는 현재 pull-authoritative — Notion API 가 2026-03-19 뷰 생성/수정/삭제를 열었지만
|
|
2200
|
+
* 본 프로젝트는 아직 뷰 write-back 을 구현하지 않았다(로드맵 항목). push 로 되돌릴 수
|
|
2201
|
+
* 없는 동안 "조용한 유실 금지"는 곧 "보존 + 정직한 degrade 리포트"를 의미한다.
|
|
2202
|
+
*
|
|
2203
|
+
* 달력·타임라인은 예전에 `null` 이었다 — 즉 `.base` 에서 **통째로 사라졌다**. 사이드카에는
|
|
2204
|
+
* 남지만 Obsidian 을 여는 사람 눈에는 그 뷰가 애초에 없었던 것처럼 보인다. 격자·축은
|
|
2205
|
+
* 못 살려도 "날짜 순으로 늘어놓은 목록"이라는 본래 의도는 표로 남길 수 있으므로,
|
|
2206
|
+
* 버리는 대신 격하해 살리고 사유를 사이드카에 적는다.
|
|
2207
|
+
*/
|
|
2208
|
+
declare const NOTION_TO_BASES_VIEW: Record<string, BasesViewMapping>;
|
|
2209
|
+
/** Notion 뷰 타입의 Bases 매핑. 미상 타입은 표현 불가로 본다. */
|
|
2210
|
+
declare function basesViewMappingOf(notionType: string): BasesViewMapping;
|
|
2211
|
+
/** Notion 뷰 타입의 Bases 대응 타입을 돌려준다. 미지원/미상 타입은 `null`. */
|
|
2212
|
+
declare function basesViewTypeOf(notionType: string): BasesViewType | null;
|
|
2213
|
+
declare class BaseFileGenerator {
|
|
2214
|
+
generate(options: BaseFileOptions): string;
|
|
2215
|
+
private writeFilters;
|
|
2216
|
+
private needsContentCoverFormula;
|
|
2217
|
+
private writeFormulas;
|
|
2218
|
+
private writePropertyDisplayNames;
|
|
2219
|
+
private writeViews;
|
|
2220
|
+
/** `filters:` 키와 그 값을 쓴다. 단일 식이면 한 줄, 그룹이면 블록. */
|
|
2221
|
+
private writeFilterValue;
|
|
2222
|
+
/** 필터 노드를 시퀀스 항목(`- …`)으로 쓴다. 그룹이면 재귀적으로 중첩한다. */
|
|
2223
|
+
private writeFilterItem;
|
|
2224
|
+
/**
|
|
2225
|
+
* 필터 식을 YAML 스칼라로 쓴다.
|
|
2226
|
+
*
|
|
2227
|
+
* 식은 대개 `note["상태"] == "진행 중"` 처럼 큰따옴표를 품는다. 평문 스칼라는 큰따옴표를
|
|
2228
|
+
* 안에 담을 수 있으므로(선두만 아니면 된다) 기본은 평문으로 두어 기존 `file.ext == "md"`
|
|
2229
|
+
* 라인과 모양을 맞춘다. 다만 `: `·` #`·선두 지시문자는 평문에서 의미가 달라지므로
|
|
2230
|
+
* 그때만 작은따옴표로 감싼다(속성명에 콜론이나 해시가 들어갈 수 있다).
|
|
2231
|
+
*/
|
|
2232
|
+
private yamlExpr;
|
|
2233
|
+
/**
|
|
2234
|
+
* 뷰 이름을 Bases 요구사항대로 유일화한다(in-place). 동명 충돌 시 ' 2',' 3'… 를 붙이되
|
|
2235
|
+
* 이미 존재하는 이름과 다시 충돌하지 않을 때까지 증가시킨다.
|
|
2236
|
+
*/
|
|
2237
|
+
private dedupeViewNames;
|
|
2238
|
+
private convertView;
|
|
2239
|
+
private toNoteRef;
|
|
2240
|
+
/**
|
|
2241
|
+
* 속성 참조(order/sort/groupBy/image)를 YAML로 안전하게 출력한다.
|
|
2242
|
+
* `file.name`·`formula.coverImage`·`note.cover` 같은 접두사 식별자와 공백 포함 일반 속성명은
|
|
2243
|
+
* 평문 스칼라로 안전하므로 그대로 두고, 콜론·해시·따옴표 등 YAML 메타문자가 있을 때만 인용한다.
|
|
2244
|
+
*/
|
|
2245
|
+
private propRef;
|
|
2246
|
+
private resolvePropertyName;
|
|
2247
|
+
private yamlKey;
|
|
2248
|
+
private yamlValue;
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
/**
|
|
2252
|
+
* DB 사이드카(`<db>.notion.json`) — `.base` 로 표현할 수 없는 Notion DB 메타데이터를
|
|
2253
|
+
* 무손실 보존하는 단일 파일.
|
|
2254
|
+
*
|
|
2255
|
+
* ## 왜 필요한가 (I4·I7 "조용한 유실 금지")
|
|
2256
|
+
*
|
|
2257
|
+
* Obsidian Bases(`.base`)는 Notion DB 뷰의 일부만 표현한다:
|
|
2258
|
+
* · 미지원 뷰(calendar/timeline/form/chart/map/dashboard)는 `.base` 에서 통째 누락.
|
|
2259
|
+
* · 표현되는 뷰도 Notion **필터식·커버 크기/비율·컬럼 width/wrap·빈그룹 숨김** 등은
|
|
2260
|
+
* Bases 문법에 대응이 없어 손실된다.
|
|
2261
|
+
*
|
|
2262
|
+
* 사이드카는 DB 스키마의 원본이기도 하다(ADR-036, v2) — 새 루트로 올린 DB 폴더를 push 가 이것으로
|
|
2263
|
+
* Notion DB 로 다시 만든다. 그래서 속성마다 다시 만드는 데 드는 설정(`definition`)과 인라인 여부를 적는다.
|
|
2264
|
+
* v1(옵션 이름만)도 읽는다(`sync/database-schema.ts`). `.base` 와 같은 폴더에 두어 사람이 발견할 수 있고
|
|
2265
|
+
* 도구가 다시 쓸 수 있다.
|
|
2266
|
+
*
|
|
2267
|
+
* ## 멱등성
|
|
2268
|
+
*
|
|
2269
|
+
* 매 pull 마다 재생성되므로 **결정적**이어야 한다(타임스탬프·실행시각 금지, 키 정렬).
|
|
2270
|
+
* 동일 DB 상태 → 동일 바이트 → drift 0 / churn 0.
|
|
2271
|
+
*/
|
|
2272
|
+
/** 이 도구가 쓴 사이드카의 표지 — 읽는 쪽은 이 값으로 사용자가 만든 JSON 과 가린다. */
|
|
2273
|
+
declare const SIDECAR_GENERATOR = "im-nobsidian";
|
|
2274
|
+
/** 지금 쓰는 사이드카 형식 판. 판이 적히지 않은 옛 파일은 1 로 읽는다. */
|
|
2275
|
+
declare const SIDECAR_SCHEMA_VERSION = 2;
|
|
2276
|
+
interface NotionSidecar {
|
|
2277
|
+
readonly generator: typeof SIDECAR_GENERATOR;
|
|
2278
|
+
readonly schemaVersion: typeof SIDECAR_SCHEMA_VERSION;
|
|
2279
|
+
readonly databaseId: string;
|
|
2280
|
+
readonly databaseName: string;
|
|
2281
|
+
/** 페이지 본문 안에 놓인 인라인 DB 인가 — 다시 만들 때 같게. */
|
|
2282
|
+
readonly isInline: boolean;
|
|
2283
|
+
/** 속성 스키마 — 이름 정렬. `.base` displayName 만으로는 잃는 타입/옵션을 보존. */
|
|
2284
|
+
readonly properties: SidecarProperty[];
|
|
2285
|
+
/** 모든 뷰(표현/미표현 공통) — Notion 순서 유지. */
|
|
2286
|
+
readonly views: SidecarView[];
|
|
2287
|
+
/** 정직한 손실 리포트 — 무엇이 `.base` 에서 누락/degrade 됐는가. */
|
|
2288
|
+
readonly degraded: DegradeNote[];
|
|
2289
|
+
/** DB 자체의 꾸밈 — 있는 것만. 없으면 키가 없다(꾸밈 없는 DB 의 사이드카는 예전과 같은 바이트). */
|
|
2290
|
+
readonly appearance?: SidecarAppearance;
|
|
2291
|
+
}
|
|
2292
|
+
/**
|
|
2293
|
+
* DB 의 아이콘 · 커버 · 설명 · 제목 표시. `icon` · `cover` 는 페이지 frontmatter 와 같은 꼴
|
|
2294
|
+
* (`notion/decoration-values.ts`), `description` 은 NFM 한 줄.
|
|
2295
|
+
*/
|
|
2296
|
+
interface SidecarAppearance {
|
|
2297
|
+
readonly icon?: string;
|
|
2298
|
+
readonly cover?: string;
|
|
2299
|
+
readonly description?: string;
|
|
2300
|
+
/** 보기 위에 DB 제목을 숨겼으면 false. 보이면(기본) 없다. */
|
|
2301
|
+
readonly showTitle?: false;
|
|
2302
|
+
}
|
|
2303
|
+
interface SidecarProperty {
|
|
2304
|
+
readonly name: string;
|
|
2305
|
+
readonly id: string;
|
|
2306
|
+
readonly type: string;
|
|
2307
|
+
/** select/multi_select/status 옵션명(있으면). */
|
|
2308
|
+
readonly options?: string[];
|
|
2309
|
+
/** 다시 만드는 데 드는 타입별 설정(`view/property-definition.ts`). 타입 이름만으로 되면 없다. */
|
|
2310
|
+
readonly definition?: Readonly<Record<string, unknown>>;
|
|
2311
|
+
}
|
|
2312
|
+
interface SidecarView {
|
|
2313
|
+
readonly id: string;
|
|
2314
|
+
readonly name: string;
|
|
2315
|
+
readonly notionType: string;
|
|
2316
|
+
/** Bases 대응 타입. `null` = `.base` 미표현(사이드카가 유일 보존처). */
|
|
2317
|
+
readonly basesType: BasesViewType | null;
|
|
2318
|
+
/** 원본 뷰 설정 중 의미 있는 항목(키 정렬). 빈 값은 생략. */
|
|
2319
|
+
readonly config: Record<string, unknown>;
|
|
2320
|
+
}
|
|
2321
|
+
interface DegradeNote {
|
|
2322
|
+
readonly view: string;
|
|
2323
|
+
/**
|
|
2324
|
+
* `view-unrepresentable` = 뷰가 `.base` 에서 통째로 누락.
|
|
2325
|
+
* `view-degraded` = 뷰는 남지만 다른 타입으로 격하(달력→표 등).
|
|
2326
|
+
* `setting-dropped` = 뷰는 그대로지만 설정 하나가 빠짐.
|
|
2327
|
+
*/
|
|
2328
|
+
readonly kind: "view-unrepresentable" | "view-degraded" | "setting-dropped";
|
|
2329
|
+
readonly detail: string;
|
|
2330
|
+
}
|
|
2331
|
+
declare class SidecarGenerator {
|
|
2332
|
+
/**
|
|
2333
|
+
* 사이드카 객체를 빌드한다(순수 — I/O 없음). 직렬화는 {@link serialize} 가 담당.
|
|
2334
|
+
*/
|
|
2335
|
+
build(options: {
|
|
2336
|
+
databaseId: string;
|
|
2337
|
+
databaseName: string;
|
|
2338
|
+
schema: Record<string, BasePropertySchema>;
|
|
2339
|
+
viewsConfig: DatabaseViewsConfig;
|
|
2340
|
+
isInline?: boolean;
|
|
2341
|
+
appearance?: SidecarAppearance;
|
|
2342
|
+
}): NotionSidecar;
|
|
2343
|
+
/**
|
|
2344
|
+
* 사이드카를 결정적 JSON 문자열로 직렬화한다(키 재귀 정렬 + 말미 개행).
|
|
2345
|
+
* 동일 입력 → 동일 바이트 → 멱등(drift/churn 0).
|
|
2346
|
+
*/
|
|
2347
|
+
serialize(sidecar: NotionSidecar): string;
|
|
2348
|
+
private buildProperties;
|
|
2349
|
+
private buildView;
|
|
2350
|
+
/**
|
|
2351
|
+
* 뷰 설정 중 의미 있는 항목을 추출한다. `.base` 가 표현 못하는 항목(필터·커버크기 등)은
|
|
2352
|
+
* config 에 보존하면서 동시에 degrade 리포트에 1줄씩 기록한다(표현되는 뷰에 한해 —
|
|
2353
|
+
* 미표현 뷰는 이미 view-unrepresentable 로 통째 보고됨).
|
|
2354
|
+
*/
|
|
2355
|
+
private extractConfig;
|
|
2356
|
+
/**
|
|
2357
|
+
* 필터 손실을 **실제로 못 옮긴 것만** 보고한다.
|
|
2358
|
+
*
|
|
2359
|
+
* 예전엔 필터가 있기만 하면 "Notion 필터식은 .base 로 표현되지 않음"을 무조건 찍었다.
|
|
2360
|
+
* 이제 `.base` 가 뷰별 `filters:` 를 내보내므로 그 문구는 대부분의 경우 거짓이다.
|
|
2361
|
+
* 거짓 degrade 는 진짜 degrade 를 묻어 버리므로, `.base` 와 **같은 번역기**를 돌려
|
|
2362
|
+
* 남은 것만 적는다(두 산출물이 어긋날 여지를 없앤다).
|
|
2363
|
+
*/
|
|
2364
|
+
private noteFilterDegrade;
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
/** 속성 하나를 어떻게 정했나. */
|
|
2368
|
+
interface InferredProperty {
|
|
2369
|
+
readonly name: string;
|
|
2370
|
+
readonly type: string;
|
|
2371
|
+
/** 사람이 읽는 까닭 — `Obsidian 속성 타입 number` · `값 12개가 모두 날짜` … */
|
|
2372
|
+
readonly reason: string;
|
|
2373
|
+
}
|
|
2374
|
+
interface FolderDatabaseDraft {
|
|
2375
|
+
readonly sidecar: NotionSidecar;
|
|
2376
|
+
readonly properties: readonly InferredProperty[];
|
|
2377
|
+
/** 옮긴 보기 이름. */
|
|
2378
|
+
readonly views: readonly string[];
|
|
2379
|
+
/** 옮기지 않은 것과 까닭 — 키 · 보기 · 필터. */
|
|
2380
|
+
readonly skipped: ReadonlyArray<{
|
|
2381
|
+
readonly what: string;
|
|
2382
|
+
readonly reason: string;
|
|
2383
|
+
}>;
|
|
2384
|
+
}
|
|
2385
|
+
interface FolderDatabaseReport extends FolderDatabaseDraft {
|
|
2386
|
+
readonly folder: string;
|
|
2387
|
+
readonly sidecarPath: string;
|
|
2388
|
+
readonly rows: number;
|
|
2389
|
+
}
|
|
2390
|
+
|
|
1994
2391
|
/**
|
|
1995
2392
|
* 한 오케스트레이터의 작업은 한 번에 하나만 돈다(S-09).
|
|
1996
2393
|
*
|
|
@@ -2005,7 +2402,7 @@ declare class ConflictResolver {
|
|
|
2005
2402
|
* 긴 sync(실볼트 pull 500초) 동안 주기 sync 가 쌓인다.
|
|
2006
2403
|
*/
|
|
2007
2404
|
/** 잠그는 작업 — 볼트 · 상태 DB · 원격을 바꾸거나 이번 실행의 기준을 정하는 것. */
|
|
2008
|
-
type GatedOperation = "push" | "pull" | "sync" | "status" | "fetch" | "resolve" | "discard";
|
|
2405
|
+
type GatedOperation = "push" | "pull" | "sync" | "status" | "fetch" | "resolve" | "discard" | "prepare-database";
|
|
2009
2406
|
declare function operationLabel(operation: GatedOperation): string;
|
|
2010
2407
|
declare class SyncBusyError extends Error {
|
|
2011
2408
|
/** 이미 도는 작업. */
|
|
@@ -2030,6 +2427,7 @@ declare class SyncOrchestrator {
|
|
|
2030
2427
|
private readonly rowSchemas;
|
|
2031
2428
|
private readonly observation;
|
|
2032
2429
|
private readonly placement;
|
|
2430
|
+
private readonly databaseCreator;
|
|
2033
2431
|
private readonly planner;
|
|
2034
2432
|
private readonly detector;
|
|
2035
2433
|
private readonly drift;
|
|
@@ -2045,7 +2443,17 @@ declare class SyncOrchestrator {
|
|
|
2045
2443
|
/** 도는 작업 — 없으면 null(S-09). 부른 쪽이 겹칠 요청을 미리 거를 때 쓴다. */
|
|
2046
2444
|
get runningOperation(): GatedOperation | null;
|
|
2047
2445
|
push(options?: PushOptions): Promise<PushResult>;
|
|
2446
|
+
/**
|
|
2447
|
+
* 다른 연결 폴더 안의 노트를 추적하고 있으면 아무것도 하지 않고 멈춘다(ADR-038) — 그 노트들은 이 연결의
|
|
2448
|
+
* 목록에 없으므로, 그대로 돌리면 「볼트에서 지움」 으로 보고 Notion 페이지를 지우거나 되살리려 한다.
|
|
2449
|
+
*/
|
|
2450
|
+
private assertConnectionScope;
|
|
2048
2451
|
private executePush;
|
|
2452
|
+
/**
|
|
2453
|
+
* 만든 DB 에 relation · rollup · formula 를 붙이고, 행 스키마를 다시 읽게 한 뒤 보기를 만든다. 실패는
|
|
2454
|
+
* 다음 push 가 이어 붙인다 — 행은 그대로 올린다.
|
|
2455
|
+
*/
|
|
2456
|
+
private completeDatabaseSchemas;
|
|
2049
2457
|
/** 볼트의 노트가 마지막으로 올린 내용 그대로인가 — 읽지 못하면(지움 · 옮김) 아니다. */
|
|
2050
2458
|
private unchangedSincePush;
|
|
2051
2459
|
pull(options?: PullOptions): Promise<PullResult>;
|
|
@@ -2124,6 +2532,13 @@ declare class SyncOrchestrator {
|
|
|
2124
2532
|
* 않는다. 되돌릴 원본이 없는 것은 이유와 함께 거절한다.
|
|
2125
2533
|
*/
|
|
2126
2534
|
discardLocalChange(path: string): Promise<void>;
|
|
2535
|
+
/**
|
|
2536
|
+
* 볼트에서 만든 노트 폴더를 Notion DB 로 올릴 준비 — frontmatter · `.base` 로 사이드카를 써 둔다(#75).
|
|
2537
|
+
* Notion 에는 쓰지 않는다. 다음 push 가 DB 를 만들고 노트를 행으로 올린다(ADR-036 · ADR-037).
|
|
2538
|
+
*
|
|
2539
|
+
* @param configDir Obsidian 설정 폴더 — 속성 타입(`types.json`)을 읽는다.
|
|
2540
|
+
*/
|
|
2541
|
+
prepareFolderDatabase(folder: string, configDir?: string): Promise<FolderDatabaseReport>;
|
|
2127
2542
|
/** 충돌 미리보기용 줄 비교(로컬 vs 원격). 해소 없이 표시 전용. */
|
|
2128
2543
|
generateConflictDiff(conflict: Conflict): string;
|
|
2129
2544
|
}
|
|
@@ -2199,6 +2614,8 @@ interface ImageDownloadResult {
|
|
|
2199
2614
|
readonly size: number;
|
|
2200
2615
|
/** 받은 파일의 전체 sha256 — 받은 미디어 기록에 적어 push 가 그 파일이 그대로인지 본다. */
|
|
2201
2616
|
readonly fileHash?: string;
|
|
2617
|
+
/** 임베드 별칭으로 쓸 이름 — 받은 이름에서 이 볼트가 붙인 내용 해시를 뗀 것({@link withoutOwnHash}). */
|
|
2618
|
+
readonly name?: string;
|
|
2202
2619
|
}
|
|
2203
2620
|
interface ImageUploadResult {
|
|
2204
2621
|
readonly localPath: string;
|
|
@@ -2241,6 +2658,7 @@ declare class ImageHandler {
|
|
|
2241
2658
|
/** 상한 로직은 첨부 경로와 공유한다 — 한쪽만 빠뜨리지 않도록(utils/download-fetch). */
|
|
2242
2659
|
private fetchForDownload;
|
|
2243
2660
|
downloadImage(url: string, pageTitle: string): Promise<ImageDownloadResult>;
|
|
2661
|
+
/** @param uploadedName Notion 에 올라간 파일 이름 — 받은 파일의 이름이 된다({@link imageStemOf}). */
|
|
2244
2662
|
private fetchImage;
|
|
2245
2663
|
/**
|
|
2246
2664
|
* 캡션이 push 가 적어 둔 원본 임베드 대상인지 판정한다(R1). 맞으면 그 문자열을
|
|
@@ -2281,6 +2699,12 @@ declare class ImageHandler {
|
|
|
2281
2699
|
downloads: ImageDownloadResult[];
|
|
2282
2700
|
}>;
|
|
2283
2701
|
uploadLocalImage(localPath: string, noteFolder?: string): Promise<ImageUploadResult>;
|
|
2702
|
+
/**
|
|
2703
|
+
* 노트가 가리키는 볼트 첨부 하나를 올린다 — 파일 속성 값으로 보낼 것.
|
|
2704
|
+
*
|
|
2705
|
+
* @returns 보일 이름은 받을 때 붙인 내용 해시를 뗀 것이다 — 다시 받으면 같은 이름 · 같은 경로가 된다.
|
|
2706
|
+
*/
|
|
2707
|
+
uploadNoteAttachment(target: string, notePath: string): Promise<UploadedFile>;
|
|
2284
2708
|
uploadAndAppendImages(pageId: string, images: ImageReference[], notePath?: string): Promise<ImageUploadResult[]>;
|
|
2285
2709
|
/**
|
|
2286
2710
|
* 본문을 보내기 전에, 다시 올리지 않아도 되는 미디어 자리표시자를 Notion 에 이미 있는 그 파일로
|
|
@@ -2636,20 +3060,39 @@ declare class DatabaseSyncer {
|
|
|
2636
3060
|
* 아무것도 가라앉았다고 보지 않는다 — 수정 시각이 같은 행도 받아서 견준다.
|
|
2637
3061
|
*/
|
|
2638
3062
|
private readonly observation;
|
|
3063
|
+
/**
|
|
3064
|
+
* 받은 행 본문(Notion 원문)을 알린다 — 감지가 행의 하위 페이지를 빠뜨렸을 때 그 본문의 자식 태그로
|
|
3065
|
+
* 채운다({@link RemoteDetector.noteBodyChildren}).
|
|
3066
|
+
*/
|
|
3067
|
+
private readonly noteRowBody;
|
|
2639
3068
|
private readonly propertyMapper;
|
|
3069
|
+
private decorationsCache?;
|
|
3070
|
+
/**
|
|
3071
|
+
* 받은 DB 마다 사이드카에 적을 꾸밈 — 한 pull 이 같은 DB 의 사이드카를 여러 번 다시 만든다(임베드 재작성).
|
|
3072
|
+
* 올린 파일 아이콘 · 커버를 그때마다 내려받지 않는다.
|
|
3073
|
+
*/
|
|
3074
|
+
private readonly appearances;
|
|
2640
3075
|
private readonly baseFileGenerator;
|
|
3076
|
+
/** 사용자가 만든 `.base` 라 덮어쓰지 않았다고 이미 알린 경로 — 한 pull 이 같은 DB 를 여러 번 다시 쓴다. */
|
|
3077
|
+
private readonly keptUserBases;
|
|
2641
3078
|
private readonly sidecarGenerator;
|
|
2642
3079
|
/**
|
|
2643
3080
|
* 실제로 기록한 .base 경로/DB 제목 — placeholder 임베드 재작성(F22)의 SSOT. 이번 pull 이 조회하지
|
|
2644
3081
|
* 않은 DB 의 것도 남아 있다({@link DbBaseFiles}).
|
|
2645
3082
|
*/
|
|
2646
3083
|
readonly baseFileInfo: DbBaseFiles;
|
|
3084
|
+
private get decorations();
|
|
2647
3085
|
constructor(config: Config, stateDb: IStateDB, notionClient: NotionClient, vaultFs: VaultFS, pipeline: ConversionPipeline, imageHandler: ImageHandler,
|
|
2648
3086
|
/**
|
|
2649
3087
|
* 이번 동기화가 원격을 보는 기준(N-05) — 오케스트레이터가 실행마다 정한다. 따로 쓰면(시험)
|
|
2650
3088
|
* 아무것도 가라앉았다고 보지 않는다 — 수정 시각이 같은 행도 받아서 견준다.
|
|
2651
3089
|
*/
|
|
2652
|
-
observation?: () => ObservationContext
|
|
3090
|
+
observation?: () => ObservationContext,
|
|
3091
|
+
/**
|
|
3092
|
+
* 받은 행 본문(Notion 원문)을 알린다 — 감지가 행의 하위 페이지를 빠뜨렸을 때 그 본문의 자식 태그로
|
|
3093
|
+
* 채운다({@link RemoteDetector.noteBodyChildren}).
|
|
3094
|
+
*/
|
|
3095
|
+
noteRowBody?: (pageId: string, rawMarkdown: string) => void);
|
|
2653
3096
|
pullAll(opts?: {
|
|
2654
3097
|
readonly paths?: readonly string[];
|
|
2655
3098
|
readonly progress?: RowProgress;
|
|
@@ -2657,6 +3100,8 @@ declare class DatabaseSyncer {
|
|
|
2657
3100
|
readonly ledger?: DatabasePullLedger;
|
|
2658
3101
|
/** 취소하면 다음 DB 를 조회하지 않는다 — 닿지 못한 DB 는 다음 pull 이 조회한다. */
|
|
2659
3102
|
readonly signal?: AbortLike;
|
|
3103
|
+
/** {@link pullDatabase} 의 같은 이름 옵션. */
|
|
3104
|
+
readonly rescanRowChildren?: boolean;
|
|
2660
3105
|
}): Promise<DatabaseSyncResult>;
|
|
2661
3106
|
pullDatabase(dbConfig: DatabaseSyncConfig, opts?: {
|
|
2662
3107
|
/**
|
|
@@ -2672,7 +3117,18 @@ declare class DatabaseSyncer {
|
|
|
2672
3117
|
paths?: readonly string[];
|
|
2673
3118
|
/** 받은 행 · 지운 행을 하나씩 알린다. 예전에는 pull 진행 표시에 행이 하나도 보이지 않았다. */
|
|
2674
3119
|
progress?: RowProgress;
|
|
3120
|
+
/**
|
|
3121
|
+
* `--force` — 그대로라 받지 않는 행도 본문을 읽어 하위 페이지를 알린다({@link noteRowBody}). 감지가 빠뜨린
|
|
3122
|
+
* 행의 하위 페이지는 행 본문으로만 보이는데, 이미 받은 행은 바뀌기 전까지 본문을 다시 읽지 않는다.
|
|
3123
|
+
* 행 파일은 쓰지 않는다.
|
|
3124
|
+
*/
|
|
3125
|
+
rescanRowChildren?: boolean;
|
|
2675
3126
|
}): Promise<DatabaseSyncResult>;
|
|
3127
|
+
/**
|
|
3128
|
+
* 받지 않는 행의 본문을 읽어 하위 페이지만 알린다(`--force`). 읽지 못한 행은 경고만 남긴다 — 그 행은 받을 것이
|
|
3129
|
+
* 없었고, 하위 페이지는 다음 `--force` 가 다시 찾는다.
|
|
3130
|
+
*/
|
|
3131
|
+
private noteUnchangedRowBodies;
|
|
2676
3132
|
/**
|
|
2677
3133
|
* 받을 행을 세기만 한다(dry-run) — 볼트 · 상태 DB · Notion 을 바꾸지 않는다. 조회 · 범위 · 받을
|
|
2678
3134
|
* 행 판정 · 삭제 확인은 {@link pullDatabase} 와 같다.
|
|
@@ -2756,10 +3212,24 @@ declare class DatabaseSyncer {
|
|
|
2756
3212
|
* 지우지 않고 충돌로 남기거나 파일을 둔다.
|
|
2757
3213
|
*/
|
|
2758
3214
|
private pullDeletedRows;
|
|
3215
|
+
/**
|
|
3216
|
+
* DB 의 보기를 Notion 에서 다시 읽어 `db-views.json` 에 적는다. DB 를 통째로 받을 때(행이 바뀐 DB · 전체 대조)
|
|
3217
|
+
* 마다 부른다 — 보기만 고친 것은 DB 의 수정 시각을 바꾸지 않아(2026-10-23 실측) 다음 전체 대조가 받는다.
|
|
3218
|
+
* 예전에는 처음 받은 보기를 끝까지 썼다 — Notion 에서 더하거나 고친 보기가 `.base` 에 오지 않았다.
|
|
3219
|
+
* 읽지 못하면 받아 둔 보기를 쓴다 — 보기가 빠진 `.base` 를 쓰지 않는다.
|
|
3220
|
+
*/
|
|
2759
3221
|
private pullDatabaseViews;
|
|
2760
3222
|
/** 행들 가운데 한 번이라도 기간인 날짜 속성 → 그 짝 키. */
|
|
2761
3223
|
private rangeEndsOf;
|
|
2762
3224
|
private generateBaseFile;
|
|
3225
|
+
/**
|
|
3226
|
+
* DB 의 아이콘 · 커버 · 설명 · 제목 표시 — push 가 DB 를 다시 만들 때 쓴다(ADR-036). 아이콘 · 커버는 페이지와
|
|
3227
|
+
* 같은 꼴로 적고 올린 파일은 볼트로 내려받는다 — 서명 주소를 적으면 pull 마다 사이드카가 바뀐다.
|
|
3228
|
+
*/
|
|
3229
|
+
private appearanceOf;
|
|
3230
|
+
private readAppearance;
|
|
3231
|
+
/** pull 이 쓰지 않은 `.base` · 사이드카가 이미 있는가 — 없거나 읽지 못하면 false. */
|
|
3232
|
+
private isUserFile;
|
|
2763
3233
|
/**
|
|
2764
3234
|
* DB 제목이 바뀌면 `.base`/`.notion.json` 파일명(safeName)이 바뀌어 옛 이름의 산출물이
|
|
2765
3235
|
* 같은 폴더에 고아로 잔존한다(drift·부활 원인). DB 폴더 **직속**의 산출물 중 현재 이름이
|
|
@@ -2808,23 +3278,16 @@ declare class DatabaseSyncer {
|
|
|
2808
3278
|
bodyFingerprint: string;
|
|
2809
3279
|
}>;
|
|
2810
3280
|
/**
|
|
2811
|
-
* 행의 본문 밖이 지난 동기화 사본 그대로인가(N-05) — 제목과 보낼 수 있는 속성,
|
|
2812
|
-
*
|
|
3281
|
+
* 행의 본문 밖이 지난 동기화 사본 그대로인가(N-05) — 제목과 보낼 수 있는 속성, 아이콘 · 커버.
|
|
3282
|
+
* push 는 원격을 덮어써도 되는지, pull 은 받을
|
|
2813
3283
|
* 것이 있는지를 이 규칙으로 가른다. 읽기 전용 속성(수식 · 롤업 · 수정 시각)은 보지 않는다 —
|
|
2814
3284
|
* 로컬에서 고칠 수 없고 push 가 보내지 않는다.
|
|
2815
3285
|
*
|
|
2816
3286
|
* @param mapper 그 행의 DB 스키마를 읽은 매퍼.
|
|
2817
3287
|
* @param base 지난 동기화 시점의 frontmatter.
|
|
2818
3288
|
* @param path 지난 동기화 시점의 경로 — 파일 이름을 따르던 제목을 가른다.
|
|
2819
|
-
* @param decorated 아이콘 · 커버도 견주나 — {@link renderRow} 로 받는 행만 그것을 노트에 적는다.
|
|
2820
|
-
*/
|
|
2821
|
-
rowOutsideBodyUnchanged(mapper: PropertyMapper, page: PageObjectResponse, base: Readonly<Record<string, unknown>>, path: string, decorated: boolean): boolean;
|
|
2822
|
-
/**
|
|
2823
|
-
* 원격 행의 아이콘 · 커버가 `frontmatter` 에 적힌 그대로인가 — {@link renderRow} 가 적는 모양으로
|
|
2824
|
-
* 견준다(N-05). Notion 에 올린 파일은 읽을 때마다 주소가 바뀌고(서명) 커버는 볼트로 내려받아
|
|
2825
|
-
* 적으므로, 있는지만 견준다.
|
|
2826
3289
|
*/
|
|
2827
|
-
|
|
3290
|
+
rowOutsideBodyUnchanged(mapper: PropertyMapper, page: PageObjectResponse, base: Readonly<Record<string, unknown>>, path: string): boolean;
|
|
2828
3291
|
/** 레코드가 지난번에 본 원격 행과 지금 행을 견준다 — 이번 동기화의 기준으로(N-05). */
|
|
2829
3292
|
private remoteVerdict;
|
|
2830
3293
|
/**
|
|
@@ -3231,85 +3694,6 @@ declare class EntryEditor {
|
|
|
3231
3694
|
updateDate(entryPath: string, dateProperty: string, newDate: string): Promise<void>;
|
|
3232
3695
|
}
|
|
3233
3696
|
|
|
3234
|
-
interface BaseFileOptions {
|
|
3235
|
-
readonly databaseId: string;
|
|
3236
|
-
readonly databaseName: string;
|
|
3237
|
-
readonly schema: Record<string, BasePropertySchema>;
|
|
3238
|
-
readonly viewsConfig: DatabaseViewsConfig;
|
|
3239
|
-
readonly folderPath: string;
|
|
3240
|
-
/**
|
|
3241
|
-
* 날짜 속성 이름 → 기간의 끝을 적는 짝 키(`<이름>_end`). 행 노트는 기간을 두 키로 적으므로 표에 그 속성이
|
|
3242
|
-
* 보이면 끝 열도 바로 뒤에 둔다(B13). 받은 행 가운데 기간이 있는 속성만 — 기간을 쓰지 않는 날짜 속성에
|
|
3243
|
-
* 늘 빈 열을 두지 않는다.
|
|
3244
|
-
*/
|
|
3245
|
-
readonly rangeEnds?: ReadonlyMap<string, string>;
|
|
3246
|
-
}
|
|
3247
|
-
type BasesViewType = "table" | "cards" | "list";
|
|
3248
|
-
/** Notion 뷰 하나를 Bases 로 옮길 때의 판정. */
|
|
3249
|
-
interface BasesViewMapping {
|
|
3250
|
-
/** Bases 뷰 타입. `null` = 대응이 없어 `.base` 에 실을 수 없음. */
|
|
3251
|
-
readonly type: BasesViewType | null;
|
|
3252
|
-
/**
|
|
3253
|
-
* 값이 있으면 **정확한 대응이 아니라 격하**라는 뜻(사람용 사유).
|
|
3254
|
-
* 뷰 자체는 살아남지만 원래 뷰의 표현 일부(달력 격자·타임라인 축)는 재현되지 않는다.
|
|
3255
|
-
*/
|
|
3256
|
-
readonly degradeReason?: string;
|
|
3257
|
-
}
|
|
3258
|
-
/**
|
|
3259
|
-
* Notion 뷰 타입 → Obsidian Bases 뷰 매핑(SSOT).
|
|
3260
|
-
*
|
|
3261
|
-
* 뷰는 현재 pull-authoritative — Notion API 가 2026-03-19 뷰 생성/수정/삭제를 열었지만
|
|
3262
|
-
* 본 프로젝트는 아직 뷰 write-back 을 구현하지 않았다(로드맵 항목). push 로 되돌릴 수
|
|
3263
|
-
* 없는 동안 "조용한 유실 금지"는 곧 "보존 + 정직한 degrade 리포트"를 의미한다.
|
|
3264
|
-
*
|
|
3265
|
-
* 달력·타임라인은 예전에 `null` 이었다 — 즉 `.base` 에서 **통째로 사라졌다**. 사이드카에는
|
|
3266
|
-
* 남지만 Obsidian 을 여는 사람 눈에는 그 뷰가 애초에 없었던 것처럼 보인다. 격자·축은
|
|
3267
|
-
* 못 살려도 "날짜 순으로 늘어놓은 목록"이라는 본래 의도는 표로 남길 수 있으므로,
|
|
3268
|
-
* 버리는 대신 격하해 살리고 사유를 사이드카에 적는다.
|
|
3269
|
-
*/
|
|
3270
|
-
declare const NOTION_TO_BASES_VIEW: Record<string, BasesViewMapping>;
|
|
3271
|
-
/** Notion 뷰 타입의 Bases 매핑. 미상 타입은 표현 불가로 본다. */
|
|
3272
|
-
declare function basesViewMappingOf(notionType: string): BasesViewMapping;
|
|
3273
|
-
/** Notion 뷰 타입의 Bases 대응 타입을 돌려준다. 미지원/미상 타입은 `null`. */
|
|
3274
|
-
declare function basesViewTypeOf(notionType: string): BasesViewType | null;
|
|
3275
|
-
declare class BaseFileGenerator {
|
|
3276
|
-
generate(options: BaseFileOptions): string;
|
|
3277
|
-
private writeFilters;
|
|
3278
|
-
private needsContentCoverFormula;
|
|
3279
|
-
private writeFormulas;
|
|
3280
|
-
private writePropertyDisplayNames;
|
|
3281
|
-
private writeViews;
|
|
3282
|
-
/** `filters:` 키와 그 값을 쓴다. 단일 식이면 한 줄, 그룹이면 블록. */
|
|
3283
|
-
private writeFilterValue;
|
|
3284
|
-
/** 필터 노드를 시퀀스 항목(`- …`)으로 쓴다. 그룹이면 재귀적으로 중첩한다. */
|
|
3285
|
-
private writeFilterItem;
|
|
3286
|
-
/**
|
|
3287
|
-
* 필터 식을 YAML 스칼라로 쓴다.
|
|
3288
|
-
*
|
|
3289
|
-
* 식은 대개 `note["상태"] == "진행 중"` 처럼 큰따옴표를 품는다. 평문 스칼라는 큰따옴표를
|
|
3290
|
-
* 안에 담을 수 있으므로(선두만 아니면 된다) 기본은 평문으로 두어 기존 `file.ext == "md"`
|
|
3291
|
-
* 라인과 모양을 맞춘다. 다만 `: `·` #`·선두 지시문자는 평문에서 의미가 달라지므로
|
|
3292
|
-
* 그때만 작은따옴표로 감싼다(속성명에 콜론이나 해시가 들어갈 수 있다).
|
|
3293
|
-
*/
|
|
3294
|
-
private yamlExpr;
|
|
3295
|
-
/**
|
|
3296
|
-
* 뷰 이름을 Bases 요구사항대로 유일화한다(in-place). 동명 충돌 시 ' 2',' 3'… 를 붙이되
|
|
3297
|
-
* 이미 존재하는 이름과 다시 충돌하지 않을 때까지 증가시킨다.
|
|
3298
|
-
*/
|
|
3299
|
-
private dedupeViewNames;
|
|
3300
|
-
private convertView;
|
|
3301
|
-
private toNoteRef;
|
|
3302
|
-
/**
|
|
3303
|
-
* 속성 참조(order/sort/groupBy/image)를 YAML로 안전하게 출력한다.
|
|
3304
|
-
* `file.name`·`formula.coverImage`·`note.cover` 같은 접두사 식별자와 공백 포함 일반 속성명은
|
|
3305
|
-
* 평문 스칼라로 안전하므로 그대로 두고, 콜론·해시·따옴표 등 YAML 메타문자가 있을 때만 인용한다.
|
|
3306
|
-
*/
|
|
3307
|
-
private propRef;
|
|
3308
|
-
private resolvePropertyName;
|
|
3309
|
-
private yamlKey;
|
|
3310
|
-
private yamlValue;
|
|
3311
|
-
}
|
|
3312
|
-
|
|
3313
3697
|
/**
|
|
3314
3698
|
* 속성 id → 프론트매터 키 해소.
|
|
3315
3699
|
*
|
|
@@ -3372,99 +3756,6 @@ type PropertyNameResolver = (idOrName: string) => string | undefined;
|
|
|
3372
3756
|
*/
|
|
3373
3757
|
declare function translateNotionFilter(filter: unknown, schema: Record<string, BasePropertySchema>, resolveName: PropertyNameResolver): TranslationResult;
|
|
3374
3758
|
|
|
3375
|
-
/**
|
|
3376
|
-
* DB 사이드카(`<db>.notion.json`) — `.base` 로 표현할 수 없는 Notion DB 메타데이터를
|
|
3377
|
-
* 무손실 보존하는 단일 파일.
|
|
3378
|
-
*
|
|
3379
|
-
* ## 왜 필요한가 (I4·I7 "조용한 유실 금지")
|
|
3380
|
-
*
|
|
3381
|
-
* Obsidian Bases(`.base`)는 Notion DB 뷰의 일부만 표현한다:
|
|
3382
|
-
* · 미지원 뷰(calendar/timeline/form/chart/map/dashboard)는 `.base` 에서 통째 누락.
|
|
3383
|
-
* · 표현되는 뷰도 Notion **필터식·커버 크기/비율·컬럼 width/wrap·빈그룹 숨김** 등은
|
|
3384
|
-
* Bases 문법에 대응이 없어 손실된다.
|
|
3385
|
-
*
|
|
3386
|
-
* Notion API 는 뷰 생성/수정을 지원하지 않으므로(뷰는 pull-authoritative) 이 메타데이터는
|
|
3387
|
-
* push 로 Notion 에 되돌릴 수 없다. 따라서 "무손실"의 의미는 **로컬에 완전·정직하게
|
|
3388
|
-
* 보존하고, 무엇이 degrade 됐는지 명시 리포트**하는 것이다. 사이드카는 이를 `.base` 와
|
|
3389
|
-
* 같은 폴더에 co-locate 해 사람이 발견 가능하고 도구가 재사용 가능하게 만든다.
|
|
3390
|
-
*
|
|
3391
|
-
* ## 멱등성
|
|
3392
|
-
*
|
|
3393
|
-
* 매 pull 마다 재생성되므로 **결정적**이어야 한다(타임스탬프·실행시각 금지, 키 정렬).
|
|
3394
|
-
* 동일 DB 상태 → 동일 바이트 → drift 0 / churn 0.
|
|
3395
|
-
*/
|
|
3396
|
-
interface NotionSidecar {
|
|
3397
|
-
readonly generator: "im-nobsidian";
|
|
3398
|
-
readonly schemaVersion: 1;
|
|
3399
|
-
readonly databaseId: string;
|
|
3400
|
-
readonly databaseName: string;
|
|
3401
|
-
/** 속성 스키마 — 이름 정렬. `.base` displayName 만으로는 잃는 타입/옵션을 보존. */
|
|
3402
|
-
readonly properties: SidecarProperty[];
|
|
3403
|
-
/** 모든 뷰(표현/미표현 공통) — Notion 순서 유지. */
|
|
3404
|
-
readonly views: SidecarView[];
|
|
3405
|
-
/** 정직한 손실 리포트 — 무엇이 `.base` 에서 누락/degrade 됐는가. */
|
|
3406
|
-
readonly degraded: DegradeNote[];
|
|
3407
|
-
}
|
|
3408
|
-
interface SidecarProperty {
|
|
3409
|
-
readonly name: string;
|
|
3410
|
-
readonly id: string;
|
|
3411
|
-
readonly type: string;
|
|
3412
|
-
/** select/multi_select/status 옵션명(있으면). */
|
|
3413
|
-
readonly options?: string[];
|
|
3414
|
-
}
|
|
3415
|
-
interface SidecarView {
|
|
3416
|
-
readonly id: string;
|
|
3417
|
-
readonly name: string;
|
|
3418
|
-
readonly notionType: string;
|
|
3419
|
-
/** Bases 대응 타입. `null` = `.base` 미표현(사이드카가 유일 보존처). */
|
|
3420
|
-
readonly basesType: BasesViewType | null;
|
|
3421
|
-
/** 원본 뷰 설정 중 의미 있는 항목(키 정렬). 빈 값은 생략. */
|
|
3422
|
-
readonly config: Record<string, unknown>;
|
|
3423
|
-
}
|
|
3424
|
-
interface DegradeNote {
|
|
3425
|
-
readonly view: string;
|
|
3426
|
-
/**
|
|
3427
|
-
* `view-unrepresentable` = 뷰가 `.base` 에서 통째로 누락.
|
|
3428
|
-
* `view-degraded` = 뷰는 남지만 다른 타입으로 격하(달력→표 등).
|
|
3429
|
-
* `setting-dropped` = 뷰는 그대로지만 설정 하나가 빠짐.
|
|
3430
|
-
*/
|
|
3431
|
-
readonly kind: "view-unrepresentable" | "view-degraded" | "setting-dropped";
|
|
3432
|
-
readonly detail: string;
|
|
3433
|
-
}
|
|
3434
|
-
declare class SidecarGenerator {
|
|
3435
|
-
/**
|
|
3436
|
-
* 사이드카 객체를 빌드한다(순수 — I/O 없음). 직렬화는 {@link serialize} 가 담당.
|
|
3437
|
-
*/
|
|
3438
|
-
build(options: {
|
|
3439
|
-
databaseId: string;
|
|
3440
|
-
databaseName: string;
|
|
3441
|
-
schema: Record<string, BasePropertySchema>;
|
|
3442
|
-
viewsConfig: DatabaseViewsConfig;
|
|
3443
|
-
}): NotionSidecar;
|
|
3444
|
-
/**
|
|
3445
|
-
* 사이드카를 결정적 JSON 문자열로 직렬화한다(키 재귀 정렬 + 말미 개행).
|
|
3446
|
-
* 동일 입력 → 동일 바이트 → 멱등(drift/churn 0).
|
|
3447
|
-
*/
|
|
3448
|
-
serialize(sidecar: NotionSidecar): string;
|
|
3449
|
-
private buildProperties;
|
|
3450
|
-
private buildView;
|
|
3451
|
-
/**
|
|
3452
|
-
* 뷰 설정 중 의미 있는 항목을 추출한다. `.base` 가 표현 못하는 항목(필터·커버크기 등)은
|
|
3453
|
-
* config 에 보존하면서 동시에 degrade 리포트에 1줄씩 기록한다(표현되는 뷰에 한해 —
|
|
3454
|
-
* 미표현 뷰는 이미 view-unrepresentable 로 통째 보고됨).
|
|
3455
|
-
*/
|
|
3456
|
-
private extractConfig;
|
|
3457
|
-
/**
|
|
3458
|
-
* 필터 손실을 **실제로 못 옮긴 것만** 보고한다.
|
|
3459
|
-
*
|
|
3460
|
-
* 예전엔 필터가 있기만 하면 "Notion 필터식은 .base 로 표현되지 않음"을 무조건 찍었다.
|
|
3461
|
-
* 이제 `.base` 가 뷰별 `filters:` 를 내보내므로 그 문구는 대부분의 경우 거짓이다.
|
|
3462
|
-
* 거짓 degrade 는 진짜 degrade 를 묻어 버리므로, `.base` 와 **같은 번역기**를 돌려
|
|
3463
|
-
* 남은 것만 적는다(두 산출물이 어긋날 여지를 없앤다).
|
|
3464
|
-
*/
|
|
3465
|
-
private noteFilterDegrade;
|
|
3466
|
-
}
|
|
3467
|
-
|
|
3468
3759
|
declare function sortEntries(entries: DBEntry[], sorts: NonNullable<ViewConfig["sorts"]>): DBEntry[];
|
|
3469
3760
|
declare function groupEntries(entries: DBEntry[], groupByProperty: string, options?: {
|
|
3470
3761
|
sort?: "ascending" | "descending";
|
|
@@ -3702,6 +3993,84 @@ interface Logger {
|
|
|
3702
3993
|
declare function setLogger(logger: Logger): void;
|
|
3703
3994
|
declare function getLogger(): Logger;
|
|
3704
3995
|
|
|
3996
|
+
/**
|
|
3997
|
+
* 볼트 하나에 연결 여럿 (ADR-038) — 연결마다 볼트 안의 폴더 하나를 맡는다.
|
|
3998
|
+
*
|
|
3999
|
+
* 연결 폴더는 자기 `.im-nobsidian/`(설정 · 상태 DB · 보기 설정)를 둔다. 엔진은 그 폴더를 볼트처럼 다루고
|
|
4000
|
+
* ({@link ScopedVaultFS}), 바깥 연결은 안쪽 연결 폴더를 읽어 올리지도 쓰지도 않는다. 볼트 맨 위의 연결은
|
|
4001
|
+
* 폴더 `""` 이다 — 예전부터 쓰던 단일 연결이 그대로 그것이다.
|
|
4002
|
+
*/
|
|
4003
|
+
|
|
4004
|
+
/** 이 연결이 맡지 않은 곳에 쓰려 했다 — 폴더 밖이거나 다른 연결 폴더 안이다. */
|
|
4005
|
+
declare class ConnectionBoundaryError extends Error {
|
|
4006
|
+
readonly path: string;
|
|
4007
|
+
readonly folder: string;
|
|
4008
|
+
readonly where: "inside" | "outside";
|
|
4009
|
+
/**
|
|
4010
|
+
* @param folder 막은 연결 폴더 — `inside` 면 안쪽의 다른 연결, `outside` 면 이 연결.
|
|
4011
|
+
*/
|
|
4012
|
+
constructor(path: string, folder: string, where: "inside" | "outside");
|
|
4013
|
+
}
|
|
4014
|
+
/**
|
|
4015
|
+
* 이 연결의 상태 DB 가 다른 연결 폴더 안의 노트를 추적하고 있다 — 이미 동기화하던 폴더를 따로 연결했다.
|
|
4016
|
+
*
|
|
4017
|
+
* 그대로 돌리면 바깥 연결은 그 노트들을 「볼트에서 지움」 으로 보고(목록에 없으므로) Notion 페이지를 지우거나,
|
|
4018
|
+
* 되살리려고 그 폴더에 쓰려 한다. 둘 다 사용자가 바란 것이 아니므로 아무것도 하지 않고 멈춘다.
|
|
4019
|
+
*/
|
|
4020
|
+
declare class ConnectionScopeError extends Error {
|
|
4021
|
+
readonly paths: readonly string[];
|
|
4022
|
+
constructor(paths: readonly string[]);
|
|
4023
|
+
}
|
|
4024
|
+
/** 앞뒤 `/` 를 떼고 `.` · `..` 를 푼 POSIX 경로. 볼트 맨 위를 벗어나면 null. */
|
|
4025
|
+
declare function normalizeVaultPath(path: string): string | null;
|
|
4026
|
+
/** `path` 를 맡은 연결 폴더 — 가장 깊은 것. 어느 것도 아니면 null(`""` 연결이 있으면 그것). */
|
|
4027
|
+
declare function connectionFolderOf(path: string, folders: readonly string[]): string | null;
|
|
4028
|
+
/** 한 연결 폴더에서 Obsidian 설정 폴더까지의 상대 경로 — `Work/Team` 이면 `../../.obsidian`. */
|
|
4029
|
+
declare function configDirFrom(folder: string, configDir: string): string;
|
|
4030
|
+
/**
|
|
4031
|
+
* 볼트의 한 연결 폴더를 볼트처럼 보이는 VaultFS. 경로는 그 폴더 기준이다.
|
|
4032
|
+
*
|
|
4033
|
+
* - 목록은 폴더 안 · 안쪽 연결 폴더 밖의 파일만, 이 연결의 내부 폴더(`.im-nobsidian/`)는 빼고 낸다
|
|
4034
|
+
* - 쓰기(쓰기 · 지우기 · 옮기기 · 폴더 만들기)는 폴더를 벗어나거나 안쪽 연결 폴더에 닿으면
|
|
4035
|
+
* {@link ConnectionBoundaryError} 로 거절한다 — pull 이 다른 연결의 노트를 덮어쓰지 않는다
|
|
4036
|
+
* - 읽기는 볼트 안이면 폴더 밖도 된다(`../.obsidian/types.json` — Obsidian 설정은 볼트 맨 위에 하나다)
|
|
4037
|
+
*/
|
|
4038
|
+
declare class ScopedVaultFS implements VaultFS {
|
|
4039
|
+
private readonly base;
|
|
4040
|
+
private readonly folder;
|
|
4041
|
+
private readonly nested;
|
|
4042
|
+
/**
|
|
4043
|
+
* @param folder 이 연결의 폴더(볼트 상대). `""` 이면 볼트 맨 위.
|
|
4044
|
+
* @param connections 볼트의 연결 폴더 전부 — 이 폴더 안쪽 것만 골라 비켜 간다.
|
|
4045
|
+
*/
|
|
4046
|
+
constructor(base: VaultFS, folder: string, connections: readonly string[]);
|
|
4047
|
+
ownsPath(path: string): boolean;
|
|
4048
|
+
/** 이 연결의 경로 → 볼트 경로. */
|
|
4049
|
+
private toBase;
|
|
4050
|
+
/** 볼트 경로 → 이 연결의 경로. 이 연결이 맡지 않으면 null. */
|
|
4051
|
+
private fromBase;
|
|
4052
|
+
readFile(path: string): Promise<string>;
|
|
4053
|
+
readBinary(path: string): Promise<Buffer>;
|
|
4054
|
+
writeFile(path: string, content: string): Promise<void>;
|
|
4055
|
+
writeBinary(path: string, data: Buffer): Promise<void>;
|
|
4056
|
+
deleteFile(path: string): Promise<void>;
|
|
4057
|
+
moveFile(from: string, to: string): Promise<void>;
|
|
4058
|
+
exists(path: string): Promise<boolean>;
|
|
4059
|
+
ensureFolder(path: string): Promise<void>;
|
|
4060
|
+
/** 맡은 노트만 읽는다 — 볼트 전체의 본문을 읽지 않는다. */
|
|
4061
|
+
listMarkdownFiles(): Promise<FileInfo[]>;
|
|
4062
|
+
listMarkdownFileStats(): Promise<FileStatInfo[]>;
|
|
4063
|
+
listNonMarkdownFiles(): Promise<NonMdFileInfo[]>;
|
|
4064
|
+
getFileStat(path: string): Promise<FileStatInfo | null>;
|
|
4065
|
+
private rebase;
|
|
4066
|
+
}
|
|
4067
|
+
|
|
4068
|
+
/**
|
|
4069
|
+
* 볼트의 연결 폴더(ADR-038) — 자기 `.im-nobsidian/` 를 둔 폴더. 볼트 맨 위(`""`)는 그 폴더가 있으면 든다.
|
|
4070
|
+
* 점으로 시작하는 폴더(`.obsidian` · `.git` · `.trash` 등)는 들여다보지 않는다 — 노트 목록도 그렇게 걷는다.
|
|
4071
|
+
*/
|
|
4072
|
+
declare function findConnectionFolders(vaultRoot: string): Promise<string[]>;
|
|
4073
|
+
|
|
3705
4074
|
interface PipelineOptions {
|
|
3706
4075
|
readonly wikilinkResolver?: WikilinkResolverFn;
|
|
3707
4076
|
}
|
|
@@ -3731,6 +4100,8 @@ declare const DB_VIEWS_PATH = ".im-nobsidian/db-views.json";
|
|
|
3731
4100
|
declare const STATE_DB_PATH = ".im-nobsidian/sync.db";
|
|
3732
4101
|
/** 파일 감시에서 제외할 내부 디렉터리 glob. */
|
|
3733
4102
|
declare const INTERNAL_DIR_GLOB = "**/.im-nobsidian/**";
|
|
4103
|
+
/** Obsidian 설정 폴더 기본 이름(볼트 맨 위). 사용자가 바꿀 수 있어 플러그인은 `vault.configDir` 를 쓴다. */
|
|
4104
|
+
declare const OBSIDIAN_CONFIG_DIR = ".obsidian";
|
|
3734
4105
|
/**
|
|
3735
4106
|
* 주어진 vault 상대 경로(POSIX)가 내부 메타데이터 디렉터리에 속하는지 판별한다.
|
|
3736
4107
|
*/
|
|
@@ -3823,4 +4194,36 @@ declare function parseDesignColor(token: string | undefined): DesignColor | unde
|
|
|
3823
4194
|
/** 한 줄을 읽는다. 마커가 없는 줄은 글 조각 하나뿐인 결과를 돌려준다. */
|
|
3824
4195
|
declare function readDesignLine(line: string): DesignLine;
|
|
3825
4196
|
|
|
3826
|
-
|
|
4197
|
+
/**
|
|
4198
|
+
* Notion 컬럼이 볼트 노트의 어느 줄에 걸치나 (#74).
|
|
4199
|
+
*
|
|
4200
|
+
* pull 은 컬럼을 위아래로 펼치고 경계를 마커 줄로 남긴다(ADR-008) — `column-list:start` · 열마다
|
|
4201
|
+
* `column[:ratio=N]` · `column-list:end`. Obsidian 은 마크다운을 옆으로 나란히 그리지 못하므로, 플러그인은
|
|
4202
|
+
* 이 결과로 열의 경계를 보이게 칠한다. 마커 모양의 주인이 이 패키지라 읽기도 여기 둔다.
|
|
4203
|
+
*
|
|
4204
|
+
* 컨테이너(콜아웃 · 토글) 안의 컬럼은 pull 이 마커를 지우고 펼친다 — 마커 줄은 맨 앞 들여쓰기만 받는다.
|
|
4205
|
+
*/
|
|
4206
|
+
/** 컬럼 마커가 있을 수 있는가 — 없으면 줄을 나누어 읽지 않아도 된다. */
|
|
4207
|
+
declare function hasColumnLayout(text: string): boolean;
|
|
4208
|
+
/** 컬럼 안의 줄 하나가 놓인 자리. */
|
|
4209
|
+
interface ColumnPlace {
|
|
4210
|
+
/** 노트 안에서 몇 번째 컬럼 묶음인가 — 0 부터. */
|
|
4211
|
+
readonly group: number;
|
|
4212
|
+
/** 묶음 안에서 몇 번째 열인가 — 0 부터. */
|
|
4213
|
+
readonly index: number;
|
|
4214
|
+
/** 묶음의 열 수. */
|
|
4215
|
+
readonly count: number;
|
|
4216
|
+
/** 열 너비(%) — Notion 이 비율을 주지 않았으면 undefined. */
|
|
4217
|
+
readonly ratio?: number;
|
|
4218
|
+
/** 이 열의 첫 줄인가 — 열 구분 마커 줄이다. */
|
|
4219
|
+
readonly head: boolean;
|
|
4220
|
+
}
|
|
4221
|
+
/**
|
|
4222
|
+
* 줄마다 놓인 컬럼 자리 — 컬럼 밖 줄 · 묶음의 시작/끝 마커 줄은 undefined. 닫히지 않은 묶음은 노트 끝까지다.
|
|
4223
|
+
* 코드 블록 안의 마커 모양 글은 마커가 아니다.
|
|
4224
|
+
*/
|
|
4225
|
+
declare function readColumnLayout(lines: readonly string[]): (ColumnPlace | undefined)[];
|
|
4226
|
+
/** 열 이름표 — `열 2/3 · 50%`. 비율이 없으면 `열 2/3`. */
|
|
4227
|
+
declare function columnLabel(place: ColumnPlace): string;
|
|
4228
|
+
|
|
4229
|
+
export { BaseFileGenerator, type BaseFileOptions, type BasePropertyOption, type BasePropertySchema, type BaseStatusGroup, type BaseSyncOptions, type BasesFilterNode, type BasesViewMapping, type BasesViewType, BlankLineCollapser, type BookmarkTarget, CONFIG_FILE, type CalendarEntry, type CalloutDesign, CalloutRestorer, CalloutTransformer, ChangeDetector, type ChangeDiff, ColorAnnotator, type ColumnPlace, type CompletenessFailure, type CompletenessLocalSource, type CompletenessOptions, type CompletenessRemoteSource, type CompletenessReport, type Config, ConfigManager, ConfigSchema, type Conflict, ConflictResolver, type ConflictStrategy, ConnectionBoundaryError, ConnectionScopeError, type ConversionContext, type ConversionPath, ConversionPipeline, type ConversionResult, type CoverConfig, type DBEntry, DB_VIEWS_FILE, DB_VIEWS_PATH, DEFAULT_CONFIG, DEFAULT_TITLE_PROPERTY, DEFAULT_WATCH_DEBOUNCE_MS, DIFF_SIGN, type DatabaseCompleteness, type DatabaseSyncConfig, type DatabaseSyncResult, DatabaseSyncer, type DatabaseViewsConfig, type DeferredCode, type DegradeNote, type DesignColor, type DesignLine, type DesignSegment, type DiffHunk, type DiffLine, EmbedResolver, EntryEditor, type FailedOperation, type FidelityClassification, type FidelityContext, type FidelityDefect, type FidelityDefectForm, type FidelitySummary, type FileDownloadResult, FileHandler, type FileInfo, type FileRegistryEntry, type FileStatInfo, type FileSystemEntry, type FileType, type FileUploadResult, FileWatcher, type FilterCondition, type FolderDatabaseReport, type FolderMoveChange, FrontmatterExtractor, FrontmatterGenerator, type FullScanReason, GITIGNORE_ENTRY, type GatedOperation, type GroupByConfig, type GroupedEntries, IGNORE_FILE, INTERNAL_DIR, INTERNAL_DIR_GLOB, type IStateDB, type ImageDownloadResult, ImageHandler, type ImageReference, type InferredProperty, InlineAnnotationPreserver, InlineDBParser, type InlineStyle, type LineDiffOptions, type LineRange, type LocalChange, LocalImageRestorer, type LocalMoveAdoption, type LocalScan, type LocalScanOptions, type Logger, MARKER_BRAND, type MappingResult, type MappingType, MathNormalizer, MentionToWikilink, type MergeConflictRegion, type MergeResult, NOTION_COLOR_NAMES, NOTION_TOKEN_PREFIX, NOTION_TO_BASES_VIEW, NodeVaultFS, type NonMdFileInfo, type NotionBlock, NotionBlockBuilder, NotionClient, type NotionClientOptions, type NotionColor, type NotionPageNode, type NotionRichText, type RichTextItem as NotionRichTextItem, type NotionSidecar, OBSIDIAN_CONFIG_DIR, type OperationType, type PageCompletenessRemoteSource, type PageCompletenessReport, type PageCover, type PageCreationPlan, type PageIcon, type PathFilterConfig, type PendingOperation, PendingWalError, type PlannedRow, type PreserveMarker, PreserveMarkerCollector, PreserveMarkerInjector, type Processor, type ProcessorInput, type ProcessorMetadata, type ProcessorOutput, type ProgressCallback, type ProgressItem, PropertiesTableInjector, PropertiesTableRestorer, PropertyMapper, type PropertyOption, type PropertySchema, type PropertyValue, type PullOptions, type PullResult, type PushOptions, type PushResult, RENDER_LINE_RULES, type RecordPendingInput, type RegisterFileInput, type RemoteChange, type RemoteObservation, type RemoteScanInfo, type RenameHints, type RenameKind, type RenderFinding, type RenderLineRule, type ResolutionChoice, type ResolutionResult, type RichTextSegment, type RowProgress, SAVED_STATE_TABLES_QUERY, SEPARATOR_BODY, STATE_DB_FILE, STATE_DB_MIGRATIONS, STATE_DB_PATH, SavedStateDbError, ScopedVaultFS, SidecarGenerator, type SidecarProperty, type SidecarView, StateDB, StateDbLockedError, type StateDbMigration, type StateDbTool, StateDbUnavailableError, StateLock, type StateLockClaim, type StateLockOwner, type StatusOptions, type StatusResult, type StyledRange, SyncBusyError, type SyncDirection, type SyncOptions, SyncOrchestrator, type SyncRecord, type SyncResult, type SyncStatus, type TableLineDesign, type TranslationResult, TreeMapper, UnsupportedBlockStripper, type UpsertSyncRecord, type VaultCompletenessReport, type VaultFS, type ViewConfig, ViewDataProvider, type ViewPropertyConfig, type ViewRenderData, type ViewType, WIKILINK_LOOKUPS, type WatchSyncOptions, type WatchSyncScope, WatchSyncService, type WikilinkEntry, type WikilinkLookup, WikilinkResolver, applicableChoices, assertNoPendingWal, basesViewMappingOf, basesViewTypeOf, choiceForStrategy, classifyBodyFidelity, columnLabel, compactNotionId, computeBufferHash, computeHash, configDirFrom, connectionFolderOf, createDefaultPipeline, extractCalendarEntries, filterByMonth, filterEntries, findConnectionFolders, formatUnifiedDiff, generateColorCSS, generateId, getLogger, getNotionBgColor, getNotionColor, getVisibleProperties, groupEntries, hasColumnLayout, hasDesignMarker, inAnyPathScope, isInternalPath, isMarkdownPath, isRemoteDeletion, lineDiff, lintRenderedMarkdown, matchesPathScope, normalizeNotionId, normalizeVaultPath, noteNameFromPath, notionIdFromInput, notionIdsEqual, operationLabel, parseDesignColor, pendingWalBytes, readColumnLayout, readDesignLine, resolvePropertyName, sanitizeFileName, setLogger, sortEntries, stateDbLockPath, stateDbWalPath, stripMarkdownExtension, summarizeFidelity, systemTimeZone, threeWayMerge, translateNotionFilter, verifyDatabaseCompleteness, verifyPageCompleteness, wikilinkLookupsIn };
|