@credal/actions 0.2.56 → 0.2.58

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.
@@ -1,4 +1,4 @@
1
- import { genericFillTemplateParamsSchema, genericFillTemplateOutputSchema, confluenceOverwritePageParamsSchema, confluenceOverwritePageOutputSchema, googlemapsValidateAddressOutputSchema, googlemapsValidateAddressParamsSchema, googleOauthCreateNewGoogleDocParamsSchema, googleOauthCreateNewGoogleDocOutputSchema, mathAddOutputSchema, mathAddParamsSchema, mongoInsertMongoDocOutputSchema, mongoInsertMongoDocParamsSchema, slackSendMessageOutputSchema, slackSendMessageParamsSchema, slackGetChannelMessagesOutputSchema, slackGetChannelMessagesParamsSchema, slackArchiveChannelParamsSchema, slackArchiveChannelOutputSchema, slackCreateChannelParamsSchema, slackCreateChannelOutputSchema, snowflakeGetRowByFieldValueOutputSchema, snowflakeGetRowByFieldValueParamsSchema, zendeskCreateZendeskTicketOutputSchema, zendeskCreateZendeskTicketParamsSchema, zendeskGetTicketDetailsOutputSchema, zendeskGetTicketDetailsParamsSchema, zendeskUpdateTicketStatusOutputSchema, zendeskUpdateTicketStatusParamsSchema, zendeskAddCommentToTicketOutputSchema, zendeskAddCommentToTicketParamsSchema, zendeskAssignTicketOutputSchema, zendeskAssignTicketParamsSchema, zendeskListZendeskTicketsOutputSchema, zendeskListZendeskTicketsParamsSchema, jiraAssignJiraTicketParamsSchema, jiraAssignJiraTicketOutputSchema, jiraCommentJiraTicketParamsSchema, jiraCommentJiraTicketOutputSchema, jiraCreateJiraTicketParamsSchema, jiraCreateJiraTicketOutputSchema, jiraGetJiraTicketDetailsParamsSchema, jiraGetJiraTicketDetailsOutputSchema, jiraGetJiraTicketHistoryParamsSchema, jiraGetJiraTicketHistoryOutputSchema, jiraUpdateJiraTicketDetailsParamsSchema, jiraUpdateJiraTicketDetailsOutputSchema, jiraUpdateJiraTicketStatusParamsSchema, jiraUpdateJiraTicketStatusOutputSchema, jiraGetServiceDesksParamsSchema, jiraGetServiceDesksOutputSchema, jiraCreateServiceDeskRequestParamsSchema, jiraCreateServiceDeskRequestOutputSchema, openstreetmapGetLatitudeLongitudeFromLocationParamsSchema, openstreetmapGetLatitudeLongitudeFromLocationOutputSchema, nwsGetForecastForLocationParamsSchema, nwsGetForecastForLocationOutputSchema, googlemapsNearbysearchRestaurantsOutputSchema, googlemapsNearbysearchRestaurantsParamsSchema, firecrawlScrapeUrlOutputSchema, firecrawlScrapeUrlParamsSchema, resendSendEmailOutputSchema, firecrawlScrapeTweetDataWithNitterParamsSchema, firecrawlScrapeTweetDataWithNitterOutputSchema, resendSendEmailParamsSchema, linkedinCreateShareLinkedinPostUrlParamsSchema, linkedinCreateShareLinkedinPostUrlOutputSchema, xCreateShareXPostUrlParamsSchema, xCreateShareXPostUrlOutputSchema, finnhubSymbolLookupParamsSchema, finnhubSymbolLookupOutputSchema, finnhubGetBasicFinancialsParamsSchema, finnhubGetBasicFinancialsOutputSchema, confluenceFetchPageContentParamsSchema, confluenceFetchPageContentOutputSchema, snowflakeRunSnowflakeQueryParamsSchema, snowflakeRunSnowflakeQueryOutputSchema, lookerEnableUserByEmailParamsSchema, lookerEnableUserByEmailOutputSchema, googleOauthUpdateDocParamsSchema, googleOauthUpdateDocOutputSchema, googleOauthCreateSpreadsheetParamsSchema, googleOauthCreateSpreadsheetOutputSchema, googleOauthUpdateSpreadsheetParamsSchema, googleOauthUpdateSpreadsheetOutputSchema, googleOauthScheduleCalendarMeetingParamsSchema, googleOauthScheduleCalendarMeetingOutputSchema, googleOauthListCalendarsParamsSchema, googleOauthListCalendarsOutputSchema, googleOauthListCalendarEventsParamsSchema, googleOauthListCalendarEventsOutputSchema, googleOauthUpdateCalendarEventParamsSchema, googleOauthUpdateCalendarEventOutputSchema, googleOauthDeleteCalendarEventParamsSchema, googleOauthDeleteCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, gongGetGongTranscriptsParamsSchema, gongGetGongTranscriptsOutputSchema, ashbyCreateNoteParamsSchema, ashbyCreateNoteOutputSchema, ashbyGetCandidateInfoParamsSchema, ashbyGetCandidateInfoOutputSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, ashbyListCandidatesParamsSchema, ashbyListCandidatesOutputSchema, ashbyListCandidateNotesParamsSchema, ashbyListCandidateNotesOutputSchema, ashbySearchCandidatesParamsSchema, ashbySearchCandidatesOutputSchema, ashbyCreateCandidateParamsSchema, ashbyCreateCandidateOutputSchema, ashbyUpdateCandidateParamsSchema, ashbyUpdateCandidateOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, salesforceFetchSalesforceSchemaByObjectParamsSchema, salesforceFetchSalesforceSchemaByObjectOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, ashbyAddCandidateToProjectParamsSchema, ashbyAddCandidateToProjectOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, kandjiGetFVRecoveryKeyForDeviceParamsSchema, kandjiGetFVRecoveryKeyForDeviceOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, jamfGetJamfComputerInventoryParamsSchema, jamfGetJamfComputerInventoryOutputSchema, jamfGetJamfFileVaultRecoveryKeyParamsSchema, jamfGetJamfFileVaultRecoveryKeyOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, oktaListOktaUsersParamsSchema, oktaListOktaUsersOutputSchema, oktaGetOktaUserParamsSchema, oktaGetOktaUserOutputSchema, oktaListOktaUserGroupsParamsSchema, oktaListOktaUserGroupsOutputSchema, oktaListOktaGroupsParamsSchema, oktaListOktaGroupsOutputSchema, oktaGetOktaGroupParamsSchema, oktaGetOktaGroupOutputSchema, oktaListOktaGroupMembersParamsSchema, oktaListOktaGroupMembersOutputSchema, oktaRemoveUserFromGroupParamsSchema, oktaRemoveUserFromGroupOutputSchema, oktaAddUserToGroupParamsSchema, oktaAddUserToGroupOutputSchema, oktaResetPasswordParamsSchema, oktaResetPasswordOutputSchema, oktaResetMFAParamsSchema, oktaResetMFAOutputSchema, oktaListMFAParamsSchema, oktaListMFAOutputSchema, jamfGetJamfUserComputerIdParamsSchema, jamfGetJamfUserComputerIdOutputSchema, jamfLockJamfComputerByIdParamsSchema, jamfLockJamfComputerByIdOutputSchema, oktaTriggerOktaWorkflowParamsSchema, oktaTriggerOktaWorkflowOutputSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchRepositoryOutputSchema, githubSearchRepositoryParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, googleOauthSearchDriveByQueryOutputSchema, googleOauthSearchDriveByQueryParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentOutputSchema, githubGetFileContentParamsSchema, githubGetFileContentOutputSchema, githubListDirectoryOutputSchema, githubListDirectoryParamsSchema, linearGetIssuesParamsSchema, linearGetIssuesOutputSchema, linearGetIssueDetailsParamsSchema, linearGetIssueDetailsOutputSchema, linearGetProjectDetailsParamsSchema, linearGetProjectDetailsOutputSchema, linearGetTeamDetailsParamsSchema, linearGetTeamDetailsOutputSchema, linearGetProjectsParamsSchema, linearGetProjectsOutputSchema, linearGetTeamsParamsSchema, linearGetTeamsOutputSchema, gitlabGetFileContentParamsSchema, gitlabGetFileContentOutputSchema, } from "./autogen/types.js";
1
+ import { genericFillTemplateParamsSchema, genericFillTemplateOutputSchema, confluenceOverwritePageParamsSchema, confluenceOverwritePageOutputSchema, googlemapsValidateAddressOutputSchema, googlemapsValidateAddressParamsSchema, googleOauthCreateNewGoogleDocParamsSchema, googleOauthCreateNewGoogleDocOutputSchema, mathAddOutputSchema, mathAddParamsSchema, mongoInsertMongoDocOutputSchema, mongoInsertMongoDocParamsSchema, slackSendMessageOutputSchema, slackSendMessageParamsSchema, slackGetChannelMessagesOutputSchema, slackGetChannelMessagesParamsSchema, slackArchiveChannelParamsSchema, slackArchiveChannelOutputSchema, slackCreateChannelParamsSchema, slackCreateChannelOutputSchema, snowflakeGetRowByFieldValueOutputSchema, snowflakeGetRowByFieldValueParamsSchema, zendeskCreateZendeskTicketOutputSchema, zendeskCreateZendeskTicketParamsSchema, zendeskGetTicketDetailsOutputSchema, zendeskGetTicketDetailsParamsSchema, zendeskUpdateTicketStatusOutputSchema, zendeskUpdateTicketStatusParamsSchema, zendeskAddCommentToTicketOutputSchema, zendeskAddCommentToTicketParamsSchema, zendeskAssignTicketOutputSchema, zendeskAssignTicketParamsSchema, zendeskListZendeskTicketsOutputSchema, zendeskListZendeskTicketsParamsSchema, jiraAssignJiraTicketParamsSchema, jiraAssignJiraTicketOutputSchema, jiraCommentJiraTicketParamsSchema, jiraCommentJiraTicketOutputSchema, jiraCreateJiraTicketParamsSchema, jiraCreateJiraTicketOutputSchema, jiraGetJiraTicketDetailsParamsSchema, jiraGetJiraTicketDetailsOutputSchema, jiraGetJiraTicketHistoryParamsSchema, jiraGetJiraTicketHistoryOutputSchema, jiraUpdateJiraTicketDetailsParamsSchema, jiraUpdateJiraTicketDetailsOutputSchema, jiraUpdateJiraTicketStatusParamsSchema, jiraUpdateJiraTicketStatusOutputSchema, jiraGetServiceDesksParamsSchema, jiraGetServiceDesksOutputSchema, jiraCreateServiceDeskRequestParamsSchema, jiraCreateServiceDeskRequestOutputSchema, openstreetmapGetLatitudeLongitudeFromLocationParamsSchema, openstreetmapGetLatitudeLongitudeFromLocationOutputSchema, nwsGetForecastForLocationParamsSchema, nwsGetForecastForLocationOutputSchema, googlemapsNearbysearchRestaurantsOutputSchema, googlemapsNearbysearchRestaurantsParamsSchema, firecrawlScrapeUrlOutputSchema, firecrawlScrapeUrlParamsSchema, resendSendEmailOutputSchema, firecrawlScrapeTweetDataWithNitterParamsSchema, firecrawlScrapeTweetDataWithNitterOutputSchema, resendSendEmailParamsSchema, linkedinCreateShareLinkedinPostUrlParamsSchema, linkedinCreateShareLinkedinPostUrlOutputSchema, xCreateShareXPostUrlParamsSchema, xCreateShareXPostUrlOutputSchema, finnhubSymbolLookupParamsSchema, finnhubSymbolLookupOutputSchema, finnhubGetBasicFinancialsParamsSchema, finnhubGetBasicFinancialsOutputSchema, confluenceFetchPageContentParamsSchema, confluenceFetchPageContentOutputSchema, snowflakeRunSnowflakeQueryParamsSchema, snowflakeRunSnowflakeQueryOutputSchema, lookerEnableUserByEmailParamsSchema, lookerEnableUserByEmailOutputSchema, googleOauthUpdateDocParamsSchema, googleOauthUpdateDocOutputSchema, googleOauthCreateSpreadsheetParamsSchema, googleOauthCreateSpreadsheetOutputSchema, googleOauthUpdateSpreadsheetParamsSchema, googleOauthUpdateSpreadsheetOutputSchema, googleOauthScheduleCalendarMeetingParamsSchema, googleOauthScheduleCalendarMeetingOutputSchema, googleOauthListCalendarsParamsSchema, googleOauthListCalendarsOutputSchema, googleOauthListCalendarEventsParamsSchema, googleOauthListCalendarEventsOutputSchema, googleOauthUpdateCalendarEventParamsSchema, googleOauthUpdateCalendarEventOutputSchema, googleOauthDeleteCalendarEventParamsSchema, googleOauthDeleteCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, gongGetGongTranscriptsParamsSchema, gongGetGongTranscriptsOutputSchema, ashbyCreateNoteParamsSchema, ashbyCreateNoteOutputSchema, ashbyGetCandidateInfoParamsSchema, ashbyGetCandidateInfoOutputSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, ashbyListCandidatesParamsSchema, ashbyListCandidatesOutputSchema, ashbyListCandidateNotesParamsSchema, ashbyListCandidateNotesOutputSchema, ashbySearchCandidatesParamsSchema, ashbySearchCandidatesOutputSchema, ashbyCreateCandidateParamsSchema, ashbyCreateCandidateOutputSchema, ashbyUpdateCandidateParamsSchema, ashbyUpdateCandidateOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, salesforceFetchSalesforceSchemaByObjectParamsSchema, salesforceFetchSalesforceSchemaByObjectOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, ashbyAddCandidateToProjectParamsSchema, ashbyAddCandidateToProjectOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, kandjiGetFVRecoveryKeyForDeviceParamsSchema, kandjiGetFVRecoveryKeyForDeviceOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, jamfGetJamfComputerInventoryParamsSchema, jamfGetJamfComputerInventoryOutputSchema, jamfGetJamfFileVaultRecoveryKeyParamsSchema, jamfGetJamfFileVaultRecoveryKeyOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, oktaListOktaUsersParamsSchema, oktaListOktaUsersOutputSchema, oktaGetOktaUserParamsSchema, oktaGetOktaUserOutputSchema, oktaListOktaUserGroupsParamsSchema, oktaListOktaUserGroupsOutputSchema, oktaListOktaGroupsParamsSchema, oktaListOktaGroupsOutputSchema, oktaGetOktaGroupParamsSchema, oktaGetOktaGroupOutputSchema, oktaListOktaGroupMembersParamsSchema, oktaListOktaGroupMembersOutputSchema, oktaRemoveUserFromGroupParamsSchema, oktaRemoveUserFromGroupOutputSchema, oktaAddUserToGroupParamsSchema, oktaAddUserToGroupOutputSchema, oktaResetPasswordParamsSchema, oktaResetPasswordOutputSchema, oktaResetMFAParamsSchema, oktaResetMFAOutputSchema, oktaListMFAParamsSchema, oktaListMFAOutputSchema, jamfGetJamfUserComputerIdParamsSchema, jamfGetJamfUserComputerIdOutputSchema, jamfLockJamfComputerByIdParamsSchema, jamfLockJamfComputerByIdOutputSchema, oktaTriggerOktaWorkflowParamsSchema, oktaTriggerOktaWorkflowOutputSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchRepositoryOutputSchema, githubSearchRepositoryParamsSchema, githubSearchOrganizationOutputSchema, githubSearchOrganizationParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, googleOauthSearchDriveByQueryOutputSchema, googleOauthSearchDriveByQueryParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentOutputSchema, githubGetFileContentParamsSchema, githubGetFileContentOutputSchema, githubListDirectoryOutputSchema, githubListDirectoryParamsSchema, linearGetIssuesParamsSchema, linearGetIssuesOutputSchema, linearGetIssueDetailsParamsSchema, linearGetIssueDetailsOutputSchema, linearGetProjectDetailsParamsSchema, linearGetProjectDetailsOutputSchema, linearGetTeamDetailsParamsSchema, linearGetTeamDetailsOutputSchema, linearGetProjectsParamsSchema, linearGetProjectsOutputSchema, linearGetTeamsParamsSchema, linearGetTeamsOutputSchema, gitlabGetFileContentParamsSchema, gitlabGetFileContentOutputSchema, } from "./autogen/types.js";
2
2
  import validateAddress from "./providers/googlemaps/validateAddress.js";
