@credal/actions 0.2.48 → 0.2.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/actions/actionMapper.js +39 -1
  2. package/dist/actions/autogen/templates.d.ts +6 -0
  3. package/dist/actions/autogen/templates.js +640 -0
  4. package/dist/actions/autogen/types.d.ts +803 -1
  5. package/dist/actions/autogen/types.js +222 -0
  6. package/dist/actions/groups.js +11 -1
  7. package/dist/actions/providers/confluence/updatePage.js +14 -15
  8. package/dist/actions/providers/generic/fillTemplateAction.d.ts +7 -0
  9. package/dist/actions/providers/generic/fillTemplateAction.js +18 -0
  10. package/dist/actions/providers/generic/genericApiCall.d.ts +3 -0
  11. package/dist/actions/providers/generic/genericApiCall.js +38 -0
  12. package/dist/actions/providers/github/searchRepository.js +3 -2
  13. package/dist/actions/providers/google-oauth/getDriveContentById.d.ts +3 -0
  14. package/dist/actions/providers/google-oauth/getDriveContentById.js +161 -0
  15. package/dist/actions/providers/google-oauth/getDriveFileContentById.js +74 -54
  16. package/dist/actions/providers/google-oauth/searchAndGetDriveContentByKeywords.d.ts +3 -0
  17. package/dist/actions/providers/google-oauth/searchAndGetDriveContentByKeywords.js +47 -0
  18. package/dist/actions/providers/google-oauth/searchDriveAndGetContentByKeywords.d.ts +3 -0
  19. package/dist/actions/providers/google-oauth/searchDriveAndGetContentByKeywords.js +110 -0
  20. package/dist/actions/providers/google-oauth/searchDriveAndGetContentByQuery.d.ts +3 -0
  21. package/dist/actions/providers/google-oauth/searchDriveAndGetContentByQuery.js +78 -0
  22. package/dist/actions/providers/google-oauth/utils/extractContentFromDriveFileId.d.ts +15 -0
  23. package/dist/actions/providers/google-oauth/utils/extractContentFromDriveFileId.js +129 -0
  24. package/dist/actions/providers/googlemaps/nearbysearch.d.ts +3 -0
  25. package/dist/actions/providers/googlemaps/nearbysearch.js +96 -0
  26. package/dist/actions/providers/linear/getIssueDetails.d.ts +3 -0
  27. package/dist/actions/providers/linear/getIssueDetails.js +127 -0
  28. package/dist/actions/providers/linear/getIssues.d.ts +3 -0
  29. package/dist/actions/providers/linear/getIssues.js +160 -0
  30. package/dist/actions/providers/linear/getProjectDetails.d.ts +3 -0
  31. package/dist/actions/providers/linear/getProjectDetails.js +129 -0
  32. package/dist/actions/providers/linear/getProjects.d.ts +3 -0
  33. package/dist/actions/providers/linear/getProjects.js +96 -0
  34. package/dist/actions/providers/linear/getTeamDetails.d.ts +3 -0
  35. package/dist/actions/providers/linear/getTeamDetails.js +84 -0
  36. package/dist/actions/providers/linear/getTeams.d.ts +3 -0
  37. package/dist/actions/providers/linear/getTeams.js +68 -0
  38. package/dist/actions/providers/snowflake/runSnowflakeQueryWriteResultsToS3.d.ts +3 -0
  39. package/dist/actions/providers/snowflake/runSnowflakeQueryWriteResultsToS3.js +154 -0
  40. package/dist/actions/providers/x/scrapeTweetDataWithNitter.d.ts +3 -0
  41. package/dist/actions/providers/x/scrapeTweetDataWithNitter.js +45 -0
  42. package/dist/utils/google.d.ts +4 -0
  43. package/dist/utils/google.js +170 -0
  44. package/package.json +2 -1
  45. package/dist/actions/providers/jamf/types.d.ts +0 -8
  46. package/dist/actions/providers/jamf/types.js +0 -7
