@keystrokehq/news_api 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +17 -0
  2. package/dist/action.cjs +21 -0
  3. package/dist/action.cjs.map +1 -0
  4. package/dist/action.mjs +21 -0
  5. package/dist/action.mjs.map +1 -0
  6. package/dist/actions/get-everything.cjs +65 -0
  7. package/dist/actions/get-everything.cjs.map +1 -0
  8. package/dist/actions/get-everything.d.cts +9 -0
  9. package/dist/actions/get-everything.d.cts.map +1 -0
  10. package/dist/actions/get-everything.d.mts +9 -0
  11. package/dist/actions/get-everything.d.mts.map +1 -0
  12. package/dist/actions/get-everything.mjs +64 -0
  13. package/dist/actions/get-everything.mjs.map +1 -0
  14. package/dist/actions/get-sources.cjs +111 -0
  15. package/dist/actions/get-sources.cjs.map +1 -0
  16. package/dist/actions/get-sources.d.cts +9 -0
  17. package/dist/actions/get-sources.d.cts.map +1 -0
  18. package/dist/actions/get-sources.d.mts +9 -0
  19. package/dist/actions/get-sources.d.mts.map +1 -0
  20. package/dist/actions/get-sources.mjs +110 -0
  21. package/dist/actions/get-sources.mjs.map +1 -0
  22. package/dist/actions/get-top-headlines.cjs +104 -0
  23. package/dist/actions/get-top-headlines.cjs.map +1 -0
  24. package/dist/actions/get-top-headlines.d.cts +9 -0
  25. package/dist/actions/get-top-headlines.d.cts.map +1 -0
  26. package/dist/actions/get-top-headlines.d.mts +9 -0
  27. package/dist/actions/get-top-headlines.d.mts.map +1 -0
  28. package/dist/actions/get-top-headlines.mjs +103 -0
  29. package/dist/actions/get-top-headlines.mjs.map +1 -0
  30. package/dist/actions/get-v1-articles.cjs +36 -0
  31. package/dist/actions/get-v1-articles.cjs.map +1 -0
  32. package/dist/actions/get-v1-articles.d.cts +9 -0
  33. package/dist/actions/get-v1-articles.d.cts.map +1 -0
  34. package/dist/actions/get-v1-articles.d.mts +9 -0
  35. package/dist/actions/get-v1-articles.d.mts.map +1 -0
  36. package/dist/actions/get-v1-articles.mjs +35 -0
  37. package/dist/actions/get-v1-articles.mjs.map +1 -0
  38. package/dist/actions/index.cjs +9 -0
  39. package/dist/actions/index.d.cts +5 -0
  40. package/dist/actions/index.d.mts +5 -0
  41. package/dist/actions/index.mjs +5 -0
  42. package/dist/app.cjs +9 -0
  43. package/dist/app.cjs.map +1 -0
  44. package/dist/app.d.cts +5 -0
  45. package/dist/app.d.cts.map +1 -0
  46. package/dist/app.d.mts +5 -0
  47. package/dist/app.d.mts.map +1 -0
  48. package/dist/app.mjs +10 -0
  49. package/dist/app.mjs.map +1 -0
  50. package/dist/catalog.cjs +15 -0
  51. package/dist/catalog.cjs.map +1 -0
  52. package/dist/catalog.d.cts +14 -0
  53. package/dist/catalog.d.cts.map +1 -0
  54. package/dist/catalog.d.mts +14 -0
  55. package/dist/catalog.d.mts.map +1 -0
  56. package/dist/catalog.mjs +15 -0
  57. package/dist/catalog.mjs.map +1 -0
  58. package/dist/execute.cjs +18 -0
  59. package/dist/execute.cjs.map +1 -0
  60. package/dist/execute.mjs +18 -0
  61. package/dist/execute.mjs.map +1 -0
  62. package/dist/index.cjs +14 -0
  63. package/dist/index.d.cts +7 -0
  64. package/dist/index.d.mts +7 -0
  65. package/dist/index.mjs +8 -0
  66. package/package.json +49 -0
