@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
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAuthedClient
|
|
3
|
+
} from "./chunk-RTW5VRTK.js";
|
|
4
|
+
import "./chunk-BNMLA2RC.js";
|
|
5
|
+
import {
|
|
6
|
+
asJsonObject,
|
|
7
|
+
compactDefined,
|
|
8
|
+
trimmedText
|
|
9
|
+
} from "./chunk-JXHMDBAY.js";
|
|
10
|
+
import {
|
|
11
|
+
createProviderPlugin,
|
|
12
|
+
upstreamError
|
|
13
|
+
} from "./chunk-X7ZUTKHR.js";
|
|
14
|
+
import "./chunk-7ISGFRC6.js";
|
|
15
|
+
import "./chunk-UY6ANCOY.js";
|
|
16
|
+
import {
|
|
17
|
+
TBError
|
|
18
|
+
} from "./chunk-HA4BGL6C.js";
|
|
19
|
+
import "./chunk-U67V476Y.js";
|
|
20
|
+
|
|
21
|
+
// ../plugins/src/postmark/api.ts
|
|
22
|
+
var SERVICE = "postmark";
|
|
23
|
+
var API_BASE = "https://api.postmarkapp.com";
|
|
24
|
+
var INVALID_TOKEN_CODE = 10;
|
|
25
|
+
var NOT_FOUND_CODES = /* @__PURE__ */ new Set([12, 701, 1001, 1101]);
|
|
26
|
+
var ACCOUNT_BLOCKED_CODES = /* @__PURE__ */ new Set([405, 412, 413]);
|
|
27
|
+
function responseError(message) {
|
|
28
|
+
return new TBError("unavailable", message, { retryable: true });
|
|
29
|
+
}
|
|
30
|
+
function required(value, field) {
|
|
31
|
+
const result = trimmedText(value);
|
|
32
|
+
if (result === void 0) throw new TBError("invalid_argument", `${field} \u662F\u5FC5\u586B\u7684`);
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
function pathValue(value, field) {
|
|
36
|
+
if (typeof value === "number" && Number.isInteger(value) && value > 0) return String(value);
|
|
37
|
+
return required(value, field);
|
|
38
|
+
}
|
|
39
|
+
function postmarkError(status, payload) {
|
|
40
|
+
const message = trimmedText(payload.Message) ?? `Postmark \u8FD4\u56DE HTTP ${status}`;
|
|
41
|
+
const code = typeof payload.ErrorCode === "number" ? payload.ErrorCode : void 0;
|
|
42
|
+
if (code !== void 0) {
|
|
43
|
+
if (code === INVALID_TOKEN_CODE) return upstreamError(401, message);
|
|
44
|
+
if (NOT_FOUND_CODES.has(code)) return upstreamError(404, message);
|
|
45
|
+
if (ACCOUNT_BLOCKED_CODES.has(code)) return upstreamError(403, message);
|
|
46
|
+
}
|
|
47
|
+
return upstreamError(status, message);
|
|
48
|
+
}
|
|
49
|
+
var http = createAuthedClient({
|
|
50
|
+
baseUrl: API_BASE,
|
|
51
|
+
service: SERVICE,
|
|
52
|
+
auth: { kind: "header", name: "x-postmark-server-token" },
|
|
53
|
+
headers: { accept: "application/json" },
|
|
54
|
+
// ErrorCode 码表比 HTTP 状态准(见文件头),整段覆写而不用标准键序提取。
|
|
55
|
+
mapError: ({ bodyKind, data: payload, status }) => postmarkError(
|
|
56
|
+
status,
|
|
57
|
+
bodyKind === "json" ? asJsonObject(payload) ?? {} : bodyKind === "empty" ? {} : { Message: payload }
|
|
58
|
+
)
|
|
59
|
+
});
|
|
60
|
+
async function request(ctx, input) {
|
|
61
|
+
const { data } = await http.request(ctx, {
|
|
62
|
+
path: input.path,
|
|
63
|
+
method: input.method ?? "GET",
|
|
64
|
+
query: Object.entries(input.query ?? {}),
|
|
65
|
+
...input.body === void 0 ? {} : { json: input.body },
|
|
66
|
+
invalidJsonMessage: "Postmark \u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94"
|
|
67
|
+
});
|
|
68
|
+
if (data === void 0) throw responseError("Postmark \u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94");
|
|
69
|
+
return data;
|
|
70
|
+
}
|
|
71
|
+
function getServer(_input, ctx) {
|
|
72
|
+
return request(ctx, { path: "/server" });
|
|
73
|
+
}
|
|
74
|
+
function sendEmail(input, ctx) {
|
|
75
|
+
return request(ctx, { path: "/email", method: "POST", body: compactDefined({ ...input }) });
|
|
76
|
+
}
|
|
77
|
+
function sendEmailWithTemplate(input, ctx) {
|
|
78
|
+
return request(ctx, { path: "/email/withTemplate", method: "POST", body: compactDefined({ ...input }) });
|
|
79
|
+
}
|
|
80
|
+
function sendBatchWithTemplates(input, ctx) {
|
|
81
|
+
return request(ctx, { path: "/email/batchWithTemplates", method: "POST", body: { Messages: input.Messages } });
|
|
82
|
+
}
|
|
83
|
+
function searchOutboundMessages(input, ctx) {
|
|
84
|
+
const metadata = input.metadata ?? {};
|
|
85
|
+
return request(ctx, {
|
|
86
|
+
path: "/messages/outbound",
|
|
87
|
+
query: {
|
|
88
|
+
...compactDefined({
|
|
89
|
+
count: input.count,
|
|
90
|
+
offset: input.offset,
|
|
91
|
+
recipient: trimmedText(input.recipient),
|
|
92
|
+
fromemail: trimmedText(input.fromemail),
|
|
93
|
+
tag: trimmedText(input.tag),
|
|
94
|
+
status: trimmedText(input.status),
|
|
95
|
+
todate: trimmedText(input.todate),
|
|
96
|
+
fromdate: trimmedText(input.fromdate),
|
|
97
|
+
subject: trimmedText(input.subject),
|
|
98
|
+
messagestream: trimmedText(input.messagestream)
|
|
99
|
+
}),
|
|
100
|
+
// metadata 过滤器摊平成 metadata_<key>=<value>;空值的键整个不发。
|
|
101
|
+
...Object.fromEntries(
|
|
102
|
+
Object.entries(metadata).flatMap(([key, value]) => {
|
|
103
|
+
const item = trimmedText(value);
|
|
104
|
+
return item === void 0 ? [] : [[`metadata_${key}`, item]];
|
|
105
|
+
})
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function getOutboundMessageDetails(input, ctx) {
|
|
111
|
+
const messageId = required(input.messageId, "messageId");
|
|
112
|
+
return request(ctx, { path: `/messages/outbound/${encodeURIComponent(messageId)}/details` });
|
|
113
|
+
}
|
|
114
|
+
function getBounces(input, ctx) {
|
|
115
|
+
return request(ctx, {
|
|
116
|
+
path: "/bounces",
|
|
117
|
+
query: compactDefined({
|
|
118
|
+
count: input.count,
|
|
119
|
+
offset: input.offset,
|
|
120
|
+
type: trimmedText(input.type),
|
|
121
|
+
// `inactive: false` 是一个有意义的筛选值,不能被当成"没给"丢掉。
|
|
122
|
+
inactive: input.inactive,
|
|
123
|
+
emailFilter: trimmedText(input.emailFilter),
|
|
124
|
+
messageID: trimmedText(input.messageID),
|
|
125
|
+
mailboxHash: trimmedText(input.mailboxHash),
|
|
126
|
+
tag: trimmedText(input.tag),
|
|
127
|
+
todate: trimmedText(input.todate),
|
|
128
|
+
fromdate: trimmedText(input.fromdate)
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function listTemplates(input, ctx) {
|
|
133
|
+
return request(ctx, {
|
|
134
|
+
path: "/templates",
|
|
135
|
+
query: compactDefined({
|
|
136
|
+
count: input.count,
|
|
137
|
+
offset: input.offset,
|
|
138
|
+
TemplateType: trimmedText(input.TemplateType),
|
|
139
|
+
LayoutTemplate: trimmedText(input.LayoutTemplate)
|
|
140
|
+
})
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function getTemplate(input, ctx) {
|
|
144
|
+
const id = pathValue(input.templateIdOrAlias, "templateIdOrAlias");
|
|
145
|
+
return request(ctx, { path: `/templates/${encodeURIComponent(id)}` });
|
|
146
|
+
}
|
|
147
|
+
function createTemplate(input, ctx) {
|
|
148
|
+
return request(ctx, { path: "/templates", method: "POST", body: compactDefined({ ...input }) });
|
|
149
|
+
}
|
|
150
|
+
function editTemplate(input, ctx) {
|
|
151
|
+
const { templateIdOrAlias, ...rest } = input;
|
|
152
|
+
const id = pathValue(templateIdOrAlias, "templateIdOrAlias");
|
|
153
|
+
return request(ctx, { path: `/templates/${encodeURIComponent(id)}`, method: "PUT", body: compactDefined({ ...rest }) });
|
|
154
|
+
}
|
|
155
|
+
function validateTemplate(input, ctx) {
|
|
156
|
+
return request(ctx, { path: "/templates/validate", method: "POST", body: compactDefined({ ...input }) });
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// ../plugins/src/postmark/schema.ts
|
|
160
|
+
import { z } from "zod/v4";
|
|
161
|
+
var getServerInput = z.strictObject({});
|
|
162
|
+
var getServerOutput = z.looseObject({}).describe("Additional upstream fields returned by Postmark.");
|
|
163
|
+
var sendEmailInput = z.strictObject({
|
|
164
|
+
From: z.string().min(1).describe("Sender email address or full formatted sender string accepted by Postmark."),
|
|
165
|
+
To: z.string().min(1).describe("Recipient email address string. Multiple recipients are comma separated."),
|
|
166
|
+
Cc: z.string().describe("Cc recipient email address string.").optional(),
|
|
167
|
+
Bcc: z.string().describe("Bcc recipient email address string.").optional(),
|
|
168
|
+
Tag: z.string().describe("Email tag used for categorization and analytics.").optional(),
|
|
169
|
+
ReplyTo: z.string().describe("Reply-To email address override.").optional(),
|
|
170
|
+
Headers: z.array(z.strictObject({
|
|
171
|
+
Name: z.string().min(1).describe("Custom header name.").optional(),
|
|
172
|
+
Value: z.string().describe("Custom header value.").optional()
|
|
173
|
+
})).describe("Custom headers to include on the email.").optional(),
|
|
174
|
+
TrackOpens: z.boolean().describe("Whether open tracking is enabled.").optional(),
|
|
175
|
+
TrackLinks: z.enum(["None", "HtmlAndText", "HtmlOnly", "TextOnly"]).describe("Link tracking mode recognized by the official Postmark API.").optional(),
|
|
176
|
+
Attachments: z.array(z.strictObject({
|
|
177
|
+
Name: z.string().min(1).describe("Attachment file name."),
|
|
178
|
+
Content: z.string().min(1).describe("Base64-encoded attachment content."),
|
|
179
|
+
ContentType: z.string().min(1).describe("Attachment MIME type."),
|
|
180
|
+
ContentID: z.string().min(1).describe("Optional content ID for inline attachments.").optional()
|
|
181
|
+
})).describe("Attachments to include on the email.").optional(),
|
|
182
|
+
Metadata: z.record(z.string(), z.string().describe("Metadata value.")).describe("Custom metadata key-value pairs attached to the message.").optional(),
|
|
183
|
+
MessageStream: z.string().describe("Message stream ID to use when sending the email.").optional(),
|
|
184
|
+
Subject: z.string().min(1).describe("Email subject line."),
|
|
185
|
+
HtmlBody: z.string().describe("HTML body content of the email.").optional(),
|
|
186
|
+
TextBody: z.string().describe("Plain-text body content of the email.").optional()
|
|
187
|
+
});
|
|
188
|
+
var sendEmailOutput = z.looseObject({}).describe("Postmark message submission result.");
|
|
189
|
+
var sendEmailWithTemplateInput = z.strictObject({
|
|
190
|
+
TemplateId: z.int().min(1).describe("Template ID to use when rendering this message.").optional(),
|
|
191
|
+
TemplateAlias: z.string().min(1).describe("Template alias to use when rendering this message.").optional(),
|
|
192
|
+
TemplateModel: z.looseObject({}).describe("Additional upstream fields returned by Postmark."),
|
|
193
|
+
InlineCss: z.boolean().describe("Whether CSS blocks should be inlined into rendered HTML content.").optional(),
|
|
194
|
+
From: z.string().min(1).describe("Sender email address or full formatted sender string accepted by Postmark."),
|
|
195
|
+
To: z.string().min(1).describe("Recipient email address string. Multiple recipients are comma separated."),
|
|
196
|
+
Cc: z.string().describe("Cc recipient email address string.").optional(),
|
|
197
|
+
Bcc: z.string().describe("Bcc recipient email address string.").optional(),
|
|
198
|
+
Tag: z.string().describe("Email tag used for categorization and analytics.").optional(),
|
|
199
|
+
ReplyTo: z.string().describe("Reply-To email address override.").optional(),
|
|
200
|
+
Headers: z.array(z.strictObject({
|
|
201
|
+
Name: z.string().min(1).describe("Custom header name.").optional(),
|
|
202
|
+
Value: z.string().describe("Custom header value.").optional()
|
|
203
|
+
})).describe("Custom headers to include on the email.").optional(),
|
|
204
|
+
TrackOpens: z.boolean().describe("Whether open tracking is enabled.").optional(),
|
|
205
|
+
TrackLinks: z.enum(["None", "HtmlAndText", "HtmlOnly", "TextOnly"]).describe("Link tracking mode recognized by the official Postmark API.").optional(),
|
|
206
|
+
Attachments: z.array(z.strictObject({
|
|
207
|
+
Name: z.string().min(1).describe("Attachment file name."),
|
|
208
|
+
Content: z.string().min(1).describe("Base64-encoded attachment content."),
|
|
209
|
+
ContentType: z.string().min(1).describe("Attachment MIME type."),
|
|
210
|
+
ContentID: z.string().min(1).describe("Optional content ID for inline attachments.").optional()
|
|
211
|
+
})).describe("Attachments to include on the email.").optional(),
|
|
212
|
+
Metadata: z.record(z.string(), z.string().describe("Metadata value.")).describe("Custom metadata key-value pairs attached to the message.").optional(),
|
|
213
|
+
MessageStream: z.string().describe("Message stream ID to use when sending the email.").optional()
|
|
214
|
+
});
|
|
215
|
+
var sendEmailWithTemplateOutput = z.looseObject({}).describe("Postmark message submission result.");
|
|
216
|
+
var sendBatchWithTemplatesInput = z.strictObject({
|
|
217
|
+
Messages: z.array(z.strictObject({
|
|
218
|
+
TemplateId: z.int().min(1).describe("Template ID to use when rendering this message.").optional(),
|
|
219
|
+
TemplateAlias: z.string().min(1).describe("Template alias to use when rendering this message.").optional(),
|
|
220
|
+
TemplateModel: z.looseObject({}).describe("Additional upstream fields returned by Postmark."),
|
|
221
|
+
InlineCss: z.boolean().describe("Whether CSS blocks should be inlined into rendered HTML content.").optional(),
|
|
222
|
+
From: z.string().min(1).describe("Sender email address or full formatted sender string accepted by Postmark."),
|
|
223
|
+
To: z.string().min(1).describe("Recipient email address string. Multiple recipients are comma separated."),
|
|
224
|
+
Cc: z.string().describe("Cc recipient email address string.").optional(),
|
|
225
|
+
Bcc: z.string().describe("Bcc recipient email address string.").optional(),
|
|
226
|
+
Tag: z.string().describe("Email tag used for categorization and analytics.").optional(),
|
|
227
|
+
ReplyTo: z.string().describe("Reply-To email address override.").optional(),
|
|
228
|
+
Headers: z.array(z.strictObject({
|
|
229
|
+
Name: z.string().min(1).describe("Custom header name.").optional(),
|
|
230
|
+
Value: z.string().describe("Custom header value.").optional()
|
|
231
|
+
})).describe("Custom headers to include on the email.").optional(),
|
|
232
|
+
TrackOpens: z.boolean().describe("Whether open tracking is enabled.").optional(),
|
|
233
|
+
TrackLinks: z.enum(["None", "HtmlAndText", "HtmlOnly", "TextOnly"]).describe("Link tracking mode recognized by the official Postmark API.").optional(),
|
|
234
|
+
Attachments: z.array(z.strictObject({
|
|
235
|
+
Name: z.string().min(1).describe("Attachment file name."),
|
|
236
|
+
Content: z.string().min(1).describe("Base64-encoded attachment content."),
|
|
237
|
+
ContentType: z.string().min(1).describe("Attachment MIME type."),
|
|
238
|
+
ContentID: z.string().min(1).describe("Optional content ID for inline attachments.").optional()
|
|
239
|
+
})).describe("Attachments to include on the email.").optional(),
|
|
240
|
+
Metadata: z.record(z.string(), z.string().describe("Metadata value.")).describe("Custom metadata key-value pairs attached to the message.").optional(),
|
|
241
|
+
MessageStream: z.string().describe("Message stream ID to use when sending the email.").optional()
|
|
242
|
+
})).min(1).max(500).describe("Templated messages to send in this batch request.").optional()
|
|
243
|
+
});
|
|
244
|
+
var sendBatchWithTemplatesOutput = z.array(z.looseObject({}).describe("Postmark message submission result.")).describe("Per-message results returned by Postmark batch template sending.");
|
|
245
|
+
var searchOutboundMessagesInput = z.strictObject({
|
|
246
|
+
count: z.int().min(1).max(500).describe("Number of results to return per request.").optional(),
|
|
247
|
+
offset: z.int().min(0).describe("Number of results to skip before returning the current page.").optional(),
|
|
248
|
+
recipient: z.string().describe("Filter by the user who was receiving the email.").optional(),
|
|
249
|
+
fromemail: z.string().describe("Filter by the sender email address.").optional(),
|
|
250
|
+
tag: z.string().describe("Filter by message tag.").optional(),
|
|
251
|
+
status: z.enum(["queued", "sent", "processed"]).describe("Outbound message status filter accepted by Postmark search.").optional(),
|
|
252
|
+
todate: z.string().describe("Filter messages up to this datetime, inclusive.").optional(),
|
|
253
|
+
fromdate: z.string().describe("Filter messages starting from this datetime, inclusive.").optional(),
|
|
254
|
+
subject: z.string().describe("Filter by email subject.").optional(),
|
|
255
|
+
messagestream: z.string().describe("Filter by message stream ID.").optional(),
|
|
256
|
+
metadata: z.record(z.string(), z.string().describe("Metadata value.")).describe("Metadata filters mapped to Postmark metadata_<key> query parameters for outbound search.").optional()
|
|
257
|
+
});
|
|
258
|
+
var searchOutboundMessagesOutput = z.strictObject({
|
|
259
|
+
TotalCount: z.int().describe("Total number of messages that matched the search.").optional(),
|
|
260
|
+
Messages: z.array(z.looseObject({}).describe("Additional upstream fields returned by Postmark.")).describe("Outbound messages returned by the search.").optional()
|
|
261
|
+
});
|
|
262
|
+
var getOutboundMessageDetailsInput = z.strictObject({
|
|
263
|
+
messageId: z.string().min(1).describe("Outbound message ID returned by Postmark.").optional()
|
|
264
|
+
});
|
|
265
|
+
var getOutboundMessageDetailsOutput = z.looseObject({}).describe("Additional upstream fields returned by Postmark.");
|
|
266
|
+
var getBouncesInput = z.strictObject({
|
|
267
|
+
count: z.int().min(1).max(500).describe("Number of results to return per request.").optional(),
|
|
268
|
+
offset: z.int().min(0).describe("Number of results to skip before returning the current page.").optional(),
|
|
269
|
+
type: z.string().describe("Filter by bounce type.").optional(),
|
|
270
|
+
inactive: z.boolean().describe("Whether to return only inactive bounces.").optional(),
|
|
271
|
+
emailFilter: z.string().describe("Filter by bounced email address.").optional(),
|
|
272
|
+
messageID: z.string().describe("Filter by outbound message ID.").optional(),
|
|
273
|
+
mailboxHash: z.string().describe("Filter by the mailbox hash portion of the address.").optional(),
|
|
274
|
+
tag: z.string().describe("Filter by tag.").optional(),
|
|
275
|
+
todate: z.string().describe("Only include bounces before this datetime.").optional(),
|
|
276
|
+
fromdate: z.string().describe("Only include bounces after this datetime.").optional()
|
|
277
|
+
});
|
|
278
|
+
var getBouncesOutput = z.strictObject({
|
|
279
|
+
TotalCount: z.int().describe("Total number of bounces that matched the filter.").optional(),
|
|
280
|
+
Bounces: z.array(z.looseObject({}).describe("Additional upstream fields returned by Postmark.")).describe("Bounces returned by Postmark.").optional()
|
|
281
|
+
});
|
|
282
|
+
var listTemplatesInput = z.strictObject({
|
|
283
|
+
count: z.int().min(1).max(500).describe("Number of results to return per request.").optional(),
|
|
284
|
+
offset: z.int().min(0).describe("Number of results to skip before returning the current page.").optional(),
|
|
285
|
+
TemplateType: z.enum(["Standard", "Layout"]).describe("Template type recognized by the official Postmark API.").optional(),
|
|
286
|
+
LayoutTemplate: z.string().describe("Filter by layout template alias.").optional()
|
|
287
|
+
});
|
|
288
|
+
var listTemplatesOutput = z.strictObject({
|
|
289
|
+
TotalCount: z.int().describe("Total number of templates.").optional(),
|
|
290
|
+
Templates: z.array(z.looseObject({}).describe("Additional upstream fields returned by Postmark.")).describe("Templates returned by Postmark.").optional()
|
|
291
|
+
});
|
|
292
|
+
var getTemplateInput = z.strictObject({
|
|
293
|
+
templateIdOrAlias: z.union([z.int().min(1).describe("Template ID."), z.string().min(1).describe("Template alias.")]).describe("Template ID or template alias accepted by the Postmark path parameter.").optional()
|
|
294
|
+
});
|
|
295
|
+
var getTemplateOutput = z.looseObject({}).describe("Additional upstream fields returned by Postmark.");
|
|
296
|
+
var createTemplateInput = z.strictObject({
|
|
297
|
+
Name: z.string().min(1).describe("Template name."),
|
|
298
|
+
Subject: z.string().describe("Subject content for the template. Required for standard templates.").optional(),
|
|
299
|
+
HtmlBody: z.string().describe("HTML body content of the template.").optional(),
|
|
300
|
+
TextBody: z.string().describe("Plain-text body content of the template.").optional(),
|
|
301
|
+
TemplateType: z.enum(["Standard", "Layout"]).describe("Template type recognized by the official Postmark API.").optional(),
|
|
302
|
+
Alias: z.string().describe("Optional alias that identifies the template within the server.").optional(),
|
|
303
|
+
LayoutTemplate: z.string().describe("Optional layout template alias used by a standard template.").optional()
|
|
304
|
+
});
|
|
305
|
+
var createTemplateOutput = z.looseObject({}).describe("Additional upstream fields returned by Postmark.");
|
|
306
|
+
var editTemplateInput = z.strictObject({
|
|
307
|
+
templateIdOrAlias: z.union([z.int().min(1).describe("Template ID."), z.string().min(1).describe("Template alias.")]).describe("Template ID or template alias accepted by the Postmark path parameter."),
|
|
308
|
+
Name: z.string().min(1).describe("Updated template name."),
|
|
309
|
+
Subject: z.string().describe("Updated template subject content when the template is standard.").optional(),
|
|
310
|
+
HtmlBody: z.string().describe("Updated HTML body content.").optional(),
|
|
311
|
+
TextBody: z.string().describe("Updated plain-text body content.").optional(),
|
|
312
|
+
Alias: z.string().describe("Updated alias that identifies the template within the server.").optional(),
|
|
313
|
+
LayoutTemplate: z.string().describe("Updated layout template alias for a standard template.").optional()
|
|
314
|
+
});
|
|
315
|
+
var editTemplateOutput = z.looseObject({}).describe("Additional upstream fields returned by Postmark.");
|
|
316
|
+
var validateTemplateInput = z.strictObject({
|
|
317
|
+
Subject: z.string().describe("Subject content to validate against Postmark template syntax.").optional(),
|
|
318
|
+
HtmlBody: z.string().describe("HTML body content to validate.").optional(),
|
|
319
|
+
TextBody: z.string().describe("Plain-text body content to validate.").optional(),
|
|
320
|
+
TestRenderModel: z.looseObject({}).describe("Additional upstream fields returned by Postmark."),
|
|
321
|
+
InlineCssForHtmlTestRender: z.boolean().describe("Whether CSS blocks should be inlined when rendering HTML test output.").optional(),
|
|
322
|
+
TemplateType: z.enum(["Standard", "Layout"]).describe("Template type recognized by the official Postmark API.").optional(),
|
|
323
|
+
LayoutTemplate: z.string().describe("Optional layout template alias used while validating a standard template.").optional()
|
|
324
|
+
});
|
|
325
|
+
var validateTemplateOutput = z.looseObject({}).describe("Additional upstream fields returned by Postmark.");
|
|
326
|
+
var postmarkActions = {
|
|
327
|
+
get_server: {
|
|
328
|
+
description: "Get the current Postmark server configuration for the connected server token.",
|
|
329
|
+
effect: "read",
|
|
330
|
+
inputSchema: getServerInput,
|
|
331
|
+
outputSchema: z.toJSONSchema(getServerOutput, { io: "output", unrepresentable: "any" })
|
|
332
|
+
},
|
|
333
|
+
send_email: {
|
|
334
|
+
description: "Send a transactional email through the current Postmark server.",
|
|
335
|
+
effect: "write",
|
|
336
|
+
inputSchema: sendEmailInput,
|
|
337
|
+
outputSchema: z.toJSONSchema(sendEmailOutput, { io: "output", unrepresentable: "any" })
|
|
338
|
+
},
|
|
339
|
+
send_email_with_template: {
|
|
340
|
+
description: "Send a single templated email through the current Postmark server.",
|
|
341
|
+
effect: "write",
|
|
342
|
+
inputSchema: sendEmailWithTemplateInput,
|
|
343
|
+
outputSchema: z.toJSONSchema(sendEmailWithTemplateOutput, { io: "output", unrepresentable: "any" })
|
|
344
|
+
},
|
|
345
|
+
send_batch_with_templates: {
|
|
346
|
+
description: "Send up to 500 templated emails in a single Postmark batch request.",
|
|
347
|
+
effect: "write",
|
|
348
|
+
inputSchema: sendBatchWithTemplatesInput,
|
|
349
|
+
outputSchema: z.toJSONSchema(sendBatchWithTemplatesOutput, { io: "output", unrepresentable: "any" })
|
|
350
|
+
},
|
|
351
|
+
search_outbound_messages: {
|
|
352
|
+
description: "Search outbound Postmark messages with filters and pagination.",
|
|
353
|
+
effect: "read",
|
|
354
|
+
inputSchema: searchOutboundMessagesInput,
|
|
355
|
+
outputSchema: z.toJSONSchema(searchOutboundMessagesOutput, { io: "output", unrepresentable: "any" })
|
|
356
|
+
},
|
|
357
|
+
get_outbound_message_details: {
|
|
358
|
+
description: "Get detailed content and events for one outbound Postmark message.",
|
|
359
|
+
effect: "read",
|
|
360
|
+
inputSchema: getOutboundMessageDetailsInput,
|
|
361
|
+
outputSchema: z.toJSONSchema(getOutboundMessageDetailsOutput, { io: "output", unrepresentable: "any" })
|
|
362
|
+
},
|
|
363
|
+
get_bounces: {
|
|
364
|
+
description: "Get Postmark bounces for the current server with optional filters.",
|
|
365
|
+
effect: "read",
|
|
366
|
+
inputSchema: getBouncesInput,
|
|
367
|
+
outputSchema: z.toJSONSchema(getBouncesOutput, { io: "output", unrepresentable: "any" })
|
|
368
|
+
},
|
|
369
|
+
list_templates: {
|
|
370
|
+
description: "List Postmark templates for the current server.",
|
|
371
|
+
effect: "read",
|
|
372
|
+
inputSchema: listTemplatesInput,
|
|
373
|
+
outputSchema: z.toJSONSchema(listTemplatesOutput, { io: "output", unrepresentable: "any" })
|
|
374
|
+
},
|
|
375
|
+
get_template: {
|
|
376
|
+
description: "Get one Postmark template by template ID or alias.",
|
|
377
|
+
effect: "read",
|
|
378
|
+
inputSchema: getTemplateInput,
|
|
379
|
+
outputSchema: z.toJSONSchema(getTemplateOutput, { io: "output", unrepresentable: "any" })
|
|
380
|
+
},
|
|
381
|
+
create_template: {
|
|
382
|
+
description: "Create a Postmark template.",
|
|
383
|
+
effect: "write",
|
|
384
|
+
inputSchema: createTemplateInput,
|
|
385
|
+
outputSchema: z.toJSONSchema(createTemplateOutput, { io: "output", unrepresentable: "any" })
|
|
386
|
+
},
|
|
387
|
+
edit_template: {
|
|
388
|
+
description: "Edit an existing Postmark template.",
|
|
389
|
+
effect: "write",
|
|
390
|
+
inputSchema: editTemplateInput,
|
|
391
|
+
outputSchema: z.toJSONSchema(editTemplateOutput, { io: "output", unrepresentable: "any" })
|
|
392
|
+
},
|
|
393
|
+
validate_template: {
|
|
394
|
+
description: "Validate Postmark template content and render test output.",
|
|
395
|
+
effect: "write",
|
|
396
|
+
inputSchema: validateTemplateInput,
|
|
397
|
+
outputSchema: z.toJSONSchema(validateTemplateOutput, { io: "output", unrepresentable: "any" })
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
// ../plugins/src/postmark/index.ts
|
|
402
|
+
function createPostmarkPlugin() {
|
|
403
|
+
return createProviderPlugin({
|
|
404
|
+
description: "Postmark",
|
|
405
|
+
credentialProbe: "get_server",
|
|
406
|
+
actions: postmarkActions,
|
|
407
|
+
handlers: {
|
|
408
|
+
get_server: getServer,
|
|
409
|
+
send_email: sendEmail,
|
|
410
|
+
send_email_with_template: sendEmailWithTemplate,
|
|
411
|
+
send_batch_with_templates: sendBatchWithTemplates,
|
|
412
|
+
search_outbound_messages: searchOutboundMessages,
|
|
413
|
+
get_outbound_message_details: getOutboundMessageDetails,
|
|
414
|
+
get_bounces: getBounces,
|
|
415
|
+
list_templates: listTemplates,
|
|
416
|
+
get_template: getTemplate,
|
|
417
|
+
create_template: createTemplate,
|
|
418
|
+
edit_template: editTemplate,
|
|
419
|
+
validate_template: validateTemplate
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
var postmark_default = createPostmarkPlugin();
|
|
424
|
+
export {
|
|
425
|
+
createPostmarkPlugin,
|
|
426
|
+
postmark_default as default
|
|
427
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BNMLA2RC.js";
|
|
4
4
|
import {
|
|
5
5
|
asJsonObject,
|
|
6
6
|
trimmedText
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
createProviderPlugin,
|
|
10
10
|
requireApiKey,
|
|
11
11
|
upstreamError
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-X7ZUTKHR.js";
|
|
13
|
+
import "./chunk-7ISGFRC6.js";
|
|
14
|
+
import "./chunk-UY6ANCOY.js";
|
|
14
15
|
import {
|
|
15
|
-
TBError
|
|
16
|
-
|
|
17
|
-
} from "./chunk-UZM2RXZH.js";
|
|
16
|
+
TBError
|
|
17
|
+
} from "./chunk-HA4BGL6C.js";
|
|
18
18
|
import "./chunk-U67V476Y.js";
|
|
19
19
|
|
|
20
20
|
// ../plugins/src/prerender/api.ts
|
|
@@ -87,57 +87,58 @@ async function getCacheClearStatus(_input, ctx) {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// ../plugins/src/prerender/schema.ts
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
import { z } from "zod/v4";
|
|
91
|
+
var recacheUrlsInput = z.strictObject({
|
|
92
|
+
urls: z.array(z.url().describe("One public URL to cache or recache.")).min(1).describe("The public URLs to cache or recache."),
|
|
93
|
+
adaptiveType: z.enum(["mobile", "desktop"]).describe("The Prerender adaptive cache type to target.").optional()
|
|
93
94
|
}).describe("The input payload for queueing one or more Prerender recache URLs.");
|
|
94
|
-
var recacheUrlsOutput =
|
|
95
|
-
accepted:
|
|
96
|
-
raw:
|
|
95
|
+
var recacheUrlsOutput = z.strictObject({
|
|
96
|
+
accepted: z.boolean().describe("Whether Prerender accepted the request.").optional(),
|
|
97
|
+
raw: z.unknown().describe("The raw Prerender response payload when one was returned.").nullable().optional()
|
|
97
98
|
}).describe("The normalized result for a successful Prerender write request.");
|
|
98
|
-
var addSitemapInput =
|
|
99
|
-
url:
|
|
99
|
+
var addSitemapInput = z.strictObject({
|
|
100
|
+
url: z.url().describe("The sitemap XML URL to submit to Prerender.").optional()
|
|
100
101
|
}).describe("The input payload for submitting a sitemap to Prerender.");
|
|
101
|
-
var addSitemapOutput =
|
|
102
|
-
accepted:
|
|
103
|
-
raw:
|
|
102
|
+
var addSitemapOutput = z.strictObject({
|
|
103
|
+
accepted: z.boolean().describe("Whether Prerender accepted the request.").optional(),
|
|
104
|
+
raw: z.unknown().describe("The raw Prerender response payload when one was returned.").nullable().optional()
|
|
104
105
|
}).describe("The normalized result for a successful Prerender write request.");
|
|
105
|
-
var clearCacheInput =
|
|
106
|
-
query:
|
|
106
|
+
var clearCacheInput = z.strictObject({
|
|
107
|
+
query: z.string().min(1).regex(new RegExp("\\S")).describe("The wildcard query used to match cached URLs to clear, such as https://example.com%.").optional()
|
|
107
108
|
}).describe("The input payload for queueing a Prerender cache clear request.");
|
|
108
|
-
var clearCacheOutput =
|
|
109
|
-
status:
|
|
110
|
-
raw:
|
|
109
|
+
var clearCacheOutput = z.strictObject({
|
|
110
|
+
status: z.enum(["queued", "in_progress"]).describe("The cache clear job state reported by Prerender.").optional(),
|
|
111
|
+
raw: z.unknown().describe("The raw Prerender response payload when one was returned.").nullable().optional()
|
|
111
112
|
}).describe("The normalized result returned by the Prerender cache clear API.");
|
|
112
|
-
var getCacheClearStatusInput =
|
|
113
|
-
var getCacheClearStatusOutput =
|
|
114
|
-
status:
|
|
115
|
-
raw:
|
|
113
|
+
var getCacheClearStatusInput = z.strictObject({}).describe("This action does not require any input parameters.");
|
|
114
|
+
var getCacheClearStatusOutput = z.strictObject({
|
|
115
|
+
status: z.enum(["idle", "in_progress"]).describe("The current cache clear job state reported by Prerender.").optional(),
|
|
116
|
+
raw: z.unknown().describe("The raw Prerender response payload when one was returned.").nullable().optional()
|
|
116
117
|
}).describe("The normalized Prerender cache clear status response.");
|
|
117
118
|
var prerenderActions = {
|
|
118
119
|
recache_urls: {
|
|
119
120
|
description: "Queue one or more URLs for first-time caching or recaching with the Prerender recache API.",
|
|
120
121
|
effect: "write",
|
|
121
122
|
inputSchema: recacheUrlsInput,
|
|
122
|
-
outputSchema:
|
|
123
|
+
outputSchema: z.toJSONSchema(recacheUrlsOutput, { io: "output", unrepresentable: "any" })
|
|
123
124
|
},
|
|
124
125
|
add_sitemap: {
|
|
125
126
|
description: "Submit a sitemap XML URL to Prerender so it can discover and cache new URLs from that sitemap.",
|
|
126
127
|
effect: "write",
|
|
127
128
|
inputSchema: addSitemapInput,
|
|
128
|
-
outputSchema:
|
|
129
|
+
outputSchema: z.toJSONSchema(addSitemapOutput, { io: "output", unrepresentable: "any" })
|
|
129
130
|
},
|
|
130
131
|
clear_cache: {
|
|
131
132
|
description: "Queue a Prerender cache clear request for URLs matching a wildcard query pattern.",
|
|
132
133
|
effect: "write",
|
|
133
134
|
inputSchema: clearCacheInput,
|
|
134
|
-
outputSchema:
|
|
135
|
+
outputSchema: z.toJSONSchema(clearCacheOutput, { io: "output", unrepresentable: "any" })
|
|
135
136
|
},
|
|
136
137
|
get_cache_clear_status: {
|
|
137
138
|
description: "Check whether a Prerender cache clear job is currently running for the authenticated account.",
|
|
138
139
|
effect: "read",
|
|
139
140
|
inputSchema: getCacheClearStatusInput,
|
|
140
|
-
outputSchema:
|
|
141
|
+
outputSchema: z.toJSONSchema(getCacheClearStatusOutput, { io: "output", unrepresentable: "any" })
|
|
141
142
|
}
|
|
142
143
|
};
|
|
143
144
|
|