3
3
  import add from "./providers/math/add.js";
4
4
  import fillTemplate from "./providers/generic/fillTemplate.js";
@@ -110,6 +110,7 @@ import lockJamfComputerById from "./providers/jamf/lockJamfComputerById.js";
110
110
  import triggerOktaWorkflow from "./providers/okta/triggerOktaWorkflow.js";
111
111
  import searchGroup from "./providers/gitlab/searchGroup.js";
112
112
  import searchRepository from "./providers/github/searchRepository.js";
113
+ import searchOrganization from "./providers/github/searchOrganization.js";
113
114
  import getServiceDesks from "./providers/jira/getServiceDesks.js";
114
115
  import createServiceDeskRequest from "./providers/jira/createServiceDeskRequest.js";
115
116
  import searchSalesforceRecords from "./providers/salesforce/searchSalesforceRecords.js";
@@ -673,6 +674,11 @@ export const ActionMapper = {
673
674
  },
674
675
  },
675
676
  github: {
677
+ searchOrganization: {
678
+ fn: searchOrganization,
679
+ paramsSchema: githubSearchOrganizationParamsSchema,
680
+ outputSchema: githubSearchOrganizationOutputSchema,
681
+ },
676
682
  searchRepository: {
677
683
  fn: searchRepository,
678
684
  paramsSchema: githubSearchRepositoryParamsSchema,
@@ -122,6 +122,7 @@ export declare const githubListPullRequestsDefinition: ActionTemplate;
122
122
  export declare const githubGetFileContentDefinition: ActionTemplate;
123
123
  export declare const githubListDirectoryDefinition: ActionTemplate;
124
124
  export declare const githubSearchRepositoryDefinition: ActionTemplate;
125
+ export declare const githubSearchOrganizationDefinition: ActionTemplate;
125
126
  export declare const notionSearchByTitleDefinition: ActionTemplate;
126
127
  export declare const jamfGetJamfFileVaultRecoveryKeyDefinition: ActionTemplate;
127
128
  export declare const jamfGetJamfComputerInventoryDefinition: ActionTemplate;
@@ -9601,6 +9601,237 @@ export const githubSearchRepositoryDefinition = {
9601
9601
  name: "searchRepository",
9602
9602
  provider: "github",
9603
9603
  };
9604
+ export const githubSearchOrganizationDefinition = {
9605
+ description: "Search for code, issues and pull requests within a GitHub organization",
9606
+ scopes: [],
9607
+ parameters: {
9608
+ type: "object",
9609
+ required: ["organization", "query"],
9610
+ properties: {
9611
+ organization: {
9612
+ type: "string",
9613
+ description: "The organization to search for data in",
9614
+ },
9615
+ query: {
9616
+ type: "string",
9617
+ description: "The query to search for in the repository",
9618
+ },
9619
+ },
9620
+ },
9621
+ output: {
9622
+ type: "object",
9623
+ required: ["code", "commits", "issuesAndPullRequests"],
9624
+ properties: {
9625
+ code: {
9626
+ type: "array",
9627
+ description: "A list of code results that match the query",
9628
+ items: {
9629
+ type: "object",
9630
+ required: ["name", "path", "sha", "url", "score", "textMatches"],
9631
+ properties: {
9632
+ name: {
9633
+ type: "string",
9634
+ description: "The name of the file that had a match",
9635
+ },
9636
+ path: {
9637
+ type: "string",
9638
+ description: "The path of the file that had a match",
9639
+ },
9640
+ sha: {
9641
+ type: "string",
9642
+ description: "The SHA of the commit that had a match",
9643
+ },
9644
+ url: {
9645
+ type: "string",
9646
+ description: "The URL of the file that had a match",
9647
+ },
9648
+ score: {
9649
+ type: "number",
9650
+ description: "The similarity score of the match",
9651
+ },
9652
+ textMatches: {
9653
+ type: "array",
9654
+ description: "A list of text matches that match the query",
9655
+ items: {
9656
+ type: "object",
9657
+ required: ["matches"],
9658
+ properties: {
9659
+ object_url: {
9660
+ type: "string",
9661
+ description: "The URL of the object that had a match",
9662
+ },
9663
+ object_type: {
9664
+ type: "string",
9665
+ description: "The type of the object that had a match",
9666
+ },
9667
+ fragment: {
9668
+ type: "string",
9669
+ description: "The fragment of the text that had a match",
9670
+ },
9671
+ matches: {
9672
+ type: "array",
9673
+ description: "A list of matches that match the query",
9674
+ items: {
9675
+ type: "object",
9676
+ properties: {
9677
+ text: {
9678
+ type: "string",
9679
+ description: "The text that had a match",
9680
+ },
9681
+ indices: {
9682
+ type: "array",
9683
+ description: "The indices of the text that had a match",
9684
+ items: {
9685
+ type: "number",
9686
+ },
9687
+ },
9688
+ },
9689
+ },
9690
+ },
9691
+ },
9692
+ },
9693
+ },
9694
+ },
9695
+ },
9696
+ },
9697
+ commits: {
9698
+ type: "array",
9699
+ description: "A list of commits that match the query",
9700
+ items: {
9701
+ type: "object",
9702
+ required: ["sha", "url", "message", "author", "committer", "parents", "tree", "commitDate"],
9703
+ properties: {
9704
+ sha: {
9705
+ type: "string",
9706
+ description: "The SHA of the commit that had a match",
9707
+ },
9708
+ url: {
9709
+ type: "string",
9710
+ description: "The URL of the commit that had a match",
9711
+ },
9712
+ commit: {
9713
+ type: "object",
9714
+ required: ["message", "author", "score", "files"],
9715
+ properties: {
9716
+ author: {
9717
+ type: "object",
9718
+ required: ["name", "email", "date"],
9719
+ properties: {
9720
+ name: {
9721
+ type: "string",
9722
+ description: "The name of the author",
9723
+ },
9724
+ email: {
9725
+ type: "string",
9726
+ description: "The email of the author",
9727
+ },
9728
+ date: {
9729
+ type: "string",
9730
+ description: "The date of the commit",
9731
+ },
9732
+ },
9733
+ },
9734
+ message: {
9735
+ type: "string",
9736
+ description: "The message of the commit",
9737
+ },
9738
+ },
9739
+ score: {
9740
+ type: "number",
9741
+ description: "The score of the commit",
9742
+ },
9743
+ files: {
9744
+ type: "array",
9745
+ description: "A list of files that match the query",
9746
+ items: {
9747
+ type: "object",
9748
+ required: ["filename", "status", "patch"],
9749
+ properties: {
9750
+ filename: {
9751
+ type: "string",
9752
+ description: "The filename of the file",
9753
+ },
9754
+ status: {
9755
+ type: "string",
9756
+ description: "The status of the file",
9757
+ },
9758
+ patch: {
9759
+ type: "string",
9760
+ description: "The patch of the file",
9761
+ },
9762
+ },
9763
+ },
9764
+ },
9765
+ },
9766
+ },
9767
+ },
9768
+ },
9769
+ issuesAndPullRequests: {
9770
+ type: "array",
9771
+ description: "A list of issues and pull requests that match the query",
9772
+ items: {
9773
+ type: "object",
9774
+ required: ["title", "url", "state", "createdAt", "updatedAt", "user"],
9775
+ properties: {
9776
+ number: {
9777
+ type: "number",
9778
+ description: "The number of the issue or pull request",
9779
+ },
9780
+ title: {
9781
+ type: "string",
9782
+ description: "The title of the issue or pull request",
9783
+ },
9784
+ html_url: {
9785
+ type: "string",
9786
+ description: "The URL of the issue or pull request",
9787
+ },
9788
+ state: {
9789
+ type: "string",
9790
+ description: "The state of the issue or pull request",
9791
+ enum: ["open", "closed"],
9792
+ },
9793
+ isPullRequest: {
9794
+ type: "boolean",
9795
+ description: "Whether the issue or pull request is a pull request",
9796
+ },
9797
+ body: {
9798
+ type: "string",
9799
+ description: "The body of the issue or pull request",
9800
+ },
9801
+ score: {
9802
+ type: "number",
9803
+ description: "The score of the issue or pull request",
9804
+ },
9805
+ files: {
9806
+ type: "array",
9807
+ description: "A list of files that match the query",
9808
+ items: {
9809
+ type: "object",
9810
+ required: ["filename", "status"],
9811
+ properties: {
9812
+ filename: {
9813
+ type: "string",
9814
+ description: "The filename of the file",
9815
+ },
9816
+ status: {
9817
+ type: "string",
9818
+ description: "The status of the file",
9819
+ },
9820
+ patch: {
9821
+ type: "string",
9822
+ description: "The patch of the file",
9823
+ },
9824
+ },
9825
+ },
9826
+ },
9827
+ },
9828
+ },
9829
+ },
9830
+ },
9831
+ },
9832
+ name: "searchOrganization",
9833
+ provider: "github",
9834
+ };
9604
9835
  export const notionSearchByTitleDefinition = {
9605
9836
  description: "Search Notion pages and databases by title",
9606
9837
  scopes: [],
@@ -6451,6 +6451,279 @@ export declare const githubSearchRepositoryOutputSchema: z.ZodObject<{
6451
6451
  }>;
6452
6452
  export type githubSearchRepositoryOutputType = z.infer<typeof githubSearchRepositoryOutputSchema>;
6453
6453
  export type githubSearchRepositoryFunction = ActionFunction<githubSearchRepositoryParamsType, AuthParamsType, githubSearchRepositoryOutputType>;
6454
+ export declare const githubSearchOrganizationParamsSchema: z.ZodObject<{
6455
+ organization: z.ZodString;
6456
+ query: z.ZodString;
6457
+ }, "strip", z.ZodTypeAny, {
6458
+ query: string;
6459
+ organization: string;
6460
+ }, {
6461
+ query: string;
6462
+ organization: string;
6463
+ }>;
6464
+ export type githubSearchOrganizationParamsType = z.infer<typeof githubSearchOrganizationParamsSchema>;
6465
+ export declare const githubSearchOrganizationOutputSchema: z.ZodObject<{
6466
+ code: z.ZodArray<z.ZodObject<{
6467
+ name: z.ZodString;
6468
+ path: z.ZodString;
6469
+ sha: z.ZodString;
6470
+ url: z.ZodString;
6471
+ score: z.ZodNumber;
6472
+ textMatches: z.ZodArray<z.ZodObject<{
6473
+ object_url: z.ZodOptional<z.ZodString>;
6474
+ object_type: z.ZodOptional<z.ZodString>;
6475
+ fragment: z.ZodOptional<z.ZodString>;
6476
+ matches: z.ZodArray<z.ZodObject<{
6477
+ text: z.ZodOptional<z.ZodString>;
6478
+ indices: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
6479
+ }, "strip", z.ZodTypeAny, {
6480
+ text?: string | undefined;
6481
+ indices?: number[] | undefined;
6482
+ }, {
6483
+ text?: string | undefined;
6484
+ indices?: number[] | undefined;
6485
+ }>, "many">;
6486
+ }, "strip", z.ZodTypeAny, {
6487
+ matches: {
6488
+ text?: string | undefined;
6489
+ indices?: number[] | undefined;
6490
+ }[];
6491
+ object_url?: string | undefined;
6492
+ object_type?: string | undefined;
6493
+ fragment?: string | undefined;
6494
+ }, {
6495
+ matches: {
6496
+ text?: string | undefined;
6497
+ indices?: number[] | undefined;
6498
+ }[];
6499
+ object_url?: string | undefined;
6500
+ object_type?: string | undefined;
6501
+ fragment?: string | undefined;
6502
+ }>, "many">;
6503
+ }, "strip", z.ZodTypeAny, {
6504
+ path: string;
6505
+ name: string;
6506
+ url: string;
6507
+ sha: string;
6508
+ score: number;
6509
+ textMatches: {
6510
+ matches: {
6511
+ text?: string | undefined;
6512
+ indices?: number[] | undefined;
6513
+ }[];
6514
+ object_url?: string | undefined;
6515
+ object_type?: string | undefined;
6516
+ fragment?: string | undefined;
6517
+ }[];
6518
+ }, {
6519
+ path: string;
6520
+ name: string;
6521
+ url: string;
6522
+ sha: string;
6523
+ score: number;
6524
+ textMatches: {
6525
+ matches: {
6526
+ text?: string | undefined;
6527
+ indices?: number[] | undefined;
6528
+ }[];
6529
+ object_url?: string | undefined;
6530
+ object_type?: string | undefined;
6531
+ fragment?: string | undefined;
6532
+ }[];
6533
+ }>, "many">;
6534
+ commits: z.ZodArray<z.ZodObject<{
6535
+ sha: z.ZodString;
6536
+ url: z.ZodString;
6537
+ commit: z.ZodOptional<z.ZodObject<{
6538
+ author: z.ZodObject<{
6539
+ name: z.ZodString;
6540
+ email: z.ZodString;
6541
+ date: z.ZodString;
6542
+ }, "strip", z.ZodTypeAny, {
6543
+ date: string;
6544
+ name: string;
6545
+ email: string;
6546
+ }, {
6547
+ date: string;
6548
+ name: string;
6549
+ email: string;
6550
+ }>;
6551
+ message: z.ZodString;
6552
+ }, "strip", z.ZodTypeAny, {
6553
+ message: string;
6554
+ author: {
6555
+ date: string;
6556
+ name: string;
6557
+ email: string;
6558
+ };
6559
+ }, {
6560
+ message: string;
6561
+ author: {
6562
+ date: string;
6563
+ name: string;
6564
+ email: string;
6565
+ };
6566
+ }>>;
6567
+ }, "strip", z.ZodTypeAny, {
6568
+ url: string;
6569
+ sha: string;
6570
+ commit?: {
6571
+ message: string;
6572
+ author: {
6573
+ date: string;
6574
+ name: string;
6575
+ email: string;
6576
+ };
6577
+ } | undefined;
6578
+ }, {
6579
+ url: string;
6580
+ sha: string;
6581
+ commit?: {
6582
+ message: string;
6583
+ author: {
6584
+ date: string;
6585
+ name: string;
6586
+ email: string;
6587
+ };
6588
+ } | undefined;
6589
+ }>, "many">;
6590
+ issuesAndPullRequests: z.ZodArray<z.ZodObject<{
6591
+ number: z.ZodOptional<z.ZodNumber>;
6592
+ title: z.ZodString;
6593
+ html_url: z.ZodOptional<z.ZodString>;
6594
+ state: z.ZodEnum<["open", "closed"]>;
6595
+ isPullRequest: z.ZodOptional<z.ZodBoolean>;
6596
+ body: z.ZodOptional<z.ZodString>;
6597
+ score: z.ZodOptional<z.ZodNumber>;
6598
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
6599
+ filename: z.ZodString;
6600
+ status: z.ZodString;
6601
+ patch: z.ZodOptional<z.ZodString>;
6602
+ }, "strip", z.ZodTypeAny, {
6603
+ status: string;
6604
+ filename: string;
6605
+ patch?: string | undefined;
6606
+ }, {
6607
+ status: string;
6608
+ filename: string;
6609
+ patch?: string | undefined;
6610
+ }>, "many">>;
6611
+ }, "strip", z.ZodTypeAny, {
6612
+ title: string;
6613
+ state: "open" | "closed";
6614
+ number?: number | undefined;
6615
+ body?: string | undefined;
6616
+ files?: {
6617
+ status: string;
6618
+ filename: string;
6619
+ patch?: string | undefined;
6620
+ }[] | undefined;
6621
+ score?: number | undefined;
6622
+ html_url?: string | undefined;
6623
+ isPullRequest?: boolean | undefined;
6624
+ }, {
6625
+ title: string;
6626
+ state: "open" | "closed";
6627
+ number?: number | undefined;
6628
+ body?: string | undefined;
6629
+ files?: {
6630
+ status: string;
6631
+ filename: string;
6632
+ patch?: string | undefined;
6633
+ }[] | undefined;
6634
+ score?: number | undefined;
6635
+ html_url?: string | undefined;
6636
+ isPullRequest?: boolean | undefined;
6637
+ }>, "many">;
6638
+ }, "strip", z.ZodTypeAny, {
6639
+ code: {
6640
+ path: string;
6641
+ name: string;
6642
+ url: string;
6643
+ sha: string;
6644
+ score: number;
6645
+ textMatches: {
6646
+ matches: {
6647
+ text?: string | undefined;
6648
+ indices?: number[] | undefined;
6649
+ }[];
6650
+ object_url?: string | undefined;
6651
+ object_type?: string | undefined;
6652
+ fragment?: string | undefined;
6653
+ }[];
6654
+ }[];
6655
+ commits: {
6656
+ url: string;
6657
+ sha: string;
6658
+ commit?: {
6659
+ message: string;
6660
+ author: {
6661
+ date: string;
6662
+ name: string;
6663
+ email: string;
6664
+ };
6665
+ } | undefined;
6666
+ }[];
6667
+ issuesAndPullRequests: {
6668
+ title: string;
6669
+ state: "open" | "closed";
6670
+ number?: number | undefined;
6671
+ body?: string | undefined;
6672
+ files?: {
6673
+ status: string;
6674
+ filename: string;
6675
+ patch?: string | undefined;
6676
+ }[] | undefined;
6677
+ score?: number | undefined;
6678
+ html_url?: string | undefined;
6679
+ isPullRequest?: boolean | undefined;
6680
+ }[];
6681
+ }, {
6682
+ code: {
6683
+ path: string;
6684
+ name: string;
6685
+ url: string;
6686
+ sha: string;
6687
+ score: number;
6688
+ textMatches: {
6689
+ matches: {
6690
+ text?: string | undefined;
6691
+ indices?: number[] | undefined;
6692
+ }[];
6693
+ object_url?: string | undefined;
6694
+ object_type?: string | undefined;
6695
+ fragment?: string | undefined;
6696
+ }[];
6697
+ }[];
6698
+ commits: {
6699
+ url: string;
6700
+ sha: string;
6701
+ commit?: {
6702
+ message: string;
6703
+ author: {
6704
+ date: string;
6705
+ name: string;
6706
+ email: string;
6707
+ };
6708
+ } | undefined;
6709
+ }[];
6710
+ issuesAndPullRequests: {
6711
+ title: string;
6712
+ state: "open" | "closed";
6713
+ number?: number | undefined;
6714
+ body?: string | undefined;
6715
+ files?: {
6716
+ status: string;
6717
+ filename: string;
6718
+ patch?: string | undefined;
6719
+ }[] | undefined;
6720
+ score?: number | undefined;
6721
+ html_url?: string | undefined;
6722
+ isPullRequest?: boolean | undefined;
6723
+ }[];
6724
+ }>;
6725
+ export type githubSearchOrganizationOutputType = z.infer<typeof githubSearchOrganizationOutputSchema>;
6726
+ export type githubSearchOrganizationFunction = ActionFunction<githubSearchOrganizationParamsType, AuthParamsType, githubSearchOrganizationOutputType>;
6454
6727
  export declare const notionSearchByTitleParamsSchema: z.ZodObject<{
6455
6728
  query: z.ZodString;
6456
6729
  }, "strip", z.ZodTypeAny, {
@@ -3383,6 +3383,69 @@ export const githubSearchRepositoryOutputSchema = z.object({
3383
3383
  }))
3384
3384
  .describe("A list of issues and pull requests that match the query"),
3385
3385
  });