@@ -33,6 +33,7 @@ export var ProviderName;
33
33
  ProviderName["NOTION"] = "notion";
34
34
  ProviderName["JAMF"] = "jamf";
35
35
  ProviderName["GITLAB"] = "gitlab";
36
+ ProviderName["LINEAR"] = "linear";
36
37
  })(ProviderName || (ProviderName = {}));
37
38
  export const AuthParamsSchema = z.object({
38
39
  authToken: z.string().optional(),
@@ -3487,3 +3488,224 @@ export const gitlabSearchGroupOutputSchema = z.object({
3487
3488
  }))
3488
3489
  .describe("A list of blobs that match the query"),
3489
3490
  });
3491
+ export const linearGetIssuesParamsSchema = z.object({
3492
+ query: z.string().describe("Optional query string to filter issues").optional(),
3493
+ maxResults: z.number().describe("Optional limit to number of results").optional(),
3494
+ });
3495
+ export const linearGetIssuesOutputSchema = z.object({
3496
+ success: z.boolean().describe("Whether the operation was successful"),
3497
+ error: z.string().describe("Error message if the operation failed").optional(),
3498
+ issues: z
3499
+ .array(z.object({
3500
+ id: z.string().describe("The issue ID").optional(),
3501
+ title: z.string().describe("The issue title").optional(),
3502
+ labels: z.array(z.string()).describe("The issue labels").optional(),
3503
+ state: z.string().describe("The issue state").optional(),
3504
+ assignee: z
3505
+ .object({
3506
+ id: z.string().describe("The assignee ID").optional(),
3507
+ name: z.string().describe("The assignee name").optional(),
3508
+ })
3509
+ .describe("The issue assignee")
3510
+ .optional(),
3511
+ due_date: z.string().describe("The issue due date").optional(),
3512
+ project: z
3513
+ .object({
3514
+ id: z.string().describe("The project ID").optional(),
3515
+ name: z.string().describe("The project name").optional(),
3516
+ })
3517
+ .describe("The project the issue belongs to")
3518
+ .optional(),
3519
+ team: z
3520
+ .object({
3521
+ id: z.string().describe("The team ID").optional(),
3522
+ name: z.string().describe("The team name").optional(),
3523
+ })
3524
+ .describe("The team the issue belongs to")
3525
+ .optional(),
3526
+ url: z.string().describe("The issue URL").optional(),
3527
+ comments: z
3528
+ .array(z.object({
3529
+ author_name: z.string().describe("The comment author name").optional(),
3530
+ comment: z.string().describe("The comment content").optional(),
3531
+ }))
3532
+ .describe("The issue comments")
3533
+ .optional(),
3534
+ }))
3535
+ .describe("List of issues matching the query")
3536
+ .optional(),
3537
+ });
3538
+ export const linearGetIssueDetailsParamsSchema = z.object({
3539
+ issueId: z.string().describe("The ID of the Linear issue to retrieve"),
3540
+ });
3541
+ export const linearGetIssueDetailsOutputSchema = z.object({
3542
+ success: z.boolean().describe("Whether the operation was successful"),
3543
+ error: z.string().describe("Error message if the operation failed").optional(),
3544
+ issue: z
3545
+ .object({
3546
+ id: z.string().describe("The issue ID").optional(),
3547
+ title: z.string().describe("The issue title").optional(),
3548
+ description: z.string().describe("The issue description").optional(),
3549
+ state: z.string().describe("The issue state").optional(),
3550
+ assignee: z
3551
+ .object({
3552
+ id: z.string().describe("The assignee ID").optional(),
3553
+ name: z.string().describe("The assignee name").optional(),
3554
+ })
3555
+ .describe("The issue assignee")
3556
+ .optional(),
3557
+ creator: z
3558
+ .object({
3559
+ id: z.string().describe("The creator ID").optional(),
3560
+ name: z.string().describe("The creator name").optional(),
3561
+ })
3562
+ .describe("The issue creator")
3563
+ .optional(),
3564
+ team: z
3565
+ .object({
3566
+ id: z.string().describe("The team ID").optional(),
3567
+ name: z.string().describe("The team name").optional(),
3568
+ })
3569
+ .describe("The team the issue belongs to")
3570
+ .optional(),
3571
+ project: z
3572
+ .object({
3573
+ id: z.string().describe("The project ID").optional(),
3574
+ name: z.string().describe("The project name").optional(),
3575
+ })
3576
+ .describe("The project the issue belongs to")
3577
+ .optional(),
3578
+ priority: z.number().describe("The issue priority (0-4)").optional(),
3579
+ estimate: z.number().describe("The issue estimate in story points").optional(),
3580
+ dueDate: z.string().describe("The issue due date").optional(),
3581
+ createdAt: z.string().describe("When the issue was created").optional(),
3582
+ updatedAt: z.string().describe("When the issue was last updated").optional(),
3583
+ labels: z.array(z.string()).describe("The issue labels").optional(),
3584
+ url: z.string().describe("The issue URL").optional(),
3585
+ comments: z
3586
+ .array(z.object({
3587
+ author_name: z.string().describe("The comment author name").optional(),
3588
+ comment: z.string().describe("The comment content").optional(),
3589
+ }))
3590
+ .describe("The issue comments")
3591
+ .optional(),
3592
+ content: z.string().describe("The issue content").optional(),
3593
+ })
3594
+ .describe("The issue details")
3595
+ .optional(),
3596
+ });
3597
+ export const linearGetProjectsParamsSchema = z.object({});
3598
+ export const linearGetProjectsOutputSchema = z.object({
3599
+ success: z.boolean().describe("Whether the operation was successful"),
3600
+ error: z.string().describe("Error message if the operation failed").optional(),
3601
+ projects: z
3602
+ .array(z.object({
3603
+ id: z.string().describe("The project ID").optional(),
3604
+ name: z.string().describe("The project name").optional(),
3605
+ status: z.string().describe("The project status").optional(),
3606
+ labels: z.array(z.string()).describe("The project labels").optional(),
3607
+ content: z.string().describe("The project content").optional(),
3608
+ description: z.string().describe("The project description").optional(),
3609
+ creator: z
3610
+ .object({
3611
+ id: z.string().describe("The creator ID").optional(),
3612
+ name: z.string().describe("The creator name").optional(),
3613
+ })
3614
+ .describe("The project creator")
3615
+ .optional(),
3616
+ lead: z
3617
+ .object({
3618
+ id: z.string().describe("The lead ID").optional(),
3619
+ name: z.string().describe("The lead name").optional(),
3620
+ })
3621
+ .describe("The project lead")
3622
+ .optional(),
3623
+ progress: z.number().describe("The project progress percentage").optional(),
3624
+ url: z.string().describe("The project URL").optional(),
3625
+ }))
3626
+ .describe("List of all projects")
3627
+ .optional(),
3628
+ });
3629
+ export const linearGetProjectDetailsParamsSchema = z.object({
3630
+ projectId: z.string().describe("The ID of the Linear project to retrieve"),
3631
+ });
3632
+ export const linearGetProjectDetailsOutputSchema = z.object({
3633
+ success: z.boolean().describe("Whether the operation was successful"),
3634
+ error: z.string().describe("Error message if the operation failed").optional(),
3635
+ project: z
3636
+ .object({
3637
+ id: z.string().describe("The project ID").optional(),
3638
+ name: z.string().describe("The project name").optional(),
3639
+ description: z.string().describe("The project description").optional(),
3640
+ state: z.string().describe("The project state").optional(),
3641
+ progress: z.number().describe("The project progress percentage").optional(),
3642
+ targetDate: z.string().describe("The project target date").optional(),
3643
+ createdAt: z.string().describe("When the project was created").optional(),
3644
+ updatedAt: z.string().describe("When the project was last updated").optional(),
3645
+ lead: z
3646
+ .object({
3647
+ id: z.string().describe("The lead ID").optional(),
3648
+ name: z.string().describe("The lead name").optional(),
3649
+ })
3650
+ .describe("The project lead")
3651
+ .optional(),
3652
+ team: z
3653
+ .object({
3654
+ id: z.string().describe("The team ID").optional(),
3655
+ name: z.string().describe("The team name").optional(),
3656
+ })
3657
+ .describe("The team the project belongs to")
3658
+ .optional(),
3659
+ issues: z
3660
+ .array(z.object({
3661
+ id: z.string().describe("The issue ID").optional(),
3662
+ name: z.string().describe("The issue name").optional(),
3663
+ }))
3664
+ .describe("The issues in the project")
3665
+ .optional(),
3666
+ url: z.string().describe("The project URL").optional(),
3667
+ updates: z
3668
+ .array(z.object({
3669
+ id: z.string().describe("The update ID").optional(),
3670
+ content: z.string().describe("The update content").optional(),
3671
+ author_name: z.string().describe("The update author name").optional(),
3672
+ created_at: z.string().describe("When the update was created").optional(),
3673
+ }))
3674
+ .describe("The project updates")
3675
+ .optional(),
3676
+ content: z.string().describe("The project content").optional(),
3677
+ })
3678
+ .describe("The project details")
3679
+ .optional(),
3680
+ });
3681
+ export const linearGetTeamDetailsParamsSchema = z.object({
3682
+ teamId: z.string().describe("The ID of the Linear team to retrieve"),
3683
+ });
3684
+ export const linearGetTeamDetailsOutputSchema = z.object({
3685
+ success: z.boolean().describe("Whether the operation was successful"),
3686
+ error: z.string().describe("Error message if the operation failed").optional(),
3687
+ team: z
3688
+ .object({
3689
+ id: z.string().describe("The team ID").optional(),
3690
+ name: z.string().describe("The team name").optional(),
3691
+ identifier: z.string().describe("Used to identify issues from this team").optional(),
3692
+ members: z
3693
+ .array(z.object({ id: z.string().optional(), name: z.string().optional(), email: z.string().optional() }))
3694
+ .describe("The team members")
3695
+ .optional(),
3696
+ })
3697
+ .describe("The team details")
3698
+ .optional(),
3699
+ });
3700
+ export const linearGetTeamsParamsSchema = z.object({});
3701
+ export const linearGetTeamsOutputSchema = z.object({
3702
+ success: z.boolean().describe("Whether the operation was successful"),
3703
+ error: z.string().describe("Error message if the operation failed").optional(),
3704
+ teams: z
3705
+ .array(z.object({
3706
+ id: z.string().describe("The team ID").optional(),
3707
+ name: z.string().describe("The team name").optional(),
3708
+ }))
3709
+ .describe("List of all teams")
3710
+ .optional(),
3711
+ });
@@ -1,4 +1,4 @@
1
- import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, jiraGetServiceDesksDefinition, jiraCreateServiceDeskRequestDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, jiraOrgAssignJiraTicketDefinition, jiraOrgCreateJiraTicketDefinition, jiraOrgCommentJiraTicketDefinition, jiraOrgGetJiraTicketDetailsDefinition, jiraOrgGetJiraTicketHistoryDefinition, jiraOrgUpdateJiraTicketDetailsDefinition, jiraOrgUpdateJiraTicketStatusDefinition, jiraOrgGetJiraIssuesByQueryDefinition, googleOauthGetDriveFileContentByIdDefinition, googleOauthSearchDriveByQueryDefinition, googleOauthSearchDriveByQueryAndGetFileContentDefinition, githubGetFileContentDefinition, githubListDirectoryDefinition, } from "./autogen/templates.js";
1
+ import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, jiraGetServiceDesksDefinition, jiraCreateServiceDeskRequestDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, linearGetIssueDetailsDefinition, linearGetProjectsDefinition, linearGetProjectDetailsDefinition, linearGetTeamDetailsDefinition, linearGetTeamsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, jiraOrgAssignJiraTicketDefinition, jiraOrgCreateJiraTicketDefinition, jiraOrgCommentJiraTicketDefinition, jiraOrgGetJiraTicketDetailsDefinition, jiraOrgGetJiraTicketHistoryDefinition, jiraOrgUpdateJiraTicketDetailsDefinition, jiraOrgUpdateJiraTicketStatusDefinition, jiraOrgGetJiraIssuesByQueryDefinition, googleOauthGetDriveFileContentByIdDefinition, googleOauthSearchDriveByQueryDefinition, googleOauthSearchDriveByQueryAndGetFileContentDefinition, githubGetFileContentDefinition, githubListDirectoryDefinition, } from "./autogen/templates.js";
2
2
  export const ACTION_GROUPS = {
3
3
  GENERIC: {
4
4
  description: "Generic utility actions",
@@ -248,4 +248,14 @@ export const ACTION_GROUPS = {
248
248
  oktaTriggerOktaWorkflowDefinition,
249
249
  ],
250
250
  },
251
+ LINEAR: {
252
+ description: "Actions for interacting with Linear",
253
+ actions: [
254
+ linearGetIssueDetailsDefinition,
255
+ linearGetProjectsDefinition,
256
+ linearGetProjectDetailsDefinition,
257
+ linearGetTeamDetailsDefinition,
258
+ linearGetTeamsDefinition,
259
+ ],
260
+ },
251
261
  };
