@tool-bridge/server 0.21.1 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin.js +170 -0
- package/dist/airtable-ML2GIGCH.js +790 -0
- package/dist/{alt_text_generator_ai-W7O34SNG.js → alt_text_generator_ai-FGYQAF2A.js} +12 -11
- package/dist/{amap-VOX4T2AW.js → amap-G7V65NGK.js} +221 -220
- package/dist/anthropic-6ZK24TBB.js +203 -0
- package/dist/apify-VDGYHP6W.js +248 -0
- package/dist/brave_search-TAATLZOS.js +302 -0
- package/dist/chunk-2IAI3XQM.js +302 -0
- package/dist/chunk-7ISGFRC6.js +161 -0
- package/dist/{chunk-E6JCVKW6.js → chunk-BNMLA2RC.js} +3 -3
- package/dist/chunk-HA4BGL6C.js +8429 -0
- package/dist/{chunk-KMTT3I6D.js → chunk-RMAWSG7E.js} +19172 -25717
- package/dist/{chunk-XYBU3WZH.js → chunk-RTW5VRTK.js} +3 -3
- package/dist/chunk-U7PTOA3U.js +7320 -0
- package/dist/chunk-UY6ANCOY.js +378 -0
- package/dist/{chunk-ATK45BXV.js → chunk-X7ZUTKHR.js} +4 -2
- package/dist/circleci-BQ2UWXL2.js +389 -0
- package/dist/clerk-2JYWQNOI.js +1019 -0
- package/dist/cohere-6MI7AQM4.js +185 -0
- package/dist/{confluence-B3EWPZVE.js → confluence-6Y6GDETF.js} +105 -104
- package/dist/{convertapi-EUWSQYPF.js → convertapi-HBZCSWOX.js} +32 -31
- package/dist/{currencyapi-KVTIK3GL.js → currencyapi-337U5TGI.js} +71 -71
- package/dist/deepseek-OSPASO7O.js +210 -0
- package/dist/docker_hub-3ATQOY5L.js +933 -0
- package/dist/dropbox-LSA4GM2Y.js +1305 -0
- package/dist/dub-VZPJSPI6.js +680 -0
- package/dist/e2b-6SDYQZL2.js +278 -0
- package/dist/exa-B6EUYDVP.js +332 -0
- package/dist/{fal_ai-23E7JPNT.js → fal_ai-K4Q27IME.js} +81 -80
- package/dist/{feishu-7QRIDUV6.js → feishu-4TKXG4SU.js} +528 -572
- package/dist/{feishu_custom_bot-TJ4K7QNJ.js → feishu_custom_bot-7CTEAKRB.js} +57 -53
- package/dist/figma-OUKSZLD5.js +777 -0
- package/dist/firehydrant-7MOYL7QH.js +563 -0
- package/dist/{fixer-BWON27UO.js → fixer-H2BV2NO4.js} +34 -33
- package/dist/fly-PXKY6PNH.js +469 -0
- package/dist/{front-QCGXYEDJ.js → front-UZYIV5DW.js} +104 -104
- package/dist/geocodio-NSYO7TFP.js +213 -0
- package/dist/ghost-QBKKQQMF.js +338 -0
- package/dist/github-ENLSJ4CL.js +5421 -0
- package/dist/gmail-KQSDEB47.js +1887 -0
- package/dist/googlecalendar-5YCX4SZF.js +2524 -0
- package/dist/{googledocs-BUHL4J2H.js → googledocs-SSWIVFKA.js} +341 -340
- package/dist/{grafana-GLU2DWF2.js → grafana-TF2LXDQA.js} +221 -220
- package/dist/graphhopper-CURBVHYK.js +325 -0
- package/dist/index.d.ts +1132 -332
- package/dist/index.js +31 -14
- package/dist/{ip2proxy-EZ64Y4ZH.js → ip2proxy-YNVMTZEM.js} +28 -27
- package/dist/ipgeolocation_io-NAU7VJ4J.js +315 -0
- package/dist/ipqualityscore-OT63L4TI.js +279 -0
- package/dist/{jina_ai-EFBHTBXL.js → jina_ai-6WBMBGWM.js} +23 -23
- package/dist/{jira-HQSHAA5K.js → jira-DVDVTHNO.js} +118 -117
- package/dist/langsmith-IM5N4YAU.js +593 -0
- package/dist/lemlist-277SHUQF.js +289 -0
- package/dist/{linear-K7RYFYAD.js → linear-AEPH7B5V.js} +327 -326
- package/dist/logsnag-VEWRAGBG.js +150 -0
- package/dist/main.js +57 -280
- package/dist/{mattermost-S2BRCWLQ.js → mattermost-Q3A2BIZA.js} +59 -58
- package/dist/mem0-AXS7GZGI.js +544 -0
- package/dist/memos-7TXG4ZTU.js +744 -0
- package/dist/{metabase-MMSEPCOF.js → metabase-NSVACWQM.js} +90 -89
- package/dist/mistral_ai-YZ52RGD4.js +1196 -0
- package/dist/{mother_duck-H7PCQNZ2.js → mother_duck-XLLL6FVL.js} +94 -93
- package/dist/ngrok-4O4W3WZW.js +356 -0
- package/dist/{notes-PFMKRO33.js → notes-YTB3TJOO.js} +11 -9
- package/dist/notion-4W4O7J7V.js +940 -0
- package/dist/open_exchange_rates-23QJXVO5.js +215 -0
- package/dist/openai-ZS7GLSLH.js +800 -0
- package/dist/opengraph_io-PMVH7OYI.js +362 -0
- package/dist/openrouter-ONRGFNB6.js +441 -0
- package/dist/outline-UCUYZZ7J.js +599 -0
- package/dist/paddle-35HTKTUL.js +454 -0
- package/dist/perplexity-NVOBYN24.js +220 -0
- package/dist/pinecone-55CJY73C.js +571 -0
- package/dist/{pipedrive-Y2O7QGFF.js → pipedrive-WMCAKS72.js} +99 -98
- package/dist/polar-SM4ZM53B.js +395 -0
- package/dist/posthog-NWCXVXNJ.js +3464 -0
- package/dist/postmark-QJV5PHUQ.js +427 -0
- package/dist/{prerender-MENYM2TY.js → prerender-2W7UT4SC.js} +31 -30
- package/dist/{pubmed-GOXUVVH5.js → pubmed-VVV7XYLU.js} +239 -238
- package/dist/{railway-V2SID4WV.js → railway-KGI57S3O.js} +118 -117
- package/dist/readwise-AGHTQB42.js +470 -0
- package/dist/render-O4HBROCK.js +461 -0
- package/dist/{replicate-756MXPYX.js → replicate-KWBOMX7D.js} +81 -80
- package/dist/{resend-ZKH3BTBI.js → resend-DRH6Y6I4.js} +20 -16
- package/dist/rootly-XGCUDW6X.js +336 -0
- package/dist/{scrapfly-NSRHFDIQ.js → scrapfly-OIQ3OY6L.js} +62 -61
- package/dist/{scrapingbee-OQHLAVEY.js → scrapingbee-OCZO4FHX.js} +56 -56
- package/dist/{screenshot_fyi-DVWG3AXC.js → screenshot_fyi-CUNGFZOC.js} +16 -16
- package/dist/semantic_scholar-3UJRLKES.js +611 -0
- package/dist/{sentry-546MNDJG.js → sentry-5BWVZFJV.js} +208 -207
- package/dist/{shodan-C3OON3Z3.js → shodan-HI37CTEW.js} +62 -61
- package/dist/shopify-LJ2EV2HH.js +610 -0
- package/dist/stripe-3LHMV55K.js +585 -0
- package/dist/{supabase-U2SL4D63.js → supabase-H2KPX3Q2.js} +245 -244
- package/dist/tavily-FBEWGH3Z.js +326 -0
- package/dist/telegram-MYYO3JND.js +1767 -0
- package/dist/{telnyx-CXQ4EZUX.js → telnyx-H4ALEGAX.js} +57 -56
- package/dist/todoist-OBWICA5Q.js +664 -0
- package/dist/trello-GUFUJRWO.js +1080 -0
- package/dist/turso-NIAK4UMS.js +416 -0
- package/dist/{twilio-4PDBJKWX.js → twilio-K6SLK2CX.js} +70 -69
- package/dist/umami-42RS2EPS.js +389 -0
- package/dist/unsplash-V7TOTETT.js +351 -0
- package/dist/{upstash_redis-G4LQBYHA.js → upstash_redis-AWQMB6Y3.js} +51 -50
- package/dist/uptimerobot-AZC2DHOT.js +483 -0
- package/dist/v2ex-4TVRNMLS.js +667 -0
- package/dist/vercel-DPHTJ3XR.js +1076 -0
- package/dist/{wolfram_alpha_api-3G4PUJWB.js → wolfram_alpha_api-XAG7IXBW.js} +36 -35
- package/dist/wordpress-KMPKVGUX.js +812 -0
- package/dist/workos-PKB2YR7S.js +664 -0
- package/dist/zhihu-Y4H4XYPB.js +254 -0
- package/package.json +18 -9
- package/dist/airtable-LLZDFN7M.js +0 -789
- package/dist/anthropic-G23NN3X5.js +0 -202
- package/dist/apify-Y3SS734K.js +0 -247
- package/dist/brave_search-ZC7OAPSZ.js +0 -301
- package/dist/chunk-R6P4XAE5.js +0 -248
- package/dist/chunk-U7B6DS2O.js +0 -977
- package/dist/chunk-UZM2RXZH.js +0 -23436
- package/dist/circleci-3BAX5FCG.js +0 -388
- package/dist/clerk-6LEM6TNU.js +0 -1019
- package/dist/cloudflare_dns-KINYTJUD.js +0 -588
- package/dist/cohere-XCJ5AJ6B.js +0 -185
- package/dist/deepseek-PC5YGNC5.js +0 -209
- package/dist/docker_hub-C3MA5FU6.js +0 -932
- package/dist/dropbox-XBV7Z2IR.js +0 -1304
- package/dist/dub-LDOFG3HC.js +0 -679
- package/dist/e2b-JMCPSVBW.js +0 -277
- package/dist/exa-RAK7O7RD.js +0 -331
- package/dist/figma-E6IX5DTH.js +0 -773
- package/dist/firehydrant-ZBLPQREE.js +0 -562
- package/dist/fly-ZH3HFCZJ.js +0 -468
- package/dist/geocodio-YGNI7DA4.js +0 -212
- package/dist/ghost-EVSGKH2Q.js +0 -337
- package/dist/github-MA2BGRCJ.js +0 -5420
- package/dist/gmail-E5E6AADE.js +0 -1886
- package/dist/googlecalendar-BTLFPXTD.js +0 -2523
- package/dist/graphhopper-WSMB3TCD.js +0 -324
- package/dist/ipgeolocation_io-AA7HAS22.js +0 -315
- package/dist/ipqualityscore-BHJXVTJT.js +0 -277
- package/dist/langsmith-5W6SCT6F.js +0 -592
- package/dist/lemlist-HJWH6UMK.js +0 -288
- package/dist/logsnag-4KFOHL37.js +0 -150
- package/dist/mem0-CAW43CIC.js +0 -543
- package/dist/memos-TWEGPKFM.js +0 -740
- package/dist/mistral_ai-64BGZQHP.js +0 -1195
- package/dist/ngrok-GQCUGZKJ.js +0 -356
- package/dist/notion-DQWZWP4N.js +0 -936
- package/dist/open_exchange_rates-QMMD735E.js +0 -214
- package/dist/openai-W6PX32NZ.js +0 -799
- package/dist/opengraph_io-HNDBXYNW.js +0 -361
- package/dist/openrouter-JJYMEAUL.js +0 -437
- package/dist/outline-MCBNQZYY.js +0 -595
- package/dist/paddle-D2SKLUDN.js +0 -453
- package/dist/perplexity-XIFMKUAE.js +0 -219
- package/dist/pinecone-HUFTALV2.js +0 -570
- package/dist/polar-TYTOMOSR.js +0 -394
- package/dist/posthog-43JAR3VW.js +0 -3463
- package/dist/postmark-KL2QJYSG.js +0 -426
- package/dist/readwise-CI4GIMMJ.js +0 -469
- package/dist/render-SUBJ6YRZ.js +0 -460
- package/dist/rootly-CD2LJHPI.js +0 -336
- package/dist/semantic_scholar-T4A252KW.js +0 -610
- package/dist/shopify-Y2HN2MCQ.js +0 -609
- package/dist/stripe-VE3CD3AY.js +0 -584
- package/dist/tavily-KCZHK6HE.js +0 -326
- package/dist/telegram-3URFBCMY.js +0 -1766
- package/dist/todoist-HNPWNYTD.js +0 -663
- package/dist/trello-3W2MIXRP.js +0 -1079
- package/dist/turso-2EQF7C2Z.js +0 -415
- package/dist/umami-5REN7TGP.js +0 -388
- package/dist/unsplash-EIXL424F.js +0 -350
- package/dist/uptimerobot-KNJ3EYLY.js +0 -482
- package/dist/v2ex-RHJ234PZ.js +0 -666
- package/dist/vercel-AS6NCIC7.js +0 -1075
- package/dist/wordpress-KNDAAUV7.js +0 -811
- package/dist/workos-R6UITSJ7.js +0 -663
- package/dist/zhihu-AGK4HILK.js +0 -253
package/dist/notion-DQWZWP4N.js
DELETED
|
@@ -1,936 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createAuthedClient
|
|
3
|
-
} from "./chunk-XYBU3WZH.js";
|
|
4
|
-
import "./chunk-E6JCVKW6.js";
|
|
5
|
-
import {
|
|
6
|
-
asJsonObject,
|
|
7
|
-
booleanValue,
|
|
8
|
-
compactDefined
|
|
9
|
-
} from "./chunk-JXHMDBAY.js";
|
|
10
|
-
import {
|
|
11
|
-
createProviderPlugin,
|
|
12
|
-
upstreamError
|
|
13
|
-
} from "./chunk-ATK45BXV.js";
|
|
14
|
-
import "./chunk-U7B6DS2O.js";
|
|
15
|
-
import {
|
|
16
|
-
TBError,
|
|
17
|
-
external_exports
|
|
18
|
-
} from "./chunk-UZM2RXZH.js";
|
|
19
|
-
import "./chunk-U67V476Y.js";
|
|
20
|
-
|
|
21
|
-
// ../plugins/src/notion/api.ts
|
|
22
|
-
var SERVICE = "notion";
|
|
23
|
-
var API_BASE = "https://api.notion.com/v1";
|
|
24
|
-
var NOTION_VERSION = "2026-03-11";
|
|
25
|
-
function nonEmpty(value) {
|
|
26
|
-
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
27
|
-
}
|
|
28
|
-
function array(value) {
|
|
29
|
-
return Array.isArray(value) ? value : void 0;
|
|
30
|
-
}
|
|
31
|
-
function inputError(message) {
|
|
32
|
-
return new TBError("invalid_argument", message);
|
|
33
|
-
}
|
|
34
|
-
function errorMessage(status, payload, bodyKind) {
|
|
35
|
-
if (bodyKind === "empty") return `notion request failed with ${status}`;
|
|
36
|
-
if (bodyKind === "invalid-json" || bodyKind === "text") {
|
|
37
|
-
return nonEmpty(payload) ?? `notion request failed with ${status}`;
|
|
38
|
-
}
|
|
39
|
-
const parsed = asJsonObject(payload);
|
|
40
|
-
return nonEmpty(parsed?.message) ?? nonEmpty(parsed?.error) ?? JSON.stringify(payload) ?? `notion request failed with ${status}`;
|
|
41
|
-
}
|
|
42
|
-
var http = createAuthedClient({
|
|
43
|
-
baseUrl: `${API_BASE}/`,
|
|
44
|
-
service: SERVICE,
|
|
45
|
-
auth: { kind: "bearer" },
|
|
46
|
-
headers: { "notion-version": NOTION_VERSION },
|
|
47
|
-
// 提取**不 trim**(nonEmpty)且兜底走 JSON.stringify —— 与标准 errorMessage 的 trim 语义
|
|
48
|
-
// 不同,整段覆写。
|
|
49
|
-
mapError: ({ bodyKind, data: payload, status }) => upstreamError(
|
|
50
|
-
status,
|
|
51
|
-
errorMessage(status, payload, bodyKind)
|
|
52
|
-
)
|
|
53
|
-
});
|
|
54
|
-
async function request(ctx, input) {
|
|
55
|
-
const hasBody = input.body !== void 0;
|
|
56
|
-
const { data } = await http.request(ctx, {
|
|
57
|
-
path: input.path,
|
|
58
|
-
method: input.method ?? "GET",
|
|
59
|
-
// filter_properties[] 靠**重复同名参数**表达;空数组在调用处就丢掉了。
|
|
60
|
-
query: Object.entries(input.query ?? {}),
|
|
61
|
-
...hasBody ? { json: input.body } : {},
|
|
62
|
-
invalidJsonMessage: "Notion \u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94"
|
|
63
|
-
});
|
|
64
|
-
if (data === void 0) return {};
|
|
65
|
-
const result = asJsonObject(data);
|
|
66
|
-
if (result === void 0) {
|
|
67
|
-
throw new TBError("unavailable", "Notion \u8FD4\u56DE\u7684\u4E0D\u662F JSON \u5BF9\u8C61", { retryable: true });
|
|
68
|
-
}
|
|
69
|
-
return result;
|
|
70
|
-
}
|
|
71
|
-
function pageQuery(input) {
|
|
72
|
-
return { page_size: input.pageSize, start_cursor: nonEmpty(input.startCursor) };
|
|
73
|
-
}
|
|
74
|
-
function titleProperty(title) {
|
|
75
|
-
return { title: [{ type: "text", text: { content: title } }] };
|
|
76
|
-
}
|
|
77
|
-
function isSamePageParent(parent, parentId) {
|
|
78
|
-
return typeof parent.page_id === "string" && parent.page_id === parentId;
|
|
79
|
-
}
|
|
80
|
-
function createPageBody(input) {
|
|
81
|
-
const parent = asJsonObject(input.parent);
|
|
82
|
-
const parentId = nonEmpty(input.parentId);
|
|
83
|
-
const children = array(input.children);
|
|
84
|
-
const nonEmptyChildren = children !== void 0 && children.length > 0 ? children : void 0;
|
|
85
|
-
const markdown = typeof input.markdown === "string" ? input.markdown : void 0;
|
|
86
|
-
const icon = asJsonObject(input.icon);
|
|
87
|
-
const cover = asJsonObject(input.cover);
|
|
88
|
-
const template = asJsonObject(input.template);
|
|
89
|
-
const properties = asJsonObject(input.properties);
|
|
90
|
-
if (markdown !== void 0 && nonEmptyChildren !== void 0) {
|
|
91
|
-
throw inputError("markdown cannot be used with children");
|
|
92
|
-
}
|
|
93
|
-
if (parent !== void 0) {
|
|
94
|
-
if (typeof input.title === "string") {
|
|
95
|
-
throw inputError("title cannot be used with parent; use properties instead");
|
|
96
|
-
}
|
|
97
|
-
if (parentId !== void 0 && !isSamePageParent(parent, parentId)) {
|
|
98
|
-
throw inputError("parent and parentId must describe the same page parent");
|
|
99
|
-
}
|
|
100
|
-
return compactDefined({ parent, properties, children: nonEmptyChildren, markdown, template, icon, cover });
|
|
101
|
-
}
|
|
102
|
-
const title = nonEmpty(input.title);
|
|
103
|
-
if (parentId === void 0 && markdown === void 0) {
|
|
104
|
-
throw inputError("parent, parentId + title, or markdown is required");
|
|
105
|
-
}
|
|
106
|
-
if (parentId !== void 0 && title === void 0) {
|
|
107
|
-
throw inputError("title is required with parentId");
|
|
108
|
-
}
|
|
109
|
-
return compactDefined({
|
|
110
|
-
parent: parentId === void 0 ? void 0 : { page_id: parentId },
|
|
111
|
-
properties: title === void 0 ? properties : { ...properties, title: titleProperty(title) },
|
|
112
|
-
children: nonEmptyChildren,
|
|
113
|
-
markdown,
|
|
114
|
-
template,
|
|
115
|
-
icon,
|
|
116
|
-
cover
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
function search(input, ctx) {
|
|
120
|
-
return request(ctx, {
|
|
121
|
-
method: "POST",
|
|
122
|
-
path: "/search",
|
|
123
|
-
// query 恒发(上游 `String(input.query)`),空串在 Notion 侧就是"列出全部可见对象"。
|
|
124
|
-
body: compactDefined({
|
|
125
|
-
query: String(input.query),
|
|
126
|
-
filter: asJsonObject(input.filter),
|
|
127
|
-
sort: asJsonObject(input.sort),
|
|
128
|
-
page_size: input.pageSize,
|
|
129
|
-
start_cursor: nonEmpty(input.startCursor)
|
|
130
|
-
})
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
function retrievePage(input, ctx) {
|
|
134
|
-
return request(ctx, { path: `/pages/${encodeURIComponent(input.pageId)}` });
|
|
135
|
-
}
|
|
136
|
-
function listBlockChildren(input, ctx) {
|
|
137
|
-
return request(ctx, {
|
|
138
|
-
path: `/blocks/${encodeURIComponent(input.blockId)}/children`,
|
|
139
|
-
query: pageQuery(input)
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
async function getPage(input, ctx) {
|
|
143
|
-
const [page, blockChildren] = await Promise.all([
|
|
144
|
-
retrievePage({ pageId: input.pageId }, ctx),
|
|
145
|
-
listBlockChildren({ blockId: input.pageId }, ctx)
|
|
146
|
-
]);
|
|
147
|
-
return { page, block_children: blockChildren };
|
|
148
|
-
}
|
|
149
|
-
function retrievePageMarkdown(input, ctx) {
|
|
150
|
-
return request(ctx, {
|
|
151
|
-
path: `/pages/${encodeURIComponent(input.pageId)}/markdown`,
|
|
152
|
-
// 布尔值发成字符串(上游如此);未给时不发这个参数。
|
|
153
|
-
query: {
|
|
154
|
-
include_transcript: typeof input.includeTranscript === "boolean" ? String(input.includeTranscript) : void 0
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
function updatePageMarkdown(input, ctx) {
|
|
159
|
-
return request(ctx, {
|
|
160
|
-
method: "PATCH",
|
|
161
|
-
path: `/pages/${encodeURIComponent(input.pageId)}/markdown`,
|
|
162
|
-
body: compactDefined({
|
|
163
|
-
type: nonEmpty(input.type),
|
|
164
|
-
insert_content: asJsonObject(input.insert_content),
|
|
165
|
-
replace_content_range: asJsonObject(input.replace_content_range),
|
|
166
|
-
update_content: asJsonObject(input.update_content),
|
|
167
|
-
replace_content: asJsonObject(input.replace_content)
|
|
168
|
-
})
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
function retrievePageProperty(input, ctx) {
|
|
172
|
-
return request(ctx, {
|
|
173
|
-
path: `/pages/${encodeURIComponent(input.pageId)}/properties/${encodeURIComponent(input.propertyId)}`,
|
|
174
|
-
query: pageQuery(input)
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
function createPage(input, ctx) {
|
|
178
|
-
return request(ctx, { method: "POST", path: "/pages", body: createPageBody(input) });
|
|
179
|
-
}
|
|
180
|
-
function updatePage(input, ctx) {
|
|
181
|
-
const properties = asJsonObject(input.properties);
|
|
182
|
-
return request(ctx, {
|
|
183
|
-
method: "PATCH",
|
|
184
|
-
path: `/pages/${encodeURIComponent(input.pageId)}`,
|
|
185
|
-
body: compactDefined({
|
|
186
|
-
// 简化写法:给了 title 就把它并进 properties(上游如此,与 create_page 不同 ——
|
|
187
|
-
// 这里 title 与 parent 不冲突)。
|
|
188
|
-
properties: typeof input.title === "string" ? { ...properties, title: titleProperty(input.title) } : properties,
|
|
189
|
-
icon: asJsonObject(input.icon),
|
|
190
|
-
cover: asJsonObject(input.cover),
|
|
191
|
-
template: asJsonObject(input.template),
|
|
192
|
-
in_trash: booleanValue(input.in_trash),
|
|
193
|
-
is_locked: booleanValue(input.is_locked),
|
|
194
|
-
erase_content: booleanValue(input.erase_content)
|
|
195
|
-
})
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
function movePage(input, ctx) {
|
|
199
|
-
return request(ctx, {
|
|
200
|
-
method: "POST",
|
|
201
|
-
path: `/pages/${encodeURIComponent(input.pageId)}/move`,
|
|
202
|
-
body: { parent: asJsonObject(input.parent) }
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
function appendBlockChildren(input, ctx) {
|
|
206
|
-
return request(ctx, {
|
|
207
|
-
method: "PATCH",
|
|
208
|
-
path: `/blocks/${encodeURIComponent(input.blockId)}/children`,
|
|
209
|
-
// children 缺失时发空数组(上游如此,让 Notion 自己报 validation_error)。
|
|
210
|
-
body: compactDefined({ children: array(input.children) ?? [], position: asJsonObject(input.position) })
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
function appendBlock(input, ctx) {
|
|
214
|
-
return appendBlockChildren({
|
|
215
|
-
blockId: input.pageId,
|
|
216
|
-
children: [{
|
|
217
|
-
object: "block",
|
|
218
|
-
type: "paragraph",
|
|
219
|
-
paragraph: { rich_text: [{ type: "text", text: { content: String(input.text) } }] }
|
|
220
|
-
}]
|
|
221
|
-
}, ctx);
|
|
222
|
-
}
|
|
223
|
-
function retrieveBlock(input, ctx) {
|
|
224
|
-
return request(ctx, { path: `/blocks/${encodeURIComponent(input.blockId)}` });
|
|
225
|
-
}
|
|
226
|
-
function updateBlock(input, ctx) {
|
|
227
|
-
const { blockId, ...rest } = input;
|
|
228
|
-
return request(ctx, {
|
|
229
|
-
method: "PATCH",
|
|
230
|
-
path: `/blocks/${encodeURIComponent(blockId)}`,
|
|
231
|
-
// 入参是 looseObject:除 blockId 外的字段原样进 body(块字段随块类型变化,枚举不完)。
|
|
232
|
-
body: compactDefined({ ...rest, in_trash: booleanValue(rest.in_trash) })
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
function deleteBlock(input, ctx) {
|
|
236
|
-
return request(ctx, { method: "DELETE", path: `/blocks/${encodeURIComponent(input.blockId)}` });
|
|
237
|
-
}
|
|
238
|
-
function listUsers(input, ctx) {
|
|
239
|
-
return request(ctx, { path: "/users", query: pageQuery(input) });
|
|
240
|
-
}
|
|
241
|
-
function retrieveUser(input, ctx) {
|
|
242
|
-
return request(ctx, { path: `/users/${encodeURIComponent(input.userId)}` });
|
|
243
|
-
}
|
|
244
|
-
function createDatabase(input, ctx) {
|
|
245
|
-
return request(ctx, {
|
|
246
|
-
method: "POST",
|
|
247
|
-
path: "/databases",
|
|
248
|
-
body: compactDefined({
|
|
249
|
-
parent: asJsonObject(input.parent),
|
|
250
|
-
title: array(input.title),
|
|
251
|
-
description: array(input.description),
|
|
252
|
-
is_inline: booleanValue(input.is_inline),
|
|
253
|
-
initial_data_source: asJsonObject(input.initial_data_source),
|
|
254
|
-
icon: asJsonObject(input.icon),
|
|
255
|
-
cover: asJsonObject(input.cover)
|
|
256
|
-
})
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
function retrieveDatabase(input, ctx) {
|
|
260
|
-
return request(ctx, { path: `/databases/${encodeURIComponent(input.databaseId)}` });
|
|
261
|
-
}
|
|
262
|
-
function updateDatabase(input, ctx) {
|
|
263
|
-
return request(ctx, {
|
|
264
|
-
method: "PATCH",
|
|
265
|
-
path: `/databases/${encodeURIComponent(input.databaseId)}`,
|
|
266
|
-
body: compactDefined({
|
|
267
|
-
parent: asJsonObject(input.parent),
|
|
268
|
-
title: array(input.title),
|
|
269
|
-
description: array(input.description),
|
|
270
|
-
is_inline: booleanValue(input.is_inline),
|
|
271
|
-
icon: asJsonObject(input.icon),
|
|
272
|
-
cover: asJsonObject(input.cover),
|
|
273
|
-
in_trash: booleanValue(input.in_trash),
|
|
274
|
-
is_locked: booleanValue(input.is_locked)
|
|
275
|
-
})
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
function createDataSource(input, ctx) {
|
|
279
|
-
return request(ctx, {
|
|
280
|
-
method: "POST",
|
|
281
|
-
path: "/data_sources",
|
|
282
|
-
body: compactDefined({
|
|
283
|
-
parent: asJsonObject(input.parent),
|
|
284
|
-
properties: asJsonObject(input.properties),
|
|
285
|
-
title: array(input.title),
|
|
286
|
-
icon: asJsonObject(input.icon)
|
|
287
|
-
})
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
function retrieveDataSource(input, ctx) {
|
|
291
|
-
return request(ctx, { path: `/data_sources/${encodeURIComponent(input.dataSourceId)}` });
|
|
292
|
-
}
|
|
293
|
-
function updateDataSource(input, ctx) {
|
|
294
|
-
return request(ctx, {
|
|
295
|
-
method: "PATCH",
|
|
296
|
-
path: `/data_sources/${encodeURIComponent(input.dataSourceId)}`,
|
|
297
|
-
body: compactDefined({
|
|
298
|
-
title: array(input.title),
|
|
299
|
-
description: array(input.description),
|
|
300
|
-
icon: asJsonObject(input.icon),
|
|
301
|
-
properties: asJsonObject(input.properties),
|
|
302
|
-
in_trash: booleanValue(input.in_trash),
|
|
303
|
-
parent: asJsonObject(input.parent)
|
|
304
|
-
})
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
function queryDataSource(input, ctx) {
|
|
308
|
-
const filterProperties = (input.filterProperties ?? []).filter((item) => item.length > 0);
|
|
309
|
-
return request(ctx, {
|
|
310
|
-
method: "POST",
|
|
311
|
-
path: `/data_sources/${encodeURIComponent(input.dataSourceId)}/query`,
|
|
312
|
-
// 参数名带方括号,且是重复的同名参数;空数组不发(上游 `compactQuery`)。
|
|
313
|
-
query: { "filter_properties[]": filterProperties.length > 0 ? filterProperties : void 0 },
|
|
314
|
-
body: compactDefined({
|
|
315
|
-
filter: asJsonObject(input.filter),
|
|
316
|
-
sorts: array(input.sorts),
|
|
317
|
-
page_size: input.pageSize,
|
|
318
|
-
start_cursor: nonEmpty(input.startCursor),
|
|
319
|
-
in_trash: booleanValue(input.in_trash),
|
|
320
|
-
result_type: nonEmpty(input.result_type)
|
|
321
|
-
})
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
function listDataSourceTemplates(input, ctx) {
|
|
325
|
-
return request(ctx, {
|
|
326
|
-
path: `/data_sources/${encodeURIComponent(input.dataSourceId)}/templates`,
|
|
327
|
-
query: pageQuery(input)
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
// ../plugins/src/notion/schema.handwritten.ts
|
|
332
|
-
var pageParent = external_exports.union([
|
|
333
|
-
external_exports.strictObject({
|
|
334
|
-
page_id: external_exports.string().min(1).describe("The parent page ID."),
|
|
335
|
-
type: external_exports.literal("page_id").describe("Always page_id.").optional()
|
|
336
|
-
}).describe("Page parent."),
|
|
337
|
-
external_exports.strictObject({
|
|
338
|
-
data_source_id: external_exports.string().min(1).describe("The parent data source ID."),
|
|
339
|
-
type: external_exports.literal("data_source_id").describe("Always data_source_id.").optional()
|
|
340
|
-
}).describe("Data source parent."),
|
|
341
|
-
external_exports.strictObject({
|
|
342
|
-
workspace: external_exports.literal(true).describe("Create a private workspace page.")
|
|
343
|
-
}).describe("Workspace parent.")
|
|
344
|
-
]).describe("The official Notion parent object.");
|
|
345
|
-
var notionObject = external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.");
|
|
346
|
-
var pageOutput = external_exports.looseObject({
|
|
347
|
-
object: external_exports.literal("page").describe("The Notion object type.").optional(),
|
|
348
|
-
id: external_exports.string().describe("The page ID.").optional(),
|
|
349
|
-
created_time: external_exports.iso.datetime().describe("The time when the page was created.").optional(),
|
|
350
|
-
last_edited_time: external_exports.iso.datetime().describe("The time when the page was last edited.").optional(),
|
|
351
|
-
parent: notionObject.optional(),
|
|
352
|
-
properties: notionObject.optional(),
|
|
353
|
-
url: external_exports.string().describe("The page URL.").optional(),
|
|
354
|
-
archived: external_exports.boolean().describe("Whether the page is archived.").optional(),
|
|
355
|
-
in_trash: external_exports.boolean().describe("Whether the page is in the trash.").optional()
|
|
356
|
-
}).describe("The output payload for this action.");
|
|
357
|
-
var createPageInput = external_exports.strictObject({
|
|
358
|
-
parent: pageParent.optional(),
|
|
359
|
-
parentId: external_exports.string().describe("Simple parent page ID.").optional(),
|
|
360
|
-
title: external_exports.string().describe("Simple page title used with parentId.").optional(),
|
|
361
|
-
properties: notionObject.describe("Notion properties keyed by property name.").optional(),
|
|
362
|
-
children: external_exports.array(notionObject).describe("Child blocks to create with the page.").optional(),
|
|
363
|
-
markdown: external_exports.string().describe("Enhanced Markdown content for the page.").optional(),
|
|
364
|
-
icon: notionObject.optional(),
|
|
365
|
-
cover: notionObject.optional(),
|
|
366
|
-
template: notionObject.optional()
|
|
367
|
-
}).describe("The input payload for this action.");
|
|
368
|
-
var createPageOutput = pageOutput;
|
|
369
|
-
var movePageInput = external_exports.strictObject({
|
|
370
|
-
pageId: external_exports.string().min(1).describe("The page ID to move."),
|
|
371
|
-
parent: pageParent
|
|
372
|
-
}).describe("The input payload for this action.");
|
|
373
|
-
var movePageOutput = pageOutput;
|
|
374
|
-
|
|
375
|
-
// ../plugins/src/notion/schema.ts
|
|
376
|
-
var searchInput = external_exports.strictObject({
|
|
377
|
-
query: external_exports.string().describe("The search query text."),
|
|
378
|
-
filter: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The filter object to narrow results.").optional(),
|
|
379
|
-
sort: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The sort object to order results.").optional(),
|
|
380
|
-
pageSize: external_exports.int().min(1).max(100).describe("The number of results per page.").optional(),
|
|
381
|
-
startCursor: external_exports.string().describe("The cursor for pagination.").optional()
|
|
382
|
-
}).describe("The input payload for this action.");
|
|
383
|
-
var searchOutput = external_exports.looseObject({
|
|
384
|
-
object: external_exports.literal("list").describe("The Notion object type."),
|
|
385
|
-
results: external_exports.array(external_exports.union([external_exports.looseObject({
|
|
386
|
-
object: external_exports.literal("page").describe("The Notion object type.").optional(),
|
|
387
|
-
id: external_exports.string().describe("The page ID.").optional(),
|
|
388
|
-
created_time: external_exports.iso.datetime({ offset: true }).describe("The time when the page was created.").optional(),
|
|
389
|
-
last_edited_time: external_exports.iso.datetime({ offset: true }).describe("The time when the page was last edited.").optional(),
|
|
390
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
391
|
-
properties: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("Notion properties keyed by property name.").optional(),
|
|
392
|
-
url: external_exports.url().describe("The canonical Notion URL for the page.").optional(),
|
|
393
|
-
archived: external_exports.boolean().describe("Whether the page is archived.").optional(),
|
|
394
|
-
in_trash: external_exports.boolean().describe("Whether the page is in the trash.").optional()
|
|
395
|
-
}).describe("A Notion page object."), external_exports.looseObject({
|
|
396
|
-
object: external_exports.literal("data_source").describe("The Notion object type.").optional(),
|
|
397
|
-
id: external_exports.string().describe("The data source ID.").optional(),
|
|
398
|
-
title: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Notion rich text objects.").optional(),
|
|
399
|
-
properties: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("Notion properties keyed by property name.").optional(),
|
|
400
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
401
|
-
url: external_exports.url().describe("The canonical Notion URL for the data source.").optional(),
|
|
402
|
-
in_trash: external_exports.boolean().describe("Whether the data source is in the trash.").optional()
|
|
403
|
-
}).describe("A Notion data source object.")])).describe("Returned Notion objects."),
|
|
404
|
-
next_cursor: external_exports.string().describe("Cursor for the next page.").nullable().optional(),
|
|
405
|
-
has_more: external_exports.boolean().describe("Whether more results are available.")
|
|
406
|
-
}).describe("Search results returned by Notion.");
|
|
407
|
-
var getPageInput = external_exports.strictObject({
|
|
408
|
-
pageId: external_exports.string().min(1).describe("The page ID to retrieve.")
|
|
409
|
-
}).describe("The input payload for this action.");
|
|
410
|
-
var getPageOutput = external_exports.strictObject({
|
|
411
|
-
page: external_exports.looseObject({
|
|
412
|
-
object: external_exports.literal("page").describe("The Notion object type.").optional(),
|
|
413
|
-
id: external_exports.string().describe("The page ID.").optional(),
|
|
414
|
-
created_time: external_exports.iso.datetime({ offset: true }).describe("The time when the page was created.").optional(),
|
|
415
|
-
last_edited_time: external_exports.iso.datetime({ offset: true }).describe("The time when the page was last edited.").optional(),
|
|
416
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
417
|
-
properties: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("Notion properties keyed by property name.").optional(),
|
|
418
|
-
url: external_exports.url().describe("The canonical Notion URL for the page.").optional(),
|
|
419
|
-
archived: external_exports.boolean().describe("Whether the page is archived.").optional(),
|
|
420
|
-
in_trash: external_exports.boolean().describe("Whether the page is in the trash.").optional()
|
|
421
|
-
}).describe("A Notion page object."),
|
|
422
|
-
block_children: external_exports.looseObject({
|
|
423
|
-
object: external_exports.literal("list").describe("The Notion object type."),
|
|
424
|
-
results: external_exports.array(external_exports.looseObject({
|
|
425
|
-
object: external_exports.literal("block").describe("The Notion object type.").optional(),
|
|
426
|
-
id: external_exports.string().describe("The block ID.").optional(),
|
|
427
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
428
|
-
type: external_exports.string().describe("The block type.").optional(),
|
|
429
|
-
has_children: external_exports.boolean().describe("Whether this block has child blocks.").optional(),
|
|
430
|
-
in_trash: external_exports.boolean().describe("Whether the block is in the trash.").optional()
|
|
431
|
-
}).describe("A Notion block object.")).describe("Returned Notion objects."),
|
|
432
|
-
next_cursor: external_exports.string().describe("Cursor for the next page.").nullable().optional(),
|
|
433
|
-
has_more: external_exports.boolean().describe("Whether more results are available.")
|
|
434
|
-
}).describe("First-level child blocks.")
|
|
435
|
-
}).describe("Page with child block list.");
|
|
436
|
-
var updatePageInput = external_exports.strictObject({
|
|
437
|
-
pageId: external_exports.string().min(1).describe("The page ID to update."),
|
|
438
|
-
title: external_exports.string().describe("The new page title.").optional(),
|
|
439
|
-
properties: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("Notion properties keyed by property name.").optional(),
|
|
440
|
-
icon: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional(),
|
|
441
|
-
cover: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional(),
|
|
442
|
-
template: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional(),
|
|
443
|
-
in_trash: external_exports.boolean().describe("Whether the page is in the trash.").optional(),
|
|
444
|
-
is_locked: external_exports.boolean().describe("Whether the page is locked.").optional(),
|
|
445
|
-
erase_content: external_exports.boolean().describe("Whether to erase page content.").optional()
|
|
446
|
-
}).describe("The input payload for this action.");
|
|
447
|
-
var updatePageOutput = external_exports.looseObject({
|
|
448
|
-
object: external_exports.literal("page").describe("The Notion object type.").optional(),
|
|
449
|
-
id: external_exports.string().describe("The page ID.").optional(),
|
|
450
|
-
created_time: external_exports.iso.datetime({ offset: true }).describe("The time when the page was created.").optional(),
|
|
451
|
-
last_edited_time: external_exports.iso.datetime({ offset: true }).describe("The time when the page was last edited.").optional(),
|
|
452
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
453
|
-
properties: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("Notion properties keyed by property name.").optional(),
|
|
454
|
-
url: external_exports.url().describe("The canonical Notion URL for the page.").optional(),
|
|
455
|
-
archived: external_exports.boolean().describe("Whether the page is archived.").optional(),
|
|
456
|
-
in_trash: external_exports.boolean().describe("Whether the page is in the trash.").optional()
|
|
457
|
-
}).describe("A Notion page object.");
|
|
458
|
-
var appendBlockInput = external_exports.strictObject({
|
|
459
|
-
pageId: external_exports.string().min(1).describe("The page ID to append to."),
|
|
460
|
-
text: external_exports.string().min(1).describe("Paragraph text content.")
|
|
461
|
-
}).describe("The input payload for this action.");
|
|
462
|
-
var appendBlockOutput = external_exports.looseObject({
|
|
463
|
-
object: external_exports.literal("list").describe("The Notion object type."),
|
|
464
|
-
results: external_exports.array(external_exports.looseObject({
|
|
465
|
-
object: external_exports.literal("block").describe("The Notion object type.").optional(),
|
|
466
|
-
id: external_exports.string().describe("The block ID.").optional(),
|
|
467
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
468
|
-
type: external_exports.string().describe("The block type.").optional(),
|
|
469
|
-
has_children: external_exports.boolean().describe("Whether this block has child blocks.").optional(),
|
|
470
|
-
in_trash: external_exports.boolean().describe("Whether the block is in the trash.").optional()
|
|
471
|
-
}).describe("A Notion block object.")).describe("Returned Notion objects."),
|
|
472
|
-
next_cursor: external_exports.string().describe("Cursor for the next page.").nullable().optional(),
|
|
473
|
-
has_more: external_exports.boolean().describe("Whether more results are available.")
|
|
474
|
-
}).describe("Appended block children response.");
|
|
475
|
-
var retrievePageInput = external_exports.strictObject({
|
|
476
|
-
pageId: external_exports.string().min(1).describe("The page ID to retrieve.")
|
|
477
|
-
}).describe("The input payload for this action.");
|
|
478
|
-
var retrievePageOutput = external_exports.looseObject({
|
|
479
|
-
object: external_exports.literal("page").describe("The Notion object type.").optional(),
|
|
480
|
-
id: external_exports.string().describe("The page ID.").optional(),
|
|
481
|
-
created_time: external_exports.iso.datetime({ offset: true }).describe("The time when the page was created.").optional(),
|
|
482
|
-
last_edited_time: external_exports.iso.datetime({ offset: true }).describe("The time when the page was last edited.").optional(),
|
|
483
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
484
|
-
properties: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("Notion properties keyed by property name.").optional(),
|
|
485
|
-
url: external_exports.url().describe("The canonical Notion URL for the page.").optional(),
|
|
486
|
-
archived: external_exports.boolean().describe("Whether the page is archived.").optional(),
|
|
487
|
-
in_trash: external_exports.boolean().describe("Whether the page is in the trash.").optional()
|
|
488
|
-
}).describe("A Notion page object.");
|
|
489
|
-
var retrievePageMarkdownInput = external_exports.strictObject({
|
|
490
|
-
pageId: external_exports.string().min(1).describe("The page or block ID."),
|
|
491
|
-
includeTranscript: external_exports.boolean().describe("Whether to include meeting note transcripts.").optional()
|
|
492
|
-
}).describe("The input payload for this action.");
|
|
493
|
-
var retrievePageMarkdownOutput = external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.");
|
|
494
|
-
var updatePageMarkdownInput = external_exports.strictObject({
|
|
495
|
-
pageId: external_exports.string().min(1).describe("The page ID to update."),
|
|
496
|
-
type: external_exports.string().min(1).describe("Markdown update operation type."),
|
|
497
|
-
insert_content: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional(),
|
|
498
|
-
replace_content_range: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional(),
|
|
499
|
-
update_content: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional(),
|
|
500
|
-
replace_content: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional()
|
|
501
|
-
}).describe("The input payload for this action.");
|
|
502
|
-
var updatePageMarkdownOutput = external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.");
|
|
503
|
-
var retrievePagePropertyInput = external_exports.strictObject({
|
|
504
|
-
pageId: external_exports.string().min(1).describe("The page ID."),
|
|
505
|
-
propertyId: external_exports.string().min(1).describe("The property ID."),
|
|
506
|
-
pageSize: external_exports.int().min(1).max(100).describe("The number of property items per page.").optional(),
|
|
507
|
-
startCursor: external_exports.string().describe("The cursor for pagination.").optional()
|
|
508
|
-
}).describe("The input payload for this action.");
|
|
509
|
-
var retrievePagePropertyOutput = external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.");
|
|
510
|
-
var listUsersInput = external_exports.strictObject({
|
|
511
|
-
pageSize: external_exports.int().min(1).max(100).describe("The number of results per page.").optional(),
|
|
512
|
-
startCursor: external_exports.string().describe("The cursor for pagination.").optional()
|
|
513
|
-
}).describe("The input payload for this action.");
|
|
514
|
-
var listUsersOutput = external_exports.looseObject({
|
|
515
|
-
object: external_exports.literal("list").describe("The Notion object type."),
|
|
516
|
-
results: external_exports.array(external_exports.looseObject({
|
|
517
|
-
object: external_exports.literal("user").describe("The Notion object type.").optional(),
|
|
518
|
-
id: external_exports.string().describe("The Notion user ID.").optional(),
|
|
519
|
-
name: external_exports.string().describe("The user's display name.").nullable().optional(),
|
|
520
|
-
avatar_url: external_exports.string().describe("The user's avatar URL.").nullable().optional(),
|
|
521
|
-
type: external_exports.enum(["person", "bot"]).describe("The user type.").optional(),
|
|
522
|
-
person: external_exports.looseObject({
|
|
523
|
-
email: external_exports.email().describe("The person's email address.").optional()
|
|
524
|
-
}).optional(),
|
|
525
|
-
bot: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional()
|
|
526
|
-
}).describe("A Notion user object.")).describe("Returned Notion objects."),
|
|
527
|
-
next_cursor: external_exports.string().describe("Cursor for the next page.").nullable().optional(),
|
|
528
|
-
has_more: external_exports.boolean().describe("Whether more results are available.")
|
|
529
|
-
}).describe("Workspace users returned by Notion.");
|
|
530
|
-
var retrieveUserInput = external_exports.strictObject({
|
|
531
|
-
userId: external_exports.string().min(1).describe("The user ID to retrieve.")
|
|
532
|
-
}).describe("The input payload for this action.");
|
|
533
|
-
var retrieveUserOutput = external_exports.looseObject({
|
|
534
|
-
object: external_exports.literal("user").describe("The Notion object type.").optional(),
|
|
535
|
-
id: external_exports.string().describe("The Notion user ID.").optional(),
|
|
536
|
-
name: external_exports.string().describe("The user's display name.").nullable().optional(),
|
|
537
|
-
avatar_url: external_exports.string().describe("The user's avatar URL.").nullable().optional(),
|
|
538
|
-
type: external_exports.enum(["person", "bot"]).describe("The user type.").optional(),
|
|
539
|
-
person: external_exports.looseObject({
|
|
540
|
-
email: external_exports.email().describe("The person's email address.").optional()
|
|
541
|
-
}).optional(),
|
|
542
|
-
bot: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional()
|
|
543
|
-
}).describe("A Notion user object.");
|
|
544
|
-
var retrieveBlockInput = external_exports.strictObject({
|
|
545
|
-
blockId: external_exports.string().min(1).describe("The block ID to retrieve.")
|
|
546
|
-
}).describe("The input payload for this action.");
|
|
547
|
-
var retrieveBlockOutput = external_exports.looseObject({
|
|
548
|
-
object: external_exports.literal("block").describe("The Notion object type.").optional(),
|
|
549
|
-
id: external_exports.string().describe("The block ID.").optional(),
|
|
550
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
551
|
-
type: external_exports.string().describe("The block type.").optional(),
|
|
552
|
-
has_children: external_exports.boolean().describe("Whether this block has child blocks.").optional(),
|
|
553
|
-
in_trash: external_exports.boolean().describe("Whether the block is in the trash.").optional()
|
|
554
|
-
}).describe("A Notion block object.");
|
|
555
|
-
var listBlockChildrenInput = external_exports.strictObject({
|
|
556
|
-
blockId: external_exports.string().min(1).describe("The parent block ID."),
|
|
557
|
-
pageSize: external_exports.int().min(1).max(100).describe("The number of results per page.").optional(),
|
|
558
|
-
startCursor: external_exports.string().describe("The cursor for pagination.").optional()
|
|
559
|
-
}).describe("The input payload for this action.");
|
|
560
|
-
var listBlockChildrenOutput = external_exports.looseObject({
|
|
561
|
-
object: external_exports.literal("list").describe("The Notion object type."),
|
|
562
|
-
results: external_exports.array(external_exports.looseObject({
|
|
563
|
-
object: external_exports.literal("block").describe("The Notion object type.").optional(),
|
|
564
|
-
id: external_exports.string().describe("The block ID.").optional(),
|
|
565
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
566
|
-
type: external_exports.string().describe("The block type.").optional(),
|
|
567
|
-
has_children: external_exports.boolean().describe("Whether this block has child blocks.").optional(),
|
|
568
|
-
in_trash: external_exports.boolean().describe("Whether the block is in the trash.").optional()
|
|
569
|
-
}).describe("A Notion block object.")).describe("Returned Notion objects."),
|
|
570
|
-
next_cursor: external_exports.string().describe("Cursor for the next page.").nullable().optional(),
|
|
571
|
-
has_more: external_exports.boolean().describe("Whether more results are available.")
|
|
572
|
-
}).describe("Child blocks returned by Notion.");
|
|
573
|
-
var appendBlockChildrenInput = external_exports.strictObject({
|
|
574
|
-
blockId: external_exports.string().min(1).describe("The parent block ID."),
|
|
575
|
-
children: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Child block objects to append."),
|
|
576
|
-
position: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional()
|
|
577
|
-
}).describe("The input payload for this action.");
|
|
578
|
-
var appendBlockChildrenOutput = external_exports.looseObject({
|
|
579
|
-
object: external_exports.literal("list").describe("The Notion object type."),
|
|
580
|
-
results: external_exports.array(external_exports.looseObject({
|
|
581
|
-
object: external_exports.literal("block").describe("The Notion object type.").optional(),
|
|
582
|
-
id: external_exports.string().describe("The block ID.").optional(),
|
|
583
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
584
|
-
type: external_exports.string().describe("The block type.").optional(),
|
|
585
|
-
has_children: external_exports.boolean().describe("Whether this block has child blocks.").optional(),
|
|
586
|
-
in_trash: external_exports.boolean().describe("Whether the block is in the trash.").optional()
|
|
587
|
-
}).describe("A Notion block object.")).describe("Returned Notion objects."),
|
|
588
|
-
next_cursor: external_exports.string().describe("Cursor for the next page.").nullable().optional(),
|
|
589
|
-
has_more: external_exports.boolean().describe("Whether more results are available.")
|
|
590
|
-
}).describe("Appended block children response.");
|
|
591
|
-
var updateBlockInput = external_exports.looseObject({
|
|
592
|
-
blockId: external_exports.string().min(1).describe("The block ID to update.")
|
|
593
|
-
}).describe("The input payload for this action.");
|
|
594
|
-
var updateBlockOutput = external_exports.looseObject({
|
|
595
|
-
object: external_exports.literal("block").describe("The Notion object type.").optional(),
|
|
596
|
-
id: external_exports.string().describe("The block ID.").optional(),
|
|
597
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
598
|
-
type: external_exports.string().describe("The block type.").optional(),
|
|
599
|
-
has_children: external_exports.boolean().describe("Whether this block has child blocks.").optional(),
|
|
600
|
-
in_trash: external_exports.boolean().describe("Whether the block is in the trash.").optional()
|
|
601
|
-
}).describe("A Notion block object.");
|
|
602
|
-
var deleteBlockInput = external_exports.strictObject({
|
|
603
|
-
blockId: external_exports.string().min(1).describe("The block ID to delete.")
|
|
604
|
-
}).describe("The input payload for this action.");
|
|
605
|
-
var deleteBlockOutput = external_exports.looseObject({
|
|
606
|
-
object: external_exports.literal("block").describe("The Notion object type.").optional(),
|
|
607
|
-
id: external_exports.string().describe("The block ID.").optional(),
|
|
608
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
609
|
-
type: external_exports.string().describe("The block type.").optional(),
|
|
610
|
-
has_children: external_exports.boolean().describe("Whether this block has child blocks.").optional(),
|
|
611
|
-
in_trash: external_exports.boolean().describe("Whether the block is in the trash.").optional()
|
|
612
|
-
}).describe("A Notion block object.");
|
|
613
|
-
var createDatabaseInput = external_exports.strictObject({
|
|
614
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object."),
|
|
615
|
-
title: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Database title rich text objects.").optional(),
|
|
616
|
-
description: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Database description rich text objects.").optional(),
|
|
617
|
-
is_inline: external_exports.boolean().describe("Whether the database is inline.").optional(),
|
|
618
|
-
initial_data_source: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional(),
|
|
619
|
-
icon: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional(),
|
|
620
|
-
cover: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional()
|
|
621
|
-
}).describe("The input payload for this action.");
|
|
622
|
-
var createDatabaseOutput = external_exports.looseObject({
|
|
623
|
-
object: external_exports.literal("database").describe("The Notion object type.").optional(),
|
|
624
|
-
id: external_exports.string().describe("The database ID.").optional(),
|
|
625
|
-
title: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Notion rich text objects.").optional(),
|
|
626
|
-
description: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Notion rich text objects.").optional(),
|
|
627
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
628
|
-
url: external_exports.url().describe("The canonical Notion URL for the database.").optional(),
|
|
629
|
-
in_trash: external_exports.boolean().describe("Whether the database is in the trash.").optional()
|
|
630
|
-
}).describe("A Notion database object.");
|
|
631
|
-
var retrieveDatabaseInput = external_exports.strictObject({
|
|
632
|
-
databaseId: external_exports.string().min(1).describe("The database ID to retrieve.")
|
|
633
|
-
}).describe("The input payload for this action.");
|
|
634
|
-
var retrieveDatabaseOutput = external_exports.looseObject({
|
|
635
|
-
object: external_exports.literal("database").describe("The Notion object type.").optional(),
|
|
636
|
-
id: external_exports.string().describe("The database ID.").optional(),
|
|
637
|
-
title: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Notion rich text objects.").optional(),
|
|
638
|
-
description: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Notion rich text objects.").optional(),
|
|
639
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
640
|
-
url: external_exports.url().describe("The canonical Notion URL for the database.").optional(),
|
|
641
|
-
in_trash: external_exports.boolean().describe("Whether the database is in the trash.").optional()
|
|
642
|
-
}).describe("A Notion database object.");
|
|
643
|
-
var updateDatabaseInput = external_exports.strictObject({
|
|
644
|
-
databaseId: external_exports.string().min(1).describe("The database ID to update."),
|
|
645
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
646
|
-
title: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Database title rich text objects.").optional(),
|
|
647
|
-
description: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Database description rich text objects.").optional(),
|
|
648
|
-
is_inline: external_exports.boolean().describe("Whether the database is inline.").optional(),
|
|
649
|
-
icon: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional(),
|
|
650
|
-
cover: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional(),
|
|
651
|
-
in_trash: external_exports.boolean().describe("Whether the database is in the trash.").optional(),
|
|
652
|
-
is_locked: external_exports.boolean().describe("Whether the database is locked.").optional()
|
|
653
|
-
}).describe("The input payload for this action.");
|
|
654
|
-
var updateDatabaseOutput = external_exports.looseObject({
|
|
655
|
-
object: external_exports.literal("database").describe("The Notion object type.").optional(),
|
|
656
|
-
id: external_exports.string().describe("The database ID.").optional(),
|
|
657
|
-
title: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Notion rich text objects.").optional(),
|
|
658
|
-
description: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Notion rich text objects.").optional(),
|
|
659
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
660
|
-
url: external_exports.url().describe("The canonical Notion URL for the database.").optional(),
|
|
661
|
-
in_trash: external_exports.boolean().describe("Whether the database is in the trash.").optional()
|
|
662
|
-
}).describe("A Notion database object.");
|
|
663
|
-
var createDataSourceInput = external_exports.strictObject({
|
|
664
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object."),
|
|
665
|
-
properties: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("Notion properties keyed by property name."),
|
|
666
|
-
title: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Data source title rich text objects.").optional(),
|
|
667
|
-
icon: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional()
|
|
668
|
-
}).describe("The input payload for this action.");
|
|
669
|
-
var createDataSourceOutput = external_exports.looseObject({
|
|
670
|
-
object: external_exports.literal("data_source").describe("The Notion object type.").optional(),
|
|
671
|
-
id: external_exports.string().describe("The data source ID.").optional(),
|
|
672
|
-
title: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Notion rich text objects.").optional(),
|
|
673
|
-
properties: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("Notion properties keyed by property name.").optional(),
|
|
674
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
675
|
-
url: external_exports.url().describe("The canonical Notion URL for the data source.").optional(),
|
|
676
|
-
in_trash: external_exports.boolean().describe("Whether the data source is in the trash.").optional()
|
|
677
|
-
}).describe("A Notion data source object.");
|
|
678
|
-
var retrieveDataSourceInput = external_exports.strictObject({
|
|
679
|
-
dataSourceId: external_exports.string().min(1).describe("The data source ID to retrieve.")
|
|
680
|
-
}).describe("The input payload for this action.");
|
|
681
|
-
var retrieveDataSourceOutput = external_exports.looseObject({
|
|
682
|
-
object: external_exports.literal("data_source").describe("The Notion object type.").optional(),
|
|
683
|
-
id: external_exports.string().describe("The data source ID.").optional(),
|
|
684
|
-
title: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Notion rich text objects.").optional(),
|
|
685
|
-
properties: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("Notion properties keyed by property name.").optional(),
|
|
686
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
687
|
-
url: external_exports.url().describe("The canonical Notion URL for the data source.").optional(),
|
|
688
|
-
in_trash: external_exports.boolean().describe("Whether the data source is in the trash.").optional()
|
|
689
|
-
}).describe("A Notion data source object.");
|
|
690
|
-
var updateDataSourceInput = external_exports.strictObject({
|
|
691
|
-
dataSourceId: external_exports.string().min(1).describe("The data source ID to update."),
|
|
692
|
-
title: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Data source title rich text objects.").optional(),
|
|
693
|
-
description: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Data source description rich text objects.").optional(),
|
|
694
|
-
icon: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.").optional(),
|
|
695
|
-
properties: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("Notion properties keyed by property name.").optional(),
|
|
696
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
697
|
-
in_trash: external_exports.boolean().describe("Whether the data source is in the trash.").optional()
|
|
698
|
-
}).describe("The input payload for this action.");
|
|
699
|
-
var updateDataSourceOutput = external_exports.looseObject({
|
|
700
|
-
object: external_exports.literal("data_source").describe("The Notion object type.").optional(),
|
|
701
|
-
id: external_exports.string().describe("The data source ID.").optional(),
|
|
702
|
-
title: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Notion rich text objects.").optional(),
|
|
703
|
-
properties: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("Notion properties keyed by property name.").optional(),
|
|
704
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
705
|
-
url: external_exports.url().describe("The canonical Notion URL for the data source.").optional(),
|
|
706
|
-
in_trash: external_exports.boolean().describe("Whether the data source is in the trash.").optional()
|
|
707
|
-
}).describe("A Notion data source object.");
|
|
708
|
-
var queryDataSourceInput = external_exports.strictObject({
|
|
709
|
-
dataSourceId: external_exports.string().min(1).describe("The data source ID to query."),
|
|
710
|
-
filter: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The filter object to narrow results.").optional(),
|
|
711
|
-
sorts: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("The sorts to apply.").optional(),
|
|
712
|
-
pageSize: external_exports.int().min(1).max(100).describe("The number of results per page.").optional(),
|
|
713
|
-
startCursor: external_exports.string().describe("The cursor for pagination.").optional(),
|
|
714
|
-
filterProperties: external_exports.array(external_exports.string().min(1)).describe("Property IDs to include.").optional(),
|
|
715
|
-
in_trash: external_exports.boolean().describe("Whether to query trashed pages.").optional(),
|
|
716
|
-
result_type: external_exports.string().describe("The Notion result type filter.").optional()
|
|
717
|
-
}).describe("The input payload for this action.");
|
|
718
|
-
var queryDataSourceOutput = external_exports.looseObject({
|
|
719
|
-
object: external_exports.literal("list").describe("The Notion object type."),
|
|
720
|
-
results: external_exports.array(external_exports.looseObject({
|
|
721
|
-
object: external_exports.literal("page").describe("The Notion object type.").optional(),
|
|
722
|
-
id: external_exports.string().describe("The page ID.").optional(),
|
|
723
|
-
created_time: external_exports.iso.datetime({ offset: true }).describe("The time when the page was created.").optional(),
|
|
724
|
-
last_edited_time: external_exports.iso.datetime({ offset: true }).describe("The time when the page was last edited.").optional(),
|
|
725
|
-
parent: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("The official Notion parent object.").optional(),
|
|
726
|
-
properties: external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("Notion properties keyed by property name.").optional(),
|
|
727
|
-
url: external_exports.url().describe("The canonical Notion URL for the page.").optional(),
|
|
728
|
-
archived: external_exports.boolean().describe("Whether the page is archived.").optional(),
|
|
729
|
-
in_trash: external_exports.boolean().describe("Whether the page is in the trash.").optional()
|
|
730
|
-
}).describe("A Notion page object.")).describe("Returned Notion objects."),
|
|
731
|
-
next_cursor: external_exports.string().describe("Cursor for the next page.").nullable().optional(),
|
|
732
|
-
has_more: external_exports.boolean().describe("Whether more results are available.")
|
|
733
|
-
}).describe("Data source query results returned by Notion.");
|
|
734
|
-
var listDataSourceTemplatesInput = external_exports.strictObject({
|
|
735
|
-
dataSourceId: external_exports.string().min(1).describe("The data source ID whose templates should be listed."),
|
|
736
|
-
pageSize: external_exports.int().min(1).max(100).describe("The number of results per page.").optional(),
|
|
737
|
-
startCursor: external_exports.string().describe("The cursor for pagination.").optional()
|
|
738
|
-
}).describe("The input payload for this action.");
|
|
739
|
-
var listDataSourceTemplatesOutput = external_exports.looseObject({
|
|
740
|
-
object: external_exports.literal("list").describe("The Notion object type."),
|
|
741
|
-
results: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown().describe("A Notion API field value.")).describe("A Notion API object.")).describe("Returned Notion objects."),
|
|
742
|
-
next_cursor: external_exports.string().describe("Cursor for the next page.").nullable().optional(),
|
|
743
|
-
has_more: external_exports.boolean().describe("Whether more results are available.")
|
|
744
|
-
}).describe("Data source templates returned by Notion.");
|
|
745
|
-
var notionActions = {
|
|
746
|
-
search: {
|
|
747
|
-
description: "Search Notion pages and data sources with optional filter, sort, and pagination controls.",
|
|
748
|
-
effect: "write",
|
|
749
|
-
inputSchema: searchInput,
|
|
750
|
-
outputSchema: external_exports.toJSONSchema(searchOutput, { io: "output", unrepresentable: "any" })
|
|
751
|
-
},
|
|
752
|
-
get_page: {
|
|
753
|
-
description: "Get a Notion page together with its first-level child blocks. This is an aggregate helper over page retrieval plus block-children listing.",
|
|
754
|
-
effect: "read",
|
|
755
|
-
inputSchema: getPageInput,
|
|
756
|
-
outputSchema: external_exports.toJSONSchema(getPageOutput, { io: "output", unrepresentable: "any" })
|
|
757
|
-
},
|
|
758
|
-
create_page: {
|
|
759
|
-
description: "Create a Notion page under a parent page, data source, or workspace-level private area.",
|
|
760
|
-
effect: "write",
|
|
761
|
-
inputSchema: createPageInput,
|
|
762
|
-
outputSchema: external_exports.toJSONSchema(createPageOutput, { io: "output", unrepresentable: "any" })
|
|
763
|
-
},
|
|
764
|
-
update_page: {
|
|
765
|
-
description: "Update a Notion page's properties, title, icon, cover, trash status, or locked state.",
|
|
766
|
-
effect: "write",
|
|
767
|
-
inputSchema: updatePageInput,
|
|
768
|
-
outputSchema: external_exports.toJSONSchema(updatePageOutput, { io: "output", unrepresentable: "any" })
|
|
769
|
-
},
|
|
770
|
-
move_page: {
|
|
771
|
-
description: "Move a Notion page under another page or data source.",
|
|
772
|
-
effect: "write",
|
|
773
|
-
inputSchema: movePageInput,
|
|
774
|
-
outputSchema: external_exports.toJSONSchema(movePageOutput, { io: "output", unrepresentable: "any" })
|
|
775
|
-
},
|
|
776
|
-
append_block: {
|
|
777
|
-
description: "Append a single paragraph block to a Notion page.",
|
|
778
|
-
effect: "write",
|
|
779
|
-
inputSchema: appendBlockInput,
|
|
780
|
-
outputSchema: external_exports.toJSONSchema(appendBlockOutput, { io: "output", unrepresentable: "any" })
|
|
781
|
-
},
|
|
782
|
-
retrieve_page: {
|
|
783
|
-
description: "Retrieve a Notion page's properties and metadata by page ID.",
|
|
784
|
-
effect: "read",
|
|
785
|
-
inputSchema: retrievePageInput,
|
|
786
|
-
outputSchema: external_exports.toJSONSchema(retrievePageOutput, { io: "output", unrepresentable: "any" })
|
|
787
|
-
},
|
|
788
|
-
retrieve_page_markdown: {
|
|
789
|
-
description: "Retrieve a Notion page or block subtree rendered as enhanced Markdown.",
|
|
790
|
-
effect: "read",
|
|
791
|
-
inputSchema: retrievePageMarkdownInput,
|
|
792
|
-
outputSchema: external_exports.toJSONSchema(retrievePageMarkdownOutput, { io: "output", unrepresentable: "any" })
|
|
793
|
-
},
|
|
794
|
-
update_page_markdown: {
|
|
795
|
-
description: "Update a Notion page's content as enhanced Markdown.",
|
|
796
|
-
effect: "write",
|
|
797
|
-
inputSchema: updatePageMarkdownInput,
|
|
798
|
-
outputSchema: external_exports.toJSONSchema(updatePageMarkdownOutput, { io: "output", unrepresentable: "any" })
|
|
799
|
-
},
|
|
800
|
-
retrieve_page_property: {
|
|
801
|
-
description: "Retrieve a specific property item from a Notion page.",
|
|
802
|
-
effect: "read",
|
|
803
|
-
inputSchema: retrievePagePropertyInput,
|
|
804
|
-
outputSchema: external_exports.toJSONSchema(retrievePagePropertyOutput, { io: "output", unrepresentable: "any" })
|
|
805
|
-
},
|
|
806
|
-
list_users: {
|
|
807
|
-
description: "List users in the Notion workspace with pagination.",
|
|
808
|
-
effect: "read",
|
|
809
|
-
inputSchema: listUsersInput,
|
|
810
|
-
outputSchema: external_exports.toJSONSchema(listUsersOutput, { io: "output", unrepresentable: "any" })
|
|
811
|
-
},
|
|
812
|
-
retrieve_user: {
|
|
813
|
-
description: "Retrieve a Notion user by user ID.",
|
|
814
|
-
effect: "read",
|
|
815
|
-
inputSchema: retrieveUserInput,
|
|
816
|
-
outputSchema: external_exports.toJSONSchema(retrieveUserOutput, { io: "output", unrepresentable: "any" })
|
|
817
|
-
},
|
|
818
|
-
retrieve_block: {
|
|
819
|
-
description: "Retrieve a Notion block by block ID.",
|
|
820
|
-
effect: "read",
|
|
821
|
-
inputSchema: retrieveBlockInput,
|
|
822
|
-
outputSchema: external_exports.toJSONSchema(retrieveBlockOutput, { io: "output", unrepresentable: "any" })
|
|
823
|
-
},
|
|
824
|
-
list_block_children: {
|
|
825
|
-
description: "List the direct child blocks under a Notion block with pagination.",
|
|
826
|
-
effect: "read",
|
|
827
|
-
inputSchema: listBlockChildrenInput,
|
|
828
|
-
outputSchema: external_exports.toJSONSchema(listBlockChildrenOutput, { io: "output", unrepresentable: "any" })
|
|
829
|
-
},
|
|
830
|
-
append_block_children: {
|
|
831
|
-
description: "Append raw Notion child blocks to an existing parent block.",
|
|
832
|
-
effect: "write",
|
|
833
|
-
inputSchema: appendBlockChildrenInput,
|
|
834
|
-
outputSchema: external_exports.toJSONSchema(appendBlockChildrenOutput, { io: "output", unrepresentable: "any" })
|
|
835
|
-
},
|
|
836
|
-
update_block: {
|
|
837
|
-
description: "Update a Notion block using raw block fields.",
|
|
838
|
-
effect: "write",
|
|
839
|
-
inputSchema: updateBlockInput,
|
|
840
|
-
outputSchema: external_exports.toJSONSchema(updateBlockOutput, { io: "output", unrepresentable: "any" })
|
|
841
|
-
},
|
|
842
|
-
delete_block: {
|
|
843
|
-
description: "Archive a Notion block through the official delete endpoint.",
|
|
844
|
-
effect: "destructive",
|
|
845
|
-
inputSchema: deleteBlockInput,
|
|
846
|
-
outputSchema: external_exports.toJSONSchema(deleteBlockOutput, { io: "output", unrepresentable: "any" })
|
|
847
|
-
},
|
|
848
|
-
create_database: {
|
|
849
|
-
description: "Create a Notion database container under a parent page or workspace.",
|
|
850
|
-
effect: "write",
|
|
851
|
-
inputSchema: createDatabaseInput,
|
|
852
|
-
outputSchema: external_exports.toJSONSchema(createDatabaseOutput, { io: "output", unrepresentable: "any" })
|
|
853
|
-
},
|
|
854
|
-
retrieve_database: {
|
|
855
|
-
description: "Retrieve a Notion database's metadata and schema by database ID.",
|
|
856
|
-
effect: "read",
|
|
857
|
-
inputSchema: retrieveDatabaseInput,
|
|
858
|
-
outputSchema: external_exports.toJSONSchema(retrieveDatabaseOutput, { io: "output", unrepresentable: "any" })
|
|
859
|
-
},
|
|
860
|
-
update_database: {
|
|
861
|
-
description: "Update a Notion database container.",
|
|
862
|
-
effect: "write",
|
|
863
|
-
inputSchema: updateDatabaseInput,
|
|
864
|
-
outputSchema: external_exports.toJSONSchema(updateDatabaseOutput, { io: "output", unrepresentable: "any" })
|
|
865
|
-
},
|
|
866
|
-
create_data_source: {
|
|
867
|
-
description: "Create a Notion data source under a parent database.",
|
|
868
|
-
effect: "write",
|
|
869
|
-
inputSchema: createDataSourceInput,
|
|
870
|
-
outputSchema: external_exports.toJSONSchema(createDataSourceOutput, { io: "output", unrepresentable: "any" })
|
|
871
|
-
},
|
|
872
|
-
retrieve_data_source: {
|
|
873
|
-
description: "Retrieve a Notion data source by data source ID.",
|
|
874
|
-
effect: "read",
|
|
875
|
-
inputSchema: retrieveDataSourceInput,
|
|
876
|
-
outputSchema: external_exports.toJSONSchema(retrieveDataSourceOutput, { io: "output", unrepresentable: "any" })
|
|
877
|
-
},
|
|
878
|
-
update_data_source: {
|
|
879
|
-
description: "Update a Notion data source's title, icon, properties schema, parent, or trash status.",
|
|
880
|
-
effect: "write",
|
|
881
|
-
inputSchema: updateDataSourceInput,
|
|
882
|
-
outputSchema: external_exports.toJSONSchema(updateDataSourceOutput, { io: "output", unrepresentable: "any" })
|
|
883
|
-
},
|
|
884
|
-
query_data_source: {
|
|
885
|
-
description: "Query a Notion data source with filters, sorts, pagination, and optional property filtering.",
|
|
886
|
-
effect: "write",
|
|
887
|
-
inputSchema: queryDataSourceInput,
|
|
888
|
-
outputSchema: external_exports.toJSONSchema(queryDataSourceOutput, { io: "output", unrepresentable: "any" })
|
|
889
|
-
},
|
|
890
|
-
list_data_source_templates: {
|
|
891
|
-
description: "List templates available on a Notion data source.",
|
|
892
|
-
effect: "read",
|
|
893
|
-
inputSchema: listDataSourceTemplatesInput,
|
|
894
|
-
outputSchema: external_exports.toJSONSchema(listDataSourceTemplatesOutput, { io: "output", unrepresentable: "any" })
|
|
895
|
-
}
|
|
896
|
-
};
|
|
897
|
-
|
|
898
|
-
// ../plugins/src/notion/index.ts
|
|
899
|
-
function createNotionPlugin() {
|
|
900
|
-
return createProviderPlugin({
|
|
901
|
-
description: "Notion",
|
|
902
|
-
actions: notionActions,
|
|
903
|
-
handlers: {
|
|
904
|
-
search,
|
|
905
|
-
get_page: getPage,
|
|
906
|
-
create_page: createPage,
|
|
907
|
-
update_page: updatePage,
|
|
908
|
-
move_page: movePage,
|
|
909
|
-
append_block: appendBlock,
|
|
910
|
-
retrieve_page: retrievePage,
|
|
911
|
-
retrieve_page_markdown: retrievePageMarkdown,
|
|
912
|
-
update_page_markdown: updatePageMarkdown,
|
|
913
|
-
retrieve_page_property: retrievePageProperty,
|
|
914
|
-
list_users: listUsers,
|
|
915
|
-
retrieve_user: retrieveUser,
|
|
916
|
-
retrieve_block: retrieveBlock,
|
|
917
|
-
list_block_children: listBlockChildren,
|
|
918
|
-
append_block_children: appendBlockChildren,
|
|
919
|
-
update_block: updateBlock,
|
|
920
|
-
delete_block: deleteBlock,
|
|
921
|
-
create_database: createDatabase,
|
|
922
|
-
retrieve_database: retrieveDatabase,
|
|
923
|
-
update_database: updateDatabase,
|
|
924
|
-
create_data_source: createDataSource,
|
|
925
|
-
retrieve_data_source: retrieveDataSource,
|
|
926
|
-
update_data_source: updateDataSource,
|
|
927
|
-
query_data_source: queryDataSource,
|
|
928
|
-
list_data_source_templates: listDataSourceTemplates
|
|
929
|
-
}
|
|
930
|
-
});
|
|
931
|
-
}
|
|
932
|
-
var notion_default = createNotionPlugin();
|
|
933
|
-
export {
|
|
934
|
-
createNotionPlugin,
|
|
935
|
-
notion_default as default
|
|
936
|
-
};
|