@keystrokehq/perplexityai 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/action.cjs.map +1 -1
  2. package/dist/action.mjs.map +1 -1
  3. package/dist/actions/create-async-chat-completion.cjs +5 -5
  4. package/dist/actions/create-async-chat-completion.cjs.map +1 -1
  5. package/dist/actions/create-async-chat-completion.d.cts +91 -3
  6. package/dist/actions/create-async-chat-completion.d.cts.map +1 -1
  7. package/dist/actions/create-async-chat-completion.d.mts +91 -3
  8. package/dist/actions/create-async-chat-completion.d.mts.map +1 -1
  9. package/dist/actions/create-async-chat-completion.mjs +5 -5
  10. package/dist/actions/create-async-chat-completion.mjs.map +1 -1
  11. package/dist/actions/create-chat-completion.cjs +20 -20
  12. package/dist/actions/create-chat-completion.cjs.map +1 -1
  13. package/dist/actions/create-chat-completion.d.cts +148 -3
  14. package/dist/actions/create-chat-completion.d.cts.map +1 -1
  15. package/dist/actions/create-chat-completion.d.mts +148 -3
  16. package/dist/actions/create-chat-completion.d.mts.map +1 -1
  17. package/dist/actions/create-chat-completion.mjs +20 -20
  18. package/dist/actions/create-chat-completion.mjs.map +1 -1
  19. package/dist/actions/create-contextualized-embeddings.cjs +13 -13
  20. package/dist/actions/create-contextualized-embeddings.cjs.map +1 -1
  21. package/dist/actions/create-contextualized-embeddings.d.cts +35 -3
  22. package/dist/actions/create-contextualized-embeddings.d.cts.map +1 -1
  23. package/dist/actions/create-contextualized-embeddings.d.mts +35 -3
  24. package/dist/actions/create-contextualized-embeddings.d.mts.map +1 -1
  25. package/dist/actions/create-contextualized-embeddings.mjs +13 -13
  26. package/dist/actions/create-contextualized-embeddings.mjs.map +1 -1
  27. package/dist/actions/create-embeddings.cjs +14 -14
  28. package/dist/actions/create-embeddings.cjs.map +1 -1
  29. package/dist/actions/create-embeddings.d.cts +36 -3
  30. package/dist/actions/create-embeddings.d.cts.map +1 -1
  31. package/dist/actions/create-embeddings.d.mts +36 -3
  32. package/dist/actions/create-embeddings.d.mts.map +1 -1
  33. package/dist/actions/create-embeddings.mjs +14 -14
  34. package/dist/actions/create-embeddings.mjs.map +1 -1
  35. package/dist/actions/execute-agent.cjs +8 -8
  36. package/dist/actions/execute-agent.cjs.map +1 -1
  37. package/dist/actions/execute-agent.d.cts +103 -3
  38. package/dist/actions/execute-agent.d.cts.map +1 -1
  39. package/dist/actions/execute-agent.d.mts +103 -3
  40. package/dist/actions/execute-agent.d.mts.map +1 -1
  41. package/dist/actions/execute-agent.mjs +8 -8
  42. package/dist/actions/execute-agent.mjs.map +1 -1
  43. package/dist/actions/get-async-chat-completion.cjs +4 -4
  44. package/dist/actions/get-async-chat-completion.cjs.map +1 -1
  45. package/dist/actions/get-async-chat-completion.d.cts +22 -3
  46. package/dist/actions/get-async-chat-completion.d.cts.map +1 -1
  47. package/dist/actions/get-async-chat-completion.d.mts +22 -3
  48. package/dist/actions/get-async-chat-completion.d.mts.map +1 -1
  49. package/dist/actions/get-async-chat-completion.mjs +4 -4
  50. package/dist/actions/get-async-chat-completion.mjs.map +1 -1
  51. package/dist/actions/list-async-chat-completions.cjs +5 -5
  52. package/dist/actions/list-async-chat-completions.cjs.map +1 -1
  53. package/dist/actions/list-async-chat-completions.d.cts +19 -3
  54. package/dist/actions/list-async-chat-completions.d.cts.map +1 -1
  55. package/dist/actions/list-async-chat-completions.d.mts +19 -3
  56. package/dist/actions/list-async-chat-completions.d.mts.map +1 -1
  57. package/dist/actions/list-async-chat-completions.mjs +5 -5
  58. package/dist/actions/list-async-chat-completions.mjs.map +1 -1
  59. package/dist/actions/list-models.cjs +7 -7
  60. package/dist/actions/list-models.cjs.map +1 -1
  61. package/dist/actions/list-models.d.cts +11 -3
  62. package/dist/actions/list-models.d.cts.map +1 -1
  63. package/dist/actions/list-models.d.mts +11 -3
  64. package/dist/actions/list-models.d.mts.map +1 -1
  65. package/dist/actions/list-models.mjs +7 -7
  66. package/dist/actions/list-models.mjs.map +1 -1
  67. package/dist/actions/search.cjs +5 -5
  68. package/dist/actions/search.cjs.map +1 -1
  69. package/dist/actions/search.d.cts +45 -3
  70. package/dist/actions/search.d.cts.map +1 -1
  71. package/dist/actions/search.d.mts +45 -3
  72. package/dist/actions/search.d.mts.map +1 -1
  73. package/dist/actions/search.mjs +5 -5
  74. package/dist/actions/search.mjs.map +1 -1
  75. package/dist/catalog.cjs +7 -1
  76. package/dist/catalog.cjs.map +1 -1
  77. package/dist/catalog.d.cts +8 -0
  78. package/dist/catalog.d.mts +8 -0
  79. package/dist/catalog.mjs +7 -1
  80. package/dist/catalog.mjs.map +1 -1
  81. package/package.json +2 -2
