@credal/actions 0.2.20 → 0.2.21

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, 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, } 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, 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, } 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";
@@ -108,6 +108,7 @@ import archiveChannel from "./providers/slack/archiveChannel.js";
108
108
  import getJamfUserComputerId from "./providers/jamf/getJamfUserComputerId.js";
109
109
  import lockJamfComputerById from "./providers/jamf/lockJamfComputerById.js";
110
110
  import triggerOktaWorkflow from "./providers/okta/triggerOktaWorkflow.js";
111
+ import searchGroup from "./providers/gitlab/searchGroup.js";
111
112
  export const ActionMapper = {
112
113
  generic: {
113
114
  fillTemplate: {
@@ -714,4 +715,11 @@ export const ActionMapper = {
714
715
  outputSchema: oktaTriggerOktaWorkflowOutputSchema,
715
716
  },
716
717
  },
718
+ gitlab: {
719
+ searchGroup: {
720
+ fn: searchGroup,
721
+ paramsSchema: gitlabSearchGroupParamsSchema,
722
+ outputSchema: gitlabSearchGroupOutputSchema,
723
+ },
724
+ },
717
725
  };
@@ -109,3 +109,4 @@ export declare const jamfGetJamfFileVaultRecoveryKeyDefinition: ActionTemplate;
109
109
  export declare const jamfGetJamfComputerInventoryDefinition: ActionTemplate;
110
110
  export declare const jamfGetJamfUserComputerIdDefinition: ActionTemplate;
111
111
  export declare const jamfLockJamfComputerByIdDefinition: ActionTemplate;
112
+ export declare const gitlabSearchGroupDefinition: ActionTemplate;
@@ -8541,3 +8541,192 @@ export const jamfLockJamfComputerByIdDefinition = {
8541
8541
  name: "lockJamfComputerById",
8542
8542
  provider: "jamf",
8543
8543
  };
8544
+ export const gitlabSearchGroupDefinition = {
8545
+ description: "Searches gitlab for details about a query. This will return a list of merge requests and blobs that match the query.",
8546
+ scopes: [],
8547
+ parameters: {
8548
+ type: "object",
8549
+ required: ["query", "groupId"],
8550
+ properties: {
8551
+ query: {
8552
+ type: "string",
8553
+ description: "The query that will be used to search gitlab blobs and merge requests",
8554
+ },
8555
+ groupId: {
8556
+ type: "string",
8557
+ description: "The group ID of the project to search in",
8558
+ },
8559
+ },
8560
+ },
8561
+ output: {
8562
+ type: "object",
8563
+ required: ["mergeRequests", "blobs"],
8564
+ properties: {
8565
+ mergeRequests: {
8566
+ type: "array",
8567
+ description: "A list of merge requests that match the query",
8568
+ items: {
8569
+ type: "object",
8570
+ required: ["metadata", "diffs"],
8571
+ properties: {
8572
+ metadata: {
8573
+ type: "object",
8574
+ required: ["id", "iid", "project_id", "title", "web_url"],
8575
+ description: "The metadata of the merge request",
8576
+ properties: {
8577
+ id: {
8578
+ type: "number",
8579
+ description: "The ID of the merge request",
8580
+ },
8581
+ iid: {
8582
+ type: "number",
8583
+ description: "The internal ID of the merge request",
8584
+ },
8585
+ project_id: {
8586
+ type: "number",
8587
+ description: "The ID of the project the merge request belongs to",
8588
+ },
8589
+ title: {
8590
+ type: "string",
8591
+ description: "The title of the merge request",
8592
+ },
8593
+ web_url: {
8594
+ type: "string",
8595
+ description: "The URL of the merge request",
8596
+ },
8597
+ description: {
8598
+ type: "string",
8599
+ description: "The description of the merge request",
8600
+ },
8601
+ author: {
8602
+ type: "object",
8603
+ description: "The author of the merge request",
8604
+ properties: {
8605
+ name: {
8606
+ type: "string",
8607
+ description: "The name of the author",
8608
+ },
8609
+ },
8610
+ },
8611
+ merged_at: {
8612
+ type: "string",
8613
+ description: "The date and time the merge request was merged",
8614
+ },
8615
+ },
8616
+ },
8617
+ diffs: {
8618
+ type: "array",
8619
+ description: "A list of diffs that match the query",
8620
+ items: {
8621
+ type: "object",
8622
+ required: ["old_path", "new_path", "diff", "new_file", "renamed_file", "deleted_file"],
8623
+ properties: {
8624
+ old_path: {
8625
+ type: "string",
8626
+ description: "The old path of the diff",
8627
+ },
8628
+ new_path: {
8629
+ type: "string",
8630
+ description: "The new path of the diff",
8631
+ },
8632
+ diff: {
8633
+ type: "string",
8634
+ description: "The contents of the diff",
8635
+ },
8636
+ new_file: {
8637
+ type: "boolean",
8638
+ description: "Whether the diff is a new file",
8639
+ },
8640
+ renamed_file: {
8641
+ type: "boolean",
8642
+ description: "Whether the diff is a renamed file",
8643
+ },
8644
+ deleted_file: {
8645
+ type: "boolean",
8646
+ description: "Whether the diff is a deleted file",
8647
+ },
8648
+ too_large: {
8649
+ type: "boolean",
8650
+ description: "Whether the diff is too large",
8651
+ },
8652
+ },
8653
+ },
8654
+ },
8655
+ },
8656
+ },
8657
+ },
8658
+ blobs: {
8659
+ type: "array",
8660
+ description: "A list of blobs that match the query",
8661
+ items: {
8662
+ type: "object",
8663
+ required: ["metadata", "diffs"],
8664
+ properties: {
8665
+ metadata: {
8666
+ type: "object",
8667
+ required: ["path", "basename", "data", "project_id", "ref", "startline", "filename"],
8668
+ properties: {
8669
+ path: {
8670
+ type: "string",
8671
+ description: "The path of the blob",
8672
+ },
8673
+ basename: {
8674
+ type: "string",
8675
+ description: "The basename of the blob",
8676
+ },
8677
+ data: {
8678
+ type: "string",
8679
+ description: "The data of the blob",
8680
+ },
8681
+ project_id: {
8682
+ type: "number",
8683
+ description: "The ID of the project the blob belongs to",
8684
+ },
8685
+ ref: {
8686
+ type: "string",
8687
+ description: "The ref of the blob",
8688
+ },
8689
+ startline: {
8690
+ type: "number",
8691
+ description: "The start line of the blob",
8692
+ },
8693
+ filename: {
8694
+ type: "string",
8695
+ description: "The filename of the blob",
8696
+ },
8697
+ },
8698
+ },
8699
+ matchedMergeRequests: {
8700
+ type: "array",
8701
+ description: "A list of merge requests that match the blob",
8702
+ items: {
8703
+ type: "object",
8704
+ required: ["title", "web_url"],
8705
+ properties: {
8706
+ title: {
8707
+ type: "string",
8708
+ description: "The title of the merge request",
8709
+ },
8710
+ web_url: {
8711
+ type: "string",
8712
+ description: "The URL of the merge request",
8713
+ },
8714
+ author: {
8715
+ type: "object",
8716
+ description: "The author of the merge request",
8717
+ },
8718
+ merged_at: {
8719
+ type: "string",
8720
+ description: "The date and time the merge request was merged",
8721
+ },
8722
+ },
8723
+ },
8724
+ },
8725
+ },
8726
+ },
8727
+ },
8728
+ },
8729
+ },
8730
+ name: "searchGroup",
8731
+ provider: "gitlab",
8732
+ };
@@ -29,7 +29,8 @@ export declare enum ProviderName {
29
29
  MICROSOFT = "microsoft",
30
30
  GITHUB = "github",
31
31
  NOTION = "notion",
32
- JAMF = "jamf"
32
+ JAMF = "jamf",
33
+ GITLAB = "gitlab"
33
34
  }
34
35
  export type ActionFunction<P, A, O> = (input: {
35
36
  params: P;
@@ -5464,3 +5465,284 @@ export declare const jamfLockJamfComputerByIdOutputSchema: z.ZodObject<{
5464
5465
  }>;
5465
5466
  export type jamfLockJamfComputerByIdOutputType = z.infer<typeof jamfLockJamfComputerByIdOutputSchema>;
5466
5467
  export type jamfLockJamfComputerByIdFunction = ActionFunction<jamfLockJamfComputerByIdParamsType, AuthParamsType, jamfLockJamfComputerByIdOutputType>;
5468
+ export declare const gitlabSearchGroupParamsSchema: z.ZodObject<{
5469
+ query: z.ZodString;
5470
+ groupId: z.ZodString;
5471
+ }, "strip", z.ZodTypeAny, {
5472
+ query: string;
5473
+ groupId: string;
5474
+ }, {
5475
+ query: string;
5476
+ groupId: string;
5477
+ }>;
5478
+ export type gitlabSearchGroupParamsType = z.infer<typeof gitlabSearchGroupParamsSchema>;
5479
+ export declare const gitlabSearchGroupOutputSchema: z.ZodObject<{
5480
+ mergeRequests: z.ZodArray<z.ZodObject<{
5481
+ metadata: z.ZodObject<{
5482
+ id: z.ZodNumber;
5483
+ iid: z.ZodNumber;
5484
+ project_id: z.ZodNumber;
5485
+ title: z.ZodString;
5486
+ web_url: z.ZodString;
5487
+ description: z.ZodOptional<z.ZodString>;
5488
+ author: z.ZodOptional<z.ZodObject<{
5489
+ name: z.ZodOptional<z.ZodString>;
5490
+ }, "strip", z.ZodTypeAny, {
5491
+ name?: string | undefined;
5492
+ }, {
5493
+ name?: string | undefined;
5494
+ }>>;
5495
+ merged_at: z.ZodOptional<z.ZodString>;
5496
+ }, "strip", z.ZodTypeAny, {
5497
+ id: number;
5498
+ title: string;
5499
+ iid: number;
5500
+ project_id: number;
5501
+ web_url: string;
5502
+ description?: string | undefined;
5503
+ author?: {
5504
+ name?: string | undefined;
5505
+ } | undefined;
5506
+ merged_at?: string | undefined;
5507
+ }, {
5508
+ id: number;
5509
+ title: string;
5510
+ iid: number;
5511
+ project_id: number;
5512
+ web_url: string;
5513
+ description?: string | undefined;
5514
+ author?: {
5515
+ name?: string | undefined;
5516
+ } | undefined;
5517
+ merged_at?: string | undefined;
5518
+ }>;
5519
+ diffs: z.ZodArray<z.ZodObject<{
5520
+ old_path: z.ZodString;
5521
+ new_path: z.ZodString;
5522
+ diff: z.ZodString;
5523
+ new_file: z.ZodBoolean;
5524
+ renamed_file: z.ZodBoolean;
5525
+ deleted_file: z.ZodBoolean;
5526
+ too_large: z.ZodOptional<z.ZodBoolean>;
5527
+ }, "strip", z.ZodTypeAny, {
5528
+ old_path: string;
5529
+ new_path: string;
5530
+ diff: string;
5531
+ new_file: boolean;
5532
+ renamed_file: boolean;
5533
+ deleted_file: boolean;
5534
+ too_large?: boolean | undefined;
5535
+ }, {
5536
+ old_path: string;
5537
+ new_path: string;
5538
+ diff: string;
5539
+ new_file: boolean;
5540
+ renamed_file: boolean;
5541
+ deleted_file: boolean;
5542
+ too_large?: boolean | undefined;
5543
+ }>, "many">;
5544
+ }, "strip", z.ZodTypeAny, {
5545
+ metadata: {
5546
+ id: number;
5547
+ title: string;
5548
+ iid: number;
5549
+ project_id: number;
5550
+ web_url: string;
5551
+ description?: string | undefined;
5552
+ author?: {
5553
+ name?: string | undefined;
5554
+ } | undefined;
5555
+ merged_at?: string | undefined;
5556
+ };
5557
+ diffs: {
5558
+ old_path: string;
5559
+ new_path: string;
5560
+ diff: string;
5561
+ new_file: boolean;
5562
+ renamed_file: boolean;
5563
+ deleted_file: boolean;
5564
+ too_large?: boolean | undefined;
5565
+ }[];
5566
+ }, {
5567
+ metadata: {
5568
+ id: number;
5569
+ title: string;
5570
+ iid: number;
5571
+ project_id: number;
5572
+ web_url: string;
5573
+ description?: string | undefined;
5574
+ author?: {
5575
+ name?: string | undefined;
5576
+ } | undefined;
5577
+ merged_at?: string | undefined;
5578
+ };
5579
+ diffs: {
5580
+ old_path: string;
5581
+ new_path: string;
5582
+ diff: string;
5583
+ new_file: boolean;
5584
+ renamed_file: boolean;
5585
+ deleted_file: boolean;
5586
+ too_large?: boolean | undefined;
5587
+ }[];
5588
+ }>, "many">;
5589
+ blobs: z.ZodArray<z.ZodObject<{
5590
+ metadata: z.ZodObject<{
5591
+ path: z.ZodString;
5592
+ basename: z.ZodString;
5593
+ data: z.ZodString;
5594
+ project_id: z.ZodNumber;
5595
+ ref: z.ZodString;
5596
+ startline: z.ZodNumber;
5597
+ filename: z.ZodString;
5598
+ }, "strip", z.ZodTypeAny, {
5599
+ path: string;
5600
+ data: string;
5601
+ project_id: number;
5602
+ basename: string;
5603
+ ref: string;
5604
+ startline: number;
5605
+ filename: string;
5606
+ }, {
5607
+ path: string;
5608
+ data: string;
5609
+ project_id: number;
5610
+ basename: string;
5611
+ ref: string;
5612
+ startline: number;
5613
+ filename: string;
5614
+ }>;
5615
+ matchedMergeRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
5616
+ title: z.ZodString;
5617
+ web_url: z.ZodString;
5618
+ author: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodAny, z.objectOutputType<{}, z.ZodAny, "strip">, z.objectInputType<{}, z.ZodAny, "strip">>>;
5619
+ merged_at: z.ZodOptional<z.ZodString>;
5620
+ }, "strip", z.ZodTypeAny, {
5621
+ title: string;
5622
+ web_url: string;
5623
+ author?: z.objectOutputType<{}, z.ZodAny, "strip"> | undefined;
5624
+ merged_at?: string | undefined;
5625
+ }, {
5626
+ title: string;
5627
+ web_url: string;
5628
+ author?: z.objectInputType<{}, z.ZodAny, "strip"> | undefined;
5629
+ merged_at?: string | undefined;
5630
+ }>, "many">>;
5631
+ }, "strip", z.ZodTypeAny, {
5632
+ metadata: {
5633
+ path: string;
5634
+ data: string;
5635
+ project_id: number;
5636
+ basename: string;
5637
+ ref: string;
5638
+ startline: number;
5639
+ filename: string;
5640
+ };
5641
+ matchedMergeRequests?: {
5642
+ title: string;
5643
+ web_url: string;
5644
+ author?: z.objectOutputType<{}, z.ZodAny, "strip"> | undefined;
5645
+ merged_at?: string | undefined;
5646
+ }[] | undefined;
5647
+ }, {
5648
+ metadata: {
5649
+ path: string;
5650
+ data: string;
5651
+ project_id: number;
5652
+ basename: string;
5653
+ ref: string;
5654
+ startline: number;
5655
+ filename: string;
5656
+ };
5657
+ matchedMergeRequests?: {
5658
+ title: string;
5659
+ web_url: string;
5660
+ author?: z.objectInputType<{}, z.ZodAny, "strip"> | undefined;
5661
+ merged_at?: string | undefined;
5662
+ }[] | undefined;
5663
+ }>, "many">;
5664
+ }, "strip", z.ZodTypeAny, {
5665
+ mergeRequests: {
5666
+ metadata: {
5667
+ id: number;
5668
+ title: string;
5669
+ iid: number;
5670
+ project_id: number;
5671
+ web_url: string;
5672
+ description?: string | undefined;
5673
+ author?: {
5674
+ name?: string | undefined;
5675
+ } | undefined;
5676
+ merged_at?: string | undefined;
5677
+ };
5678
+ diffs: {
5679
+ old_path: string;
5680
+ new_path: string;
5681
+ diff: string;
5682
+ new_file: boolean;
5683
+ renamed_file: boolean;
5684
+ deleted_file: boolean;
5685
+ too_large?: boolean | undefined;
5686
+ }[];
5687
+ }[];
5688
+ blobs: {
5689
+ metadata: {
5690
+ path: string;
5691
+ data: string;
5692
+ project_id: number;
5693
+ basename: string;
5694
+ ref: string;
5695
+ startline: number;
5696
+ filename: string;
5697
+ };
5698
+ matchedMergeRequests?: {
5699
+ title: string;
5700
+ web_url: string;
5701
+ author?: z.objectOutputType<{}, z.ZodAny, "strip"> | undefined;
5702
+ merged_at?: string | undefined;
5703
+ }[] | undefined;
5704
+ }[];
5705
+ }, {
5706
+ mergeRequests: {
5707
+ metadata: {
5708
+ id: number;
5709
+ title: string;
5710
+ iid: number;
5711
+ project_id: number;
5712
+ web_url: string;
5713
+ description?: string | undefined;
5714
+ author?: {
5715
+ name?: string | undefined;
5716
+ } | undefined;
5717
+ merged_at?: string | undefined;
5718
+ };
5719
+ diffs: {
5720
+ old_path: string;
5721
+ new_path: string;
5722
+ diff: string;
5723
+ new_file: boolean;
5724
+ renamed_file: boolean;
5725
+ deleted_file: boolean;
5726
+ too_large?: boolean | undefined;
5727
+ }[];
5728
+ }[];
5729
+ blobs: {
5730
+ metadata: {
5731
+ path: string;
5732
+ data: string;
5733
+ project_id: number;
5734
+ basename: string;
5735
+ ref: string;
5736
+ startline: number;
5737
+ filename: string;
5738
+ };
5739
+ matchedMergeRequests?: {
5740
+ title: string;
5741
+ web_url: string;
5742
+ author?: z.objectInputType<{}, z.ZodAny, "strip"> | undefined;
5743
+ merged_at?: string | undefined;
5744
+ }[] | undefined;
5745
+ }[];
5746
+ }>;
5747
+ export type gitlabSearchGroupOutputType = z.infer<typeof gitlabSearchGroupOutputSchema>;
5748
+ export type gitlabSearchGroupFunction = ActionFunction<gitlabSearchGroupParamsType, AuthParamsType, gitlabSearchGroupOutputType>;
@@ -31,6 +31,7 @@ export var ProviderName;
31
31
  ProviderName["GITHUB"] = "github";
32
32
  ProviderName["NOTION"] = "notion";
33
33
  ProviderName["JAMF"] = "jamf";
34
+ ProviderName["GITLAB"] = "gitlab";
34
35
  })(ProviderName || (ProviderName = {}));