@@ -8,30 +8,28 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
11
  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({
12
+ const axiosClient_1 = require("../../util/axiosClient");
13
+ function getConfluenceRequestConfig(baseUrl, username, apiToken) {
14
+ return {
18
15
  baseURL: baseUrl,
19
16
  headers: {
20
17
  Accept: "application/json",
21
- // Tokens are associated with a specific user.
22
18
  Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
23
19
  },
24
- });
25
- return api;
20
+ };
26
21
  }
27
22
  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);
23
+ const { pageId, content, title } = params;
24
+ const { baseUrl, authToken, username } = authParams;
25
+ if (!baseUrl || !authToken || !username) {
26
+ throw new Error("Missing required authentication information");
27
+ }
28
+ const config = getConfluenceRequestConfig(baseUrl, username, authToken);
31
29
  // Get current version number
32
- const response = yield api.get(`/api/v2/pages/${pageId}`);
30
+ const response = yield axiosClient_1.axiosClient.get(`/api/v2/pages/${pageId}`, config);
33
31
  const currVersion = response.data.version.number;
34
- yield api.put(`/api/v2/pages/${pageId}`, {
32
+ const payload = {
35
33
  id: pageId,
36
34
  status: "current",
37
35
  title,
@@ -42,6 +40,7 @@ const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* (
42
40
  version: {
43
41
  number: currVersion + 1,
44
42
  },
45
- });
43
+ };
44
+ yield axiosClient_1.axiosClient.put(`/api/v2/pages/${pageId}`, payload, config);
46
45
  });
