@texonom/nclient 1.4.7 → 1.5.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/build/index.d.ts +3 -90
- package/build/index.js +425 -2
- package/build/index.js.map +1 -1
- package/build/notion-api.d.ts +2 -2
- package/build/types.d.ts +1 -1
- package/package.json +6 -6
- package/readme.md +60 -124
- package/LICENSE +0 -21
- package/build/.tsbuildinfo +0 -1
package/build/index.d.ts
CHANGED
|
@@ -1,90 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
permissionRecord: PermissionRecord;
|
|
5
|
-
url: string;
|
|
6
|
-
}
|
|
7
|
-
interface PermissionRecord {
|
|
8
|
-
table: string;
|
|
9
|
-
id: ID;
|
|
10
|
-
}
|
|
11
|
-
interface SignedUrlResponse {
|
|
12
|
-
signedUrls: string[];
|
|
13
|
-
}
|
|
14
|
-
type FetchOption = RequestInit & {
|
|
15
|
-
timeout?: number;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Main Notion API client.
|
|
20
|
-
*/
|
|
21
|
-
declare class NotionAPI {
|
|
22
|
-
private readonly _apiBaseUrl;
|
|
23
|
-
private readonly _authToken?;
|
|
24
|
-
private readonly _activeUser?;
|
|
25
|
-
private readonly _userTimeZone;
|
|
26
|
-
constructor({ apiBaseUrl, authToken, activeUser, userTimeZone }?: {
|
|
27
|
-
apiBaseUrl?: string;
|
|
28
|
-
authToken?: string;
|
|
29
|
-
userLocale?: string;
|
|
30
|
-
userTimeZone?: string;
|
|
31
|
-
activeUser?: string;
|
|
32
|
-
});
|
|
33
|
-
getPage(pageId: string, { concurrency, fetchFullInfo, fetchCollections, signFileUrls, chunkLimit, chunkNumber, fetchOption }?: {
|
|
34
|
-
concurrency?: number;
|
|
35
|
-
fetchFullInfo?: boolean;
|
|
36
|
-
fetchCollections?: boolean;
|
|
37
|
-
signFileUrls?: boolean;
|
|
38
|
-
chunkLimit?: number;
|
|
39
|
-
chunkNumber?: number;
|
|
40
|
-
fetchOption?: FetchOption;
|
|
41
|
-
}): Promise<ExtendedRecordMap>;
|
|
42
|
-
fetchCollections(contentBlockIds: string[], recordMap: ExtendedRecordMap, pageId?: string, { concurrency, fetchOption, collectionConcurrency }?: {
|
|
43
|
-
concurrency: number;
|
|
44
|
-
collectionConcurrency?: number;
|
|
45
|
-
fetchOption?: FetchOption;
|
|
46
|
-
}): Promise<ExtendedRecordMap>;
|
|
47
|
-
addSignedUrls({ recordMap, contentBlockIds, fetchOption }: {
|
|
48
|
-
recordMap: ExtendedRecordMap;
|
|
49
|
-
contentBlockIds?: string[];
|
|
50
|
-
fetchOption?: FetchOption;
|
|
51
|
-
}): Promise<void>;
|
|
52
|
-
getPageRaw(pageId: string, { fetchOption, chunkLimit, chunkNumber }?: {
|
|
53
|
-
chunkLimit?: number;
|
|
54
|
-
chunkNumber?: number;
|
|
55
|
-
fetchOption?: FetchOption;
|
|
56
|
-
}): Promise<PageChunk>;
|
|
57
|
-
getCollectionData(collectionId: string, collectionViewId: string, collectionView: BaseCollectionView, { limit, searchQuery, userTimeZone, loadContentCover, fetchOption }?: {
|
|
58
|
-
type?: CollectionViewType;
|
|
59
|
-
limit?: number;
|
|
60
|
-
searchQuery?: string;
|
|
61
|
-
userTimeZone?: string;
|
|
62
|
-
userLocale?: string;
|
|
63
|
-
loadContentCover?: boolean;
|
|
64
|
-
fetchOption?: FetchOption;
|
|
65
|
-
}): Promise<ReducerResponse<CollectionQueryResult>>;
|
|
66
|
-
getUsers(userIds: string[], fetchOption?: FetchOption): Promise<RecordValues<User>>;
|
|
67
|
-
getSpaces(spaceIds: string[], fetchOption?: FetchOption): Promise<RecordValues<Space>>;
|
|
68
|
-
getBlocks(blockIds: string[], fetchOption?: FetchOption): Promise<PageChunk>;
|
|
69
|
-
syncRecords(records: {
|
|
70
|
-
id: string;
|
|
71
|
-
table: string;
|
|
72
|
-
}[], fetchOption?: FetchOption): Promise<PageChunk>;
|
|
73
|
-
getSignedFileUrls(urls: SignedUrlRequest[], fetchOption?: FetchOption): Promise<SignedUrlResponse>;
|
|
74
|
-
search(params: SearchParams, fetchOption?: FetchOption): Promise<SearchResults>;
|
|
75
|
-
/**
|
|
76
|
-
* Backlink function which requires an authToken for NotionAPI client.
|
|
77
|
-
* @param params object to pass black and space id
|
|
78
|
-
* @param fetchOption Fetch options
|
|
79
|
-
* @returns backlink list with recordmap
|
|
80
|
-
*/
|
|
81
|
-
getBacklinks(params: BacklinkParams, fetchOption?: FetchOption): Promise<BacklinkResults>;
|
|
82
|
-
fetch<T>({ endpoint, body, fetchOption, headers: clientHeaders }: {
|
|
83
|
-
endpoint: string;
|
|
84
|
-
body: object;
|
|
85
|
-
fetchOption?: FetchOption;
|
|
86
|
-
headers?: HeadersInit;
|
|
87
|
-
}): Promise<T>;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export { type FetchOption, NotionAPI, type PermissionRecord, type SignedUrlRequest, type SignedUrlResponse };
|
|
1
|
+
export * from './notion-api';
|
|
2
|
+
export * from './types';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
package/build/index.js
CHANGED
|
@@ -1,2 +1,425 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var j = Object.defineProperty, O = Object.defineProperties;
|
|
2
|
+
var V = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Y = Object.getOwnPropertySymbols;
|
|
4
|
+
var ee = Object.prototype.hasOwnProperty, te = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Z = (k, s, t) => s in k ? j(k, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : k[s] = t, o = (k, s) => {
|
|
6
|
+
for (var t in s || (s = {}))
|
|
7
|
+
ee.call(s, t) && Z(k, t, s[t]);
|
|
8
|
+
if (Y)
|
|
9
|
+
for (var t of Y(s))
|
|
10
|
+
te.call(s, t) && Z(k, t, s[t]);
|
|
11
|
+
return k;
|
|
12
|
+
}, P = (k, s) => O(k, V(s));
|
|
13
|
+
var p = (k, s, t) => new Promise((e, l) => {
|
|
14
|
+
var _ = (i) => {
|
|
15
|
+
try {
|
|
16
|
+
n(t.next(i));
|
|
17
|
+
} catch (f) {
|
|
18
|
+
l(f);
|
|
19
|
+
}
|
|
20
|
+
}, a = (i) => {
|
|
21
|
+
try {
|
|
22
|
+
n(t.throw(i));
|
|
23
|
+
} catch (f) {
|
|
24
|
+
l(f);
|
|
25
|
+
}
|
|
26
|
+
}, n = (i) => i.done ? e(i.value) : Promise.resolve(i.value).then(_, a);
|
|
27
|
+
n((t = t.apply(k, s)).next());
|
|
28
|
+
});
|
|
29
|
+
import { uuidToId as se, getPageContentUserIds as re, getPageContentBlockIds as F, getBlockCollectionId as oe, findAncestors as ne, parsePageId as T } from "@texonom/nutils";
|
|
30
|
+
import ie from "p-map";
|
|
31
|
+
class ue {
|
|
32
|
+
constructor({
|
|
33
|
+
apiBaseUrl: s = "https://www.notion.so/api/v3",
|
|
34
|
+
authToken: t,
|
|
35
|
+
activeUser: e,
|
|
36
|
+
userTimeZone: l = "America/New_York"
|
|
37
|
+
} = {}) {
|
|
38
|
+
this._apiBaseUrl = s, this._authToken = t, this._activeUser = e, this._userTimeZone = l;
|
|
39
|
+
}
|
|
40
|
+
getPage(f) {
|
|
41
|
+
return p(this, arguments, function* (s, {
|
|
42
|
+
concurrency: t = 3,
|
|
43
|
+
fetchFullInfo: e = !0,
|
|
44
|
+
fetchCollections: l = !0,
|
|
45
|
+
signFileUrls: _ = !0,
|
|
46
|
+
chunkLimit: a = 100,
|
|
47
|
+
chunkNumber: n = 0,
|
|
48
|
+
fetchOption: i
|
|
49
|
+
} = {}) {
|
|
50
|
+
var c, u, v;
|
|
51
|
+
const q = yield this.getPageRaw(s, {
|
|
52
|
+
chunkLimit: a,
|
|
53
|
+
chunkNumber: n,
|
|
54
|
+
fetchOption: i
|
|
55
|
+
}), r = q == null ? void 0 : q.recordMap;
|
|
56
|
+
if (!(r != null && r.block)) throw new Error(`Notion page not found "${se(s)}"`);
|
|
57
|
+
if (r.collection = (c = r.collection) != null ? c : {}, r.collection_view = (u = r.collection_view) != null ? u : {}, r.notion_user = (v = r.notion_user) != null ? v : {}, r.collection_query = {}, r.signed_urls = {}, e) {
|
|
58
|
+
const h = [], B = re(r).filter((y) => !r.notion_user[y]);
|
|
59
|
+
h.push(this.getUsers(B, i).then((y) => {
|
|
60
|
+
var R;
|
|
61
|
+
return (R = y == null ? void 0 : y.recordMapWithRoles) == null ? void 0 : R.notion_user;
|
|
62
|
+
}));
|
|
63
|
+
const I = F(r).filter((y) => !r.block[y]);
|
|
64
|
+
h.push(this.getBlocks(I, i).then((y) => y.recordMap.block));
|
|
65
|
+
const C = Object.values(r.block)[0].value, d = C.parent_table === "space" ? [C.parent_id] : [];
|
|
66
|
+
h.push(this.getSpaces(d, i).then((y) => {
|
|
67
|
+
var R;
|
|
68
|
+
return (R = y.recordMapWithRoles) == null ? void 0 : R.space;
|
|
69
|
+
}));
|
|
70
|
+
const [m, $, x] = yield Promise.all(h);
|
|
71
|
+
r.notion_user = o(o({}, r.notion_user), m), r.block = o(o({}, r.block), $), r.space = o(o({}, r.space), x);
|
|
72
|
+
}
|
|
73
|
+
const b = F(r);
|
|
74
|
+
return l && (yield this.fetchCollections(b, r, s, { concurrency: t, fetchOption: i })), _ && (yield this.addSignedUrls({ recordMap: r, contentBlockIds: b, fetchOption: i })), r;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
fetchCollections(n, i, f) {
|
|
78
|
+
return p(this, arguments, function* (s, t, e, {
|
|
79
|
+
concurrency: l,
|
|
80
|
+
fetchOption: _,
|
|
81
|
+
collectionConcurrency: a
|
|
82
|
+
} = { concurrency: 36, fetchOption: { timeout: 2e4 }, collectionConcurrency: 300 }) {
|
|
83
|
+
const q = s.flatMap((b) => {
|
|
84
|
+
var v, h;
|
|
85
|
+
const c = (v = t.block[b]) == null ? void 0 : v.value;
|
|
86
|
+
if (!c) return [];
|
|
87
|
+
const u = c && (c.type === "collection_view" || c.type === "collection_view_page") && oe(c, t);
|
|
88
|
+
return u && (!e || ne(t, c).includes(e)) ? (h = c.view_ids) == null ? void 0 : h.flatMap((B) => {
|
|
89
|
+
var I;
|
|
90
|
+
return (I = t.collection_query[u]) != null && I[B] ? [] : {
|
|
91
|
+
collectionId: u,
|
|
92
|
+
collectionViewId: B,
|
|
93
|
+
collectionViewBlockId: c.id
|
|
94
|
+
};
|
|
95
|
+
}) : [];
|
|
96
|
+
}), r = {
|
|
97
|
+
block: {},
|
|
98
|
+
collection: {},
|
|
99
|
+
collection_view: {},
|
|
100
|
+
notion_user: {},
|
|
101
|
+
collection_query: {},
|
|
102
|
+
signed_urls: {}
|
|
103
|
+
};
|
|
104
|
+
return yield ie(
|
|
105
|
+
q.slice(q.length - a, q.length),
|
|
106
|
+
(b) => p(this, null, function* () {
|
|
107
|
+
var B, I, C;
|
|
108
|
+
const { collectionId: c, collectionViewId: u, collectionViewBlockId: v } = b, h = (B = t.collection_view[u]) == null ? void 0 : B.value;
|
|
109
|
+
try {
|
|
110
|
+
const d = yield this.getCollectionData(c, u, h, {
|
|
111
|
+
fetchOption: _
|
|
112
|
+
});
|
|
113
|
+
if (d.recordMap && (t.block = o(o({}, t.block), d.recordMap.block), t.collection = o(o({}, t.collection), d.recordMap.collection), t.collection_view = o(o({}, t.collection_view), d.recordMap.collection_view), t.notion_user = o(o({}, t.notion_user), d.recordMap.notion_user), t.collection_query[c] = P(o({}, t.collection_query[c]), {
|
|
114
|
+
[u]: (I = d.result) == null ? void 0 : I.reducerResults
|
|
115
|
+
}), r.block = o(o({}, r.block), d.recordMap.block), r.collection = o(o({}, r.collection), d.recordMap.collection), r.collection_view = o(o({}, r.collection_view), d.recordMap.collection_view), r.notion_user = o(o({}, r.notion_user), d.recordMap.notion_user), r.collection_query[c] = P(o({}, r.collection_query[c]), {
|
|
116
|
+
[u]: (C = d.result) == null ? void 0 : C.reducerResults
|
|
117
|
+
})), !h) {
|
|
118
|
+
const m = yield this.getPageRaw(v, { fetchOption: _ });
|
|
119
|
+
m.recordMap && (t.collection_view = o(o({}, t.collection_view), m.recordMap.collection_view), r.collection_view = o(o({}, r.collection_view), m.recordMap.collection_view), t.collection = o(o({}, t.collection), m.recordMap.collection), r.collection = o(o({}, r.collection), m.recordMap.collection), t.block = o(o({}, t.block), m.recordMap.block), r.block = o(o({}, r.block), m.recordMap.block));
|
|
120
|
+
}
|
|
121
|
+
} catch (d) {
|
|
122
|
+
console.debug("NotionAPI collectionQuery error in page id ", e), console.error(d);
|
|
123
|
+
}
|
|
124
|
+
}),
|
|
125
|
+
{
|
|
126
|
+
concurrency: l
|
|
127
|
+
}
|
|
128
|
+
), r;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
addSignedUrls(l) {
|
|
132
|
+
return p(this, arguments, function* ({
|
|
133
|
+
recordMap: s,
|
|
134
|
+
contentBlockIds: t,
|
|
135
|
+
fetchOption: e = {}
|
|
136
|
+
}) {
|
|
137
|
+
s.signed_urls = {}, t || (t = F(s));
|
|
138
|
+
const _ = t.flatMap((a) => {
|
|
139
|
+
var i, f, q, r, b, c;
|
|
140
|
+
const n = (i = s.block[a]) == null ? void 0 : i.value;
|
|
141
|
+
if (n && (n.type === "pdf" || n.type === "audio" || n.type === "image" && ((f = n.file_ids) != null && f.length) || n.type === "video" || n.type === "file" || n.type === "page")) {
|
|
142
|
+
const u = n.type === "page" ? (q = n.format) == null ? void 0 : q.page_cover : (c = (b = (r = n.properties) == null ? void 0 : r.source) == null ? void 0 : b[0]) == null ? void 0 : c[0];
|
|
143
|
+
if (u)
|
|
144
|
+
return !u.includes("secure.notion-static.com") && !u.includes("prod-files-secure") ? [] : {
|
|
145
|
+
permissionRecord: {
|
|
146
|
+
table: "block",
|
|
147
|
+
id: n.id
|
|
148
|
+
},
|
|
149
|
+
url: u
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
return [];
|
|
153
|
+
});
|
|
154
|
+
if (_.length > 0)
|
|
155
|
+
try {
|
|
156
|
+
const { signedUrls: a } = yield this.getSignedFileUrls(_, e);
|
|
157
|
+
if (a.length === _.length)
|
|
158
|
+
for (let n = 0; n < _.length; ++n) {
|
|
159
|
+
const i = _[n], f = a[n];
|
|
160
|
+
s.signed_urls[i.permissionRecord.id] = f;
|
|
161
|
+
}
|
|
162
|
+
} catch (a) {
|
|
163
|
+
console.warn("NotionAPI getSignedfileUrls error", a);
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
getPageRaw(_) {
|
|
168
|
+
return p(this, arguments, function* (s, {
|
|
169
|
+
fetchOption: t,
|
|
170
|
+
chunkLimit: e = 100,
|
|
171
|
+
chunkNumber: l = 0
|
|
172
|
+
} = {}) {
|
|
173
|
+
const a = T(s);
|
|
174
|
+
if (!a) throw new Error(`invalid notion pageId "${s}"`);
|
|
175
|
+
const n = {
|
|
176
|
+
pageId: a,
|
|
177
|
+
limit: e,
|
|
178
|
+
chunkNumber: l,
|
|
179
|
+
cursor: { stack: [] },
|
|
180
|
+
verticalColumns: !1
|
|
181
|
+
};
|
|
182
|
+
return this.fetch({
|
|
183
|
+
endpoint: "loadPageChunk",
|
|
184
|
+
body: n,
|
|
185
|
+
fetchOption: t
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
getCollectionData(f, q, r) {
|
|
190
|
+
return p(this, arguments, function* (s, t, e, {
|
|
191
|
+
limit: l = 9999,
|
|
192
|
+
searchQuery: _ = "",
|
|
193
|
+
userTimeZone: a = this._userTimeZone,
|
|
194
|
+
loadContentCover: n = !0,
|
|
195
|
+
fetchOption: i
|
|
196
|
+
} = {}) {
|
|
197
|
+
var B, I, C, d, m, $, x, y, R, W, z, L;
|
|
198
|
+
const b = e == null ? void 0 : e.type, c = b === "board", u = c ? (B = e == null ? void 0 : e.format) == null ? void 0 : B.board_columns_by : (I = e == null ? void 0 : e.format) == null ? void 0 : I.collection_group_by;
|
|
199
|
+
let v = [];
|
|
200
|
+
(C = e == null ? void 0 : e.format) != null && C.property_filters && (v = (d = e.format) == null ? void 0 : d.property_filters.map((U) => {
|
|
201
|
+
var A, D;
|
|
202
|
+
return {
|
|
203
|
+
filter: (A = U == null ? void 0 : U.filter) == null ? void 0 : A.filter,
|
|
204
|
+
property: (D = U == null ? void 0 : U.filter) == null ? void 0 : D.property
|
|
205
|
+
};
|
|
206
|
+
})), ($ = (m = e == null ? void 0 : e.query2) == null ? void 0 : m.filter) != null && $.filters && v.push(...e.query2.filter.filters);
|
|
207
|
+
let h = P(o({
|
|
208
|
+
type: "reducer",
|
|
209
|
+
reducers: {
|
|
210
|
+
collection_group_results: {
|
|
211
|
+
type: "results",
|
|
212
|
+
limit: l,
|
|
213
|
+
loadContentCover: n
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
sort: []
|
|
217
|
+
}, e == null ? void 0 : e.query2), {
|
|
218
|
+
filter: {
|
|
219
|
+
filters: v,
|
|
220
|
+
operator: "and"
|
|
221
|
+
},
|
|
222
|
+
searchQuery: _,
|
|
223
|
+
userTimeZone: a
|
|
224
|
+
});
|
|
225
|
+
if (u) {
|
|
226
|
+
const U = ((x = e == null ? void 0 : e.format) == null ? void 0 : x.board_columns) || ((y = e == null ? void 0 : e.format) == null ? void 0 : y.collection_groups) || [], A = [c ? "board" : "group_aggregation", "results"], D = {
|
|
227
|
+
checkbox: "checkbox_is",
|
|
228
|
+
url: "string_starts_with",
|
|
229
|
+
text: "string_starts_with",
|
|
230
|
+
select: "enum_is",
|
|
231
|
+
multi_select: "enum_contains",
|
|
232
|
+
created_time: "date_is_within",
|
|
233
|
+
undefined: "is_empty"
|
|
234
|
+
}, J = {};
|
|
235
|
+
for (const S of U) {
|
|
236
|
+
const {
|
|
237
|
+
property: H,
|
|
238
|
+
value: { value: g, type: M }
|
|
239
|
+
} = S;
|
|
240
|
+
for (const E of A) {
|
|
241
|
+
const K = E === "results" ? {
|
|
242
|
+
type: E,
|
|
243
|
+
limit: l
|
|
244
|
+
} : {
|
|
245
|
+
type: "aggregation",
|
|
246
|
+
aggregation: {
|
|
247
|
+
aggregator: "count"
|
|
248
|
+
}
|
|
249
|
+
}, N = typeof g == "undefined", Q = g == null ? void 0 : g.range, X = N ? "uncategorized" : Q ? ((R = g.range) == null ? void 0 : R.start_date) || ((W = g.range) == null ? void 0 : W.end_date) : (g == null ? void 0 : g.value) || g, w = !N && (Q || (g == null ? void 0 : g.value) || g);
|
|
250
|
+
J[`${E}:${M}:${X}`] = P(o({}, K), {
|
|
251
|
+
filter: {
|
|
252
|
+
operator: "and",
|
|
253
|
+
filters: [
|
|
254
|
+
{
|
|
255
|
+
property: H,
|
|
256
|
+
filter: o({
|
|
257
|
+
operator: N ? "is_empty" : D[M]
|
|
258
|
+
}, !N && {
|
|
259
|
+
value: {
|
|
260
|
+
type: "exact",
|
|
261
|
+
value: w
|
|
262
|
+
}
|
|
263
|
+
})
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
const G = c ? "board_columns" : `${b}_groups`;
|
|
271
|
+
h = P(o({
|
|
272
|
+
type: "reducer",
|
|
273
|
+
reducers: o({
|
|
274
|
+
[G]: P(o({
|
|
275
|
+
type: "groups",
|
|
276
|
+
groupBy: u
|
|
277
|
+
}, ((z = e == null ? void 0 : e.query2) == null ? void 0 : z.filter) && {
|
|
278
|
+
filter: (L = e == null ? void 0 : e.query2) == null ? void 0 : L.filter
|
|
279
|
+
}), {
|
|
280
|
+
groupSortPreference: U.map((S) => S == null ? void 0 : S.value),
|
|
281
|
+
limit: l
|
|
282
|
+
})
|
|
283
|
+
}, J)
|
|
284
|
+
}, e == null ? void 0 : e.query2), {
|
|
285
|
+
searchQuery: _,
|
|
286
|
+
userTimeZone: a,
|
|
287
|
+
filter: { filters: v, operator: "and" }
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
return this.fetch({
|
|
291
|
+
endpoint: "queryCollection",
|
|
292
|
+
body: {
|
|
293
|
+
collection: { id: s },
|
|
294
|
+
collectionView: { id: t },
|
|
295
|
+
loader: h
|
|
296
|
+
},
|
|
297
|
+
fetchOption: i
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
getUsers(s, t) {
|
|
302
|
+
return p(this, null, function* () {
|
|
303
|
+
return this.fetch({
|
|
304
|
+
endpoint: "getRecordValues",
|
|
305
|
+
body: { requests: s.map((e) => ({ id: e, table: "notion_user" })) },
|
|
306
|
+
fetchOption: t
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
getSpaces(s, t) {
|
|
311
|
+
return p(this, null, function* () {
|
|
312
|
+
return this.fetch({
|
|
313
|
+
endpoint: "getRecordValues",
|
|
314
|
+
body: { requests: s.map((e) => ({ id: e, table: "space" })) },
|
|
315
|
+
fetchOption: t
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
getBlocks(s, t) {
|
|
320
|
+
return p(this, null, function* () {
|
|
321
|
+
return this.fetch({
|
|
322
|
+
endpoint: "syncRecordValues",
|
|
323
|
+
body: { requests: s.map((e) => ({ table: "block", id: e, version: -1 })) },
|
|
324
|
+
fetchOption: t
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
syncRecords(s, t) {
|
|
329
|
+
return p(this, null, function* () {
|
|
330
|
+
return this.fetch({
|
|
331
|
+
endpoint: "syncRecordValues",
|
|
332
|
+
body: { requests: s.map(({ id: e, table: l }) => ({ table: l, id: e, version: -1 })) },
|
|
333
|
+
fetchOption: t
|
|
334
|
+
});
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
getSignedFileUrls(s, t) {
|
|
338
|
+
return p(this, null, function* () {
|
|
339
|
+
return this.fetch({
|
|
340
|
+
endpoint: "getSignedFileUrls",
|
|
341
|
+
body: { urls: s },
|
|
342
|
+
fetchOption: t
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
search(s, t) {
|
|
347
|
+
return p(this, null, function* () {
|
|
348
|
+
var l;
|
|
349
|
+
const e = {
|
|
350
|
+
type: "BlocksInSpace",
|
|
351
|
+
source: "quick_find_filters",
|
|
352
|
+
spaceId: T(s.spaceId),
|
|
353
|
+
sort: { field: "relevance" },
|
|
354
|
+
limit: s.limit || 20,
|
|
355
|
+
query: s.query,
|
|
356
|
+
filters: P(o({
|
|
357
|
+
isDeletedOnly: !1,
|
|
358
|
+
navigableBlockContentOnly: !1,
|
|
359
|
+
excludeTemplates: !0,
|
|
360
|
+
requireEditPermissions: !1,
|
|
361
|
+
includePublicPagesWithoutExplicitAccess: !0,
|
|
362
|
+
createdBy: [],
|
|
363
|
+
editedBy: [],
|
|
364
|
+
lastEditedTime: {},
|
|
365
|
+
createdTime: {}
|
|
366
|
+
}, s.filters), {
|
|
367
|
+
ancestors: (l = s.filters) != null && l.ancestors ? s.filters.ancestors.map((_) => T(_)) : []
|
|
368
|
+
})
|
|
369
|
+
};
|
|
370
|
+
return this.fetch({
|
|
371
|
+
endpoint: "search",
|
|
372
|
+
body: e,
|
|
373
|
+
fetchOption: t
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Backlink function which requires an authToken for NotionAPI client.
|
|
379
|
+
* @param params object to pass black and space id
|
|
380
|
+
* @param fetchOption Fetch options
|
|
381
|
+
* @returns backlink list with recordmap
|
|
382
|
+
*/
|
|
383
|
+
getBacklinks(s, t) {
|
|
384
|
+
return p(this, null, function* () {
|
|
385
|
+
const e = {
|
|
386
|
+
block: {
|
|
387
|
+
id: T(s.block.id),
|
|
388
|
+
spaceId: T(s.block.spaceId)
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
return this.fetch({
|
|
392
|
+
endpoint: "getBacklinksForBlockInitial",
|
|
393
|
+
body: e,
|
|
394
|
+
fetchOption: t
|
|
395
|
+
});
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
fetch(_) {
|
|
399
|
+
return p(this, arguments, function* ({
|
|
400
|
+
endpoint: s,
|
|
401
|
+
body: t,
|
|
402
|
+
fetchOption: e,
|
|
403
|
+
headers: l
|
|
404
|
+
}) {
|
|
405
|
+
const a = P(o(o({}, l), e == null ? void 0 : e.headers), {
|
|
406
|
+
"Content-Type": "application/json"
|
|
407
|
+
});
|
|
408
|
+
this._authToken && (a.cookie = `token_v2=${this._authToken}`), this._activeUser && (a["x-notion-active-user-header"] = this._activeUser);
|
|
409
|
+
const n = `${this._apiBaseUrl}/${s}`, i = o({
|
|
410
|
+
method: "post",
|
|
411
|
+
body: JSON.stringify(t),
|
|
412
|
+
headers: a
|
|
413
|
+
}, e);
|
|
414
|
+
if ((e == null ? void 0 : e.timeout) !== void 0) {
|
|
415
|
+
const f = new AbortController();
|
|
416
|
+
setTimeout(() => f.abort(), e.timeout), i.signal = f.signal;
|
|
417
|
+
}
|
|
418
|
+
return fetch(n, i).then((f) => f.json());
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
export {
|
|
423
|
+
ue as NotionAPI
|
|
424
|
+
};
|
|
425
|
+
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/notion-api.ts"],"sourcesContent":["import {\n getBlockCollectionId,\n getPageContentBlockIds,\n getPageContentUserIds,\n parsePageId,\n uuidToId,\n findAncestors\n} from '@texonom/nutils'\nimport pMap from 'p-map'\n\nimport type {\n ExtendedRecordMap,\n PageChunk,\n BaseCollectionView,\n CollectionViewType,\n ReducerResponse,\n CollectionQueryResult,\n RecordValues,\n User,\n Space,\n SearchParams,\n SearchResults,\n BacklinkParams,\n BacklinkResults\n} from '@texonom/ntypes'\n\nimport type { SignedUrlRequest, FetchOption, SignedUrlResponse } from './types'\n\n/**\n * Main Notion API client.\n */\nexport class NotionAPI {\n private readonly _apiBaseUrl: string\n private readonly _authToken?: string\n private readonly _activeUser?: string\n private readonly _userTimeZone: string\n\n constructor({\n apiBaseUrl = 'https://www.notion.so/api/v3',\n authToken,\n activeUser,\n userTimeZone = 'America/New_York'\n }: {\n apiBaseUrl?: string\n authToken?: string\n userLocale?: string\n userTimeZone?: string\n activeUser?: string\n } = {}) {\n this._apiBaseUrl = apiBaseUrl\n this._authToken = authToken\n this._activeUser = activeUser\n this._userTimeZone = userTimeZone\n }\n\n public async getPage(\n pageId: string,\n {\n concurrency = 3,\n fetchFullInfo = true,\n fetchCollections = true,\n signFileUrls = true,\n chunkLimit = 100,\n chunkNumber = 0,\n fetchOption\n }: {\n concurrency?: number\n fetchFullInfo?: boolean\n fetchCollections?: boolean\n signFileUrls?: boolean\n chunkLimit?: number\n chunkNumber?: number\n fetchOption?: FetchOption\n } = {}\n ): Promise<ExtendedRecordMap> {\n const page = await this.getPageRaw(pageId, {\n chunkLimit,\n chunkNumber,\n fetchOption\n })\n const recordMap = page?.recordMap as ExtendedRecordMap\n if (!recordMap?.block) throw new Error(`Notion page not found \"${uuidToId(pageId)}\"`)\n\n // ensure that all top-level maps exist\n recordMap.collection = recordMap.collection ?? {}\n recordMap.collection_view = recordMap.collection_view ?? {}\n recordMap.notion_user = recordMap.notion_user ?? {}\n\n // additional mappings added for convenience\n // note: these are not native notion objects\n recordMap.collection_query = {}\n recordMap.signed_urls = {}\n\n // Fetch Users\n if (fetchFullInfo) {\n const promises = []\n // Fetch any missing users\n const pendingUserIDs = getPageContentUserIds(recordMap).filter(id => !recordMap.notion_user[id])\n promises.push(this.getUsers(pendingUserIDs, fetchOption).then(res => res?.recordMapWithRoles?.notion_user))\n\n // Fetch any missing content blocks\n const pendingBlocks = getPageContentBlockIds(recordMap).filter(id => !recordMap.block[id])\n promises.push(this.getBlocks(pendingBlocks, fetchOption).then(res => res.recordMap.block))\n\n // Fetch any missing content blocks\n const rootBlock = Object.values(recordMap.block)[0].value\n const pendingSpaces = rootBlock.parent_table === 'space' ? [rootBlock.parent_id] : []\n promises.push(this.getSpaces(pendingSpaces, fetchOption).then(res => res.recordMapWithRoles?.space))\n\n // Append them\n const [newUsers, newBlocks, newSpaces] = await Promise.all(promises)\n recordMap.notion_user = { ...recordMap.notion_user, ...newUsers }\n recordMap.block = { ...recordMap.block, ...newBlocks }\n recordMap.space = { ...recordMap.space, ...newSpaces }\n }\n\n // Optionally fetch all data for embedded collections and their associated views.\n // NOTE: We're eagerly fetching *all* data for each collection and all of its views.\n // This is really convenient in order to ensure that all data needed for a given\n // Notion page is readily available for use cases involving server-side rendering\n // and edge caching.\n\n const contentBlockIds = getPageContentBlockIds(recordMap)\n if (fetchCollections) await this.fetchCollections(contentBlockIds, recordMap, pageId, { concurrency, fetchOption })\n\n // Optionally fetch signed URLs for any embedded files.\n // NOTE: Similar to collection data, we default to eagerly fetching signed URL info\n // because it is preferable for many use cases as opposed to making these API calls\n // lazily from the client-side.\n if (signFileUrls) await this.addSignedUrls({ recordMap, contentBlockIds, fetchOption })\n\n return recordMap\n }\n\n public async fetchCollections(\n contentBlockIds: string[],\n recordMap: ExtendedRecordMap,\n pageId?: string,\n {\n concurrency,\n fetchOption,\n collectionConcurrency\n }: {\n concurrency: number\n collectionConcurrency?: number\n fetchOption?: FetchOption\n } = { concurrency: 36, fetchOption: { timeout: 20000 }, collectionConcurrency: 300 }\n ): Promise<ExtendedRecordMap> {\n const allCollectionInstances: Array<{\n collectionId: string\n collectionViewId: string\n collectionViewBlockId: string\n }> = contentBlockIds.flatMap(blockId => {\n const block = recordMap.block[blockId]?.value\n if (!block) return []\n const collectionId =\n block &&\n (block.type === 'collection_view' || block.type === 'collection_view_page') &&\n getBlockCollectionId(block, recordMap)\n\n if (collectionId)\n if (pageId ? findAncestors(recordMap, block).includes(pageId) : true)\n return block.view_ids?.flatMap(collectionViewId => {\n if (recordMap.collection_query[collectionId]?.[collectionViewId]) return []\n else\n return {\n collectionId,\n collectionViewId,\n collectionViewBlockId: block.id\n }\n })\n return []\n })\n\n // fetch data for all collection view instances\n const resultMap: ExtendedRecordMap = {\n block: {},\n collection: {},\n collection_view: {},\n notion_user: {},\n collection_query: {},\n signed_urls: {}\n }\n await pMap(\n allCollectionInstances.slice(allCollectionInstances.length - collectionConcurrency, allCollectionInstances.length),\n async collectionInstance => {\n const { collectionId, collectionViewId, collectionViewBlockId } = collectionInstance\n const collectionView = recordMap.collection_view[collectionViewId]?.value\n\n try {\n const collectionData = await this.getCollectionData(collectionId, collectionViewId, collectionView, {\n fetchOption\n })\n\n if (collectionData.recordMap) {\n recordMap.block = { ...recordMap.block, ...collectionData.recordMap.block }\n recordMap.collection = { ...recordMap.collection, ...collectionData.recordMap.collection }\n recordMap.collection_view = { ...recordMap.collection_view, ...collectionData.recordMap.collection_view }\n recordMap.notion_user = { ...recordMap.notion_user, ...collectionData.recordMap.notion_user }\n recordMap.collection_query![collectionId] = {\n ...recordMap.collection_query![collectionId],\n [collectionViewId]: collectionData.result?.reducerResults\n }\n resultMap.block = { ...resultMap.block, ...collectionData.recordMap.block }\n resultMap.collection = { ...resultMap.collection, ...collectionData.recordMap.collection }\n resultMap.collection_view = { ...resultMap.collection_view, ...collectionData.recordMap.collection_view }\n resultMap.notion_user = { ...resultMap.notion_user, ...collectionData.recordMap.notion_user }\n resultMap.collection_query![collectionId] = {\n ...resultMap.collection_query![collectionId],\n [collectionViewId]: collectionData.result?.reducerResults\n }\n }\n\n if (!collectionView) {\n const viewBlockData = await this.getPageRaw(collectionViewBlockId, { fetchOption })\n if (viewBlockData.recordMap) {\n recordMap.collection_view = { ...recordMap.collection_view, ...viewBlockData.recordMap.collection_view }\n resultMap.collection_view = { ...resultMap.collection_view, ...viewBlockData.recordMap.collection_view }\n recordMap.collection = { ...recordMap.collection, ...viewBlockData.recordMap.collection }\n resultMap.collection = { ...resultMap.collection, ...viewBlockData.recordMap.collection }\n recordMap.block = { ...recordMap.block, ...viewBlockData.recordMap.block }\n resultMap.block = { ...resultMap.block, ...viewBlockData.recordMap.block }\n }\n }\n } catch (err) {\n // It's possible for public pages to link to private collections, in which case\n // Notion returns a 400 error\n console.debug('NotionAPI collectionQuery error in page id ', pageId)\n console.error(err)\n }\n },\n {\n concurrency\n }\n )\n return resultMap\n }\n\n public async addSignedUrls({\n recordMap,\n contentBlockIds,\n fetchOption = {}\n }: {\n recordMap: ExtendedRecordMap\n contentBlockIds?: string[]\n fetchOption?: FetchOption\n }) {\n recordMap.signed_urls = {}\n\n if (!contentBlockIds) contentBlockIds = getPageContentBlockIds(recordMap)\n\n const allFileInstances = contentBlockIds.flatMap(blockId => {\n const block = recordMap.block[blockId]?.value\n\n if (\n block &&\n (block.type === 'pdf' ||\n block.type === 'audio' ||\n (block.type === 'image' && block.file_ids?.length) ||\n block.type === 'video' ||\n block.type === 'file' ||\n block.type === 'page')\n ) {\n const source = block.type === 'page' ? block.format?.page_cover : block.properties?.source?.[0]?.[0]\n\n if (source) {\n if (!source.includes('secure.notion-static.com') && !source.includes('prod-files-secure')) return []\n\n return {\n permissionRecord: {\n table: 'block',\n id: block.id\n },\n url: source\n }\n }\n }\n\n return []\n })\n\n if (allFileInstances.length > 0)\n try {\n const { signedUrls } = await this.getSignedFileUrls(allFileInstances, fetchOption)\n\n if (signedUrls.length === allFileInstances.length)\n for (let i = 0; i < allFileInstances.length; ++i) {\n const file = allFileInstances[i]\n const signedUrl = signedUrls[i]\n\n recordMap.signed_urls[file.permissionRecord.id] = signedUrl\n }\n } catch (err) {\n console.warn('NotionAPI getSignedfileUrls error', err)\n }\n }\n\n public async getPageRaw(\n pageId: string,\n {\n fetchOption,\n chunkLimit = 100,\n chunkNumber = 0\n }: {\n chunkLimit?: number\n chunkNumber?: number\n fetchOption?: FetchOption\n } = {}\n ) {\n const parsedPageId = parsePageId(pageId)\n\n if (!parsedPageId) throw new Error(`invalid notion pageId \"${pageId}\"`)\n\n const body = {\n pageId: parsedPageId,\n limit: chunkLimit,\n chunkNumber: chunkNumber,\n cursor: { stack: [] },\n verticalColumns: false\n }\n\n return this.fetch<PageChunk>({\n endpoint: 'loadPageChunk',\n body,\n fetchOption\n })\n }\n\n public async getCollectionData(\n collectionId: string,\n collectionViewId: string,\n collectionView: BaseCollectionView,\n {\n limit = 9999,\n searchQuery = '',\n userTimeZone = this._userTimeZone,\n loadContentCover = true,\n fetchOption\n }: {\n type?: CollectionViewType\n limit?: number\n searchQuery?: string\n userTimeZone?: string\n userLocale?: string\n loadContentCover?: boolean\n fetchOption?: FetchOption\n } = {}\n ) {\n const type = collectionView?.type\n const isBoardType = type === 'board'\n const groupBy = isBoardType ? collectionView?.format?.board_columns_by : collectionView?.format?.collection_group_by\n\n let filters = []\n if (collectionView?.format?.property_filters)\n filters = collectionView.format?.property_filters.map(filterObj => {\n //get the inner filter\n return {\n filter: filterObj?.filter?.filter,\n property: filterObj?.filter?.property\n }\n })\n\n //Fixes formula filters from not working\n if (collectionView?.query2?.filter?.filters) filters.push(...collectionView.query2.filter.filters)\n\n let loader: unknown = {\n type: 'reducer',\n reducers: {\n collection_group_results: {\n type: 'results',\n limit,\n loadContentCover\n }\n },\n sort: [],\n ...collectionView?.query2,\n filter: {\n filters: filters,\n operator: 'and'\n },\n searchQuery,\n userTimeZone\n }\n\n if (groupBy) {\n const groups = collectionView?.format?.board_columns || collectionView?.format?.collection_groups || []\n const iterators = [isBoardType ? 'board' : 'group_aggregation', 'results']\n const operators = {\n checkbox: 'checkbox_is',\n url: 'string_starts_with',\n text: 'string_starts_with',\n select: 'enum_is',\n multi_select: 'enum_contains',\n created_time: 'date_is_within',\n ['undefined']: 'is_empty'\n }\n\n const reducersQuery = {}\n for (const group of groups) {\n const {\n property,\n value: { value, type }\n } = group\n\n for (const iterator of iterators) {\n const iteratorProps =\n iterator === 'results'\n ? {\n type: iterator,\n limit\n }\n : {\n type: 'aggregation',\n aggregation: {\n aggregator: 'count'\n }\n }\n\n const isUncategorizedValue = typeof value === 'undefined'\n const isDateValue = value?.range\n // TODO: review dates reducers\n const queryLabel = isUncategorizedValue\n ? 'uncategorized'\n : isDateValue\n ? value.range?.start_date || value.range?.end_date\n : value?.value || value\n\n const queryValue = !isUncategorizedValue && (isDateValue || value?.value || value)\n\n reducersQuery[`${iterator}:${type}:${queryLabel}`] = {\n ...iteratorProps,\n filter: {\n operator: 'and',\n filters: [\n {\n property,\n filter: {\n operator: !isUncategorizedValue ? operators[type] : 'is_empty',\n ...(!isUncategorizedValue && {\n value: {\n type: 'exact',\n value: queryValue\n }\n })\n }\n }\n ]\n }\n }\n }\n }\n\n const reducerLabel = isBoardType ? 'board_columns' : `${type}_groups`\n loader = {\n type: 'reducer',\n reducers: {\n [reducerLabel]: {\n type: 'groups',\n groupBy,\n ...(collectionView?.query2?.filter && {\n filter: collectionView?.query2?.filter\n }),\n groupSortPreference: groups.map(group => group?.value),\n limit\n },\n ...reducersQuery\n },\n ...collectionView?.query2,\n searchQuery,\n userTimeZone,\n filter: { filters, operator: 'and' }\n }\n }\n\n return this.fetch<ReducerResponse<CollectionQueryResult>>({\n endpoint: 'queryCollection',\n body: {\n collection: { id: collectionId },\n collectionView: { id: collectionViewId },\n loader\n },\n fetchOption\n })\n }\n\n public async getUsers(userIds: string[], fetchOption?: FetchOption) {\n return this.fetch<RecordValues<User>>({\n endpoint: 'getRecordValues',\n body: { requests: userIds.map(id => ({ id, table: 'notion_user' })) },\n fetchOption\n })\n }\n\n public async getSpaces(spaceIds: string[], fetchOption?: FetchOption) {\n return this.fetch<RecordValues<Space>>({\n endpoint: 'getRecordValues',\n body: { requests: spaceIds.map(id => ({ id, table: 'space' })) },\n fetchOption\n })\n }\n\n public async getBlocks(blockIds: string[], fetchOption?: FetchOption) {\n return this.fetch<PageChunk>({\n endpoint: 'syncRecordValues',\n body: { requests: blockIds.map(blockId => ({ table: 'block', id: blockId, version: -1 })) },\n fetchOption\n })\n }\n\n public async syncRecords(records: { id: string; table: string }[], fetchOption?: FetchOption) {\n return this.fetch<PageChunk>({\n endpoint: 'syncRecordValues',\n body: { requests: records.map(({ id, table }) => ({ table, id, version: -1 })) },\n fetchOption\n })\n }\n\n public async getSignedFileUrls(urls: SignedUrlRequest[], fetchOption?: FetchOption) {\n return this.fetch<SignedUrlResponse>({\n endpoint: 'getSignedFileUrls',\n body: { urls },\n fetchOption\n })\n }\n\n public async search(params: SearchParams, fetchOption?: FetchOption) {\n const body: SearchParams = {\n type: 'BlocksInSpace',\n source: 'quick_find_filters',\n spaceId: parsePageId(params.spaceId),\n sort: { field: 'relevance' },\n limit: params.limit || 20,\n query: params.query,\n filters: {\n isDeletedOnly: false,\n navigableBlockContentOnly: false,\n excludeTemplates: true,\n requireEditPermissions: false,\n includePublicPagesWithoutExplicitAccess: true,\n createdBy: [],\n editedBy: [],\n lastEditedTime: {},\n createdTime: {},\n ...params.filters,\n ancestors: params.filters?.ancestors ? params.filters.ancestors.map(id => parsePageId(id)) : []\n }\n }\n return this.fetch<SearchResults>({\n endpoint: 'search',\n body,\n fetchOption\n })\n }\n\n /**\n * Backlink function which requires an authToken for NotionAPI client.\n * @param params object to pass black and space id\n * @param fetchOption Fetch options\n * @returns backlink list with recordmap\n */\n public async getBacklinks(params: BacklinkParams, fetchOption?: FetchOption) {\n const body: BacklinkParams = {\n block: {\n id: parsePageId(params.block.id),\n spaceId: parsePageId(params.block.spaceId)\n }\n }\n\n return this.fetch<BacklinkResults>({\n endpoint: 'getBacklinksForBlockInitial',\n body,\n fetchOption\n })\n }\n\n public async fetch<T>({\n endpoint,\n body,\n fetchOption,\n headers: clientHeaders\n }: {\n endpoint: string\n body: object\n fetchOption?: FetchOption\n headers?: HeadersInit\n }): Promise<T> {\n const headers: HeadersInit = {\n ...clientHeaders,\n ...fetchOption?.headers,\n 'Content-Type': 'application/json'\n }\n\n if (this._authToken) headers['cookie'] = `token_v2=${this._authToken}`\n if (this._activeUser) headers['x-notion-active-user-header'] = this._activeUser\n\n const url = `${this._apiBaseUrl}/${endpoint}`\n const requestInit = {\n method: 'post',\n body: JSON.stringify(body),\n headers,\n ...fetchOption\n }\n if (fetchOption?.timeout !== undefined) {\n const ctrl = new AbortController()\n setTimeout(() => ctrl.abort(), fetchOption.timeout)\n requestInit.signal = ctrl.signal\n }\n\n return fetch(url, requestInit).then(res => res.json())\n }\n}\n"],"mappings":"AAAA,OACE,wBAAAA,EACA,0BAAAC,EACA,yBAAAC,EACA,eAAAC,EACA,YAAAC,EACA,iBAAAC,MACK,kBACP,OAAOC,MAAU,QAuBV,IAAMC,EAAN,KAAgB,CAMrB,YAAY,CACV,WAAAC,EAAa,+BACb,UAAAC,EACA,WAAAC,EACA,aAAAC,EAAe,kBACjB,EAMI,CAAC,EAAG,CACN,KAAK,YAAcH,EACnB,KAAK,WAAaC,EAClB,KAAK,YAAcC,EACnB,KAAK,cAAgBC,CACvB,CAEA,MAAa,QACXC,EACA,CACE,YAAAC,EAAc,EACd,cAAAC,EAAgB,GAChB,iBAAAC,EAAmB,GACnB,aAAAC,EAAe,GACf,WAAAC,EAAa,IACb,YAAAC,EAAc,EACd,YAAAC,CACF,EAQI,CAAC,EACuB,CAC5B,IAAMC,EAAO,MAAM,KAAK,WAAWR,EAAQ,CACzC,WAAAK,EACA,YAAAC,EACA,YAAAC,CACF,CAAC,EACKE,EAAYD,GAAA,YAAAA,EAAM,UACxB,GAAI,EAACC,GAAA,MAAAA,EAAW,OAAO,MAAM,IAAI,MAAM,0BAA0BjB,EAASQ,CAAM,CAAC,GAAG,EAapF,GAVAS,EAAU,WAAaA,EAAU,YAAc,CAAC,EAChDA,EAAU,gBAAkBA,EAAU,iBAAmB,CAAC,EAC1DA,EAAU,YAAcA,EAAU,aAAe,CAAC,EAIlDA,EAAU,iBAAmB,CAAC,EAC9BA,EAAU,YAAc,CAAC,EAGrBP,EAAe,CACjB,IAAMQ,EAAW,CAAC,EAEZC,EAAiBrB,EAAsBmB,CAAS,EAAE,OAAOG,GAAM,CAACH,EAAU,YAAYG,CAAE,CAAC,EAC/FF,EAAS,KAAK,KAAK,SAASC,EAAgBJ,CAAW,EAAE,KAAK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AYoE,EAAO,QAAQ,UAAU,IAAItE,GAAMrB,EAAYqB,CAAE,CAAC,EAAI,CAAC,CAChG,CACF,EACA,OAAO,KAAK,MAAqB,CAC/B,SAAU,SACV,KAAAmC,EACA,YAAAxC,CACF,CAAC,CACH,CAQA,MAAa,aAAa2E,EAAwB3E,EAA2B,CAC3E,IAAMwC,EAAuB,CAC3B,MAAO,CACL,GAAIxD,EAAY2F,EAAO,MAAM,EAAE,EAC/B,QAAS3F,EAAY2F,EAAO,MAAM,OAAO,CAC3C,CACF,EAEA,OAAO,KAAK,MAAuB,CACjC,SAAU,8BACV,KAAAnC,EACA,YAAAxC,CACF,CAAC,CACH,CAEA,MAAa,MAAS,CACpB,SAAA4E,EACA,KAAApC,EACA,YAAAxC,EACA,QAAS6E,CACX,EAKe,CACb,IAAMC,EAAuB,CAC3B,GAAGD,EACH,GAAG7E,GAAA,YAAAA,EAAa,QAChB,eAAgB,kBAClB,EAEI,KAAK,aAAY8E,EAAQ,OAAY,YAAY,KAAK,UAAU,IAChE,KAAK,cAAaA,EAAQ,6BAA6B,EAAI,KAAK,aAEpE,IAAMC,EAAM,GAAG,KAAK,WAAW,IAAIH,CAAQ,GACrCI,EAAc,CAClB,OAAQ,OACR,KAAM,KAAK,UAAUxC,CAAI,EACzB,QAAAsC,EACA,GAAG9E,CACL,EACA,IAAIA,GAAA,YAAAA,EAAa,WAAY,OAAW,CACtC,IAAMiF,EAAO,IAAI,gBACjB,WAAW,IAAMA,EAAK,MAAM,EAAGjF,EAAY,OAAO,EAClDgF,EAAY,OAASC,EAAK,MAC5B,CAEA,OAAO,MAAMF,EAAKC,CAAW,EAAE,KAAK1E,GAAOA,EAAI,KAAK,CAAC,CACvD,CACF","names":["getBlockCollectionId","getPageContentBlockIds","getPageContentUserIds","parsePageId","uuidToId","findAncestors","pMap","NotionAPI","apiBaseUrl","authToken","activeUser","userTimeZone","pageId","concurrency","fetchFullInfo","fetchCollections","signFileUrls","chunkLimit","chunkNumber","fetchOption","page","recordMap","promises","pendingUserIDs","id","res","_a","pendingBlocks","rootBlock","pendingSpaces","newUsers","newBlocks","newSpaces","contentBlockIds","collectionConcurrency","allCollectionInstances","blockId","_b","block","collectionId","collectionViewId","resultMap","collectionInstance","_c","collectionViewBlockId","collectionView","collectionData","viewBlockData","err","allFileInstances","_d","_e","_f","source","signedUrls","i","file","signedUrl","parsedPageId","body","limit","searchQuery","loadContentCover","_g","_h","_i","_j","_k","_l","type","isBoardType","groupBy","filters","filterObj","loader","groups","iterators","operators","reducersQuery","group","property","value","iterator","iteratorProps","isUncategorizedValue","isDateValue","queryLabel","queryValue","userIds","spaceIds","blockIds","records","table","urls","params","endpoint","clientHeaders","headers","url","requestInit","ctrl"]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/notion-api.ts"],"sourcesContent":["import {\n getBlockCollectionId,\n getPageContentBlockIds,\n getPageContentUserIds,\n parsePageId,\n uuidToId,\n findAncestors\n} from '@texonom/nutils'\nimport pMap from 'p-map'\n\nimport type {\n ExtendedRecordMap,\n PageChunk,\n BaseCollectionView,\n CollectionViewType,\n ReducerResponse,\n CollectionQueryResult,\n RecordValues,\n User,\n Space,\n SearchParams,\n SearchResults,\n BacklinkParams,\n BacklinkResults\n} from '@texonom/ntypes'\n\nimport type { SignedUrlRequest, FetchOption, SignedUrlResponse } from './types'\n\n/**\n * Main Notion API client.\n */\nexport class NotionAPI {\n private readonly _apiBaseUrl: string\n private readonly _authToken?: string\n private readonly _activeUser?: string\n private readonly _userTimeZone: string\n\n constructor({\n apiBaseUrl = 'https://www.notion.so/api/v3',\n authToken,\n activeUser,\n userTimeZone = 'America/New_York'\n }: {\n apiBaseUrl?: string\n authToken?: string\n userLocale?: string\n userTimeZone?: string\n activeUser?: string\n } = {}) {\n this._apiBaseUrl = apiBaseUrl\n this._authToken = authToken\n this._activeUser = activeUser\n this._userTimeZone = userTimeZone\n }\n\n public async getPage(\n pageId: string,\n {\n concurrency = 3,\n fetchFullInfo = true,\n fetchCollections = true,\n signFileUrls = true,\n chunkLimit = 100,\n chunkNumber = 0,\n fetchOption\n }: {\n concurrency?: number\n fetchFullInfo?: boolean\n fetchCollections?: boolean\n signFileUrls?: boolean\n chunkLimit?: number\n chunkNumber?: number\n fetchOption?: FetchOption\n } = {}\n ): Promise<ExtendedRecordMap> {\n const page = await this.getPageRaw(pageId, {\n chunkLimit,\n chunkNumber,\n fetchOption\n })\n const recordMap = page?.recordMap as ExtendedRecordMap\n if (!recordMap?.block) throw new Error(`Notion page not found \"${uuidToId(pageId)}\"`)\n\n // ensure that all top-level maps exist\n recordMap.collection = recordMap.collection ?? {}\n recordMap.collection_view = recordMap.collection_view ?? {}\n recordMap.notion_user = recordMap.notion_user ?? {}\n\n // additional mappings added for convenience\n // note: these are not native notion objects\n recordMap.collection_query = {}\n recordMap.signed_urls = {}\n\n // Fetch Users\n if (fetchFullInfo) {\n const promises = []\n // Fetch any missing users\n const pendingUserIDs = getPageContentUserIds(recordMap).filter(id => !recordMap.notion_user[id])\n promises.push(this.getUsers(pendingUserIDs, fetchOption).then(res => res?.recordMapWithRoles?.notion_user))\n\n // Fetch any missing content blocks\n const pendingBlocks = getPageContentBlockIds(recordMap).filter(id => !recordMap.block[id])\n promises.push(this.getBlocks(pendingBlocks, fetchOption).then(res => res.recordMap.block))\n\n // Fetch any missing content blocks\n const rootBlock = Object.values(recordMap.block)[0].value\n const pendingSpaces = rootBlock.parent_table === 'space' ? [rootBlock.parent_id] : []\n promises.push(this.getSpaces(pendingSpaces, fetchOption).then(res => res.recordMapWithRoles?.space))\n\n // Append them\n const [newUsers, newBlocks, newSpaces] = await Promise.all(promises)\n recordMap.notion_user = { ...recordMap.notion_user, ...newUsers }\n recordMap.block = { ...recordMap.block, ...newBlocks }\n recordMap.space = { ...recordMap.space, ...newSpaces }\n }\n\n // Optionally fetch all data for embedded collections and their associated views.\n // NOTE: We're eagerly fetching *all* data for each collection and all of its views.\n // This is really convenient in order to ensure that all data needed for a given\n // Notion page is readily available for use cases involving server-side rendering\n // and edge caching.\n\n const contentBlockIds = getPageContentBlockIds(recordMap)\n if (fetchCollections) await this.fetchCollections(contentBlockIds, recordMap, pageId, { concurrency, fetchOption })\n\n // Optionally fetch signed URLs for any embedded files.\n // NOTE: Similar to collection data, we default to eagerly fetching signed URL info\n // because it is preferable for many use cases as opposed to making these API calls\n // lazily from the client-side.\n if (signFileUrls) await this.addSignedUrls({ recordMap, contentBlockIds, fetchOption })\n\n return recordMap\n }\n\n public async fetchCollections(\n contentBlockIds: string[],\n recordMap: ExtendedRecordMap,\n pageId?: string,\n {\n concurrency,\n fetchOption,\n collectionConcurrency\n }: {\n concurrency: number\n collectionConcurrency?: number\n fetchOption?: FetchOption\n } = { concurrency: 36, fetchOption: { timeout: 20000 }, collectionConcurrency: 300 }\n ): Promise<ExtendedRecordMap> {\n const allCollectionInstances: Array<{\n collectionId: string\n collectionViewId: string\n collectionViewBlockId: string\n }> = contentBlockIds.flatMap(blockId => {\n const block = recordMap.block[blockId]?.value\n if (!block) return []\n const collectionId =\n block &&\n (block.type === 'collection_view' || block.type === 'collection_view_page') &&\n getBlockCollectionId(block, recordMap)\n\n if (collectionId)\n if (pageId ? findAncestors(recordMap, block).includes(pageId) : true)\n return block.view_ids?.flatMap(collectionViewId => {\n if (recordMap.collection_query[collectionId]?.[collectionViewId]) return []\n else\n return {\n collectionId,\n collectionViewId,\n collectionViewBlockId: block.id\n }\n })\n return []\n })\n\n // fetch data for all collection view instances\n const resultMap: ExtendedRecordMap = {\n block: {},\n collection: {},\n collection_view: {},\n notion_user: {},\n collection_query: {},\n signed_urls: {}\n }\n await pMap(\n allCollectionInstances.slice(allCollectionInstances.length - collectionConcurrency, allCollectionInstances.length),\n async collectionInstance => {\n const { collectionId, collectionViewId, collectionViewBlockId } = collectionInstance\n const collectionView = recordMap.collection_view[collectionViewId]?.value\n\n try {\n const collectionData = await this.getCollectionData(collectionId, collectionViewId, collectionView, {\n fetchOption\n })\n\n if (collectionData.recordMap) {\n recordMap.block = { ...recordMap.block, ...collectionData.recordMap.block }\n recordMap.collection = { ...recordMap.collection, ...collectionData.recordMap.collection }\n recordMap.collection_view = { ...recordMap.collection_view, ...collectionData.recordMap.collection_view }\n recordMap.notion_user = { ...recordMap.notion_user, ...collectionData.recordMap.notion_user }\n recordMap.collection_query![collectionId] = {\n ...recordMap.collection_query![collectionId],\n [collectionViewId]: collectionData.result?.reducerResults\n }\n resultMap.block = { ...resultMap.block, ...collectionData.recordMap.block }\n resultMap.collection = { ...resultMap.collection, ...collectionData.recordMap.collection }\n resultMap.collection_view = { ...resultMap.collection_view, ...collectionData.recordMap.collection_view }\n resultMap.notion_user = { ...resultMap.notion_user, ...collectionData.recordMap.notion_user }\n resultMap.collection_query![collectionId] = {\n ...resultMap.collection_query![collectionId],\n [collectionViewId]: collectionData.result?.reducerResults\n }\n }\n\n if (!collectionView) {\n const viewBlockData = await this.getPageRaw(collectionViewBlockId, { fetchOption })\n if (viewBlockData.recordMap) {\n recordMap.collection_view = { ...recordMap.collection_view, ...viewBlockData.recordMap.collection_view }\n resultMap.collection_view = { ...resultMap.collection_view, ...viewBlockData.recordMap.collection_view }\n recordMap.collection = { ...recordMap.collection, ...viewBlockData.recordMap.collection }\n resultMap.collection = { ...resultMap.collection, ...viewBlockData.recordMap.collection }\n recordMap.block = { ...recordMap.block, ...viewBlockData.recordMap.block }\n resultMap.block = { ...resultMap.block, ...viewBlockData.recordMap.block }\n }\n }\n } catch (err) {\n // It's possible for public pages to link to private collections, in which case\n // Notion returns a 400 error\n console.debug('NotionAPI collectionQuery error in page id ', pageId)\n console.error(err)\n }\n },\n {\n concurrency\n }\n )\n return resultMap\n }\n\n public async addSignedUrls({\n recordMap,\n contentBlockIds,\n fetchOption = {}\n }: {\n recordMap: ExtendedRecordMap\n contentBlockIds?: string[]\n fetchOption?: FetchOption\n }) {\n recordMap.signed_urls = {}\n\n if (!contentBlockIds) contentBlockIds = getPageContentBlockIds(recordMap)\n\n const allFileInstances = contentBlockIds.flatMap(blockId => {\n const block = recordMap.block[blockId]?.value\n\n if (\n block &&\n (block.type === 'pdf' ||\n block.type === 'audio' ||\n (block.type === 'image' && block.file_ids?.length) ||\n block.type === 'video' ||\n block.type === 'file' ||\n block.type === 'page')\n ) {\n const source = block.type === 'page' ? block.format?.page_cover : block.properties?.source?.[0]?.[0]\n\n if (source) {\n if (!source.includes('secure.notion-static.com') && !source.includes('prod-files-secure')) return []\n\n return {\n permissionRecord: {\n table: 'block',\n id: block.id\n },\n url: source\n }\n }\n }\n\n return []\n })\n\n if (allFileInstances.length > 0)\n try {\n const { signedUrls } = await this.getSignedFileUrls(allFileInstances, fetchOption)\n\n if (signedUrls.length === allFileInstances.length)\n for (let i = 0; i < allFileInstances.length; ++i) {\n const file = allFileInstances[i]\n const signedUrl = signedUrls[i]\n\n recordMap.signed_urls[file.permissionRecord.id] = signedUrl\n }\n } catch (err) {\n console.warn('NotionAPI getSignedfileUrls error', err)\n }\n }\n\n public async getPageRaw(\n pageId: string,\n {\n fetchOption,\n chunkLimit = 100,\n chunkNumber = 0\n }: {\n chunkLimit?: number\n chunkNumber?: number\n fetchOption?: FetchOption\n } = {}\n ) {\n const parsedPageId = parsePageId(pageId)\n\n if (!parsedPageId) throw new Error(`invalid notion pageId \"${pageId}\"`)\n\n const body = {\n pageId: parsedPageId,\n limit: chunkLimit,\n chunkNumber: chunkNumber,\n cursor: { stack: [] },\n verticalColumns: false\n }\n\n return this.fetch<PageChunk>({\n endpoint: 'loadPageChunk',\n body,\n fetchOption\n })\n }\n\n public async getCollectionData(\n collectionId: string,\n collectionViewId: string,\n collectionView: BaseCollectionView,\n {\n limit = 9999,\n searchQuery = '',\n userTimeZone = this._userTimeZone,\n loadContentCover = true,\n fetchOption\n }: {\n type?: CollectionViewType\n limit?: number\n searchQuery?: string\n userTimeZone?: string\n userLocale?: string\n loadContentCover?: boolean\n fetchOption?: FetchOption\n } = {}\n ) {\n const type = collectionView?.type\n const isBoardType = type === 'board'\n const groupBy = isBoardType ? collectionView?.format?.board_columns_by : collectionView?.format?.collection_group_by\n\n let filters = []\n if (collectionView?.format?.property_filters)\n filters = collectionView.format?.property_filters.map(filterObj => {\n //get the inner filter\n return {\n filter: filterObj?.filter?.filter,\n property: filterObj?.filter?.property\n }\n })\n\n //Fixes formula filters from not working\n if (collectionView?.query2?.filter?.filters) filters.push(...collectionView.query2.filter.filters)\n\n let loader: unknown = {\n type: 'reducer',\n reducers: {\n collection_group_results: {\n type: 'results',\n limit,\n loadContentCover\n }\n },\n sort: [],\n ...collectionView?.query2,\n filter: {\n filters: filters,\n operator: 'and'\n },\n searchQuery,\n userTimeZone\n }\n\n if (groupBy) {\n const groups = collectionView?.format?.board_columns || collectionView?.format?.collection_groups || []\n const iterators = [isBoardType ? 'board' : 'group_aggregation', 'results']\n const operators = {\n checkbox: 'checkbox_is',\n url: 'string_starts_with',\n text: 'string_starts_with',\n select: 'enum_is',\n multi_select: 'enum_contains',\n created_time: 'date_is_within',\n ['undefined']: 'is_empty'\n }\n\n const reducersQuery = {}\n for (const group of groups) {\n const {\n property,\n value: { value, type }\n } = group\n\n for (const iterator of iterators) {\n const iteratorProps =\n iterator === 'results'\n ? {\n type: iterator,\n limit\n }\n : {\n type: 'aggregation',\n aggregation: {\n aggregator: 'count'\n }\n }\n\n const isUncategorizedValue = typeof value === 'undefined'\n const isDateValue = value?.range\n // TODO: review dates reducers\n const queryLabel = isUncategorizedValue\n ? 'uncategorized'\n : isDateValue\n ? value.range?.start_date || value.range?.end_date\n : value?.value || value\n\n const queryValue = !isUncategorizedValue && (isDateValue || value?.value || value)\n\n reducersQuery[`${iterator}:${type}:${queryLabel}`] = {\n ...iteratorProps,\n filter: {\n operator: 'and',\n filters: [\n {\n property,\n filter: {\n operator: !isUncategorizedValue ? operators[type] : 'is_empty',\n ...(!isUncategorizedValue && {\n value: {\n type: 'exact',\n value: queryValue\n }\n })\n }\n }\n ]\n }\n }\n }\n }\n\n const reducerLabel = isBoardType ? 'board_columns' : `${type}_groups`\n loader = {\n type: 'reducer',\n reducers: {\n [reducerLabel]: {\n type: 'groups',\n groupBy,\n ...(collectionView?.query2?.filter && {\n filter: collectionView?.query2?.filter\n }),\n groupSortPreference: groups.map(group => group?.value),\n limit\n },\n ...reducersQuery\n },\n ...collectionView?.query2,\n searchQuery,\n userTimeZone,\n filter: { filters, operator: 'and' }\n }\n }\n\n return this.fetch<ReducerResponse<CollectionQueryResult>>({\n endpoint: 'queryCollection',\n body: {\n collection: { id: collectionId },\n collectionView: { id: collectionViewId },\n loader\n },\n fetchOption\n })\n }\n\n public async getUsers(userIds: string[], fetchOption?: FetchOption) {\n return this.fetch<RecordValues<User>>({\n endpoint: 'getRecordValues',\n body: { requests: userIds.map(id => ({ id, table: 'notion_user' })) },\n fetchOption\n })\n }\n\n public async getSpaces(spaceIds: string[], fetchOption?: FetchOption) {\n return this.fetch<RecordValues<Space>>({\n endpoint: 'getRecordValues',\n body: { requests: spaceIds.map(id => ({ id, table: 'space' })) },\n fetchOption\n })\n }\n\n public async getBlocks(blockIds: string[], fetchOption?: FetchOption) {\n return this.fetch<PageChunk>({\n endpoint: 'syncRecordValues',\n body: { requests: blockIds.map(blockId => ({ table: 'block', id: blockId, version: -1 })) },\n fetchOption\n })\n }\n\n public async syncRecords(records: { id: string; table: string }[], fetchOption?: FetchOption) {\n return this.fetch<PageChunk>({\n endpoint: 'syncRecordValues',\n body: { requests: records.map(({ id, table }) => ({ table, id, version: -1 })) },\n fetchOption\n })\n }\n\n public async getSignedFileUrls(urls: SignedUrlRequest[], fetchOption?: FetchOption) {\n return this.fetch<SignedUrlResponse>({\n endpoint: 'getSignedFileUrls',\n body: { urls },\n fetchOption\n })\n }\n\n public async search(params: SearchParams, fetchOption?: FetchOption) {\n const body: SearchParams = {\n type: 'BlocksInSpace',\n source: 'quick_find_filters',\n spaceId: parsePageId(params.spaceId),\n sort: { field: 'relevance' },\n limit: params.limit || 20,\n query: params.query,\n filters: {\n isDeletedOnly: false,\n navigableBlockContentOnly: false,\n excludeTemplates: true,\n requireEditPermissions: false,\n includePublicPagesWithoutExplicitAccess: true,\n createdBy: [],\n editedBy: [],\n lastEditedTime: {},\n createdTime: {},\n ...params.filters,\n ancestors: params.filters?.ancestors ? params.filters.ancestors.map(id => parsePageId(id)) : []\n }\n }\n return this.fetch<SearchResults>({\n endpoint: 'search',\n body,\n fetchOption\n })\n }\n\n /**\n * Backlink function which requires an authToken for NotionAPI client.\n * @param params object to pass black and space id\n * @param fetchOption Fetch options\n * @returns backlink list with recordmap\n */\n public async getBacklinks(params: BacklinkParams, fetchOption?: FetchOption) {\n const body: BacklinkParams = {\n block: {\n id: parsePageId(params.block.id),\n spaceId: parsePageId(params.block.spaceId)\n }\n }\n\n return this.fetch<BacklinkResults>({\n endpoint: 'getBacklinksForBlockInitial',\n body,\n fetchOption\n })\n }\n\n public async fetch<T>({\n endpoint,\n body,\n fetchOption,\n headers: clientHeaders\n }: {\n endpoint: string\n body: object\n fetchOption?: FetchOption\n headers?: HeadersInit\n }): Promise<T> {\n const headers: HeadersInit = {\n ...clientHeaders,\n ...fetchOption?.headers,\n 'Content-Type': 'application/json'\n }\n\n if (this._authToken) headers['cookie'] = `token_v2=${this._authToken}`\n if (this._activeUser) headers['x-notion-active-user-header'] = this._activeUser\n\n const url = `${this._apiBaseUrl}/${endpoint}`\n const requestInit = {\n method: 'post',\n body: JSON.stringify(body),\n headers,\n ...fetchOption\n }\n if (fetchOption?.timeout !== undefined) {\n const ctrl = new AbortController()\n setTimeout(() => ctrl.abort(), fetchOption.timeout)\n requestInit.signal = ctrl.signal\n }\n\n return fetch(url, requestInit).then(res => res.json())\n }\n}\n"],"names":["NotionAPI","apiBaseUrl","authToken","activeUser","userTimeZone","_0","__async","pageId","concurrency","fetchFullInfo","fetchCollections","signFileUrls","chunkLimit","chunkNumber","fetchOption","page","recordMap","uuidToId","_a","_b","_c","promises","pendingUserIDs","getPageContentUserIds","id","res","pendingBlocks","getPageContentBlockIds","rootBlock","pendingSpaces","newUsers","newBlocks","newSpaces","__spreadValues","contentBlockIds","_1","_2","collectionConcurrency","allCollectionInstances","blockId","block","collectionId","getBlockCollectionId","findAncestors","collectionViewId","resultMap","pMap","collectionInstance","collectionViewBlockId","collectionView","collectionData","__spreadProps","viewBlockData","err","allFileInstances","source","_f","_e","_d","signedUrls","i","file","signedUrl","parsedPageId","parsePageId","body","limit","searchQuery","loadContentCover","type","isBoardType","groupBy","filters","filterObj","loader","groups","_g","_h","iterators","operators","reducersQuery","group","property","value","iterator","iteratorProps","isUncategorizedValue","isDateValue","queryLabel","_i","_j","queryValue","reducerLabel","_k","_l","userIds","spaceIds","blockIds","records","table","urls","params","endpoint","clientHeaders","headers","url","requestInit","ctrl"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BO,MAAMA,GAAU;AAAA,EAMrB,YAAY;AAAA,IACV,YAAAC,IAAa;AAAA,IACb,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,EAAA,IAOb,IAAI;AACN,SAAK,cAAcH,GACnB,KAAK,aAAaC,GAClB,KAAK,cAAcC,GACnB,KAAK,gBAAgBC;AAAA,EACvB;AAAA,EAEa,QACXC,GAkB4B;AAAA,WAAAC,EAAA,4BAlB5BC,GACA;AAAA,MACE,aAAAC,IAAc;AAAA,MACd,eAAAC,IAAgB;AAAA,MAChB,kBAAAC,IAAmB;AAAA,MACnB,cAAAC,IAAe;AAAA,MACf,YAAAC,IAAa;AAAA,MACb,aAAAC,IAAc;AAAA,MACd,aAAAC;AAAA,IAAA,IASE,IACwB;;AAC5B,YAAMC,IAAO,MAAM,KAAK,WAAWR,GAAQ;AAAA,QACzC,YAAAK;AAAA,QACA,aAAAC;AAAA,QACA,aAAAC;AAAA,MAAA,CACD,GACKE,IAAYD,KAAA,gBAAAA,EAAM;AACxB,UAAI,EAACC,KAAA,QAAAA,EAAW,OAAO,OAAM,IAAI,MAAM,0BAA0BC,GAASV,CAAM,CAAC,GAAG;AAapF,UAVAS,EAAU,c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AAnD;AAAA,MAAA,CACD;AAAA,IACH;AAAA;AAAA,EAEa,MAAST,GAUP;AAAA,WAAAC,EAAA,4BAVO;AAAA,MACpB,UAAAgG;AAAA,MACA,MAAArC;AAAA,MACA,aAAAnD;AAAA,MACA,SAASyF;AAAA,IAAA,GAMI;AACb,YAAMC,IAAuBrD,EAAAlB,IAAA,IACxBsE,IACAzF,KAAA,gBAAAA,EAAa,UAFW;AAAA,QAG3B,gBAAgB;AAAA,MAAA;AAGlB,MAAI,KAAK,eAAY0F,EAAQ,SAAY,YAAY,KAAK,UAAU,KAChE,KAAK,gBAAaA,EAAQ,6BAA6B,IAAI,KAAK;AAEpE,YAAMC,IAAM,GAAG,KAAK,WAAW,IAAIH,CAAQ,IACrCI,IAAczE,EAAA;AAAA,QAClB,QAAQ;AAAA,QACR,MAAM,KAAK,UAAUgC,CAAI;AAAA,QACzB,SAAAuC;AAAA,SACG1F;AAEL,WAAIA,KAAA,gBAAAA,EAAa,aAAY,QAAW;AACtC,cAAM6F,IAAO,IAAI,gBAAA;AACjB,mBAAW,MAAMA,EAAK,MAAA,GAAS7F,EAAY,OAAO,GAClD4F,EAAY,SAASC,EAAK;AAAA,MAC5B;AAEA,aAAO,MAAMF,GAAKC,CAAW,EAAE,KAAK,CAAAjF,MAAOA,EAAI,MAAM;AAAA,IACvD;AAAA;AACF;"}
|
package/build/notion-api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { ExtendedRecordMap, PageChunk, BaseCollectionView, CollectionViewType, ReducerResponse, CollectionQueryResult, RecordValues, User, Space, SearchParams, SearchResults, BacklinkParams, BacklinkResults } from '@texonom/ntypes';
|
|
2
|
+
import { SignedUrlRequest, FetchOption, SignedUrlResponse } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Main Notion API client.
|
|
5
5
|
*/
|
package/build/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@texonom/nclient",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Robust TypeScript client for the unofficial Notion API.",
|
|
6
6
|
"repository": "texonom/notion-node",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"build"
|
|
15
15
|
],
|
|
16
16
|
"engines": {
|
|
17
|
-
"node": ">=22.
|
|
17
|
+
"node": ">=22.22.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"p-map": "^5.5.0",
|
|
21
|
-
"@texonom/
|
|
22
|
-
"@texonom/
|
|
21
|
+
"@texonom/nutils": "^1.5.1",
|
|
22
|
+
"@texonom/ntypes": "^1.5.1"
|
|
23
23
|
},
|
|
24
24
|
"standard-version": {
|
|
25
25
|
"skip": {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
|
-
"build": "tsc &&
|
|
32
|
-
"watch": "
|
|
31
|
+
"build": "tsc && vite build",
|
|
32
|
+
"watch": "vite build --watch --mode development",
|
|
33
33
|
"test": "vitest --run",
|
|
34
34
|
"prerelease": "standard-version --skip.changelog --prerelease",
|
|
35
35
|
"release": "standard-version --release-as",
|
package/readme.md
CHANGED
|
@@ -1,164 +1,100 @@
|
|
|
1
1
|
# nclient
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Robust TypeScript client for the unofficial Notion API, featuring a **search API** and **backlink** helpers.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@texonom/nclient) [](https://github.com/texonom/notion-node/actions/workflows/test.yml) [](https://prettier.io)
|
|
6
6
|
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- Works in Node.js, Deno and Cloudflare Workers
|
|
10
|
+
- Fetch pages, collections and search results
|
|
11
|
+
- Backlink API for discovering references
|
|
12
|
+
- Supports signed URLs for hosted assets
|
|
13
|
+
|
|
7
14
|
## Install
|
|
8
15
|
|
|
9
16
|
```bash
|
|
10
17
|
pnpm i @texonom/nclient
|
|
11
18
|
```
|
|
12
19
|
|
|
13
|
-
This package is compatible with server-side V8 contexts such as Node.js, Deno
|
|
20
|
+
This package is compatible with server-side V8 contexts such as Node.js, Deno and Cloudflare Workers.
|
|
14
21
|
|
|
15
22
|
## Usage
|
|
16
23
|
|
|
17
24
|
```ts
|
|
18
|
-
import { NotionAPI } from 'nclient'
|
|
25
|
+
import { NotionAPI } from '@texonom/nclient'
|
|
19
26
|
|
|
20
|
-
// you can optionally pass an authToken to access private
|
|
21
|
-
const api = new NotionAPI()
|
|
27
|
+
// you can optionally pass an authToken to access private pages
|
|
28
|
+
const api = new NotionAPI({ authToken: process.env.NOTION_TOKEN })
|
|
22
29
|
|
|
23
|
-
// fetch a page's content, including
|
|
30
|
+
// fetch a page's content, including collection data and signed urls
|
|
24
31
|
const page = await api.getPage('067dd719-a912-471e-a9a3-ac10710e7fdf')
|
|
25
|
-
|
|
26
|
-
// fetch the data for a specific collection instance
|
|
27
|
-
const collectionId = '2d8aec23-8281-4a94-9090-caaf823dd21a'
|
|
28
|
-
const collectionViewId = 'ab639a5a-853e-45e1-9ef7-133b486c0acf'
|
|
29
|
-
const collectionData = await api.getCollectionData(collectionId, collectionViewId)
|
|
30
32
|
```
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
```ts
|
|
35
|
+
// fetch user and workspace info
|
|
36
|
+
const users = await api.getUsers(['user-id'])
|
|
37
|
+
const spaces = await api.getSpaces(['space-id'])
|
|
38
|
+
```
|
|
33
39
|
|
|
34
|
-
Backlinks
|
|
40
|
+
### Backlinks
|
|
35
41
|
|
|
36
42
|
```ts
|
|
37
|
-
const backlinks = await api.getBacklinks({
|
|
38
|
-
block: { id: 'page-id', spaceId: 'space-id' }
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
// or simply pass the page id
|
|
42
|
-
const pageBacklinks = await api.getPageBacklinks('page-id')
|
|
43
|
+
const backlinks = await api.getBacklinks({ block: { id: 'page-id', spaceId: 'space-id' } })
|
|
43
44
|
```
|
|
44
45
|
|
|
45
|
-
### Fetch
|
|
46
|
+
### Fetch collection data
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- `collection`
|
|
51
|
-
- `collection_view`
|
|
48
|
+
```ts
|
|
49
|
+
const data = await api.getCollectionData('collection-id', 'collection-view-id')
|
|
50
|
+
```
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
### Search
|
|
54
53
|
|
|
55
|
-
```
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
54
|
+
```ts
|
|
55
|
+
const results = await api.search({
|
|
56
|
+
query: 'Texonom',
|
|
57
|
+
spaceId: '0bf522c6-2468-4c71-99e3-68f5a25d4225',
|
|
58
|
+
filters: {
|
|
59
|
+
ancestors: ['04089c8ae3534bf79512fc495944b321'],
|
|
60
|
+
isDeletedOnly: false,
|
|
61
|
+
excludeTemplates: true,
|
|
62
|
+
navigableBlockContentOnly: true,
|
|
63
|
+
requireEditPermissions: false
|
|
65
64
|
}
|
|
66
|
-
}
|
|
65
|
+
})
|
|
67
66
|
```
|
|
68
67
|
|
|
69
|
-
|
|
68
|
+
### Get blocks
|
|
70
69
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
- The next ids are of all the children pages inside the database
|
|
74
|
-
- After that comes all the children blocks of each page.
|
|
75
|
-
|
|
76
|
-
Please note that a block object can take many types: header, text, list, media, and almost any block supported by Notion. It can also be _a page_ or a _collection view_.
|
|
77
|
-
|
|
78
|
-
Example of a block object of type `text`:
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
{
|
|
82
|
-
role: 'reader',
|
|
83
|
-
value: {
|
|
84
|
-
id: '0377e1a4-dc3d-4daf-99dd-f54f986d932e',
|
|
85
|
-
version: 1,
|
|
86
|
-
type: 'text',
|
|
87
|
-
properties: { title: [Array] },
|
|
88
|
-
format: { copied_from_pointer: [Object] },
|
|
89
|
-
created_time: 1655961814278,
|
|
90
|
-
last_edited_time: 1655961814278,
|
|
91
|
-
parent_id: '08d5ba1e-03d2-4d4a-add7-a414f297ff8a',
|
|
92
|
-
parent_table: 'block',
|
|
93
|
-
alive: true,
|
|
94
|
-
copied_from: '526d2008-0d0b-46f8-9de1-7411a85bff7b',
|
|
95
|
-
created_by_table: 'notion_user',
|
|
96
|
-
created_by_id: '55b29a2b-a8fe-4a11-9f9d-ada341bd922b',
|
|
97
|
-
last_edited_by_table: 'notion_user',
|
|
98
|
-
last_edited_by_id: '55b29a2b-a8fe-4a11-9f9d-ada341bd922b',
|
|
99
|
-
space_id: '6b70425f-211e-4318-80c6-5d093df8f7eb'
|
|
100
|
-
}
|
|
101
|
-
}
|
|
70
|
+
```ts
|
|
71
|
+
const res = await api.getBlocks(['3f9e0d86-c643-4672-aa0c-78d63fa80598'])
|
|
102
72
|
```
|
|
103
73
|
|
|
104
|
-
|
|
74
|
+
### Signed file URLs
|
|
105
75
|
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
role: 'reader',
|
|
109
|
-
value: {
|
|
110
|
-
id: 'af961803-cd0c-470e-bd27-1d025baa2f95',
|
|
111
|
-
version: 31,
|
|
112
|
-
type: 'page',
|
|
113
|
-
properties: { '==~K': [Array], 'BN]P': [Array], title: [Array] },
|
|
114
|
-
content: [
|
|
115
|
-
'8cbf7053-da37-4d69-8cde-89343baf3623',
|
|
116
|
-
'0fc1712e-852c-4307-b72b-094dadaa86ba'
|
|
117
|
-
],
|
|
118
|
-
created_time: 1655962200000,
|
|
119
|
-
last_edited_time: 1655979420000,
|
|
120
|
-
parent_id: '175482e5-870d-4da8-980c-ead469427316',
|
|
121
|
-
parent_table: 'collection',
|
|
122
|
-
alive: true,
|
|
123
|
-
created_by_table: 'notion_user',
|
|
124
|
-
created_by_id: '55b29a2b-a8fe-4a11-9f9d-ada341bd922b',
|
|
125
|
-
last_edited_by_table: 'notion_user',
|
|
126
|
-
last_edited_by_id: '55b29a2b-a8fe-4a11-9f9d-ada341bd922b',
|
|
127
|
-
space_id: '6b70425f-211e-4318-80c6-5d093df8f7eb'
|
|
128
|
-
}
|
|
129
|
-
}
|
|
76
|
+
```ts
|
|
77
|
+
const signed = await api.getSignedFileUrls(['https://prod-files.example/notion.png'])
|
|
130
78
|
```
|
|
131
79
|
|
|
132
|
-
|
|
80
|
+
See the [full docs](https://github.com/texonom/notion-node) for more examples.
|
|
133
81
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
value: {
|
|
138
|
-
id: 'cc368b47-772a-4a1a-a36e-1f52c507d20d',
|
|
139
|
-
version: 5,
|
|
140
|
-
type: 'collection_view',
|
|
141
|
-
view_ids: [
|
|
142
|
-
'028f6968-2a6c-46da-bf43-cb44e6d91765',
|
|
143
|
-
'77f32047-52dd-422e-93fa-813438087e57'
|
|
144
|
-
],
|
|
145
|
-
collection_id: '175482e5-870d-4da8-980c-ead469427316',
|
|
146
|
-
format: { collection_pointer: [Object], copied_from_pointer: [Object] },
|
|
147
|
-
created_time: 1655961814276,
|
|
148
|
-
last_edited_time: 1656075900000,
|
|
149
|
-
parent_id: '97dbe6d5-aea3-4e03-b571-91810cf975d4',
|
|
150
|
-
parent_table: 'block',
|
|
151
|
-
alive: true,
|
|
152
|
-
copied_from: '3e3073e9-7aee-481c-b831-765e112ec7b5',
|
|
153
|
-
created_by_table: 'notion_user',
|
|
154
|
-
created_by_id: '55b29a2b-a8fe-4a11-9f9d-ada341bd922b',
|
|
155
|
-
last_edited_by_table: 'notion_user',
|
|
156
|
-
last_edited_by_id: '55b29a2b-a8fe-4a11-9f9d-ada341bd922b',
|
|
157
|
-
space_id: '6b70425f-211e-4318-80c6-5d093df8f7eb'
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
```
|
|
82
|
+
## API
|
|
83
|
+
|
|
84
|
+
The `NotionAPI` class exposes the following methods:
|
|
161
85
|
|
|
162
|
-
|
|
86
|
+
- `getPage(id, opts?)`
|
|
87
|
+
- `fetchCollections(blockIds, recordMap, pageId?, opts?)`
|
|
88
|
+
- `addSignedUrls({ recordMap, contentBlockIds })`
|
|
89
|
+
- `getPageRaw(id, opts?)`
|
|
90
|
+
- `getCollectionData(collectionId, viewId, opts?)`
|
|
91
|
+
- `getUsers(ids)`
|
|
92
|
+
- `getSpaces(ids)`
|
|
93
|
+
- `getBlocks(ids)`
|
|
94
|
+
- `syncRecords(records)`
|
|
95
|
+
- `getSignedFileUrls(urls)`
|
|
96
|
+
- `search(params)`
|
|
97
|
+
- `getBacklinks(params)`
|
|
163
98
|
|
|
164
|
-
|
|
99
|
+
Types such as `SignedUrlRequest` and `FetchOption` are also exported.
|
|
100
|
+
\n## Difference from the official API\n\nThis client mirrors the format of the unofficial API and exposes additional helpers like `search` and `getBacklinks`.
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Seonglae Cho
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/build/.tsbuildinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"fileNames":["../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../ntypes/build/index.d.ts","../../../node_modules/.pnpm/is-url-superb@6.1.0/node_modules/is-url-superb/index.d.ts","../../nutils/build/index.d.ts","../../../node_modules/.pnpm/p-map@5.5.0/node_modules/p-map/index.d.ts","../src/types.ts","../src/notion-api.ts","../src/index.ts","../../../node_modules/.pnpm/@vitest+pretty-format@3.2.2/node_modules/@vitest/pretty-format/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+utils@3.2.2/node_modules/@vitest/utils/dist/types.d.ts","../../../node_modules/.pnpm/@vitest+utils@3.2.2/node_modules/@vitest/utils/dist/helpers.d.ts","../../../node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/index-8b61d5bc.d.ts","../../../node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.d.ts","../../../node_modules/.pnpm/@vitest+utils@3.2.2/node_modules/@vitest/utils/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+runner@3.2.2/node_modules/@vitest/runner/dist/tasks.d-cksck4of.d.ts","../../../node_modules/.pnpm/@vitest+utils@3.2.2/node_modules/@vitest/utils/dist/types.d-bcelap-c.d.ts","../../../node_modules/.pnpm/@vitest+utils@3.2.2/node_modules/@vitest/utils/dist/diff.d.ts","../../../node_modules/.pnpm/@vitest+runner@3.2.2/node_modules/@vitest/runner/dist/types.d.ts","../../../node_modules/.pnpm/@vitest+utils@3.2.2/node_modules/@vitest/utils/dist/error.d.ts","../../../node_modules/.pnpm/@vitest+runner@3.2.2/node_modules/@vitest/runner/dist/index.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/optional-types.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/dist/chunks/environment.d.cl3nlxbe.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.15.30/node_modules/@types/node/index.d.ts","../../../node_modules/.pnpm/@types+estree@1.0.7/node_modules/@types/estree/index.d.ts","../../../node_modules/.pnpm/rollup@4.40.1/node_modules/rollup/dist/rollup.d.ts","../../../node_modules/.pnpm/rollup@4.40.1/node_modules/rollup/dist/parseast.d.ts","../../../node_modules/.pnpm/vite@6.3.5_@types+node@22.15.30_tsx@4.19.4/node_modules/vite/types/hmrpayload.d.ts","../../../node_modules/.pnpm/vite@6.3.5_@types+node@22.15.30_tsx@4.19.4/node_modules/vite/types/customevent.d.ts","../../../node_modules/.pnpm/vite@6.3.5_@types+node@22.15.30_tsx@4.19.4/node_modules/vite/types/hot.d.ts","../../../node_modules/.pnpm/vite@6.3.5_@types+node@22.15.30_tsx@4.19.4/node_modules/vite/dist/node/modulerunnertransport.d-dj_me5sf.d.ts","../../../node_modules/.pnpm/vite@6.3.5_@types+node@22.15.30_tsx@4.19.4/node_modules/vite/dist/node/module-runner.d.ts","../../../node_modules/.pnpm/esbuild@0.25.3/node_modules/esbuild/lib/main.d.ts","../../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/previous-map.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/input.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/css-syntax-error.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/declaration.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/root.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/warning.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/lazy-result.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/no-work-result.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/processor.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/result.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/document.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/rule.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/node.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/comment.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/container.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/at-rule.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/list.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/postcss.d.ts","../../../node_modules/.pnpm/postcss@8.5.3/node_modules/postcss/lib/postcss.d.mts","../../../node_modules/.pnpm/vite@6.3.5_@types+node@22.15.30_tsx@4.19.4/node_modules/vite/types/internal/lightningcssoptions.d.ts","../../../node_modules/.pnpm/vite@6.3.5_@types+node@22.15.30_tsx@4.19.4/node_modules/vite/types/internal/csspreprocessoroptions.d.ts","../../../node_modules/.pnpm/vite@6.3.5_@types+node@22.15.30_tsx@4.19.4/node_modules/vite/types/importglob.d.ts","../../../node_modules/.pnpm/vite@6.3.5_@types+node@22.15.30_tsx@4.19.4/node_modules/vite/types/metadata.d.ts","../../../node_modules/.pnpm/vite@6.3.5_@types+node@22.15.30_tsx@4.19.4/node_modules/vite/dist/node/index.d.ts","../../../node_modules/.pnpm/@vitest+mocker@3.2.2_vite@6_44ff04a085fba111f5eb95ceb03a5876/node_modules/@vitest/mocker/dist/registry.d-d765pazg.d.ts","../../../node_modules/.pnpm/@vitest+mocker@3.2.2_vite@6_44ff04a085fba111f5eb95ceb03a5876/node_modules/@vitest/mocker/dist/types.d-d_arzrdy.d.ts","../../../node_modules/.pnpm/@vitest+mocker@3.2.2_vite@6_44ff04a085fba111f5eb95ceb03a5876/node_modules/@vitest/mocker/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+utils@3.2.2/node_modules/@vitest/utils/dist/source-map.d.ts","../../../node_modules/.pnpm/vite-node@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vite-node/dist/trace-mapping.d-dlvdeqop.d.ts","../../../node_modules/.pnpm/vite-node@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vite-node/dist/index.d-dgmxd2u7.d.ts","../../../node_modules/.pnpm/vite-node@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vite-node/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@3.2.2/node_modules/@vitest/snapshot/dist/environment.d-dhdq1csl.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@3.2.2/node_modules/@vitest/snapshot/dist/rawsnapshot.d-lfsmjfud.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@3.2.2/node_modules/@vitest/snapshot/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@3.2.2/node_modules/@vitest/snapshot/dist/environment.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/dist/chunks/config.d.d2roskhv.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/dist/chunks/worker.d.tqu2ejqy.d.ts","../../../node_modules/.pnpm/@types+deep-eql@4.0.2/node_modules/@types/deep-eql/index.d.ts","../../../node_modules/.pnpm/@types+chai@5.2.2/node_modules/@types/chai/index.d.ts","../../../node_modules/.pnpm/@vitest+runner@3.2.2/node_modules/@vitest/runner/dist/utils.d.ts","../../../node_modules/.pnpm/tinybench@2.9.0/node_modules/tinybench/dist/index.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/dist/chunks/benchmark.d.bwvbvtda.d.ts","../../../node_modules/.pnpm/vite-node@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vite-node/dist/client.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/dist/chunks/coverage.d.s9rmnxie.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@3.2.2/node_modules/@vitest/snapshot/dist/manager.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/dist/chunks/reporters.d.dl9pg5db.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/dist/chunks/worker.d.dvqk5vmu.d.ts","../../../node_modules/.pnpm/@vitest+spy@3.2.2/node_modules/@vitest/spy/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+expect@3.2.2/node_modules/@vitest/expect/dist/index.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/dist/chunks/global.d.mamajcmj.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/dist/chunks/vite.d.ctvoceqc.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/dist/chunks/mocker.d.be_2ls6u.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/dist/chunks/suite.d.fvehnv49.d.ts","../../../node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/utils.d.ts","../../../node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/overloads.d.ts","../../../node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/branding.d.ts","../../../node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/messages.d.ts","../../../node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/index.d.ts","../../../node_modules/.pnpm/vitest@3.2.2_@types+node@22.15.30_tsx@4.19.4/node_modules/vitest/dist/index.d.ts","../../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.d.ts","../src/notion-api.test.ts"],"fileIdsList":[[106,149,247],[106,149],[106,146,149],[106,148,149],[149],[106,149,154,184],[106,149,150,155,161,162,169,181,192],[106,149,150,151,161,169],[101,102,103,106,149],[106,149,152,193],[106,149,153,154,162,170],[106,149,154,181,189],[106,149,155,157,161,169],[106,148,149,156],[106,149,157,158],[106,149,159,161],[106,148,149,161],[106,149,161,162,163,181,192],[106,149,161,162,163,176,181,184],[106,144,149],[106,144,149,157,161,164,169,181,192],[106,149,161,162,164,165,169,181,189,192],[106,149,164,166,181,189,192],[104,105,106,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198],[106,149,161,167],[106,149,168,192],[106,149,157,161,169,181],[106,149,170],[106,149,171],[106,148,149,172],[106,146,147,148,149,150,151,152,153,154,155,156,157,158,159,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198],[106,149,174],[106,149,175],[106,149,161,176,177],[106,149,176,178,193,195],[106,149,161,181,182,184],[106,149,183,184],[106,149,181,182],[106,149,184],[106,149,185],[106,146,149,181],[106,149,161,187,188],[106,149,187,188],[106,149,154,169,181,189],[106,149,190],[106,149,169,191],[106,149,164,175,192],[106,149,154,193],[106,149,181,194],[106,149,168,195],[106,149,196],[106,149,161,163,172,181,184,192,195,197],[106,149,181,198],[91,92,95,106,149,257],[106,149,234,235],[92,93,95,96,97,106,149],[92,106,149],[92,93,95,106,149],[92,93,106,149],[106,149,241],[87,106,149,241,242],[87,106,149,241],[87,94,106,149],[88,106,149],[87,88,89,91,106,149],[87,106,149],[106,149,192,199],[106,149,263,264],[106,149,263,264,265,266],[106,149,263,265],[106,149,263],[106,149,224],[106,149,222,224],[106,149,213,221,222,223,225],[106,149,211],[106,149,214,219,224,227],[106,149,210,227],[106,149,214,215,218,219,220,227],[106,149,214,215,216,218,219,227],[106,149,211,212,213,214,215,219,220,221,223,224,225,227],[106,149,227],[106,149,209,211,212,213,214,215,216,218,219,220,221,222,223,224,225,226],[106,149,209,227],[106,149,214,216,217,219,220,227],[106,149,218,227],[106,149,219,220,224,227],[106,149,212,222],[106,149,201,232,233],[106,149,200,201],[90,106,149],[106,116,120,149,192],[106,116,149,181,192],[106,111,149],[106,113,116,149,189,192],[106,149,169,189],[106,149,199],[106,111,149,199],[106,113,116,149,169,192],[106,108,109,112,115,149,161,181,192],[106,116,123,149],[106,108,114,149],[106,116,137,138,149],[106,112,116,149,184,192,199],[106,137,149,199],[106,110,111,149,199],[106,116,149],[106,110,111,112,113,114,115,116,117,118,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,138,139,140,141,142,143,149],[106,116,131,149],[106,116,123,124,149],[106,114,116,124,125,149],[106,115,149],[106,108,111,116,149],[106,116,120,124,125,149],[106,120,149],[106,114,116,119,149,192],[106,108,113,116,123,149],[106,149,181],[106,111,116,137,149,197,199],[106,149,238,239],[106,149,238],[106,149,161,162,164,165,166,169,181,189,192,198,199,201,202,203,204,206,207,208,228,229,230,231,232,233],[106,149,203,204,205,206],[106,149,203],[106,149,204],[106,149,201,233],[98,106,149,249,250,259],[87,95,98,106,149,243,244,259],[106,149,252],[99,106,149],[87,98,100,106,149,243,251,258,259],[106,149,236],[87,92,95,98,100,106,149,152,162,181,233,236,237,240,243,245,246,248,251,253,254,259,260],[98,106,149,249,250,251,259],[106,149,233,255,260],[106,149,197,246],[98,100,106,149,240,243,245,259],[87,92,95,98,99,100,106,149,152,162,181,197,233,236,237,240,243,244,245,246,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,267],[84,85,106,149],[85,106,149,268,269],[80,82,83,84,106,149],[80,106,149],[80,81,106,149]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"042bd95c78f3a2be4fa69bff4cc2921d64ee9bf19dcbf4a797fa80a057b3b207",{"version":"a87e5902fd92d16a80e0020ac03d6477bc2e7a6f5b0407a73aff6b7aa9e01d55","impliedFormat":99},"21a44ac96c8100b4a7094d990c022bc5c6397c460f4ac635606c94ed0e63e92f",{"version":"177efa90a97917618cef3f68b04ee95c393fceea045dfc0aef2820d5aaa9e8f0","impliedFormat":99},{"version":"910e4e5617ce778747d66ff23cf052fd422c82cb02269ee09e81759dfdb3811a","signature":"2873b86f2d1f2ce766ad7d4af180721389e7e1c24f3cf3b91b3b53528205312a"},{"version":"1e13c035bd2679717bb6973198ed7bb8e6238c13c78fd4d8e3bbde8d76fcc25e","signature":"4c1fbb8a28565d721fbfab640466293c7051b8d6e4eef121022818a2144f9562"},{"version":"8dd2426de9a517e1ce122569401b458a8b29f729a454bd5690a9fcddade3a862","signature":"02afaafe359dbbd897790dbf7ef8ed849d85c8b95f4b229d63f432cae75bd60e"},{"version":"5c54a34e3d91727f7ae840bfe4d5d1c9a2f93c54cb7b6063d06ee4a6c3322656","impliedFormat":99},{"version":"db4da53b03596668cf6cc9484834e5de3833b9e7e64620cf08399fe069cd398d","impliedFormat":99},{"version":"ac7c28f153820c10850457994db1462d8c8e462f253b828ad942a979f726f2f9","impliedFormat":99},{"version":"f9b028d3c3891dd817e24d53102132b8f696269309605e6ed4f0db2c113bbd82","impliedFormat":99},{"version":"fb7c8d90e52e2884509166f96f3d591020c7b7977ab473b746954b0c8d100960","impliedFormat":99},{"version":"0bff51d6ed0c9093f6955b9d8258ce152ddb273359d50a897d8baabcb34de2c4","impliedFormat":99},{"version":"45cec9a1ba6549060552eead8959d47226048e0b71c7d0702ae58b7e16a28912","impliedFormat":99},{"version":"ef13c73d6157a32933c612d476c1524dd674cf5b9a88571d7d6a0d147544d529","impliedFormat":99},{"version":"13918e2b81c4288695f9b1f3dcc2468caf0f848d5c1f3dc00071c619d34ff63a","impliedFormat":99},{"version":"6907b09850f86610e7a528348c15484c1e1c09a18a9c1e98861399dfe4b18b46","impliedFormat":99},{"version":"12deea8eaa7a4fc1a2908e67da99831e5c5a6b46ad4f4f948fd4759314ea2b80","impliedFormat":99},{"version":"f0a8b376568a18f9a4976ecb0855187672b16b96c4df1c183a7e52dc1b5d98e8","impliedFormat":99},{"version":"8124828a11be7db984fcdab052fd4ff756b18edcfa8d71118b55388176210923","impliedFormat":99},{"version":"092944a8c05f9b96579161e88c6f211d5304a76bd2c47f8d4c30053269146bc8","impliedFormat":99},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"d802f0e6b5188646d307f070d83512e8eb94651858de8a82d1e47f60fb6da4e2","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"a4ef5ccfd69b5bc2a2c29896aa07daaff7c5924a12e70cb3d9819145c06897db","affectsGlobalScope":true,"impliedFormat":1},{"version":"a38efe83ff77c34e0f418a806a01ca3910c02ee7d64212a59d59bca6c2c38fa1","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"3fe4022ba1e738034e38ad9afacbf0f1f16b458ed516326f5bf9e4a31e9be1dc","impliedFormat":1},{"version":"a957197054b074bcdf5555d26286e8461680c7c878040d0f4e2d5509a7524944","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"e9b97d69510658d2f4199b7d384326b7c4053b9e6645f5c19e1c2a54ede427fc","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"f478f6f5902dc144c0d6d7bdc919c5177cac4d17a8ca8653c2daf6d7dc94317f","affectsGlobalScope":true,"impliedFormat":1},{"version":"19d5f8d3930e9f99aa2c36258bf95abbe5adf7e889e6181872d1cdba7c9a7dd5","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"71450bbc2d82821d24ca05699a533e72758964e9852062c53b30f31c36978ab8","affectsGlobalScope":true,"impliedFormat":1},{"version":"88bc59b32d0d5b4e5d9632ac38edea23454057e643684c3c0b94511296f2998c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a0a1dda070290b92da5a50113b73ecc4dd6bcbffad66e3c86503d483eafbadcf","impliedFormat":1},{"version":"59dcad36c4549175a25998f6a8b33c1df8e18df9c12ebad1dfb25af13fd4b1ce","impliedFormat":1},{"version":"206a70e72af3e24688397b81304358526ce70d020e4c2606c4acfd1fa1e81fb2","impliedFormat":1},{"version":"017caf5d2a8ef581cf94f678af6ce7415e06956317946315560f1487b9a56167","impliedFormat":1},{"version":"528b62e4272e3ddfb50e8eed9e359dedea0a4d171c3eb8f337f4892aac37b24b","impliedFormat":1},{"version":"d71535813e39c23baa113bc4a29a0e187b87d1105ccc8c5a6ebaca38d9a9bff2","impliedFormat":1},{"version":"4a1c5b43d4d408cb0df0a6cc82ca7be314553d37e432fc1fd801bae1a9ab2cb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"f72bc8fe16da67e4e3268599295797b202b95e54bd215a03f97e925dd1502a36","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"915e18c559321c0afaa8d34674d3eb77e1ded12c3e85bf2a9891ec48b07a1ca5","affectsGlobalScope":true,"impliedFormat":1},{"version":"636302a00dfd1f9fe6e8e91e4e9350c6518dcc8d51a474e4fc3a9ba07135100b","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"e1ce1d622f1e561f6cdf246372ead3bbc07ce0342024d0e9c7caf3136f712698","impliedFormat":1},{"version":"199c8269497136f3a0f4da1d1d90ab033f899f070e0dd801946f2a241c8abba2","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"27e4532aaaa1665d0dd19023321e4dc12a35a741d6b8e1ca3517fcc2544e0efe","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"8c2ad42d5d1a2e8e6112625767f8794d9537f1247907378543106f7ba6c7df90","affectsGlobalScope":true,"impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"98ffdf93dfdd206516971d28e3e473f417a5cfd41172e46b4ce45008f640588e","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"a7692a54334fd08960cd0c610ff509c2caa93998e0dcefa54021489bcc67c22d","affectsGlobalScope":true,"impliedFormat":1},{"version":"74736930d108365d7bbe740c7154706ccfb1b2a3855a897963ab3e5c07ecbf19","impliedFormat":1},{"version":"3a051941721a7f905544732b0eb819c8d88333a96576b13af08b82c4f17581e4","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"c6ab0dd29bf74b71a54ff2bbce509eb8ae3c4294d57cc54940f443c01cd1baae","affectsGlobalScope":true,"impliedFormat":1},{"version":"3797dd6f4ea3dc15f356f8cdd3128bfa18122213b38a80d6c1f05d8e13cbdad8","impliedFormat":1},{"version":"ad90122e1cb599b3bc06a11710eb5489101be678f2920f2322b0ac3e195af78d","impliedFormat":1},{"version":"e2b48abff5a8adc6bb1cd13a702b9ef05e6045a98e7cfa95a8779b53b6d0e69d","impliedFormat":1},{"version":"a02d26c056491b1ddfa53a671ad60ce852969b369f0e71993dbac8ddcf0d038b","affectsGlobalScope":true,"impliedFormat":1},{"version":"a660aa95476042d3fdcc1343cf6bb8fdf24772d31712b1db321c5a4dcc325434","impliedFormat":1},{"version":"a7ca8df4f2931bef2aa4118078584d84a0b16539598eaadf7dce9104dfaa381c","impliedFormat":1},{"version":"11443a1dcfaaa404c68d53368b5b818712b95dd19f188cab1669c39bee8b84b3","impliedFormat":1},{"version":"36977c14a7f7bfc8c0426ae4343875689949fb699f3f84ecbe5b300ebf9a2c55","impliedFormat":1},{"version":"035d0934d304483f07148427a5bd5b98ac265dae914a6b49749fe23fbd893ec7","impliedFormat":99},{"version":"e2ed5b81cbed3a511b21a18ab2539e79ac1f4bc1d1d28f8d35d8104caa3b429f","impliedFormat":99},{"version":"b8caba62c0d2ef625f31cbb4fde09d851251af2551086ccf068611b0a69efd81","affectsGlobalScope":true,"impliedFormat":1},{"version":"402e5c534fb2b85fa771170595db3ac0dd532112c8fa44fc23f233bc6967488b","impliedFormat":1},{"version":"8885cf05f3e2abf117590bbb951dcf6359e3e5ac462af1c901cfd24c6a6472e2","impliedFormat":1},{"version":"33f3718dababfc26dfd9832c150149ea4e934f255130f8c118a59ae69e5ed441","impliedFormat":1},{"version":"e61df3640a38d535fd4bc9f4a53aef17c296b58dc4b6394fd576b808dd2fe5e6","impliedFormat":1},{"version":"459920181700cec8cbdf2a5faca127f3f17fd8dd9d9e577ed3f5f3af5d12a2e4","impliedFormat":1},{"version":"4719c209b9c00b579553859407a7e5dcfaa1c472994bd62aa5dd3cc0757eb077","impliedFormat":1},{"version":"7ec359bbc29b69d4063fe7dad0baaf35f1856f914db16b3f4f6e3e1bca4099fa","impliedFormat":1},{"version":"70790a7f0040993ca66ab8a07a059a0f8256e7bb57d968ae945f696cbff4ac7a","impliedFormat":1},{"version":"d1b9a81e99a0050ca7f2d98d7eedc6cda768f0eb9fa90b602e7107433e64c04c","impliedFormat":1},{"version":"a022503e75d6953d0e82c2c564508a5c7f8556fad5d7f971372d2d40479e4034","impliedFormat":1},{"version":"b215c4f0096f108020f666ffcc1f072c81e9f2f95464e894a5d5f34c5ea2a8b1","impliedFormat":1},{"version":"644491cde678bd462bb922c1d0cfab8f17d626b195ccb7f008612dc31f445d2d","impliedFormat":1},{"version":"dfe54dab1fa4961a6bcfba68c4ca955f8b5bbeb5f2ab3c915aa7adaa2eabc03a","impliedFormat":1},{"version":"1bb61aa2f08ab4506d41dbe16c5f3f5010f014bbf46fa3d715c0cbe3b00f4e1c","impliedFormat":1},{"version":"47865c5e695a382a916b1eedda1b6523145426e48a2eae4647e96b3b5e52024f","impliedFormat":1},{"version":"e42820cd611b15910c204cd133f692dcd602532b39317d4f2a19389b27e6f03d","impliedFormat":1},{"version":"331b8f71bfae1df25d564f5ea9ee65a0d847c4a94baa45925b6f38c55c7039bf","impliedFormat":1},{"version":"2a771d907aebf9391ac1f50e4ad37952943515eeea0dcc7e78aa08f508294668","impliedFormat":1},{"version":"0146fd6262c3fd3da51cb0254bb6b9a4e42931eb2f56329edd4c199cb9aaf804","impliedFormat":1},{"version":"183f480885db5caa5a8acb833c2be04f98056bdcc5fb29e969ff86e07efe57ab","impliedFormat":99},{"version":"4ec16d7a4e366c06a4573d299e15fe6207fc080f41beac5da06f4af33ea9761e","impliedFormat":1},{"version":"7870becb94cbc11d2d01b77c4422589adcba4d8e59f726246d40cd0d129784d8","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f698624bbbb060ece7c0e51b7236520ebada74b747d7523c7df376453ed6fea","impliedFormat":1},{"version":"f70b8328a15ca1d10b1436b691e134a49bc30dcf3183a69bfaa7ba77e1b78ecd","impliedFormat":1},{"version":"ff3660e2664e6096196280deb4e176633b1bb1e58a7dcc9b021ec0e913a6f96f","impliedFormat":99},{"version":"b34b5f6b506abb206b1ea73c6a332b9ee9c8c98be0f6d17cdbda9430ecc1efab","impliedFormat":99},{"version":"75d4c746c3d16af0df61e7b0afe9606475a23335d9f34fcc525d388c21e9058b","impliedFormat":99},{"version":"fa959bf357232201c32566f45d97e70538c75a093c940af594865d12f31d4912","impliedFormat":99},{"version":"d2c52abd76259fc39a30dfae70a2e5ce77fd23144457a7ff1b64b03de6e3aec7","impliedFormat":99},{"version":"e6233e1c976265e85aa8ad76c3881febe6264cb06ae3136f0257e1eab4a6cc5a","impliedFormat":99},{"version":"f73e2335e568014e279927321770da6fe26facd4ac96cdc22a56687f1ecbb58e","impliedFormat":99},{"version":"317878f156f976d487e21fd1d58ad0461ee0a09185d5b0a43eedf2a56eb7e4ea","impliedFormat":99},{"version":"324ac98294dab54fbd580c7d0e707d94506d7b2c3d5efe981a8495f02cf9ad96","impliedFormat":99},{"version":"9ec72eb493ff209b470467e24264116b6a8616484bca438091433a545dfba17e","impliedFormat":99},{"version":"83ab446a053419dfd8e40526abf297c4d9d11f175b05512de1915a8ab7697b67","impliedFormat":99},{"version":"49747416f08b3ba50500a215e7a55d75268b84e31e896a40313c8053e8dec908","impliedFormat":99},{"version":"81e634f1c5e1ca309e7e3dc69e2732eea932ef07b8b34517d452e5a3e9a36fa3","impliedFormat":99},{"version":"4e238ace06d3b49ea02f6a1170259e6a803154b03bfd069e5e83d8d0053fbae7","impliedFormat":99},{"version":"427fe2004642504828c1476d0af4270e6ad4db6de78c0b5da3e4c5ca95052a99","impliedFormat":1},{"version":"c8905dbea83f3220676a669366cd8c1acef56af4d9d72a8b2241b1d044bb4302","affectsGlobalScope":true,"impliedFormat":99},{"version":"891694d3694abd66f0b8872997b85fd8e52bc51632ce0f8128c96962b443189f","impliedFormat":99},{"version":"69bf2422313487956e4dacf049f30cb91b34968912058d244cb19e4baa24da97","impliedFormat":99},{"version":"971a2c327ff166c770c5fb35699575ba2d13bba1f6d2757309c9be4b30036c8e","impliedFormat":99},{"version":"4f45e8effab83434a78d17123b01124259fbd1e335732135c213955d85222234","impliedFormat":99},{"version":"7bd51996fb7717941cbe094b05adc0d80b9503b350a77b789bbb0fc786f28053","impliedFormat":99},{"version":"b62006bbc815fe8190c7aee262aad6bff993e3f9ade70d7057dfceab6de79d2f","impliedFormat":99},{"version":"d6b4dfab234307239ca8f1329870f6c10341447fc0581388f8d99565e550ffe9","impliedFormat":99},{"version":"1f7e5e81b810bae68833b9f78c276ee929dbc7e9c4c2791bc70a257fbb9f6e78","impliedFormat":99},{"version":"04471dc55f802c29791cc75edda8c4dd2a121f71c2401059da61eff83099e8ab","impliedFormat":99},{"version":"962c383ff23b17cdd39586e17bb7c3f01ecf0403c0e8d6fbf2f1e69d972c0fc5","affectsGlobalScope":true,"impliedFormat":99},{"version":"e58c0b5226aff07b63be6ac6e1bec9d55bc3d2bda3b11b9b68cccea8c24ae839","affectsGlobalScope":true,"impliedFormat":99},{"version":"4b2bcddb85fe211e040d25623b4615abf53f11a43c2c59539a480f0ab95cdd3c","impliedFormat":99},{"version":"5a88655bf852c8cc007d6bc874ab61d1d63fba97063020458177173c454e9b4a","impliedFormat":99},{"version":"7e4dfae2da12ec71ffd9f55f4641a6e05610ce0d6784838659490e259e4eb13c","impliedFormat":99},{"version":"c30a41267fc04c6518b17e55dcb2b810f267af4314b0b6d7df1c33a76ce1b330","impliedFormat":1},{"version":"72422d0bac4076912385d0c10911b82e4694fc106e2d70added091f88f0824ba","impliedFormat":1},{"version":"da251b82c25bee1d93f9fd80c5a61d945da4f708ca21285541d7aff83ecb8200","impliedFormat":1},{"version":"4c8ca51077f382498f47074cf304d654aba5d362416d4f809dfdd5d4f6b3aaca","impliedFormat":1},{"version":"c6bddf16578495abc8b5546850b047f30c4b5a2a2b7fecefc0e11a44a6e91399","impliedFormat":1},{"version":"c6a9615d13b98f555a54aaa7850bc3d061ffbfe6e14ad9356de3b44294510344","impliedFormat":99},{"version":"f634e4c7d5cdba8e092d98098033b311c8ef304038d815c63ffdb9f78f3f7bb7","impliedFormat":1},{"version":"5669440b1e058d7e71ab6bd1e7817c976c12b9b8b36254621c75d5c0b4273f54","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"}],"root":[[84,86],270],"options":{"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":99,"noEmitOnError":true,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","sourceMap":true,"strict":false,"target":2,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[248,1],[247,2],[200,2],[146,3],[147,3],[148,4],[106,5],[149,6],[150,7],[151,8],[101,2],[104,9],[102,2],[103,2],[152,10],[153,11],[154,12],[155,13],[156,14],[157,15],[158,15],[160,2],[159,16],[161,17],[162,18],[163,19],[145,20],[105,2],[164,21],[165,22],[166,23],[199,24],[167,25],[168,26],[169,27],[170,28],[171,29],[172,30],[173,31],[174,32],[175,33],[176,34],[177,34],[178,35],[179,2],[180,2],[181,36],[183,37],[182,38],[184,39],[185,40],[186,41],[187,42],[188,43],[189,44],[190,45],[191,46],[192,47],[193,48],[194,49],[195,50],[196,51],[197,52],[198,53],[258,54],[236,55],[234,2],[235,2],[87,2],[98,56],[93,57],[96,58],[249,59],[241,2],[244,60],[243,61],[254,61],[242,62],[257,2],[95,63],[97,63],[89,64],[92,65],[237,64],[94,66],[88,2],[107,2],[269,67],[208,2],[265,68],[267,69],[266,70],[264,71],[263,2],[81,2],[83,2],[225,72],[223,73],[224,74],[212,75],[213,73],[220,76],[211,77],[216,78],[226,2],[217,79],[222,80],[228,81],[227,82],[210,83],[218,84],[219,85],[214,86],[221,72],[215,87],[202,88],[201,89],[209,2],[250,2],[90,2],[91,90],[78,2],[79,2],[13,2],[15,2],[14,2],[2,2],[16,2],[17,2],[18,2],[19,2],[20,2],[21,2],[22,2],[23,2],[3,2],[24,2],[25,2],[4,2],[26,2],[30,2],[27,2],[28,2],[29,2],[31,2],[32,2],[33,2],[5,2],[34,2],[35,2],[36,2],[37,2],[6,2],[41,2],[38,2],[39,2],[40,2],[42,2],[7,2],[43,2],[48,2],[49,2],[44,2],[45,2],[46,2],[47,2],[8,2],[53,2],[50,2],[51,2],[52,2],[54,2],[9,2],[55,2],[56,2],[57,2],[59,2],[58,2],[60,2],[61,2],[10,2],[62,2],[63,2],[64,2],[11,2],[65,2],[66,2],[67,2],[68,2],[69,2],[1,2],[70,2],[71,2],[12,2],[75,2],[73,2],[77,2],[72,2],[76,2],[74,2],[123,91],[133,92],[122,91],[143,93],[114,94],[113,95],[142,96],[136,97],[141,98],[116,99],[130,100],[115,101],[139,102],[111,103],[110,96],[140,104],[112,105],[117,106],[118,2],[121,106],[108,2],[144,107],[134,108],[125,109],[126,110],[128,111],[124,112],[127,113],[137,96],[119,114],[120,115],[129,116],[109,117],[132,108],[131,106],[135,2],[138,118],[252,119],[239,120],[240,119],[238,2],[233,121],[207,122],[206,123],[204,123],[203,2],[205,124],[231,2],[230,2],[229,2],[232,125],[251,126],[245,127],[253,128],[100,129],[259,130],[261,131],[255,132],[262,133],[260,134],[256,135],[246,136],[268,137],[99,2],[86,138],[270,139],[85,140],[84,141],[80,2],[82,142]],"version":"5.8.3"}
|