@keystrokehq/news_api 0.1.0 → 0.1.3
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/action.cjs.map +1 -1
- package/dist/action.mjs.map +1 -1
- package/dist/actions/get-everything.cjs +9 -9
- package/dist/actions/get-everything.cjs.map +1 -1
- package/dist/actions/get-everything.d.cts +62 -3
- package/dist/actions/get-everything.d.cts.map +1 -1
- package/dist/actions/get-everything.d.mts +62 -3
- package/dist/actions/get-everything.d.mts.map +1 -1
- package/dist/actions/get-everything.mjs +9 -9
- package/dist/actions/get-everything.mjs.map +1 -1
- package/dist/actions/get-sources.cjs +10 -10
- package/dist/actions/get-sources.cjs.map +1 -1
- package/dist/actions/get-sources.d.cts +104 -3
- package/dist/actions/get-sources.d.cts.map +1 -1
- package/dist/actions/get-sources.d.mts +104 -3
- package/dist/actions/get-sources.d.mts.map +1 -1
- package/dist/actions/get-sources.mjs +10 -10
- package/dist/actions/get-sources.mjs.map +1 -1
- package/dist/actions/get-top-headlines.cjs +9 -9
- package/dist/actions/get-top-headlines.cjs.map +1 -1
- package/dist/actions/get-top-headlines.d.cts +99 -3
- package/dist/actions/get-top-headlines.d.cts.map +1 -1
- package/dist/actions/get-top-headlines.d.mts +99 -3
- package/dist/actions/get-top-headlines.d.mts.map +1 -1
- package/dist/actions/get-top-headlines.mjs +9 -9
- package/dist/actions/get-top-headlines.mjs.map +1 -1
- package/dist/actions/get-v1-articles.cjs +2 -2
- package/dist/actions/get-v1-articles.cjs.map +1 -1
- package/dist/actions/get-v1-articles.d.cts +25 -3
- package/dist/actions/get-v1-articles.d.cts.map +1 -1
- package/dist/actions/get-v1-articles.d.mts +25 -3
- package/dist/actions/get-v1-articles.d.mts.map +1 -1
- package/dist/actions/get-v1-articles.mjs +2 -2
- package/dist/actions/get-v1-articles.mjs.map +1 -1
- package/dist/catalog.cjs +7 -1
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +8 -0
- package/dist/catalog.d.mts +8 -0
- package/dist/catalog.mjs +7 -1
- package/dist/catalog.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -86,23 +86,23 @@ const NewsApiGetSourcesInput = z.object({
|
|
|
86
86
|
]).describe("Filter sources by this language code.").optional()
|
|
87
87
|
}).describe("Request parameters for GET_SOURCES.");
|
|
88
88
|
const NewsApiGetSources_SourceItemSchema = z.object({
|
|
89
|
-
id: z.string().describe("Unique identifier for the source."),
|
|
90
|
-
url: z.string().describe("Homepage URL of the source."),
|
|
91
|
-
name: z.string().describe("Display name of the source."),
|
|
92
|
-
country: z.string().describe("Country code of this source."),
|
|
93
|
-
category: z.string().describe("Category of news for this source."),
|
|
94
|
-
language: z.string().describe("Language code of this source."),
|
|
95
|
-
description: z.string().describe("Short description of the source.")
|
|
96
|
-
}).describe("Single news source item.");
|
|
89
|
+
id: z.string().describe("Unique identifier for the source.").nullable(),
|
|
90
|
+
url: z.string().describe("Homepage URL of the source.").nullable(),
|
|
91
|
+
name: z.string().describe("Display name of the source.").nullable(),
|
|
92
|
+
country: z.string().describe("Country code of this source.").nullable(),
|
|
93
|
+
category: z.string().describe("Category of news for this source.").nullable(),
|
|
94
|
+
language: z.string().describe("Language code of this source.").nullable(),
|
|
95
|
+
description: z.string().describe("Short description of the source.").nullable()
|
|
96
|
+
}).passthrough().describe("Single news source item.");
|
|
97
97
|
const newsApiGetSources = action("NEWS_API_GET_SOURCES", {
|
|
98
98
|
slug: "news_api-get-sources",
|
|
99
99
|
name: "Get Sources",
|
|
100
100
|
description: "Tool to fetch available news sources. Use when you need to retrieve a list of publishers by optional filters like category, language, or country. Source IDs returned here are the only valid IDs for filtering in NEWS_API_GET_EVERYTHING or NEWS_API_GET_TOP_HEADLINES — unrecognized IDs cause silently empty results.",
|
|
101
101
|
input: NewsApiGetSourcesInput,
|
|
102
102
|
output: z.object({
|
|
103
|
-
status: z.enum(["ok", "error"]).describe("Response status."),
|
|
103
|
+
status: z.enum(["ok", "error"]).describe("Response status.").nullable(),
|
|
104
104
|
sources: z.array(NewsApiGetSources_SourceItemSchema).describe("List of available news sources.")
|
|
105
|
-
}).describe("Response schema for GET_SOURCES.")
|
|
105
|
+
}).passthrough().describe("Response schema for GET_SOURCES.")
|
|
106
106
|
});
|
|
107
107
|
//#endregion
|
|
108
108
|
export { newsApiGetSources };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-sources.mjs","names":[],"sources":["../../src/actions/get-sources.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetSourcesInput
|
|
1
|
+
{"version":3,"file":"get-sources.mjs","names":[],"sources":["../../src/actions/get-sources.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetSourcesInput = z.object({\n country: z.enum([\"ae\", \"ar\", \"at\", \"au\", \"be\", \"bg\", \"br\", \"ca\", \"ch\", \"cn\", \"co\", \"cu\", \"cz\", \"de\", \"eg\", \"fr\", \"gb\", \"gr\", \"hk\", \"hu\", \"id\", \"ie\", \"il\", \"in\", \"is\", \"it\", \"jp\", \"kr\", \"lt\", \"lv\", \"ma\", \"mx\", \"my\", \"ng\", \"nl\", \"no\", \"nz\", \"ph\", \"pl\", \"pt\", \"ro\", \"rs\", \"ru\", \"sa\", \"se\", \"sg\", \"si\", \"sk\", \"th\", \"tr\", \"tw\", \"ua\", \"us\", \"ve\", \"za\"]).describe(\"Filter sources by this country code.\").optional(),\n category: z.enum([\"business\", \"entertainment\", \"general\", \"health\", \"science\", \"sports\", \"technology\"]).describe(\"Filter sources by this news category.\").optional(),\n language: z.enum([\"ar\", \"de\", \"en\", \"es\", \"fr\", \"he\", \"it\", \"nl\", \"no\", \"pt\", \"ru\", \"se\", \"ud\", \"zh\"]).describe(\"Filter sources by this language code.\").optional(),\n}).describe(\"Request parameters for GET_SOURCES.\");\nconst NewsApiGetSources_SourceItemSchema = z.object({\n id: z.string().describe(\"Unique identifier for the source.\").nullable(),\n url: z.string().describe(\"Homepage URL of the source.\").nullable(),\n name: z.string().describe(\"Display name of the source.\").nullable(),\n country: z.string().describe(\"Country code of this source.\").nullable(),\n category: z.string().describe(\"Category of news for this source.\").nullable(),\n language: z.string().describe(\"Language code of this source.\").nullable(),\n description: z.string().describe(\"Short description of the source.\").nullable(),\n}).passthrough().describe(\"Single news source item.\");\nexport const NewsApiGetSourcesOutput = z.object({\n status: z.enum([\"ok\", \"error\"]).describe(\"Response status.\").nullable(),\n sources: z.array(NewsApiGetSources_SourceItemSchema).describe(\"List of available news sources.\"),\n}).passthrough().describe(\"Response schema for GET_SOURCES.\");\n\nexport const newsApiGetSources = action(\"NEWS_API_GET_SOURCES\", {\n slug: \"news_api-get-sources\",\n name: \"Get Sources\",\n description: \"Tool to fetch available news sources. Use when you need to retrieve a list of publishers by optional filters like category, language, or country. Source IDs returned here are the only valid IDs for filtering in NEWS_API_GET_EVERYTHING or NEWS_API_GET_TOP_HEADLINES — unrecognized IDs cause silently empty results.\",\n input: NewsApiGetSourcesInput,\n output: NewsApiGetSourcesOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAyB,EAAE,OAAO;CAC7C,SAAS,EAAE,KAAK;EAAC;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;CAAI,CAAC,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CACtZ,UAAU,EAAE,KAAK;EAAC;EAAY;EAAiB;EAAW;EAAU;EAAW;EAAU;CAAY,CAAC,CAAC,CAAC,SAAS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'sources' with 'country' or 'category'.\nAt least one of 'sources', 'q', 'country', or 'category' must be provided.");
|
|
75
75
|
const NewsApiGetTopHeadlines_SourceModelSchema = zod.z.object({
|
|
76
76
|
id: zod.z.string().describe("Unique source identifier, if available.").nullable().optional(),
|
|
77
|
-
name: zod.z.string().describe("Name of the news source.")
|
|
78
|
-
});
|
|
77
|
+
name: zod.z.string().describe("Name of the news source.").nullable()
|
|
78
|
+
}).passthrough();
|
|
79
79
|
const NewsApiGetTopHeadlines_ArticleModelSchema = zod.z.object({
|
|
80
|
-
url: zod.z.string().describe("URL to the full article."),
|
|
81
|
-
title: zod.z.string().describe("Article title."),
|
|
80
|
+
url: zod.z.string().describe("URL to the full article.").nullable(),
|
|
81
|
+
title: zod.z.string().describe("Article title.").nullable(),
|
|
82
82
|
author: zod.z.string().describe("Author of the article.").nullable().optional(),
|
|
83
83
|
source: NewsApiGetTopHeadlines_SourceModelSchema.nullable(),
|
|
84
84
|
content: zod.z.string().describe("Unformatted content of the article.").nullable().optional(),
|
|
85
85
|
urlToImage: zod.z.string().describe("URL to the article's image.").nullable().optional(),
|
|
86
86
|
description: zod.z.string().describe("Short description or snippet.").nullable().optional(),
|
|
87
|
-
publishedAt: zod.z.string().describe("Publication date/time (ISO 8601).")
|
|
88
|
-
});
|
|
87
|
+
publishedAt: zod.z.string().describe("Publication date/time (ISO 8601).").nullable()
|
|
88
|
+
}).passthrough();
|
|
89
89
|
const NewsApiGetTopHeadlinesOutput = zod.z.object({
|
|
90
|
-
status: zod.z.enum(["ok", "error"]).describe("API status. 'ok' means successful."),
|
|
90
|
+
status: zod.z.enum(["ok", "error"]).describe("API status. 'ok' means successful.").nullable(),
|
|
91
91
|
articles: zod.z.array(NewsApiGetTopHeadlines_ArticleModelSchema).describe("List of top headline articles."),
|
|
92
|
-
totalResults: zod.z.number().int().describe("Total number of results available.")
|
|
93
|
-
});
|
|
92
|
+
totalResults: zod.z.number().int().describe("Total number of results available.").nullable()
|
|
93
|
+
}).passthrough();
|
|
94
94
|
const newsApiGetTopHeadlines = require_action.action("NEWS_API_GET_TOP_HEADLINES", {
|
|
95
95
|
slug: "news_api-get-top-headlines",
|
|
96
96
|
name: "Get Top Headlines",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-top-headlines.cjs","names":["z","action"],"sources":["../../src/actions/get-top-headlines.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetTopHeadlinesInput
|
|
1
|
+
{"version":3,"file":"get-top-headlines.cjs","names":["z","action"],"sources":["../../src/actions/get-top-headlines.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetTopHeadlinesInput = z.object({\n q: z.string().describe(\"Keywords or phrase to search for in the article title and body. At least one of 'country', 'category', 'sources', or 'q' must be provided.\").optional(),\n page: z.number().int().default(1).describe(\"Page number for pagination. Default is 1.\").optional(),\n country: z.enum([\"ae\", \"ar\", \"at\", \"au\", \"be\", \"bg\", \"br\", \"ca\", \"ch\", \"cn\", \"co\", \"cu\", \"cz\", \"de\", \"eg\", \"fr\", \"gb\", \"gr\", \"hk\", \"hu\", \"id\", \"ie\", \"il\", \"in\", \"it\", \"jp\", \"kr\", \"lt\", \"lv\", \"ma\", \"mx\", \"my\", \"ng\", \"nl\", \"no\", \"nz\", \"ph\", \"pl\", \"pt\", \"ro\", \"rs\", \"ru\", \"sa\", \"se\", \"sg\", \"si\", \"sk\", \"th\", \"tr\", \"tw\", \"ua\", \"us\", \"ve\", \"za\"]).describe(\"2-letter ISO 3166-1 code of the country to get headlines for. At least one of 'country', 'category', 'sources', or 'q' must be provided. Cannot be used with 'sources'.\").optional(),\n sources: z.string().describe(\"Comma-separated list of source identifiers to include (max 20). At least one of 'country', 'category', 'sources', or 'q' must be provided. Cannot be combined with 'country' or 'category'. Use valid source IDs from NEWS_API_GET_SOURCES; unrecognized IDs may silently return empty results.\").optional(),\n category: z.enum([\"business\", \"entertainment\", \"general\", \"health\", \"science\", \"sports\", \"technology\"]).describe(\"News category to filter by. At least one of 'country', 'category', 'sources', or 'q' must be provided. Cannot be used with 'sources'.\").optional(),\n pageSize: z.number().int().default(20).describe(\"Number of results per page. Default is 20, max is 100.\").optional(),\n}).describe(\"Parameters for fetching top headlines. Cannot combine 'sources' with 'country' or 'category'.\\nAt least one of 'sources', 'q', 'country', or 'category' must be provided.\");\nconst NewsApiGetTopHeadlines_SourceModelSchema = z.object({\n id: z.string().describe(\"Unique source identifier, if available.\").nullable().optional(),\n name: z.string().describe(\"Name of the news source.\").nullable(),\n}).passthrough();\nconst NewsApiGetTopHeadlines_ArticleModelSchema = z.object({\n url: z.string().describe(\"URL to the full article.\").nullable(),\n title: z.string().describe(\"Article title.\").nullable(),\n author: z.string().describe(\"Author of the article.\").nullable().optional(),\n source: NewsApiGetTopHeadlines_SourceModelSchema.nullable(),\n content: z.string().describe(\"Unformatted content of the article.\").nullable().optional(),\n urlToImage: z.string().describe(\"URL to the article's image.\").nullable().optional(),\n description: z.string().describe(\"Short description or snippet.\").nullable().optional(),\n publishedAt: z.string().describe(\"Publication date/time (ISO 8601).\").nullable(),\n}).passthrough();\nexport const NewsApiGetTopHeadlinesOutput = z.object({\n status: z.enum([\"ok\", \"error\"]).describe(\"API status. 'ok' means successful.\").nullable(),\n articles: z.array(NewsApiGetTopHeadlines_ArticleModelSchema).describe(\"List of top headline articles.\"),\n totalResults: z.number().int().describe(\"Total number of results available.\").nullable(),\n}).passthrough();\n\nexport const newsApiGetTopHeadlines = action(\"NEWS_API_GET_TOP_HEADLINES\", {\n slug: \"news_api-get-top-headlines\",\n name: \"Get Top Headlines\",\n description: \"Tool to retrieve live top and breaking headlines; does not support historical or date-bounded queries (use NEWS_API_GET_EVERYTHING for past date ranges). Results favor major outlets; use NEWS_API_GET_EVERYTHING or COMPOSIO_SEARCH_WEB for niche publications. Use when you need current headlines filtered by country, category, source(s), or keywords.\",\n input: NewsApiGetTopHeadlinesInput,\n output: NewsApiGet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1,9 +1,105 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/get-top-headlines.d.ts
|
|
4
|
-
declare const NewsApiGetTopHeadlinesInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const NewsApiGetTopHeadlinesInput: z.ZodObject<{
|
|
5
|
+
q: z.ZodOptional<z.ZodString>;
|
|
6
|
+
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
7
|
+
country: z.ZodOptional<z.ZodEnum<{
|
|
8
|
+
in: "in";
|
|
9
|
+
at: "at";
|
|
10
|
+
id: "id";
|
|
11
|
+
ar: "ar";
|
|
12
|
+
de: "de";
|
|
13
|
+
fr: "fr";
|
|
14
|
+
it: "it";
|
|
15
|
+
nl: "nl";
|
|
16
|
+
no: "no";
|
|
17
|
+
pt: "pt";
|
|
18
|
+
ru: "ru";
|
|
19
|
+
ae: "ae";
|
|
20
|
+
au: "au";
|
|
21
|
+
be: "be";
|
|
22
|
+
bg: "bg";
|
|
23
|
+
br: "br";
|
|
24
|
+
ca: "ca";
|
|
25
|
+
ch: "ch";
|
|
26
|
+
cn: "cn";
|
|
27
|
+
co: "co";
|
|
28
|
+
cu: "cu";
|
|
29
|
+
cz: "cz";
|
|
30
|
+
eg: "eg";
|
|
31
|
+
gb: "gb";
|
|
32
|
+
gr: "gr";
|
|
33
|
+
hk: "hk";
|
|
34
|
+
hu: "hu";
|
|
35
|
+
ie: "ie";
|
|
36
|
+
il: "il";
|
|
37
|
+
jp: "jp";
|
|
38
|
+
kr: "kr";
|
|
39
|
+
lt: "lt";
|
|
40
|
+
lv: "lv";
|
|
41
|
+
ma: "ma";
|
|
42
|
+
mx: "mx";
|
|
43
|
+
my: "my";
|
|
44
|
+
ng: "ng";
|
|
45
|
+
nz: "nz";
|
|
46
|
+
ph: "ph";
|
|
47
|
+
pl: "pl";
|
|
48
|
+
ro: "ro";
|
|
49
|
+
rs: "rs";
|
|
50
|
+
sa: "sa";
|
|
51
|
+
se: "se";
|
|
52
|
+
sg: "sg";
|
|
53
|
+
si: "si";
|
|
54
|
+
sk: "sk";
|
|
55
|
+
th: "th";
|
|
56
|
+
tr: "tr";
|
|
57
|
+
tw: "tw";
|
|
58
|
+
ua: "ua";
|
|
59
|
+
us: "us";
|
|
60
|
+
ve: "ve";
|
|
61
|
+
za: "za";
|
|
62
|
+
}>>;
|
|
63
|
+
sources: z.ZodOptional<z.ZodString>;
|
|
64
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
business: "business";
|
|
66
|
+
entertainment: "entertainment";
|
|
67
|
+
general: "general";
|
|
68
|
+
health: "health";
|
|
69
|
+
science: "science";
|
|
70
|
+
sports: "sports";
|
|
71
|
+
technology: "technology";
|
|
72
|
+
}>>;
|
|
73
|
+
pageSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
declare const NewsApiGetTopHeadlinesOutput: z.ZodObject<{
|
|
76
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
77
|
+
error: "error";
|
|
78
|
+
ok: "ok";
|
|
79
|
+
}>>;
|
|
80
|
+
articles: z.ZodArray<z.ZodObject<{
|
|
81
|
+
url: z.ZodNullable<z.ZodString>;
|
|
82
|
+
title: z.ZodNullable<z.ZodString>;
|
|
83
|
+
author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
84
|
+
source: z.ZodNullable<z.ZodObject<{
|
|
85
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
86
|
+
name: z.ZodNullable<z.ZodString>;
|
|
87
|
+
}, z.core.$loose>>;
|
|
88
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
89
|
+
urlToImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
92
|
+
}, z.core.$loose>>;
|
|
93
|
+
totalResults: z.ZodNullable<z.ZodNumber>;
|
|
94
|
+
}, z.core.$loose>;
|
|
95
|
+
declare const newsApiGetTopHeadlines: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
96
|
+
q?: string | undefined;
|
|
97
|
+
page?: number | undefined;
|
|
98
|
+
country?: "in" | "at" | "id" | "ar" | "de" | "fr" | "it" | "nl" | "no" | "pt" | "ru" | "ae" | "au" | "be" | "bg" | "br" | "ca" | "ch" | "cn" | "co" | "cu" | "cz" | "eg" | "gb" | "gr" | "hk" | "hu" | "ie" | "il" | "jp" | "kr" | "lt" | "lv" | "ma" | "mx" | "my" | "ng" | "nz" | "ph" | "pl" | "ro" | "rs" | "sa" | "se" | "sg" | "si" | "sk" | "th" | "tr" | "tw" | "ua" | "us" | "ve" | "za" | undefined;
|
|
99
|
+
sources?: string | undefined;
|
|
100
|
+
category?: "business" | "entertainment" | "general" | "health" | "science" | "sports" | "technology" | undefined;
|
|
101
|
+
pageSize?: number | undefined;
|
|
102
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
103
|
//#endregion
|
|
8
104
|
export { newsApiGetTopHeadlines };
|
|
9
105
|
//# sourceMappingURL=get-top-headlines.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-top-headlines.d.cts","names":[],"sources":["../../src/actions/get-top-headlines.ts"],"mappings":";;;cAIa,2BAAA,
|
|
1
|
+
{"version":3,"file":"get-top-headlines.d.cts","names":[],"sources":["../../src/actions/get-top-headlines.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsB3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAM5B,sBAAA,gCAAsB,wBAAA"}
|
|
@@ -1,9 +1,105 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/get-top-headlines.d.ts
|
|
4
|
-
declare const NewsApiGetTopHeadlinesInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const NewsApiGetTopHeadlinesInput: z.ZodObject<{
|
|
5
|
+
q: z.ZodOptional<z.ZodString>;
|
|
6
|
+
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
7
|
+
country: z.ZodOptional<z.ZodEnum<{
|
|
8
|
+
in: "in";
|
|
9
|
+
at: "at";
|
|
10
|
+
id: "id";
|
|
11
|
+
ar: "ar";
|
|
12
|
+
de: "de";
|
|
13
|
+
fr: "fr";
|
|
14
|
+
it: "it";
|
|
15
|
+
nl: "nl";
|
|
16
|
+
no: "no";
|
|
17
|
+
pt: "pt";
|
|
18
|
+
ru: "ru";
|
|
19
|
+
ae: "ae";
|
|
20
|
+
au: "au";
|
|
21
|
+
be: "be";
|
|
22
|
+
bg: "bg";
|
|
23
|
+
br: "br";
|
|
24
|
+
ca: "ca";
|
|
25
|
+
ch: "ch";
|
|
26
|
+
cn: "cn";
|
|
27
|
+
co: "co";
|
|
28
|
+
cu: "cu";
|
|
29
|
+
cz: "cz";
|
|
30
|
+
eg: "eg";
|
|
31
|
+
gb: "gb";
|
|
32
|
+
gr: "gr";
|
|
33
|
+
hk: "hk";
|
|
34
|
+
hu: "hu";
|
|
35
|
+
ie: "ie";
|
|
36
|
+
il: "il";
|
|
37
|
+
jp: "jp";
|
|
38
|
+
kr: "kr";
|
|
39
|
+
lt: "lt";
|
|
40
|
+
lv: "lv";
|
|
41
|
+
ma: "ma";
|
|
42
|
+
mx: "mx";
|
|
43
|
+
my: "my";
|
|
44
|
+
ng: "ng";
|
|
45
|
+
nz: "nz";
|
|
46
|
+
ph: "ph";
|
|
47
|
+
pl: "pl";
|
|
48
|
+
ro: "ro";
|
|
49
|
+
rs: "rs";
|
|
50
|
+
sa: "sa";
|
|
51
|
+
se: "se";
|
|
52
|
+
sg: "sg";
|
|
53
|
+
si: "si";
|
|
54
|
+
sk: "sk";
|
|
55
|
+
th: "th";
|
|
56
|
+
tr: "tr";
|
|
57
|
+
tw: "tw";
|
|
58
|
+
ua: "ua";
|
|
59
|
+
us: "us";
|
|
60
|
+
ve: "ve";
|
|
61
|
+
za: "za";
|
|
62
|
+
}>>;
|
|
63
|
+
sources: z.ZodOptional<z.ZodString>;
|
|
64
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
business: "business";
|
|
66
|
+
entertainment: "entertainment";
|
|
67
|
+
general: "general";
|
|
68
|
+
health: "health";
|
|
69
|
+
science: "science";
|
|
70
|
+
sports: "sports";
|
|
71
|
+
technology: "technology";
|
|
72
|
+
}>>;
|
|
73
|
+
pageSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
declare const NewsApiGetTopHeadlinesOutput: z.ZodObject<{
|
|
76
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
77
|
+
error: "error";
|
|
78
|
+
ok: "ok";
|
|
79
|
+
}>>;
|
|
80
|
+
articles: z.ZodArray<z.ZodObject<{
|
|
81
|
+
url: z.ZodNullable<z.ZodString>;
|
|
82
|
+
title: z.ZodNullable<z.ZodString>;
|
|
83
|
+
author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
84
|
+
source: z.ZodNullable<z.ZodObject<{
|
|
85
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
86
|
+
name: z.ZodNullable<z.ZodString>;
|
|
87
|
+
}, z.core.$loose>>;
|
|
88
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
89
|
+
urlToImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
92
|
+
}, z.core.$loose>>;
|
|
93
|
+
totalResults: z.ZodNullable<z.ZodNumber>;
|
|
94
|
+
}, z.core.$loose>;
|
|
95
|
+
declare const newsApiGetTopHeadlines: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
96
|
+
q?: string | undefined;
|
|
97
|
+
page?: number | undefined;
|
|
98
|
+
country?: "in" | "at" | "id" | "ar" | "de" | "fr" | "it" | "nl" | "no" | "pt" | "ru" | "ae" | "au" | "be" | "bg" | "br" | "ca" | "ch" | "cn" | "co" | "cu" | "cz" | "eg" | "gb" | "gr" | "hk" | "hu" | "ie" | "il" | "jp" | "kr" | "lt" | "lv" | "ma" | "mx" | "my" | "ng" | "nz" | "ph" | "pl" | "ro" | "rs" | "sa" | "se" | "sg" | "si" | "sk" | "th" | "tr" | "tw" | "ua" | "us" | "ve" | "za" | undefined;
|
|
99
|
+
sources?: string | undefined;
|
|
100
|
+
category?: "business" | "entertainment" | "general" | "health" | "science" | "sports" | "technology" | undefined;
|
|
101
|
+
pageSize?: number | undefined;
|
|
102
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
103
|
//#endregion
|
|
8
104
|
export { newsApiGetTopHeadlines };
|
|
9
105
|
//# sourceMappingURL=get-top-headlines.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-top-headlines.d.mts","names":[],"sources":["../../src/actions/get-top-headlines.ts"],"mappings":";;;cAIa,2BAAA,
|
|
1
|
+
{"version":3,"file":"get-top-headlines.d.mts","names":[],"sources":["../../src/actions/get-top-headlines.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsB3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAM5B,sBAAA,gCAAsB,wBAAA"}
|
|
@@ -74,28 +74,28 @@ const NewsApiGetTopHeadlinesInput = z.object({
|
|
|
74
74
|
}).describe("Parameters for fetching top headlines. Cannot combine 'sources' with 'country' or 'category'.\nAt least one of 'sources', 'q', 'country', or 'category' must be provided.");
|
|
75
75
|
const NewsApiGetTopHeadlines_SourceModelSchema = z.object({
|
|
76
76
|
id: z.string().describe("Unique source identifier, if available.").nullable().optional(),
|
|
77
|
-
name: z.string().describe("Name of the news source.")
|
|
78
|
-
});
|
|
77
|
+
name: z.string().describe("Name of the news source.").nullable()
|
|
78
|
+
}).passthrough();
|
|
79
79
|
const NewsApiGetTopHeadlines_ArticleModelSchema = z.object({
|
|
80
|
-
url: z.string().describe("URL to the full article."),
|
|
81
|
-
title: z.string().describe("Article title."),
|
|
80
|
+
url: z.string().describe("URL to the full article.").nullable(),
|
|
81
|
+
title: z.string().describe("Article title.").nullable(),
|
|
82
82
|
author: z.string().describe("Author of the article.").nullable().optional(),
|
|
83
83
|
source: NewsApiGetTopHeadlines_SourceModelSchema.nullable(),
|
|
84
84
|
content: z.string().describe("Unformatted content of the article.").nullable().optional(),
|
|
85
85
|
urlToImage: z.string().describe("URL to the article's image.").nullable().optional(),
|
|
86
86
|
description: z.string().describe("Short description or snippet.").nullable().optional(),
|
|
87
|
-
publishedAt: z.string().describe("Publication date/time (ISO 8601).")
|
|
88
|
-
});
|
|
87
|
+
publishedAt: z.string().describe("Publication date/time (ISO 8601).").nullable()
|
|
88
|
+
}).passthrough();
|
|
89
89
|
const newsApiGetTopHeadlines = action("NEWS_API_GET_TOP_HEADLINES", {
|
|
90
90
|
slug: "news_api-get-top-headlines",
|
|
91
91
|
name: "Get Top Headlines",
|
|
92
92
|
description: "Tool to retrieve live top and breaking headlines; does not support historical or date-bounded queries (use NEWS_API_GET_EVERYTHING for past date ranges). Results favor major outlets; use NEWS_API_GET_EVERYTHING or COMPOSIO_SEARCH_WEB for niche publications. Use when you need current headlines filtered by country, category, source(s), or keywords.",
|
|
93
93
|
input: NewsApiGetTopHeadlinesInput,
|
|
94
94
|
output: z.object({
|
|
95
|
-
status: z.enum(["ok", "error"]).describe("API status. 'ok' means successful."),
|
|
95
|
+
status: z.enum(["ok", "error"]).describe("API status. 'ok' means successful.").nullable(),
|
|
96
96
|
articles: z.array(NewsApiGetTopHeadlines_ArticleModelSchema).describe("List of top headline articles."),
|
|
97
|
-
totalResults: z.number().int().describe("Total number of results available.")
|
|
98
|
-
})
|
|
97
|
+
totalResults: z.number().int().describe("Total number of results available.").nullable()
|
|
98
|
+
}).passthrough()
|
|
99
99
|
});
|
|
100
100
|
//#endregion
|
|
101
101
|
export { newsApiGetTopHeadlines };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-top-headlines.mjs","names":[],"sources":["../../src/actions/get-top-headlines.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetTopHeadlinesInput
|
|
1
|
+
{"version":3,"file":"get-top-headlines.mjs","names":[],"sources":["../../src/actions/get-top-headlines.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetTopHeadlinesInput = z.object({\n q: z.string().describe(\"Keywords or phrase to search for in the article title and body. At least one of 'country', 'category', 'sources', or 'q' must be provided.\").optional(),\n page: z.number().int().default(1).describe(\"Page number for pagination. Default is 1.\").optional(),\n country: z.enum([\"ae\", \"ar\", \"at\", \"au\", \"be\", \"bg\", \"br\", \"ca\", \"ch\", \"cn\", \"co\", \"cu\", \"cz\", \"de\", \"eg\", \"fr\", \"gb\", \"gr\", \"hk\", \"hu\", \"id\", \"ie\", \"il\", \"in\", \"it\", \"jp\", \"kr\", \"lt\", \"lv\", \"ma\", \"mx\", \"my\", \"ng\", \"nl\", \"no\", \"nz\", \"ph\", \"pl\", \"pt\", \"ro\", \"rs\", \"ru\", \"sa\", \"se\", \"sg\", \"si\", \"sk\", \"th\", \"tr\", \"tw\", \"ua\", \"us\", \"ve\", \"za\"]).describe(\"2-letter ISO 3166-1 code of the country to get headlines for. At least one of 'country', 'category', 'sources', or 'q' must be provided. Cannot be used with 'sources'.\").optional(),\n sources: z.string().describe(\"Comma-separated list of source identifiers to include (max 20). At least one of 'country', 'category', 'sources', or 'q' must be provided. Cannot be combined with 'country' or 'category'. Use valid source IDs from NEWS_API_GET_SOURCES; unrecognized IDs may silently return empty results.\").optional(),\n category: z.enum([\"business\", \"entertainment\", \"general\", \"health\", \"science\", \"sports\", \"technology\"]).describe(\"News category to filter by. At least one of 'country', 'category', 'sources', or 'q' must be provided. Cannot be used with 'sources'.\").optional(),\n pageSize: z.number().int().default(20).describe(\"Number of results per page. Default is 20, max is 100.\").optional(),\n}).describe(\"Parameters for fetching top headlines. Cannot combine 'sources' with 'country' or 'category'.\\nAt least one of 'sources', 'q', 'country', or 'category' must be provided.\");\nconst NewsApiGetTopHeadlines_SourceModelSchema = z.object({\n id: z.string().describe(\"Unique source identifier, if available.\").nullable().optional(),\n name: z.string().describe(\"Name of the news source.\").nullable(),\n}).passthrough();\nconst NewsApiGetTopHeadlines_ArticleModelSchema = z.object({\n url: z.string().describe(\"URL to the full article.\").nullable(),\n title: z.string().describe(\"Article title.\").nullable(),\n author: z.string().describe(\"Author of the article.\").nullable().optional(),\n source: NewsApiGetTopHeadlines_SourceModelSchema.nullable(),\n content: z.string().describe(\"Unformatted content of the article.\").nullable().optional(),\n urlToImage: z.string().describe(\"URL to the article's image.\").nullable().optional(),\n description: z.string().describe(\"Short description or snippet.\").nullable().optional(),\n publishedAt: z.string().describe(\"Publication date/time (ISO 8601).\").nullable(),\n}).passthrough();\nexport const NewsApiGetTopHeadlinesOutput = z.object({\n status: z.enum([\"ok\", \"error\"]).describe(\"API status. 'ok' means successful.\").nullable(),\n articles: z.array(NewsApiGetTopHeadlines_ArticleModelSchema).describe(\"List of top headline articles.\"),\n totalResults: z.number().int().describe(\"Total number of results available.\").nullable(),\n}).passthrough();\n\nexport const newsApiGetTopHeadlines = action(\"NEWS_API_GET_TOP_HEADLINES\", {\n slug: \"news_api-get-top-headlines\",\n name: \"Get Top Headlines\",\n description: \"Tool to retrieve live top and breaking headlines; does not support historical or date-bounded queries (use NEWS_API_GET_EVERYTHING for past date ranges). Results favor major outlets; use NEWS_API_GET_EVERYTHING or COMPOSIO_SEARCH_WEB for niche publications. Use when you need current headlines filtered by country, category, source(s), or keywords.\",\n input: NewsApiGetTopHeadlinesInput,\n output: NewsApiGetTopHeadlinesOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8B,EAAE,OAAO;CAClD,GAAG,EAAE,OAAO,CAAC,CAAC,SAAS,4IAA4I,CAAC,CAAC,SAAS;CAC9K,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACjG,SAAS,EAAE,KAAK;EAAC;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;CAAI,CAAC,CAAC,CAAC,SAAS,yKAAyK,CAAC,CAAC,SAAS;CACnhB,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,iSAAiS,CAAC,CAAC,SAAS;CACzU,UAAU,EAAE,KAAK;EAAC;EAAY;EAAiB;EAAW;EAAU;EAAW;EAAU;CAAY,CAAC,CAAC,CAAC,SAAS,uIAAuI,CAAC,CAAC,SAAS;CACnQ,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC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I,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;CACzF,CAAC,CAAC,CAAC,YAOO;AACV,CAAC"}
|
|
@@ -16,13 +16,13 @@ const NewsApiGetV1Articles_V1ArticleSchema = zod.z.object({
|
|
|
16
16
|
urlToImage: zod.z.string().describe("URL to the article's image.").nullable().optional(),
|
|
17
17
|
description: zod.z.string().describe("Description or snippet of the article.").nullable().optional(),
|
|
18
18
|
publishedAt: zod.z.string().describe("Publication date/time in ISO 8601 format.").nullable().optional()
|
|
19
|
-
}).describe("Article metadata from v1 endpoint.");
|
|
19
|
+
}).passthrough().describe("Article metadata from v1 endpoint.");
|
|
20
20
|
const NewsApiGetV1ArticlesOutput = zod.z.object({
|
|
21
21
|
sortBy: zod.z.string().describe("Which type of article list is being returned. Options: top, latest, popular.").nullable().optional(),
|
|
22
22
|
source: zod.z.string().describe("The identifier of the source requested.").nullable().optional(),
|
|
23
23
|
status: zod.z.string().describe("If the request was successful or not. Options: ok, error.").nullable().optional(),
|
|
24
24
|
articles: zod.z.array(NewsApiGetV1Articles_V1ArticleSchema).describe("List of article metadata from the source.").nullable().optional()
|
|
25
|
-
}).describe("Response schema for GET /v1/articles endpoint.");
|
|
25
|
+
}).passthrough().describe("Response schema for GET /v1/articles endpoint.");
|
|
26
26
|
const newsApiGetV1Articles = require_action.action("NEWS_API_GET_V1_ARTICLES", {
|
|
27
27
|
slug: "news_api-get-v1-articles",
|
|
28
28
|
name: "Get V1 Articles",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-v1-articles.cjs","names":["z","action"],"sources":["../../src/actions/get-v1-articles.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetV1ArticlesInput
|
|
1
|
+
{"version":3,"file":"get-v1-articles.cjs","names":["z","action"],"sources":["../../src/actions/get-v1-articles.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetV1ArticlesInput = z.object({\n sortBy: z.enum([\"top\", \"latest\", \"popular\"]).describe(\"Sort order for articles.\").optional(),\n source: z.string().describe(\"The identifier for the news source or blog you want headlines from. Use the /sources endpoint to locate this.\"),\n}).describe(\"Request parameters for GET /v1/articles endpoint.\");\nconst NewsApiGetV1Articles_V1ArticleSchema = z.object({\n url: z.string().describe(\"URL to the full article.\").nullable().optional(),\n title: z.string().describe(\"Title of the article.\").nullable().optional(),\n author: z.string().describe(\"Author of the article.\").nullable().optional(),\n urlToImage: z.string().describe(\"URL to the article's image.\").nullable().optional(),\n description: z.string().describe(\"Description or snippet of the article.\").nullable().optional(),\n publishedAt: z.string().describe(\"Publication date/time in ISO 8601 format.\").nullable().optional(),\n}).passthrough().describe(\"Article metadata from v1 endpoint.\");\nexport const NewsApiGetV1ArticlesOutput = z.object({\n sortBy: z.string().describe(\"Which type of article list is being returned. Options: top, latest, popular.\").nullable().optional(),\n source: z.string().describe(\"The identifier of the source requested.\").nullable().optional(),\n status: z.string().describe(\"If the request was successful or not. Options: ok, error.\").nullable().optional(),\n articles: z.array(NewsApiGetV1Articles_V1ArticleSchema).describe(\"List of article metadata from the source.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for GET /v1/articles endpoint.\");\n\nexport const newsApiGetV1Articles = action(\"NEWS_API_GET_V1_ARTICLES\", {\n slug: \"news_api-get-v1-articles\",\n name: \"Get V1 Articles\",\n description: \"Tool to fetch live article metadata from a news source using the legacy v1 API. Use when you need headlines from a specific source identifier. This v1 endpoint has been superseded by /v2/top-headlines.\",\n input: NewsApiGetV1ArticlesInput,\n output: NewsApiGetV1ArticlesOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA4BA,IAAAA,EAAE,OAAO;CAChD,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAO;EAAU;CAAS,CAAC,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CAC3F,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+GAA+G;AAC7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4BAA4B;CACrE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/get-v1-articles.d.ts
|
|
4
|
-
declare const NewsApiGetV1ArticlesInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const NewsApiGetV1ArticlesInput: z.ZodObject<{
|
|
5
|
+
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
top: "top";
|
|
7
|
+
latest: "latest";
|
|
8
|
+
popular: "popular";
|
|
9
|
+
}>>;
|
|
10
|
+
source: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
declare const NewsApiGetV1ArticlesOutput: z.ZodObject<{
|
|
13
|
+
sortBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
articles: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
17
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
|
+
author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
urlToImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
publishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
}, z.core.$loose>>>>;
|
|
24
|
+
}, z.core.$loose>;
|
|
25
|
+
declare const newsApiGetV1Articles: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
26
|
+
source: string;
|
|
27
|
+
sortBy?: "top" | "latest" | "popular" | undefined;
|
|
28
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
29
|
//#endregion
|
|
8
30
|
export { newsApiGetV1Articles };
|
|
9
31
|
//# sourceMappingURL=get-v1-articles.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-v1-articles.d.cts","names":[],"sources":["../../src/actions/get-v1-articles.ts"],"mappings":";;;cAIa,yBAAA,
|
|
1
|
+
{"version":3,"file":"get-v1-articles.d.cts","names":[],"sources":["../../src/actions/get-v1-articles.ts"],"mappings":";;;cAIa,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;cAYzB,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAO1B,oBAAA,gCAAoB,wBAAA"}
|
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/get-v1-articles.d.ts
|
|
4
|
-
declare const NewsApiGetV1ArticlesInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const NewsApiGetV1ArticlesInput: z.ZodObject<{
|
|
5
|
+
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
top: "top";
|
|
7
|
+
latest: "latest";
|
|
8
|
+
popular: "popular";
|
|
9
|
+
}>>;
|
|
10
|
+
source: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
declare const NewsApiGetV1ArticlesOutput: z.ZodObject<{
|
|
13
|
+
sortBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
articles: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
17
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
|
+
author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
urlToImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
publishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
}, z.core.$loose>>>>;
|
|
24
|
+
}, z.core.$loose>;
|
|
25
|
+
declare const newsApiGetV1Articles: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
26
|
+
source: string;
|
|
27
|
+
sortBy?: "top" | "latest" | "popular" | undefined;
|
|
28
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
29
|
//#endregion
|
|
8
30
|
export { newsApiGetV1Articles };
|
|
9
31
|
//# sourceMappingURL=get-v1-articles.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-v1-articles.d.mts","names":[],"sources":["../../src/actions/get-v1-articles.ts"],"mappings":";;;cAIa,yBAAA,
|
|
1
|
+
{"version":3,"file":"get-v1-articles.d.mts","names":[],"sources":["../../src/actions/get-v1-articles.ts"],"mappings":";;;cAIa,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;cAYzB,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAO1B,oBAAA,gCAAoB,wBAAA"}
|
|
@@ -16,7 +16,7 @@ const NewsApiGetV1Articles_V1ArticleSchema = z.object({
|
|
|
16
16
|
urlToImage: z.string().describe("URL to the article's image.").nullable().optional(),
|
|
17
17
|
description: z.string().describe("Description or snippet of the article.").nullable().optional(),
|
|
18
18
|
publishedAt: z.string().describe("Publication date/time in ISO 8601 format.").nullable().optional()
|
|
19
|
-
}).describe("Article metadata from v1 endpoint.");
|
|
19
|
+
}).passthrough().describe("Article metadata from v1 endpoint.");
|
|
20
20
|
const newsApiGetV1Articles = action("NEWS_API_GET_V1_ARTICLES", {
|
|
21
21
|
slug: "news_api-get-v1-articles",
|
|
22
22
|
name: "Get V1 Articles",
|
|
@@ -27,7 +27,7 @@ const newsApiGetV1Articles = action("NEWS_API_GET_V1_ARTICLES", {
|
|
|
27
27
|
source: z.string().describe("The identifier of the source requested.").nullable().optional(),
|
|
28
28
|
status: z.string().describe("If the request was successful or not. Options: ok, error.").nullable().optional(),
|
|
29
29
|
articles: z.array(NewsApiGetV1Articles_V1ArticleSchema).describe("List of article metadata from the source.").nullable().optional()
|
|
30
|
-
}).describe("Response schema for GET /v1/articles endpoint.")
|
|
30
|
+
}).passthrough().describe("Response schema for GET /v1/articles endpoint.")
|
|
31
31
|
});
|
|
32
32
|
//#endregion
|
|
33
33
|
export { newsApiGetV1Articles };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-v1-articles.mjs","names":[],"sources":["../../src/actions/get-v1-articles.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetV1ArticlesInput
|
|
1
|
+
{"version":3,"file":"get-v1-articles.mjs","names":[],"sources":["../../src/actions/get-v1-articles.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetV1ArticlesInput = z.object({\n sortBy: z.enum([\"top\", \"latest\", \"popular\"]).describe(\"Sort order for articles.\").optional(),\n source: z.string().describe(\"The identifier for the news source or blog you want headlines from. Use the /sources endpoint to locate this.\"),\n}).describe(\"Request parameters for GET /v1/articles endpoint.\");\nconst NewsApiGetV1Articles_V1ArticleSchema = z.object({\n url: z.string().describe(\"URL to the full article.\").nullable().optional(),\n title: z.string().describe(\"Title of the article.\").nullable().optional(),\n author: z.string().describe(\"Author of the article.\").nullable().optional(),\n urlToImage: z.string().describe(\"URL to the article's image.\").nullable().optional(),\n description: z.string().describe(\"Description or snippet of the article.\").nullable().optional(),\n publishedAt: z.string().describe(\"Publication date/time in ISO 8601 format.\").nullable().optional(),\n}).passthrough().describe(\"Article metadata from v1 endpoint.\");\nexport const NewsApiGetV1ArticlesOutput = z.object({\n sortBy: z.string().describe(\"Which type of article list is being returned. Options: top, latest, popular.\").nullable().optional(),\n source: z.string().describe(\"The identifier of the source requested.\").nullable().optional(),\n status: z.string().describe(\"If the request was successful or not. Options: ok, error.\").nullable().optional(),\n articles: z.array(NewsApiGetV1Articles_V1ArticleSchema).describe(\"List of article metadata from the source.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for GET /v1/articles endpoint.\");\n\nexport const newsApiGetV1Articles = action(\"NEWS_API_GET_V1_ARTICLES\", {\n slug: \"news_api-get-v1-articles\",\n name: \"Get V1 Articles\",\n description: \"Tool to fetch live article metadata from a news source using the legacy v1 API. Use when you need headlines from a specific source identifier. This v1 endpoint has been superseded by /v2/top-headlines.\",\n input: NewsApiGetV1ArticlesInput,\n output: NewsApiGetV1ArticlesOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA4B,EAAE,OAAO;CAChD,QAAQ,EAAE,KAAK;EAAC;EAAO;EAAU;CAAS,CAAC,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CAC3F,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,+GAA+G;AAC7I,CAAC,CAAC,CAAC,SAAS,mDAAmD;AAC/D,MAAM,uCAAuC,EAAE,OAAO;CACpD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxE,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1E,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnF,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACpG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oCAAoC;AAQ9D,MAAa,uBAAuB,OAAO,4BAA4B;CACrE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAZwC,EAAE,OAAO;EACjD,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChI,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3F,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7G,UAAU,EAAE,MAAM,oCAAoC,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,gDAOhB;AACV,CAAC"}
|
package/dist/catalog.cjs
CHANGED
|
@@ -7,7 +7,13 @@ const newsApiCatalog = {
|
|
|
7
7
|
"category": "News & Lifestyle",
|
|
8
8
|
"logo": "https://logos.composio.dev/api/news_api",
|
|
9
9
|
"authKind": "keystroke",
|
|
10
|
-
"oauthScopes": []
|
|
10
|
+
"oauthScopes": [],
|
|
11
|
+
"credentialFields": { "api_key": {
|
|
12
|
+
"label": "News API Key",
|
|
13
|
+
"secret": true,
|
|
14
|
+
"description": "Your unique API key for authenticating requests to News API."
|
|
15
|
+
} },
|
|
16
|
+
"credentialScheme": "API_KEY"
|
|
11
17
|
};
|
|
12
18
|
//#endregion
|
|
13
19
|
exports.newsApiCatalog = newsApiCatalog;
|