@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
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createProviderHttpClient
|
|
3
|
-
} from "./chunk-E6JCVKW6.js";
|
|
4
|
-
import {
|
|
5
|
-
messageFrom
|
|
6
|
-
} from "./chunk-JXHMDBAY.js";
|
|
7
|
-
import {
|
|
8
|
-
createProviderPlugin,
|
|
9
|
-
requireApiKey,
|
|
10
|
-
upstreamError
|
|
11
|
-
} from "./chunk-ATK45BXV.js";
|
|
12
|
-
import "./chunk-U7B6DS2O.js";
|
|
13
|
-
import {
|
|
14
|
-
TBError,
|
|
15
|
-
external_exports
|
|
16
|
-
} from "./chunk-UZM2RXZH.js";
|
|
17
|
-
import "./chunk-U67V476Y.js";
|
|
18
|
-
|
|
19
|
-
// ../plugins/src/geocodio/api.ts
|
|
20
|
-
var SERVICE = "geocodio";
|
|
21
|
-
var http = createProviderHttpClient({ baseUrl: "https://api.geocod.io/v1.12/", service: SERVICE });
|
|
22
|
-
async function request(ctx, path, query, body) {
|
|
23
|
-
const apiKey = requireApiKey(ctx, SERVICE);
|
|
24
|
-
const pairs = [
|
|
25
|
-
...Object.entries(query),
|
|
26
|
-
["api_key", apiKey]
|
|
27
|
-
];
|
|
28
|
-
const { data } = await http.request({
|
|
29
|
-
path,
|
|
30
|
-
query: pairs,
|
|
31
|
-
...body === void 0 ? {} : { method: "POST", json: body },
|
|
32
|
-
invalidJson: "text",
|
|
33
|
-
mapError: ({ data: payload, status }) => upstreamError(
|
|
34
|
-
status === 0 ? 502 : status,
|
|
35
|
-
messageFrom(payload, ["error", "message"], "Geocodio request failed")
|
|
36
|
-
),
|
|
37
|
-
mapTransportError: ({ message }) => upstreamError(
|
|
38
|
-
502,
|
|
39
|
-
message === void 0 ? "Geocodio request failed" : `Geocodio request failed: ${message}`
|
|
40
|
-
)
|
|
41
|
-
});
|
|
42
|
-
return data ?? null;
|
|
43
|
-
}
|
|
44
|
-
function singleGeocode(input, ctx) {
|
|
45
|
-
const hasAny = [
|
|
46
|
-
input.q,
|
|
47
|
-
input.street,
|
|
48
|
-
input.street2,
|
|
49
|
-
input.city,
|
|
50
|
-
input.state,
|
|
51
|
-
input.postal_code,
|
|
52
|
-
input.country,
|
|
53
|
-
input.county
|
|
54
|
-
].some((value) => value !== void 0 && value.trim() !== "");
|
|
55
|
-
if (!hasAny) throw new TBError("invalid_argument", "q or at least one address component is required");
|
|
56
|
-
return request(ctx, "geocode", {
|
|
57
|
-
q: input.q,
|
|
58
|
-
street: input.street,
|
|
59
|
-
street2: input.street2,
|
|
60
|
-
city: input.city,
|
|
61
|
-
state: input.state,
|
|
62
|
-
postal_code: input.postal_code,
|
|
63
|
-
country: input.country,
|
|
64
|
-
county: input.county,
|
|
65
|
-
fields: input.fields,
|
|
66
|
-
limit: input.limit,
|
|
67
|
-
format: input.format
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function geocodeBatch(input, ctx) {
|
|
71
|
-
return request(ctx, "geocode", { fields: input.fields, limit: input.limit }, input.addresses);
|
|
72
|
-
}
|
|
73
|
-
function singleReverseGeocode(input, ctx) {
|
|
74
|
-
return request(ctx, "reverse", {
|
|
75
|
-
q: `${input.lat},${input.lng}`,
|
|
76
|
-
fields: input.fields,
|
|
77
|
-
limit: input.limit,
|
|
78
|
-
format: input.format
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function batchReverseGeocode(input, ctx) {
|
|
82
|
-
return request(ctx, "reverse", { fields: input.fields, limit: input.limit }, input.coordinates);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// ../plugins/src/geocodio/schema.ts
|
|
86
|
-
var singleGeocodeInput = external_exports.strictObject({
|
|
87
|
-
q: external_exports.string().min(1).describe("The full address string to geocode.").optional(),
|
|
88
|
-
street: external_exports.string().min(1).describe("The street address component.").optional(),
|
|
89
|
-
street2: external_exports.string().min(1).describe("The secondary street address component.").optional(),
|
|
90
|
-
city: external_exports.string().min(1).describe("The city name used for the lookup.").optional(),
|
|
91
|
-
state: external_exports.string().min(1).describe("The state or province code used for the lookup.").optional(),
|
|
92
|
-
postal_code: external_exports.string().min(1).describe("The postal or ZIP code used for the lookup.").optional(),
|
|
93
|
-
country: external_exports.string().min(1).describe("The country context for the lookup.").optional(),
|
|
94
|
-
county: external_exports.string().min(1).describe("The county name used for the lookup.").optional(),
|
|
95
|
-
fields: external_exports.string().min(1).describe("A comma-separated list of Geocodio data append codes.").optional(),
|
|
96
|
-
limit: external_exports.int().min(0).describe("The maximum number of results to return.").optional(),
|
|
97
|
-
format: external_exports.literal("simple").describe("Return Geocodio's simplified single-result response format.").optional()
|
|
98
|
-
}).describe("The input payload for geocoding a single address with Geocodio.");
|
|
99
|
-
var singleGeocodeOutput = external_exports.looseObject({
|
|
100
|
-
input: external_exports.record(external_exports.string(), external_exports.unknown().describe("A property value in a JSON-like object.")).describe("A JSON-like object with arbitrary string keys.").optional(),
|
|
101
|
-
results: external_exports.array(external_exports.looseObject({
|
|
102
|
-
formatted_address: external_exports.string().describe("The full formatted address.").optional(),
|
|
103
|
-
location: external_exports.looseObject({
|
|
104
|
-
lat: external_exports.number().describe("The latitude coordinate."),
|
|
105
|
-
lng: external_exports.number().describe("The longitude coordinate.")
|
|
106
|
-
}).describe("Latitude and longitude returned by Geocodio.").optional(),
|
|
107
|
-
accuracy: external_exports.number().describe("The match accuracy score from 0.0 to 1.0.").optional(),
|
|
108
|
-
accuracy_type: external_exports.string().describe("The Geocodio accuracy type for the match.").optional(),
|
|
109
|
-
source: external_exports.string().describe("The source dataset for the match.").optional(),
|
|
110
|
-
address_components: external_exports.record(external_exports.string(), external_exports.unknown().describe("A property value in a JSON-like object.")).describe("A JSON-like object with arbitrary string keys.").optional(),
|
|
111
|
-
address_lines: external_exports.array(external_exports.string().describe("One formatted address line.")).describe("Formatted address lines.").optional(),
|
|
112
|
-
fields: external_exports.record(external_exports.string(), external_exports.unknown().describe("A property value in a JSON-like object.")).describe("A JSON-like object with arbitrary string keys.").optional()
|
|
113
|
-
}).describe("A single Geocodio geocoding result.")).describe("The ordered geocoding match results.").optional(),
|
|
114
|
-
lat: external_exports.number().describe("The latitude returned by Geocodio simple format.").optional(),
|
|
115
|
-
lng: external_exports.number().describe("The longitude returned by Geocodio simple format.").optional(),
|
|
116
|
-
address: external_exports.string().describe("The address returned by Geocodio simple format.").optional(),
|
|
117
|
-
source: external_exports.string().describe("The source returned by Geocodio simple format.").optional()
|
|
118
|
-
}).describe("The Geocodio response for a single geocode or reverse geocode request.");
|
|
119
|
-
var geocodeBatchInput = external_exports.strictObject({
|
|
120
|
-
addresses: external_exports.array(external_exports.string().min(1).describe("One address string to geocode.")).min(1).max(1e4).describe("The address strings to geocode in one batch request."),
|
|
121
|
-
fields: external_exports.string().min(1).describe("A comma-separated list of Geocodio data append codes.").optional(),
|
|
122
|
-
limit: external_exports.int().min(0).describe("The maximum number of results per address.").optional()
|
|
123
|
-
}).describe("The input payload for batch geocoding addresses with Geocodio.");
|
|
124
|
-
var geocodeBatchOutput = external_exports.strictObject({
|
|
125
|
-
results: external_exports.array(external_exports.looseObject({
|
|
126
|
-
query: external_exports.string().describe("The original query string from the batch request."),
|
|
127
|
-
response: external_exports.record(external_exports.string(), external_exports.unknown().describe("A property value in a JSON-like object.")).describe("A JSON-like object with arbitrary string keys.")
|
|
128
|
-
}).describe("One batch geocoding or reverse geocoding result.")).describe("The ordered batch response items.")
|
|
129
|
-
}).describe("The Geocodio response for a batch geocoding request.");
|
|
130
|
-
var singleReverseGeocodeInput = external_exports.strictObject({
|
|
131
|
-
lat: external_exports.number().min(-90).max(90).describe("The latitude to reverse geocode."),
|
|
132
|
-
lng: external_exports.number().min(-180).max(180).describe("The longitude to reverse geocode."),
|
|
133
|
-
fields: external_exports.string().min(1).describe("A comma-separated list of Geocodio data append codes.").optional(),
|
|
134
|
-
limit: external_exports.int().min(0).describe("The maximum number of results to return.").optional(),
|
|
135
|
-
format: external_exports.literal("simple").describe("Return Geocodio's simplified single-result response format.").optional()
|
|
136
|
-
}).describe("The input payload for reverse geocoding a single latitude and longitude pair.");
|
|
137
|
-
var singleReverseGeocodeOutput = external_exports.looseObject({
|
|
138
|
-
input: external_exports.record(external_exports.string(), external_exports.unknown().describe("A property value in a JSON-like object.")).describe("A JSON-like object with arbitrary string keys.").optional(),
|
|
139
|
-
results: external_exports.array(external_exports.looseObject({
|
|
140
|
-
formatted_address: external_exports.string().describe("The full formatted address.").optional(),
|
|
141
|
-
location: external_exports.looseObject({
|
|
142
|
-
lat: external_exports.number().describe("The latitude coordinate."),
|
|
143
|
-
lng: external_exports.number().describe("The longitude coordinate.")
|
|
144
|
-
}).describe("Latitude and longitude returned by Geocodio.").optional(),
|
|
145
|
-
accuracy: external_exports.number().describe("The match accuracy score from 0.0 to 1.0.").optional(),
|
|
146
|
-
accuracy_type: external_exports.string().describe("The Geocodio accuracy type for the match.").optional(),
|
|
147
|
-
source: external_exports.string().describe("The source dataset for the match.").optional(),
|
|
148
|
-
address_components: external_exports.record(external_exports.string(), external_exports.unknown().describe("A property value in a JSON-like object.")).describe("A JSON-like object with arbitrary string keys.").optional(),
|
|
149
|
-
address_lines: external_exports.array(external_exports.string().describe("One formatted address line.")).describe("Formatted address lines.").optional(),
|
|
150
|
-
fields: external_exports.record(external_exports.string(), external_exports.unknown().describe("A property value in a JSON-like object.")).describe("A JSON-like object with arbitrary string keys.").optional()
|
|
151
|
-
}).describe("A single Geocodio geocoding result.")).describe("The ordered geocoding match results.").optional(),
|
|
152
|
-
lat: external_exports.number().describe("The latitude returned by Geocodio simple format.").optional(),
|
|
153
|
-
lng: external_exports.number().describe("The longitude returned by Geocodio simple format.").optional(),
|
|
154
|
-
address: external_exports.string().describe("The address returned by Geocodio simple format.").optional(),
|
|
155
|
-
source: external_exports.string().describe("The source returned by Geocodio simple format.").optional()
|
|
156
|
-
}).describe("The Geocodio response for a single geocode or reverse geocode request.");
|
|
157
|
-
var batchReverseGeocodeInput = external_exports.strictObject({
|
|
158
|
-
coordinates: external_exports.array(external_exports.string().min(1).describe("One `latitude,longitude` coordinate string.")).min(1).max(1e4).describe("The coordinate strings to reverse geocode in one batch request."),
|
|
159
|
-
fields: external_exports.string().min(1).describe("A comma-separated list of Geocodio data append codes.").optional(),
|
|
160
|
-
limit: external_exports.int().min(0).describe("The maximum number of results per coordinate.").optional()
|
|
161
|
-
}).describe("The input payload for batch reverse geocoding coordinate pairs with Geocodio.");
|
|
162
|
-
var batchReverseGeocodeOutput = external_exports.strictObject({
|
|
163
|
-
results: external_exports.array(external_exports.looseObject({
|
|
164
|
-
query: external_exports.string().describe("The original query string from the batch request."),
|
|
165
|
-
response: external_exports.record(external_exports.string(), external_exports.unknown().describe("A property value in a JSON-like object.")).describe("A JSON-like object with arbitrary string keys.")
|
|
166
|
-
}).describe("One batch geocoding or reverse geocoding result.")).describe("The ordered batch response items.")
|
|
167
|
-
}).describe("The Geocodio response for a batch geocoding request.");
|
|
168
|
-
var geocodioActions = {
|
|
169
|
-
single_geocode: {
|
|
170
|
-
description: "Geocode a single address and return the official Geocodio response payload.",
|
|
171
|
-
effect: "write",
|
|
172
|
-
inputSchema: singleGeocodeInput,
|
|
173
|
-
outputSchema: external_exports.toJSONSchema(singleGeocodeOutput, { io: "output", unrepresentable: "any" })
|
|
174
|
-
},
|
|
175
|
-
geocode_batch: {
|
|
176
|
-
description: "Geocode multiple addresses in one batch request and return Geocodio batch results.",
|
|
177
|
-
effect: "write",
|
|
178
|
-
inputSchema: geocodeBatchInput,
|
|
179
|
-
outputSchema: external_exports.toJSONSchema(geocodeBatchOutput, { io: "output", unrepresentable: "any" })
|
|
180
|
-
},
|
|
181
|
-
single_reverse_geocode: {
|
|
182
|
-
description: "Reverse geocode a single latitude and longitude pair and return the official Geocodio response payload.",
|
|
183
|
-
effect: "write",
|
|
184
|
-
inputSchema: singleReverseGeocodeInput,
|
|
185
|
-
outputSchema: external_exports.toJSONSchema(singleReverseGeocodeOutput, { io: "output", unrepresentable: "any" })
|
|
186
|
-
},
|
|
187
|
-
batch_reverse_geocode: {
|
|
188
|
-
description: "Reverse geocode multiple coordinate pairs in one batch request and return Geocodio batch results.",
|
|
189
|
-
effect: "write",
|
|
190
|
-
inputSchema: batchReverseGeocodeInput,
|
|
191
|
-
outputSchema: external_exports.toJSONSchema(batchReverseGeocodeOutput, { io: "output", unrepresentable: "any" })
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
// ../plugins/src/geocodio/index.ts
|
|
196
|
-
function createGeocodioPlugin() {
|
|
197
|
-
return createProviderPlugin({
|
|
198
|
-
description: "Geocodio",
|
|
199
|
-
actions: geocodioActions,
|
|
200
|
-
handlers: {
|
|
201
|
-
single_geocode: singleGeocode,
|
|
202
|
-
geocode_batch: geocodeBatch,
|
|
203
|
-
single_reverse_geocode: singleReverseGeocode,
|
|
204
|
-
batch_reverse_geocode: batchReverseGeocode
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
var geocodio_default = createGeocodioPlugin();
|
|
209
|
-
export {
|
|
210
|
-
createGeocodioPlugin,
|
|
211
|
-
geocodio_default as default
|
|
212
|
-
};
|
package/dist/ghost-EVSGKH2Q.js
DELETED
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createProviderHttpClient
|
|
3
|
-
} from "./chunk-E6JCVKW6.js";
|
|
4
|
-
import {
|
|
5
|
-
asJsonObject,
|
|
6
|
-
trimmedText
|
|
7
|
-
} from "./chunk-JXHMDBAY.js";
|
|
8
|
-
import {
|
|
9
|
-
createProviderPlugin,
|
|
10
|
-
requireCredential,
|
|
11
|
-
upstreamError
|
|
12
|
-
} from "./chunk-ATK45BXV.js";
|
|
13
|
-
import {
|
|
14
|
-
assertPublicHttpUrl
|
|
15
|
-
} from "./chunk-U7B6DS2O.js";
|
|
16
|
-
import {
|
|
17
|
-
TBError,
|
|
18
|
-
external_exports
|
|
19
|
-
} from "./chunk-UZM2RXZH.js";
|
|
20
|
-
import "./chunk-U67V476Y.js";
|
|
21
|
-
|
|
22
|
-
// ../plugins/src/ghost/api.ts
|
|
23
|
-
var SERVICE = "ghost";
|
|
24
|
-
var CONTENT_PATH_PREFIX = "/ghost/api/content";
|
|
25
|
-
var CONTENT_API_VERSION = "v5.0";
|
|
26
|
-
var http = createProviderHttpClient({ service: SERVICE });
|
|
27
|
-
function contentBaseUrl(ctx) {
|
|
28
|
-
const raw = requireCredential(ctx, SERVICE, "siteUrl");
|
|
29
|
-
let url;
|
|
30
|
-
try {
|
|
31
|
-
url = assertPublicHttpUrl(raw);
|
|
32
|
-
} catch {
|
|
33
|
-
throw new TBError(
|
|
34
|
-
"invalid_argument",
|
|
35
|
-
"Ghost \u51ED\u8BC1\u91CC\u7684 siteUrl \u4E0D\u662F\u53EF\u51FA\u7AD9\u7684\u516C\u7F51 http(s) \u5730\u5740 \u2014\u2014 \u63D2\u4EF6\u4F1A\u62E6\u4E0B\u79C1\u6709\u7F51\u6BB5\u3001\u56DE\u73AF\u4E0E\u4E91\u5143\u6570\u636E\u5730\u5740(\u9632 SSRF)\u3002\u8BF7\u628A\u8FD9\u4E2A Ghost \u7AD9\u70B9\u7684\u516C\u5F00\u5730\u5740\u586B\u8FDB\u51ED\u8BC1\u7684 siteUrl \u5B57\u6BB5"
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
if (url.username !== "" || url.password !== "") {
|
|
39
|
-
throw new TBError("invalid_argument", "Ghost \u51ED\u8BC1\u91CC\u7684 siteUrl \u4E0D\u80FD\u5185\u5D4C\u7528\u6237\u540D\u6216\u5BC6\u7801");
|
|
40
|
-
}
|
|
41
|
-
url.hash = "";
|
|
42
|
-
url.search = "";
|
|
43
|
-
url.pathname = url.pathname.replace(/\/+$/, "");
|
|
44
|
-
const site = url.toString().replace(/\/$/, "");
|
|
45
|
-
return `${site}${CONTENT_PATH_PREFIX}/${CONTENT_API_VERSION}`;
|
|
46
|
-
}
|
|
47
|
-
function errorMessage(status, payload) {
|
|
48
|
-
const body = asJsonObject(payload);
|
|
49
|
-
const errors = body?.errors;
|
|
50
|
-
if (Array.isArray(errors)) {
|
|
51
|
-
const message = trimmedText(asJsonObject(errors[0])?.message);
|
|
52
|
-
if (message !== void 0) return message;
|
|
53
|
-
}
|
|
54
|
-
return trimmedText(body?.message) ?? `Ghost \u8FD4\u56DE HTTP ${status}`;
|
|
55
|
-
}
|
|
56
|
-
function errorPayload(data, bodyKind) {
|
|
57
|
-
return bodyKind === "invalid-json" ? { message: data } : data;
|
|
58
|
-
}
|
|
59
|
-
async function request(ctx, path, query = {}) {
|
|
60
|
-
const result = await http.request({
|
|
61
|
-
// base 里已经带 /ghost/api/content/v5.0;薄层会保住这段部署路径。
|
|
62
|
-
baseUrl: `${contentBaseUrl(ctx)}/`,
|
|
63
|
-
path,
|
|
64
|
-
query: [
|
|
65
|
-
["key", requireCredential(ctx, SERVICE, "apiKey")],
|
|
66
|
-
...Object.entries(query)
|
|
67
|
-
],
|
|
68
|
-
headers: { accept: "application/json" },
|
|
69
|
-
invalidJsonMessage: "Ghost \u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94",
|
|
70
|
-
mapError: ({ bodyKind, data, status }) => upstreamError(
|
|
71
|
-
status,
|
|
72
|
-
errorMessage(status, errorPayload(data, bodyKind))
|
|
73
|
-
)
|
|
74
|
-
});
|
|
75
|
-
return result.data === void 0 ? {} : result.data;
|
|
76
|
-
}
|
|
77
|
-
function browseQuery(input) {
|
|
78
|
-
return {
|
|
79
|
-
limit: input.limit,
|
|
80
|
-
page: input.page,
|
|
81
|
-
include: trimmedText(input.include),
|
|
82
|
-
fields: trimmedText(input.fields),
|
|
83
|
-
formats: trimmedText(input.formats),
|
|
84
|
-
filter: trimmedText(input.filter),
|
|
85
|
-
order: trimmedText(input.order)
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
function readQuery(input) {
|
|
89
|
-
return {
|
|
90
|
-
include: trimmedText(input.include),
|
|
91
|
-
fields: trimmedText(input.fields),
|
|
92
|
-
formats: trimmedText(input.formats)
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
async function browse(input, ctx, collection) {
|
|
96
|
-
const payload = asJsonObject(await request(ctx, `/${collection}/`, browseQuery(input))) ?? {};
|
|
97
|
-
const items = payload[collection];
|
|
98
|
-
return {
|
|
99
|
-
[collection]: Array.isArray(items) ? items.map((item) => asJsonObject(item) ?? {}) : [],
|
|
100
|
-
meta: asJsonObject(payload.meta) ?? null
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
async function read(input, ctx, collection) {
|
|
104
|
-
const id = trimmedText(input.id);
|
|
105
|
-
const slug = trimmedText(input.slug);
|
|
106
|
-
if (id === void 0 && slug === void 0) {
|
|
107
|
-
throw new TBError("invalid_argument", "id or slug is required");
|
|
108
|
-
}
|
|
109
|
-
const path = id === void 0 ? `/${collection}/slug/${encodeURIComponent(slug)}/` : `/${collection}/${encodeURIComponent(id)}/`;
|
|
110
|
-
const payload = asJsonObject(await request(ctx, path, readQuery(input))) ?? {};
|
|
111
|
-
const items = payload[collection];
|
|
112
|
-
const resource = Array.isArray(items) ? asJsonObject(items[0]) : void 0;
|
|
113
|
-
return { [collection.slice(0, -1)]: resource ?? null };
|
|
114
|
-
}
|
|
115
|
-
function listPosts(input, ctx) {
|
|
116
|
-
return browse(input, ctx, "posts");
|
|
117
|
-
}
|
|
118
|
-
function getPost(input, ctx) {
|
|
119
|
-
return read(input, ctx, "posts");
|
|
120
|
-
}
|
|
121
|
-
function listPages(input, ctx) {
|
|
122
|
-
return browse(input, ctx, "pages");
|
|
123
|
-
}
|
|
124
|
-
function getPage(input, ctx) {
|
|
125
|
-
return read(input, ctx, "pages");
|
|
126
|
-
}
|
|
127
|
-
function listTags(input, ctx) {
|
|
128
|
-
return browse(input, ctx, "tags");
|
|
129
|
-
}
|
|
130
|
-
function getTag(input, ctx) {
|
|
131
|
-
return read(input, ctx, "tags");
|
|
132
|
-
}
|
|
133
|
-
function listAuthors(input, ctx) {
|
|
134
|
-
return browse(input, ctx, "authors");
|
|
135
|
-
}
|
|
136
|
-
function getAuthor(input, ctx) {
|
|
137
|
-
return read(input, ctx, "authors");
|
|
138
|
-
}
|
|
139
|
-
async function readSettings(_input, ctx) {
|
|
140
|
-
const payload = asJsonObject(await request(ctx, "/settings/"));
|
|
141
|
-
return { settings: asJsonObject(payload?.settings) ?? null };
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// ../plugins/src/ghost/schema.ts
|
|
145
|
-
var listPostsInput = external_exports.strictObject({
|
|
146
|
-
limit: external_exports.int().min(1).max(100).describe("The maximum number of resources to request from Ghost.").optional(),
|
|
147
|
-
page: external_exports.int().min(1).describe("The one-based page number to request from Ghost.").optional(),
|
|
148
|
-
include: external_exports.string().min(1).describe("Comma-separated Ghost include expression, such as authors,tags or count.posts.").optional(),
|
|
149
|
-
fields: external_exports.string().min(1).describe("Comma-separated Ghost field list to return.").optional(),
|
|
150
|
-
formats: external_exports.string().min(1).describe("Comma-separated Ghost formats to return, such as html,plaintext.").optional(),
|
|
151
|
-
filter: external_exports.string().min(1).describe("Ghost Content API filter expression.").optional(),
|
|
152
|
-
order: external_exports.string().min(1).describe("Ghost Content API order expression.").optional()
|
|
153
|
-
}).describe("Input for browsing Ghost content resources.");
|
|
154
|
-
var listPostsOutput = external_exports.strictObject({
|
|
155
|
-
posts: external_exports.array(external_exports.looseObject({}).describe("The raw Ghost Content API object.")).describe("The Ghost posts returned by the Content API.").optional(),
|
|
156
|
-
meta: external_exports.looseObject({}).describe("The Ghost Content API pagination metadata.").nullable().optional()
|
|
157
|
-
}).describe("Ghost posts browse response.");
|
|
158
|
-
var getPostInput = external_exports.strictObject({
|
|
159
|
-
id: external_exports.string().min(1).describe("The Ghost resource ID.").optional(),
|
|
160
|
-
slug: external_exports.string().min(1).describe("The Ghost resource slug.").optional(),
|
|
161
|
-
include: external_exports.string().min(1).describe("Comma-separated Ghost include expression, such as authors,tags or count.posts.").optional(),
|
|
162
|
-
fields: external_exports.string().min(1).describe("Comma-separated Ghost field list to return.").optional(),
|
|
163
|
-
formats: external_exports.string().min(1).describe("Comma-separated Ghost formats to return, such as html,plaintext.").optional()
|
|
164
|
-
}).describe("Input for reading one Ghost content resource.");
|
|
165
|
-
var getPostOutput = external_exports.strictObject({
|
|
166
|
-
post: external_exports.looseObject({}).describe("The raw Ghost Content API object.").nullable().optional()
|
|
167
|
-
}).describe("Ghost post read response.");
|
|
168
|
-
var listPagesInput = external_exports.strictObject({
|
|
169
|
-
limit: external_exports.int().min(1).max(100).describe("The maximum number of resources to request from Ghost.").optional(),
|
|
170
|
-
page: external_exports.int().min(1).describe("The one-based page number to request from Ghost.").optional(),
|
|
171
|
-
include: external_exports.string().min(1).describe("Comma-separated Ghost include expression, such as authors,tags or count.posts.").optional(),
|
|
172
|
-
fields: external_exports.string().min(1).describe("Comma-separated Ghost field list to return.").optional(),
|
|
173
|
-
formats: external_exports.string().min(1).describe("Comma-separated Ghost formats to return, such as html,plaintext.").optional(),
|
|
174
|
-
filter: external_exports.string().min(1).describe("Ghost Content API filter expression.").optional(),
|
|
175
|
-
order: external_exports.string().min(1).describe("Ghost Content API order expression.").optional()
|
|
176
|
-
}).describe("Input for browsing Ghost content resources.");
|
|
177
|
-
var listPagesOutput = external_exports.strictObject({
|
|
178
|
-
pages: external_exports.array(external_exports.looseObject({}).describe("The raw Ghost Content API object.")).describe("The Ghost pages returned by the Content API.").optional(),
|
|
179
|
-
meta: external_exports.looseObject({}).describe("The Ghost Content API pagination metadata.").nullable().optional()
|
|
180
|
-
}).describe("Ghost pages browse response.");
|
|
181
|
-
var getPageInput = external_exports.strictObject({
|
|
182
|
-
id: external_exports.string().min(1).describe("The Ghost resource ID.").optional(),
|
|
183
|
-
slug: external_exports.string().min(1).describe("The Ghost resource slug.").optional(),
|
|
184
|
-
include: external_exports.string().min(1).describe("Comma-separated Ghost include expression, such as authors,tags or count.posts.").optional(),
|
|
185
|
-
fields: external_exports.string().min(1).describe("Comma-separated Ghost field list to return.").optional(),
|
|
186
|
-
formats: external_exports.string().min(1).describe("Comma-separated Ghost formats to return, such as html,plaintext.").optional()
|
|
187
|
-
}).describe("Input for reading one Ghost content resource.");
|
|
188
|
-
var getPageOutput = external_exports.strictObject({
|
|
189
|
-
page: external_exports.looseObject({}).describe("The raw Ghost Content API object.").nullable().optional()
|
|
190
|
-
}).describe("Ghost page read response.");
|
|
191
|
-
var listTagsInput = external_exports.strictObject({
|
|
192
|
-
limit: external_exports.int().min(1).max(100).describe("The maximum number of resources to request from Ghost.").optional(),
|
|
193
|
-
page: external_exports.int().min(1).describe("The one-based page number to request from Ghost.").optional(),
|
|
194
|
-
include: external_exports.string().min(1).describe("Comma-separated Ghost include expression, such as authors,tags or count.posts.").optional(),
|
|
195
|
-
fields: external_exports.string().min(1).describe("Comma-separated Ghost field list to return.").optional(),
|
|
196
|
-
formats: external_exports.string().min(1).describe("Comma-separated Ghost formats to return, such as html,plaintext.").optional(),
|
|
197
|
-
filter: external_exports.string().min(1).describe("Ghost Content API filter expression.").optional(),
|
|
198
|
-
order: external_exports.string().min(1).describe("Ghost Content API order expression.").optional()
|
|
199
|
-
}).describe("Input for browsing Ghost content resources.");
|
|
200
|
-
var listTagsOutput = external_exports.strictObject({
|
|
201
|
-
tags: external_exports.array(external_exports.looseObject({}).describe("The raw Ghost Content API object.")).describe("The Ghost tags returned by the Content API.").optional(),
|
|
202
|
-
meta: external_exports.looseObject({}).describe("The Ghost Content API pagination metadata.").nullable().optional()
|
|
203
|
-
}).describe("Ghost tags browse response.");
|
|
204
|
-
var getTagInput = external_exports.strictObject({
|
|
205
|
-
id: external_exports.string().min(1).describe("The Ghost resource ID.").optional(),
|
|
206
|
-
slug: external_exports.string().min(1).describe("The Ghost resource slug.").optional(),
|
|
207
|
-
include: external_exports.string().min(1).describe("Comma-separated Ghost include expression, such as authors,tags or count.posts.").optional(),
|
|
208
|
-
fields: external_exports.string().min(1).describe("Comma-separated Ghost field list to return.").optional(),
|
|
209
|
-
formats: external_exports.string().min(1).describe("Comma-separated Ghost formats to return, such as html,plaintext.").optional()
|
|
210
|
-
}).describe("Input for reading one Ghost content resource.");
|
|
211
|
-
var getTagOutput = external_exports.strictObject({
|
|
212
|
-
tag: external_exports.looseObject({}).describe("The raw Ghost Content API object.").nullable().optional()
|
|
213
|
-
}).describe("Ghost tag read response.");
|
|
214
|
-
var listAuthorsInput = external_exports.strictObject({
|
|
215
|
-
limit: external_exports.int().min(1).max(100).describe("The maximum number of resources to request from Ghost.").optional(),
|
|
216
|
-
page: external_exports.int().min(1).describe("The one-based page number to request from Ghost.").optional(),
|
|
217
|
-
include: external_exports.string().min(1).describe("Comma-separated Ghost include expression, such as authors,tags or count.posts.").optional(),
|
|
218
|
-
fields: external_exports.string().min(1).describe("Comma-separated Ghost field list to return.").optional(),
|
|
219
|
-
formats: external_exports.string().min(1).describe("Comma-separated Ghost formats to return, such as html,plaintext.").optional(),
|
|
220
|
-
filter: external_exports.string().min(1).describe("Ghost Content API filter expression.").optional(),
|
|
221
|
-
order: external_exports.string().min(1).describe("Ghost Content API order expression.").optional()
|
|
222
|
-
}).describe("Input for browsing Ghost content resources.");
|
|
223
|
-
var listAuthorsOutput = external_exports.strictObject({
|
|
224
|
-
authors: external_exports.array(external_exports.looseObject({}).describe("The raw Ghost Content API object.")).describe("The Ghost authors returned by the Content API.").optional(),
|
|
225
|
-
meta: external_exports.looseObject({}).describe("The Ghost Content API pagination metadata.").nullable().optional()
|
|
226
|
-
}).describe("Ghost authors browse response.");
|
|
227
|
-
var getAuthorInput = external_exports.strictObject({
|
|
228
|
-
id: external_exports.string().min(1).describe("The Ghost resource ID.").optional(),
|
|
229
|
-
slug: external_exports.string().min(1).describe("The Ghost resource slug.").optional(),
|
|
230
|
-
include: external_exports.string().min(1).describe("Comma-separated Ghost include expression, such as authors,tags or count.posts.").optional(),
|
|
231
|
-
fields: external_exports.string().min(1).describe("Comma-separated Ghost field list to return.").optional(),
|
|
232
|
-
formats: external_exports.string().min(1).describe("Comma-separated Ghost formats to return, such as html,plaintext.").optional()
|
|
233
|
-
}).describe("Input for reading one Ghost content resource.");
|
|
234
|
-
var getAuthorOutput = external_exports.strictObject({
|
|
235
|
-
author: external_exports.looseObject({}).describe("The raw Ghost Content API object.").nullable().optional()
|
|
236
|
-
}).describe("Ghost author read response.");
|
|
237
|
-
var readSettingsInput = external_exports.strictObject({}).describe("No input is required to read Ghost settings.");
|
|
238
|
-
var readSettingsOutput = external_exports.strictObject({
|
|
239
|
-
settings: external_exports.looseObject({}).describe("The raw Ghost settings object.").nullable().optional()
|
|
240
|
-
}).describe("Ghost settings response.");
|
|
241
|
-
var ghostActions = {
|
|
242
|
-
list_posts: {
|
|
243
|
-
description: "List published posts from the connected Ghost site.",
|
|
244
|
-
effect: "read",
|
|
245
|
-
inputSchema: listPostsInput,
|
|
246
|
-
outputSchema: external_exports.toJSONSchema(listPostsOutput, { io: "output", unrepresentable: "any" })
|
|
247
|
-
},
|
|
248
|
-
get_post: {
|
|
249
|
-
description: "Get one published Ghost post by ID or slug.",
|
|
250
|
-
effect: "read",
|
|
251
|
-
inputSchema: getPostInput,
|
|
252
|
-
outputSchema: external_exports.toJSONSchema(getPostOutput, { io: "output", unrepresentable: "any" })
|
|
253
|
-
},
|
|
254
|
-
list_pages: {
|
|
255
|
-
description: "List published pages from the connected Ghost site.",
|
|
256
|
-
effect: "read",
|
|
257
|
-
inputSchema: listPagesInput,
|
|
258
|
-
outputSchema: external_exports.toJSONSchema(listPagesOutput, { io: "output", unrepresentable: "any" })
|
|
259
|
-
},
|
|
260
|
-
get_page: {
|
|
261
|
-
description: "Get one published Ghost page by ID or slug.",
|
|
262
|
-
effect: "read",
|
|
263
|
-
inputSchema: getPageInput,
|
|
264
|
-
outputSchema: external_exports.toJSONSchema(getPageOutput, { io: "output", unrepresentable: "any" })
|
|
265
|
-
},
|
|
266
|
-
list_tags: {
|
|
267
|
-
description: "List public tags from the connected Ghost site.",
|
|
268
|
-
effect: "read",
|
|
269
|
-
inputSchema: listTagsInput,
|
|
270
|
-
outputSchema: external_exports.toJSONSchema(listTagsOutput, { io: "output", unrepresentable: "any" })
|
|
271
|
-
},
|
|
272
|
-
get_tag: {
|
|
273
|
-
description: "Get one public Ghost tag by ID or slug.",
|
|
274
|
-
effect: "read",
|
|
275
|
-
inputSchema: getTagInput,
|
|
276
|
-
outputSchema: external_exports.toJSONSchema(getTagOutput, { io: "output", unrepresentable: "any" })
|
|
277
|
-
},
|
|
278
|
-
list_authors: {
|
|
279
|
-
description: "List public authors from the connected Ghost site.",
|
|
280
|
-
effect: "read",
|
|
281
|
-
inputSchema: listAuthorsInput,
|
|
282
|
-
outputSchema: external_exports.toJSONSchema(listAuthorsOutput, { io: "output", unrepresentable: "any" })
|
|
283
|
-
},
|
|
284
|
-
get_author: {
|
|
285
|
-
description: "Get one public Ghost author by ID or slug.",
|
|
286
|
-
effect: "read",
|
|
287
|
-
inputSchema: getAuthorInput,
|
|
288
|
-
outputSchema: external_exports.toJSONSchema(getAuthorOutput, { io: "output", unrepresentable: "any" })
|
|
289
|
-
},
|
|
290
|
-
read_settings: {
|
|
291
|
-
description: "Read public settings for the connected Ghost site.",
|
|
292
|
-
effect: "read",
|
|
293
|
-
inputSchema: readSettingsInput,
|
|
294
|
-
outputSchema: external_exports.toJSONSchema(readSettingsOutput, { io: "output", unrepresentable: "any" })
|
|
295
|
-
}
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
// ../plugins/src/ghost/index.ts
|
|
299
|
-
function createGhostPlugin() {
|
|
300
|
-
return createProviderPlugin({
|
|
301
|
-
description: "Ghost (Content API)",
|
|
302
|
-
actions: ghostActions,
|
|
303
|
-
credentialFields: [
|
|
304
|
-
{
|
|
305
|
-
key: "apiKey",
|
|
306
|
-
label: "Content API Key",
|
|
307
|
-
required: true,
|
|
308
|
-
secret: true,
|
|
309
|
-
description: "Ghost Content API key,\u4F5C\u4E3A key query \u53C2\u6570\u53D1\u9001;\u5728 Ghost Admin \u7684 Settings > Advanced > Integrations \u91CC\u521B\u5EFA\u6216\u67E5\u770B"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
key: "siteUrl",
|
|
313
|
-
label: "Site URL",
|
|
314
|
-
required: true,
|
|
315
|
-
secret: false,
|
|
316
|
-
description: "Ghost \u7AD9\u70B9\u7684\u516C\u5F00\u5730\u5740(https://example.ghost.io),\u4E0D\u8981\u5E26 API \u8DEF\u5F84;\u5FC5\u987B\u662F\u516C\u7F51\u53EF\u8FBE\u5730\u5740,\u79C1\u6709\u7F51\u6BB5\u4F1A\u88AB\u51FA\u7AD9\u7B56\u7565\u62E6\u4E0B"
|
|
317
|
-
}
|
|
318
|
-
],
|
|
319
|
-
credentialProbe: "read_settings",
|
|
320
|
-
handlers: {
|
|
321
|
-
list_posts: listPosts,
|
|
322
|
-
get_post: getPost,
|
|
323
|
-
list_pages: listPages,
|
|
324
|
-
get_page: getPage,
|
|
325
|
-
list_tags: listTags,
|
|
326
|
-
get_tag: getTag,
|
|
327
|
-
list_authors: listAuthors,
|
|
328
|
-
get_author: getAuthor,
|
|
329
|
-
read_settings: readSettings
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
var ghost_default = createGhostPlugin();
|
|
334
|
-
export {
|
|
335
|
-
createGhostPlugin,
|
|
336
|
-
ghost_default as default
|
|
337
|
-
};
|