47
46
  exports.default = confluenceUpdatePage;
@@ -0,0 +1,7 @@
1
+ import type { ActionFunction } from "../../autogen/types";
2
+ declare const fillTemplateAction: ActionFunction<{
3
+ template: string;
4
+ }, {
5
+ result: string;
6
+ }, unknown>;
7
+ export default fillTemplateAction;
@@ -0,0 +1,18 @@
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 fillTemplateAction = (_a) => __awaiter(void 0, [_a], void 0, function* ({ template }) {
13
+ // Simply return the template without any modification
14
+ return {
15
+ result: template,
16
+ };
17
+ });
18
+ exports.default = fillTemplateAction;
@@ -0,0 +1,3 @@
1
+ import type { genericUniversalTestActionFunction } from "../../autogen/types";
2
+ declare const genericApiCall: genericUniversalTestActionFunction;
3
+ export default genericApiCall;
@@ -0,0 +1,38 @@
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
+ const genericApiCall = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, }) {
17
+ try {
18
+ const { endpoint, method, headers, body } = params;
19
+ const response = yield (0, axios_1.default)({
20
+ url: endpoint,
21
+ method,
22
+ headers,
23
+ data: method !== "GET" ? body : undefined,
24
+ });
25
+ return {
26
+ statusCode: response.status,
27
+ headers: response.headers,
28
+ data: response.data,
29
+ };
30
+ }
31
+ catch (error) {
32
+ if (axios_1.default.isAxiosError(error)) {
33
+ throw Error("Axios Error: " + (error.message || "Failed to make API call"));
34
+ }
35
+ throw Error("Error: " + (error || "Failed to make API call"));
36
+ }
37
+ });
38
+ exports.default = genericApiCall;
@@ -80,9 +80,10 @@ const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ pa
80
80
  })) || [],