3386
+ export const githubSearchOrganizationParamsSchema = z.object({
3387
+ organization: z.string().describe("The organization to search for data in"),
3388
+ query: z.string().describe("The query to search for in the repository"),
3389
+ });
3390
+ export const githubSearchOrganizationOutputSchema = z.object({
3391
+ code: z
3392
+ .array(z.object({
3393
+ name: z.string().describe("The name of the file that had a match"),
3394
+ path: z.string().describe("The path of the file that had a match"),
3395
+ sha: z.string().describe("The SHA of the commit that had a match"),
3396
+ url: z.string().describe("The URL of the file that had a match"),
3397
+ score: z.number().describe("The similarity score of the match"),
3398
+ textMatches: z
3399
+ .array(z.object({
3400
+ object_url: z.string().describe("The URL of the object that had a match").optional(),
3401
+ object_type: z.string().describe("The type of the object that had a match").optional(),
3402
+ fragment: z.string().describe("The fragment of the text that had a match").optional(),
3403
+ matches: z
3404
+ .array(z.object({
3405
+ text: z.string().describe("The text that had a match").optional(),
3406
+ indices: z.array(z.number()).describe("The indices of the text that had a match").optional(),
3407
+ }))
3408
+ .describe("A list of matches that match the query"),
3409
+ }))
3410
+ .describe("A list of text matches that match the query"),
3411
+ }))
3412
+ .describe("A list of code results that match the query"),
3413
+ commits: z
3414
+ .array(z.object({
3415
+ sha: z.string().describe("The SHA of the commit that had a match"),
3416
+ url: z.string().describe("The URL of the commit that had a match"),
3417
+ commit: z
3418
+ .object({
3419
+ author: z.object({
3420
+ name: z.string().describe("The name of the author"),
3421
+ email: z.string().describe("The email of the author"),
3422
+ date: z.string().describe("The date of the commit"),
3423
+ }),
3424
+ message: z.string().describe("The message of the commit"),
3425
+ })
3426
+ .optional(),
3427
+ }))
3428
+ .describe("A list of commits that match the query"),
3429
+ issuesAndPullRequests: z
3430
+ .array(z.object({
3431
+ number: z.number().describe("The number of the issue or pull request").optional(),
3432
+ title: z.string().describe("The title of the issue or pull request"),
3433
+ html_url: z.string().describe("The URL of the issue or pull request").optional(),
3434
+ state: z.enum(["open", "closed"]).describe("The state of the issue or pull request"),
3435
+ isPullRequest: z.boolean().describe("Whether the issue or pull request is a pull request").optional(),
3436
+ body: z.string().describe("The body of the issue or pull request").optional(),
3437
+ score: z.number().describe("The score of the issue or pull request").optional(),
3438
+ files: z
3439
+ .array(z.object({
3440
+ filename: z.string().describe("The filename of the file"),
3441
+ status: z.string().describe("The status of the file"),
3442
+ patch: z.string().describe("The patch of the file").optional(),
3443
+ }))
3444
+ .describe("A list of files that match the query")
3445
+ .optional(),
3446
+ }))
3447
+ .describe("A list of issues and pull requests that match the query"),
3448
+ });
3386
3449
  export const notionSearchByTitleParamsSchema = z.object({
3387
3450
  query: z.string().describe("The query to search for in Notion titles"),
3388
3451
  });
