@credal/actions 0.2.61 → 0.2.64

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 (44) hide show
  1. package/dist/actions/autogen/templates.js +70 -0
  2. package/dist/actions/autogen/types.d.ts +93 -0
  3. package/dist/actions/autogen/types.js +25 -0
  4. package/dist/actions/groups.js +14 -1
  5. package/dist/actions/providers/confluence/updatePage.d.ts +3 -0
  6. package/dist/actions/providers/confluence/updatePage.js +46 -0
  7. package/dist/actions/providers/generic/fillTemplateAction.d.ts +7 -0
  8. package/dist/actions/providers/generic/fillTemplateAction.js +18 -0
  9. package/dist/actions/providers/generic/genericApiCall.d.ts +3 -0
  10. package/dist/actions/providers/generic/genericApiCall.js +38 -0
  11. package/dist/actions/providers/gitlab/searchGroup.d.ts +0 -3
  12. package/dist/actions/providers/gitlab/searchGroup.js +73 -45
  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 +13 -90
  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/snowflake/runSnowflakeQueryWriteResultsToS3.d.ts +3 -0
  27. package/dist/actions/providers/snowflake/runSnowflakeQueryWriteResultsToS3.js +154 -0
  28. package/dist/actions/providers/x/scrapeTweetDataWithNitter.d.ts +3 -0
  29. package/dist/actions/providers/x/scrapeTweetDataWithNitter.js +45 -0
  30. package/dist/utils/google.d.ts +4 -0
  31. package/dist/utils/google.js +126 -0
  32. package/package.json +1 -1
  33. package/dist/actions/providers/google-oauth/listGmailThreads.d.ts +0 -3
  34. package/dist/actions/providers/google-oauth/listGmailThreads.js +0 -98
  35. package/dist/actions/providers/google-oauth/searchGmailMessages.d.ts +0 -3
  36. package/dist/actions/providers/google-oauth/searchGmailMessages.js +0 -91
  37. package/dist/actions/providers/jamf/getComputerInventory.d.ts +0 -3
  38. package/dist/actions/providers/jamf/getComputerInventory.js +0 -45
  39. package/dist/actions/providers/jamf/getFileVaultRecoveryKey.d.ts +0 -3
  40. package/dist/actions/providers/jamf/getFileVaultRecoveryKey.js +0 -40
  41. package/dist/actions/providers/jamf/restartJamfComputerById.d.ts +0 -3
  42. package/dist/actions/providers/jamf/restartJamfComputerById.js +0 -37
  43. package/dist/actions/providers/jamf/types.d.ts +0 -8
  44. package/dist/actions/providers/jamf/types.js +0 -7
@@ -6427,6 +6427,14 @@ export const googleOauthGetDriveFileContentByIdDefinition = {
6427
6427
  type: "number",
6428
6428
  description: "The character limit for the file content",
6429
6429
  },
6430
+ timeoutLimit: {
6431
+ type: "number",
6432
+ description: "The timeout limit for the file content retrieval (default of 15 seconds)",
6433
+ },
6434
+ fileSizeLimit: {
6435
+ type: "number",
6436
+ description: "Max file size (in MB) to retrieve content from (default of 30MB)",
6437
+ },
6430
6438
  },
6431
6439
  },
6432
6440
  output: {
@@ -10289,6 +10297,68 @@ export const gitlabSearchGroupDefinition = {
10289
10297
  },
10290
10298
  },
10291
10299
  },
10300
+ commits: {
10301
+ type: "array",
10302
+ description: "A list of commits that match the query",
10303
+ items: {
10304
+ type: "object",
10305
+ required: ["sha", "web_url", "message", "author", "created_at", "files"],
10306
+ properties: {
10307
+ sha: {
10308
+ type: "string",
10309
+ description: "The commit SHA",
10310
+ },
10311
+ web_url: {
10312
+ type: "string",
10313
+ description: "The URL to view the commit in GitLab",
10314
+ },
10315
+ message: {
10316
+ type: "string",
10317
+ description: "The full commit message",
10318
+ },
10319
+ author: {
10320
+ type: "object",
10321
+ required: ["name", "email"],
10322
+ properties: {
10323
+ name: {
10324
+ type: "string",
10325
+ description: "The name of the commit author",
10326
+ },
10327
+ email: {
10328
+ type: "string",
10329
+ description: "The email of the commit author",
10330
+ },
10331
+ },
10332
+ },
10333
+ created_at: {
10334
+ type: "string",
10335
+ description: "The date/time the commit was created",
10336
+ },
10337
+ files: {
10338
+ type: "array",
10339
+ description: "A list of files changed in the commit",
10340
+ items: {
10341
+ type: "object",
10342
+ required: ["old_path", "new_path", "diff"],
10343
+ properties: {
10344
+ old_path: {
10345
+ type: "string",
10346
+ description: "The old path of the file",
10347
+ },
10348
+ new_path: {
10349
+ type: "string",
10350
+ description: "The new path of the file",
10351
+ },
10352
+ diff: {
10353
+ type: "string",
10354
+ description: "The diff contents for the file",
10355
+ },
10356
+ },
10357
+ },
10358
+ },
10359
+ },
10360
+ },
10361
+ },
10292
10362
  },
