@tool-bridge/server 0.21.1 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin.js +170 -0
- package/dist/airtable-ML2GIGCH.js +790 -0
- package/dist/{alt_text_generator_ai-W7O34SNG.js → alt_text_generator_ai-FGYQAF2A.js} +12 -11
- package/dist/{amap-VOX4T2AW.js → amap-G7V65NGK.js} +221 -220
- package/dist/anthropic-6ZK24TBB.js +203 -0
- package/dist/apify-VDGYHP6W.js +248 -0
- package/dist/brave_search-TAATLZOS.js +302 -0
- package/dist/chunk-2IAI3XQM.js +302 -0
- package/dist/chunk-7ISGFRC6.js +161 -0
- package/dist/{chunk-E6JCVKW6.js → chunk-BNMLA2RC.js} +3 -3
- package/dist/chunk-HA4BGL6C.js +8429 -0
- package/dist/{chunk-KMTT3I6D.js → chunk-RMAWSG7E.js} +19172 -25717
- package/dist/{chunk-XYBU3WZH.js → chunk-RTW5VRTK.js} +3 -3
- package/dist/chunk-U7PTOA3U.js +7320 -0
- package/dist/chunk-UY6ANCOY.js +378 -0
- package/dist/{chunk-ATK45BXV.js → chunk-X7ZUTKHR.js} +4 -2
- package/dist/circleci-BQ2UWXL2.js +389 -0
- package/dist/clerk-2JYWQNOI.js +1019 -0
- package/dist/cohere-6MI7AQM4.js +185 -0
- package/dist/{confluence-B3EWPZVE.js → confluence-6Y6GDETF.js} +105 -104
- package/dist/{convertapi-EUWSQYPF.js → convertapi-HBZCSWOX.js} +32 -31
- package/dist/{currencyapi-KVTIK3GL.js → currencyapi-337U5TGI.js} +71 -71
- package/dist/deepseek-OSPASO7O.js +210 -0
- package/dist/docker_hub-3ATQOY5L.js +933 -0
- package/dist/dropbox-LSA4GM2Y.js +1305 -0
- package/dist/dub-VZPJSPI6.js +680 -0
- package/dist/e2b-6SDYQZL2.js +278 -0
- package/dist/exa-B6EUYDVP.js +332 -0
- package/dist/{fal_ai-23E7JPNT.js → fal_ai-K4Q27IME.js} +81 -80
- package/dist/{feishu-7QRIDUV6.js → feishu-4TKXG4SU.js} +528 -572
- package/dist/{feishu_custom_bot-TJ4K7QNJ.js → feishu_custom_bot-7CTEAKRB.js} +57 -53
- package/dist/figma-OUKSZLD5.js +777 -0
- package/dist/firehydrant-7MOYL7QH.js +563 -0
- package/dist/{fixer-BWON27UO.js → fixer-H2BV2NO4.js} +34 -33
- package/dist/fly-PXKY6PNH.js +469 -0
- package/dist/{front-QCGXYEDJ.js → front-UZYIV5DW.js} +104 -104
- package/dist/geocodio-NSYO7TFP.js +213 -0
- package/dist/ghost-QBKKQQMF.js +338 -0
- package/dist/github-ENLSJ4CL.js +5421 -0
- package/dist/gmail-KQSDEB47.js +1887 -0
- package/dist/googlecalendar-5YCX4SZF.js +2524 -0
- package/dist/{googledocs-BUHL4J2H.js → googledocs-SSWIVFKA.js} +341 -340
- package/dist/{grafana-GLU2DWF2.js → grafana-TF2LXDQA.js} +221 -220
- package/dist/graphhopper-CURBVHYK.js +325 -0
- package/dist/index.d.ts +1132 -332
- package/dist/index.js +31 -14
- package/dist/{ip2proxy-EZ64Y4ZH.js → ip2proxy-YNVMTZEM.js} +28 -27
- package/dist/ipgeolocation_io-NAU7VJ4J.js +315 -0
- package/dist/ipqualityscore-OT63L4TI.js +279 -0
- package/dist/{jina_ai-EFBHTBXL.js → jina_ai-6WBMBGWM.js} +23 -23
- package/dist/{jira-HQSHAA5K.js → jira-DVDVTHNO.js} +118 -117
- package/dist/langsmith-IM5N4YAU.js +593 -0
- package/dist/lemlist-277SHUQF.js +289 -0
- package/dist/{linear-K7RYFYAD.js → linear-AEPH7B5V.js} +327 -326
- package/dist/logsnag-VEWRAGBG.js +150 -0
- package/dist/main.js +57 -280
- package/dist/{mattermost-S2BRCWLQ.js → mattermost-Q3A2BIZA.js} +59 -58
- package/dist/mem0-AXS7GZGI.js +544 -0
- package/dist/memos-7TXG4ZTU.js +744 -0
- package/dist/{metabase-MMSEPCOF.js → metabase-NSVACWQM.js} +90 -89
- package/dist/mistral_ai-YZ52RGD4.js +1196 -0
- package/dist/{mother_duck-H7PCQNZ2.js → mother_duck-XLLL6FVL.js} +94 -93
- package/dist/ngrok-4O4W3WZW.js +356 -0
- package/dist/{notes-PFMKRO33.js → notes-YTB3TJOO.js} +11 -9
- package/dist/notion-4W4O7J7V.js +940 -0
- package/dist/open_exchange_rates-23QJXVO5.js +215 -0
- package/dist/openai-ZS7GLSLH.js +800 -0
- package/dist/opengraph_io-PMVH7OYI.js +362 -0
- package/dist/openrouter-ONRGFNB6.js +441 -0
- package/dist/outline-UCUYZZ7J.js +599 -0
- package/dist/paddle-35HTKTUL.js +454 -0
- package/dist/perplexity-NVOBYN24.js +220 -0
- package/dist/pinecone-55CJY73C.js +571 -0
- package/dist/{pipedrive-Y2O7QGFF.js → pipedrive-WMCAKS72.js} +99 -98
- package/dist/polar-SM4ZM53B.js +395 -0
- package/dist/posthog-NWCXVXNJ.js +3464 -0
- package/dist/postmark-QJV5PHUQ.js +427 -0
- package/dist/{prerender-MENYM2TY.js → prerender-2W7UT4SC.js} +31 -30
- package/dist/{pubmed-GOXUVVH5.js → pubmed-VVV7XYLU.js} +239 -238
- package/dist/{railway-V2SID4WV.js → railway-KGI57S3O.js} +118 -117
- package/dist/readwise-AGHTQB42.js +470 -0
- package/dist/render-O4HBROCK.js +461 -0
- package/dist/{replicate-756MXPYX.js → replicate-KWBOMX7D.js} +81 -80
- package/dist/{resend-ZKH3BTBI.js → resend-DRH6Y6I4.js} +20 -16
- package/dist/rootly-XGCUDW6X.js +336 -0
- package/dist/{scrapfly-NSRHFDIQ.js → scrapfly-OIQ3OY6L.js} +62 -61
- package/dist/{scrapingbee-OQHLAVEY.js → scrapingbee-OCZO4FHX.js} +56 -56
- package/dist/{screenshot_fyi-DVWG3AXC.js → screenshot_fyi-CUNGFZOC.js} +16 -16
- package/dist/semantic_scholar-3UJRLKES.js +611 -0
- package/dist/{sentry-546MNDJG.js → sentry-5BWVZFJV.js} +208 -207
- package/dist/{shodan-C3OON3Z3.js → shodan-HI37CTEW.js} +62 -61
- package/dist/shopify-LJ2EV2HH.js +610 -0
- package/dist/stripe-3LHMV55K.js +585 -0
- package/dist/{supabase-U2SL4D63.js → supabase-H2KPX3Q2.js} +245 -244
- package/dist/tavily-FBEWGH3Z.js +326 -0
- package/dist/telegram-MYYO3JND.js +1767 -0
- package/dist/{telnyx-CXQ4EZUX.js → telnyx-H4ALEGAX.js} +57 -56
- package/dist/todoist-OBWICA5Q.js +664 -0
- package/dist/trello-GUFUJRWO.js +1080 -0
- package/dist/turso-NIAK4UMS.js +416 -0
- package/dist/{twilio-4PDBJKWX.js → twilio-K6SLK2CX.js} +70 -69
- package/dist/umami-42RS2EPS.js +389 -0
- package/dist/unsplash-V7TOTETT.js +351 -0
- package/dist/{upstash_redis-G4LQBYHA.js → upstash_redis-AWQMB6Y3.js} +51 -50
- package/dist/uptimerobot-AZC2DHOT.js +483 -0
- package/dist/v2ex-4TVRNMLS.js +667 -0
- package/dist/vercel-DPHTJ3XR.js +1076 -0
- package/dist/{wolfram_alpha_api-3G4PUJWB.js → wolfram_alpha_api-XAG7IXBW.js} +36 -35
- package/dist/wordpress-KMPKVGUX.js +812 -0
- package/dist/workos-PKB2YR7S.js +664 -0
- package/dist/zhihu-Y4H4XYPB.js +254 -0
- package/package.json +18 -9
- package/dist/airtable-LLZDFN7M.js +0 -789
- package/dist/anthropic-G23NN3X5.js +0 -202
- package/dist/apify-Y3SS734K.js +0 -247
- package/dist/brave_search-ZC7OAPSZ.js +0 -301
- package/dist/chunk-R6P4XAE5.js +0 -248
- package/dist/chunk-U7B6DS2O.js +0 -977
- package/dist/chunk-UZM2RXZH.js +0 -23436
- package/dist/circleci-3BAX5FCG.js +0 -388
- package/dist/clerk-6LEM6TNU.js +0 -1019
- package/dist/cloudflare_dns-KINYTJUD.js +0 -588
- package/dist/cohere-XCJ5AJ6B.js +0 -185
- package/dist/deepseek-PC5YGNC5.js +0 -209
- package/dist/docker_hub-C3MA5FU6.js +0 -932
- package/dist/dropbox-XBV7Z2IR.js +0 -1304
- package/dist/dub-LDOFG3HC.js +0 -679
- package/dist/e2b-JMCPSVBW.js +0 -277
- package/dist/exa-RAK7O7RD.js +0 -331
- package/dist/figma-E6IX5DTH.js +0 -773
- package/dist/firehydrant-ZBLPQREE.js +0 -562
- package/dist/fly-ZH3HFCZJ.js +0 -468
- package/dist/geocodio-YGNI7DA4.js +0 -212
- package/dist/ghost-EVSGKH2Q.js +0 -337
- package/dist/github-MA2BGRCJ.js +0 -5420
- package/dist/gmail-E5E6AADE.js +0 -1886
- package/dist/googlecalendar-BTLFPXTD.js +0 -2523
- package/dist/graphhopper-WSMB3TCD.js +0 -324
- package/dist/ipgeolocation_io-AA7HAS22.js +0 -315
- package/dist/ipqualityscore-BHJXVTJT.js +0 -277
- package/dist/langsmith-5W6SCT6F.js +0 -592
- package/dist/lemlist-HJWH6UMK.js +0 -288
- package/dist/logsnag-4KFOHL37.js +0 -150
- package/dist/mem0-CAW43CIC.js +0 -543
- package/dist/memos-TWEGPKFM.js +0 -740
- package/dist/mistral_ai-64BGZQHP.js +0 -1195
- package/dist/ngrok-GQCUGZKJ.js +0 -356
- package/dist/notion-DQWZWP4N.js +0 -936
- package/dist/open_exchange_rates-QMMD735E.js +0 -214
- package/dist/openai-W6PX32NZ.js +0 -799
- package/dist/opengraph_io-HNDBXYNW.js +0 -361
- package/dist/openrouter-JJYMEAUL.js +0 -437
- package/dist/outline-MCBNQZYY.js +0 -595
- package/dist/paddle-D2SKLUDN.js +0 -453
- package/dist/perplexity-XIFMKUAE.js +0 -219
- package/dist/pinecone-HUFTALV2.js +0 -570
- package/dist/polar-TYTOMOSR.js +0 -394
- package/dist/posthog-43JAR3VW.js +0 -3463
- package/dist/postmark-KL2QJYSG.js +0 -426
- package/dist/readwise-CI4GIMMJ.js +0 -469
- package/dist/render-SUBJ6YRZ.js +0 -460
- package/dist/rootly-CD2LJHPI.js +0 -336
- package/dist/semantic_scholar-T4A252KW.js +0 -610
- package/dist/shopify-Y2HN2MCQ.js +0 -609
- package/dist/stripe-VE3CD3AY.js +0 -584
- package/dist/tavily-KCZHK6HE.js +0 -326
- package/dist/telegram-3URFBCMY.js +0 -1766
- package/dist/todoist-HNPWNYTD.js +0 -663
- package/dist/trello-3W2MIXRP.js +0 -1079
- package/dist/turso-2EQF7C2Z.js +0 -415
- package/dist/umami-5REN7TGP.js +0 -388
- package/dist/unsplash-EIXL424F.js +0 -350
- package/dist/uptimerobot-KNJ3EYLY.js +0 -482
- package/dist/v2ex-RHJ234PZ.js +0 -666
- package/dist/vercel-AS6NCIC7.js +0 -1075
- package/dist/wordpress-KNDAAUV7.js +0 -811
- package/dist/workos-R6UITSJ7.js +0 -663
- package/dist/zhihu-AGK4HILK.js +0 -253
package/dist/lemlist-HJWH6UMK.js
DELETED
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createAuthedClient
|
|
3
|
-
} from "./chunk-XYBU3WZH.js";
|
|
4
|
-
import "./chunk-E6JCVKW6.js";
|
|
5
|
-
import {
|
|
6
|
-
asJsonObject,
|
|
7
|
-
compactDefined,
|
|
8
|
-
trimmedText
|
|
9
|
-
} from "./chunk-JXHMDBAY.js";
|
|
10
|
-
import {
|
|
11
|
-
createProviderPlugin,
|
|
12
|
-
requireApiKey,
|
|
13
|
-
upstreamError
|
|
14
|
-
} from "./chunk-ATK45BXV.js";
|
|
15
|
-
import "./chunk-U7B6DS2O.js";
|
|
16
|
-
import {
|
|
17
|
-
TBError,
|
|
18
|
-
external_exports
|
|
19
|
-
} from "./chunk-UZM2RXZH.js";
|
|
20
|
-
import "./chunk-U67V476Y.js";
|
|
21
|
-
|
|
22
|
-
// ../plugins/src/lemlist/api.ts
|
|
23
|
-
var SERVICE = "lemlist";
|
|
24
|
-
var API_BASE = "https://api.lemlist.com/api";
|
|
25
|
-
function stringArray(value) {
|
|
26
|
-
return Array.isArray(value) ? value.filter((item) => typeof item === "string") : void 0;
|
|
27
|
-
}
|
|
28
|
-
function objectArray(value) {
|
|
29
|
-
if (!Array.isArray(value)) return void 0;
|
|
30
|
-
return value.map(asJsonObject).filter((item) => item !== void 0);
|
|
31
|
-
}
|
|
32
|
-
function basicAuthHeader(apiKey) {
|
|
33
|
-
const bytes = new TextEncoder().encode(`:${apiKey}`);
|
|
34
|
-
let binary = "";
|
|
35
|
-
for (const byte of bytes) binary += String.fromCharCode(byte);
|
|
36
|
-
return `Basic ${btoa(binary)}`;
|
|
37
|
-
}
|
|
38
|
-
var http = createAuthedClient({
|
|
39
|
-
baseUrl: `${API_BASE}/`,
|
|
40
|
-
service: SERVICE,
|
|
41
|
-
// Basic(用户名留空、key 当密码)不在 helper 的三种头型里,自己拼。
|
|
42
|
-
auth: { kind: "custom", headers: (ctx) => ({ authorization: basicAuthHeader(requireApiKey(ctx, SERVICE)) }) },
|
|
43
|
-
headers: { accept: "application/json" },
|
|
44
|
-
errorMessage: {
|
|
45
|
-
keys: ["message", "error", "reason"],
|
|
46
|
-
fallback: (status) => `lemlist \u8BF7\u6C42\u5931\u8D25,HTTP ${status}`
|
|
47
|
-
},
|
|
48
|
-
mapTransportError: ({ message }) => upstreamError(
|
|
49
|
-
502,
|
|
50
|
-
message === void 0 ? "lemlist \u8BF7\u6C42\u5931\u8D25" : `lemlist \u8BF7\u6C42\u5931\u8D25: ${message}`
|
|
51
|
-
)
|
|
52
|
-
});
|
|
53
|
-
async function request(ctx, path, query = {}) {
|
|
54
|
-
const pairs = [];
|
|
55
|
-
for (const [key, value] of Object.entries(query)) {
|
|
56
|
-
if (typeof value === "number" || typeof value === "string" && value !== "") {
|
|
57
|
-
pairs.push([key, value]);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
const { data } = await http.request(ctx, {
|
|
61
|
-
path,
|
|
62
|
-
query: pairs,
|
|
63
|
-
invalidJson: "text"
|
|
64
|
-
});
|
|
65
|
-
return data ?? null;
|
|
66
|
-
}
|
|
67
|
-
function requireObject(value, message) {
|
|
68
|
-
const object = asJsonObject(value);
|
|
69
|
-
if (object === void 0) throw new TBError("unavailable", message, { retryable: true });
|
|
70
|
-
return object;
|
|
71
|
-
}
|
|
72
|
-
function requireArray(value, message) {
|
|
73
|
-
if (Array.isArray(value)) return value;
|
|
74
|
-
throw new TBError("unavailable", message, { retryable: true });
|
|
75
|
-
}
|
|
76
|
-
function normalizeTeam(value) {
|
|
77
|
-
const team = requireObject(value, "lemlist team \u54CD\u5E94\u5FC5\u987B\u662F JSON \u5BF9\u8C61");
|
|
78
|
-
return compactDefined({
|
|
79
|
-
_id: trimmedText(team._id),
|
|
80
|
-
name: trimmedText(team.name),
|
|
81
|
-
userIds: stringArray(team.userIds),
|
|
82
|
-
createdBy: trimmedText(team.createdBy),
|
|
83
|
-
createdAt: trimmedText(team.createdAt),
|
|
84
|
-
beta: stringArray(team.beta),
|
|
85
|
-
pictureId: trimmedText(team.pictureId),
|
|
86
|
-
customDomain: trimmedText(team.customDomain),
|
|
87
|
-
raw: team
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
function normalizeCampaign(value) {
|
|
91
|
-
const campaign = requireObject(value, "lemlist campaign \u54CD\u5E94\u5FC5\u987B\u662F JSON \u5BF9\u8C61");
|
|
92
|
-
return compactDefined({
|
|
93
|
-
_id: trimmedText(campaign._id),
|
|
94
|
-
name: trimmedText(campaign.name),
|
|
95
|
-
labels: stringArray(campaign.labels),
|
|
96
|
-
createdAt: trimmedText(campaign.createdAt),
|
|
97
|
-
createdBy: trimmedText(campaign.createdBy),
|
|
98
|
-
status: trimmedText(campaign.status),
|
|
99
|
-
sequenceId: trimmedText(campaign.sequenceId),
|
|
100
|
-
scheduleIds: stringArray(campaign.scheduleIds),
|
|
101
|
-
teamId: trimmedText(campaign.teamId),
|
|
102
|
-
hasError: typeof campaign.hasError === "boolean" ? campaign.hasError : void 0,
|
|
103
|
-
errors: stringArray(campaign.errors),
|
|
104
|
-
creator: asJsonObject(campaign.creator),
|
|
105
|
-
senders: objectArray(campaign.senders),
|
|
106
|
-
raw: campaign
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
function normalizeLead(value) {
|
|
110
|
-
const lead = requireObject(value, "lemlist lead \u54CD\u5E94\u5FC5\u987B\u662F JSON \u5BF9\u8C61");
|
|
111
|
-
return compactDefined({
|
|
112
|
-
_id: trimmedText(lead._id),
|
|
113
|
-
contactId: trimmedText(lead.contactId),
|
|
114
|
-
state: trimmedText(lead.state),
|
|
115
|
-
raw: lead
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
async function getTeam(_input, ctx) {
|
|
119
|
-
return { team: normalizeTeam(await request(ctx, "/team")) };
|
|
120
|
-
}
|
|
121
|
-
async function listCampaigns(input, ctx) {
|
|
122
|
-
const payload = await request(ctx, "/campaigns", {
|
|
123
|
-
// lemlist 的 /campaigns 默认还是 v1 形状,固定请求 v2 才拿得到归一函数期望的字段。
|
|
124
|
-
version: "v2",
|
|
125
|
-
limit: input.limit,
|
|
126
|
-
offset: input.offset,
|
|
127
|
-
page: input.page,
|
|
128
|
-
sortBy: input.sortBy,
|
|
129
|
-
sortOrder: input.sortOrder,
|
|
130
|
-
status: input.status,
|
|
131
|
-
createdBy: input.createdBy
|
|
132
|
-
});
|
|
133
|
-
return {
|
|
134
|
-
campaigns: requireArray(payload, "lemlist campaign \u5217\u8868\u5FC5\u987B\u662F\u6570\u7EC4").map(normalizeCampaign)
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
async function getCampaign(input, ctx) {
|
|
138
|
-
const campaignId = input.campaignId?.trim();
|
|
139
|
-
if (campaignId === void 0 || campaignId === "") {
|
|
140
|
-
throw new TBError("invalid_argument", "campaignId is required");
|
|
141
|
-
}
|
|
142
|
-
return { campaign: normalizeCampaign(await request(ctx, `/campaigns/${encodeURIComponent(campaignId)}`)) };
|
|
143
|
-
}
|
|
144
|
-
async function listCampaignLeads(input, ctx) {
|
|
145
|
-
const path = `/campaigns/${encodeURIComponent(input.campaignId.trim())}/leads/`;
|
|
146
|
-
const payload = await request(ctx, path, { state: input.state, limit: input.limit });
|
|
147
|
-
return {
|
|
148
|
-
leads: requireArray(payload, "lemlist lead \u5217\u8868\u5FC5\u987B\u662F\u6570\u7EC4").map(normalizeLead)
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// ../plugins/src/lemlist/schema.ts
|
|
153
|
-
var getTeamInput = external_exports.strictObject({}).describe("Input parameters for retrieving the lemlist team.");
|
|
154
|
-
var getTeamOutput = external_exports.strictObject({
|
|
155
|
-
team: external_exports.looseObject({
|
|
156
|
-
_id: external_exports.string().describe("Unique team identifier."),
|
|
157
|
-
name: external_exports.string().describe("Team name."),
|
|
158
|
-
userIds: external_exports.array(external_exports.string().describe("User ID.")).describe("User IDs in this team.").optional(),
|
|
159
|
-
createdBy: external_exports.string().describe("User ID who created the team.").optional(),
|
|
160
|
-
createdAt: external_exports.string().describe("Date and time when the team was created.").optional(),
|
|
161
|
-
beta: external_exports.array(external_exports.string().describe("Beta feature name.")).describe("Beta features enabled for the team.").optional(),
|
|
162
|
-
pictureId: external_exports.string().describe("Team profile picture file ID.").optional(),
|
|
163
|
-
customDomain: external_exports.string().describe("Custom domain for the team.").optional(),
|
|
164
|
-
raw: external_exports.looseObject({}).describe("Raw team payload returned by lemlist.").optional()
|
|
165
|
-
}).describe("lemlist team information.").optional()
|
|
166
|
-
}).describe("lemlist team response.");
|
|
167
|
-
var listCampaignsInput = external_exports.strictObject({
|
|
168
|
-
limit: external_exports.int().min(1).max(100).describe("Number of campaigns to retrieve. lemlist allows up to 100.").optional(),
|
|
169
|
-
offset: external_exports.int().min(0).describe("Offset from the start for pagination.").optional(),
|
|
170
|
-
page: external_exports.int().min(1).describe("Page number to retrieve.").optional(),
|
|
171
|
-
sortBy: external_exports.enum(["createdAt"]).describe("Field by which to sort campaigns.").optional(),
|
|
172
|
-
sortOrder: external_exports.enum(["asc", "desc"]).describe("Sort direction for campaign listing.").optional(),
|
|
173
|
-
status: external_exports.enum(["running", "draft", "archived", "ended", "paused", "errors"]).describe("Campaign status filter supported by lemlist.").optional(),
|
|
174
|
-
createdBy: external_exports.string().min(1).describe("Creator user ID used to filter campaigns.").optional()
|
|
175
|
-
}).describe("Input parameters for listing lemlist campaigns.");
|
|
176
|
-
var listCampaignsOutput = external_exports.strictObject({
|
|
177
|
-
campaigns: external_exports.array(external_exports.looseObject({
|
|
178
|
-
_id: external_exports.string().describe("Unique campaign identifier."),
|
|
179
|
-
name: external_exports.string().describe("Campaign name."),
|
|
180
|
-
labels: external_exports.array(external_exports.string().describe("Campaign label.")).describe("Categorization labels.").optional(),
|
|
181
|
-
createdAt: external_exports.string().describe("Creation timestamp.").optional(),
|
|
182
|
-
createdBy: external_exports.string().describe("Creator user ID.").optional(),
|
|
183
|
-
status: external_exports.string().describe("Campaign status returned by lemlist.").optional(),
|
|
184
|
-
sequenceId: external_exports.string().describe("Main sequence ID.").optional(),
|
|
185
|
-
scheduleIds: external_exports.array(external_exports.string().describe("Schedule ID.")).describe("Associated schedule IDs.").optional(),
|
|
186
|
-
teamId: external_exports.string().describe("ID of the team that owns this campaign.").optional(),
|
|
187
|
-
hasError: external_exports.boolean().describe("Whether the campaign has errors.").optional(),
|
|
188
|
-
errors: external_exports.array(external_exports.string().describe("Campaign error message.")).describe("Campaign error messages.").optional(),
|
|
189
|
-
creator: external_exports.looseObject({
|
|
190
|
-
userId: external_exports.string().describe("Creator user ID.").optional(),
|
|
191
|
-
userEmail: external_exports.email().describe("Creator email address.").optional()
|
|
192
|
-
}).describe("Campaign creator information.").optional(),
|
|
193
|
-
senders: external_exports.array(external_exports.looseObject({
|
|
194
|
-
id: external_exports.string().describe("Sender user ID.").optional(),
|
|
195
|
-
email: external_exports.email().describe("Sender email address.").optional(),
|
|
196
|
-
sendUserMailboxId: external_exports.string().describe("Mailbox ID used for sending.").optional()
|
|
197
|
-
}).describe("Campaign sender configuration.")).describe("Campaign senders configuration.").optional(),
|
|
198
|
-
raw: external_exports.looseObject({}).describe("Raw campaign payload returned by lemlist.").optional()
|
|
199
|
-
}).describe("lemlist campaign summary or detail.")).describe("Campaigns returned by lemlist.").optional()
|
|
200
|
-
}).describe("lemlist campaign list response.");
|
|
201
|
-
var getCampaignInput = external_exports.strictObject({
|
|
202
|
-
campaignId: external_exports.string().min(1).describe("Unique identifier of the campaign to retrieve.").optional()
|
|
203
|
-
}).describe("Input parameters for retrieving a lemlist campaign.");
|
|
204
|
-
var getCampaignOutput = external_exports.strictObject({
|
|
205
|
-
campaign: external_exports.looseObject({
|
|
206
|
-
_id: external_exports.string().describe("Unique campaign identifier."),
|
|
207
|
-
name: external_exports.string().describe("Campaign name."),
|
|
208
|
-
labels: external_exports.array(external_exports.string().describe("Campaign label.")).describe("Categorization labels.").optional(),
|
|
209
|
-
createdAt: external_exports.string().describe("Creation timestamp.").optional(),
|
|
210
|
-
createdBy: external_exports.string().describe("Creator user ID.").optional(),
|
|
211
|
-
status: external_exports.string().describe("Campaign status returned by lemlist.").optional(),
|
|
212
|
-
sequenceId: external_exports.string().describe("Main sequence ID.").optional(),
|
|
213
|
-
scheduleIds: external_exports.array(external_exports.string().describe("Schedule ID.")).describe("Associated schedule IDs.").optional(),
|
|
214
|
-
teamId: external_exports.string().describe("ID of the team that owns this campaign.").optional(),
|
|
215
|
-
hasError: external_exports.boolean().describe("Whether the campaign has errors.").optional(),
|
|
216
|
-
errors: external_exports.array(external_exports.string().describe("Campaign error message.")).describe("Campaign error messages.").optional(),
|
|
217
|
-
creator: external_exports.looseObject({
|
|
218
|
-
userId: external_exports.string().describe("Creator user ID.").optional(),
|
|
219
|
-
userEmail: external_exports.email().describe("Creator email address.").optional()
|
|
220
|
-
}).describe("Campaign creator information.").optional(),
|
|
221
|
-
senders: external_exports.array(external_exports.looseObject({
|
|
222
|
-
id: external_exports.string().describe("Sender user ID.").optional(),
|
|
223
|
-
email: external_exports.email().describe("Sender email address.").optional(),
|
|
224
|
-
sendUserMailboxId: external_exports.string().describe("Mailbox ID used for sending.").optional()
|
|
225
|
-
}).describe("Campaign sender configuration.")).describe("Campaign senders configuration.").optional(),
|
|
226
|
-
raw: external_exports.looseObject({}).describe("Raw campaign payload returned by lemlist.").optional()
|
|
227
|
-
}).describe("lemlist campaign summary or detail.").optional()
|
|
228
|
-
}).describe("lemlist campaign response.");
|
|
229
|
-
var listCampaignLeadsInput = external_exports.strictObject({
|
|
230
|
-
campaignId: external_exports.string().min(1).describe("Unique identifier of the campaign whose leads should be listed."),
|
|
231
|
-
state: external_exports.string().min(1).describe("Lead state filter such as scanned, contacted, or interested.").optional(),
|
|
232
|
-
limit: external_exports.int().min(1).max(500).describe("Maximum number of leads to return. lemlist allows up to 500.").optional()
|
|
233
|
-
}).describe("Input parameters for listing leads in a lemlist campaign.");
|
|
234
|
-
var listCampaignLeadsOutput = external_exports.strictObject({
|
|
235
|
-
leads: external_exports.array(external_exports.looseObject({
|
|
236
|
-
_id: external_exports.string().describe("Unique lead identifier."),
|
|
237
|
-
contactId: external_exports.string().describe("Associated contact identifier.").optional(),
|
|
238
|
-
state: external_exports.string().describe("Current lead state.").optional(),
|
|
239
|
-
raw: external_exports.looseObject({}).describe("Raw lead payload returned by lemlist.").optional()
|
|
240
|
-
}).describe("lemlist lead summary.")).describe("Leads returned by lemlist.").optional()
|
|
241
|
-
}).describe("lemlist campaign leads response.");
|
|
242
|
-
var lemlistActions = {
|
|
243
|
-
get_team: {
|
|
244
|
-
description: "Retrieve information about the lemlist team for the API key.",
|
|
245
|
-
effect: "read",
|
|
246
|
-
inputSchema: getTeamInput,
|
|
247
|
-
outputSchema: external_exports.toJSONSchema(getTeamOutput, { io: "output", unrepresentable: "any" })
|
|
248
|
-
},
|
|
249
|
-
list_campaigns: {
|
|
250
|
-
description: "List lemlist campaigns with optional pagination and status filters.",
|
|
251
|
-
effect: "read",
|
|
252
|
-
inputSchema: listCampaignsInput,
|
|
253
|
-
outputSchema: external_exports.toJSONSchema(listCampaignsOutput, { io: "output", unrepresentable: "any" })
|
|
254
|
-
},
|
|
255
|
-
get_campaign: {
|
|
256
|
-
description: "Retrieve one lemlist campaign by campaign ID.",
|
|
257
|
-
effect: "read",
|
|
258
|
-
inputSchema: getCampaignInput,
|
|
259
|
-
outputSchema: external_exports.toJSONSchema(getCampaignOutput, { io: "output", unrepresentable: "any" })
|
|
260
|
-
},
|
|
261
|
-
list_campaign_leads: {
|
|
262
|
-
description: "List leads from a lemlist campaign with optional state filtering.",
|
|
263
|
-
effect: "read",
|
|
264
|
-
inputSchema: listCampaignLeadsInput,
|
|
265
|
-
outputSchema: external_exports.toJSONSchema(listCampaignLeadsOutput, { io: "output", unrepresentable: "any" })
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
// ../plugins/src/lemlist/index.ts
|
|
270
|
-
function createLemlistPlugin() {
|
|
271
|
-
return createProviderPlugin({
|
|
272
|
-
description: "lemlist",
|
|
273
|
-
actions: lemlistActions,
|
|
274
|
-
// 上游 credentialValidators 就是打 /team 试凭证,这里对应到同一个 action。
|
|
275
|
-
credentialProbe: "get_team",
|
|
276
|
-
handlers: {
|
|
277
|
-
get_team: getTeam,
|
|
278
|
-
list_campaigns: listCampaigns,
|
|
279
|
-
get_campaign: getCampaign,
|
|
280
|
-
list_campaign_leads: listCampaignLeads
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
var lemlist_default = createLemlistPlugin();
|
|
285
|
-
export {
|
|
286
|
-
createLemlistPlugin,
|
|
287
|
-
lemlist_default as default
|
|
288
|
-
};
|
package/dist/logsnag-4KFOHL37.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createAuthedClient
|
|
3
|
-
} from "./chunk-XYBU3WZH.js";
|
|
4
|
-
import "./chunk-E6JCVKW6.js";
|
|
5
|
-
import "./chunk-JXHMDBAY.js";
|
|
6
|
-
import {
|
|
7
|
-
createProviderPlugin
|
|
8
|
-
} from "./chunk-ATK45BXV.js";
|
|
9
|
-
import "./chunk-U7B6DS2O.js";
|
|
10
|
-
import {
|
|
11
|
-
external_exports
|
|
12
|
-
} from "./chunk-UZM2RXZH.js";
|
|
13
|
-
import "./chunk-U67V476Y.js";
|
|
14
|
-
|
|
15
|
-
// ../plugins/src/logsnag/api.ts
|
|
16
|
-
var SERVICE = "logsnag";
|
|
17
|
-
var http = createAuthedClient({
|
|
18
|
-
baseUrl: "https://api.logsnag.com/v1/",
|
|
19
|
-
service: SERVICE,
|
|
20
|
-
auth: { kind: "bearer" },
|
|
21
|
-
headers: { accept: "application/json" },
|
|
22
|
-
errorMessage: {
|
|
23
|
-
keys: ["message", "error", "detail"],
|
|
24
|
-
fallback: (status) => `LogSnag request failed with ${status}`
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
async function request(path, method, body, ctx) {
|
|
28
|
-
const result = await http.request(ctx, {
|
|
29
|
-
path,
|
|
30
|
-
method,
|
|
31
|
-
json: body,
|
|
32
|
-
responseType: "auto",
|
|
33
|
-
invalidJson: "text"
|
|
34
|
-
});
|
|
35
|
-
return {
|
|
36
|
-
ok: true,
|
|
37
|
-
status: result.status,
|
|
38
|
-
...result.data === void 0 ? {} : { payload: result.data }
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function publishEvent(input, ctx) {
|
|
42
|
-
return request("log", "POST", input, ctx);
|
|
43
|
-
}
|
|
44
|
-
function identifyUser(input, ctx) {
|
|
45
|
-
return request("identify", "POST", input, ctx);
|
|
46
|
-
}
|
|
47
|
-
function publishInsight(input, ctx) {
|
|
48
|
-
return request("insight", "POST", input, ctx);
|
|
49
|
-
}
|
|
50
|
-
function mutateInsight(input, ctx) {
|
|
51
|
-
return request("insight", "PATCH", input, ctx);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// ../plugins/src/logsnag/schema.ts
|
|
55
|
-
var publishEventInput = external_exports.strictObject({
|
|
56
|
-
project: external_exports.string().min(1).describe("The LogSnag project name."),
|
|
57
|
-
channel: external_exports.string().min(1).describe("The LogSnag channel name."),
|
|
58
|
-
event: external_exports.string().min(1).describe("The event name."),
|
|
59
|
-
description: external_exports.string().describe("The optional event description.").optional(),
|
|
60
|
-
icon: external_exports.string().describe("The optional emoji or emoji shortcode shown with the event.").optional(),
|
|
61
|
-
notify: external_exports.boolean().describe("Whether LogSnag should send a push notification.").optional(),
|
|
62
|
-
tags: external_exports.record(external_exports.string(), external_exports.union([external_exports.string().describe("A string value."), external_exports.number().describe("A numeric value."), external_exports.boolean().describe("A boolean value.")]).describe("A string, number, or boolean value accepted by LogSnag.")).describe("A LogSnag key-value object.").optional(),
|
|
63
|
-
parser: external_exports.enum(["markdown", "text"]).describe("The parser LogSnag should apply to the description.").optional(),
|
|
64
|
-
user_id: external_exports.string().describe("The optional user identifier associated with the event.").optional(),
|
|
65
|
-
timestamp: external_exports.number().describe("The optional Unix timestamp in seconds for historical events.").optional()
|
|
66
|
-
}).describe("The payload for publishing a LogSnag event.");
|
|
67
|
-
var publishEventOutput = external_exports.strictObject({
|
|
68
|
-
ok: external_exports.boolean().describe("Whether LogSnag accepted the request."),
|
|
69
|
-
status: external_exports.int().describe("The upstream HTTP status code returned by LogSnag."),
|
|
70
|
-
payload: external_exports.unknown().describe("The parsed JSON response body returned by LogSnag, when present.").optional()
|
|
71
|
-
}).describe("The result returned after LogSnag accepts the request.");
|
|
72
|
-
var identifyUserInput = external_exports.strictObject({
|
|
73
|
-
project: external_exports.string().min(1).describe("The LogSnag project name."),
|
|
74
|
-
user_id: external_exports.string().min(1).describe("The user identifier to update."),
|
|
75
|
-
properties: external_exports.record(external_exports.string(), external_exports.union([external_exports.string().describe("A string value."), external_exports.number().describe("A numeric value."), external_exports.boolean().describe("A boolean value.")]).describe("A string, number, or boolean value accepted by LogSnag.")).describe("A LogSnag key-value object.")
|
|
76
|
-
}).describe("The payload for updating a LogSnag user profile.");
|
|
77
|
-
var identifyUserOutput = external_exports.strictObject({
|
|
78
|
-
ok: external_exports.boolean().describe("Whether LogSnag accepted the request."),
|
|
79
|
-
status: external_exports.int().describe("The upstream HTTP status code returned by LogSnag."),
|
|
80
|
-
payload: external_exports.unknown().describe("The parsed JSON response body returned by LogSnag, when present.").optional()
|
|
81
|
-
}).describe("The result returned after LogSnag accepts the request.");
|
|
82
|
-
var publishInsightInput = external_exports.strictObject({
|
|
83
|
-
project: external_exports.string().min(1).describe("The LogSnag project name."),
|
|
84
|
-
title: external_exports.string().min(1).describe("The insight title."),
|
|
85
|
-
value: external_exports.union([external_exports.string().describe("A string insight value."), external_exports.number().describe("A numeric insight value.")]).describe("The insight value."),
|
|
86
|
-
icon: external_exports.string().describe("The optional emoji or emoji shortcode shown with the insight.").optional()
|
|
87
|
-
}).describe("The payload for publishing a LogSnag insight value.");
|
|
88
|
-
var publishInsightOutput = external_exports.strictObject({
|
|
89
|
-
ok: external_exports.boolean().describe("Whether LogSnag accepted the request."),
|
|
90
|
-
status: external_exports.int().describe("The upstream HTTP status code returned by LogSnag."),
|
|
91
|
-
payload: external_exports.unknown().describe("The parsed JSON response body returned by LogSnag, when present.").optional()
|
|
92
|
-
}).describe("The result returned after LogSnag accepts the request.");
|
|
93
|
-
var mutateInsightInput = external_exports.strictObject({
|
|
94
|
-
project: external_exports.string().min(1).describe("The LogSnag project name."),
|
|
95
|
-
title: external_exports.string().min(1).describe("The insight title."),
|
|
96
|
-
value: external_exports.strictObject({
|
|
97
|
-
$inc: external_exports.number().describe("The numeric amount to increment or decrement the insight value by.")
|
|
98
|
-
}).describe("The LogSnag mutation object."),
|
|
99
|
-
icon: external_exports.string().describe("The optional emoji or emoji shortcode shown with the insight.").optional()
|
|
100
|
-
}).describe("The payload for mutating a numeric LogSnag insight.");
|
|
101
|
-
var mutateInsightOutput = external_exports.strictObject({
|
|
102
|
-
ok: external_exports.boolean().describe("Whether LogSnag accepted the request."),
|
|
103
|
-
status: external_exports.int().describe("The upstream HTTP status code returned by LogSnag."),
|
|
104
|
-
payload: external_exports.unknown().describe("The parsed JSON response body returned by LogSnag, when present.").optional()
|
|
105
|
-
}).describe("The result returned after LogSnag accepts the request.");
|
|
106
|
-
var logsnagActions = {
|
|
107
|
-
publish_event: {
|
|
108
|
-
description: "Publish an event to a LogSnag project channel.",
|
|
109
|
-
effect: "write",
|
|
110
|
-
inputSchema: publishEventInput,
|
|
111
|
-
outputSchema: external_exports.toJSONSchema(publishEventOutput, { io: "output", unrepresentable: "any" })
|
|
112
|
-
},
|
|
113
|
-
identify_user: {
|
|
114
|
-
description: "Add or update key-value properties on a LogSnag user profile.",
|
|
115
|
-
effect: "read",
|
|
116
|
-
inputSchema: identifyUserInput,
|
|
117
|
-
outputSchema: external_exports.toJSONSchema(identifyUserOutput, { io: "output", unrepresentable: "any" })
|
|
118
|
-
},
|
|
119
|
-
publish_insight: {
|
|
120
|
-
description: "Publish the latest value for a LogSnag real-time insight.",
|
|
121
|
-
effect: "write",
|
|
122
|
-
inputSchema: publishInsightInput,
|
|
123
|
-
outputSchema: external_exports.toJSONSchema(publishInsightOutput, { io: "output", unrepresentable: "any" })
|
|
124
|
-
},
|
|
125
|
-
mutate_insight: {
|
|
126
|
-
description: "Increment or decrement an existing numeric LogSnag insight.",
|
|
127
|
-
effect: "write",
|
|
128
|
-
inputSchema: mutateInsightInput,
|
|
129
|
-
outputSchema: external_exports.toJSONSchema(mutateInsightOutput, { io: "output", unrepresentable: "any" })
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
// ../plugins/src/logsnag/index.ts
|
|
134
|
-
function createLogsnagPlugin() {
|
|
135
|
-
return createProviderPlugin({
|
|
136
|
-
description: "LogSnag",
|
|
137
|
-
actions: logsnagActions,
|
|
138
|
-
handlers: {
|
|
139
|
-
publish_event: publishEvent,
|
|
140
|
-
identify_user: identifyUser,
|
|
141
|
-
publish_insight: publishInsight,
|
|
142
|
-
mutate_insight: mutateInsight
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
var logsnag_default = createLogsnagPlugin();
|
|
147
|
-
export {
|
|
148
|
-
createLogsnagPlugin,
|
|
149
|
-
logsnag_default as default
|
|
150
|
-
};
|