@tool-bridge/server 0.21.1 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/dist/admin.js +170 -0
  2. package/dist/airtable-VMQVXLHK.js +790 -0
  3. package/dist/{alt_text_generator_ai-W7O34SNG.js → alt_text_generator_ai-FTWY4RU4.js} +12 -11
  4. package/dist/{amap-VOX4T2AW.js → amap-OK5VBHYC.js} +221 -220
  5. package/dist/anthropic-S67AZFZ3.js +203 -0
  6. package/dist/apify-ZE6MYQI3.js +248 -0
  7. package/dist/brave_search-TG2M2KOD.js +302 -0
  8. package/dist/chunk-2JNAI4OC.js +161 -0
  9. package/dist/{chunk-KMTT3I6D.js → chunk-4XJPN3DY.js} +19392 -26136
  10. package/dist/chunk-5ICRY3VU.js +8432 -0
  11. package/dist/chunk-7CTWGTDU.js +302 -0
  12. package/dist/chunk-BADVCN6K.js +378 -0
  13. package/dist/{chunk-XYBU3WZH.js → chunk-TDAWLMDE.js} +3 -3
  14. package/dist/chunk-U7PTOA3U.js +7320 -0
  15. package/dist/{chunk-E6JCVKW6.js → chunk-VWRUGUSU.js} +3 -3
  16. package/dist/{chunk-ATK45BXV.js → chunk-WJHG6OK7.js} +4 -2
  17. package/dist/circleci-3L3WJVSK.js +389 -0
  18. package/dist/clerk-EZPF2V7T.js +1019 -0
  19. package/dist/cohere-U27DPO64.js +185 -0
  20. package/dist/{confluence-B3EWPZVE.js → confluence-G2KL6ERH.js} +105 -104
  21. package/dist/{convertapi-EUWSQYPF.js → convertapi-L4CLJ2M3.js} +32 -31
  22. package/dist/{currencyapi-KVTIK3GL.js → currencyapi-YPYXG7YY.js} +71 -71
  23. package/dist/deepseek-6HT6WF3M.js +210 -0
  24. package/dist/docker_hub-LPE3PCVB.js +933 -0
  25. package/dist/dropbox-V56ABHTA.js +1305 -0
  26. package/dist/dub-6OKQ7MHT.js +680 -0
  27. package/dist/e2b-JS2U2QFU.js +278 -0
  28. package/dist/exa-DPWVYXSP.js +332 -0
  29. package/dist/{fal_ai-23E7JPNT.js → fal_ai-DK6Y27ZF.js} +81 -80
  30. package/dist/{feishu-7QRIDUV6.js → feishu-K7EGSRF3.js} +528 -572
  31. package/dist/{feishu_custom_bot-TJ4K7QNJ.js → feishu_custom_bot-2JUGFYNG.js} +57 -53
  32. package/dist/figma-FT5I7ITD.js +777 -0
  33. package/dist/firehydrant-EIKLKHX2.js +563 -0
  34. package/dist/{fixer-BWON27UO.js → fixer-U5QXIAKD.js} +34 -33
  35. package/dist/fly-T3JYFZ2M.js +469 -0
  36. package/dist/{front-QCGXYEDJ.js → front-D72MGVOR.js} +104 -104
  37. package/dist/geocodio-BOTD5TI5.js +213 -0
  38. package/dist/ghost-KYP7SZGB.js +338 -0
  39. package/dist/github-AGMZT3VY.js +5421 -0
  40. package/dist/gmail-BLJNJOBG.js +1887 -0
  41. package/dist/googlecalendar-GTHWNCF6.js +2524 -0
  42. package/dist/{googledocs-BUHL4J2H.js → googledocs-6EEDMEBQ.js} +341 -340
  43. package/dist/{grafana-GLU2DWF2.js → grafana-GMW6EKSQ.js} +221 -220
  44. package/dist/graphhopper-6OLGBDGB.js +325 -0
  45. package/dist/index.d.ts +1132 -332
  46. package/dist/index.js +31 -14
  47. package/dist/{ip2proxy-EZ64Y4ZH.js → ip2proxy-4QN42E6T.js} +28 -27
  48. package/dist/ipgeolocation_io-SK4XKDA2.js +315 -0
  49. package/dist/ipqualityscore-6ANBPXKT.js +279 -0
  50. package/dist/{jina_ai-EFBHTBXL.js → jina_ai-IHPSVRM5.js} +23 -23
  51. package/dist/{jira-HQSHAA5K.js → jira-46KKM4LC.js} +118 -117
  52. package/dist/langsmith-JZA345I5.js +593 -0
  53. package/dist/lemlist-43IV7DK6.js +289 -0
  54. package/dist/{linear-K7RYFYAD.js → linear-5LFH7XNL.js} +327 -326
  55. package/dist/logsnag-5RMYAHIL.js +150 -0
  56. package/dist/main.js +57 -280
  57. package/dist/{mattermost-S2BRCWLQ.js → mattermost-XFL6SHGG.js} +59 -58
  58. package/dist/mem0-NYO4DTP6.js +544 -0
  59. package/dist/memos-37MPQOLV.js +744 -0
  60. package/dist/{metabase-MMSEPCOF.js → metabase-KYBKZFMG.js} +90 -89
  61. package/dist/mistral_ai-6PL3K4PM.js +1196 -0
  62. package/dist/{mother_duck-H7PCQNZ2.js → mother_duck-2NH7W5M5.js} +94 -93
  63. package/dist/ngrok-UO6CDYCA.js +356 -0
  64. package/dist/{notes-PFMKRO33.js → notes-I3P32WP4.js} +11 -9
  65. package/dist/notion-BEAJFUOE.js +940 -0
  66. package/dist/open_exchange_rates-CMF62JB4.js +215 -0
  67. package/dist/openai-IHOMKVND.js +800 -0
  68. package/dist/opengraph_io-ZQ2FGLHX.js +362 -0
  69. package/dist/openrouter-HXLW3NR5.js +441 -0
  70. package/dist/outline-ELCP4NEU.js +599 -0
  71. package/dist/paddle-O77LALVN.js +454 -0
  72. package/dist/perplexity-JCU654QV.js +220 -0
  73. package/dist/pinecone-W5W4LRKL.js +571 -0
  74. package/dist/{pipedrive-Y2O7QGFF.js → pipedrive-ITMJLLPZ.js} +99 -98
  75. package/dist/polar-R33XU4L3.js +395 -0
  76. package/dist/posthog-JVNTOLTV.js +3464 -0
  77. package/dist/postmark-6SBG7HWV.js +427 -0
  78. package/dist/{prerender-MENYM2TY.js → prerender-GPNKTNFC.js} +31 -30
  79. package/dist/{pubmed-GOXUVVH5.js → pubmed-UP6ZEEIH.js} +239 -238
  80. package/dist/{railway-V2SID4WV.js → railway-KWEWXHTY.js} +118 -117
  81. package/dist/readwise-BLATSMC3.js +470 -0
  82. package/dist/render-QYRVIXII.js +461 -0
  83. package/dist/{replicate-756MXPYX.js → replicate-JYTWH4NF.js} +81 -80
  84. package/dist/{resend-ZKH3BTBI.js → resend-L5N75SZM.js} +20 -16
  85. package/dist/rootly-MHCPEQ26.js +336 -0
  86. package/dist/{scrapfly-NSRHFDIQ.js → scrapfly-PTPGYSJM.js} +62 -61
  87. package/dist/{scrapingbee-OQHLAVEY.js → scrapingbee-JN6UH5PY.js} +56 -56
  88. package/dist/{screenshot_fyi-DVWG3AXC.js → screenshot_fyi-4QRVSV55.js} +16 -16
  89. package/dist/semantic_scholar-LRSWA2GE.js +611 -0
  90. package/dist/{sentry-546MNDJG.js → sentry-2G6PF5W6.js} +208 -207
  91. package/dist/{shodan-C3OON3Z3.js → shodan-WKKPP5C6.js} +62 -61
  92. package/dist/shopify-64YDK5T2.js +610 -0
  93. package/dist/stripe-QAIGGOTF.js +585 -0
  94. package/dist/{supabase-U2SL4D63.js → supabase-WHTGR6ND.js} +245 -244
  95. package/dist/tavily-QIXCDDWO.js +326 -0
  96. package/dist/telegram-E6G7CWI6.js +1767 -0
  97. package/dist/{telnyx-CXQ4EZUX.js → telnyx-ZDVVS7PK.js} +57 -56
  98. package/dist/todoist-DMYF3G7J.js +664 -0
  99. package/dist/trello-HY2RYIRP.js +1080 -0
  100. package/dist/turso-HAQWMGRP.js +416 -0
  101. package/dist/{twilio-4PDBJKWX.js → twilio-MLXYPHJE.js} +70 -69
  102. package/dist/umami-DZHBLPVG.js +389 -0
  103. package/dist/unsplash-GS2OPXKE.js +351 -0
  104. package/dist/{upstash_redis-G4LQBYHA.js → upstash_redis-XMXWTNAJ.js} +51 -50
  105. package/dist/uptimerobot-TF5WRZ4G.js +483 -0
  106. package/dist/v2ex-2BVXAPDF.js +667 -0
  107. package/dist/vercel-YMJGQYJE.js +1076 -0
  108. package/dist/{wolfram_alpha_api-3G4PUJWB.js → wolfram_alpha_api-I56SXWFZ.js} +36 -35
  109. package/dist/wordpress-R7TDFZ2P.js +812 -0
  110. package/dist/workos-HDNHWVMS.js +664 -0
  111. package/dist/zhihu-LX6AGGDS.js +254 -0
  112. package/package.json +18 -9
  113. package/dist/airtable-LLZDFN7M.js +0 -789
  114. package/dist/anthropic-G23NN3X5.js +0 -202
  115. package/dist/apify-Y3SS734K.js +0 -247
  116. package/dist/brave_search-ZC7OAPSZ.js +0 -301
  117. package/dist/chunk-R6P4XAE5.js +0 -248
  118. package/dist/chunk-U7B6DS2O.js +0 -977
  119. package/dist/chunk-UZM2RXZH.js +0 -23436
  120. package/dist/circleci-3BAX5FCG.js +0 -388
  121. package/dist/clerk-6LEM6TNU.js +0 -1019
  122. package/dist/cloudflare_dns-KINYTJUD.js +0 -588
  123. package/dist/cohere-XCJ5AJ6B.js +0 -185
  124. package/dist/deepseek-PC5YGNC5.js +0 -209
  125. package/dist/docker_hub-C3MA5FU6.js +0 -932
  126. package/dist/dropbox-XBV7Z2IR.js +0 -1304
  127. package/dist/dub-LDOFG3HC.js +0 -679
  128. package/dist/e2b-JMCPSVBW.js +0 -277
  129. package/dist/exa-RAK7O7RD.js +0 -331
  130. package/dist/figma-E6IX5DTH.js +0 -773
  131. package/dist/firehydrant-ZBLPQREE.js +0 -562
  132. package/dist/fly-ZH3HFCZJ.js +0 -468
  133. package/dist/geocodio-YGNI7DA4.js +0 -212
  134. package/dist/ghost-EVSGKH2Q.js +0 -337
  135. package/dist/github-MA2BGRCJ.js +0 -5420
  136. package/dist/gmail-E5E6AADE.js +0 -1886
  137. package/dist/googlecalendar-BTLFPXTD.js +0 -2523
  138. package/dist/graphhopper-WSMB3TCD.js +0 -324
  139. package/dist/ipgeolocation_io-AA7HAS22.js +0 -315
  140. package/dist/ipqualityscore-BHJXVTJT.js +0 -277
  141. package/dist/langsmith-5W6SCT6F.js +0 -592
  142. package/dist/lemlist-HJWH6UMK.js +0 -288
  143. package/dist/logsnag-4KFOHL37.js +0 -150
  144. package/dist/mem0-CAW43CIC.js +0 -543
  145. package/dist/memos-TWEGPKFM.js +0 -740
  146. package/dist/mistral_ai-64BGZQHP.js +0 -1195
  147. package/dist/ngrok-GQCUGZKJ.js +0 -356
  148. package/dist/notion-DQWZWP4N.js +0 -936
  149. package/dist/open_exchange_rates-QMMD735E.js +0 -214
  150. package/dist/openai-W6PX32NZ.js +0 -799
  151. package/dist/opengraph_io-HNDBXYNW.js +0 -361
  152. package/dist/openrouter-JJYMEAUL.js +0 -437
  153. package/dist/outline-MCBNQZYY.js +0 -595
  154. package/dist/paddle-D2SKLUDN.js +0 -453
  155. package/dist/perplexity-XIFMKUAE.js +0 -219
  156. package/dist/pinecone-HUFTALV2.js +0 -570
  157. package/dist/polar-TYTOMOSR.js +0 -394
  158. package/dist/posthog-43JAR3VW.js +0 -3463
  159. package/dist/postmark-KL2QJYSG.js +0 -426
  160. package/dist/readwise-CI4GIMMJ.js +0 -469
  161. package/dist/render-SUBJ6YRZ.js +0 -460
  162. package/dist/rootly-CD2LJHPI.js +0 -336
  163. package/dist/semantic_scholar-T4A252KW.js +0 -610
  164. package/dist/shopify-Y2HN2MCQ.js +0 -609
  165. package/dist/stripe-VE3CD3AY.js +0 -584
  166. package/dist/tavily-KCZHK6HE.js +0 -326
  167. package/dist/telegram-3URFBCMY.js +0 -1766
  168. package/dist/todoist-HNPWNYTD.js +0 -663
  169. package/dist/trello-3W2MIXRP.js +0 -1079
  170. package/dist/turso-2EQF7C2Z.js +0 -415
  171. package/dist/umami-5REN7TGP.js +0 -388
  172. package/dist/unsplash-EIXL424F.js +0 -350
  173. package/dist/uptimerobot-KNJ3EYLY.js +0 -482
  174. package/dist/v2ex-RHJ234PZ.js +0 -666
  175. package/dist/vercel-AS6NCIC7.js +0 -1075
  176. package/dist/wordpress-KNDAAUV7.js +0 -811
  177. package/dist/workos-R6UITSJ7.js +0 -663
  178. package/dist/zhihu-AGK4HILK.js +0 -253