10293
10363
  },
10294
10364
  name: "searchGroup",
@@ -3478,12 +3478,18 @@ export type googleOauthSearchDriveByQueryAndGetFileContentFunction = ActionFunct
3478
3478
  export declare const googleOauthGetDriveFileContentByIdParamsSchema: z.ZodObject<{
3479
3479
  fileId: z.ZodString;
3480
3480
  limit: z.ZodNumber;
3481
+ timeoutLimit: z.ZodOptional<z.ZodNumber>;
3482
+ fileSizeLimit: z.ZodOptional<z.ZodNumber>;
3481
3483
  }, "strip", z.ZodTypeAny, {
3482
3484
  limit: number;
3483
3485
  fileId: string;
3486
+ fileSizeLimit?: number | undefined;
3487
+ timeoutLimit?: number | undefined;
3484
3488
  }, {
3485
3489
  limit: number;
3486
3490
  fileId: string;
3491
+ fileSizeLimit?: number | undefined;
3492
+ timeoutLimit?: number | undefined;
3487
3493
  }>;
3488
3494
  export type googleOauthGetDriveFileContentByIdParamsType = z.infer<typeof googleOauthGetDriveFileContentByIdParamsSchema>;
3489
3495
  export declare const googleOauthGetDriveFileContentByIdOutputSchema: z.ZodObject<{
@@ -7115,6 +7121,63 @@ export declare const gitlabSearchGroupOutputSchema: z.ZodObject<{
7115
7121
  merged_at?: string | undefined;
7116
7122
  }[] | undefined;
7117
7123
  }>, "many">;