35
36
  export const AuthParamsSchema = z.object({
36
37
  authToken: z.string().optional(),
@@ -3076,3 +3077,61 @@ export const jamfLockJamfComputerByIdOutputSchema = z.object({
3076
3077
  success: z.boolean().describe("Whether the lock command was successful"),
3077
3078
  error: z.string().describe("Error message if the lock command failed").optional(),
3078
3079
  });
3080
+ export const gitlabSearchGroupParamsSchema = z.object({
3081
+ query: z.string().describe("The query that will be used to search gitlab blobs and merge requests"),
3082
+ groupId: z.string().describe("The group ID of the project to search in"),
3083
+ });
3084
+ export const gitlabSearchGroupOutputSchema = z.object({
3085
+ mergeRequests: z
3086
+ .array(z.object({
3087
+ metadata: z
3088
+ .object({
3089
+ id: z.number().describe("The ID of the merge request"),
3090
+ iid: z.number().describe("The internal ID of the merge request"),
3091
+ project_id: z.number().describe("The ID of the project the merge request belongs to"),
3092
+ title: z.string().describe("The title of the merge request"),
3093
+ web_url: z.string().describe("The URL of the merge request"),
3094
+ description: z.string().describe("The description of the merge request").optional(),
3095
+ author: z
3096
+ .object({ name: z.string().describe("The name of the author").optional() })
3097
+ .describe("The author of the merge request")
3098
+ .optional(),
3099
+ merged_at: z.string().describe("The date and time the merge request was merged").optional(),
3100
+ })
3101
+ .describe("The metadata of the merge request"),
3102
+ diffs: z
3103
+ .array(z.object({
3104
+ old_path: z.string().describe("The old path of the diff"),
3105
+ new_path: z.string().describe("The new path of the diff"),
3106
+ diff: z.string().describe("The contents of the diff"),
3107
+ new_file: z.boolean().describe("Whether the diff is a new file"),
3108
+ renamed_file: z.boolean().describe("Whether the diff is a renamed file"),
3109
+ deleted_file: z.boolean().describe("Whether the diff is a deleted file"),
3110
+ too_large: z.boolean().describe("Whether the diff is too large").optional(),
3111
+ }))
3112
+ .describe("A list of diffs that match the query"),
3113
+ }))
3114
+ .describe("A list of merge requests that match the query"),
3115
+ blobs: z
3116
+ .array(z.object({
3117
+ metadata: z.object({
3118
+ path: z.string().describe("The path of the blob"),
3119
+ basename: z.string().describe("The basename of the blob"),
3120
+ data: z.string().describe("The data of the blob"),
3121
+ project_id: z.number().describe("The ID of the project the blob belongs to"),
3122
+ ref: z.string().describe("The ref of the blob"),
3123
+ startline: z.number().describe("The start line of the blob"),
3124
+ filename: z.string().describe("The filename of the blob"),
3125
+ }),
3126
+ matchedMergeRequests: z
3127
+ .array(z.object({
3128
+ title: z.string().describe("The title of the merge request"),
3129
+ web_url: z.string().describe("The URL of the merge request"),
3130
+ author: z.object({}).catchall(z.any()).describe("The author of the merge request").optional(),
3131
+ merged_at: z.string().describe("The date and time the merge request was merged").optional(),
3132
+ }))
3133
+ .describe("A list of merge requests that match the blob")
3134
+ .optional(),
3135
+ }))
3136
+ .describe("A list of blobs that match the query"),
3137
+ });
@@ -0,0 +1,3 @@
1
+ import { confluenceUpdatePageFunction } from "../../../actions/autogen/types";
2
+ declare const confluenceUpdatePage: confluenceUpdatePageFunction;
3
+ export default confluenceUpdatePage;
@@ -0,0 +1,47 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const axios_1 = __importDefault(require("axios"));
16
+ function getConfluenceApi(baseUrl, username, apiToken) {
17
+ const api = axios_1.default.create({
18
+ baseURL: baseUrl,
19
+ headers: {
20
+ Accept: "application/json",
21
+ // Tokens are associated with a specific user.
22
+ Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
23
+ },
24
+ });
25
+ return api;
26
+ }
27
+ const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
28
+ const { pageId, username, content, title } = params;
29
+ const { baseUrl, authToken } = authParams;
30
+ const api = getConfluenceApi(baseUrl, username, authToken);
31
+ // Get current version number
32
+ const response = yield api.get(`/api/v2/pages/${pageId}`);
33
+ const currVersion = response.data.version.number;
34
+ yield api.put(`/api/v2/pages/${pageId}`, {
35
+ id: pageId,
36
+ status: "current",
37
+ title,
38
+ body: {
39
+ representation: "storage",
40
+ value: content,
41
+ },
42
+ version: {
43
+ number: currVersion + 1,
44
+ },
45
+ });
46
+ });
47
+ exports.default = confluenceUpdatePage;
@@ -0,0 +1,6 @@
1
+ import type { gitlabSearchGroupFunction } from "../../autogen/types.js";
2
+ /**
3
+ * Creates a new branch in a GitHub repository
4
+ */
5
+ declare const searchGroup: gitlabSearchGroupFunction;
6
+ export default searchGroup;
@@ -0,0 +1,75 @@
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
+ const GITLAB_API_URL = "https://gitlab.com";
12
+ function gitlabFetch(endpoint, authToken) {
13
+ return __awaiter(this, void 0, void 0, function* () {
14
+ const res = yield fetch(`${GITLAB_API_URL}${endpoint}`, {
15
+ headers: { Authorization: `Bearer ${authToken}` },
16
+ });
17
+ if (!res.ok)
18
+ throw new Error(`GitLab API error: ${res.status} ${res.statusText}`);
19
+ return res.json();
20
+ });
21
+ }
22
+ function globalSearch(input) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ const { scope, query, groupId, authToken, baseUrl } = input;
25
+ const endpoint = `${baseUrl}/api/v4/groups/${groupId}/search?scope=${scope}&search=${encodeURIComponent(query)}`;
26
+ return gitlabFetch(endpoint, authToken);
27
+ });
28
+ }
29
+ function getMRDiffs(projectId, mrIid, authToken) {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ const endpoint = `/projects/${projectId}/merge_requests/${mrIid}/diffs`;
32
+ return gitlabFetch(endpoint, authToken);
33
+ });
34
+ }
35
+ /**
36
+ * Creates a new branch in a GitHub repository
37
+ */
38
+ const searchGroup = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
39
+ const { authToken, baseUrl } = authParams;
40
+ const gitlabBaseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : GITLAB_API_URL;
41
+ if (!authToken) {
42
+ throw new Error(MISSING_AUTH_TOKEN);
43
+ }
44
+ const { query, groupId } = params;
45
+ const [mrResults, blobResults] = yield Promise.all([
46
+ globalSearch({ scope: "merge_requests", query, groupId, authToken, baseUrl: gitlabBaseUrl }),
47
+ globalSearch({ scope: "blobs", query, groupId, authToken, baseUrl: gitlabBaseUrl }),
48
+ ]);
49
+ const mergeRequests = yield Promise.all(mrResults.map((metadata) => __awaiter(void 0, void 0, void 0, function* () {
50
+ const diffs = yield getMRDiffs(metadata.project_id, metadata.iid, authToken);
51
+ return { metadata, diffs };
52
+ })));
53
+ const blobs = blobResults.map(blob => {
54
+ const matches = mergeRequests
55
+ .filter(mr => mr.metadata.project_id === blob.project_id && mr.diffs.some(diff => diff.new_path === blob.path))
56
+ .map(mr => {
57
+ var _a;
58
+ return ({
59
+ title: mr.metadata.title,
60
+ web_url: mr.metadata.web_url,
61
+ author: (_a = mr.metadata.author) === null || _a === void 0 ? void 0 : _a.name,
62
+ merged_at: mr.metadata.merged_at,
63
+ });
64
+ });
65
+ return {
66
+ metadata: blob,
67
+ matched_merge_requests: matches,
68
+ };
69
+ });
70
+ return {
71
+ mergeRequests,
72
+ blobs,
73
+ };
74
+ });
75
+ export default searchGroup;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "type": "module",
5
5
  "description": "AI Actions by Credal AI",
