@credal/actions 0.2.43 → 0.2.45
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.
- package/dist/actions/actionMapper.js +7 -1
- package/dist/actions/autogen/templates.d.ts +1 -0
- package/dist/actions/autogen/templates.js +81 -1
- package/dist/actions/autogen/types.d.ts +68 -0
- package/dist/actions/autogen/types.js +28 -0
- package/dist/actions/groups.js +2 -1
- package/dist/actions/providers/google-oauth/getDriveFileContentById.js +19 -4
- package/dist/actions/providers/google-oauth/searchDriveByQuery.js +47 -12
- package/dist/actions/providers/google-oauth/searchDriveByQueryAndGetFileContent.d.ts +3 -0
- package/dist/actions/providers/google-oauth/searchDriveByQueryAndGetFileContent.js +58 -0
- package/dist/utils/pdf.d.ts +1 -0
- package/dist/utils/pdf.js +40 -0
- package/package.json +2 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { genericFillTemplateParamsSchema, genericFillTemplateOutputSchema, confluenceOverwritePageParamsSchema, confluenceOverwritePageOutputSchema, googlemapsValidateAddressOutputSchema, googlemapsValidateAddressParamsSchema, googleOauthCreateNewGoogleDocParamsSchema, googleOauthCreateNewGoogleDocOutputSchema, mathAddOutputSchema, mathAddParamsSchema, mongoInsertMongoDocOutputSchema, mongoInsertMongoDocParamsSchema, slackSendMessageOutputSchema, slackSendMessageParamsSchema, slackGetChannelMessagesOutputSchema, slackGetChannelMessagesParamsSchema, slackArchiveChannelParamsSchema, slackArchiveChannelOutputSchema, slackCreateChannelParamsSchema, slackCreateChannelOutputSchema, snowflakeGetRowByFieldValueOutputSchema, snowflakeGetRowByFieldValueParamsSchema, zendeskCreateZendeskTicketOutputSchema, zendeskCreateZendeskTicketParamsSchema, zendeskGetTicketDetailsOutputSchema, zendeskGetTicketDetailsParamsSchema, zendeskUpdateTicketStatusOutputSchema, zendeskUpdateTicketStatusParamsSchema, zendeskAddCommentToTicketOutputSchema, zendeskAddCommentToTicketParamsSchema, zendeskAssignTicketOutputSchema, zendeskAssignTicketParamsSchema, zendeskListZendeskTicketsOutputSchema, zendeskListZendeskTicketsParamsSchema, jiraAssignJiraTicketParamsSchema, jiraAssignJiraTicketOutputSchema, jiraCommentJiraTicketParamsSchema, jiraCommentJiraTicketOutputSchema, jiraCreateJiraTicketParamsSchema, jiraCreateJiraTicketOutputSchema, jiraGetJiraTicketDetailsParamsSchema, jiraGetJiraTicketDetailsOutputSchema, jiraGetJiraTicketHistoryParamsSchema, jiraGetJiraTicketHistoryOutputSchema, jiraUpdateJiraTicketDetailsParamsSchema, jiraUpdateJiraTicketDetailsOutputSchema, jiraUpdateJiraTicketStatusParamsSchema, jiraUpdateJiraTicketStatusOutputSchema, jiraGetServiceDesksParamsSchema, jiraGetServiceDesksOutputSchema, jiraCreateServiceDeskRequestParamsSchema, jiraCreateServiceDeskRequestOutputSchema, openstreetmapGetLatitudeLongitudeFromLocationParamsSchema, openstreetmapGetLatitudeLongitudeFromLocationOutputSchema, nwsGetForecastForLocationParamsSchema, nwsGetForecastForLocationOutputSchema, googlemapsNearbysearchRestaurantsOutputSchema, googlemapsNearbysearchRestaurantsParamsSchema, firecrawlScrapeUrlOutputSchema, firecrawlScrapeUrlParamsSchema, resendSendEmailOutputSchema, firecrawlScrapeTweetDataWithNitterParamsSchema, firecrawlScrapeTweetDataWithNitterOutputSchema, resendSendEmailParamsSchema, linkedinCreateShareLinkedinPostUrlParamsSchema, linkedinCreateShareLinkedinPostUrlOutputSchema, xCreateShareXPostUrlParamsSchema, xCreateShareXPostUrlOutputSchema, finnhubSymbolLookupParamsSchema, finnhubSymbolLookupOutputSchema, finnhubGetBasicFinancialsParamsSchema, finnhubGetBasicFinancialsOutputSchema, confluenceFetchPageContentParamsSchema, confluenceFetchPageContentOutputSchema, snowflakeRunSnowflakeQueryParamsSchema, snowflakeRunSnowflakeQueryOutputSchema, lookerEnableUserByEmailParamsSchema, lookerEnableUserByEmailOutputSchema, googleOauthUpdateDocParamsSchema, googleOauthUpdateDocOutputSchema, googleOauthCreateSpreadsheetParamsSchema, googleOauthCreateSpreadsheetOutputSchema, googleOauthUpdateSpreadsheetParamsSchema, googleOauthUpdateSpreadsheetOutputSchema, googleOauthScheduleCalendarMeetingParamsSchema, googleOauthScheduleCalendarMeetingOutputSchema, googleOauthListCalendarsParamsSchema, googleOauthListCalendarsOutputSchema, googleOauthListCalendarEventsParamsSchema, googleOauthListCalendarEventsOutputSchema, googleOauthUpdateCalendarEventParamsSchema, googleOauthUpdateCalendarEventOutputSchema, googleOauthDeleteCalendarEventParamsSchema, googleOauthDeleteCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, gongGetGongTranscriptsParamsSchema, gongGetGongTranscriptsOutputSchema, ashbyCreateNoteParamsSchema, ashbyCreateNoteOutputSchema, ashbyGetCandidateInfoParamsSchema, ashbyGetCandidateInfoOutputSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, ashbyListCandidatesParamsSchema, ashbyListCandidatesOutputSchema, ashbyListCandidateNotesParamsSchema, ashbyListCandidateNotesOutputSchema, ashbySearchCandidatesParamsSchema, ashbySearchCandidatesOutputSchema, ashbyCreateCandidateParamsSchema, ashbyCreateCandidateOutputSchema, ashbyUpdateCandidateParamsSchema, ashbyUpdateCandidateOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, salesforceFetchSalesforceSchemaByObjectParamsSchema, salesforceFetchSalesforceSchemaByObjectOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, ashbyAddCandidateToProjectParamsSchema, ashbyAddCandidateToProjectOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, kandjiGetFVRecoveryKeyForDeviceParamsSchema, kandjiGetFVRecoveryKeyForDeviceOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, jamfGetJamfComputerInventoryParamsSchema, jamfGetJamfComputerInventoryOutputSchema, jamfGetJamfFileVaultRecoveryKeyParamsSchema, jamfGetJamfFileVaultRecoveryKeyOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, oktaListOktaUsersParamsSchema, oktaListOktaUsersOutputSchema, oktaGetOktaUserParamsSchema, oktaGetOktaUserOutputSchema, oktaListOktaUserGroupsParamsSchema, oktaListOktaUserGroupsOutputSchema, oktaListOktaGroupsParamsSchema, oktaListOktaGroupsOutputSchema, oktaGetOktaGroupParamsSchema, oktaGetOktaGroupOutputSchema, oktaListOktaGroupMembersParamsSchema, oktaListOktaGroupMembersOutputSchema, oktaRemoveUserFromGroupParamsSchema, oktaRemoveUserFromGroupOutputSchema, oktaAddUserToGroupParamsSchema, oktaAddUserToGroupOutputSchema, oktaResetPasswordParamsSchema, oktaResetPasswordOutputSchema, oktaResetMFAParamsSchema, oktaResetMFAOutputSchema, oktaListMFAParamsSchema, oktaListMFAOutputSchema, jamfGetJamfUserComputerIdParamsSchema, jamfGetJamfUserComputerIdOutputSchema, jamfLockJamfComputerByIdParamsSchema, jamfLockJamfComputerByIdOutputSchema, oktaTriggerOktaWorkflowParamsSchema, oktaTriggerOktaWorkflowOutputSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchRepositoryOutputSchema, githubSearchRepositoryParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, googleOauthSearchDriveByQueryOutputSchema, googleOauthSearchDriveByQueryParamsSchema, } from "./autogen/types.js";
|
1
|
+
import { genericFillTemplateParamsSchema, genericFillTemplateOutputSchema, confluenceOverwritePageParamsSchema, confluenceOverwritePageOutputSchema, googlemapsValidateAddressOutputSchema, googlemapsValidateAddressParamsSchema, googleOauthCreateNewGoogleDocParamsSchema, googleOauthCreateNewGoogleDocOutputSchema, mathAddOutputSchema, mathAddParamsSchema, mongoInsertMongoDocOutputSchema, mongoInsertMongoDocParamsSchema, slackSendMessageOutputSchema, slackSendMessageParamsSchema, slackGetChannelMessagesOutputSchema, slackGetChannelMessagesParamsSchema, slackArchiveChannelParamsSchema, slackArchiveChannelOutputSchema, slackCreateChannelParamsSchema, slackCreateChannelOutputSchema, snowflakeGetRowByFieldValueOutputSchema, snowflakeGetRowByFieldValueParamsSchema, zendeskCreateZendeskTicketOutputSchema, zendeskCreateZendeskTicketParamsSchema, zendeskGetTicketDetailsOutputSchema, zendeskGetTicketDetailsParamsSchema, zendeskUpdateTicketStatusOutputSchema, zendeskUpdateTicketStatusParamsSchema, zendeskAddCommentToTicketOutputSchema, zendeskAddCommentToTicketParamsSchema, zendeskAssignTicketOutputSchema, zendeskAssignTicketParamsSchema, zendeskListZendeskTicketsOutputSchema, zendeskListZendeskTicketsParamsSchema, jiraAssignJiraTicketParamsSchema, jiraAssignJiraTicketOutputSchema, jiraCommentJiraTicketParamsSchema, jiraCommentJiraTicketOutputSchema, jiraCreateJiraTicketParamsSchema, jiraCreateJiraTicketOutputSchema, jiraGetJiraTicketDetailsParamsSchema, jiraGetJiraTicketDetailsOutputSchema, jiraGetJiraTicketHistoryParamsSchema, jiraGetJiraTicketHistoryOutputSchema, jiraUpdateJiraTicketDetailsParamsSchema, jiraUpdateJiraTicketDetailsOutputSchema, jiraUpdateJiraTicketStatusParamsSchema, jiraUpdateJiraTicketStatusOutputSchema, jiraGetServiceDesksParamsSchema, jiraGetServiceDesksOutputSchema, jiraCreateServiceDeskRequestParamsSchema, jiraCreateServiceDeskRequestOutputSchema, openstreetmapGetLatitudeLongitudeFromLocationParamsSchema, openstreetmapGetLatitudeLongitudeFromLocationOutputSchema, nwsGetForecastForLocationParamsSchema, nwsGetForecastForLocationOutputSchema, googlemapsNearbysearchRestaurantsOutputSchema, googlemapsNearbysearchRestaurantsParamsSchema, firecrawlScrapeUrlOutputSchema, firecrawlScrapeUrlParamsSchema, resendSendEmailOutputSchema, firecrawlScrapeTweetDataWithNitterParamsSchema, firecrawlScrapeTweetDataWithNitterOutputSchema, resendSendEmailParamsSchema, linkedinCreateShareLinkedinPostUrlParamsSchema, linkedinCreateShareLinkedinPostUrlOutputSchema, xCreateShareXPostUrlParamsSchema, xCreateShareXPostUrlOutputSchema, finnhubSymbolLookupParamsSchema, finnhubSymbolLookupOutputSchema, finnhubGetBasicFinancialsParamsSchema, finnhubGetBasicFinancialsOutputSchema, confluenceFetchPageContentParamsSchema, confluenceFetchPageContentOutputSchema, snowflakeRunSnowflakeQueryParamsSchema, snowflakeRunSnowflakeQueryOutputSchema, lookerEnableUserByEmailParamsSchema, lookerEnableUserByEmailOutputSchema, googleOauthUpdateDocParamsSchema, googleOauthUpdateDocOutputSchema, googleOauthCreateSpreadsheetParamsSchema, googleOauthCreateSpreadsheetOutputSchema, googleOauthUpdateSpreadsheetParamsSchema, googleOauthUpdateSpreadsheetOutputSchema, googleOauthScheduleCalendarMeetingParamsSchema, googleOauthScheduleCalendarMeetingOutputSchema, googleOauthListCalendarsParamsSchema, googleOauthListCalendarsOutputSchema, googleOauthListCalendarEventsParamsSchema, googleOauthListCalendarEventsOutputSchema, googleOauthUpdateCalendarEventParamsSchema, googleOauthUpdateCalendarEventOutputSchema, googleOauthDeleteCalendarEventParamsSchema, googleOauthDeleteCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, gongGetGongTranscriptsParamsSchema, gongGetGongTranscriptsOutputSchema, ashbyCreateNoteParamsSchema, ashbyCreateNoteOutputSchema, ashbyGetCandidateInfoParamsSchema, ashbyGetCandidateInfoOutputSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, ashbyListCandidatesParamsSchema, ashbyListCandidatesOutputSchema, ashbyListCandidateNotesParamsSchema, ashbyListCandidateNotesOutputSchema, ashbySearchCandidatesParamsSchema, ashbySearchCandidatesOutputSchema, ashbyCreateCandidateParamsSchema, ashbyCreateCandidateOutputSchema, ashbyUpdateCandidateParamsSchema, ashbyUpdateCandidateOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, salesforceFetchSalesforceSchemaByObjectParamsSchema, salesforceFetchSalesforceSchemaByObjectOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, ashbyAddCandidateToProjectParamsSchema, ashbyAddCandidateToProjectOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, kandjiGetFVRecoveryKeyForDeviceParamsSchema, kandjiGetFVRecoveryKeyForDeviceOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, jamfGetJamfComputerInventoryParamsSchema, jamfGetJamfComputerInventoryOutputSchema, jamfGetJamfFileVaultRecoveryKeyParamsSchema, jamfGetJamfFileVaultRecoveryKeyOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, oktaListOktaUsersParamsSchema, oktaListOktaUsersOutputSchema, oktaGetOktaUserParamsSchema, oktaGetOktaUserOutputSchema, oktaListOktaUserGroupsParamsSchema, oktaListOktaUserGroupsOutputSchema, oktaListOktaGroupsParamsSchema, oktaListOktaGroupsOutputSchema, oktaGetOktaGroupParamsSchema, oktaGetOktaGroupOutputSchema, oktaListOktaGroupMembersParamsSchema, oktaListOktaGroupMembersOutputSchema, oktaRemoveUserFromGroupParamsSchema, oktaRemoveUserFromGroupOutputSchema, oktaAddUserToGroupParamsSchema, oktaAddUserToGroupOutputSchema, oktaResetPasswordParamsSchema, oktaResetPasswordOutputSchema, oktaResetMFAParamsSchema, oktaResetMFAOutputSchema, oktaListMFAParamsSchema, oktaListMFAOutputSchema, jamfGetJamfUserComputerIdParamsSchema, jamfGetJamfUserComputerIdOutputSchema, jamfLockJamfComputerByIdParamsSchema, jamfLockJamfComputerByIdOutputSchema, oktaTriggerOktaWorkflowParamsSchema, oktaTriggerOktaWorkflowOutputSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchRepositoryOutputSchema, githubSearchRepositoryParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, googleOauthSearchDriveByQueryOutputSchema, googleOauthSearchDriveByQueryParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentOutputSchema, } 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";
|
@@ -115,6 +115,7 @@ import createServiceDeskRequest from "./providers/jira/createServiceDeskRequest.
|
|
115
115
|
import searchSalesforceRecords from "./providers/salesforce/searchSalesforceRecords.js";
|
116
116
|
import getDriveFileContentById from "./providers/google-oauth/getDriveFileContentById.js";
|
117
117
|
import searchDriveByQuery from "./providers/google-oauth/searchDriveByQuery.js";
|
118
|
+
import searchDriveByQueryAndGetFileContent from "./providers/google-oauth/searchDriveByQueryAndGetFileContent.js";
|
118
119
|
const jiraActions = {
|
119
120
|
getJiraIssuesByQuery: {
|
120
121
|
fn: getJiraIssuesByQuery,
|
@@ -440,6 +441,11 @@ export const ActionMapper = {
|
|
440
441
|
paramsSchema: googleOauthSearchDriveByQueryParamsSchema,
|
441
442
|
outputSchema: googleOauthSearchDriveByQueryOutputSchema,
|
442
443
|
},
|
444
|
+
searchDriveByQueryAndGetFileContent: {
|
445
|
+
fn: searchDriveByQueryAndGetFileContent,
|
446
|
+
paramsSchema: googleOauthSearchDriveByQueryAndGetFileContentParamsSchema,
|
447
|
+
outputSchema: googleOauthSearchDriveByQueryAndGetFileContentOutputSchema,
|
448
|
+
},
|
443
449
|
getDriveFileContentById: {
|
444
450
|
fn: getDriveFileContentById,
|
445
451
|
paramsSchema: googleOauthGetDriveFileContentByIdParamsSchema,
|
@@ -67,6 +67,7 @@ export declare const googleOauthCreatePresentationDefinition: ActionTemplate;
|
|
67
67
|
export declare const googleOauthUpdatePresentationDefinition: ActionTemplate;
|
68
68
|
export declare const googleOauthSearchDriveByKeywordsDefinition: ActionTemplate;
|
69
69
|
export declare const googleOauthSearchDriveByQueryDefinition: ActionTemplate;
|
70
|
+
export declare const googleOauthSearchDriveByQueryAndGetFileContentDefinition: ActionTemplate;
|
70
71
|
export declare const googleOauthGetDriveFileContentByIdDefinition: ActionTemplate;
|
71
72
|
export declare const googleOauthListGroupsDefinition: ActionTemplate;
|
72
73
|
export declare const googleOauthGetGroupDefinition: ActionTemplate;
|
@@ -6193,7 +6193,7 @@ export const googleOauthSearchDriveByKeywordsDefinition = {
|
|
6193
6193
|
provider: "googleOauth",
|
6194
6194
|
};
|
6195
6195
|
export const googleOauthSearchDriveByQueryDefinition = {
|
6196
|
-
description: "Search Google Drive files based on a
|
6196
|
+
description: "Search Google Drive files based on a google drive query provided.",
|
6197
6197
|
scopes: ["drive.readonly"],
|
6198
6198
|
parameters: {
|
6199
6199
|
type: "object",
|
@@ -6211,6 +6211,10 @@ export const googleOauthSearchDriveByQueryDefinition = {
|
|
6211
6211
|
type: "boolean",
|
6212
6212
|
description: "Whether we should search drive by drive or run a general search",
|
6213
6213
|
},
|
6214
|
+
orderByQuery: {
|
6215
|
+
type: "string",
|
6216
|
+
description: "The orderBy query for sorting results (e.g., 'modifiedTime desc', 'name', 'createdTime desc'). Defaults to 'modifiedTime desc'",
|
6217
|
+
},
|
6214
6218
|
},
|
6215
6219
|
},
|
6216
6220
|
output: {
|
@@ -6256,6 +6260,82 @@ export const googleOauthSearchDriveByQueryDefinition = {
|
|
6256
6260
|
name: "searchDriveByQuery",
|
6257
6261
|
provider: "googleOauth",
|
6258
6262
|
};
|
6263
|
+
export const googleOauthSearchDriveByQueryAndGetFileContentDefinition = {
|
6264
|
+
description: "Search Google Drive files based on a google drive query provided and get content for each file",
|
6265
|
+
scopes: ["drive.readonly"],
|
6266
|
+
parameters: {
|
6267
|
+
type: "object",
|
6268
|
+
required: ["query", "searchDriveByDrive"],
|
6269
|
+
properties: {
|
6270
|
+
query: {
|
6271
|
+
type: "string",
|
6272
|
+
description: "The query to search for in file contents.",
|
6273
|
+
},
|
6274
|
+
limit: {
|
6275
|
+
type: "number",
|
6276
|
+
description: "The maximum number of files to return",
|
6277
|
+
},
|
6278
|
+
fileSizeLimit: {
|
6279
|
+
type: "number",
|
6280
|
+
description: "The maximum length of a file in characters",
|
6281
|
+
},
|
6282
|
+
searchDriveByDrive: {
|
6283
|
+
type: "boolean",
|
6284
|
+
description: "Whether we should search drive by drive or run a general search",
|
6285
|
+
},
|
6286
|
+
orderByQuery: {
|
6287
|
+
type: "string",
|
6288
|
+
description: "The orderBy query for sorting results (e.g., 'modifiedTime desc', 'name', 'createdTime desc'). Defaults to 'modifiedTime desc'",
|
6289
|
+
},
|
6290
|
+
},
|
6291
|
+
},
|
6292
|
+
output: {
|
6293
|
+
type: "object",
|
6294
|
+
required: ["success"],
|
6295
|
+
properties: {
|
6296
|
+
success: {
|
6297
|
+
type: "boolean",
|
6298
|
+
description: "Whether the search was successful",
|
6299
|
+
},
|
6300
|
+
files: {
|
6301
|
+
type: "array",
|
6302
|
+
description: "List of files matching the search",
|
6303
|
+
items: {
|
6304
|
+
type: "object",
|
6305
|
+
required: ["id", "name", "mimeType", "url"],
|
6306
|
+
properties: {
|
6307
|
+
id: {
|
6308
|
+
type: "string",
|
6309
|
+
description: "The file ID",
|
6310
|
+
},
|
6311
|
+
name: {
|
6312
|
+
type: "string",
|
6313
|
+
description: "The file name",
|
6314
|
+
},
|
6315
|
+
mimeType: {
|
6316
|
+
type: "string",
|
6317
|
+
description: "The MIME type of the file",
|
6318
|
+
},
|
6319
|
+
url: {
|
6320
|
+
type: "string",
|
6321
|
+
description: "The web link to view the file",
|
6322
|
+
},
|
6323
|
+
content: {
|
6324
|
+
type: "string",
|
6325
|
+
description: "The data returned from the file limited by fileLimit",
|
6326
|
+
},
|
6327
|
+
},
|
6328
|
+
},
|
6329
|
+
},
|
6330
|
+
error: {
|
6331
|
+
type: "string",
|
6332
|
+
description: "Error message if search failed",
|
6333
|
+
},
|
6334
|
+
},
|
6335
|
+
},
|
6336
|
+
name: "searchDriveByQueryAndGetFileContent",
|
6337
|
+
provider: "googleOauth",
|
6338
|
+
};
|
6259
6339
|
export const googleOauthGetDriveFileContentByIdDefinition = {
|
6260
6340
|
description: "Get text content of a Google Drive file by its ID.",
|
6261
6341
|
scopes: ["drive.readonly"],
|
@@ -3304,14 +3304,17 @@ export declare const googleOauthSearchDriveByQueryParamsSchema: z.ZodObject<{
|
|
3304
3304
|
query: z.ZodString;
|
3305
3305
|
limit: z.ZodOptional<z.ZodNumber>;
|
3306
3306
|
searchDriveByDrive: z.ZodBoolean;
|
3307
|
+
orderByQuery: z.ZodOptional<z.ZodString>;
|
3307
3308
|
}, "strip", z.ZodTypeAny, {
|
3308
3309
|
query: string;
|
3309
3310
|
searchDriveByDrive: boolean;
|
3310
3311
|
limit?: number | undefined;
|
3312
|
+
orderByQuery?: string | undefined;
|
3311
3313
|
}, {
|
3312
3314
|
query: string;
|
3313
3315
|
searchDriveByDrive: boolean;
|
3314
3316
|
limit?: number | undefined;
|
3317
|
+
orderByQuery?: string | undefined;
|
3315
3318
|
}>;
|
3316
3319
|
export type googleOauthSearchDriveByQueryParamsType = z.infer<typeof googleOauthSearchDriveByQueryParamsSchema>;
|
3317
3320
|
export declare const googleOauthSearchDriveByQueryOutputSchema: z.ZodObject<{
|
@@ -3354,6 +3357,71 @@ export declare const googleOauthSearchDriveByQueryOutputSchema: z.ZodObject<{
|
|
3354
3357
|
}>;
|
3355
3358
|
export type googleOauthSearchDriveByQueryOutputType = z.infer<typeof googleOauthSearchDriveByQueryOutputSchema>;
|
3356
3359
|
export type googleOauthSearchDriveByQueryFunction = ActionFunction<googleOauthSearchDriveByQueryParamsType, AuthParamsType, googleOauthSearchDriveByQueryOutputType>;
|
3360
|
+
export declare const googleOauthSearchDriveByQueryAndGetFileContentParamsSchema: z.ZodObject<{
|
3361
|
+
query: z.ZodString;
|
3362
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
3363
|
+
fileSizeLimit: z.ZodOptional<z.ZodNumber>;
|
3364
|
+
searchDriveByDrive: z.ZodBoolean;
|
3365
|
+
orderByQuery: z.ZodOptional<z.ZodString>;
|
3366
|
+
}, "strip", z.ZodTypeAny, {
|
3367
|
+
query: string;
|
3368
|
+
searchDriveByDrive: boolean;
|
3369
|
+
limit?: number | undefined;
|
3370
|
+
orderByQuery?: string | undefined;
|
3371
|
+
fileSizeLimit?: number | undefined;
|
3372
|
+
}, {
|
3373
|
+
query: string;
|
3374
|
+
searchDriveByDrive: boolean;
|
3375
|
+
limit?: number | undefined;
|
3376
|
+
orderByQuery?: string | undefined;
|
3377
|
+
fileSizeLimit?: number | undefined;
|
3378
|
+
}>;
|
3379
|
+
export type googleOauthSearchDriveByQueryAndGetFileContentParamsType = z.infer<typeof googleOauthSearchDriveByQueryAndGetFileContentParamsSchema>;
|
3380
|
+
export declare const googleOauthSearchDriveByQueryAndGetFileContentOutputSchema: z.ZodObject<{
|
3381
|
+
success: z.ZodBoolean;
|
3382
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
3383
|
+
id: z.ZodString;
|
3384
|
+
name: z.ZodString;
|
3385
|
+
mimeType: z.ZodString;
|
3386
|
+
url: z.ZodString;
|
3387
|
+
content: z.ZodOptional<z.ZodString>;
|
3388
|
+
}, "strip", z.ZodTypeAny, {
|
3389
|
+
name: string;
|
3390
|
+
id: string;
|
3391
|
+
url: string;
|
3392
|
+
mimeType: string;
|
3393
|
+
content?: string | undefined;
|
3394
|
+
}, {
|
3395
|
+
name: string;
|
3396
|
+
id: string;
|
3397
|
+
url: string;
|
3398
|
+
mimeType: string;
|
3399
|
+
content?: string | undefined;
|
3400
|
+
}>, "many">>;
|
3401
|
+
error: z.ZodOptional<z.ZodString>;
|
3402
|
+
}, "strip", z.ZodTypeAny, {
|
3403
|
+
success: boolean;
|
3404
|
+
error?: string | undefined;
|
3405
|
+
files?: {
|
3406
|
+
name: string;
|
3407
|
+
id: string;
|
3408
|
+
url: string;
|
3409
|
+
mimeType: string;
|
3410
|
+
content?: string | undefined;
|
3411
|
+
}[] | undefined;
|
3412
|
+
}, {
|
3413
|
+
success: boolean;
|
3414
|
+
error?: string | undefined;
|
3415
|
+
files?: {
|
3416
|
+
name: string;
|
3417
|
+
id: string;
|
3418
|
+
url: string;
|
3419
|
+
mimeType: string;
|
3420
|
+
content?: string | undefined;
|
3421
|
+
}[] | undefined;
|
3422
|
+
}>;
|
3423
|
+
export type googleOauthSearchDriveByQueryAndGetFileContentOutputType = z.infer<typeof googleOauthSearchDriveByQueryAndGetFileContentOutputSchema>;
|
3424
|
+
export type googleOauthSearchDriveByQueryAndGetFileContentFunction = ActionFunction<googleOauthSearchDriveByQueryAndGetFileContentParamsType, AuthParamsType, googleOauthSearchDriveByQueryAndGetFileContentOutputType>;
|
3357
3425
|
export declare const googleOauthGetDriveFileContentByIdParamsSchema: z.ZodObject<{
|
3358
3426
|
fileId: z.ZodString;
|
3359
3427
|
limit: z.ZodNumber;
|
@@ -2387,6 +2387,10 @@ export const googleOauthSearchDriveByQueryParamsSchema = z.object({
|
|
2387
2387
|
query: z.string().describe("The query to search for in file contents."),
|
2388
2388
|
limit: z.number().describe("The maximum number of files to return").optional(),
|
2389
2389
|
searchDriveByDrive: z.boolean().describe("Whether we should search drive by drive or run a general search"),
|
2390
|
+
orderByQuery: z
|
2391
|
+
.string()
|
2392
|
+
.describe("The orderBy query for sorting results (e.g., 'modifiedTime desc', 'name', 'createdTime desc'). Defaults to 'modifiedTime desc'")
|
2393
|
+
.optional(),
|
2390
2394
|
});
|
2391
2395
|
export const googleOauthSearchDriveByQueryOutputSchema = z.object({
|
2392
2396
|
success: z.boolean().describe("Whether the search was successful"),
|
@@ -2401,6 +2405,30 @@ export const googleOauthSearchDriveByQueryOutputSchema = z.object({
|
|
2401
2405
|
.optional(),
|
2402
2406
|
error: z.string().describe("Error message if search failed").optional(),
|
2403
2407
|
});
|
2408
|
+
export const googleOauthSearchDriveByQueryAndGetFileContentParamsSchema = z.object({
|
2409
|
+
query: z.string().describe("The query to search for in file contents."),
|
2410
|
+
limit: z.number().describe("The maximum number of files to return").optional(),
|
2411
|
+
fileSizeLimit: z.number().describe("The maximum length of a file in characters").optional(),
|
2412
|
+
searchDriveByDrive: z.boolean().describe("Whether we should search drive by drive or run a general search"),
|
2413
|
+
orderByQuery: z
|
2414
|
+
.string()
|
2415
|
+
.describe("The orderBy query for sorting results (e.g., 'modifiedTime desc', 'name', 'createdTime desc'). Defaults to 'modifiedTime desc'")
|
2416
|
+
.optional(),
|
2417
|
+
});
|
2418
|
+
export const googleOauthSearchDriveByQueryAndGetFileContentOutputSchema = z.object({
|
2419
|
+
success: z.boolean().describe("Whether the search was successful"),
|
2420
|
+
files: z
|
2421
|
+
.array(z.object({
|
2422
|
+
id: z.string().describe("The file ID"),
|
2423
|
+
name: z.string().describe("The file name"),
|
2424
|
+
mimeType: z.string().describe("The MIME type of the file"),
|
2425
|
+
url: z.string().describe("The web link to view the file"),
|
2426
|
+
content: z.string().describe("The data returned from the file limited by fileLimit").optional(),
|
2427
|
+
}))
|
2428
|
+
.describe("List of files matching the search")
|
2429
|
+
.optional(),
|
2430
|
+
error: z.string().describe("Error message if search failed").optional(),
|
2431
|
+
});
|
2404
2432
|
export const googleOauthGetDriveFileContentByIdParamsSchema = z.object({
|
2405
2433
|
fileId: z.string().describe("The ID of the file to get content from"),
|
2406
2434
|
limit: z.number().describe("The character limit for the file content"),
|
package/dist/actions/groups.js
CHANGED
@@ -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, 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, } 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
|
},
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
10
10
|
import { axiosClient } from "../../util/axiosClient.js";
|
11
11
|
import mammoth from "mammoth";
|
12
12
|
import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
13
|
+
import { extractTextFromPdf } from "../../../utils/pdf.js";
|
13
14
|
const getDriveFileContentById = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
14
15
|
if (!authParams.authToken) {
|
15
16
|
return { success: false, error: MISSING_AUTH_TOKEN };
|
@@ -75,10 +76,24 @@ const getDriveFileContentById = (_a) => __awaiter(void 0, [_a], void 0, function
|
|
75
76
|
content = exportRes.data;
|
76
77
|
}
|
77
78
|
else if (mimeType === "application/pdf") {
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
// PDF files - download and extract text using pdfjs-dist
|
80
|
+
const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media${sharedDriveParams}`;
|
81
|
+
const downloadRes = yield axiosClient.get(downloadUrl, {
|
82
|
+
headers: {
|
83
|
+
Authorization: `Bearer ${authParams.authToken}`,
|
84
|
+
},
|
85
|
+
responseType: "arraybuffer",
|
86
|
+
});
|
87
|
+
try {
|
88
|
+
content = yield extractTextFromPdf(downloadRes.data);
|
89
|
+
}
|
90
|
+
catch (e) {
|
91
|
+
return {
|
92
|
+
success: false,
|
93
|
+
error: `Failed to parse PDF document: ${e instanceof Error ? e.message : JSON.stringify(e)}`,
|
94
|
+
};
|
95
|
+
}
|
96
|
+
// Extract text from PDF
|
82
97
|
}
|
83
98
|
else if (mimeType === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ||
|
84
99
|
mimeType === "application/msword") {
|
@@ -9,17 +9,46 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
};
|
10
10
|
import { axiosClient } from "../../util/axiosClient.js";
|
11
11
|
import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
12
|
+
// Helper function to check if a file should be excluded (images and folders)
|
13
|
+
const shouldExcludeFile = (file) => {
|
14
|
+
const mimeType = file.mimeType.toLowerCase();
|
15
|
+
// Exclude folders
|
16
|
+
if (mimeType === "application/vnd.google-apps.folder") {
|
17
|
+
return true;
|
18
|
+
}
|
19
|
+
// Exclude common image formats
|
20
|
+
const imageTypes = [
|
21
|
+
"image/jpeg",
|
22
|
+
"image/jpg",
|
23
|
+
"image/png",
|
24
|
+
"image/gif",
|
25
|
+
"image/bmp",
|
26
|
+
"image/svg+xml",
|
27
|
+
"image/webp",
|
28
|
+
"image/tiff",
|
29
|
+
"image/ico",
|
30
|
+
"image/heic",
|
31
|
+
"image/heif",
|
32
|
+
];
|
33
|
+
return imageTypes.includes(mimeType);
|
34
|
+
};
|
35
|
+
// Helper function to filter files
|
36
|
+
const filterReadableFiles = (files) => {
|
37
|
+
return files.filter(file => !shouldExcludeFile(file));
|
38
|
+
};
|
12
39
|
const searchDriveByQuery = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
13
40
|
if (!authParams.authToken) {
|
14
41
|
return { success: false, error: MISSING_AUTH_TOKEN, files: [] };
|
15
42
|
}
|
16
|
-
const { query, limit, searchDriveByDrive } = params;
|
43
|
+
const { query, limit, searchDriveByDrive, orderByQuery } = params;
|
44
|
+
// Can't use orderBy on quereis that include fullText
|
45
|
+
const safeOrderBy = query.includes("fullText") ? undefined : orderByQuery;
|
17
46
|
try {
|
18
47
|
if (searchDriveByDrive) {
|
19
|
-
return yield searchAllDrivesIndividually(query, authParams.authToken, limit);
|
48
|
+
return yield searchAllDrivesIndividually(query, authParams.authToken, limit, safeOrderBy);
|
20
49
|
}
|
21
50
|
else {
|
22
|
-
return yield searchAllDrivesAtOnce(query, authParams.authToken, limit);
|
51
|
+
return yield searchAllDrivesAtOnce(query, authParams.authToken, limit, safeOrderBy);
|
23
52
|
}
|
24
53
|
}
|
25
54
|
catch (error) {
|
@@ -32,9 +61,10 @@ const searchDriveByQuery = (_a) => __awaiter(void 0, [_a], void 0, function* ({
|
|
32
61
|
}
|
33
62
|
});
|
34
63
|
// Original search method - search all drives at once
|
35
|
-
const searchAllDrivesAtOnce = (query, authToken, limit) => __awaiter(void 0, void 0, void 0, function* () {
|
64
|
+
const searchAllDrivesAtOnce = (query, authToken, limit, orderByQuery) => __awaiter(void 0, void 0, void 0, function* () {
|
36
65
|
var _a;
|
37
|
-
const
|
66
|
+
const orderBy = orderByQuery || "modifiedTime desc";
|
67
|
+
const url = `https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(query)}&fields=files(id,name,mimeType,webViewLink)&supportsAllDrives=true&includeItemsFromAllDrives=true&corpora=allDrives&pageSize=1000&orderBy=${encodeURIComponent(orderBy)}`;
|
38
68
|
const res = yield axiosClient.get(url, {
|
39
69
|
headers: {
|
40
70
|
Authorization: `Bearer ${authToken}`,
|
@@ -46,20 +76,24 @@ const searchAllDrivesAtOnce = (query, authToken, limit) => __awaiter(void 0, voi
|
|
46
76
|
mimeType: file.mimeType || "",
|
47
77
|
url: file.webViewLink || "",
|
48
78
|
}))) || [];
|
79
|
+
// Filter out images and folders
|
80
|
+
const readableFiles = filterReadableFiles(files);
|
49
81
|
return {
|
50
82
|
success: true,
|
51
|
-
files: limit ?
|
83
|
+
files: limit ? readableFiles.slice(0, limit) : readableFiles,
|
52
84
|
};
|
53
85
|
});
|
54
86
|
// New search method - search each drive individually and aggregate results
|
55
|
-
const searchAllDrivesIndividually = (query, authToken, limit) => __awaiter(void 0, void 0, void 0, function* () {
|
87
|
+
const searchAllDrivesIndividually = (query, authToken, limit, orderByQuery) => __awaiter(void 0, void 0, void 0, function* () {
|
56
88
|
const drives = yield getAllDrives(authToken);
|
57
89
|
let allFiles = [];
|
58
90
|
// Search each drive individually
|
59
91
|
for (const drive of drives) {
|
60
92
|
try {
|
61
|
-
const driveFiles = yield searchSingleDrive(query, drive.id, authToken);
|
62
|
-
|
93
|
+
const driveFiles = yield searchSingleDrive(query, drive.id, authToken, orderByQuery);
|
94
|
+
// Filter out images and folders before adding to results
|
95
|
+
const readableDriveFiles = filterReadableFiles(driveFiles);
|
96
|
+
allFiles = allFiles.concat(readableDriveFiles);
|
63
97
|
// If we have a limit and we've reached it, break early
|
64
98
|
if (limit && allFiles.length >= limit) {
|
65
99
|
break;
|
@@ -99,19 +133,20 @@ const getAllDrives = (authToken) => __awaiter(void 0, void 0, void 0, function*
|
|
99
133
|
return drives;
|
100
134
|
});
|
101
135
|
// Search a single drive
|
102
|
-
const searchSingleDrive = (query, driveId, authToken) => __awaiter(void 0, void 0, void 0, function* () {
|
136
|
+
const searchSingleDrive = (query, driveId, authToken, orderByQuery) => __awaiter(void 0, void 0, void 0, function* () {
|
103
137
|
var _a;
|
104
138
|
const files = [];
|
139
|
+
const orderBy = orderByQuery || "modifiedTime desc";
|
105
140
|
let nextPageToken;
|
106
141
|
do {
|
107
142
|
let url;
|
108
143
|
if (driveId === "root") {
|
109
144
|
// Search in user's personal drive
|
110
|
-
url = `https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(query)}&fields=files(id,name,mimeType,webViewLink),nextPageToken&pageSize=1000${nextPageToken ? `&pageToken=${nextPageToken}` : ""}`;
|
145
|
+
url = `https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(query)}&fields=files(id,name,mimeType,webViewLink),nextPageToken&pageSize=1000&orderBy=${encodeURIComponent(orderBy)}${nextPageToken ? `&pageToken=${nextPageToken}` : ""}`;
|
111
146
|
}
|
112
147
|
else {
|
113
148
|
// Search in specific shared drive
|
114
|
-
url = `https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(`${query} and parents in '${driveId}'`)}&fields=files(id,name,mimeType,webViewLink),nextPageToken&supportsAllDrives=true&includeItemsFromAllDrives=true&corpora=drive&driveId=${driveId}&pageSize=1000${nextPageToken ? `&pageToken=${nextPageToken}` : ""}`;
|
149
|
+
url = `https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(`${query} and parents in '${driveId}'`)}&fields=files(id,name,mimeType,webViewLink),nextPageToken&supportsAllDrives=true&includeItemsFromAllDrives=true&corpora=drive&driveId=${driveId}&pageSize=1000&orderBy=${encodeURIComponent(orderBy)}${nextPageToken ? `&pageToken=${nextPageToken}` : ""}`;
|
115
150
|
}
|
116
151
|
const res = yield axiosClient.get(url, {
|
117
152
|
headers: {
|
@@ -0,0 +1,58 @@
|
|
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
|
+
import searchDriveByQuery from "./searchDriveByQuery.js";
|
12
|
+
import getDriveFileContentById from "./getDriveFileContentById.js";
|
13
|
+
const searchDriveByQueryAndGetFileContent = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
14
|
+
var _b;
|
15
|
+
if (!authParams.authToken) {
|
16
|
+
return { success: false, error: MISSING_AUTH_TOKEN, files: [] };
|
17
|
+
}
|
18
|
+
const { query, limit, searchDriveByDrive, orderByQuery, fileSizeLimit } = params;
|
19
|
+
// First, perform the search
|
20
|
+
const searchResult = yield searchDriveByQuery({
|
21
|
+
params: { query, limit, searchDriveByDrive, orderByQuery },
|
22
|
+
authParams,
|
23
|
+
});
|
24
|
+
// If search failed, return error
|
25
|
+
if (!searchResult.success) {
|
26
|
+
return { success: false, error: searchResult.error, files: [] };
|
27
|
+
}
|
28
|
+
// For each file, fetch its content
|
29
|
+
const filesWithContent = [];
|
30
|
+
const files = (_b = searchResult.files) !== null && _b !== void 0 ? _b : [];
|
31
|
+
for (const file of files) {
|
32
|
+
try {
|
33
|
+
const contentResult = yield getDriveFileContentById({
|
34
|
+
params: { fileId: file.id, limit: fileSizeLimit !== null && fileSizeLimit !== void 0 ? fileSizeLimit : 1000 },
|
35
|
+
authParams,
|
36
|
+
});
|
37
|
+
filesWithContent.push({
|
38
|
+
id: file.id,
|
39
|
+
name: file.name,
|
40
|
+
mimeType: file.mimeType,
|
41
|
+
url: file.url,
|
42
|
+
content: contentResult.success ? contentResult.content : undefined,
|
43
|
+
});
|
44
|
+
}
|
45
|
+
catch (error) {
|
46
|
+
console.error(`Error fetching content for file ${file.id}:`, error);
|
47
|
+
filesWithContent.push({
|
48
|
+
id: file.id,
|
49
|
+
name: file.name,
|
50
|
+
mimeType: file.mimeType,
|
51
|
+
url: file.url,
|
52
|
+
});
|
53
|
+
}
|
54
|
+
}
|
55
|
+
// Return combined results
|
56
|
+
return { success: true, files: filesWithContent };
|
57
|
+
});
|
58
|
+
export default searchDriveByQueryAndGetFileContent;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function extractTextFromPdf(buffer: ArrayBuffer): Promise<string>;
|
@@ -0,0 +1,40 @@
|
|
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 PDFParser from "pdf2json";
|
11
|
+
export function extractTextFromPdf(buffer) {
|
12
|
+
return __awaiter(this, void 0, void 0, function* () {
|
13
|
+
try {
|
14
|
+
const extractedText = yield new Promise((resolve, reject) => {
|
15
|
+
const pdfParser = new PDFParser();
|
16
|
+
pdfParser.on("pdfParser_dataError", (errData) => {
|
17
|
+
reject(errData.parserError || new Error("PDF parsing failed"));
|
18
|
+
});
|
19
|
+
pdfParser.on("pdfParser_dataReady", (pdfData) => {
|
20
|
+
try {
|
21
|
+
const text = pdfData.Pages.map((page) => page.Texts.map((textItem) => {
|
22
|
+
// Handle cases where R array might be empty or have multiple runs
|
23
|
+
return textItem.R.map((run) => decodeURIComponent(run.T)).join("");
|
24
|
+
}).join("")).join("\n");
|
25
|
+
resolve(text);
|
26
|
+
}
|
27
|
+
catch (error) {
|
28
|
+
reject(error);
|
29
|
+
}
|
30
|
+
});
|
31
|
+
pdfParser.parseBuffer(Buffer.from(buffer));
|
32
|
+
});
|
33
|
+
return extractedText;
|
34
|
+
}
|
35
|
+
catch (error) {
|
36
|
+
console.error("Error extracting PDF text:", error);
|
37
|
+
throw error;
|
38
|
+
}
|
39
|
+
});
|
40
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@credal/actions",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.45",
|
4
4
|
"type": "module",
|
5
5
|
"description": "AI Actions by Credal AI",
|
6
6
|
"sideEffects": false,
|
@@ -61,6 +61,7 @@
|
|
61
61
|
"mongodb": "^6.13.1",
|
62
62
|
"node-forge": "^1.3.1",
|
63
63
|
"octokit": "^4.1.2",
|
64
|
+
"pdf2json": "^3.1.6",
|
64
65
|
"resend": "^4.1.2",
|
65
66
|
"snowflake-sdk": "^2.0.2",
|
66
67
|
"ts-node": "^10.9.2",
|