7124
+ commits: z.ZodOptional<z.ZodArray<z.ZodObject<{
7125
+ sha: z.ZodString;
7126
+ web_url: z.ZodString;
7127
+ message: z.ZodString;
7128
+ author: z.ZodObject<{
7129
+ name: z.ZodString;
7130
+ email: z.ZodString;
7131
+ }, "strip", z.ZodTypeAny, {
7132
+ name: string;
7133
+ email: string;
7134
+ }, {
7135
+ name: string;
7136
+ email: string;
7137
+ }>;
7138
+ created_at: z.ZodString;
7139
+ files: z.ZodArray<z.ZodObject<{
7140
+ old_path: z.ZodString;
7141
+ new_path: z.ZodString;
7142
+ diff: z.ZodString;
7143
+ }, "strip", z.ZodTypeAny, {
7144
+ old_path: string;
7145
+ new_path: string;
7146
+ diff: string;
7147
+ }, {
7148
+ old_path: string;
7149
+ new_path: string;
7150
+ diff: string;
7151
+ }>, "many">;
7152
+ }, "strip", z.ZodTypeAny, {
7153
+ message: string;
7154
+ created_at: string;
7155
+ files: {
7156
+ old_path: string;
7157
+ new_path: string;
7158
+ diff: string;
7159
+ }[];
7160
+ sha: string;
7161
+ author: {
7162
+ name: string;
7163
+ email: string;
7164
+ };
7165
+ web_url: string;
7166
+ }, {
7167
+ message: string;
7168
+ created_at: string;
7169
+ files: {
7170
+ old_path: string;
7171
+ new_path: string;
7172
+ diff: string;
7173
+ }[];
7174
+ sha: string;
7175
+ author: {
7176
+ name: string;
7177
+ email: string;
7178
+ };
7179
+ web_url: string;
7180
+ }>, "many">>;
7118
7181
  }, "strip", z.ZodTypeAny, {
7119
7182
  mergeRequests: {
7120
7183
  metadata: {
@@ -7157,6 +7220,21 @@ export declare const gitlabSearchGroupOutputSchema: z.ZodObject<{
7157
7220
  merged_at?: string | undefined;
7158
7221
  }[] | undefined;
7159
7222
  }[];
7223
+ commits?: {
7224
+ message: string;
7225
+ created_at: string;
7226
+ files: {
7227
+ old_path: string;
7228
+ new_path: string;
7229
+ diff: string;
7230
+ }[];
7231
+ sha: string;
7232
+ author: {
7233
+ name: string;
7234
+ email: string;
7235
+ };
7236
+ web_url: string;
7237
+ }[] | undefined;
7160
7238
  }, {
7161
7239
  mergeRequests: {
7162
7240
  metadata: {
@@ -7199,6 +7277,21 @@ export declare const gitlabSearchGroupOutputSchema: z.ZodObject<{
7199
7277
  merged_at?: string | undefined;
7200
7278
  }[] | undefined;
7201
7279
  }[];
7280
+ commits?: {
7281
+ message: string;
7282
+ created_at: string;
7283
+ files: {
7284
+ old_path: string;
7285
+ new_path: string;
7286
+ diff: string;
7287
+ }[];
7288
+ sha: string;
7289
+ author: {
7290
+ name: string;
7291
+ email: string;
7292
+ };
7293
+ web_url: string;
7294
+ }[] | undefined;
7202
7295
  }>;
7203
7296
  export type gitlabSearchGroupOutputType = z.infer<typeof gitlabSearchGroupOutputSchema>;
7204
7297
  export type gitlabSearchGroupFunction = ActionFunction<gitlabSearchGroupParamsType, AuthParamsType, gitlabSearchGroupOutputType>;
@@ -2451,6 +2451,11 @@ export const googleOauthSearchDriveByQueryAndGetFileContentOutputSchema = z.obje
2451
2451
  export const googleOauthGetDriveFileContentByIdParamsSchema = z.object({
2452
2452
  fileId: z.string().describe("The ID of the file to get content from"),
2453
2453
  limit: z.number().describe("The character limit for the file content"),
2454
+ timeoutLimit: z
2455
+ .number()
2456
+ .describe("The timeout limit for the file content retrieval (default of 15 seconds)")
2457
+ .optional(),
2458
+ fileSizeLimit: z.number().describe("Max file size (in MB) to retrieve content from (default of 30MB)").optional(),
2454
2459
  });
2455
2460
  export const googleOauthGetDriveFileContentByIdOutputSchema = z.object({
2456
2461
  success: z.boolean().describe("Whether the file content was retrieved successfully"),
@@ -3570,6 +3575,26 @@ export const gitlabSearchGroupOutputSchema = z.object({
3570
3575
  .optional(),
3571
3576
  }))
3572
3577
  .describe("A list of blobs that match the query"),
3578
+ commits: z
3579
+ .array(z.object({
3580
+ sha: z.string().describe("The commit SHA"),
3581
+ web_url: z.string().describe("The URL to view the commit in GitLab"),
3582
+ message: z.string().describe("The full commit message"),
3583
+ author: z.object({
3584
+ name: z.string().describe("The name of the commit author"),
3585
+ email: z.string().describe("The email of the commit author"),
3586
+ }),
3587
+ created_at: z.string().describe("The date/time the commit was created"),
3588
+ files: z
3589
+ .array(z.object({
3590
+ old_path: z.string().describe("The old path of the file"),
3591
+ new_path: z.string().describe("The new path of the file"),
3592
+ diff: z.string().describe("The diff contents for the file"),
3593
+ }))
3594
+ .describe("A list of files changed in the commit"),
3595
+ }))
3596
+ .describe("A list of commits that match the query")
3597
+ .optional(),
3573
3598
  });
3574
3599
  export const gitlabGetFileContentParamsSchema = z.object({
3575
3600
  project_id: z.number().int().describe("Numeric project ID in GitLab (unique per project)"),
@@ -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, } 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",
@@ -47,6 +47,7 @@ export const ACTION_GROUPS = {
47
47
  googleOauthUpdatePresentationDefinition,
48
48
  googleOauthSearchDriveByKeywordsDefinition,
49
49
  googleOauthSearchDriveByQueryDefinition,
50
+ googleOauthSearchDriveByQueryAndGetFileContentDefinition,
50
51
  googleOauthGetDriveFileContentByIdDefinition,
51
52
  ],
52
53
  },
@@ -198,6 +199,8 @@ export const ACTION_GROUPS = {
198
199
  githubCreateBranchDefinition,
199
200
  githubCreatePullRequestDefinition,
200
201
  githubListPullRequestsDefinition,
202
+ githubGetFileContentDefinition,
203
+ githubListDirectoryDefinition,
201
204
  ],
202
205
  },
