@credal/actions 0.1.63 → 0.1.65

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.
@@ -78,6 +78,7 @@ const deepResearch_1 = __importDefault(require("./providers/firecrawl/deepResear
78
78
  const listPullRequests_1 = __importDefault(require("./providers/github/listPullRequests"));
79
79
  const getJiraIssuesByQuery_1 = __importDefault(require("./providers/jira/getJiraIssuesByQuery"));
80
80
  const createRecord_1 = __importDefault(require("./providers/salesforce/createRecord"));
81
+ const getTopNSearchResultUrls_1 = __importDefault(require("./providers/bing/getTopNSearchResultUrls"));
81
82
  exports.ActionMapper = {
82
83
  generic: {
83
84
  fillTemplate: {
@@ -158,6 +159,13 @@ exports.ActionMapper = {
158
159
  outputSchema: types_1.credalCallCopilotOutputSchema,
159
160
  },
160
161
  },
162
+ bing: {
163
+ getTopNSearchResultUrls: {
164
+ fn: getTopNSearchResultUrls_1.default,
165
+ paramsSchema: types_1.bingGetTopNSearchResultUrlsParamsSchema,
166
+ outputSchema: types_1.bingGetTopNSearchResultUrlsOutputSchema,
167
+ },
168
+ },
161
169
  zendesk: {
162
170
  createZendeskTicket: {
163
171
  fn: createZendeskTicket_1.default,
@@ -285,8 +293,8 @@ exports.ActionMapper = {
285
293
  },
286
294
  deepResearch: {
287
295
  fn: deepResearch_1.default,
288
- paramsSchema: types_1.firecrawlScrapeUrlParamsSchema,
289
- outputSchema: types_1.firecrawlScrapeUrlOutputSchema,
296
+ paramsSchema: types_1.firecrawlDeepResearchParamsSchema,
297
+ outputSchema: types_1.firecrawlDeepResearchOutputSchema,
290
298
  },
291
299
  },
292
300
  resend: {
@@ -19,6 +19,7 @@ export declare const jiraUpdateJiraTicketStatusDefinition: ActionTemplate;
19
19
  export declare const jiraGetJiraIssuesByQueryDefinition: ActionTemplate;
20
20
  export declare const googlemapsValidateAddressDefinition: ActionTemplate;
21
21
  export declare const googlemapsNearbysearchRestaurantsDefinition: ActionTemplate;
22
+ export declare const bingGetTopNSearchResultUrlsDefinition: ActionTemplate;
22
23
  export declare const credalCallCopilotDefinition: ActionTemplate;
23
24
  export declare const zendeskCreateZendeskTicketDefinition: ActionTemplate;
24
25
  export declare const zendeskListZendeskTicketsDefinition: ActionTemplate;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ashbyGetCandidateInfoDefinition = exports.ashbyCreateNoteDefinition = exports.lookerEnableUserByEmailDefinition = exports.finnhubGetBasicFinancialsDefinition = exports.finnhubSymbolLookupDefinition = exports.googleOauthUpdatePresentationDefinition = exports.googleOauthCreatePresentationDefinition = exports.googleOauthUpdateSpreadsheetDefinition = exports.googleOauthCreateSpreadsheetDefinition = exports.googleOauthScheduleCalendarMeetingDefinition = exports.googleOauthUpdateDocDefinition = exports.googleOauthCreateNewGoogleDocDefinition = exports.resendSendEmailDefinition = exports.firecrawlScrapeTweetDataWithNitterDefinition = exports.firecrawlScrapeUrlDefinition = exports.firecrawlDeepResearchDefinition = exports.nwsGetForecastForLocationDefinition = exports.openstreetmapGetLatitudeLongitudeFromLocationDefinition = exports.snowflakeRunSnowflakeQueryDefinition = exports.snowflakeGetRowByFieldValueDefinition = exports.mongoInsertMongoDocDefinition = exports.xCreateShareXPostUrlDefinition = exports.linkedinCreateShareLinkedinPostUrlDefinition = exports.zendeskAssignTicketDefinition = exports.zendeskAddCommentToTicketDefinition = exports.zendeskUpdateTicketStatusDefinition = exports.zendeskGetTicketDetailsDefinition = exports.zendeskListZendeskTicketsDefinition = exports.zendeskCreateZendeskTicketDefinition = exports.credalCallCopilotDefinition = exports.googlemapsNearbysearchRestaurantsDefinition = exports.googlemapsValidateAddressDefinition = exports.jiraGetJiraIssuesByQueryDefinition = exports.jiraUpdateJiraTicketStatusDefinition = exports.jiraUpdateJiraTicketDetailsDefinition = exports.jiraGetJiraTicketHistoryDefinition = exports.jiraGetJiraTicketDetailsDefinition = exports.jiraCreateJiraTicketDefinition = exports.jiraCommentJiraTicketDefinition = exports.jiraAssignJiraTicketDefinition = exports.confluenceFetchPageContentDefinition = exports.confluenceOverwritePageDefinition = exports.mathAddDefinition = exports.slackGetChannelMessagesDefinition = exports.slackListConversationsDefinition = exports.slackSendMessageDefinition = exports.asanaUpdateTaskDefinition = exports.asanaCreateTaskDefinition = exports.asanaCommentTaskDefinition = exports.genericFillTemplateDefinition = void 0;
4
- exports.githubListPullRequestsDefinition = exports.githubCreatePullRequestDefinition = exports.githubCreateBranchDefinition = exports.githubCreateOrUpdateFileDefinition = exports.microsoftGetDocumentDefinition = exports.microsoftMessageTeamsChannelDefinition = exports.microsoftMessageTeamsChatDefinition = exports.microsoftUpdateSpreadsheetDefinition = exports.microsoftUpdateDocumentDefinition = exports.microsoftCreateDocumentDefinition = exports.salesforceFetchSalesforceSchemaByObjectDefinition = exports.salesforceGetRecordDefinition = exports.salesforceGetSalesforceRecordsByQueryDefinition = exports.salesforceGenerateSalesReportDefinition = exports.salesforceCreateCaseDefinition = exports.salesforceCreateRecordDefinition = exports.salesforceUpdateRecordDefinition = exports.ashbyUpdateCandidateDefinition = exports.ashbyCreateCandidateDefinition = exports.ashbyListCandidateNotesDefinition = exports.ashbySearchCandidatesDefinition = exports.ashbyListCandidatesDefinition = exports.ashbyAddCandidateToProjectDefinition = void 0;
3
+ exports.ashbyCreateNoteDefinition = exports.lookerEnableUserByEmailDefinition = exports.finnhubGetBasicFinancialsDefinition = exports.finnhubSymbolLookupDefinition = exports.googleOauthUpdatePresentationDefinition = exports.googleOauthCreatePresentationDefinition = exports.googleOauthUpdateSpreadsheetDefinition = exports.googleOauthCreateSpreadsheetDefinition = exports.googleOauthScheduleCalendarMeetingDefinition = exports.googleOauthUpdateDocDefinition = exports.googleOauthCreateNewGoogleDocDefinition = exports.resendSendEmailDefinition = exports.firecrawlScrapeTweetDataWithNitterDefinition = exports.firecrawlScrapeUrlDefinition = exports.firecrawlDeepResearchDefinition = exports.nwsGetForecastForLocationDefinition = exports.openstreetmapGetLatitudeLongitudeFromLocationDefinition = exports.snowflakeRunSnowflakeQueryDefinition = exports.snowflakeGetRowByFieldValueDefinition = exports.mongoInsertMongoDocDefinition = exports.xCreateShareXPostUrlDefinition = exports.linkedinCreateShareLinkedinPostUrlDefinition = exports.zendeskAssignTicketDefinition = exports.zendeskAddCommentToTicketDefinition = exports.zendeskUpdateTicketStatusDefinition = exports.zendeskGetTicketDetailsDefinition = exports.zendeskListZendeskTicketsDefinition = exports.zendeskCreateZendeskTicketDefinition = exports.credalCallCopilotDefinition = exports.bingGetTopNSearchResultUrlsDefinition = exports.googlemapsNearbysearchRestaurantsDefinition = exports.googlemapsValidateAddressDefinition = exports.jiraGetJiraIssuesByQueryDefinition = exports.jiraUpdateJiraTicketStatusDefinition = exports.jiraUpdateJiraTicketDetailsDefinition = exports.jiraGetJiraTicketHistoryDefinition = exports.jiraGetJiraTicketDetailsDefinition = exports.jiraCreateJiraTicketDefinition = exports.jiraCommentJiraTicketDefinition = exports.jiraAssignJiraTicketDefinition = exports.confluenceFetchPageContentDefinition = exports.confluenceOverwritePageDefinition = exports.mathAddDefinition = exports.slackGetChannelMessagesDefinition = exports.slackListConversationsDefinition = exports.slackSendMessageDefinition = exports.asanaUpdateTaskDefinition = exports.asanaCreateTaskDefinition = exports.asanaCommentTaskDefinition = exports.genericFillTemplateDefinition = void 0;
4
+ exports.githubListPullRequestsDefinition = exports.githubCreatePullRequestDefinition = exports.githubCreateBranchDefinition = exports.githubCreateOrUpdateFileDefinition = exports.microsoftGetDocumentDefinition = exports.microsoftMessageTeamsChannelDefinition = exports.microsoftMessageTeamsChatDefinition = exports.microsoftUpdateSpreadsheetDefinition = exports.microsoftUpdateDocumentDefinition = exports.microsoftCreateDocumentDefinition = exports.salesforceFetchSalesforceSchemaByObjectDefinition = exports.salesforceGetRecordDefinition = exports.salesforceGetSalesforceRecordsByQueryDefinition = exports.salesforceGenerateSalesReportDefinition = exports.salesforceCreateCaseDefinition = exports.salesforceCreateRecordDefinition = exports.salesforceUpdateRecordDefinition = exports.ashbyUpdateCandidateDefinition = exports.ashbyCreateCandidateDefinition = exports.ashbyListCandidateNotesDefinition = exports.ashbySearchCandidatesDefinition = exports.ashbyListCandidatesDefinition = exports.ashbyAddCandidateToProjectDefinition = exports.ashbyGetCandidateInfoDefinition = void 0;
5
5
  exports.genericFillTemplateDefinition = {
6
6
  description: "Simple utility that takes a template and returns it filled in",
7
7
  scopes: [],
@@ -985,6 +985,53 @@ exports.googlemapsNearbysearchRestaurantsDefinition = {
985
985
  name: "nearbysearchRestaurants",
986
986
  provider: "googlemaps",
987
987
  };
988
+ exports.bingGetTopNSearchResultUrlsDefinition = {
989
+ description: "Get the top five search result URLs from Bing",
990
+ scopes: [],
991
+ parameters: {
992
+ type: "object",
993
+ required: ["query"],
994
+ properties: {
995
+ query: {
996
+ type: "string",
997
+ description: "The query to search for",
998
+ },
999
+ count: {
1000
+ type: "number",
1001
+ description: "The number of results to return. Default is 5.",
1002
+ },
1003
+ site: {
1004
+ type: "string",
1005
+ description: "The site to restrict the search to (by inserting site:<site.com> in the query). Examples include openai.com, github.com",
1006
+ },
1007
+ },
1008
+ },
1009
+ output: {
1010
+ type: "object",
1011
+ required: ["results"],
1012
+ properties: {
1013
+ results: {
1014
+ type: "array",
1015
+ description: "The top five search result objects",
1016
+ items: {
1017
+ type: "object",
1018
+ properties: {
1019
+ name: {
1020
+ type: "string",
1021
+ description: "The name or title of the search result",
1022
+ },
1023
+ url: {
1024
+ type: "string",
1025
+ description: "The URL of the search result",
1026
+ },
1027
+ },
1028
+ },
1029
+ },
1030
+ },
1031
+ },
1032
+ name: "getTopNSearchResultUrls",
1033
+ provider: "bing",
1034
+ };
988
1035
  exports.credalCallCopilotDefinition = {
989
1036
  description: "Call Credal Copilot for response on a given query",
990
1037
  scopes: [],
@@ -874,6 +874,44 @@ export declare const googlemapsNearbysearchRestaurantsOutputSchema: z.ZodObject<
874
874
  }>;
875
875
  export type googlemapsNearbysearchRestaurantsOutputType = z.infer<typeof googlemapsNearbysearchRestaurantsOutputSchema>;
876
876
  export type googlemapsNearbysearchRestaurantsFunction = ActionFunction<googlemapsNearbysearchRestaurantsParamsType, AuthParamsType, googlemapsNearbysearchRestaurantsOutputType>;
877
+ export declare const bingGetTopNSearchResultUrlsParamsSchema: z.ZodObject<{
878
+ query: z.ZodString;
879
+ count: z.ZodOptional<z.ZodNumber>;
880
+ site: z.ZodOptional<z.ZodString>;
881
+ }, "strip", z.ZodTypeAny, {
882
+ query: string;
883
+ count?: number | undefined;
884
+ site?: string | undefined;
885
+ }, {
886
+ query: string;
887
+ count?: number | undefined;
888
+ site?: string | undefined;
889
+ }>;
890
+ export type bingGetTopNSearchResultUrlsParamsType = z.infer<typeof bingGetTopNSearchResultUrlsParamsSchema>;
891
+ export declare const bingGetTopNSearchResultUrlsOutputSchema: z.ZodObject<{
892
+ results: z.ZodArray<z.ZodObject<{
893
+ name: z.ZodOptional<z.ZodString>;
894
+ url: z.ZodOptional<z.ZodString>;
895
+ }, "strip", z.ZodTypeAny, {
896
+ name?: string | undefined;
897
+ url?: string | undefined;
898
+ }, {
899
+ name?: string | undefined;
900
+ url?: string | undefined;
901
+ }>, "many">;
902
+ }, "strip", z.ZodTypeAny, {
903
+ results: {
904
+ name?: string | undefined;
905
+ url?: string | undefined;
906
+ }[];
907
+ }, {
908
+ results: {
909
+ name?: string | undefined;
910
+ url?: string | undefined;
911
+ }[];
912
+ }>;
913
+ export type bingGetTopNSearchResultUrlsOutputType = z.infer<typeof bingGetTopNSearchResultUrlsOutputSchema>;
914
+ export type bingGetTopNSearchResultUrlsFunction = ActionFunction<bingGetTopNSearchResultUrlsParamsType, AuthParamsType, bingGetTopNSearchResultUrlsOutputType>;
877
915
  export declare const credalCallCopilotParamsSchema: z.ZodObject<{
878
916
  agentId: z.ZodString;
879
917
  query: z.ZodString;
@@ -1059,11 +1097,11 @@ export declare const zendeskListZendeskTicketsOutputSchema: z.ZodObject<{
1059
1097
  tickets: z.ZodArray<z.ZodObject<{}, "strip", z.ZodAny, z.objectOutputType<{}, z.ZodAny, "strip">, z.objectInputType<{}, z.ZodAny, "strip">>, "many">;
1060
1098
  count: z.ZodNumber;
1061
1099
  }, "strip", z.ZodTypeAny, {
1062
- tickets: z.objectOutputType<{}, z.ZodAny, "strip">[];
1063
1100
  count: number;
1101
+ tickets: z.objectOutputType<{}, z.ZodAny, "strip">[];
1064
1102
  }, {
1065
- tickets: z.objectInputType<{}, z.ZodAny, "strip">[];
1066
1103
  count: number;
1104
+ tickets: z.objectInputType<{}, z.ZodAny, "strip">[];
1067
1105
  }>;
1068
1106
  export type zendeskListZendeskTicketsOutputType = z.infer<typeof zendeskListZendeskTicketsOutputSchema>;
1069
1107
  export type zendeskListZendeskTicketsFunction = ActionFunction<zendeskListZendeskTicketsParamsType, AuthParamsType, zendeskListZendeskTicketsOutputType>;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zendeskUpdateTicketStatusParamsSchema = exports.zendeskGetTicketDetailsOutputSchema = exports.zendeskGetTicketDetailsParamsSchema = exports.zendeskListZendeskTicketsOutputSchema = exports.zendeskListZendeskTicketsParamsSchema = exports.zendeskCreateZendeskTicketOutputSchema = exports.zendeskCreateZendeskTicketParamsSchema = exports.credalCallCopilotOutputSchema = exports.credalCallCopilotParamsSchema = exports.googlemapsNearbysearchRestaurantsOutputSchema = exports.googlemapsNearbysearchRestaurantsParamsSchema = exports.googlemapsValidateAddressOutputSchema = exports.googlemapsValidateAddressParamsSchema = exports.jiraGetJiraIssuesByQueryOutputSchema = exports.jiraGetJiraIssuesByQueryParamsSchema = exports.jiraUpdateJiraTicketStatusOutputSchema = exports.jiraUpdateJiraTicketStatusParamsSchema = exports.jiraUpdateJiraTicketDetailsOutputSchema = exports.jiraUpdateJiraTicketDetailsParamsSchema = exports.jiraGetJiraTicketHistoryOutputSchema = exports.jiraGetJiraTicketHistoryParamsSchema = exports.jiraGetJiraTicketDetailsOutputSchema = exports.jiraGetJiraTicketDetailsParamsSchema = exports.jiraCreateJiraTicketOutputSchema = exports.jiraCreateJiraTicketParamsSchema = exports.jiraCommentJiraTicketOutputSchema = exports.jiraCommentJiraTicketParamsSchema = exports.jiraAssignJiraTicketOutputSchema = exports.jiraAssignJiraTicketParamsSchema = exports.confluenceFetchPageContentOutputSchema = exports.confluenceFetchPageContentParamsSchema = exports.confluenceOverwritePageOutputSchema = exports.confluenceOverwritePageParamsSchema = exports.mathAddOutputSchema = exports.mathAddParamsSchema = exports.slackGetChannelMessagesOutputSchema = exports.slackGetChannelMessagesParamsSchema = exports.slackListConversationsOutputSchema = exports.slackListConversationsParamsSchema = exports.slackSendMessageOutputSchema = exports.slackSendMessageParamsSchema = exports.asanaUpdateTaskOutputSchema = exports.asanaUpdateTaskParamsSchema = exports.asanaCreateTaskOutputSchema = exports.asanaCreateTaskParamsSchema = exports.asanaCommentTaskOutputSchema = exports.asanaCommentTaskParamsSchema = exports.genericFillTemplateOutputSchema = exports.genericFillTemplateParamsSchema = exports.AuthParamsSchema = void 0;
4
- exports.ashbyGetCandidateInfoParamsSchema = exports.ashbyCreateNoteOutputSchema = exports.ashbyCreateNoteParamsSchema = exports.lookerEnableUserByEmailOutputSchema = exports.lookerEnableUserByEmailParamsSchema = exports.finnhubGetBasicFinancialsOutputSchema = exports.finnhubGetBasicFinancialsParamsSchema = exports.finnhubSymbolLookupOutputSchema = exports.finnhubSymbolLookupParamsSchema = exports.googleOauthUpdatePresentationOutputSchema = exports.googleOauthUpdatePresentationParamsSchema = exports.googleOauthCreatePresentationOutputSchema = exports.googleOauthCreatePresentationParamsSchema = exports.googleOauthUpdateSpreadsheetOutputSchema = exports.googleOauthUpdateSpreadsheetParamsSchema = exports.googleOauthCreateSpreadsheetOutputSchema = exports.googleOauthCreateSpreadsheetParamsSchema = exports.googleOauthScheduleCalendarMeetingOutputSchema = exports.googleOauthScheduleCalendarMeetingParamsSchema = exports.googleOauthUpdateDocOutputSchema = exports.googleOauthUpdateDocParamsSchema = exports.googleOauthCreateNewGoogleDocOutputSchema = exports.googleOauthCreateNewGoogleDocParamsSchema = exports.resendSendEmailOutputSchema = exports.resendSendEmailParamsSchema = exports.firecrawlScrapeTweetDataWithNitterOutputSchema = exports.firecrawlScrapeTweetDataWithNitterParamsSchema = exports.firecrawlScrapeUrlOutputSchema = exports.firecrawlScrapeUrlParamsSchema = exports.firecrawlDeepResearchOutputSchema = exports.firecrawlDeepResearchParamsSchema = exports.nwsGetForecastForLocationOutputSchema = exports.nwsGetForecastForLocationParamsSchema = exports.openstreetmapGetLatitudeLongitudeFromLocationOutputSchema = exports.openstreetmapGetLatitudeLongitudeFromLocationParamsSchema = exports.snowflakeRunSnowflakeQueryOutputSchema = exports.snowflakeRunSnowflakeQueryParamsSchema = exports.snowflakeGetRowByFieldValueOutputSchema = exports.snowflakeGetRowByFieldValueParamsSchema = exports.mongoInsertMongoDocOutputSchema = exports.mongoInsertMongoDocParamsSchema = exports.xCreateShareXPostUrlOutputSchema = exports.xCreateShareXPostUrlParamsSchema = exports.linkedinCreateShareLinkedinPostUrlOutputSchema = exports.linkedinCreateShareLinkedinPostUrlParamsSchema = exports.zendeskAssignTicketOutputSchema = exports.zendeskAssignTicketParamsSchema = exports.zendeskAddCommentToTicketOutputSchema = exports.zendeskAddCommentToTicketParamsSchema = exports.zendeskUpdateTicketStatusOutputSchema = void 0;
5
- exports.githubListPullRequestsOutputSchema = exports.githubListPullRequestsParamsSchema = exports.githubCreatePullRequestOutputSchema = exports.githubCreatePullRequestParamsSchema = exports.githubCreateBranchOutputSchema = exports.githubCreateBranchParamsSchema = exports.githubCreateOrUpdateFileOutputSchema = exports.githubCreateOrUpdateFileParamsSchema = exports.microsoftGetDocumentOutputSchema = exports.microsoftGetDocumentParamsSchema = exports.microsoftMessageTeamsChannelOutputSchema = exports.microsoftMessageTeamsChannelParamsSchema = exports.microsoftMessageTeamsChatOutputSchema = exports.microsoftMessageTeamsChatParamsSchema = exports.microsoftUpdateSpreadsheetOutputSchema = exports.microsoftUpdateSpreadsheetParamsSchema = exports.microsoftUpdateDocumentOutputSchema = exports.microsoftUpdateDocumentParamsSchema = exports.microsoftCreateDocumentOutputSchema = exports.microsoftCreateDocumentParamsSchema = exports.salesforceFetchSalesforceSchemaByObjectOutputSchema = exports.salesforceFetchSalesforceSchemaByObjectParamsSchema = exports.salesforceGetRecordOutputSchema = exports.salesforceGetRecordParamsSchema = exports.salesforceGetSalesforceRecordsByQueryOutputSchema = exports.salesforceGetSalesforceRecordsByQueryParamsSchema = exports.salesforceGenerateSalesReportOutputSchema = exports.salesforceGenerateSalesReportParamsSchema = exports.salesforceCreateCaseOutputSchema = exports.salesforceCreateCaseParamsSchema = exports.salesforceCreateRecordOutputSchema = exports.salesforceCreateRecordParamsSchema = exports.salesforceUpdateRecordOutputSchema = exports.salesforceUpdateRecordParamsSchema = exports.ashbyUpdateCandidateOutputSchema = exports.ashbyUpdateCandidateParamsSchema = exports.ashbyCreateCandidateOutputSchema = exports.ashbyCreateCandidateParamsSchema = exports.ashbyListCandidateNotesOutputSchema = exports.ashbyListCandidateNotesParamsSchema = exports.ashbySearchCandidatesOutputSchema = exports.ashbySearchCandidatesParamsSchema = exports.ashbyListCandidatesOutputSchema = exports.ashbyListCandidatesParamsSchema = exports.ashbyAddCandidateToProjectOutputSchema = exports.ashbyAddCandidateToProjectParamsSchema = exports.ashbyGetCandidateInfoOutputSchema = void 0;
3
+ exports.zendeskGetTicketDetailsParamsSchema = exports.zendeskListZendeskTicketsOutputSchema = exports.zendeskListZendeskTicketsParamsSchema = exports.zendeskCreateZendeskTicketOutputSchema = exports.zendeskCreateZendeskTicketParamsSchema = exports.credalCallCopilotOutputSchema = exports.credalCallCopilotParamsSchema = exports.bingGetTopNSearchResultUrlsOutputSchema = exports.bingGetTopNSearchResultUrlsParamsSchema = exports.googlemapsNearbysearchRestaurantsOutputSchema = exports.googlemapsNearbysearchRestaurantsParamsSchema = exports.googlemapsValidateAddressOutputSchema = exports.googlemapsValidateAddressParamsSchema = exports.jiraGetJiraIssuesByQueryOutputSchema = exports.jiraGetJiraIssuesByQueryParamsSchema = exports.jiraUpdateJiraTicketStatusOutputSchema = exports.jiraUpdateJiraTicketStatusParamsSchema = exports.jiraUpdateJiraTicketDetailsOutputSchema = exports.jiraUpdateJiraTicketDetailsParamsSchema = exports.jiraGetJiraTicketHistoryOutputSchema = exports.jiraGetJiraTicketHistoryParamsSchema = exports.jiraGetJiraTicketDetailsOutputSchema = exports.jiraGetJiraTicketDetailsParamsSchema = exports.jiraCreateJiraTicketOutputSchema = exports.jiraCreateJiraTicketParamsSchema = exports.jiraCommentJiraTicketOutputSchema = exports.jiraCommentJiraTicketParamsSchema = exports.jiraAssignJiraTicketOutputSchema = exports.jiraAssignJiraTicketParamsSchema = exports.confluenceFetchPageContentOutputSchema = exports.confluenceFetchPageContentParamsSchema = exports.confluenceOverwritePageOutputSchema = exports.confluenceOverwritePageParamsSchema = exports.mathAddOutputSchema = exports.mathAddParamsSchema = exports.slackGetChannelMessagesOutputSchema = exports.slackGetChannelMessagesParamsSchema = exports.slackListConversationsOutputSchema = exports.slackListConversationsParamsSchema = exports.slackSendMessageOutputSchema = exports.slackSendMessageParamsSchema = exports.asanaUpdateTaskOutputSchema = exports.asanaUpdateTaskParamsSchema = exports.asanaCreateTaskOutputSchema = exports.asanaCreateTaskParamsSchema = exports.asanaCommentTaskOutputSchema = exports.asanaCommentTaskParamsSchema = exports.genericFillTemplateOutputSchema = exports.genericFillTemplateParamsSchema = exports.AuthParamsSchema = void 0;
4
+ exports.ashbyCreateNoteParamsSchema = exports.lookerEnableUserByEmailOutputSchema = exports.lookerEnableUserByEmailParamsSchema = exports.finnhubGetBasicFinancialsOutputSchema = exports.finnhubGetBasicFinancialsParamsSchema = exports.finnhubSymbolLookupOutputSchema = exports.finnhubSymbolLookupParamsSchema = exports.googleOauthUpdatePresentationOutputSchema = exports.googleOauthUpdatePresentationParamsSchema = exports.googleOauthCreatePresentationOutputSchema = exports.googleOauthCreatePresentationParamsSchema = exports.googleOauthUpdateSpreadsheetOutputSchema = exports.googleOauthUpdateSpreadsheetParamsSchema = exports.googleOauthCreateSpreadsheetOutputSchema = exports.googleOauthCreateSpreadsheetParamsSchema = exports.googleOauthScheduleCalendarMeetingOutputSchema = exports.googleOauthScheduleCalendarMeetingParamsSchema = exports.googleOauthUpdateDocOutputSchema = exports.googleOauthUpdateDocParamsSchema = exports.googleOauthCreateNewGoogleDocOutputSchema = exports.googleOauthCreateNewGoogleDocParamsSchema = exports.resendSendEmailOutputSchema = exports.resendSendEmailParamsSchema = exports.firecrawlScrapeTweetDataWithNitterOutputSchema = exports.firecrawlScrapeTweetDataWithNitterParamsSchema = exports.firecrawlScrapeUrlOutputSchema = exports.firecrawlScrapeUrlParamsSchema = exports.firecrawlDeepResearchOutputSchema = exports.firecrawlDeepResearchParamsSchema = exports.nwsGetForecastForLocationOutputSchema = exports.nwsGetForecastForLocationParamsSchema = exports.openstreetmapGetLatitudeLongitudeFromLocationOutputSchema = exports.openstreetmapGetLatitudeLongitudeFromLocationParamsSchema = exports.snowflakeRunSnowflakeQueryOutputSchema = exports.snowflakeRunSnowflakeQueryParamsSchema = exports.snowflakeGetRowByFieldValueOutputSchema = exports.snowflakeGetRowByFieldValueParamsSchema = exports.mongoInsertMongoDocOutputSchema = exports.mongoInsertMongoDocParamsSchema = exports.xCreateShareXPostUrlOutputSchema = exports.xCreateShareXPostUrlParamsSchema = exports.linkedinCreateShareLinkedinPostUrlOutputSchema = exports.linkedinCreateShareLinkedinPostUrlParamsSchema = exports.zendeskAssignTicketOutputSchema = exports.zendeskAssignTicketParamsSchema = exports.zendeskAddCommentToTicketOutputSchema = exports.zendeskAddCommentToTicketParamsSchema = exports.zendeskUpdateTicketStatusOutputSchema = exports.zendeskUpdateTicketStatusParamsSchema = exports.zendeskGetTicketDetailsOutputSchema = void 0;
5
+ exports.githubListPullRequestsOutputSchema = exports.githubListPullRequestsParamsSchema = exports.githubCreatePullRequestOutputSchema = exports.githubCreatePullRequestParamsSchema = exports.githubCreateBranchOutputSchema = exports.githubCreateBranchParamsSchema = exports.githubCreateOrUpdateFileOutputSchema = exports.githubCreateOrUpdateFileParamsSchema = exports.microsoftGetDocumentOutputSchema = exports.microsoftGetDocumentParamsSchema = exports.microsoftMessageTeamsChannelOutputSchema = exports.microsoftMessageTeamsChannelParamsSchema = exports.microsoftMessageTeamsChatOutputSchema = exports.microsoftMessageTeamsChatParamsSchema = exports.microsoftUpdateSpreadsheetOutputSchema = exports.microsoftUpdateSpreadsheetParamsSchema = exports.microsoftUpdateDocumentOutputSchema = exports.microsoftUpdateDocumentParamsSchema = exports.microsoftCreateDocumentOutputSchema = exports.microsoftCreateDocumentParamsSchema = exports.salesforceFetchSalesforceSchemaByObjectOutputSchema = exports.salesforceFetchSalesforceSchemaByObjectParamsSchema = exports.salesforceGetRecordOutputSchema = exports.salesforceGetRecordParamsSchema = exports.salesforceGetSalesforceRecordsByQueryOutputSchema = exports.salesforceGetSalesforceRecordsByQueryParamsSchema = exports.salesforceGenerateSalesReportOutputSchema = exports.salesforceGenerateSalesReportParamsSchema = exports.salesforceCreateCaseOutputSchema = exports.salesforceCreateCaseParamsSchema = exports.salesforceCreateRecordOutputSchema = exports.salesforceCreateRecordParamsSchema = exports.salesforceUpdateRecordOutputSchema = exports.salesforceUpdateRecordParamsSchema = exports.ashbyUpdateCandidateOutputSchema = exports.ashbyUpdateCandidateParamsSchema = exports.ashbyCreateCandidateOutputSchema = exports.ashbyCreateCandidateParamsSchema = exports.ashbyListCandidateNotesOutputSchema = exports.ashbyListCandidateNotesParamsSchema = exports.ashbySearchCandidatesOutputSchema = exports.ashbySearchCandidatesParamsSchema = exports.ashbyListCandidatesOutputSchema = exports.ashbyListCandidatesParamsSchema = exports.ashbyAddCandidateToProjectOutputSchema = exports.ashbyAddCandidateToProjectParamsSchema = exports.ashbyGetCandidateInfoOutputSchema = exports.ashbyGetCandidateInfoParamsSchema = exports.ashbyCreateNoteOutputSchema = void 0;
6
6
  const zod_1 = require("zod");
7
7
  exports.AuthParamsSchema = zod_1.z.object({
8
8
  authToken: zod_1.z.string().optional(),
@@ -300,6 +300,22 @@ exports.googlemapsNearbysearchRestaurantsOutputSchema = zod_1.z.object({
300
300
  }))
301
301
  .describe("The results of the nearby search"),
302
302
  });
303
+ exports.bingGetTopNSearchResultUrlsParamsSchema = zod_1.z.object({
304
+ query: zod_1.z.string().describe("The query to search for"),
305
+ count: zod_1.z.number().describe("The number of results to return. Default is 5.").optional(),
306
+ site: zod_1.z
307
+ .string()
308
+ .describe("The site to restrict the search to (by inserting site:<site.com> in the query). Examples include openai.com, github.com")
309
+ .optional(),
310
+ });
311
+ exports.bingGetTopNSearchResultUrlsOutputSchema = zod_1.z.object({
312
+ results: zod_1.z
313
+ .array(zod_1.z.object({
314
+ name: zod_1.z.string().describe("The name or title of the search result").optional(),
315
+ url: zod_1.z.string().describe("The URL of the search result").optional(),
316
+ }))
317
+ .describe("The top N search result objects"),
318
+ });
303
319
  exports.credalCallCopilotParamsSchema = zod_1.z.object({
304
320
  agentId: zod_1.z.string().describe("The ID of the copilot to call"),
305
321
  query: zod_1.z.string().describe("The query to ask Credal Copilot"),
@@ -61,6 +61,10 @@ exports.ACTION_GROUPS = {
61
61
  templates_1.zendeskAssignTicketDefinition,
62
62
  ],
63
63
  },
64
+ BING_SEARCH: {
65
+ description: "Action for searching Bing",
66
+ actions: [templates_1.bingGetTopNSearchResultUrlsDefinition],
67
+ },
64
68
  MONGO_INSERT_DOC: {
65
69
  description: "Action for inserting a document into a MongoDB collection",
66
70
  actions: [templates_1.mongoInsertMongoDocDefinition],
@@ -0,0 +1,3 @@
1
+ import { type bingGetTopNSearchResultUrlsFunction } from "../../autogen/types";
2
+ declare const getTopNSearchResultUrls: bingGetTopNSearchResultUrlsFunction;
3
+ export default getTopNSearchResultUrls;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const types_1 = require("../../autogen/types");
13
+ const axiosClient_1 = require("../../util/axiosClient");
14
+ const getTopNSearchResultUrls = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
15
+ var _b;
16
+ const { query, count = 5, site } = params;
17
+ const { apiKey } = authParams;
18
+ // Build the search query
19
+ const searchQuery = `${query}${site ? ` site:${site}` : ""}`;
20
+ // Ensure we have an API key
21
+ if (!apiKey) {
22
+ throw new Error("Missing Bing API key in auth parameters");
23
+ }
24
+ try {
25
+ // Call Bing Search API
26
+ const response = yield axiosClient_1.axiosClient.get("https://api.bing.microsoft.com/v7.0/search", {
27
+ params: {
28
+ q: searchQuery,
29
+ count: count,
30
+ responseFilter: "Webpages",
31
+ mkt: "en-US",
32
+ },
33
+ headers: {
34
+ "Ocp-Apim-Subscription-Key": apiKey,
35
+ },
36
+ });
37
+ // Extract URLs and names from search results
38
+ const searchResults = ((_b = response.data.webPages) === null || _b === void 0 ? void 0 : _b.value) || [];
39
+ return types_1.bingGetTopNSearchResultUrlsOutputSchema.parse({
40
+ results: searchResults,
41
+ });
42
+ }
43
+ catch (error) {
44
+ console.error("Error fetching search results from Bing:", error);
45
+ throw error;
46
+ }
47
+ });
48
+ exports.default = getTopNSearchResultUrls;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.1.63",
3
+ "version": "0.1.65",
4
4
  "description": "AI Actions by Credal AI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",