@@ -0,0 +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.ZodTypeAny = 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.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique source identifier, if available.\").nullable().optional(),\n name: z.string().describe(\"Name of the news source.\"),\n});\nconst NewsApiGetTopHeadlines_ArticleModelSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL to the full article.\"),\n title: z.string().describe(\"Article title.\"),\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).\"),\n});\nexport const NewsApiGetTopHeadlinesOutput: z.ZodTypeAny = z.object({\n status: z.enum([\"ok\", \"error\"]).describe(\"API status. 'ok' means successful.\"),\n articles: z.array(NewsApiGetTopHeadlines_ArticleModelSchema).describe(\"List of top headline articles.\"),\n totalResults: z.number().int().describe(\"Total number of results available.\"),\n});\n\nexport const newsApiGetTopHeadlines = action(\"NEWS_API_GET_TOP_HEADLINES\", {\n slug: \"news_api-get-top-headlines\",\n name: \"Get Top Headlines\",\n description: \"Tool to retrieve live top and breaking headlines; does not support historical or date-bounded queries (use NEWS_API_GET_EVERYTHING for past date ranges). Results favor major outlets; use NEWS_API_GET_EVERYTHING or COMPOSIO_SEARCH_WEB for niche publications. Use when you need current headlines filtered by country, category, source(s), or keywords.\",\n input: NewsApiGetTopHeadlinesInput,\n output: NewsApiGetTopHeadlinesOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA4CA,IAAAA,EAAE,OAAO;CAChE,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,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,SAASA,IAAAA,E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;CACjE,QAAQA,IAAAA,EAAE,KAAK,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,SAAS,oCAAoC;CAC7E,UAAUA,IAAAA,EAAE,MAAM,yCAAyC,CAAC,CAAC,SAAS,gCAAgC;CACtG,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC;AAC9E,CAAC;AAED,MAAa,yBAAyBC,eAAAA,OAAO,8BAA8B;CACzE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/get-top-headlines.d.ts
4
+ declare const NewsApiGetTopHeadlinesInput: z.ZodTypeAny;
5
+ declare const NewsApiGetTopHeadlinesOutput: z.ZodTypeAny;
6
+ declare const newsApiGetTopHeadlines: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { newsApiGetTopHeadlines };
9
+ //# sourceMappingURL=get-top-headlines.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-top-headlines.d.cts","names":[],"sources":["../../src/actions/get-top-headlines.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAO4I;AAAA,cAe3K,4BAAA,EAA8B,CAAA,CAAE,UAI3C;AAAA,cAEW,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/get-top-headlines.d.ts
4
+ declare const NewsApiGetTopHeadlinesInput: z.ZodTypeAny;
5
+ declare const NewsApiGetTopHeadlinesOutput: z.ZodTypeAny;
6
+ declare const newsApiGetTopHeadlines: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { newsApiGetTopHeadlines };
9
+ //# sourceMappingURL=get-top-headlines.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-top-headlines.d.mts","names":[],"sources":["../../src/actions/get-top-headlines.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAO4I;AAAA,cAe3K,4BAAA,EAA8B,CAAA,CAAE,UAI3C;AAAA,cAEW,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,103 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/get-top-headlines.ts
4
+ const NewsApiGetTopHeadlinesInput = z.object({
5
+ 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(),
6
+ page: z.number().int().default(1).describe("Page number for pagination. Default is 1.").optional(),
7
+ country: z.enum([
8
+ "ae",
9
+ "ar",
10
+ "at",
11
+ "au",
12
+ "be",
13
+ "bg",
14
+ "br",
15
+ "ca",
16
+ "ch",
17
+ "cn",
18
+ "co",
19
+ "cu",
20
+ "cz",
21
+ "de",
22
+ "eg",
23
+ "fr",
24
+ "gb",
25
+ "gr",
26
+ "hk",
27
+ "hu",
28
+ "id",
29
+ "ie",
30
+ "il",
31
+ "in",
32
+ "it",
33
+ "jp",
34
+ "kr",
35
+ "lt",
36
+ "lv",
37
+ "ma",
38
+ "mx",
39
+ "my",
40
+ "ng",
41
+ "nl",
42
+ "no",
43
+ "nz",
44
+ "ph",
45
+ "pl",
46
+ "pt",
47
+ "ro",
48
+ "rs",
49
+ "ru",
50
+ "sa",
51
+ "se",
52
+ "sg",
53
+ "si",
54
+ "sk",
55
+ "th",
56
+ "tr",
57
+ "tw",
58
+ "ua",
59
+ "us",
60
+ "ve",
61
+ "za"
62
+ ]).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(),
63
+ 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(),
64
+ category: z.enum([
65
+ "business",
66
+ "entertainment",
67
+ "general",
68
+ "health",
69
+ "science",
70
+ "sports",
71
+ "technology"
72
+ ]).describe("News category to filter by. At least one of 'country', 'category', 'sources', or 'q' must be provided. Cannot be used with 'sources'.").optional(),
73
+ pageSize: z.number().int().default(20).describe("Number of results per page. Default is 20, max is 100.").optional()
74
+ }).describe("Parameters for fetching top headlines. Cannot combine 'sources' with 'country' or 'category'.\nAt least one of 'sources', 'q', 'country', or 'category' must be provided.");
75
+ const NewsApiGetTopHeadlines_SourceModelSchema = z.object({
76
+ id: z.string().describe("Unique source identifier, if available.").nullable().optional(),
77
+ name: z.string().describe("Name of the news source.")
78
+ });
79
+ const NewsApiGetTopHeadlines_ArticleModelSchema = z.object({
80
+ url: z.string().describe("URL to the full article."),
81
+ title: z.string().describe("Article title."),
82
+ author: z.string().describe("Author of the article.").nullable().optional(),
83
+ source: NewsApiGetTopHeadlines_SourceModelSchema.nullable(),
84
+ content: z.string().describe("Unformatted content of the article.").nullable().optional(),
85
+ urlToImage: z.string().describe("URL to the article's image.").nullable().optional(),
86
+ description: z.string().describe("Short description or snippet.").nullable().optional(),
87
+ publishedAt: z.string().describe("Publication date/time (ISO 8601).")
88
+ });
89
+ const newsApiGetTopHeadlines = action("NEWS_API_GET_TOP_HEADLINES", {
90
+ slug: "news_api-get-top-headlines",
91
+ name: "Get Top Headlines",
92
+ description: "Tool to retrieve live top and breaking headlines; does not support historical or date-bounded queries (use NEWS_API_GET_EVERYTHING for past date ranges). Results favor major outlets; use NEWS_API_GET_EVERYTHING or COMPOSIO_SEARCH_WEB for niche publications. Use when you need current headlines filtered by country, category, source(s), or keywords.",
93
+ input: NewsApiGetTopHeadlinesInput,
94
+ output: z.object({
95
+ status: z.enum(["ok", "error"]).describe("API status. 'ok' means successful."),
96
+ articles: z.array(NewsApiGetTopHeadlines_ArticleModelSchema).describe("List of top headline articles."),
97
+ totalResults: z.number().int().describe("Total number of results available.")
98
+ })
99
+ });
100
+ //#endregion
101
+ export { newsApiGetTopHeadlines };
102
+
103
+ //# sourceMappingURL=get-top-headlines.mjs.map
@@ -0,0 +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.ZodTypeAny = 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.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique source identifier, if available.\").nullable().optional(),\n name: z.string().describe(\"Name of the news source.\"),\n});\nconst NewsApiGetTopHeadlines_ArticleModelSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL to the full article.\"),\n title: z.string().describe(\"Article title.\"),\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).\"),\n});\nexport const NewsApiGetTopHeadlinesOutput: z.ZodTypeAny = z.object({\n status: z.enum([\"ok\", \"error\"]).describe(\"API status. 'ok' means successful.\"),\n articles: z.array(NewsApiGetTopHeadlines_ArticleModelSchema).describe(\"List of top headline articles.\"),\n totalResults: z.number().int().describe(\"Total number of results available.\"),\n});\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: NewsApiGetTopHead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ACvE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B;CACnD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,gBAAgB;CAC3C,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1E,QAAQ,yCAAyC,SAAS;CAC1D,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnF,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtF,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;AACtE,CAAC;AAOD,MAAa,yBAAyB,OAAO,8BAA8B;CACzE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAXwD,EAAE,OAAO;EACjE,QAAQ,EAAE,KAAK,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,SAAS,oCAAoC;EAC7E,UAAU,EAAE,MAAM,yCAAyC,CAAC,CAAC,SAAS,gCAAgC;EACtG,cAAc,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC;CAC9E,CAOU;AACV,CAAC"}
@@ -0,0 +1,36 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/get-v1-articles.ts
4
+ const NewsApiGetV1ArticlesInput = zod.z.object({
5
+ sortBy: zod.z.enum([
6
+ "top",
7
+ "latest",
8
+ "popular"
9
+ ]).describe("Sort order for articles.").optional(),
10
+ source: zod.z.string().describe("The identifier for the news source or blog you want headlines from. Use the /sources endpoint to locate this.")
11
+ }).describe("Request parameters for GET /v1/articles endpoint.");
12
+ const NewsApiGetV1Articles_V1ArticleSchema = zod.z.object({
13
+ url: zod.z.string().describe("URL to the full article.").nullable().optional(),
14
+ title: zod.z.string().describe("Title of the article.").nullable().optional(),
15
+ author: zod.z.string().describe("Author of the article.").nullable().optional(),
16
+ urlToImage: zod.z.string().describe("URL to the article's image.").nullable().optional(),
17
+ description: zod.z.string().describe("Description or snippet of the article.").nullable().optional(),
18
+ publishedAt: zod.z.string().describe("Publication date/time in ISO 8601 format.").nullable().optional()
19
+ }).describe("Article metadata from v1 endpoint.");
20
+ const NewsApiGetV1ArticlesOutput = zod.z.object({
21
+ sortBy: zod.z.string().describe("Which type of article list is being returned. Options: top, latest, popular.").nullable().optional(),
22
+ source: zod.z.string().describe("The identifier of the source requested.").nullable().optional(),
23
+ status: zod.z.string().describe("If the request was successful or not. Options: ok, error.").nullable().optional(),
24
+ articles: zod.z.array(NewsApiGetV1Articles_V1ArticleSchema).describe("List of article metadata from the source.").nullable().optional()
25
+ }).describe("Response schema for GET /v1/articles endpoint.");
26
+ const newsApiGetV1Articles = require_action.action("NEWS_API_GET_V1_ARTICLES", {
27
+ slug: "news_api-get-v1-articles",
28
+ name: "Get V1 Articles",
29
+ 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.",
30
+ input: NewsApiGetV1ArticlesInput,
31
+ output: NewsApiGetV1ArticlesOutput
32
+ });
33
+ //#endregion
34
+ exports.newsApiGetV1Articles = newsApiGetV1Articles;
35
+
36
+ //# sourceMappingURL=get-v1-articles.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-v1-articles.cjs","names":["z","action"],"sources":["../../src/actions/get-v1-articles.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NewsApiGetV1ArticlesInput: z.ZodTypeAny = 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.ZodTypeAny = 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}).describe(\"Article metadata from v1 endpoint.\");\nexport const NewsApiGetV1ArticlesOutput: z.ZodTypeAny = 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}).describe(\"Response schema for GET /v1/articles endpoint.\");\n\nexport const newsApiGetV1Articles = action(\"NEWS_API_GET_V1_ARTICLES\", {\n slug: \"news_api-get-v1-articles\",\n name: \"Get V1 Articles\",\n description: \"Tool to fetch live article metadata from a news source using the legacy v1 API. Use when you need headlines from a specific source identifier. This v1 endpoint has been superseded by /v2/top-headlines.\",\n input: NewsApiGetV1ArticlesInput,\n output: NewsApiGetV1ArticlesOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0CA,IAAAA,EAAE,OAAO;CAC9D,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAO;EAAU;CAAS,CAAC,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CAC3F,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+GAA+G;AAC7I,CAAC,CAAC,CAAC,SAAS,mDAAmD;AAC/D,MAAM,uCAAqDA,IAAAA,EAAE,OAAO;CAClE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC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const NewsApiGetV1ArticlesInput: z.ZodTypeAny;
5
+ declare const NewsApiGetV1ArticlesOutput: z.ZodTypeAny;
6
+ declare const newsApiGetV1Articles: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { newsApiGetV1Articles };
9
+ //# sourceMappingURL=get-v1-articles.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-v1-articles.d.cts","names":[],"sources":["../../src/actions/get-v1-articles.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAGsB;AAAA,cASnD,0BAAA,EAA4B,CAAA,CAAE,UAKkB;AAAA,cAEhD,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/get-v1-articles.d.ts
4
+ declare const NewsApiGetV1ArticlesInput: z.ZodTypeAny;
5
+ declare const NewsApiGetV1ArticlesOutput: z.ZodTypeAny;
6
+ declare const newsApiGetV1Articles: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { newsApiGetV1Articles };
9
+ //# sourceMappingURL=get-v1-articles.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-v1-articles.d.mts","names":[],"sources":["../../src/actions/get-v1-articles.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAGsB;AAAA,cASnD,0BAAA,EAA4B,CAAA,CAAE,UAKkB;AAAA,cAEhD,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,35 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/get-v1-articles.ts
4
+ const NewsApiGetV1ArticlesInput = z.object({
5
+ sortBy: z.enum([
6
+ "top",
7
+ "latest",
8
+ "popular"
9
+ ]).describe("Sort order for articles.").optional(),
10
+ source: z.string().describe("The identifier for the news source or blog you want headlines from. Use the /sources endpoint to locate this.")
11
+ }).describe("Request parameters for GET /v1/articles endpoint.");
12
+ const NewsApiGetV1Articles_V1ArticleSchema = z.object({
13
+ url: z.string().describe("URL to the full article.").nullable().optional(),
14
+ title: z.string().describe("Title of the article.").nullable().optional(),
15
+ author: z.string().describe("Author of the article.").nullable().optional(),
16
+ urlToImage: z.string().describe("URL to the article's image.").nullable().optional(),
17
+ description: z.string().describe("Description or snippet of the article.").nullable().optional(),
18
+ publishedAt: z.string().describe("Publication date/time in ISO 8601 format.").nullable().optional()
19
+ }).describe("Article metadata from v1 endpoint.");
20
+ const newsApiGetV1Articles = action("NEWS_API_GET_V1_ARTICLES", {
21
+ slug: "news_api-get-v1-articles",
22
+ name: "Get V1 Articles",
23
+ 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.",
24
+ input: NewsApiGetV1ArticlesInput,
25
+ output: z.object({
26
+ sortBy: z.string().describe("Which type of article list is being returned. Options: top, latest, popular.").nullable().optional(),
27
+ source: z.string().describe("The identifier of the source requested.").nullable().optional(),
28
+ status: z.string().describe("If the request was successful or not. Options: ok, error.").nullable().optional(),
29
+ articles: z.array(NewsApiGetV1Articles_V1ArticleSchema).describe("List of article metadata from the source.").nullable().optional()
30
+ }).describe("Response schema for GET /v1/articles endpoint.")
31
+ });
32
+ //#endregion
33
+ export { newsApiGetV1Articles };
34
+
35
+ //# sourceMappingURL=get-v1-articles.mjs.map
@@ -0,0 +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.ZodTypeAny = 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.ZodTypeAny = 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}).describe(\"Article metadata from v1 endpoint.\");\nexport const NewsApiGetV1ArticlesOutput: z.ZodTypeAny = 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}).describe(\"Response schema for GET /v1/articles endpoint.\");\n\nexport const newsApiGetV1Articles = action(\"NEWS_API_GET_V1_ARTICLES\", {\n slug: \"news_api-get-v1-articles\",\n name: \"Get V1 Articles\",\n description: \"Tool to fetch live article metadata from a news source using the legacy v1 API. Use when you need headlines from a specific source identifier. This v1 endpoint has been superseded by /v2/top-headlines.\",\n input: NewsApiGetV1ArticlesInput,\n output: NewsApiGetV1ArticlesOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0C,EAAE,OAAO;CAC9D,QAAQ,EAAE,KAAK;EAAC;EAAO;EAAU;CAAS,CAAC,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CAC3F,QAAQ,EAAE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StringTag, { value: "Module" });
2
+ const require_get_everything = require("./get-everything.cjs");
3
+ const require_get_sources = require("./get-sources.cjs");
4
+ const require_get_top_headlines = require("./get-top-headlines.cjs");
5
+ const require_get_v1_articles = require("./get-v1-articles.cjs");
6
+ exports.newsApiGetEverything = require_get_everything.newsApiGetEverything;
7
+ exports.newsApiGetSources = require_get_sources.newsApiGetSources;
8
+ exports.newsApiGetTopHeadlines = require_get_top_headlines.newsApiGetTopHeadlines;
9
+ exports.newsApiGetV1Articles = require_get_v1_articles.newsApiGetV1Articles;
@@ -0,0 +1,5 @@
1
+ import { newsApiGetEverything } from "./get-everything.cjs";
2
+ import { newsApiGetSources } from "./get-sources.cjs";
3
+ import { newsApiGetTopHeadlines } from "./get-top-headlines.cjs";
4
+ import { newsApiGetV1Articles } from "./get-v1-articles.cjs";
5
+ export { newsApiGetEverything, newsApiGetSources, newsApiGetTopHeadlines, newsApiGetV1Articles };
@@ -0,0 +1,5 @@
1
+ import { newsApiGetEverything } from "./get-everything.mjs";
2
+ import { newsApiGetSources } from "./get-sources.mjs";
3
+ import { newsApiGetTopHeadlines } from "./get-top-headlines.mjs";
4
+ import { newsApiGetV1Articles } from "./get-v1-articles.mjs";
5
+ export { newsApiGetEverything, newsApiGetSources, newsApiGetTopHeadlines, newsApiGetV1Articles };
@@ -0,0 +1,5 @@
1
+ import { newsApiGetEverything } from "./get-everything.mjs";
2
+ import { newsApiGetSources } from "./get-sources.mjs";
3
+ import { newsApiGetTopHeadlines } from "./get-top-headlines.mjs";
4
+ import { newsApiGetV1Articles } from "./get-v1-articles.mjs";
5
+ export { newsApiGetEverything, newsApiGetSources, newsApiGetTopHeadlines, newsApiGetV1Articles };
package/dist/app.cjs ADDED
@@ -0,0 +1,9 @@
1
+ //#region src/app.ts
2
+ const newsApi = (0, require("@keystrokehq/keystroke/app").defineApp)({
3
+ slug: "news_api",
4
+ auth: "keystroke"
5
+ });
6
+ //#endregion
7
+ exports.newsApi = newsApi;
8
+
9
+ //# sourceMappingURL=app.cjs.map
@@ -0,0 +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,uCAAA,CAAA,CAAA,UAAA,CAAoB;CAC/B,MAAM;CACN,MAAM;AACR,CAAC"}
package/dist/app.d.cts ADDED
@@ -0,0 +1,5 @@
1
+ //#region src/app.d.ts
2
+ declare const newsApi: import("@keystrokehq/app").App<import("@keystrokehq/shared").Credential>;
3
+ //#endregion
4
+ export { newsApi };
5
+ //# sourceMappingURL=app.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.cts","names":[],"sources":["../src/app.ts"],"mappings":";cAEa,OAAA,6BAAO,GAAA,+BAAA,UAAA"}
package/dist/app.d.mts ADDED
@@ -0,0 +1,5 @@
1
+ //#region src/app.d.ts
2
+ declare const newsApi: import("@keystrokehq/app").App<import("@keystrokehq/shared").Credential>;
3
+ //#endregion
4
+ export { newsApi };
5
+ //# sourceMappingURL=app.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.mts","names":[],"sources":["../src/app.ts"],"mappings":";cAEa,OAAA,6BAAO,GAAA,+BAAA,UAAA"}
package/dist/app.mjs ADDED
@@ -0,0 +1,10 @@
1
+ import { defineApp } from "@keystrokehq/keystroke/app";
2
+ //#region src/app.ts
3
+ const newsApi = defineApp({
4
+ slug: "news_api",
5
+ auth: "keystroke"
6
+ });
7
+ //#endregion
8
+ export { newsApi };
9
+
10
+ //# sourceMappingURL=app.mjs.map
@@ -0,0 +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":";;AAEA,MAAa,UAAU,UAAU;CAC/B,MAAM;CACN,MAAM;AACR,CAAC"}
@@ -0,0 +1,15 @@
1
+ //#region src/catalog.ts
2
+ /** Generated — kept in sync with src/app.ts. */
3
+ const newsApiCatalog = {
4
+ "slug": "news_api",
5
+ "name": "NewsAPI",
6
+ "description": "News API is a simple HTTP REST API for searching and retrieving live articles from all over the web.",
7
+ "category": "News & Lifestyle",
8
+ "logo": "https://logos.composio.dev/api/news_api",
9
+ "authKind": "keystroke",
10
+ "oauthScopes": []
11
+ };
12
+ //#endregion
13
+ exports.newsApiCatalog = newsApiCatalog;
14
+
15
+ //# sourceMappingURL=catalog.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.cjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const newsApiCatalog = {\n \"slug\": \"news_api\",\n \"name\": \"NewsAPI\",\n \"description\": \"News API is a simple HTTP REST API for searching and retrieving live articles from all over the web.\",\n \"category\": \"News & Lifestyle\",\n \"logo\": \"https://logos.composio.dev/api/news_api\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": []\n} as const;\n"],"mappings":";;AACA,MAAa,iBAAiB;CAC5B,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;AAClB"}
@@ -0,0 +1,14 @@
1
+ //#region src/catalog.d.ts
2
+ /** Generated — kept in sync with src/app.ts. */
3
+ declare const newsApiCatalog: {
4
+ readonly slug: "news_api";
5
+ readonly name: "NewsAPI";
6
+ readonly description: "News API is a simple HTTP REST API for searching and retrieving live articles from all over the web.";
7
+ readonly category: "News & Lifestyle";
8
+ readonly logo: "https://logos.composio.dev/api/news_api";
9
+ readonly authKind: "keystroke";
10
+ readonly oauthScopes: readonly [];
11
+ };
12
+ //#endregion
13
+ export { newsApiCatalog };
14
+ //# sourceMappingURL=catalog.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.cts","names":[],"sources":["../src/catalog.ts"],"mappings":";;cACa,cAAA;EAAA"}
@@ -0,0 +1,14 @@
1
+ //#region src/catalog.d.ts
2
+ /** Generated — kept in sync with src/app.ts. */
3
+ declare const newsApiCatalog: {
4
+ readonly slug: "news_api";
5
+ readonly name: "NewsAPI";
6
+ readonly description: "News API is a simple HTTP REST API for searching and retrieving live articles from all over the web.";
7
+ readonly category: "News & Lifestyle";
8
+ readonly logo: "https://logos.composio.dev/api/news_api";
9
+ readonly authKind: "keystroke";
10
+ readonly oauthScopes: readonly [];
11
+ };
12
+ //#endregion
13
+ export { newsApiCatalog };
14
+ //# sourceMappingURL=catalog.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.mts","names":[],"sources":["../src/catalog.ts"],"mappings":";;cACa,cAAA;EAAA"}
@@ -0,0 +1,15 @@
1
+ //#region src/catalog.ts
2
+ /** Generated — kept in sync with src/app.ts. */
3
+ const newsApiCatalog = {
4
+ "slug": "news_api",
5
+ "name": "NewsAPI",
6
+ "description": "News API is a simple HTTP REST API for searching and retrieving live articles from all over the web.",
7
+ "category": "News & Lifestyle",
8
+ "logo": "https://logos.composio.dev/api/news_api",
9
+ "authKind": "keystroke",
10
+ "oauthScopes": []
11
+ };
12
+ //#endregion
13
+ export { newsApiCatalog };
14
+
15
+ //# sourceMappingURL=catalog.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.mjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const newsApiCatalog = {\n \"slug\": \"news_api\",\n \"name\": \"NewsAPI\",\n \"description\": \"News API is a simple HTTP REST API for searching and retrieving live articles from all over the web.\",\n \"category\": \"News & Lifestyle\",\n \"logo\": \"https://logos.composio.dev/api/news_api\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": []\n} as const;\n"],"mappings":";;AACA,MAAa,iBAAiB;CAC5B,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;AAClB"}
@@ -0,0 +1,18 @@
1
+ let _keystrokehq_keystroke_client = require("@keystrokehq/keystroke/client");
2
+ //#region src/execute.ts
3
+ const APP_SLUG = "news_api";
4
+ /** Pinned app version — updated on regeneration. */
5
+ const APP_VERSION = "20260615_00";
6
+ async function executeNewsApiTool(tool, args) {
7
+ const { result } = await (0, _keystrokehq_keystroke_client.createKeystrokeClient)().tools.execute({
8
+ app: APP_SLUG,
9
+ tool,
10
+ arguments: args,
11
+ version: APP_VERSION
12
+ });
13
+ return result;
14
+ }
15
+ //#endregion
16
+ exports.executeNewsApiTool = executeNewsApiTool;
17
+
18
+ //# sourceMappingURL=execute.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute.cjs","names":[],"sources":["../src/execute.ts"],"sourcesContent":["import { createKeystrokeClient } from \"@keystrokehq/keystroke/client\";\n\nconst APP_SLUG = \"news_api\";\n/** Pinned app version — updated on regeneration. */\nconst APP_VERSION = \"20260615_00\";\n\nexport async function executeNewsApiTool(\n tool: string,\n args: Record<string, unknown>,\n): Promise<unknown> {\n const { result } = await createKeystrokeClient().tools.execute({\n app: APP_SLUG,\n tool,\n arguments: args,\n version: APP_VERSION,\n });\n return result;\n}\n"],"mappings":";;AAEA,MAAM,WAAW;;AAEjB,MAAM,cAAc;AAEpB,eAAsB,mBACpB,MACA,MACkB;CAClB,MAAM,EAAE,WAAW,OAAA,GAAA,8BAAA,sBAAA,CAA4B,CAAC,CAAC,MAAM,QAAQ;EAC7D,KAAK;EACL;EACA,WAAW;EACX,SAAS;CACX,CAAC;CACD,OAAO;AACT"}
@@ -0,0 +1,18 @@
1
+ import { createKeystrokeClient } from "@keystrokehq/keystroke/client";
2
+ //#region src/execute.ts
3
+ const APP_SLUG = "news_api";
4
+ /** Pinned app version — updated on regeneration. */
5
+ const APP_VERSION = "20260615_00";
6
+ async function executeNewsApiTool(tool, args) {
7
+ const { result } = await createKeystrokeClient().tools.execute({
8
+ app: APP_SLUG,
9
+ tool,
10
+ arguments: args,
11
+ version: APP_VERSION
12
+ });
13
+ return result;
14
+ }
15
+ //#endregion
16
+ export { executeNewsApiTool };
17
+
18
+ //# sourceMappingURL=execute.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute.mjs","names":[],"sources":["../src/execute.ts"],"sourcesContent":["import { createKeystrokeClient } from \"@keystrokehq/keystroke/client\";\n\nconst APP_SLUG = \"news_api\";\n/** Pinned app version — updated on regeneration. */\nconst APP_VERSION = \"20260615_00\";\n\nexport async function executeNewsApiTool(\n tool: string,\n args: Record<string, unknown>,\n): Promise<unknown> {\n const { result } = await createKeystrokeClient().tools.execute({\n app: APP_SLUG,\n tool,\n arguments: args,\n version: APP_VERSION,\n });\n return result;\n}\n"],"mappings":";;AAEA,MAAM,WAAW;;AAEjB,MAAM,cAAc;AAEpB,eAAsB,mBACpB,MACA,MACkB;CAClB,MAAM,EAAE,WAAW,MAAM,sBAAsB,CAAC,CAAC,MAAM,QAAQ;EAC7D,KAAK;EACL;EACA,WAAW;EACX,SAAS;CACX,CAAC;CACD,OAAO;AACT"}
package/dist/index.cjs ADDED
@@ -0,0 +1,14 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_app = require("./app.cjs");
3
+ const require_catalog = require("./catalog.cjs");
4
+ const require_get_everything = require("./actions/get-everything.cjs");
5
+ const require_get_sources = require("./actions/get-sources.cjs");
6
+ const require_get_top_headlines = require("./actions/get-top-headlines.cjs");
7
+ const require_get_v1_articles = require("./actions/get-v1-articles.cjs");
8
+ require("./actions/index.cjs");
9
+ exports.newsApi = require_app.newsApi;
10
+ exports.newsApiCatalog = require_catalog.newsApiCatalog;
11
+ exports.newsApiGetEverything = require_get_everything.newsApiGetEverything;
12
+ exports.newsApiGetSources = require_get_sources.newsApiGetSources;
13
+ exports.newsApiGetTopHeadlines = require_get_top_headlines.newsApiGetTopHeadlines;
14
+ exports.newsApiGetV1Articles = require_get_v1_articles.newsApiGetV1Articles;
@@ -0,0 +1,7 @@
1
+ import { newsApiGetEverything } from "./actions/get-everything.cjs";
2
+ import { newsApiGetSources } from "./actions/get-sources.cjs";
3
+ import { newsApiGetTopHeadlines } from "./actions/get-top-headlines.cjs";
4
+ import { newsApiGetV1Articles } from "./actions/get-v1-articles.cjs";
5
+ import { newsApi } from "./app.cjs";
6
+ import { newsApiCatalog } from "./catalog.cjs";
7
+ export { newsApi, newsApiCatalog, newsApiGetEverything, newsApiGetSources, newsApiGetTopHeadlines, newsApiGetV1Articles };
@@ -0,0 +1,7 @@
1
+ import { newsApiGetEverything } from "./actions/get-everything.mjs";
2
+ import { newsApiGetSources } from "./actions/get-sources.mjs";
3
+ import { newsApiGetTopHeadlines } from "./actions/get-top-headlines.mjs";
4
+ import { newsApiGetV1Articles } from "./actions/get-v1-articles.mjs";
5
+ import { newsApi } from "./app.mjs";
6
+ import { newsApiCatalog } from "./catalog.mjs";
7
+ export { newsApi, newsApiCatalog, newsApiGetEverything, newsApiGetSources, newsApiGetTopHeadlines, newsApiGetV1Articles };
package/dist/index.mjs ADDED
@@ -0,0 +1,8 @@
1
+ import { newsApi } from "./app.mjs";
2
+ import { newsApiCatalog } from "./catalog.mjs";
3
+ import { newsApiGetEverything } from "./actions/get-everything.mjs";
4
+ import { newsApiGetSources } from "./actions/get-sources.mjs";
5
+ import { newsApiGetTopHeadlines } from "./actions/get-top-headlines.mjs";
6
+ import { newsApiGetV1Articles } from "./actions/get-v1-articles.mjs";
7
+ import "./actions/index.mjs";
8
+ export { newsApi, newsApiCatalog, newsApiGetEverything, newsApiGetSources, newsApiGetTopHeadlines, newsApiGetV1Articles };
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@keystrokehq/news_api",
3
+ "version": "0.1.0",
4
+ "publishConfig": {
5
+ "access": "public",
6
+ "registry": "https://registry.npmjs.org"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/keystrokehq/keystroke.git",
11
+ "directory": "packages/integrations/news_api"
12
+ },
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "sideEffects": false,
17
+ "type": "module",
18
+ "main": "./dist/index.cjs",
19
+ "module": "./dist/index.mjs",
20
+ "types": "./dist/index.d.mts",
21
+ "exports": {
22
+ ".": {
23
+ "types": "./dist/index.d.mts",
24
+ "import": "./dist/index.mjs",
25
+ "require": "./dist/index.cjs"
26
+ },
27
+ "./actions": {
28
+ "types": "./dist/actions/index.d.mts",
29
+ "import": "./dist/actions/index.mjs",
30
+ "require": "./dist/actions/index.cjs"
31
+ }
32
+ },
33
+ "peerDependencies": {
34
+ "@keystrokehq/keystroke": "^0.1.4",
35
+ "zod": "^4.4.3"
36
+ },
37
+ "devDependencies": {
38
+ "@keystrokehq/keystroke": "link:../../keystroke",
39
+ "@types/node": "^25.9.1",
40
+ "tsdown": "^0.22.0",
41
+ "typescript": "^6.0.3",
42
+ "zod": "^4.4.3"
43
+ },
44
+ "scripts": {
45
+ "build": "tsdown",
46
+ "dev": "tsdown --watch --no-clean",
47
+ "typecheck": "tsc --noEmit"
48
+ }
49
+ }