203
206
  ASHBY: {
@@ -245,4 +248,14 @@ export const ACTION_GROUPS = {
245
248
  oktaTriggerOktaWorkflowDefinition,
246
249
  ],
247
250
  },
251
+ LINEAR: {
252
+ description: "Actions for interacting with Linear",
253
+ actions: [
254
+ linearGetIssueDetailsDefinition,
255
+ linearGetProjectsDefinition,
256
+ linearGetProjectDetailsDefinition,
257
+ linearGetTeamDetailsDefinition,
258
+ linearGetTeamsDefinition,
259
+ ],
260
+ },
248
261
  };
@@ -0,0 +1,3 @@
1
+ import { confluenceUpdatePageFunction } from "../../../actions/autogen/types";
2
+ declare const confluenceUpdatePage: confluenceUpdatePageFunction;
3
+ export default confluenceUpdatePage;
@@ -0,0 +1,46 @@
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
+ function getConfluenceRequestConfig(baseUrl, username, apiToken) {
14
+ return {
15
+ baseURL: baseUrl,
16
+ headers: {
17
+ Accept: "application/json",
18
+ Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
19
+ },
20
+ };
21
+ }
22
+ const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
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);
29
+ // Get current version number
30
+ const response = yield axiosClient_1.axiosClient.get(`/api/v2/pages/${pageId}`, config);
31
+ const currVersion = response.data.version.number;
32
+ const payload = {
33
+ id: pageId,
34
+ status: "current",
35
+ title,
36
+ body: {
37
+ representation: "storage",
38
+ value: content,
39
+ },
40
+ version: {
41
+ number: currVersion + 1,
42
+ },
43
+ };
44
+ yield axiosClient_1.axiosClient.put(`/api/v2/pages/${pageId}`, payload, config);
45
+ });
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;
@@ -1,6 +1,3 @@
1
1
  import type { gitlabSearchGroupFunction } from "../../autogen/types.js";
2
- /**
3
- * Searches for merge requests and blobs in a GitLab group
4
- */
5
2
  declare const searchGroup: gitlabSearchGroupFunction;
6
3
  export default searchGroup;
@@ -9,26 +9,30 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
11
11
  const GITLAB_API_URL = "https://gitlab.com";
12
- // Cache for project paths to avoid repeated API calls
13
- const projectPathCache = new Map();
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
+ function createProjectPathCache() {
20
+ return new Map();
21
+ }
14
22
  function gitlabFetch(endpoint, authToken) {
15
23
  return __awaiter(this, void 0, void 0, function* () {
16
24
  const res = yield fetch(endpoint, {
17
- headers: {
18
- Authorization: `Bearer ${authToken}`,
19
- },
25
+ headers: { Authorization: `Bearer ${authToken}` },
20
26
  });
21
27
  if (!res.ok)
22
28
  throw new Error(`GitLab API error: ${res.status} ${res.statusText}`);
23
29
  return res.json();
24
30
  });
25
31
  }