@@ -1,9 +1,17 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/list-models.d.ts
4
- declare const PerplexityaiListModelsInput: z.ZodTypeAny;
5
- declare const PerplexityaiListModelsOutput: z.ZodTypeAny;
6
- declare const perplexityaiListModels: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PerplexityaiListModelsInput: z.ZodObject<{}, z.core.$strip>;
5
+ declare const PerplexityaiListModelsOutput: z.ZodObject<{
6
+ data: z.ZodArray<z.ZodObject<{
7
+ id: z.ZodNullable<z.ZodString>;
8
+ object: z.ZodNullable<z.ZodString>;
9
+ created: z.ZodNullable<z.ZodNumber>;
10
+ owned_by: z.ZodNullable<z.ZodString>;
11
+ }, z.core.$loose>>;
12
+ object: z.ZodNullable<z.ZodString>;
13
+ }, z.core.$loose>;
14
+ declare const perplexityaiListModels: import("@keystrokehq/action").WorkflowActionDefinition<Record<string, never>, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
15
  //#endregion
8
16
  export { perplexityaiListModels };
9
17
  //# sourceMappingURL=list-models.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-models.d.cts","names":[],"sources":["../../src/actions/list-models.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAAyG;AAAA,cAOxI,4BAAA,EAA8B,CAAA,CAAE,UAGc;AAAA,cAE9C,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"list-models.d.cts","names":[],"sources":["../../src/actions/list-models.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cAO3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;cAK5B,sBAAA,gCAAsB,wBAAA,CAAA,MAAA,wDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -1,9 +1,17 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/list-models.d.ts
4
- declare const PerplexityaiListModelsInput: z.ZodTypeAny;
5
- declare const PerplexityaiListModelsOutput: z.ZodTypeAny;
6
- declare const perplexityaiListModels: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PerplexityaiListModelsInput: z.ZodObject<{}, z.core.$strip>;
5
+ declare const PerplexityaiListModelsOutput: z.ZodObject<{
6
+ data: z.ZodArray<z.ZodObject<{
7
+ id: z.ZodNullable<z.ZodString>;
8
+ object: z.ZodNullable<z.ZodString>;
9
+ created: z.ZodNullable<z.ZodNumber>;
10
+ owned_by: z.ZodNullable<z.ZodString>;
11
+ }, z.core.$loose>>;
12
+ object: z.ZodNullable<z.ZodString>;
13
+ }, z.core.$loose>;
14
+ declare const perplexityaiListModels: import("@keystrokehq/action").WorkflowActionDefinition<Record<string, never>, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
15
  //#endregion
8
16
  export { perplexityaiListModels };
9
17
  //# sourceMappingURL=list-models.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-models.d.mts","names":[],"sources":["../../src/actions/list-models.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAAyG;AAAA,cAOxI,4BAAA,EAA8B,CAAA,CAAE,UAGc;AAAA,cAE9C,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"list-models.d.mts","names":[],"sources":["../../src/actions/list-models.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cAO3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;cAK5B,sBAAA,gCAAsB,wBAAA,CAAA,MAAA,wDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -3,11 +3,11 @@ import { z } from "zod";
3
3
  //#region src/actions/list-models.ts
4
4
  const PerplexityaiListModelsInput = z.object({}).describe("Request model for listing available models. No parameters required.");
5
5
  const PerplexityaiListModels_ModelInfoSchema = z.object({
6
- id: z.string().describe("Model identifier (e.g. 'anthropic/claude-sonnet-4-6')"),
7
- object: z.string().describe("Object type, always 'model'"),
8
- created: z.number().int().describe("Unix timestamp when the model was added"),
9
- owned_by: z.string().describe("Provider name (e.g. 'anthropic', 'openai')")
10
- }).describe("Information about an available model.");
6
+ id: z.string().describe("Model identifier (e.g. 'anthropic/claude-sonnet-4-6')").nullable(),
7
+ object: z.string().describe("Object type, always 'model'").nullable(),
8
+ created: z.number().int().describe("Unix timestamp when the model was added").nullable(),
9
+ owned_by: z.string().describe("Provider name (e.g. 'anthropic', 'openai')").nullable()
10
+ }).passthrough().describe("Information about an available model.");
11
11
  const perplexityaiListModels = action("PERPLEXITYAI_LIST_MODELS", {
12
12
  slug: "perplexityai-list-models",
13
13
  name: "List Models",
@@ -15,8 +15,8 @@ const perplexityaiListModels = action("PERPLEXITYAI_LIST_MODELS", {
15
15
  input: PerplexityaiListModelsInput,
16
16
  output: z.object({
17
17
  data: z.array(PerplexityaiListModels_ModelInfoSchema).describe("List of available models"),
18
- object: z.string().describe("Object type, always 'list'")
19
- }).describe("Response model for listing available models.")
18
+ object: z.string().describe("Object type, always 'list'").nullable()
19
+ }).passthrough().describe("Response model for listing available models.")
20
20
  });
21
21
  //#endregion
22
22
  export { perplexityaiListModels };