81
81
  };
82
82
  });
83
- // Search ISSUES & PRs
83
+ // Search Issues and PRs
84
84
  const issueResults = yield octokit.rest.search.issuesAndPullRequests({
85
- q: `${query} repo:${organization}/${repository}`,
85
+ q: `${query} repo:${organization}/${repository} (is:issue OR is:pull-request)`,
86
+ advanced_search: "true",
86
87
  });
87
88
  const prItems = issueResults.data.items.filter(item => item.pull_request).slice(0, MAX_ISSUES_OR_PRS);
88
89
  const prNumbers = prItems.map(item => item.number);
@@ -0,0 +1,3 @@
1
+ import type { googleOauthGetDriveFileContentByIDFunction } from "../../autogen/types.js";
2
+ declare const getDriveFileContentByID: googleOauthGetDriveFileContentByIDFunction;
3
+ export default getDriveFileContentByID;
@@ -0,0 +1,161 @@
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 pdf from "pdf-parse/lib/pdf-parse.js";
11
+ import { axiosClient } from "../../util/axiosClient.js";
12
+ import mammoth from "mammoth";
13
+ import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
14
+ const getDriveFileContentByID = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
15
+ if (!authParams.authToken) {
16
+ return { success: false, error: MISSING_AUTH_TOKEN };
17
+ }
18
+ const { fileId, limit } = params;
19
+ try {
20
+ // First, get file metadata to determine the file type
21
+ const metadataUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?fields=name,mimeType,size`;
22
+ const metadataRes = yield axiosClient.get(metadataUrl, {
23
+ headers: {
24
+ Authorization: `Bearer ${authParams.authToken}`,
25
+ },
26
+ });
27
+ const { name: fileName, mimeType, size } = metadataRes.data;
28
+ // Check if file is too large (50MB limit for safety)
29
+ if (size && parseInt(size) > 50 * 1024 * 1024) {
30
+ return {
31
+ success: false,
32
+ error: "File too large (>50MB)",
33
+ };
34
+ }
35
+ let content = "";
36
+ // Handle different file types - read content directly
37
+ if (mimeType === "application/vnd.google-apps.document") {
38
+ // Google Docs - download as plain text
39
+ const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media&format=txt`;
40
+ const downloadRes = yield axiosClient.get(downloadUrl, {
41
+ headers: {
42
+ Authorization: `Bearer ${authParams.authToken}`,
43
+ },
44
+ responseType: 'text',
45
+ });
46
+ content = downloadRes.data;
47
+ }
48
+ else if (mimeType === "application/vnd.google-apps.spreadsheet") {
49
+ // Google Sheets - download as CSV
50
+ const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media&format=csv`;
51
+ const downloadRes = yield axiosClient.get(downloadUrl, {
52
+ headers: {
53
+ Authorization: `Bearer ${authParams.authToken}`,
54
+ },
55
+ responseType: 'text',
56
+ });
57
+ content = downloadRes.data;
58
+ }
59
+ else if (mimeType === "application/vnd.google-apps.presentation") {
60
+ // Google Slides - download as plain text
61
+ const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media&format=txt`;
62
+ const downloadRes = yield axiosClient.get(downloadUrl, {
63
+ headers: {
64
+ Authorization: `Bearer ${authParams.authToken}`,
65
+ },
66
+ responseType: 'text',
67
+ });
68
+ content = downloadRes.data;
69
+ }
70
+ else if (mimeType === "application/pdf") {
71
+ // PDF files - use pdf-parse
72
+ const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media`;
73
+ const downloadRes = yield axiosClient.get(downloadUrl, {
74
+ headers: {
75
+ Authorization: `Bearer ${authParams.authToken}`,
76
+ },
77
+ responseType: 'arraybuffer',
78
+ });
79
+ try {
80
+ const pdfData = yield pdf(downloadRes.data);
81
+ content = pdfData.text;
82
+ }
83
+ catch (pdfError) {
84
+ return {
85
+ success: false,
86
+ error: `Failed to parse PDF: ${pdfError instanceof Error ? pdfError.message : 'Unknown PDF error'}`,
87
+ };
88
+ }
89
+ }
90
+ else if (mimeType === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ||
91
+ mimeType === "application/msword") {
92
+ // Word documents (.docx or .doc) - download and extract text using mammoth
93
+ const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media`;
94
+ const downloadRes = yield axiosClient.get(downloadUrl, {
95
+ headers: {
96
+ Authorization: `Bearer ${authParams.authToken}`,
97
+ },
98
+ responseType: 'arraybuffer',
99
+ });
100
+ try {
101
+ // mammoth works with .docx files. It will ignore formatting and return raw text
102
+ const result = yield mammoth.extractRawText({ buffer: Buffer.from(downloadRes.data) });
103
+ content = result.value; // raw text
104
+ }
105
+ catch (wordError) {
106
+ return {
107
+ success: false,
108
+ error: `Failed to parse Word document: ${wordError instanceof Error ? wordError.message : 'Unknown Word error'}`,
109
+ };
110
+ }
111
+ }
112
+ else if (mimeType === "text/plain" ||
113
+ mimeType === "text/html" ||
114
+ mimeType === "application/rtf" ||
115
+ (mimeType === null || mimeType === void 0 ? void 0 : mimeType.startsWith("text/"))) {
116
+ // Text-based files
117
+ const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media`;
118
+ const downloadRes = yield axiosClient.get(downloadUrl, {
119
+ headers: {
120
+ Authorization: `Bearer ${authParams.authToken}`,
121
+ },
122
+ responseType: 'text',
123
+ });
124
+ content = downloadRes.data;
125
+ }
126
+ else if (mimeType === null || mimeType === void 0 ? void 0 : mimeType.startsWith("image/")) {
127
+ // Skip images
128
+ return {
129
+ success: false,
130
+ error: "Image files are not supported for text extraction",
131
+ };
132
+ }
133
+ else {
134
+ // Unsupported file type
135
+ return {
136
+ success: false,
137
+ error: `Unsupported file type: ${mimeType}`,
138
+ };
139
+ }
140
+ content = content.trim();
141
+ const originalLength = content.length;
142
+ // Naive way to truncate content
143
+ if (limit && content.length > limit) {
144
+ content = content.substring(0, limit);
145
+ }
146
+ return {
147
+ success: true,
148
+ content,
149
+ fileName,
150
+ fileLength: originalLength,
151
+ };
152
+ }
153
+ catch (error) {
154
+ console.error("Error getting Google Drive file content", error);
155
+ return {
156
+ success: false,
157
+ error: error instanceof Error ? error.message : "Unknown error",
158
+ };
159
+ }
160
+ });
161
+ export default getDriveFileContentByID;