26
- function getProjectPath(projectId, authToken, baseUrl) {
32
+ function getProjectPath(projectId, authToken, baseUrl, projectPathCache) {
27
33
  return __awaiter(this, void 0, void 0, function* () {
28
- // Check cache first
29
- if (projectPathCache.has(projectId)) {
34
+ if (projectPathCache.has(projectId))
30
35
  return projectPathCache.get(projectId);
31
- }
32
36
  try {
33
37
  const project = yield gitlabFetch(`${baseUrl}/projects/${projectId}`, authToken);
34
38
  const path = project.path_with_namespace;
@@ -37,7 +41,6 @@ function getProjectPath(projectId, authToken, baseUrl) {
37
41
  }
38
42
  catch (error) {
39
43
  console.warn(`Failed to fetch project path for project ${projectId}:`, error);
40
- // Fallback to project ID if we can't get the path
41
44
  return `project-${projectId}`;
42
45
  }
43
46
  });
@@ -45,16 +48,14 @@ function getProjectPath(projectId, authToken, baseUrl) {
45
48
  function constructBlobUrl(input) {
46
49
  const { baseUrl, projectPath, ref, path, startline } = input;
47
50
  let url = `${baseUrl}/${projectPath}/-/blob/${ref}/${path}`;
48
- // Add line number anchor if provided
49
- if (startline && startline > 0) {
51
+ if (startline && startline > 0)
50
52
  url += `#L${startline}`;
51
- }
52
53
  return url;
53
54
  }
54
- function enhanceBlobWithUrl(blob, authToken, baseUrl, gitlabWebBaseUrl) {
55
+ function enhanceBlobWithUrl(blob, authToken, baseUrl, gitlabWebBaseUrl, projectPathCache) {
55
56
  return __awaiter(this, void 0, void 0, function* () {
56
57
  try {
57
- const projectPath = yield getProjectPath(blob.project_id, authToken, baseUrl);
58
+ const projectPath = yield getProjectPath(blob.project_id, authToken, baseUrl, projectPathCache);
58
59
  const web_url = constructBlobUrl({
59
60
  baseUrl: gitlabWebBaseUrl,
60
61
  projectPath,
@@ -66,7 +67,6 @@ function enhanceBlobWithUrl(blob, authToken, baseUrl, gitlabWebBaseUrl) {
66
67
  }
67
68
  catch (error) {
68
69
  console.warn(`Failed to construct URL for blob in project ${blob.project_id}:`, error);
69
- // Fallback URL construction
70
70
  const fallbackUrl = constructBlobUrl({
71
71
  baseUrl: gitlabWebBaseUrl,
72
72
  projectPath: `project-${blob.project_id}`,
@@ -85,25 +85,39 @@ function globalSearch(input) {
85
85
  return gitlabFetch(endpoint, authToken);
86
86
  });
87
87
  }
88
- function getMRDiffs(input) {
88
+ function getCommitDetails(input) {
89
89
  return __awaiter(this, void 0, void 0, function* () {
90
- const { projectId, mrIid, authToken, baseUrl } = input;
91
- const endpoint = `${baseUrl}/projects/${projectId}/merge_requests/${mrIid}/diffs`;
92
- return gitlabFetch(endpoint, authToken);
90
+ const { projectId, sha, authToken, baseUrl, webBaseUrl, projectPathCache } = input;
91
+ const projectPath = yield getProjectPath(projectId, authToken, baseUrl, projectPathCache);
92
+ const commit = yield gitlabFetch(`${baseUrl}/projects/${projectId}/repository/commits/${sha}`, authToken);
93
+ const diffs = yield gitlabFetch(`${baseUrl}/projects/${projectId}/repository/commits/${sha}/diff`, authToken);
94
+ return {
95
+ sha: commit.id,
96
+ web_url: `${webBaseUrl}/${projectPath}/-/commit/${commit.id}`,
97
+ message: commit.message,
98
+ author: {
99
+ name: commit.author_name,
100
+ email: commit.author_email,
101
+ },
102
+ created_at: commit.created_at,
103
+ files: (diffs || []).slice(0, MAX_FILES_PER_COMMIT).map(diff => ({
104
+ old_path: diff.old_path,
105
+ new_path: diff.new_path,
106
+ diff: diff.diff ? diff.diff.split("\n").slice(0, MAX_PATCH_LINES).join("\n") : "",
107
+ })),
108
+ };
93
109
  });
94
110
  }
95
- /**
96
- * Searches for merge requests and blobs in a GitLab group
97
- */
98
111
  const searchGroup = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
99
112
  const { authToken, baseUrl } = authParams;
100
113
  const gitlabBaseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : GITLAB_API_URL;
101
114
  const gitlabBaseApiUrl = `${gitlabBaseUrl}/api/v4`;
102
- if (!authToken) {
115
+ if (!authToken)
103
116
  throw new Error(MISSING_AUTH_TOKEN);
104
- }
105
117
  const { query, groupId } = params;
106
- const [mrResults, blobResults] = yield Promise.all([
118
+ const projectPathCache = createProjectPathCache();
119
+ // --- Top-level: run all searches in parallel
120
+ const [mrResults, blobResults, commitResults] = yield Promise.all([
107
121
  globalSearch({
108
122
  scope: "merge_requests",
109
123
  query,
@@ -118,38 +132,52 @@ const searchGroup = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params,
118
132
  authToken,
119
133
  baseUrl: gitlabBaseApiUrl,
120
134
  }),
121
- ]);
122
- const mergeRequests = yield Promise.all(mrResults.map((metadata) => __awaiter(void 0, void 0, void 0, function* () {
123
- const diffs = yield getMRDiffs({
124
- projectId: metadata.project_id,
125
- mrIid: metadata.iid,
135
+ globalSearch({
136
+ scope: "commits",
137
+ query,
138
+ groupId,
126
139
  authToken,
127
140
  baseUrl: gitlabBaseApiUrl,
128
- });
141
+ }),
142
+ ]);
143
+ // --- Merge Requests: diffs in parallel
144
+ const limitedMRResults = mrResults.slice(0, MAX_ISSUES_OR_PRS);
145
+ const mergeRequests = yield Promise.all(limitedMRResults.map((metadata) => __awaiter(void 0, void 0, void 0, function* () {
146
+ let diffs = yield gitlabFetch(`${gitlabBaseApiUrl}/projects/${metadata.project_id}/merge_requests/${metadata.iid}/diffs`, authToken);
147
+ diffs = (diffs || []).slice(0, MAX_FILES_PER_PR).map(diff => (Object.assign(Object.assign({}, diff), { diff: diff.diff ? diff.diff.split("\n").slice(0, MAX_PATCH_LINES).join("\n") : diff.diff })));
129
148
  return { metadata, diffs };
130
149
  })));
131
- // Enhance blobs with web URLs
132
- const blobsWithUrls = yield Promise.all(blobResults.map(blob => enhanceBlobWithUrl(blob, authToken, gitlabBaseApiUrl, gitlabBaseUrl)));
150
+ // --- Blobs: enhance with URL in parallel
151
+ const limitedBlobResults = blobResults.slice(0, MAX_CODE_RESULTS);
152
+ const blobsWithUrls = yield Promise.all(limitedBlobResults.map(blob => enhanceBlobWithUrl(blob, authToken, gitlabBaseApiUrl, gitlabBaseUrl, projectPathCache)));
133
153
  const blobs = blobsWithUrls.map(blob => {
134
154
  const matches = mergeRequests
135
155
  .filter(mr => mr.metadata.project_id === blob.project_id && mr.diffs.some(diff => diff.new_path === blob.path))
136
- .map(mr => {
137
- var _a;
138
- return ({
139
- title: mr.metadata.title,
140
- web_url: mr.metadata.web_url,
141
- author: (_a = mr.metadata.author) === null || _a === void 0 ? void 0 : _a.name,
142
- merged_at: mr.metadata.merged_at,
143
- });
144
- });
156
+ .map(mr => ({
157
+ title: mr.metadata.title,
158
+ web_url: mr.metadata.web_url,
159
+ author: mr.metadata.author ? { name: mr.metadata.author.name } : undefined,
160
+ merged_at: mr.metadata.merged_at,
161
+ }));
145
162
  return {
146
- metadata: blob,
147
- matched_merge_requests: matches,
163
+ metadata: Object.assign(Object.assign({}, blob), { data: blob.data.split("\n").slice(0, MAX_FRAGMENT_LINES).join("\n") }),
164
+ matchedMergeRequests: matches,
148
165
  };
149
166
  });
167
+ // --- Commits: details in parallel
168
+ const limitedCommitResults = commitResults.slice(0, MAX_COMMITS);
169
+ const commits = yield Promise.all(limitedCommitResults.map(commit => getCommitDetails({
170
+ projectId: commit.project_id,
171
+ sha: commit.id,
172
+ authToken,
173
+ baseUrl: gitlabBaseApiUrl,
174
+ webBaseUrl: gitlabBaseUrl,
175
+ projectPathCache,
176
+ })));
150
177
  return {
151
178
  mergeRequests,
152
179
  blobs,
180
+ commits,
153
181
  };
154
182
  });
155
183
  export default searchGroup;
@@ -0,0 +1,3 @@
1
+ import type { googleOauthGetDriveFileContentByIDFunction } from "../../autogen/types.js";
2
+ declare const getDriveFileContentByID: googleOauthGetDriveFileContentByIDFunction;
3
+ export default getDriveFileContentByID;