@@ -0,0 +1,427 @@
1
+ import {
2
+ createAuthedClient
3
+ } from "./chunk-TDAWLMDE.js";
4
+ import "./chunk-VWRUGUSU.js";
5
+ import {
6
+ asJsonObject,
7
+ compactDefined,
8
+ trimmedText
9
+ } from "./chunk-JXHMDBAY.js";
10
+ import {
11
+ createProviderPlugin,
12
+ upstreamError
13
+ } from "./chunk-WJHG6OK7.js";
14
+ import "./chunk-2JNAI4OC.js";
15
+ import "./chunk-BADVCN6K.js";
16
+ import {
17
+ TBError
18
+ } from "./chunk-5ICRY3VU.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-E6JCVKW6.js";
3
+ } from "./chunk-VWRUGUSU.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-ATK45BXV.js";
13
- import "./chunk-U7B6DS2O.js";
12
+ } from "./chunk-WJHG6OK7.js";
13
+ import "./chunk-2JNAI4OC.js";
14
+ import "./chunk-BADVCN6K.js";
14
15
  import {
15
- TBError,
16
- external_exports
17
- } from "./chunk-UZM2RXZH.js";
16
+ TBError
17
+ } from "./chunk-5ICRY3VU.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
- var recacheUrlsInput = external_exports.strictObject({
91
- urls: external_exports.array(external_exports.url().describe("One public URL to cache or recache.")).min(1).describe("The public URLs to cache or recache."),
92
- adaptiveType: external_exports.enum(["mobile", "desktop"]).describe("The Prerender adaptive cache type to target.").optional()
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 = external_exports.strictObject({
95
- accepted: external_exports.boolean().describe("Whether Prerender accepted the request.").optional(),
96
- raw: external_exports.unknown().describe("The raw Prerender response payload when one was returned.").nullable().optional()
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 = external_exports.strictObject({
99
- url: external_exports.url().describe("The sitemap XML URL to submit to Prerender.").optional()
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 = external_exports.strictObject({
102
- accepted: external_exports.boolean().describe("Whether Prerender accepted the request.").optional(),
103
- raw: external_exports.unknown().describe("The raw Prerender response payload when one was returned.").nullable().optional()
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 = external_exports.strictObject({
106
- query: external_exports.string().min(1).regex(new RegExp("\\S")).describe("The wildcard query used to match cached URLs to clear, such as https://example.com%.").optional()
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 = external_exports.strictObject({
109
- status: external_exports.enum(["queued", "in_progress"]).describe("The cache clear job state reported by Prerender.").optional(),
110
- raw: external_exports.unknown().describe("The raw Prerender response payload when one was returned.").nullable().optional()
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 = external_exports.strictObject({}).describe("This action does not require any input parameters.");
113
- var getCacheClearStatusOutput = external_exports.strictObject({
114
- status: external_exports.enum(["idle", "in_progress"]).describe("The current cache clear job state reported by Prerender.").optional(),
115
- raw: external_exports.unknown().describe("The raw Prerender response payload when one was returned.").nullable().optional()
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: external_exports.toJSONSchema(recacheUrlsOutput, { io: "output", unrepresentable: "any" })
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: external_exports.toJSONSchema(addSitemapOutput, { io: "output", unrepresentable: "any" })
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: external_exports.toJSONSchema(clearCacheOutput, { io: "output", unrepresentable: "any" })
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: external_exports.toJSONSchema(getCacheClearStatusOutput, { io: "output", unrepresentable: "any" })
141
+ outputSchema: z.toJSONSchema(getCacheClearStatusOutput, { io: "output", unrepresentable: "any" })
141
142
  }
142
143
  };
143
144