@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
@@ -1,388 +0,0 @@
1
- import {
2
- createAuthedClient
3
- } from "./chunk-XYBU3WZH.js";
4
- import "./chunk-E6JCVKW6.js";
5
- import {
6
- asJsonObject,
7
- trimmedText
8
- } from "./chunk-JXHMDBAY.js";
9
- import {
10
- createProviderPlugin,
11
- upstreamError
12
- } from "./chunk-ATK45BXV.js";
13
- import "./chunk-U7B6DS2O.js";
14
- import {
15
- TBError,
16
- external_exports
17
- } from "./chunk-UZM2RXZH.js";
18
- import "./chunk-U67V476Y.js";
19
-
20
- // ../plugins/src/umami/api.ts
21
- var SERVICE = "umami";
22
- var API_BASE = "https://api.umami.is";
23
- var http = createAuthedClient({
24
- baseUrl: `${API_BASE}/`,
25
- service: SERVICE,
26
- auth: { kind: "bearer" },
27
- headers: { accept: "application/json" },
28
- errorMessage: {
29
- // 错误消息藏在 `error`(字符串或对象)与 `message` 三处之一,纯文本体则整段拿来用。
30
- keys: ["error", "error.message", "message"],
31
- fallback: (status, statusText) => statusText || `umami \u8FD4\u56DE HTTP ${status}`
32
- },
33
- mapTransportError: ({ message }) => upstreamError(
34
- 502,
35
- message === void 0 ? "umami \u8BF7\u6C42\u5931\u8D25" : `umami \u8BF7\u6C42\u5931\u8D25: ${message}`
36
- )
37
- });
38
- function requiredText(value, field) {
39
- const text = trimmedText(value);
40
- if (text === void 0) throw new TBError("invalid_argument", `${field} \u4E0D\u80FD\u4E3A\u7A7A`);
41
- return text;
42
- }
43
- async function request(ctx, path, query = {}) {
44
- const response = await http.request(ctx, {
45
- path,
46
- query: Object.entries(query),
47
- invalidJson: "text"
48
- });
49
- if (response.bodyKind === "invalid-json") throw upstreamError(502, "umami \u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94");
50
- return response.bodyKind === "empty" ? null : response.data;
51
- }
52
- function responseRecord(value, field) {
53
- const object = asJsonObject(value);
54
- if (object === void 0) throw upstreamError(502, `umami \u54CD\u5E94\u7684 ${field} \u4E0D\u662F\u5BF9\u8C61`);
55
- return object;
56
- }
57
- function responseArray(value, field) {
58
- if (!Array.isArray(value)) throw upstreamError(502, `umami \u54CD\u5E94\u7684 ${field} \u4E0D\u662F\u6570\u7EC4`);
59
- return value;
60
- }
61
- function objectArray(value, field) {
62
- return responseArray(value, field).map((item) => responseRecord(item, `${field} \u5217\u8868\u9879`));
63
- }
64
- function responseInteger(value, field, min) {
65
- if (typeof value !== "number" || !Number.isInteger(value) || value < min) {
66
- throw upstreamError(502, `umami \u54CD\u5E94\u7684 ${field} \u4E0D\u662F\u5408\u6CD5\u6574\u6570`);
67
- }
68
- return value;
69
- }
70
- function dateRangeQuery(input) {
71
- return {
72
- startAt: String(input.startAt),
73
- endAt: String(input.endAt),
74
- timezone: requiredText(input.timezone, "timezone"),
75
- url: trimmedText(input.url),
76
- referrer: trimmedText(input.referrer),
77
- title: trimmedText(input.title),
78
- host: trimmedText(input.host),
79
- os: trimmedText(input.os),
80
- browser: trimmedText(input.browser),
81
- device: trimmedText(input.device),
82
- country: trimmedText(input.country),
83
- region: trimmedText(input.region),
84
- city: trimmedText(input.city)
85
- };
86
- }
87
- function websitePath(websiteId, suffix = "") {
88
- return `/api/websites/${encodeURIComponent(requiredText(websiteId, "websiteId"))}${suffix}`;
89
- }
90
- function paginated(payload, listKey) {
91
- const envelope = responseRecord(payload, "\u5206\u9875");
92
- return {
93
- [listKey]: objectArray(envelope.data, "data"),
94
- count: responseInteger(envelope.count, "count", 0),
95
- page: responseInteger(envelope.page, "page", 1),
96
- pageSize: responseInteger(envelope.pageSize, "pageSize", 1),
97
- raw: envelope
98
- };
99
- }
100
- async function getCurrentUser(_input, ctx) {
101
- const user = responseRecord(await request(ctx, "/api/me"), "user");
102
- return { user, raw: user };
103
- }
104
- async function listWebsites(input, ctx) {
105
- const payload = await request(ctx, "/api/websites", {
106
- query: trimmedText(input.query),
107
- page: input.page === void 0 ? void 0 : String(input.page),
108
- pageSize: input.pageSize === void 0 ? void 0 : String(input.pageSize)
109
- });
110
- return paginated(payload, "websites");
111
- }
112
- async function getWebsite(input, ctx) {
113
- const website = responseRecord(await request(ctx, websitePath(input.websiteId)), "website");
114
- return { website, raw: website };
115
- }
116
- async function getWebsiteStats(input, ctx) {
117
- const path = websitePath(input.websiteId, "/stats");
118
- const stats = responseRecord(await request(ctx, path, dateRangeQuery(input)), "stats");
119
- return { stats, raw: stats };
120
- }
121
- async function getPageviews(input, ctx) {
122
- const path = websitePath(input.websiteId, "/pageviews");
123
- const query = { ...dateRangeQuery(input), unit: trimmedText(input.unit) };
124
- const pageviews = responseRecord(await request(ctx, path, query), "pageviews");
125
- return { pageviews, raw: pageviews };
126
- }
127
- async function getMetrics(input, ctx) {
128
- const path = websitePath(input.websiteId, "/metrics");
129
- const query = {
130
- ...dateRangeQuery(input),
131
- type: requiredText(input.type, "type"),
132
- limit: input.limit === void 0 ? void 0 : String(input.limit)
133
- };
134
- const payload = await request(ctx, path, query);
135
- return { metrics: objectArray(payload, "metrics"), raw: responseArray(payload, "metrics") };
136
- }
137
- async function getRealtime(input, ctx) {
138
- const path = `/api/realtime/${encodeURIComponent(requiredText(input.websiteId, "websiteId"))}`;
139
- const realtime = responseRecord(await request(ctx, path), "realtime");
140
- return { realtime, raw: realtime };
141
- }
142
- async function listEvents(input, ctx) {
143
- const path = websitePath(input.websiteId, "/events");
144
- const query = {
145
- ...dateRangeQuery(input),
146
- query: trimmedText(input.query),
147
- page: input.page === void 0 ? void 0 : String(input.page),
148
- pageSize: input.pageSize === void 0 ? void 0 : String(input.pageSize)
149
- };
150
- return paginated(await request(ctx, path, query), "events");
151
- }
152
-
153
- // ../plugins/src/umami/schema.ts
154
- var getCurrentUserInput = external_exports.strictObject({}).describe("No input is required to get the current Umami user.");
155
- var getCurrentUserOutput = external_exports.strictObject({
156
- user: external_exports.looseObject({
157
- id: external_exports.string().describe("User ID.").optional(),
158
- username: external_exports.string().describe("Username.").optional(),
159
- role: external_exports.string().describe("User role.").optional(),
160
- isAdmin: external_exports.boolean().describe("Whether the user has administrator privileges.").optional()
161
- }).describe("Umami user profile."),
162
- raw: external_exports.looseObject({}).describe("Raw Umami response payload.")
163
- }).describe("Current Umami user response.");
164
- var listWebsitesInput = external_exports.strictObject({
165
- query: external_exports.string().describe("Search query filter for the endpoint.").optional(),
166
- page: external_exports.int().min(1).describe("One-based page number for paginated Umami endpoints.").optional(),
167
- pageSize: external_exports.int().min(1).describe("Number of items to return per page.").optional()
168
- }).describe("Optional pagination and search parameters for listing Umami websites.");
169
- var listWebsitesOutput = external_exports.strictObject({
170
- websites: external_exports.array(external_exports.looseObject({
171
- id: external_exports.string().describe("Website ID.").optional(),
172
- name: external_exports.string().describe("Website name.").optional(),
173
- domain: external_exports.string().describe("Website domain.").optional(),
174
- shareId: external_exports.string().describe("Public share ID when sharing is enabled.").nullable().optional()
175
- }).describe("Umami website.")).describe("Websites returned by Umami."),
176
- count: external_exports.int().min(0).describe("Total number of websites matching the query."),
177
- page: external_exports.int().min(1).describe("Current page number."),
178
- pageSize: external_exports.int().min(1).describe("Page size used by Umami."),
179
- raw: external_exports.looseObject({
180
- data: external_exports.array(external_exports.looseObject({
181
- id: external_exports.string().describe("Website ID.").optional(),
182
- name: external_exports.string().describe("Website name.").optional(),
183
- domain: external_exports.string().describe("Website domain.").optional(),
184
- shareId: external_exports.string().describe("Public share ID when sharing is enabled.").nullable().optional()
185
- }).describe("Umami website.")).describe("Websites returned by Umami.").optional(),
186
- count: external_exports.int().min(0).describe("Total number of websites matching the query.").optional(),
187
- page: external_exports.int().min(1).describe("Current page number.").optional(),
188
- pageSize: external_exports.int().min(1).describe("Page size used by Umami.").optional()
189
- }).describe("Paginated Umami websites response.")
190
- }).describe("Umami website list response.");
191
- var getWebsiteInput = external_exports.strictObject({
192
- websiteId: external_exports.string().min(1).describe("The Umami website ID.")
193
- }).describe("Request parameters for retrieving an Umami website.");
194
- var getWebsiteOutput = external_exports.strictObject({
195
- website: external_exports.looseObject({
196
- id: external_exports.string().describe("Website ID.").optional(),
197
- name: external_exports.string().describe("Website name.").optional(),
198
- domain: external_exports.string().describe("Website domain.").optional(),
199
- shareId: external_exports.string().describe("Public share ID when sharing is enabled.").nullable().optional()
200
- }).describe("Umami website."),
201
- raw: external_exports.looseObject({}).describe("Raw Umami response payload.")
202
- }).describe("Umami website response.");
203
- var getWebsiteStatsInput = external_exports.strictObject({
204
- websiteId: external_exports.string().min(1).describe("The Umami website ID."),
205
- startAt: external_exports.int().min(0).describe("Start timestamp in milliseconds since the Unix epoch."),
206
- endAt: external_exports.int().min(0).describe("End timestamp in milliseconds since the Unix epoch."),
207
- timezone: external_exports.string().min(1).describe("IANA timezone name used by Umami for date grouping."),
208
- url: external_exports.string().describe("URL path filter for the query.").optional(),
209
- referrer: external_exports.string().describe("Referrer filter for the query.").optional(),
210
- title: external_exports.string().describe("Page title filter for the query.").optional(),
211
- host: external_exports.string().describe("Host filter for the query.").optional(),
212
- os: external_exports.string().describe("Operating system filter for the query.").optional(),
213
- browser: external_exports.string().describe("Browser filter for the query.").optional(),
214
- device: external_exports.string().describe("Device filter for the query.").optional(),
215
- country: external_exports.string().describe("Country filter for the query.").optional(),
216
- region: external_exports.string().describe("Region filter for the query.").optional(),
217
- city: external_exports.string().describe("City filter for the query.").optional()
218
- }).describe("Request parameters for retrieving Umami website statistics.");
219
- var getWebsiteStatsOutput = external_exports.strictObject({
220
- stats: external_exports.looseObject({
221
- pageviews: external_exports.unknown().describe("Pageview count or comparison object returned by Umami.").optional(),
222
- visitors: external_exports.unknown().describe("Visitor count or comparison object returned by Umami.").optional(),
223
- visits: external_exports.unknown().describe("Visit count or comparison object returned by Umami.").optional(),
224
- bounces: external_exports.unknown().describe("Bounce count or comparison object returned by Umami.").optional(),
225
- totaltime: external_exports.unknown().describe("Total time count or comparison object returned by Umami.").optional()
226
- }).describe("Umami website statistics."),
227
- raw: external_exports.looseObject({}).describe("Raw Umami response payload.")
228
- }).describe("Umami website statistics response.");
229
- var getPageviewsInput = external_exports.strictObject({
230
- websiteId: external_exports.string().min(1).describe("The Umami website ID."),
231
- startAt: external_exports.int().min(0).describe("Start timestamp in milliseconds since the Unix epoch."),
232
- endAt: external_exports.int().min(0).describe("End timestamp in milliseconds since the Unix epoch."),
233
- timezone: external_exports.string().min(1).describe("IANA timezone name used by Umami for date grouping."),
234
- url: external_exports.string().describe("URL path filter for the query.").optional(),
235
- referrer: external_exports.string().describe("Referrer filter for the query.").optional(),
236
- title: external_exports.string().describe("Page title filter for the query.").optional(),
237
- host: external_exports.string().describe("Host filter for the query.").optional(),
238
- os: external_exports.string().describe("Operating system filter for the query.").optional(),
239
- browser: external_exports.string().describe("Browser filter for the query.").optional(),
240
- device: external_exports.string().describe("Device filter for the query.").optional(),
241
- country: external_exports.string().describe("Country filter for the query.").optional(),
242
- region: external_exports.string().describe("Region filter for the query.").optional(),
243
- city: external_exports.string().describe("City filter for the query.").optional(),
244
- unit: external_exports.enum(["hour", "day", "month", "year"]).describe("Time unit used for timeseries grouping.").optional()
245
- }).describe("Request parameters for retrieving Umami pageview timeseries.");
246
- var getPageviewsOutput = external_exports.strictObject({
247
- pageviews: external_exports.looseObject({}).describe("Raw Umami response payload."),
248
- raw: external_exports.looseObject({}).describe("Raw Umami response payload.")
249
- }).describe("Umami pageview timeseries response.");
250
- var getMetricsInput = external_exports.strictObject({
251
- websiteId: external_exports.string().min(1).describe("The Umami website ID."),
252
- startAt: external_exports.int().min(0).describe("Start timestamp in milliseconds since the Unix epoch."),
253
- endAt: external_exports.int().min(0).describe("End timestamp in milliseconds since the Unix epoch."),
254
- timezone: external_exports.string().min(1).describe("IANA timezone name used by Umami for date grouping."),
255
- url: external_exports.string().describe("URL path filter for the query.").optional(),
256
- referrer: external_exports.string().describe("Referrer filter for the query.").optional(),
257
- title: external_exports.string().describe("Page title filter for the query.").optional(),
258
- host: external_exports.string().describe("Host filter for the query.").optional(),
259
- os: external_exports.string().describe("Operating system filter for the query.").optional(),
260
- browser: external_exports.string().describe("Browser filter for the query.").optional(),
261
- device: external_exports.string().describe("Device filter for the query.").optional(),
262
- country: external_exports.string().describe("Country filter for the query.").optional(),
263
- region: external_exports.string().describe("Region filter for the query.").optional(),
264
- city: external_exports.string().describe("City filter for the query.").optional(),
265
- type: external_exports.enum(["url", "referrer", "browser", "os", "device", "country", "region", "city", "language", "event"]).describe("Website metric dimension to return."),
266
- limit: external_exports.int().min(1).describe("Maximum number of metric rows to return.").optional()
267
- }).describe("Request parameters for retrieving grouped Umami website metrics.");
268
- var getMetricsOutput = external_exports.strictObject({
269
- metrics: external_exports.array(external_exports.looseObject({
270
- x: external_exports.unknown().describe("Metric dimension value returned by Umami.").optional(),
271
- y: external_exports.number().describe("Metric count returned by Umami.").optional()
272
- }).describe("Umami metric row.")).describe("Metric rows returned by Umami."),
273
- raw: external_exports.array(external_exports.unknown().describe("Raw Umami array item.")).describe("Raw Umami response array.")
274
- }).describe("Umami website metrics response.");
275
- var getRealtimeInput = external_exports.strictObject({
276
- websiteId: external_exports.string().min(1).describe("The Umami website ID.")
277
- }).describe("Request parameters for retrieving Umami realtime data.");
278
- var getRealtimeOutput = external_exports.strictObject({
279
- realtime: external_exports.looseObject({}).describe("Raw Umami response payload."),
280
- raw: external_exports.looseObject({}).describe("Raw Umami response payload.")
281
- }).describe("Umami realtime response.");
282
- var listEventsInput = external_exports.strictObject({
283
- websiteId: external_exports.string().min(1).describe("The Umami website ID."),
284
- startAt: external_exports.int().min(0).describe("Start timestamp in milliseconds since the Unix epoch."),
285
- endAt: external_exports.int().min(0).describe("End timestamp in milliseconds since the Unix epoch."),
286
- timezone: external_exports.string().min(1).describe("IANA timezone name used by Umami for date grouping."),
287
- url: external_exports.string().describe("URL path filter for the query.").optional(),
288
- referrer: external_exports.string().describe("Referrer filter for the query.").optional(),
289
- title: external_exports.string().describe("Page title filter for the query.").optional(),
290
- host: external_exports.string().describe("Host filter for the query.").optional(),
291
- os: external_exports.string().describe("Operating system filter for the query.").optional(),
292
- browser: external_exports.string().describe("Browser filter for the query.").optional(),
293
- device: external_exports.string().describe("Device filter for the query.").optional(),
294
- country: external_exports.string().describe("Country filter for the query.").optional(),
295
- region: external_exports.string().describe("Region filter for the query.").optional(),
296
- city: external_exports.string().describe("City filter for the query.").optional(),
297
- query: external_exports.string().describe("Search query filter for the endpoint.").optional(),
298
- page: external_exports.int().min(1).describe("One-based page number for paginated Umami endpoints.").optional(),
299
- pageSize: external_exports.int().min(1).describe("Number of items to return per page.").optional()
300
- }).describe("Request parameters for listing Umami events.");
301
- var listEventsOutput = external_exports.strictObject({
302
- events: external_exports.array(external_exports.looseObject({
303
- id: external_exports.string().describe("Event ID.").optional(),
304
- websiteId: external_exports.string().describe("Website ID.").optional(),
305
- sessionId: external_exports.string().describe("Session ID.").optional(),
306
- eventName: external_exports.string().describe("Event name.").optional(),
307
- urlPath: external_exports.string().describe("URL path associated with the event.").optional(),
308
- createdAt: external_exports.string().describe("Event creation timestamp returned by Umami.").optional()
309
- }).describe("Umami event row.")).describe("Events returned by Umami."),
310
- count: external_exports.int().min(0).describe("Total number of events matching the query."),
311
- page: external_exports.int().min(1).describe("Current page number."),
312
- pageSize: external_exports.int().min(1).describe("Page size used by Umami."),
313
- raw: external_exports.looseObject({}).describe("Raw Umami event list response.")
314
- }).describe("Umami event list response.");
315
- var umamiActions = {
316
- get_current_user: {
317
- description: "Get the current Umami user for the configured API token.",
318
- effect: "read",
319
- inputSchema: getCurrentUserInput,
320
- outputSchema: external_exports.toJSONSchema(getCurrentUserOutput, { io: "output", unrepresentable: "any" })
321
- },
322
- list_websites: {
323
- description: "List Umami websites available to the configured API token.",
324
- effect: "read",
325
- inputSchema: listWebsitesInput,
326
- outputSchema: external_exports.toJSONSchema(listWebsitesOutput, { io: "output", unrepresentable: "any" })
327
- },
328
- get_website: {
329
- description: "Get metadata for a single Umami website.",
330
- effect: "read",
331
- inputSchema: getWebsiteInput,
332
- outputSchema: external_exports.toJSONSchema(getWebsiteOutput, { io: "output", unrepresentable: "any" })
333
- },
334
- get_website_stats: {
335
- description: "Get aggregate pageview, visitor, visit, bounce, and time statistics for a website.",
336
- effect: "read",
337
- inputSchema: getWebsiteStatsInput,
338
- outputSchema: external_exports.toJSONSchema(getWebsiteStatsOutput, { io: "output", unrepresentable: "any" })
339
- },
340
- get_pageviews: {
341
- description: "Get Umami pageview and session timeseries for a website.",
342
- effect: "read",
343
- inputSchema: getPageviewsInput,
344
- outputSchema: external_exports.toJSONSchema(getPageviewsOutput, { io: "output", unrepresentable: "any" })
345
- },
346
- get_metrics: {
347
- description: "Get grouped Umami website metrics such as URLs, referrers, browsers, or countries.",
348
- effect: "read",
349
- inputSchema: getMetricsInput,
350
- outputSchema: external_exports.toJSONSchema(getMetricsOutput, { io: "output", unrepresentable: "any" })
351
- },
352
- get_realtime: {
353
- description: "Get realtime active visitor data for an Umami website.",
354
- effect: "read",
355
- inputSchema: getRealtimeInput,
356
- outputSchema: external_exports.toJSONSchema(getRealtimeOutput, { io: "output", unrepresentable: "any" })
357
- },
358
- list_events: {
359
- description: "List tracked Umami events for a website within a time range.",
360
- effect: "read",
361
- inputSchema: listEventsInput,
362
- outputSchema: external_exports.toJSONSchema(listEventsOutput, { io: "output", unrepresentable: "any" })
363
- }
364
- };
365
-
366
- // ../plugins/src/umami/index.ts
367
- function createUmamiPlugin() {
368
- return createProviderPlugin({
369
- description: "Umami",
370
- actions: umamiActions,
371
- credentialProbe: "get_current_user",
372
- handlers: {
373
- get_current_user: getCurrentUser,
374
- list_websites: listWebsites,
375
- get_website: getWebsite,
376
- get_website_stats: getWebsiteStats,
377
- get_pageviews: getPageviews,
378
- get_metrics: getMetrics,
379
- get_realtime: getRealtime,
380
- list_events: listEvents
381
- }
382
- });
383
- }
384
- var umami_default = createUmamiPlugin();
385
- export {
386
- createUmamiPlugin,
387
- umami_default as default
388
- };