@@ -1 +1 @@
1
- {"version":3,"file":"list-models.mjs","names":[],"sources":["../../src/actions/list-models.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PerplexityaiListModelsInput: z.ZodTypeAny = z.object({}).describe(\"Request model for listing available models. No parameters required.\");\nconst PerplexityaiListModels_ModelInfoSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Model identifier (e.g. 'anthropic/claude-sonnet-4-6')\"),\n object: z.string().describe(\"Object type, always 'model'\"),\n created: z.number().int().describe(\"Unix timestamp when the model was added\"),\n owned_by: z.string().describe(\"Provider name (e.g. 'anthropic', 'openai')\"),\n}).describe(\"Information about an available model.\");\nexport const PerplexityaiListModelsOutput: z.ZodTypeAny = z.object({\n data: z.array(PerplexityaiListModels_ModelInfoSchema).describe(\"List of available models\"),\n object: z.string().describe(\"Object type, always 'list'\"),\n}).describe(\"Response model for listing available models.\");\n\nexport const perplexityaiListModels = action(\"PERPLEXITYAI_LIST_MODELS\", {\n slug: \"perplexityai-list-models\",\n name: \"List Models\",\n description: \"List Models (GET /v1/models). Lists models available for the Agent API. Returns model identifiers that can be used with the Agent endpoint. The response follows the OpenAI List Models format for compatibility. This is a public endpoint that does not require authentication.\",\n input: PerplexityaiListModelsInput,\n output: PerplexityaiListModelsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA4C,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,qEAAqE;AACpJ,MAAM,yCAAuD,EAAE,OAAO;CACpE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD;CAC/E,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CACzD,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yCAAyC;CAC5E,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;AAC5E,CAAC,CAAC,CAAC,SAAS,uCAAuC;AAMnD,MAAa,yBAAyB,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAVwD,EAAE,OAAO;EACjE,MAAM,EAAE,MAAM,sCAAsC,CAAC,CAAC,SAAS,0BAA0B;EACzF,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;CAC1D,CAAC,CAAC,CAAC,SAAS,8CAOF;AACV,CAAC"}
1
+ {"version":3,"file":"list-models.mjs","names":[],"sources":["../../src/actions/list-models.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PerplexityaiListModelsInput = z.object({}).describe(\"Request model for listing available models. No parameters required.\");\nconst PerplexityaiListModels_ModelInfoSchema = z.object({\n id: z.string().describe(\"Model identifier (e.g. 'anthropic/claude-sonnet-4-6')\").nullable(),\n object: z.string().describe(\"Object type, always 'model'\").nullable(),\n created: z.number().int().describe(\"Unix timestamp when the model was added\").nullable(),\n owned_by: z.string().describe(\"Provider name (e.g. 'anthropic', 'openai')\").nullable(),\n}).passthrough().describe(\"Information about an available model.\");\nexport const PerplexityaiListModelsOutput = z.object({\n data: z.array(PerplexityaiListModels_ModelInfoSchema).describe(\"List of available models\"),\n object: z.string().describe(\"Object type, always 'list'\").nullable(),\n}).passthrough().describe(\"Response model for listing available models.\");\n\nexport const perplexityaiListModels = action(\"PERPLEXITYAI_LIST_MODELS\", {\n slug: \"perplexityai-list-models\",\n name: \"List Models\",\n description: \"List Models (GET /v1/models). Lists models available for the Agent API. Returns model identifiers that can be used with the Agent endpoint. The response follows the OpenAI List Models format for compatibility. This is a public endpoint that does not require authentication.\",\n input: PerplexityaiListModelsInput,\n output: PerplexityaiListModelsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8B,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,qEAAqE;AACtI,MAAM,yCAAyC,EAAE,OAAO;CACtD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CAC1F,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS;CACpE,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CACvF,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;AACvF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,uCAAuC;AAMjE,MAAa,yBAAyB,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV0C,EAAE,OAAO;EACnD,MAAM,EAAE,MAAM,sCAAsC,CAAC,CAAC,SAAS,0BAA0B;EACzF,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;CACrE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8CAOhB;AACV,CAAC"}
@@ -22,17 +22,17 @@ const PerplexityaiSearchInput = zod.z.object({
22
22
  last_updated_before_filter: zod.z.string().describe("Only include results last updated before this date (MM/DD/YYYY). Cannot be used with search_recency_filter.").optional()
23
23
  }).describe("Request model for the Search API.");
24
24
  const PerplexityaiSearch_SearchResultItemSchema = zod.z.object({
25
- url: zod.z.string().describe("URL of the search result"),
25
+ url: zod.z.string().describe("URL of the search result").nullable(),
26
26
  date: zod.z.string().describe("Publication date").nullable().optional(),
27
- title: zod.z.string().describe("Title of the search result"),
28
- snippet: zod.z.string().describe("Text snippet from the search result"),
27
+ title: zod.z.string().describe("Title of the search result").nullable(),
28
+ snippet: zod.z.string().describe("Text snippet from the search result").nullable(),
29
29
  last_updated: zod.z.string().describe("Last updated date").nullable().optional()
30
- }).describe("Individual search result.");
30
+ }).passthrough().describe("Individual search result.");
31
31
  const PerplexityaiSearchOutput = zod.z.object({
32
32
  id: zod.z.string().describe("Request identifier").nullable().optional(),
33
33
  results: zod.z.array(PerplexityaiSearch_SearchResultItemSchema).describe("List of ranked web search results"),
34
34
  server_time: zod.z.string().describe("Server timestamp").nullable().optional()
35
- }).describe("Response model for the Search API.");
35
+ }).passthrough().describe("Response model for the Search API.");
36
36
  const perplexityaiSearch = require_action.action("PERPLEXITYAI_SEARCH", {
37
37
  slug: "perplexityai-search",
38
38
  name: "Perplexity Search (Raw Results)",
@@ -1 +1 @@
1
- {"version":3,"file":"search.cjs","names":["z","action"],"sources":["../../src/actions/search.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PerplexityaiSearchInput: z.ZodTypeAny = z.object({\n query: z.union([z.string(), z.array(z.string())]),\n country: z.string().describe(\"ISO 3166-1 alpha-2 country code (e.g. 'US', 'GB', 'DE').\").optional(),\n max_tokens: z.number().int().default(10000).describe(\"Maximum total tokens of webpage content returned (1-1000000).\").optional(),\n max_results: z.number().int().default(10).describe(\"Maximum number of search results to return (1-20).\").optional(),\n max_tokens_per_page: z.number().int().default(4096).describe(\"Maximum tokens retrieved from each webpage (1-1000000).\").optional(),\n search_domain_filter: z.array(z.string()).describe(\"Domains to restrict search results to (max 20).\").optional(),\n search_recency_filter: z.enum([\"hour\", \"day\", \"week\", \"month\", \"year\"]).describe(\"Filter for search recency.\").optional(),\n search_language_filter: z.array(z.string()).describe(\"ISO 639-1 language codes to filter results (max 20, 2 chars each).\").optional(),\n search_after_date_filter: z.string().describe(\"Only include results published after this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n last_updated_after_filter: z.string().describe(\"Only include results last updated after this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n search_before_date_filter: z.string().describe(\"Only include results published before this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n last_updated_before_filter: z.string().describe(\"Only include results last updated before this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n}).describe(\"Request model for the Search API.\");\nconst PerplexityaiSearch_SearchResultItemSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL of the search result\"),\n date: z.string().describe(\"Publication date\").nullable().optional(),\n title: z.string().describe(\"Title of the search result\"),\n snippet: z.string().describe(\"Text snippet from the search result\"),\n last_updated: z.string().describe(\"Last updated date\").nullable().optional(),\n}).describe(\"Individual search result.\");\nexport const PerplexityaiSearchOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Request identifier\").nullable().optional(),\n results: z.array(PerplexityaiSearch_SearchResultItemSchema).describe(\"List of ranked web search results\"),\n server_time: z.string().describe(\"Server timestamp\").nullable().optional(),\n}).describe(\"Response model for the Search API.\");\n\nexport const perplexityaiSearch = action(\"PERPLEXITYAI_SEARCH\", {\n slug: \"perplexityai-search\",\n name: \"Perplexity Search (Raw Results)\",\n description: \"Search the Web (POST /search). Returns raw, ranked web search results directly from Perplexity's index without LLM processing. Faster and cheaper than chat completions when you need raw results. Supports filtering by domain, date, language, country, and recency. Max 20 results per request. Important: search_recency_filter and date filters (search_after_date_filter, search_before_date_filter, last_updated_after_filter, last_updated_before_filter) are mutually exclusive. Use one or the other, not both.\",\n input: PerplexityaiSearchInput,\n output: PerplexityaiSearchOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAAwCA,IAAAA,EAAE,OAAO;CAC5D,OAAOA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC;CAChD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS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SAAS,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;CACvD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC;CAClE,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7E,CAAC,CAAC,CAAC,SAAS,2BAA2B;AACvC,MAAa,2BAAyCA,IAAAA,EAAE,OAAO;CAC7D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClE,SAASA,IAAAA,EAAE,MAAM,yCAAyC,CAAC,CAAC,SAAS,mCAAmC;CACxG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC3E,CAAC,CAAC,CAAC,SAAS,oCAAoC;AAEhD,MAAa,qBAAqBC,eAAAA,OAAO,uBAAuB;CAC9D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"search.cjs","names":["z","action"],"sources":["../../src/actions/search.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PerplexityaiSearchInput = z.object({\n query: z.union([z.string(), z.array(z.string())]),\n country: z.string().describe(\"ISO 3166-1 alpha-2 country code (e.g. 'US', 'GB', 'DE').\").optional(),\n max_tokens: z.number().int().default(10000).describe(\"Maximum total tokens of webpage content returned (1-1000000).\").optional(),\n max_results: z.number().int().default(10).describe(\"Maximum number of search results to return (1-20).\").optional(),\n max_tokens_per_page: z.number().int().default(4096).describe(\"Maximum tokens retrieved from each webpage (1-1000000).\").optional(),\n search_domain_filter: z.array(z.string()).describe(\"Domains to restrict search results to (max 20).\").optional(),\n search_recency_filter: z.enum([\"hour\", \"day\", \"week\", \"month\", \"year\"]).describe(\"Filter for search recency.\").optional(),\n search_language_filter: z.array(z.string()).describe(\"ISO 639-1 language codes to filter results (max 20, 2 chars each).\").optional(),\n search_after_date_filter: z.string().describe(\"Only include results published after this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n last_updated_after_filter: z.string().describe(\"Only include results last updated after this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n search_before_date_filter: z.string().describe(\"Only include results published before this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n last_updated_before_filter: z.string().describe(\"Only include results last updated before this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n}).describe(\"Request model for the Search API.\");\nconst PerplexityaiSearch_SearchResultItemSchema = z.object({\n url: z.string().describe(\"URL of the search result\").nullable(),\n date: z.string().describe(\"Publication date\").nullable().optional(),\n title: z.string().describe(\"Title of the search result\").nullable(),\n snippet: z.string().describe(\"Text snippet from the search result\").nullable(),\n last_updated: z.string().describe(\"Last updated date\").nullable().optional(),\n}).passthrough().describe(\"Individual search result.\");\nexport const PerplexityaiSearchOutput = z.object({\n id: z.string().describe(\"Request identifier\").nullable().optional(),\n results: z.array(PerplexityaiSearch_SearchResultItemSchema).describe(\"List of ranked web search results\"),\n server_time: z.string().describe(\"Server timestamp\").nullable().optional(),\n}).passthrough().describe(\"Response model for the Search API.\");\n\nexport const perplexityaiSearch = action(\"PERPLEXITYAI_SEARCH\", {\n slug: \"perplexityai-search\",\n name: \"Perplexity Search (Raw Results)\",\n description: \"Search the Web (POST /search). Returns raw, ranked web search results directly from Perplexity's index without LLM processing. Faster and cheaper than chat completions when you need raw results. Supports filtering by domain, date, language, country, and recency. Max 20 results per request. Important: search_recency_filter and date filters (search_after_date_filter, search_before_date_filter, last_updated_after_filter, last_updated_before_filter) are mutually exclusive. Use one or the other, not both.\",\n input: PerplexityaiSearchInput,\n output: PerplexityaiSearchOutput,\n});\n"],"mappings":";;;AAIA,MAAa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AAC,CAAC,SAAS;AAC1K,CAAC,CAAC,CAAC,SAAS,mCAAmC;AAC/C,MAAM,4CAA4CA,IAAAA,EAAE,OAAO;CACzD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CAC9D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;CAClE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;CAC7E,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7E,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,2BAA2B;AACrD,MAAa,2BAA2BA,IAAAA,EAAE,OAAO;CAC/C,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClE,SAASA,IAAAA,EAAE,MAAM,yCAAyC,CAAC,CAAC,SAAS,mCAAmC;CACxG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC3E,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oCAAoC;AAE9D,MAAa,qBAAqBC,eAAAA,OAAO,uBAAuB;CAC9D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,9 +1,51 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/search.d.ts
4
- declare const PerplexityaiSearchInput: z.ZodTypeAny;
5
- declare const PerplexityaiSearchOutput: z.ZodTypeAny;
6
- declare const perplexityaiSearch: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PerplexityaiSearchInput: z.ZodObject<{
5
+ query: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
6
+ country: z.ZodOptional<z.ZodString>;
7
+ max_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
8
+ max_results: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
9
+ max_tokens_per_page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
10
+ search_domain_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
11
+ search_recency_filter: z.ZodOptional<z.ZodEnum<{
12
+ hour: "hour";
13
+ day: "day";
14
+ week: "week";
15
+ month: "month";
16
+ year: "year";
17
+ }>>;
18
+ search_language_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
+ search_after_date_filter: z.ZodOptional<z.ZodString>;
20
+ last_updated_after_filter: z.ZodOptional<z.ZodString>;
21
+ search_before_date_filter: z.ZodOptional<z.ZodString>;
22
+ last_updated_before_filter: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>;
24
+ declare const PerplexityaiSearchOutput: z.ZodObject<{
25
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ results: z.ZodArray<z.ZodObject<{
27
+ url: z.ZodNullable<z.ZodString>;
28
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ title: z.ZodNullable<z.ZodString>;
30
+ snippet: z.ZodNullable<z.ZodString>;
31
+ last_updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
+ }, z.core.$loose>>;
33
+ server_time: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ }, z.core.$loose>;
35
+ declare const perplexityaiSearch: import("@keystrokehq/action").WorkflowActionDefinition<{
36
+ query: string | string[];
37
+ country?: string | undefined;
38
+ max_tokens?: number | undefined;
39
+ max_results?: number | undefined;
40
+ max_tokens_per_page?: number | undefined;
41
+ search_domain_filter?: string[] | undefined;
42
+ search_recency_filter?: "hour" | "day" | "week" | "month" | "year" | undefined;
43
+ search_language_filter?: string[] | undefined;
44
+ search_after_date_filter?: string | undefined;
45
+ last_updated_after_filter?: string | undefined;
46
+ search_before_date_filter?: string | undefined;
47
+ last_updated_before_filter?: string | undefined;
48
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
49
  //#endregion
8
50
  export { perplexityaiSearch };
9
51
  //# sourceMappingURL=search.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.cts","names":[],"sources":["../../src/actions/search.ts"],"mappings":";;;cAIa,uBAAA,EAAyB,CAAA,CAAE,UAaQ;AAAA,cAQnC,wBAAA,EAA0B,CAAA,CAAE,UAIQ;AAAA,cAEpC,kBAAA,gCAAkB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"search.d.cts","names":[],"sources":["../../src/actions/search.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAqBvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;cAMxB,kBAAA,gCAAkB,wBAAA"}
@@ -1,9 +1,51 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/search.d.ts
4
- declare const PerplexityaiSearchInput: z.ZodTypeAny;
5
- declare const PerplexityaiSearchOutput: z.ZodTypeAny;
6
- declare const perplexityaiSearch: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PerplexityaiSearchInput: z.ZodObject<{
5
+ query: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
6
+ country: z.ZodOptional<z.ZodString>;
7
+ max_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
8
+ max_results: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
9
+ max_tokens_per_page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
10
+ search_domain_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
11
+ search_recency_filter: z.ZodOptional<z.ZodEnum<{
12
+ hour: "hour";
13
+ day: "day";
14
+ week: "week";
15
+ month: "month";
16
+ year: "year";
17
+ }>>;
18
+ search_language_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
+ search_after_date_filter: z.ZodOptional<z.ZodString>;
20
+ last_updated_after_filter: z.ZodOptional<z.ZodString>;
21
+ search_before_date_filter: z.ZodOptional<z.ZodString>;
22
+ last_updated_before_filter: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>;
24
+ declare const PerplexityaiSearchOutput: z.ZodObject<{
25
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ results: z.ZodArray<z.ZodObject<{
27
+ url: z.ZodNullable<z.ZodString>;
28
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ title: z.ZodNullable<z.ZodString>;
30
+ snippet: z.ZodNullable<z.ZodString>;
31
+ last_updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
+ }, z.core.$loose>>;
33
+ server_time: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ }, z.core.$loose>;
35
+ declare const perplexityaiSearch: import("@keystrokehq/action").WorkflowActionDefinition<{
36
+ query: string | string[];
37
+ country?: string | undefined;
38
+ max_tokens?: number | undefined;
39
+ max_results?: number | undefined;
40
+ max_tokens_per_page?: number | undefined;
41
+ search_domain_filter?: string[] | undefined;
42
+ search_recency_filter?: "hour" | "day" | "week" | "month" | "year" | undefined;
43
+ search_language_filter?: string[] | undefined;
44
+ search_after_date_filter?: string | undefined;
45
+ last_updated_after_filter?: string | undefined;
46
+ search_before_date_filter?: string | undefined;
47
+ last_updated_before_filter?: string | undefined;
48
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
49
  //#endregion
8
50
  export { perplexityaiSearch };
9
51
  //# sourceMappingURL=search.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.mts","names":[],"sources":["../../src/actions/search.ts"],"mappings":";;;cAIa,uBAAA,EAAyB,CAAA,CAAE,UAaQ;AAAA,cAQnC,wBAAA,EAA0B,CAAA,CAAE,UAIQ;AAAA,cAEpC,kBAAA,gCAAkB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"search.d.mts","names":[],"sources":["../../src/actions/search.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAqBvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;cAMxB,kBAAA,gCAAkB,wBAAA"}
@@ -22,12 +22,12 @@ const PerplexityaiSearchInput = z.object({
22
22
  last_updated_before_filter: z.string().describe("Only include results last updated before this date (MM/DD/YYYY). Cannot be used with search_recency_filter.").optional()
23
23
  }).describe("Request model for the Search API.");
24
24
  const PerplexityaiSearch_SearchResultItemSchema = z.object({
25
- url: z.string().describe("URL of the search result"),
25
+ url: z.string().describe("URL of the search result").nullable(),
26
26
  date: z.string().describe("Publication date").nullable().optional(),
27
- title: z.string().describe("Title of the search result"),
28
- snippet: z.string().describe("Text snippet from the search result"),
27
+ title: z.string().describe("Title of the search result").nullable(),
28
+ snippet: z.string().describe("Text snippet from the search result").nullable(),
29
29
  last_updated: z.string().describe("Last updated date").nullable().optional()
30
- }).describe("Individual search result.");
30
+ }).passthrough().describe("Individual search result.");
31
31
  const perplexityaiSearch = action("PERPLEXITYAI_SEARCH", {
32
32
  slug: "perplexityai-search",
33
33
  name: "Perplexity Search (Raw Results)",
@@ -37,7 +37,7 @@ const perplexityaiSearch = action("PERPLEXITYAI_SEARCH", {
37
37
  id: z.string().describe("Request identifier").nullable().optional(),
38
38
  results: z.array(PerplexityaiSearch_SearchResultItemSchema).describe("List of ranked web search results"),
39
39
  server_time: z.string().describe("Server timestamp").nullable().optional()
40
- }).describe("Response model for the Search API.")
40
+ }).passthrough().describe("Response model for the Search API.")
41
41
  });
42
42
  //#endregion
43
43
  export { perplexityaiSearch };
@@ -1 +1 @@
1
- {"version":3,"file":"search.mjs","names":[],"sources":["../../src/actions/search.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PerplexityaiSearchInput: z.ZodTypeAny = z.object({\n query: z.union([z.string(), z.array(z.string())]),\n country: z.string().describe(\"ISO 3166-1 alpha-2 country code (e.g. 'US', 'GB', 'DE').\").optional(),\n max_tokens: z.number().int().default(10000).describe(\"Maximum total tokens of webpage content returned (1-1000000).\").optional(),\n max_results: z.number().int().default(10).describe(\"Maximum number of search results to return (1-20).\").optional(),\n max_tokens_per_page: z.number().int().default(4096).describe(\"Maximum tokens retrieved from each webpage (1-1000000).\").optional(),\n search_domain_filter: z.array(z.string()).describe(\"Domains to restrict search results to (max 20).\").optional(),\n search_recency_filter: z.enum([\"hour\", \"day\", \"week\", \"month\", \"year\"]).describe(\"Filter for search recency.\").optional(),\n search_language_filter: z.array(z.string()).describe(\"ISO 639-1 language codes to filter results (max 20, 2 chars each).\").optional(),\n search_after_date_filter: z.string().describe(\"Only include results published after this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n last_updated_after_filter: z.string().describe(\"Only include results last updated after this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n search_before_date_filter: z.string().describe(\"Only include results published before this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n last_updated_before_filter: z.string().describe(\"Only include results last updated before this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n}).describe(\"Request model for the Search API.\");\nconst PerplexityaiSearch_SearchResultItemSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL of the search result\"),\n date: z.string().describe(\"Publication date\").nullable().optional(),\n title: z.string().describe(\"Title of the search result\"),\n snippet: z.string().describe(\"Text snippet from the search result\"),\n last_updated: z.string().describe(\"Last updated date\").nullable().optional(),\n}).describe(\"Individual search result.\");\nexport const PerplexityaiSearchOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Request identifier\").nullable().optional(),\n results: z.array(PerplexityaiSearch_SearchResultItemSchema).describe(\"List of ranked web search results\"),\n server_time: z.string().describe(\"Server timestamp\").nullable().optional(),\n}).describe(\"Response model for the Search API.\");\n\nexport const perplexityaiSearch = action(\"PERPLEXITYAI_SEARCH\", {\n slug: \"perplexityai-search\",\n name: \"Perplexity Search (Raw Results)\",\n description: \"Search the Web (POST /search). Returns raw, ranked web search results directly from Perplexity's index without LLM processing. Faster and cheaper than chat completions when you need raw results. Supports filtering by domain, date, language, country, and recency. Max 20 results per request. Important: search_recency_filter and date filters (search_after_date_filter, search_before_date_filter, last_updated_after_filter, last_updated_before_filter) are mutually exclusive. Use one or the other, not both.\",\n input: PerplexityaiSearchInput,\n output: PerplexityaiSearchOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAAwC,EAAE,OAAO;CAC5D,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAChD,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAClG,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,GAAK,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CAC/H,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;CAClH,qBAAqB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,IAA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,SAAS,CAAC,CAAC,SAAS;EAClE,SAAS,EAAE,MAAM,yCAAyC,CAAC,CAAC,SAAS,mCAAmC;EACxG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3E,CAAC,CAAC,CAAC,SAAS,oCAOF;AACV,CAAC"}
1
+ {"version":3,"file":"search.mjs","names":[],"sources":["../../src/actions/search.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PerplexityaiSearchInput = z.object({\n query: z.union([z.string(), z.array(z.string())]),\n country: z.string().describe(\"ISO 3166-1 alpha-2 country code (e.g. 'US', 'GB', 'DE').\").optional(),\n max_tokens: z.number().int().default(10000).describe(\"Maximum total tokens of webpage content returned (1-1000000).\").optional(),\n max_results: z.number().int().default(10).describe(\"Maximum number of search results to return (1-20).\").optional(),\n max_tokens_per_page: z.number().int().default(4096).describe(\"Maximum tokens retrieved from each webpage (1-1000000).\").optional(),\n search_domain_filter: z.array(z.string()).describe(\"Domains to restrict search results to (max 20).\").optional(),\n search_recency_filter: z.enum([\"hour\", \"day\", \"week\", \"month\", \"year\"]).describe(\"Filter for search recency.\").optional(),\n search_language_filter: z.array(z.string()).describe(\"ISO 639-1 language codes to filter results (max 20, 2 chars each).\").optional(),\n search_after_date_filter: z.string().describe(\"Only include results published after this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n last_updated_after_filter: z.string().describe(\"Only include results last updated after this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n search_before_date_filter: z.string().describe(\"Only include results published before this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n last_updated_before_filter: z.string().describe(\"Only include results last updated before this date (MM/DD/YYYY). Cannot be used with search_recency_filter.\").optional(),\n}).describe(\"Request model for the Search API.\");\nconst PerplexityaiSearch_SearchResultItemSchema = z.object({\n url: z.string().describe(\"URL of the search result\").nullable(),\n date: z.string().describe(\"Publication date\").nullable().optional(),\n title: z.string().describe(\"Title of the search result\").nullable(),\n snippet: z.string().describe(\"Text snippet from the search result\").nullable(),\n last_updated: z.string().describe(\"Last updated date\").nullable().optional(),\n}).passthrough().describe(\"Individual search result.\");\nexport const PerplexityaiSearchOutput = z.object({\n id: z.string().describe(\"Request identifier\").nullable().optional(),\n results: z.array(PerplexityaiSearch_SearchResultItemSchema).describe(\"List of ranked web search results\"),\n server_time: z.string().describe(\"Server timestamp\").nullable().optional(),\n}).passthrough().describe(\"Response model for the Search API.\");\n\nexport const perplexityaiSearch = action(\"PERPLEXITYAI_SEARCH\", {\n slug: \"perplexityai-search\",\n name: \"Perplexity Search (Raw Results)\",\n description: \"Search the Web (POST /search). Returns raw, ranked web search results directly from Perplexity's index without LLM processing. Faster and cheaper than chat completions when you need raw results. Supports filtering by domain, date, language, country, and recency. Max 20 results per request. Important: search_recency_filter and date filters (search_after_date_filter, search_before_date_filter, last_updated_after_filter, last_updated_before_filter) are mutually exclusive. Use one or the other, not both.\",\n input: PerplexityaiSearchInput,\n output: PerplexityaiSearchOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAA0B,EAAE,OAAO;CAC9C,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAChD,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAClG,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,GAAK,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CAC/H,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;CAClH,qBAAqB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;CACjI,sBAAsB,EA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CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAClE,SAAS,EAAE,MAAM,yCAAyC,CAAC,CAAC,SAAS,mCAAmC;EACxG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3E,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oCAOhB;AACV,CAAC"}
package/dist/catalog.cjs CHANGED
@@ -7,7 +7,13 @@ const perplexityaiCatalog = {
7
7
  "category": "Artificial Intelligence",
8
8
  "logo": "https://logos.composio.dev/api/perplexityai",
9
9
  "authKind": "keystroke",
10
- "oauthScopes": []
10
+ "oauthScopes": [],
11
+ "credentialFields": { "api_key": {
12
+ "label": "API Key",
13
+ "secret": true,
14
+ "description": "Your secret Perplexity API key, starting with 'pplx-'. Create one at console.perplexity.ai under API Keys — it's shown only once, so copy it immediately."
15
+ } },
16
+ "credentialScheme": "API_KEY"
11
17
  };
12
18
  //#endregion
13
19
  exports.perplexityaiCatalog = perplexityaiCatalog;
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.cjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const perplexityaiCatalog = {\n \"slug\": \"perplexityai\",\n \"name\": \"Perplexity AI\",\n \"description\": \"Perplexity AI provides conversational AI models for generating human-like text responses\",\n \"category\": \"Artificial Intelligence\",\n \"logo\": \"https://logos.composio.dev/api/perplexityai\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": []\n} as const;\n"],"mappings":";;AACA,MAAa,sBAAsB;CACjC,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;AAClB"}
1
+ {"version":3,"file":"catalog.cjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const perplexityaiCatalog = {\n \"slug\": \"perplexityai\",\n \"name\": \"Perplexity AI\",\n \"description\": \"Perplexity AI provides conversational AI models for generating human-like text responses\",\n \"category\": \"Artificial Intelligence\",\n \"logo\": \"https://logos.composio.dev/api/perplexityai\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": [],\n \"credentialFields\": {\n \"api_key\": {\n \"label\": \"API Key\",\n \"secret\": true,\n \"description\": \"Your secret Perplexity API key, starting with 'pplx-'. Create one at console.perplexity.ai under API Keys — it's shown only once, so copy it immediately.\"\n }\n },\n \"credentialScheme\": \"API_KEY\"\n} as const;\n"],"mappings":";;AACA,MAAa,sBAAsB;CACjC,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;CAChB,oBAAoB,EAClB,WAAW;EACT,SAAS;EACT,UAAU;EACV,eAAe;CACjB,EACF;CACA,oBAAoB;AACtB"}
@@ -8,6 +8,14 @@ declare const perplexityaiCatalog: {
8
8
  readonly logo: "https://logos.composio.dev/api/perplexityai";
9
9
  readonly authKind: "keystroke";
10
10
  readonly oauthScopes: readonly [];
11
+ readonly credentialFields: {
12
+ readonly api_key: {
13
+ readonly label: "API Key";
14
+ readonly secret: true;
15
+ readonly description: "Your secret Perplexity API key, starting with 'pplx-'. Create one at console.perplexity.ai under API Keys — it's shown only once, so copy it immediately.";
16
+ };
17
+ };
18
+ readonly credentialScheme: "API_KEY";
11
19
  };
12
20
  //#endregion
13
21
  export { perplexityaiCatalog };
@@ -8,6 +8,14 @@ declare const perplexityaiCatalog: {
8
8
  readonly logo: "https://logos.composio.dev/api/perplexityai";
9
9
  readonly authKind: "keystroke";
10
10
  readonly oauthScopes: readonly [];
11
+ readonly credentialFields: {
12
+ readonly api_key: {
13
+ readonly label: "API Key";
14
+ readonly secret: true;
15
+ readonly description: "Your secret Perplexity API key, starting with 'pplx-'. Create one at console.perplexity.ai under API Keys — it's shown only once, so copy it immediately.";
16
+ };
17
+ };
18
+ readonly credentialScheme: "API_KEY";
11
19
  };
12
20
  //#endregion
13
21
  export { perplexityaiCatalog };
package/dist/catalog.mjs CHANGED
@@ -7,7 +7,13 @@ const perplexityaiCatalog = {
7
7
  "category": "Artificial Intelligence",
8
8
  "logo": "https://logos.composio.dev/api/perplexityai",
9
9
  "authKind": "keystroke",
10
- "oauthScopes": []
10
+ "oauthScopes": [],
11
+ "credentialFields": { "api_key": {
12
+ "label": "API Key",
13
+ "secret": true,
14
+ "description": "Your secret Perplexity API key, starting with 'pplx-'. Create one at console.perplexity.ai under API Keys — it's shown only once, so copy it immediately."
15
+ } },
16
+ "credentialScheme": "API_KEY"
11
17
  };
12
18
  //#endregion
13
19
  export { perplexityaiCatalog };
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.mjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const perplexityaiCatalog = {\n \"slug\": \"perplexityai\",\n \"name\": \"Perplexity AI\",\n \"description\": \"Perplexity AI provides conversational AI models for generating human-like text responses\",\n \"category\": \"Artificial Intelligence\",\n \"logo\": \"https://logos.composio.dev/api/perplexityai\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": []\n} as const;\n"],"mappings":";;AACA,MAAa,sBAAsB;CACjC,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;AAClB"}
1
+ {"version":3,"file":"catalog.mjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const perplexityaiCatalog = {\n \"slug\": \"perplexityai\",\n \"name\": \"Perplexity AI\",\n \"description\": \"Perplexity AI provides conversational AI models for generating human-like text responses\",\n \"category\": \"Artificial Intelligence\",\n \"logo\": \"https://logos.composio.dev/api/perplexityai\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": [],\n \"credentialFields\": {\n \"api_key\": {\n \"label\": \"API Key\",\n \"secret\": true,\n \"description\": \"Your secret Perplexity API key, starting with 'pplx-'. Create one at console.perplexity.ai under API Keys — it's shown only once, so copy it immediately.\"\n }\n },\n \"credentialScheme\": \"API_KEY\"\n} as const;\n"],"mappings":";;AACA,MAAa,sBAAsB;CACjC,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;CAChB,oBAAoB,EAClB,WAAW;EACT,SAAS;EACT,UAAU;EACV,eAAe;CACjB,EACF;CACA,oBAAoB;AACtB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/perplexityai",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
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.4",
34
+ "@keystrokehq/keystroke": ">=0.1.4",
35
35
  "zod": "^4.4.3"
36
36
  },
37
37
  "devDependencies": {