6
6
  "sideEffects": false,
@@ -1,3 +0,0 @@
1
- import type { googleOauthListGmailThreadsFunction } from "../../autogen/types";
2
- declare const listGmailThreads: googleOauthListGmailThreadsFunction;
3
- export default listGmailThreads;
@@ -1,98 +0,0 @@
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 axiosClient_1 = require("../../util/axiosClient");
13
- const missingAuthConstants_1 = require("../../util/missingAuthConstants");
14
- const decodeMessage_1 = require("./utils/decodeMessage");
15
- const listGmailThreads = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
16
- if (!authParams.authToken) {
17
- return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN, threads: [] };
18
- }
19
- const { query, maxResults } = params;
20
- const allThreads = [];
21
- const errorMessages = [];
22
- const max = maxResults !== null && maxResults !== void 0 ? maxResults : 100;
23
- let fetched = 0;
24
- let pageToken = undefined;
25
- try {
26
- while (fetched < max) {
27
- const url = `https://gmail.googleapis.com/gmail/v1/users/me/threads?q=${encodeURIComponent(query)}` +
28
- (pageToken ? `&pageToken=${encodeURIComponent(pageToken)}` : "") +
29
- `&maxResults=${Math.min(100, max - fetched)}`;
30
- const listRes = yield axiosClient_1.axiosClient.get(url, {
31
- headers: {
32
- Authorization: `Bearer ${authParams.authToken}`,
33
- },
34
- });
35
- const { threads: threadList = [], nextPageToken } = listRes.data;
36
- if (!Array.isArray(threadList) || threadList.length === 0)
37
- break;
38
- const remaining = max - allThreads.length;
39
- const batch = threadList.slice(0, remaining);
40
- const results = yield Promise.all(batch.map((thread) => __awaiter(void 0, void 0, void 0, function* () {
41
- try {
42
- const threadRes = yield axiosClient_1.axiosClient.get(`https://gmail.googleapis.com/gmail/v1/users/me/threads/${thread.id}?format=full`, {
43
- headers: {
44
- Authorization: `Bearer ${authParams.authToken}`,
45
- },
46
- });
47
- const { id, historyId, messages } = threadRes.data;
48
- return {
49
- id,
50
- historyId,
51
- messages: Array.isArray(messages)
52
- ? messages.map(msg => {
53
- const { id, threadId, snippet, labelIds, internalDate } = msg;
54
- const emailBody = (0, decodeMessage_1.getEmailContent)(msg) || "";
55
- return {
56
- id,
57
- threadId,
58
- snippet,
59
- labelIds,
60
- internalDate,
61
- emailBody,
62
- };
63
- })
64
- : [],
65
- };
66
- }
67
- catch (err) {
68
- errorMessages.push(err instanceof Error ? err.message : "Failed to fetch thread details");
69
- return {
70
- id: thread.id,
71
- snippet: "",
72
- historyId: "",
73
- messages: [],
74
- error: err instanceof Error ? err.message : "Failed to fetch thread details",
75
- };
76
- }
77
- })));
78
- allThreads.push(...results);
79
- fetched = allThreads.length;
80
- if (!nextPageToken || allThreads.length >= max)
81
- break;
82
- pageToken = nextPageToken;
83
- }
84
- return {
85
- success: errorMessages.length === 0,
86
- threads: allThreads,
87
- error: errorMessages.join("; "),
88
- };
89
- }
90
- catch (error) {
91
- return {
92
- success: false,
93
- error: error instanceof Error ? error.message : "Unknown error listing Gmail threads",
94
- threads: [],
95
- };
96
- }
97
- });
98
- exports.default = listGmailThreads;
@@ -1,3 +0,0 @@
1
- import type { googleOauthSearchGmailMessagesFunction } from "../../autogen/types";
2
- declare const searchGmailMessages: googleOauthSearchGmailMessagesFunction;
3
- export default searchGmailMessages;
@@ -1,91 +0,0 @@
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 axiosClient_1 = require("../../util/axiosClient");
13
- const missingAuthConstants_1 = require("../../util/missingAuthConstants");
14
- const decodeMessage_1 = require("./utils/decodeMessage");
15
- const searchGmailMessages = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
16
- if (!authParams.authToken) {
17
- return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN, messages: [] };
18
- }
19
- const { query, maxResults } = params;
20
- const allMessages = [];
21
- const max = maxResults !== null && maxResults !== void 0 ? maxResults : 100;
22
- const errorMessages = [];
23
- let pageToken = undefined;
24
- let fetched = 0;
25
- try {
26
- while (fetched < max) {
27
- const url = `https://gmail.googleapis.com/gmail/v1/users/me/messages?q=${encodeURIComponent(query)}` +
28
- (pageToken ? `&pageToken=${encodeURIComponent(pageToken)}` : "") +
29
- `&maxResults=${Math.min(100, max - fetched)}`;
30
- const listRes = yield axiosClient_1.axiosClient.get(url, {
31
- headers: {
32
- Authorization: `Bearer ${authParams.authToken}`,
33
- },
34
- });
35
- const { messages: messageList = [], nextPageToken } = listRes.data;
36
- if (!Array.isArray(messageList) || messageList.length === 0)
37
- break;
38
- const remaining = max - allMessages.length;
39
- const batch = messageList.slice(0, remaining);
40
- const results = yield Promise.all(batch.map((msg) => __awaiter(void 0, void 0, void 0, function* () {
41
- try {
42
- const msgRes = yield axiosClient_1.axiosClient.get(`https://gmail.googleapis.com/gmail/v1/users/me/messages/${msg.id}?format=full`, {
43
- headers: {
44
- Authorization: `Bearer ${authParams.authToken}`,
45
- },
46
- });
47
- const { id, threadId, snippet, labelIds, internalDate } = msgRes.data;
48
- const emailBody = (0, decodeMessage_1.getEmailContent)(msgRes.data) || "";
49
- return {
50
- id,
51
- threadId,
52
- snippet,
53
- labelIds,
54
- internalDate,
55
- emailBody,
56
- };
57
- }
58
- catch (err) {
59
- errorMessages.push(err instanceof Error ? err.message : "Failed to fetch message details");
60
- return {
61
- id: msg.id,
62
- threadId: "",
63
- snippet: "",
64
- labelIds: [],
65
- internalDate: "",
66
- payload: {},
67
- error: err instanceof Error ? err.message : "Failed to fetch message details",
68
- };
69
- }
70
- })));
71
- allMessages.push(...results);
72
- fetched = allMessages.length;
73
- if (!nextPageToken || allMessages.length >= max)
74
- break;
75
- pageToken = nextPageToken;
76
- }
77
- return {
78
- success: errorMessages.length === 0,
79
- messages: allMessages,
80
- error: errorMessages.join("; "),
81
- };
82
- }
83
- catch (error) {
84
- return {
85
- success: false,
86
- error: error instanceof Error ? error.message : "Unknown error searching Gmail",
87
- messages: [],
88
- };
89
- }
90
- });
91
- exports.default = searchGmailMessages;
@@ -1,3 +0,0 @@
1
- import type { jamfGetComputerInventoryFunction } from "../../autogen/types";
2
- declare const getComputerInventory: jamfGetComputerInventoryFunction;
3
- export default getComputerInventory;
@@ -1,45 +0,0 @@
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 axiosClient_1 = require("../../util/axiosClient");
13
- const getComputerInventory = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
- const { authToken, baseUrl } = authParams;
15
- const { section } = params;
16
- if (!baseUrl) {
17
- throw new Error("Base URL is required to fetch computer inventory");
18
- }
19
- const apiUrl = `${baseUrl}/v1/computer-inventory`;
20
- const queryParams = {};
21
- if (section) {
22
- queryParams.section = section;
23
- }
24
- try {
25
- const response = yield axiosClient_1.axiosClient.get(apiUrl, {
26
- headers: {
27
- Authorization: `Bearer ${authToken}`,
28
- Accept: "application/json",
29
- },
30
- params: queryParams,
31
- });
32
- return {
33
- success: true,
34
- data: response.data,
35
- };
36
- }
37
- catch (error) {
38
- console.error("Error retrieving computer inventory: ", error);
39
- return {
40
- success: false,
41
- error: error instanceof Error ? error.message : "Unknown error",
42
- };
43
- }
44
- });
45
- exports.default = getComputerInventory;
@@ -1,3 +0,0 @@
1
- import type { jamfGetFileVaultRecoveryKeyFunction } from "../../autogen/types";
2
- declare const getFileVaultRecoveryKey: jamfGetFileVaultRecoveryKeyFunction;
3
- export default getFileVaultRecoveryKey;
@@ -1,40 +0,0 @@
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 axiosClient_1 = require("../../util/axiosClient");
13
- const getFileVaultRecoveryKey = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
- const { authToken, baseUrl } = authParams;
15
- const { computerId } = params;
16
- if (!baseUrl || !computerId) {
17
- throw new Error("Base URL and Computer ID are required to fetch FileVault2 recovery key");
18
- }
19
- const apiUrl = `${baseUrl}/JSSResource/computers/${computerId}/FileVault2RecoveryKey`;
20
- try {
21
- const response = yield axiosClient_1.axiosClient.get(apiUrl, {
22
- headers: {
23
- Authorization: `Bearer ${authToken}`,
24
- Accept: "application/json",
25
- },
26
- });
27
- return {
28
- success: true,
29
- data: response.data,
30
- };
31
- }
32
- catch (error) {
33
- console.error("Error retrieving FileVault2 recovery key: ", error);
34
- return {
35
- success: false,
36
- error: error instanceof Error ? error.message : "Unknown error",
37
- };
38
- }
39
- });
40
- exports.default = getFileVaultRecoveryKey;
@@ -1,3 +0,0 @@
1
- import type { jamfRestartJamfComputerByIdFunction } from "../../autogen/types.js";
2
- declare const restartJamfComputerById: jamfRestartJamfComputerByIdFunction;
3
- export default restartJamfComputerById;
@@ -1,37 +0,0 @@
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 { axiosClient } from "../../util/axiosClient.js";
11
- const restartJamfComputerById = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
12
- const { authToken, subdomain } = authParams;
13
- const { computerId } = params;
14
- if (!subdomain || !authToken) {
15
- throw new Error("Instance and authToken are required to fetch Jamf user computer ID");
16
- }
17
- const url = `https://${subdomain}.jamfcloud.com`;
18
- try {
19
- yield axiosClient.post(`${url}/api/command/v1/computers/${computerId}/restart`, {
20
- headers: {
21
- Authorization: `Bearer ${authToken}`,
22
- Accept: "application/json",
23
- },
24
- });
25
- return {
26
- success: true,
27
- };
28
- }
29
- catch (error) {
30
- console.error("Error restarting Jamf computer: ", error);
31
- return {
32
- success: false,
33
- error: error instanceof Error ? error.message : "Unknown error",
34
- };
35
- }
36
- });
37
- export default restartJamfComputerById;