@keystrokehq/news_api 0.1.4 → 0.1.6
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 +1 -0
- package/dist/actions/get-everything.cjs.map +1 -1
- package/dist/actions/get-everything.d.cts +7 -17
- package/dist/actions/get-everything.d.cts.map +1 -1
- package/dist/actions/get-everything.d.mts +7 -17
- package/dist/actions/get-everything.d.mts.map +1 -1
- package/dist/actions/get-everything.mjs +1 -0
- package/dist/actions/get-everything.mjs.map +1 -1
- package/dist/actions/get-sources.cjs +1 -0
- package/dist/actions/get-sources.cjs.map +1 -1
- package/dist/actions/get-sources.d.cts +16 -18
- package/dist/actions/get-sources.d.cts.map +1 -1
- package/dist/actions/get-sources.d.mts +16 -18
- package/dist/actions/get-sources.d.mts.map +1 -1
- package/dist/actions/get-sources.mjs +1 -0
- package/dist/actions/get-sources.mjs.map +1 -1
- package/dist/actions/get-top-headlines.cjs +1 -0
- package/dist/actions/get-top-headlines.cjs.map +1 -1
- package/dist/actions/get-top-headlines.d.cts +12 -17
- package/dist/actions/get-top-headlines.d.cts.map +1 -1
- package/dist/actions/get-top-headlines.d.mts +12 -17
- package/dist/actions/get-top-headlines.d.mts.map +1 -1
- package/dist/actions/get-top-headlines.mjs +1 -0
- package/dist/actions/get-top-headlines.mjs.map +1 -1
- package/dist/actions/get-v1-articles.cjs +1 -0
- package/dist/actions/get-v1-articles.cjs.map +1 -1
- package/dist/actions/get-v1-articles.d.cts +3 -4
- package/dist/actions/get-v1-articles.d.cts.map +1 -1
- package/dist/actions/get-v1-articles.d.mts +3 -4
- package/dist/actions/get-v1-articles.d.mts.map +1 -1
- package/dist/actions/get-v1-articles.mjs +1 -0
- package/dist/actions/get-v1-articles.mjs.map +1 -1
- package/dist/app.cjs +5 -2
- package/dist/app.cjs.map +1 -1
- package/dist/app.d.cts +7 -1
- package/dist/app.d.cts.map +1 -1
- package/dist/app.d.mts +7 -1
- package/dist/app.d.mts.map +1 -1
- package/dist/app.mjs +3 -2
- package/dist/app.mjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/package.json +2 -2
package/dist/action.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.cjs","names":["newsApi","executeNewsApiTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { newsApi } from \"./app\";\nimport { executeNewsApiTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output:
|
|
1
|
+
{"version":3,"file":"action.cjs","names":["newsApi","executeNewsApiTool"],"sources":["../src/action.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { newsApi } from \"./app\";\nimport { executeNewsApiTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType, TOutput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: TOutput;\n },\n): AppAction<TInput, TOutput, typeof newsApi.credential> {\n return newsApi.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeNewsApiTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAOA,SAAgB,OACd,MACA,KAOuD;CACvD,OAAOA,YAAAA,QAAQ,OAAO;EACpB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,mBAAmB,MAAM,KAAgC,CAAC;EAC1F;CACF,CAAC;AACH"}
|
package/dist/action.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { newsApi } from \"./app\";\nimport { executeNewsApiTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output:
|
|
1
|
+
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { newsApi } from \"./app\";\nimport { executeNewsApiTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType, TOutput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: TOutput;\n },\n): AppAction<TInput, TOutput, typeof newsApi.credential> {\n return newsApi.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeNewsApiTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAOA,SAAgB,OACd,MACA,KAOuD;CACvD,OAAO,QAAQ,OAAO;EACpB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,mBAAmB,MAAM,KAAgC,CAAC;EAC1F;CACF,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-everything.cjs","names":["z","action"],"sources":["../../src/actions/get-everything.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetEverythingInput = z.object({\n q: z.string().describe(\"Keywords or phrases to search for in the article title and body\").optional(),\n to: z.string().describe(\"Newest date or date-time for articles (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss). Date range limits depend on your News API plan tier (free plans are limited to approximately 1 month of historical data)\").optional(),\n from: z.string().describe(\"Oldest date or date-time for articles (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss). Date range limits depend on your News API plan tier (free plans are limited to approximately 1 month of historical data)\").optional(),\n page: z.number().int().describe(\"Page number of results to return (default 1) When totalResults exceeds pageSize, increment page to retrieve additional results.\").optional(),\n sortBy: z.enum([\"relevancy\", \"popularity\", \"publishedAt\"]).describe(\"Order to sort articles: relevancy, popularity, or publishedAt\").optional(),\n domains: z.string().describe(\"Comma-separated list of domains to include in results\").optional(),\n sources: z.string().describe(\"Comma-separated list of source identifiers to filter on Use valid source IDs from NEWS_API_GET_SOURCES; unrecognized IDs silently return empty results.\").optional(),\n language: z.enum([\"ar\", \"de\", \"en\", \"es\", \"fr\", \"he\", \"it\", \"nl\", \"no\", \"pt\", \"ru\", \"sv\", \"ud\", \"zh\"]).describe(\"2-letter ISO-639-1 code to restrict the search to that language\").optional(),\n pageSize: z.number().int().describe(\"Number of results per page (default 20, max 100)\").optional(),\n qInTitle: z.string().describe(\"Keywords or phrases to search for in the article title only\").optional(),\n excludeDomains: z.string().describe(\"Comma-separated list of domains to exclude from results\").optional(),\n}).describe(\"Request schema for GET /v2/everything endpoint.\");\nconst NewsApiGetEverything_ArticleSourceSchema = z.object({\n id: z.string().describe(\"Identifier for the source\").nullable().optional(),\n name: z.string().describe(\"Name of the source\").nullable(),\n}).passthrough();\nconst NewsApiGetEverything_ArticleSchema = z.object({\n url: z.string().describe(\"URL to the full article\").nullable(),\n title: z.string().describe(\"Title of the article\").nullable(),\n author: z.string().describe(\"Author of the article\").nullable().optional(),\n source: NewsApiGetEverything_ArticleSourceSchema.nullable(),\n content: z.string().describe(\"Content of the article\").nullable().optional(),\n urlToImage: z.string().describe(\"URL to the image of the article\").nullable().optional(),\n description: z.string().describe(\"Description of the article\").nullable().optional(),\n publishedAt: z.string().describe(\"Publication date/time in ISO8601 format\").nullable(),\n}).passthrough();\nexport const NewsApiGetEverythingOutput = z.object({\n status: z.string().describe(\"'ok' or 'error' status of the response\").nullable(),\n articles: z.array(NewsApiGetEverything_ArticleSchema).describe(\"List of articles matching the query\"),\n totalResults: z.number().int().describe(\"Total number of results available\").nullable(),\n}).passthrough();\n\nexport const newsApiGetEverything = action(\"NEWS_API_GET_EVERYTHING\", {\n slug: \"news_api-get-everything\",\n name: \"Get Everything\",\n description: \"Tool to search through every article published by over 150,000 sources. At least one of q, sources, language, or domains must be set or the API returns a parametersMissing error. Historical date range depends on your News API plan tier (free plans limited to ~1 month). No country parameter exists; target geography via sources, domains, or country-specific terms in q. Burst requests may trigger HTTP 429; apply backoff on throttling errors.\",\n input: NewsApiGetEverythingInput,\n output: NewsApiGetEverythingOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-everything.cjs","names":["z","action"],"sources":["../../src/actions/get-everything.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { newsApi } from \"../app\";\n\nexport const NewsApiGetEverythingInput = z.object({\n q: z.string().describe(\"Keywords or phrases to search for in the article title and body\").optional(),\n to: z.string().describe(\"Newest date or date-time for articles (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss). Date range limits depend on your News API plan tier (free plans are limited to approximately 1 month of historical data)\").optional(),\n from: z.string().describe(\"Oldest date or date-time for articles (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss). Date range limits depend on your News API plan tier (free plans are limited to approximately 1 month of historical data)\").optional(),\n page: z.number().int().describe(\"Page number of results to return (default 1) When totalResults exceeds pageSize, increment page to retrieve additional results.\").optional(),\n sortBy: z.enum([\"relevancy\", \"popularity\", \"publishedAt\"]).describe(\"Order to sort articles: relevancy, popularity, or publishedAt\").optional(),\n domains: z.string().describe(\"Comma-separated list of domains to include in results\").optional(),\n sources: z.string().describe(\"Comma-separated list of source identifiers to filter on Use valid source IDs from NEWS_API_GET_SOURCES; unrecognized IDs silently return empty results.\").optional(),\n language: z.enum([\"ar\", \"de\", \"en\", \"es\", \"fr\", \"he\", \"it\", \"nl\", \"no\", \"pt\", \"ru\", \"sv\", \"ud\", \"zh\"]).describe(\"2-letter ISO-639-1 code to restrict the search to that language\").optional(),\n pageSize: z.number().int().describe(\"Number of results per page (default 20, max 100)\").optional(),\n qInTitle: z.string().describe(\"Keywords or phrases to search for in the article title only\").optional(),\n excludeDomains: z.string().describe(\"Comma-separated list of domains to exclude from results\").optional(),\n}).describe(\"Request schema for GET /v2/everything endpoint.\");\nconst NewsApiGetEverything_ArticleSourceSchema = z.object({\n id: z.string().describe(\"Identifier for the source\").nullable().optional(),\n name: z.string().describe(\"Name of the source\").nullable(),\n}).passthrough();\nconst NewsApiGetEverything_ArticleSchema = z.object({\n url: z.string().describe(\"URL to the full article\").nullable(),\n title: z.string().describe(\"Title of the article\").nullable(),\n author: z.string().describe(\"Author of the article\").nullable().optional(),\n source: NewsApiGetEverything_ArticleSourceSchema.nullable(),\n content: z.string().describe(\"Content of the article\").nullable().optional(),\n urlToImage: z.string().describe(\"URL to the image of the article\").nullable().optional(),\n description: z.string().describe(\"Description of the article\").nullable().optional(),\n publishedAt: z.string().describe(\"Publication date/time in ISO8601 format\").nullable(),\n}).passthrough();\nexport const NewsApiGetEverythingOutput = z.object({\n status: z.string().describe(\"'ok' or 'error' status of the response\").nullable(),\n articles: z.array(NewsApiGetEverything_ArticleSchema).describe(\"List of articles matching the query\"),\n totalResults: z.number().int().describe(\"Total number of results available\").nullable(),\n}).passthrough();\n\nexport const newsApiGetEverything: AppAction<\n typeof NewsApiGetEverythingInput,\n typeof NewsApiGetEverythingOutput,\n typeof newsApi.credential\n> = action(\"NEWS_API_GET_EVERYTHING\", {\n slug: \"news_api-get-everything\",\n name: \"Get Everything\",\n description: \"Tool to search through every article published by over 150,000 sources. At least one of q, sources, language, or domains must be set or the API returns a parametersMissing error. Historical date range depends on your News API plan tier (free plans limited to ~1 month). No country parameter exists; target geography via sources, domains, or country-specific terms in q. Burst requests may trigger HTTP 429; apply backoff on throttling errors.\",\n input: NewsApiGetEverythingInput,\n output: NewsApiGetEverythingOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,4BAA4BA,IAAAA,EAAE,OAAO;CAChD,GAAGA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CACnG,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qMAAqM,CAAC,CAAC,SAAS;CACxO,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qMAAqM,CAAC,CAAC,SAAS;CAC1O,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iIAAiI,CAAC,CAAC,SAAS;CAC5K,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAa;EAAc;CAAa,CAAC,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CAC9I,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CAC/F,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yJAAyJ,CAAC,CAAC,SAAS;CACjM,UAAUA,IAAAA,EAAE,KAAK;EAAC;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;CAAI,CAAC,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC5L,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CACjG,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;CACtG,gBAAgBA,IAAAA,EAAE,OAAO,CAA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AcA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;AACxF,CAAC,CAAC,CAAC,YAAY;AAEf,MAAa,uBAITC,eAAAA,OAAO,2BAA2B;CACpC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { newsApi } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/get-everything.d.ts
|
|
@@ -16,18 +18,18 @@ declare const NewsApiGetEverythingInput: z.ZodObject<{
|
|
|
16
18
|
language: z.ZodOptional<z.ZodEnum<{
|
|
17
19
|
ar: "ar";
|
|
18
20
|
de: "de";
|
|
19
|
-
en: "en";
|
|
20
|
-
es: "es";
|
|
21
21
|
fr: "fr";
|
|
22
|
-
he: "he";
|
|
23
22
|
it: "it";
|
|
24
23
|
nl: "nl";
|
|
25
24
|
no: "no";
|
|
26
25
|
pt: "pt";
|
|
27
26
|
ru: "ru";
|
|
28
|
-
|
|
27
|
+
en: "en";
|
|
28
|
+
es: "es";
|
|
29
|
+
he: "he";
|
|
29
30
|
ud: "ud";
|
|
30
31
|
zh: "zh";
|
|
32
|
+
sv: "sv";
|
|
31
33
|
}>>;
|
|
32
34
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
33
35
|
qInTitle: z.ZodOptional<z.ZodString>;
|
|
@@ -50,19 +52,7 @@ declare const NewsApiGetEverythingOutput: z.ZodObject<{
|
|
|
50
52
|
}, z.core.$loose>>;
|
|
51
53
|
totalResults: z.ZodNullable<z.ZodNumber>;
|
|
52
54
|
}, z.core.$loose>;
|
|
53
|
-
declare const newsApiGetEverything:
|
|
54
|
-
q?: string | undefined;
|
|
55
|
-
to?: string | undefined;
|
|
56
|
-
from?: string | undefined;
|
|
57
|
-
page?: number | undefined;
|
|
58
|
-
sortBy?: "publishedAt" | "relevancy" | "popularity" | undefined;
|
|
59
|
-
domains?: string | undefined;
|
|
60
|
-
sources?: string | undefined;
|
|
61
|
-
language?: "ar" | "de" | "en" | "es" | "fr" | "he" | "it" | "nl" | "no" | "pt" | "ru" | "sv" | "ud" | "zh" | undefined;
|
|
62
|
-
pageSize?: number | undefined;
|
|
63
|
-
qInTitle?: string | undefined;
|
|
64
|
-
excludeDomains?: string | undefined;
|
|
65
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
55
|
+
declare const newsApiGetEverything: AppAction<typeof NewsApiGetEverythingInput, typeof NewsApiGetEverythingOutput, typeof newsApi.credential>;
|
|
66
56
|
//#endregion
|
|
67
57
|
export { newsApiGetEverything };
|
|
68
58
|
//# sourceMappingURL=get-everything.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-everything.d.cts","names":[],"sources":["../../src/actions/get-everything.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-everything.d.cts","names":[],"sources":["../../src/actions/get-everything.ts"],"mappings":";;;;;cAMa,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2BzB,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAM1B,oBAAA,EAAsB,SAAA,QAC1B,yBAAA,SACA,0BAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { newsApi } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/get-everything.d.ts
|
|
@@ -16,18 +18,18 @@ declare const NewsApiGetEverythingInput: z.ZodObject<{
|
|
|
16
18
|
language: z.ZodOptional<z.ZodEnum<{
|
|
17
19
|
ar: "ar";
|
|
18
20
|
de: "de";
|
|
19
|
-
en: "en";
|
|
20
|
-
es: "es";
|
|
21
21
|
fr: "fr";
|
|
22
|
-
he: "he";
|
|
23
22
|
it: "it";
|
|
24
23
|
nl: "nl";
|
|
25
24
|
no: "no";
|
|
26
25
|
pt: "pt";
|
|
27
26
|
ru: "ru";
|
|
28
|
-
|
|
27
|
+
en: "en";
|
|
28
|
+
es: "es";
|
|
29
|
+
he: "he";
|
|
29
30
|
ud: "ud";
|
|
30
31
|
zh: "zh";
|
|
32
|
+
sv: "sv";
|
|
31
33
|
}>>;
|
|
32
34
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
33
35
|
qInTitle: z.ZodOptional<z.ZodString>;
|
|
@@ -50,19 +52,7 @@ declare const NewsApiGetEverythingOutput: z.ZodObject<{
|
|
|
50
52
|
}, z.core.$loose>>;
|
|
51
53
|
totalResults: z.ZodNullable<z.ZodNumber>;
|
|
52
54
|
}, z.core.$loose>;
|
|
53
|
-
declare const newsApiGetEverything:
|
|
54
|
-
q?: string | undefined;
|
|
55
|
-
to?: string | undefined;
|
|
56
|
-
from?: string | undefined;
|
|
57
|
-
page?: number | undefined;
|
|
58
|
-
sortBy?: "publishedAt" | "relevancy" | "popularity" | undefined;
|
|
59
|
-
domains?: string | undefined;
|
|
60
|
-
sources?: string | undefined;
|
|
61
|
-
language?: "ar" | "de" | "en" | "es" | "fr" | "he" | "it" | "nl" | "no" | "pt" | "ru" | "sv" | "ud" | "zh" | undefined;
|
|
62
|
-
pageSize?: number | undefined;
|
|
63
|
-
qInTitle?: string | undefined;
|
|
64
|
-
excludeDomains?: string | undefined;
|
|
65
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
55
|
+
declare const newsApiGetEverything: AppAction<typeof NewsApiGetEverythingInput, typeof NewsApiGetEverythingOutput, typeof newsApi.credential>;
|
|
66
56
|
//#endregion
|
|
67
57
|
export { newsApiGetEverything };
|
|
68
58
|
//# sourceMappingURL=get-everything.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-everything.d.mts","names":[],"sources":["../../src/actions/get-everything.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-everything.d.mts","names":[],"sources":["../../src/actions/get-everything.ts"],"mappings":";;;;;cAMa,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2BzB,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAM1B,oBAAA,EAAsB,SAAA,QAC1B,yBAAA,SACA,0BAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-everything.mjs","names":[],"sources":["../../src/actions/get-everything.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetEverythingInput = z.object({\n q: z.string().describe(\"Keywords or phrases to search for in the article title and body\").optional(),\n to: z.string().describe(\"Newest date or date-time for articles (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss). Date range limits depend on your News API plan tier (free plans are limited to approximately 1 month of historical data)\").optional(),\n from: z.string().describe(\"Oldest date or date-time for articles (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss). Date range limits depend on your News API plan tier (free plans are limited to approximately 1 month of historical data)\").optional(),\n page: z.number().int().describe(\"Page number of results to return (default 1) When totalResults exceeds pageSize, increment page to retrieve additional results.\").optional(),\n sortBy: z.enum([\"relevancy\", \"popularity\", \"publishedAt\"]).describe(\"Order to sort articles: relevancy, popularity, or publishedAt\").optional(),\n domains: z.string().describe(\"Comma-separated list of domains to include in results\").optional(),\n sources: z.string().describe(\"Comma-separated list of source identifiers to filter on Use valid source IDs from NEWS_API_GET_SOURCES; unrecognized IDs silently return empty results.\").optional(),\n language: z.enum([\"ar\", \"de\", \"en\", \"es\", \"fr\", \"he\", \"it\", \"nl\", \"no\", \"pt\", \"ru\", \"sv\", \"ud\", \"zh\"]).describe(\"2-letter ISO-639-1 code to restrict the search to that language\").optional(),\n pageSize: z.number().int().describe(\"Number of results per page (default 20, max 100)\").optional(),\n qInTitle: z.string().describe(\"Keywords or phrases to search for in the article title only\").optional(),\n excludeDomains: z.string().describe(\"Comma-separated list of domains to exclude from results\").optional(),\n}).describe(\"Request schema for GET /v2/everything endpoint.\");\nconst NewsApiGetEverything_ArticleSourceSchema = z.object({\n id: z.string().describe(\"Identifier for the source\").nullable().optional(),\n name: z.string().describe(\"Name of the source\").nullable(),\n}).passthrough();\nconst NewsApiGetEverything_ArticleSchema = z.object({\n url: z.string().describe(\"URL to the full article\").nullable(),\n title: z.string().describe(\"Title of the article\").nullable(),\n author: z.string().describe(\"Author of the article\").nullable().optional(),\n source: NewsApiGetEverything_ArticleSourceSchema.nullable(),\n content: z.string().describe(\"Content of the article\").nullable().optional(),\n urlToImage: z.string().describe(\"URL to the image of the article\").nullable().optional(),\n description: z.string().describe(\"Description of the article\").nullable().optional(),\n publishedAt: z.string().describe(\"Publication date/time in ISO8601 format\").nullable(),\n}).passthrough();\nexport const NewsApiGetEverythingOutput = z.object({\n status: z.string().describe(\"'ok' or 'error' status of the response\").nullable(),\n articles: z.array(NewsApiGetEverything_ArticleSchema).describe(\"List of articles matching the query\"),\n totalResults: z.number().int().describe(\"Total number of results available\").nullable(),\n}).passthrough();\n\nexport const newsApiGetEverything = action(\"NEWS_API_GET_EVERYTHING\", {\n slug: \"news_api-get-everything\",\n name: \"Get Everything\",\n description: \"Tool to search through every article published by over 150,000 sources. At least one of q, sources, language, or domains must be set or the API returns a parametersMissing error. Historical date range depends on your News API plan tier (free plans limited to ~1 month). No country parameter exists; target geography via sources, domains, or country-specific terms in q. Burst requests may trigger HTTP 429; apply backoff on throttling errors.\",\n input: NewsApiGetEverythingInput,\n output: NewsApiGetEverythingOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-everything.mjs","names":[],"sources":["../../src/actions/get-everything.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { newsApi } from \"../app\";\n\nexport const NewsApiGetEverythingInput = z.object({\n q: z.string().describe(\"Keywords or phrases to search for in the article title and body\").optional(),\n to: z.string().describe(\"Newest date or date-time for articles (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss). Date range limits depend on your News API plan tier (free plans are limited to approximately 1 month of historical data)\").optional(),\n from: z.string().describe(\"Oldest date or date-time for articles (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss). Date range limits depend on your News API plan tier (free plans are limited to approximately 1 month of historical data)\").optional(),\n page: z.number().int().describe(\"Page number of results to return (default 1) When totalResults exceeds pageSize, increment page to retrieve additional results.\").optional(),\n sortBy: z.enum([\"relevancy\", \"popularity\", \"publishedAt\"]).describe(\"Order to sort articles: relevancy, popularity, or publishedAt\").optional(),\n domains: z.string().describe(\"Comma-separated list of domains to include in results\").optional(),\n sources: z.string().describe(\"Comma-separated list of source identifiers to filter on Use valid source IDs from NEWS_API_GET_SOURCES; unrecognized IDs silently return empty results.\").optional(),\n language: z.enum([\"ar\", \"de\", \"en\", \"es\", \"fr\", \"he\", \"it\", \"nl\", \"no\", \"pt\", \"ru\", \"sv\", \"ud\", \"zh\"]).describe(\"2-letter ISO-639-1 code to restrict the search to that language\").optional(),\n pageSize: z.number().int().describe(\"Number of results per page (default 20, max 100)\").optional(),\n qInTitle: z.string().describe(\"Keywords or phrases to search for in the article title only\").optional(),\n excludeDomains: z.string().describe(\"Comma-separated list of domains to exclude from results\").optional(),\n}).describe(\"Request schema for GET /v2/everything endpoint.\");\nconst NewsApiGetEverything_ArticleSourceSchema = z.object({\n id: z.string().describe(\"Identifier for the source\").nullable().optional(),\n name: z.string().describe(\"Name of the source\").nullable(),\n}).passthrough();\nconst NewsApiGetEverything_ArticleSchema = z.object({\n url: z.string().describe(\"URL to the full article\").nullable(),\n title: z.string().describe(\"Title of the article\").nullable(),\n author: z.string().describe(\"Author of the article\").nullable().optional(),\n source: NewsApiGetEverything_ArticleSourceSchema.nullable(),\n content: z.string().describe(\"Content of the article\").nullable().optional(),\n urlToImage: z.string().describe(\"URL to the image of the article\").nullable().optional(),\n description: z.string().describe(\"Description of the article\").nullable().optional(),\n publishedAt: z.string().describe(\"Publication date/time in ISO8601 format\").nullable(),\n}).passthrough();\nexport const NewsApiGetEverythingOutput = z.object({\n status: z.string().describe(\"'ok' or 'error' status of the response\").nullable(),\n articles: z.array(NewsApiGetEverything_ArticleSchema).describe(\"List of articles matching the query\"),\n totalResults: z.number().int().describe(\"Total number of results available\").nullable(),\n}).passthrough();\n\nexport const newsApiGetEverything: AppAction<\n typeof NewsApiGetEverythingInput,\n typeof NewsApiGetEverythingOutput,\n typeof newsApi.credential\n> = action(\"NEWS_API_GET_EVERYTHING\", {\n slug: \"news_api-get-everything\",\n name: \"Get Everything\",\n description: \"Tool to search through every article published by over 150,000 sources. At least one of q, sources, language, or domains must be set or the API returns a parametersMissing error. Historical date range depends on your News API plan tier (free plans limited to ~1 month). No country parameter exists; target geography via sources, domains, or country-specific terms in q. Burst requests may trigger HTTP 429; apply backoff on throttling errors.\",\n input: NewsApiGetEverythingInput,\n output: NewsApiGetEverythingOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,4BAA4B,EAAE,OAAO;CAChD,GAAG,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CACnG,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,qMAAqM,CAAC,CAAC,SAAS;CACxO,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,qMAAqM,CAAC,CAAC,SAAS;CAC1O,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iIAAiI,CAAC,CAAC,SAAS;CAC5K,QAAQ,EAAE,KAAK;EAAC;EAAa;EAAc;CAAa,CAAC,CAAC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CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvF,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnF,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;AACvF,CAAC,CAAC,CAAC,YAAY;AAOf,MAAa,uBAIT,OAAO,2BAA2B;CACpC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAfwC,EAAE,OAAO;EACjD,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;EAC/E,UAAU,EAAE,MAAM,kCAAkC,CAAC,CAAC,SAAS,qCAAqC;EACpG,cAAc,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACxF,CAAC,CAAC,CAAC,YAWO;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-sources.cjs","names":["z","action"],"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":"
|
|
1
|
+
{"version":3,"file":"get-sources.cjs","names":["z","action"],"sources":["../../src/actions/get-sources.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { newsApi } from \"../app\";\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: AppAction<\n typeof NewsApiGetSourcesInput,\n typeof NewsApiGetSourcesOutput,\n typeof newsApi.credential\n> = 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":";;;;AAMA,MAAa,yBAAyBA,IAAAA,EAAE,OAAO;CAC7C,SAASA,IAAAA,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,UAAUA,IAAAA,EAAE,KAAK;EAAC;EAAY;EAAiB;EAAW;EAAU;EAAW;EAAU;CAAY,CAAC,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS;CACnK,UAAUA,IAAAA,EAAE,KAAK;EAAC;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;EAAM;CAAI,CAAC,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS;AACpK,CAAC,CAAC,CAAC,SAAS,qCAAqC;AACjD,MAAM,qCAAqCA,IAAAA,EAAE,OAAO;CAClD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACtE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS;CACjE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS;CAClE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS;CACtE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CAC5E,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS;CACxE,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;AAChF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,0BAA0B;AACpD,MAAa,0BAA0BA,IAAAA,EAAE,OAAO;CAC9C,QAAQA,IAAAA,EAAE,KAAK,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;CACtE,SAASA,IAAAA,EAAE,MAAM,kCAAkC,CAAC,CAAC,SAAS,iCAAiC;AACjG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,kCAAkC;AAE5D,MAAa,oBAITC,eAAAA,OAAO,wBAAwB;CACjC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
+
import { newsApi } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/get-sources.d.ts
|
|
4
6
|
declare const NewsApiGetSourcesInput: z.ZodObject<{
|
|
5
7
|
country: z.ZodOptional<z.ZodEnum<{
|
|
6
|
-
in: "in";
|
|
7
8
|
at: "at";
|
|
8
9
|
id: "id";
|
|
9
|
-
|
|
10
|
-
de: "de";
|
|
11
|
-
fr: "fr";
|
|
12
|
-
it: "it";
|
|
13
|
-
nl: "nl";
|
|
14
|
-
no: "no";
|
|
15
|
-
pt: "pt";
|
|
16
|
-
ru: "ru";
|
|
10
|
+
in: "in";
|
|
17
11
|
ae: "ae";
|
|
12
|
+
ar: "ar";
|
|
18
13
|
au: "au";
|
|
19
14
|
be: "be";
|
|
20
15
|
bg: "bg";
|
|
@@ -25,7 +20,9 @@ declare const NewsApiGetSourcesInput: z.ZodObject<{
|
|
|
25
20
|
co: "co";
|
|
26
21
|
cu: "cu";
|
|
27
22
|
cz: "cz";
|
|
23
|
+
de: "de";
|
|
28
24
|
eg: "eg";
|
|
25
|
+
fr: "fr";
|
|
29
26
|
gb: "gb";
|
|
30
27
|
gr: "gr";
|
|
31
28
|
hk: "hk";
|
|
@@ -33,6 +30,7 @@ declare const NewsApiGetSourcesInput: z.ZodObject<{
|
|
|
33
30
|
ie: "ie";
|
|
34
31
|
il: "il";
|
|
35
32
|
is: "is";
|
|
33
|
+
it: "it";
|
|
36
34
|
jp: "jp";
|
|
37
35
|
kr: "kr";
|
|
38
36
|
lt: "lt";
|
|
@@ -41,11 +39,15 @@ declare const NewsApiGetSourcesInput: z.ZodObject<{
|
|
|
41
39
|
mx: "mx";
|
|
42
40
|
my: "my";
|
|
43
41
|
ng: "ng";
|
|
42
|
+
nl: "nl";
|
|
43
|
+
no: "no";
|
|
44
44
|
nz: "nz";
|
|
45
45
|
ph: "ph";
|
|
46
46
|
pl: "pl";
|
|
47
|
+
pt: "pt";
|
|
47
48
|
ro: "ro";
|
|
48
49
|
rs: "rs";
|
|
50
|
+
ru: "ru";
|
|
49
51
|
sa: "sa";
|
|
50
52
|
se: "se";
|
|
51
53
|
sg: "sg";
|
|
@@ -71,18 +73,18 @@ declare const NewsApiGetSourcesInput: z.ZodObject<{
|
|
|
71
73
|
language: z.ZodOptional<z.ZodEnum<{
|
|
72
74
|
ar: "ar";
|
|
73
75
|
de: "de";
|
|
74
|
-
en: "en";
|
|
75
|
-
es: "es";
|
|
76
76
|
fr: "fr";
|
|
77
|
-
he: "he";
|
|
78
77
|
it: "it";
|
|
79
78
|
nl: "nl";
|
|
80
79
|
no: "no";
|
|
81
80
|
pt: "pt";
|
|
82
81
|
ru: "ru";
|
|
82
|
+
se: "se";
|
|
83
|
+
en: "en";
|
|
84
|
+
es: "es";
|
|
85
|
+
he: "he";
|
|
83
86
|
ud: "ud";
|
|
84
87
|
zh: "zh";
|
|
85
|
-
se: "se";
|
|
86
88
|
}>>;
|
|
87
89
|
}, z.core.$strip>;
|
|
88
90
|
declare const NewsApiGetSourcesOutput: z.ZodObject<{
|
|
@@ -100,11 +102,7 @@ declare const NewsApiGetSourcesOutput: z.ZodObject<{
|
|
|
100
102
|
description: z.ZodNullable<z.ZodString>;
|
|
101
103
|
}, z.core.$loose>>;
|
|
102
104
|
}, z.core.$loose>;
|
|
103
|
-
declare const newsApiGetSources:
|
|
104
|
-
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" | "is" | "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;
|
|
105
|
-
category?: "business" | "entertainment" | "general" | "health" | "science" | "sports" | "technology" | undefined;
|
|
106
|
-
language?: "ar" | "de" | "en" | "es" | "fr" | "he" | "it" | "nl" | "no" | "pt" | "ru" | "ud" | "zh" | "se" | undefined;
|
|
107
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
105
|
+
declare const newsApiGetSources: AppAction<typeof NewsApiGetSourcesInput, typeof NewsApiGetSourcesOutput, typeof newsApi.credential>;
|
|
108
106
|
//#endregion
|
|
109
107
|
export { newsApiGetSources };
|
|
110
108
|
//# sourceMappingURL=get-sources.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-sources.d.cts","names":[],"sources":["../../src/actions/get-sources.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-sources.d.cts","names":[],"sources":["../../src/actions/get-sources.ts"],"mappings":";;;;;cAMa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cActB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAKvB,iBAAA,EAAmB,SAAA,QACvB,sBAAA,SACA,uBAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
+
import { newsApi } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/get-sources.d.ts
|
|
4
6
|
declare const NewsApiGetSourcesInput: z.ZodObject<{
|
|
5
7
|
country: z.ZodOptional<z.ZodEnum<{
|
|
6
|
-
in: "in";
|
|
7
8
|
at: "at";
|
|
8
9
|
id: "id";
|
|
9
|
-
|
|
10
|
-
de: "de";
|
|
11
|
-
fr: "fr";
|
|
12
|
-
it: "it";
|
|
13
|
-
nl: "nl";
|
|
14
|
-
no: "no";
|
|
15
|
-
pt: "pt";
|
|
16
|
-
ru: "ru";
|
|
10
|
+
in: "in";
|
|
17
11
|
ae: "ae";
|
|
12
|
+
ar: "ar";
|
|
18
13
|
au: "au";
|
|
19
14
|
be: "be";
|
|
20
15
|
bg: "bg";
|
|
@@ -25,7 +20,9 @@ declare const NewsApiGetSourcesInput: z.ZodObject<{
|
|
|
25
20
|
co: "co";
|
|
26
21
|
cu: "cu";
|
|
27
22
|
cz: "cz";
|
|
23
|
+
de: "de";
|
|
28
24
|
eg: "eg";
|
|
25
|
+
fr: "fr";
|
|
29
26
|
gb: "gb";
|
|
30
27
|
gr: "gr";
|
|
31
28
|
hk: "hk";
|
|
@@ -33,6 +30,7 @@ declare const NewsApiGetSourcesInput: z.ZodObject<{
|
|
|
33
30
|
ie: "ie";
|
|
34
31
|
il: "il";
|
|
35
32
|
is: "is";
|
|
33
|
+
it: "it";
|
|
36
34
|
jp: "jp";
|
|
37
35
|
kr: "kr";
|
|
38
36
|
lt: "lt";
|
|
@@ -41,11 +39,15 @@ declare const NewsApiGetSourcesInput: z.ZodObject<{
|
|
|
41
39
|
mx: "mx";
|
|
42
40
|
my: "my";
|
|
43
41
|
ng: "ng";
|
|
42
|
+
nl: "nl";
|
|
43
|
+
no: "no";
|
|
44
44
|
nz: "nz";
|
|
45
45
|
ph: "ph";
|
|
46
46
|
pl: "pl";
|
|
47
|
+
pt: "pt";
|
|
47
48
|
ro: "ro";
|
|
48
49
|
rs: "rs";
|
|
50
|
+
ru: "ru";
|
|
49
51
|
sa: "sa";
|
|
50
52
|
se: "se";
|
|
51
53
|
sg: "sg";
|
|
@@ -71,18 +73,18 @@ declare const NewsApiGetSourcesInput: z.ZodObject<{
|
|
|
71
73
|
language: z.ZodOptional<z.ZodEnum<{
|
|
72
74
|
ar: "ar";
|
|
73
75
|
de: "de";
|
|
74
|
-
en: "en";
|
|
75
|
-
es: "es";
|
|
76
76
|
fr: "fr";
|
|
77
|
-
he: "he";
|
|
78
77
|
it: "it";
|
|
79
78
|
nl: "nl";
|
|
80
79
|
no: "no";
|
|
81
80
|
pt: "pt";
|
|
82
81
|
ru: "ru";
|
|
82
|
+
se: "se";
|
|
83
|
+
en: "en";
|
|
84
|
+
es: "es";
|
|
85
|
+
he: "he";
|
|
83
86
|
ud: "ud";
|
|
84
87
|
zh: "zh";
|
|
85
|
-
se: "se";
|
|
86
88
|
}>>;
|
|
87
89
|
}, z.core.$strip>;
|
|
88
90
|
declare const NewsApiGetSourcesOutput: z.ZodObject<{
|
|
@@ -100,11 +102,7 @@ declare const NewsApiGetSourcesOutput: z.ZodObject<{
|
|
|
100
102
|
description: z.ZodNullable<z.ZodString>;
|
|
101
103
|
}, z.core.$loose>>;
|
|
102
104
|
}, z.core.$loose>;
|
|
103
|
-
declare const newsApiGetSources:
|
|
104
|
-
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" | "is" | "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;
|
|
105
|
-
category?: "business" | "entertainment" | "general" | "health" | "science" | "sports" | "technology" | undefined;
|
|
106
|
-
language?: "ar" | "de" | "en" | "es" | "fr" | "he" | "it" | "nl" | "no" | "pt" | "ru" | "ud" | "zh" | "se" | undefined;
|
|
107
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
105
|
+
declare const newsApiGetSources: AppAction<typeof NewsApiGetSourcesInput, typeof NewsApiGetSourcesOutput, typeof newsApi.credential>;
|
|
108
106
|
//#endregion
|
|
109
107
|
export { newsApiGetSources };
|
|
110
108
|
//# sourceMappingURL=get-sources.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-sources.d.mts","names":[],"sources":["../../src/actions/get-sources.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-sources.d.mts","names":[],"sources":["../../src/actions/get-sources.ts"],"mappings":";;;;;cAMa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cActB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAKvB,iBAAA,EAAmB,SAAA,QACvB,sBAAA,SACA,uBAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -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 = 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":"
|
|
1
|
+
{"version":3,"file":"get-sources.mjs","names":[],"sources":["../../src/actions/get-sources.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { newsApi } from \"../app\";\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: AppAction<\n typeof NewsApiGetSourcesInput,\n typeof NewsApiGetSourcesOutput,\n typeof newsApi.credential\n> = 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":";;;;AAMA,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;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kCAAkC,CAAC,CAAC,SAAS,iCAAiC;CACjG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,kCAWhB;AACV,CAAC"}
|
|
@@ -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 = 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":"
|
|
1
|
+
{"version":3,"file":"get-top-headlines.cjs","names":["z","action"],"sources":["../../src/actions/get-top-headlines.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { newsApi } from \"../app\";\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: AppAction<\n typeof NewsApiGetTopHeadlinesInput,\n typeof NewsApiGetTopHeadlinesOutput,\n typeof newsApi.credential\n> = 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":";;;;AAMA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,GAAGA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4IAA4I,CAAC,CAAC,SAAS;CAC9K,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACjG,SAASA,IAAAA,EAAE,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,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1E,QAAQ,yCAAyC,SAAS;CAC1D,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;AACjF,CAAC,CAAC,CAAC,YAAY;AACf,MAAa,+BAA+BA,IAAAA,EAAE,OAAO;CACnD,QAAQA,IAAAA,EAAE,KAAK,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;CACxF,UAAUA,IAAAA,EAAE,MAAM,yCAAyC,CAAC,CAAC,SAAS,gCAAgC;CACtG,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;AACzF,CAAC,CAAC,CAAC,YAAY;AAEf,MAAa,yBAITC,eAAAA,OAAO,8BAA8B;CACvC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { newsApi } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/get-top-headlines.d.ts
|
|
@@ -5,18 +7,11 @@ declare const NewsApiGetTopHeadlinesInput: z.ZodObject<{
|
|
|
5
7
|
q: z.ZodOptional<z.ZodString>;
|
|
6
8
|
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
7
9
|
country: z.ZodOptional<z.ZodEnum<{
|
|
8
|
-
in: "in";
|
|
9
10
|
at: "at";
|
|
10
11
|
id: "id";
|
|
11
|
-
|
|
12
|
-
de: "de";
|
|
13
|
-
fr: "fr";
|
|
14
|
-
it: "it";
|
|
15
|
-
nl: "nl";
|
|
16
|
-
no: "no";
|
|
17
|
-
pt: "pt";
|
|
18
|
-
ru: "ru";
|
|
12
|
+
in: "in";
|
|
19
13
|
ae: "ae";
|
|
14
|
+
ar: "ar";
|
|
20
15
|
au: "au";
|
|
21
16
|
be: "be";
|
|
22
17
|
bg: "bg";
|
|
@@ -27,13 +22,16 @@ declare const NewsApiGetTopHeadlinesInput: z.ZodObject<{
|
|
|
27
22
|
co: "co";
|
|
28
23
|
cu: "cu";
|
|
29
24
|
cz: "cz";
|
|
25
|
+
de: "de";
|
|
30
26
|
eg: "eg";
|
|
27
|
+
fr: "fr";
|
|
31
28
|
gb: "gb";
|
|
32
29
|
gr: "gr";
|
|
33
30
|
hk: "hk";
|
|
34
31
|
hu: "hu";
|
|
35
32
|
ie: "ie";
|
|
36
33
|
il: "il";
|
|
34
|
+
it: "it";
|
|
37
35
|
jp: "jp";
|
|
38
36
|
kr: "kr";
|
|
39
37
|
lt: "lt";
|
|
@@ -42,11 +40,15 @@ declare const NewsApiGetTopHeadlinesInput: z.ZodObject<{
|
|
|
42
40
|
mx: "mx";
|
|
43
41
|
my: "my";
|
|
44
42
|
ng: "ng";
|
|
43
|
+
nl: "nl";
|
|
44
|
+
no: "no";
|
|
45
45
|
nz: "nz";
|
|
46
46
|
ph: "ph";
|
|
47
47
|
pl: "pl";
|
|
48
|
+
pt: "pt";
|
|
48
49
|
ro: "ro";
|
|
49
50
|
rs: "rs";
|
|
51
|
+
ru: "ru";
|
|
50
52
|
sa: "sa";
|
|
51
53
|
se: "se";
|
|
52
54
|
sg: "sg";
|
|
@@ -92,14 +94,7 @@ declare const NewsApiGetTopHeadlinesOutput: z.ZodObject<{
|
|
|
92
94
|
}, z.core.$loose>>;
|
|
93
95
|
totalResults: z.ZodNullable<z.ZodNumber>;
|
|
94
96
|
}, z.core.$loose>;
|
|
95
|
-
declare const newsApiGetTopHeadlines:
|
|
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]>;
|
|
97
|
+
declare const newsApiGetTopHeadlines: AppAction<typeof NewsApiGetTopHeadlinesInput, typeof NewsApiGetTopHeadlinesOutput, typeof newsApi.credential>;
|
|
103
98
|
//#endregion
|
|
104
99
|
export { newsApiGetTopHeadlines };
|
|
105
100
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"get-top-headlines.d.cts","names":[],"sources":["../../src/actions/get-top-headlines.ts"],"mappings":";;;;;cAMa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsB3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAM5B,sBAAA,EAAwB,SAAA,QAC5B,2BAAA,SACA,4BAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { newsApi } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/get-top-headlines.d.ts
|
|
@@ -5,18 +7,11 @@ declare const NewsApiGetTopHeadlinesInput: z.ZodObject<{
|
|
|
5
7
|
q: z.ZodOptional<z.ZodString>;
|
|
6
8
|
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
7
9
|
country: z.ZodOptional<z.ZodEnum<{
|
|
8
|
-
in: "in";
|
|
9
10
|
at: "at";
|
|
10
11
|
id: "id";
|
|
11
|
-
|
|
12
|
-
de: "de";
|
|
13
|
-
fr: "fr";
|
|
14
|
-
it: "it";
|
|
15
|
-
nl: "nl";
|
|
16
|
-
no: "no";
|
|
17
|
-
pt: "pt";
|
|
18
|
-
ru: "ru";
|
|
12
|
+
in: "in";
|
|
19
13
|
ae: "ae";
|
|
14
|
+
ar: "ar";
|
|
20
15
|
au: "au";
|
|
21
16
|
be: "be";
|
|
22
17
|
bg: "bg";
|
|
@@ -27,13 +22,16 @@ declare const NewsApiGetTopHeadlinesInput: z.ZodObject<{
|
|
|
27
22
|
co: "co";
|
|
28
23
|
cu: "cu";
|
|
29
24
|
cz: "cz";
|
|
25
|
+
de: "de";
|
|
30
26
|
eg: "eg";
|
|
27
|
+
fr: "fr";
|
|
31
28
|
gb: "gb";
|
|
32
29
|
gr: "gr";
|
|
33
30
|
hk: "hk";
|
|
34
31
|
hu: "hu";
|
|
35
32
|
ie: "ie";
|
|
36
33
|
il: "il";
|
|
34
|
+
it: "it";
|
|
37
35
|
jp: "jp";
|
|
38
36
|
kr: "kr";
|
|
39
37
|
lt: "lt";
|
|
@@ -42,11 +40,15 @@ declare const NewsApiGetTopHeadlinesInput: z.ZodObject<{
|
|
|
42
40
|
mx: "mx";
|
|
43
41
|
my: "my";
|
|
44
42
|
ng: "ng";
|
|
43
|
+
nl: "nl";
|
|
44
|
+
no: "no";
|
|
45
45
|
nz: "nz";
|
|
46
46
|
ph: "ph";
|
|
47
47
|
pl: "pl";
|
|
48
|
+
pt: "pt";
|
|
48
49
|
ro: "ro";
|
|
49
50
|
rs: "rs";
|
|
51
|
+
ru: "ru";
|
|
50
52
|
sa: "sa";
|
|
51
53
|
se: "se";
|
|
52
54
|
sg: "sg";
|
|
@@ -92,14 +94,7 @@ declare const NewsApiGetTopHeadlinesOutput: z.ZodObject<{
|
|
|
92
94
|
}, z.core.$loose>>;
|
|
93
95
|
totalResults: z.ZodNullable<z.ZodNumber>;
|
|
94
96
|
}, z.core.$loose>;
|
|
95
|
-
declare const newsApiGetTopHeadlines:
|
|
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]>;
|
|
97
|
+
declare const newsApiGetTopHeadlines: AppAction<typeof NewsApiGetTopHeadlinesInput, typeof NewsApiGetTopHeadlinesOutput, typeof newsApi.credential>;
|
|
103
98
|
//#endregion
|
|
104
99
|
export { newsApiGetTopHeadlines };
|
|
105
100
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"get-top-headlines.d.mts","names":[],"sources":["../../src/actions/get-top-headlines.ts"],"mappings":";;;;;cAMa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsB3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAM5B,sBAAA,EAAwB,SAAA,QAC5B,2BAAA,SACA,4BAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -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 = 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":"
|
|
1
|
+
{"version":3,"file":"get-top-headlines.mjs","names":[],"sources":["../../src/actions/get-top-headlines.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { newsApi } from \"../app\";\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: AppAction<\n typeof NewsApiGetTopHeadlinesInput,\n typeof NewsApiGetTopHeadlinesOutput,\n typeof newsApi.credential\n> = 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":";;;;AAMA,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,SAAS,wDAAwD,CAAC,CAAC,SAAS;AACrH,CAAC,CAAC,CAAC,SAAS,2KAA2K;AACvL,MAAM,2CAA2C,EAAE,OAAO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 @@
|
|
|
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":"
|
|
1
|
+
{"version":3,"file":"get-v1-articles.cjs","names":["z","action"],"sources":["../../src/actions/get-v1-articles.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { newsApi } from \"../app\";\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: AppAction<\n typeof NewsApiGetV1ArticlesInput,\n typeof NewsApiGetV1ArticlesOutput,\n typeof newsApi.credential\n> = 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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AAC,SAAS,CAAC,CAAC,SAAS;CAC7G,UAAUA,IAAAA,EAAE,MAAM,oCAAoC,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACpI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,gDAAgD;AAE1E,MAAa,uBAITC,eAAAA,OAAO,4BAA4B;CACrC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { newsApi } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/get-v1-articles.d.ts
|
|
@@ -22,10 +24,7 @@ declare const NewsApiGetV1ArticlesOutput: z.ZodObject<{
|
|
|
22
24
|
publishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
25
|
}, z.core.$loose>>>>;
|
|
24
26
|
}, z.core.$loose>;
|
|
25
|
-
declare const newsApiGetV1Articles:
|
|
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]>;
|
|
27
|
+
declare const newsApiGetV1Articles: AppAction<typeof NewsApiGetV1ArticlesInput, typeof NewsApiGetV1ArticlesOutput, typeof newsApi.credential>;
|
|
29
28
|
//#endregion
|
|
30
29
|
export { newsApiGetV1Articles };
|
|
31
30
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"get-v1-articles.d.cts","names":[],"sources":["../../src/actions/get-v1-articles.ts"],"mappings":";;;;;cAMa,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;cAYzB,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAO1B,oBAAA,EAAsB,SAAA,QAC1B,yBAAA,SACA,0BAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { newsApi } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/get-v1-articles.d.ts
|
|
@@ -22,10 +24,7 @@ declare const NewsApiGetV1ArticlesOutput: z.ZodObject<{
|
|
|
22
24
|
publishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
25
|
}, z.core.$loose>>>>;
|
|
24
26
|
}, z.core.$loose>;
|
|
25
|
-
declare const newsApiGetV1Articles:
|
|
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]>;
|
|
27
|
+
declare const newsApiGetV1Articles: AppAction<typeof NewsApiGetV1ArticlesInput, typeof NewsApiGetV1ArticlesOutput, typeof newsApi.credential>;
|
|
29
28
|
//#endregion
|
|
30
29
|
export { newsApiGetV1Articles };
|
|
31
30
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"get-v1-articles.d.mts","names":[],"sources":["../../src/actions/get-v1-articles.ts"],"mappings":";;;;;cAMa,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;cAYzB,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAO1B,oBAAA,EAAsB,SAAA,QAC1B,yBAAA,SACA,0BAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -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 = 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":"
|
|
1
|
+
{"version":3,"file":"get-v1-articles.mjs","names":[],"sources":["../../src/actions/get-v1-articles.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { newsApi } from \"../app\";\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: AppAction<\n typeof NewsApiGetV1ArticlesInput,\n typeof NewsApiGetV1ArticlesOutput,\n typeof newsApi.credential\n> = 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.\",\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S,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,gDAWhB;AACV,CAAC"}
|
package/dist/app.cjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
let _keystrokehq_keystroke_app = require("@keystrokehq/keystroke/app");
|
|
1
2
|
//#region src/app.ts
|
|
2
|
-
const
|
|
3
|
+
const credential = { generic_api_key: require("zod").z.string() };
|
|
4
|
+
const newsApi = (0, _keystrokehq_keystroke_app.defineApp)({
|
|
3
5
|
slug: "news_api",
|
|
4
|
-
auth: "keystroke"
|
|
6
|
+
auth: "keystroke",
|
|
7
|
+
credential
|
|
5
8
|
});
|
|
6
9
|
//#endregion
|
|
7
10
|
exports.newsApi = newsApi;
|
package/dist/app.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.cjs","names":[],"sources":["../src/app.ts"],"sourcesContent":["import { defineApp } from \"@keystrokehq/keystroke/app\";\n\nexport const newsApi = defineApp({\n slug: \"news_api\",\n auth: \"keystroke\",\n});\n"],"mappings":";AAEA,MAAa,WAAA,
|
|
1
|
+
{"version":3,"file":"app.cjs","names":["z"],"sources":["../src/app.ts"],"sourcesContent":["import { defineApp, type KeystrokeApp } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nconst credential = {\n generic_api_key: z.string(),\n};\n\nexport const newsApi: KeystrokeApp<\"news_api\", typeof credential> = defineApp({\n slug: \"news_api\",\n auth: \"keystroke\",\n credential,\n});\n"],"mappings":";;AAGA,MAAM,aAAa,EACjB,8BAAiBA,CAAAA,CAAAA,EAAE,OAAO,EAC5B;AAEA,MAAa,WAAA,GAAA,2BAAA,UAAA,CAAiE;CAC5E,MAAM;CACN,MAAM;CACN;AACF,CAAC"}
|
package/dist/app.d.cts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import { KeystrokeApp } from "@keystrokehq/keystroke/app";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
1
4
|
//#region src/app.d.ts
|
|
2
|
-
declare const
|
|
5
|
+
declare const credential: {
|
|
6
|
+
generic_api_key: z.ZodString;
|
|
7
|
+
};
|
|
8
|
+
declare const newsApi: KeystrokeApp<"news_api", typeof credential>;
|
|
3
9
|
//#endregion
|
|
4
10
|
export { newsApi };
|
|
5
11
|
//# sourceMappingURL=app.d.cts.map
|
package/dist/app.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.cts","names":[],"sources":["../src/app.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"app.d.cts","names":[],"sources":["../src/app.ts"],"mappings":";;;;cAGM,UAAA;mBAEL,CAAA,CAAA,SAAA;AAAA;AAAA,cAEY,OAAA,EAAS,YAAY,oBAAoB,UAAA"}
|
package/dist/app.d.mts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import { KeystrokeApp } from "@keystrokehq/keystroke/app";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
1
4
|
//#region src/app.d.ts
|
|
2
|
-
declare const
|
|
5
|
+
declare const credential: {
|
|
6
|
+
generic_api_key: z.ZodString;
|
|
7
|
+
};
|
|
8
|
+
declare const newsApi: KeystrokeApp<"news_api", typeof credential>;
|
|
3
9
|
//#endregion
|
|
4
10
|
export { newsApi };
|
|
5
11
|
//# sourceMappingURL=app.d.mts.map
|
package/dist/app.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.mts","names":[],"sources":["../src/app.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"app.d.mts","names":[],"sources":["../src/app.ts"],"mappings":";;;;cAGM,UAAA;mBAEL,CAAA,CAAA,SAAA;AAAA;AAAA,cAEY,OAAA,EAAS,YAAY,oBAAoB,UAAA"}
|
package/dist/app.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { defineApp } from "@keystrokehq/keystroke/app";
|
|
2
|
-
|
|
2
|
+
import { z } from "zod";
|
|
3
3
|
const newsApi = defineApp({
|
|
4
4
|
slug: "news_api",
|
|
5
|
-
auth: "keystroke"
|
|
5
|
+
auth: "keystroke",
|
|
6
|
+
credential: { generic_api_key: z.string() }
|
|
6
7
|
});
|
|
7
8
|
//#endregion
|
|
8
9
|
export { newsApi };
|
package/dist/app.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.mjs","names":[],"sources":["../src/app.ts"],"sourcesContent":["import { defineApp } from \"@keystrokehq/keystroke/app\";\n\nexport const newsApi = defineApp({\n slug: \"news_api\",\n auth: \"keystroke\",\n});\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"app.mjs","names":[],"sources":["../src/app.ts"],"sourcesContent":["import { defineApp, type KeystrokeApp } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nconst credential = {\n generic_api_key: z.string(),\n};\n\nexport const newsApi: KeystrokeApp<\"news_api\", typeof credential> = defineApp({\n slug: \"news_api\",\n auth: \"keystroke\",\n credential,\n});\n"],"mappings":";;AAOA,MAAa,UAAuD,UAAU;CAC5E,MAAM;CACN,MAAM;CACN,cANA,iBAAiB,EAAE,OAAO,EAM1B;AACF,CAAC"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { newsApi } from "./app.cjs";
|
|
1
2
|
import { newsApiGetEverything } from "./actions/get-everything.cjs";
|
|
2
3
|
import { newsApiGetSources } from "./actions/get-sources.cjs";
|
|
3
4
|
import { newsApiGetTopHeadlines } from "./actions/get-top-headlines.cjs";
|
|
4
5
|
import { newsApiGetV1Articles } from "./actions/get-v1-articles.cjs";
|
|
5
|
-
import { newsApi } from "./app.cjs";
|
|
6
6
|
import { newsApiCatalog } from "./catalog.cjs";
|
|
7
7
|
export { newsApi, newsApiCatalog, newsApiGetEverything, newsApiGetSources, newsApiGetTopHeadlines, newsApiGetV1Articles };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { newsApi } from "./app.mjs";
|
|
1
2
|
import { newsApiGetEverything } from "./actions/get-everything.mjs";
|
|
2
3
|
import { newsApiGetSources } from "./actions/get-sources.mjs";
|
|
3
4
|
import { newsApiGetTopHeadlines } from "./actions/get-top-headlines.mjs";
|
|
4
5
|
import { newsApiGetV1Articles } from "./actions/get-v1-articles.mjs";
|
|
5
|
-
import { newsApi } from "./app.mjs";
|
|
6
6
|
import { newsApiCatalog } from "./catalog.mjs";
|
|
7
7
|
export { newsApi, newsApiCatalog, newsApiGetEverything, newsApiGetSources, newsApiGetTopHeadlines, newsApiGetV1Articles };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystrokehq/news_api",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@keystrokehq/keystroke": ">=0.1.
|
|
34
|
+
"@keystrokehq/keystroke": ">=0.1.104",
|
|
35
35
|
"zod": "^4.4.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|