@@ -0,0 +1,3 @@
1
+ import type { githubSearchOrganizationFunction } from "../../autogen/types.js";
2
+ declare const searchOrganization: githubSearchOrganizationFunction;
3
+ export default searchOrganization;
@@ -0,0 +1,143 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
11
+ // Limits on the number of results to return
12
+ const MAX_CODE_RESULTS = 15;
13
+ const MAX_COMMITS = 10;
14
+ const MAX_FILES_PER_COMMIT = 5;
15
+ const MAX_ISSUES_OR_PRS = 10;
16
+ const MAX_FILES_PER_PR = 5;
17
+ const MAX_PATCH_LINES = 20;
18
+ const MAX_FRAGMENT_LINES = 20;
19
+ const searchOrganization = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
20
+ const { Octokit } = yield import("octokit");
21
+ if (!authParams.authToken) {
22
+ throw new Error(MISSING_AUTH_TOKEN);
23
+ }
24
+ const octokit = new Octokit({ auth: authParams.authToken });
25
+ const { organization, query } = params;
26
+ // Search CODE with text match metadata
27
+ const codeResultsResponse = yield octokit.rest.search.code({
28
+ q: `${query} in:file,path org:${organization}`,
29
+ text_match: true,
30
+ headers: {
31
+ accept: "application/vnd.github.v3.text-match+json",
32
+ },
33
+ });
34
+ const codeResults = codeResultsResponse.data.items.slice(0, MAX_CODE_RESULTS).map(item => ({
35
+ name: item.name,
36
+ path: item.path,
37
+ sha: item.sha.slice(0, 7),
38
+ url: item.url,
39
+ score: item.score,
40
+ textMatches: item.text_matches
41
+ ? item.text_matches.map(match => {
42
+ var _a, _b, _c, _d;
43
+ return ({
44
+ object_url: (_a = match.object_url) !== null && _a !== void 0 ? _a : undefined,
45
+ object_type: (_b = match.object_type) !== null && _b !== void 0 ? _b : undefined,
46
+ fragment: (_c = match.fragment) === null || _c === void 0 ? void 0 : _c.split("\n").slice(0, MAX_FRAGMENT_LINES).join("\n"),
47
+ matches: (_d = match.matches) !== null && _d !== void 0 ? _d : [],
48
+ });
49
+ })
50
+ : [],
51
+ }));
52
+ // Search COMMITS
53
+ const commitResults = yield octokit.rest.search.commits({
54
+ q: `${query} org:${organization}`,
55
+ headers: {
56
+ accept: "application/vnd.github.cloak-preview+json",
57
+ },
58
+ });
59
+ const commitDetails = yield Promise.all(commitResults.data.items.slice(0, MAX_COMMITS).map(item => {
60
+ // Get the repo details from the commit search result
61
+ const { owner, name } = item.repository;
62
+ return octokit.rest.repos.getCommit({ owner: owner.login, repo: name, ref: item.sha });
63
+ }));
64
+ const enrichedCommits = commitResults.data.items.slice(0, MAX_COMMITS).map(item => {
65
+ var _a, _b;
66
+ const full = commitDetails.find(c => c.data.sha === item.sha);
67
+ return {
68
+ sha: item.sha,
69
+ url: item.url,
70
+ commit: {
71
+ message: item.commit.message,
72
+ author: item.commit.author,
73
+ },
74
+ score: item.score,
75
+ author: (_a = item.author) !== null && _a !== void 0 ? _a : undefined,
76
+ files: ((_b = full === null || full === void 0 ? void 0 : full.data.files) === null || _b === void 0 ? void 0 : _b.slice(0, MAX_FILES_PER_COMMIT).map(f => {
77
+ var _a;
78
+ return ({
79
+ filename: f.filename,
80
+ status: f.status,
81
+ patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).join("\n"),
82
+ });
83
+ })) || [],
84
+ };
85
+ });
86
+ // Search Issues and PRs
87
+ const issueResults = yield octokit.rest.search.issuesAndPullRequests({
88
+ q: `${query} org:${organization} (is:issue OR is:pull-request)`,
89
+ advanced_search: "true",
90
+ });
91
+ const prItems = issueResults.data.items.filter(item => item.pull_request).slice(0, MAX_ISSUES_OR_PRS);
92
+ const prNumbers = prItems.map(item => item.number);
93
+ const prFiles = yield Promise.all(prItems.map((item) => __awaiter(void 0, void 0, void 0, function* () {
94
+ // Each item has a 'repository_url' like: "https://api.github.com/repos/ORG/REPO"
95
+ const repoUrlParts = item.repository_url.split("/");
96
+ const owner = repoUrlParts[repoUrlParts.length - 2];
97
+ const repo = repoUrlParts[repoUrlParts.length - 1];
98
+ try {
99
+ return yield octokit.rest.pulls.listFiles({ owner, repo, pull_number: item.number });
100
+ }
101
+ catch (error) {
102
+ console.error(`Error fetching PR files for PR ${item.number} in ${owner}/${repo}:`, error);
103
+ return { data: [] };
104
+ }
105
+ })));
106
+ const issuesAndPRs = issueResults.data.items
107
+ .slice(0, MAX_ISSUES_OR_PRS)
108
+ .map(item => {
109
+ var _a, _b, _c, _d;
110
+ const isPR = !!item.pull_request;
111
+ const prIndex = prNumbers.indexOf(item.number);
112
+ const files = isPR && prIndex !== -1
113
+ ? prFiles[prIndex].data.slice(0, MAX_FILES_PER_PR).map(f => {
114
+ var _a;
115
+ return ({
116
+ filename: f.filename,
117
+ status: f.status,
118
+ patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).join("\n"),
119
+ });
120
+ })
121
+ : undefined;
122
+ return {
123
+ number: item.number,
124
+ title: item.title,
125
+ html_url: item.html_url,
126
+ state: item.state,
127
+ isPullRequest: isPR,
128
+ body: item.body,
129
+ user: {
130
+ email: (_b = (_a = item.user) === null || _a === void 0 ? void 0 : _a.email) !== null && _b !== void 0 ? _b : undefined,
131
+ name: (_d = (_c = item.user) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : undefined,
132
+ },
133
+ score: item.score,
134
+ files,
135
+ };
136
+ });
137
+ return {
138
+ code: codeResults,
139
+ commits: enrichedCommits,
140
+ issuesAndPullRequests: issuesAndPRs,
141
+ };
142
+ });
143
+ export default searchOrganization;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.2.56",
3
+ "version": "0.2.58",
4
4
  "type": "module",
5
5
  "description": "AI Actions by Credal AI",
6
6
  "sideEffects": false,
@@ -62,7 +62,7 @@
62
62
  "node-forge": "^1.3.1",
63
63
  "octokit": "^4.1.2",
64
64
  "pdf2json": "^3.1.6",
65
- "resend": "^4.1.2",
65
+ "resend": "^4.7.0",
66
66
  "snowflake-sdk": "^2.0.2",
67
67
  "ts-node": "^10.9.2",
68
68
  "uuid": "^11.1.0",