@credal/actions 0.2.81 → 0.2.83
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 +55 -3
- package/dist/actions/autogen/types.d.ts +46 -3
- package/dist/actions/autogen/types.js +18 -1
- package/dist/actions/providers/confluence/updatePage.js +15 -14
- package/dist/actions/providers/firecrawl/searchAndScrape.d.ts +3 -0
- package/dist/actions/providers/firecrawl/searchAndScrape.js +44 -0
- package/dist/actions/providers/jamf/types.d.ts +8 -0
- package/dist/actions/providers/jamf/types.js +7 -0
- package/dist/actions/providers/resend/sendEmailHtml.js +1 -1
- package/package.json +1 -1
- package/dist/actions/providers/generic/fillTemplateAction.d.ts +0 -7
- package/dist/actions/providers/generic/fillTemplateAction.js +0 -18
- package/dist/actions/providers/generic/genericApiCall.d.ts +0 -3
- package/dist/actions/providers/generic/genericApiCall.js +0 -38
- package/dist/actions/providers/google-oauth/getDriveContentById.d.ts +0 -3
- package/dist/actions/providers/google-oauth/getDriveContentById.js +0 -161
- package/dist/actions/providers/google-oauth/searchAndGetDriveContentByKeywords.d.ts +0 -3
- package/dist/actions/providers/google-oauth/searchAndGetDriveContentByKeywords.js +0 -47
- package/dist/actions/providers/google-oauth/searchDriveAndGetContentByKeywords.d.ts +0 -3
- package/dist/actions/providers/google-oauth/searchDriveAndGetContentByKeywords.js +0 -110
- package/dist/actions/providers/google-oauth/searchDriveAndGetContentByQuery.d.ts +0 -3
- package/dist/actions/providers/google-oauth/searchDriveAndGetContentByQuery.js +0 -78
- package/dist/actions/providers/google-oauth/utils/extractContentFromDriveFileId.d.ts +0 -15
- package/dist/actions/providers/google-oauth/utils/extractContentFromDriveFileId.js +0 -129
- package/dist/actions/providers/googlemaps/nearbysearch.d.ts +0 -3
- package/dist/actions/providers/googlemaps/nearbysearch.js +0 -96
- package/dist/actions/providers/snowflake/runSnowflakeQueryWriteResultsToS3.d.ts +0 -3
- package/dist/actions/providers/snowflake/runSnowflakeQueryWriteResultsToS3.js +0 -154
- package/dist/actions/providers/x/scrapeTweetDataWithNitter.d.ts +0 -3
- package/dist/actions/providers/x/scrapeTweetDataWithNitter.js +0 -45
|
@@ -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, zendeskSearchZendeskByQueryOutputSchema, zendeskSearchZendeskByQueryParamsSchema, 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, resendSendEmailHtmlParamsSchema, resendSendEmailHtmlOutputSchema, 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, googleOauthEditAGoogleCalendarEventParamsSchema, googleOauthEditAGoogleCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, gongGetGongTranscriptsParamsSchema, gongGetGongTranscriptsOutputSchema, ashbyCreateNoteParamsSchema, ashbyCreateNoteOutputSchema, ashbyGetCandidateInfoParamsSchema, ashbyGetCandidateInfoOutputSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, ashbyListCandidatesParamsSchema, ashbyListCandidatesOutputSchema, ashbyListCandidateNotesParamsSchema, ashbyListCandidateNotesOutputSchema, ashbySearchCandidatesParamsSchema, ashbySearchCandidatesOutputSchema, ashbyCreateCandidateParamsSchema, ashbyCreateCandidateOutputSchema, ashbyUpdateCandidateParamsSchema, ashbyUpdateCandidateOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, salesforceFetchSalesforceSchemaByObjectParamsSchema, salesforceFetchSalesforceSchemaByObjectOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, ashbyAddCandidateToProjectParamsSchema, ashbyAddCandidateToProjectOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, kandjiGetFVRecoveryKeyForDeviceParamsSchema, kandjiGetFVRecoveryKeyForDeviceOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, jamfGetJamfComputerInventoryParamsSchema, jamfGetJamfComputerInventoryOutputSchema, jamfGetJamfFileVaultRecoveryKeyParamsSchema, jamfGetJamfFileVaultRecoveryKeyOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, oktaListOktaUsersParamsSchema, oktaListOktaUsersOutputSchema, oktaGetOktaUserParamsSchema, oktaGetOktaUserOutputSchema, oktaListOktaUserGroupsParamsSchema, oktaListOktaUserGroupsOutputSchema, oktaListOktaGroupsParamsSchema, oktaListOktaGroupsOutputSchema, oktaGetOktaGroupParamsSchema, oktaGetOktaGroupOutputSchema, oktaListOktaGroupMembersParamsSchema, oktaListOktaGroupMembersOutputSchema, oktaRemoveUserFromGroupParamsSchema, oktaRemoveUserFromGroupOutputSchema, oktaAddUserToGroupParamsSchema, oktaAddUserToGroupOutputSchema, oktaResetPasswordParamsSchema, oktaResetPasswordOutputSchema, oktaResetMFAParamsSchema, oktaResetMFAOutputSchema, oktaListMFAParamsSchema, oktaListMFAOutputSchema, jamfGetJamfUserComputerIdParamsSchema, jamfGetJamfUserComputerIdOutputSchema, jamfLockJamfComputerByIdParamsSchema, jamfLockJamfComputerByIdOutputSchema, oktaTriggerOktaWorkflowParamsSchema, oktaTriggerOktaWorkflowOutputSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchRepositoryOutputSchema, githubSearchRepositoryParamsSchema, githubSearchOrganizationOutputSchema, githubSearchOrganizationParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, googleOauthSearchDriveByQueryOutputSchema, googleOauthSearchDriveByQueryParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentOutputSchema, googleOauthQueryGoogleBigQueryParamsSchema, googleOauthQueryGoogleBigQueryOutputSchema, githubGetFileContentParamsSchema, githubGetFileContentOutputSchema, githubListDirectoryOutputSchema, githubListDirectoryParamsSchema, linearGetIssuesParamsSchema, linearGetIssuesOutputSchema, linearGetIssueDetailsParamsSchema, linearGetIssueDetailsOutputSchema, linearGetProjectDetailsParamsSchema, linearGetProjectDetailsOutputSchema, linearGetTeamDetailsParamsSchema, linearGetTeamDetailsOutputSchema, linearGetProjectsParamsSchema, linearGetProjectsOutputSchema, linearGetTeamsParamsSchema, linearGetTeamsOutputSchema, hubspotGetContactsParamsSchema, hubspotGetContactsOutputSchema, hubspotGetContactDetailsParamsSchema, hubspotGetContactDetailsOutputSchema, hubspotGetCompaniesParamsSchema, hubspotGetCompaniesOutputSchema, hubspotGetCompanyDetailsParamsSchema, hubspotGetCompanyDetailsOutputSchema, hubspotGetDealsParamsSchema, hubspotGetDealsOutputSchema, hubspotGetDealDetailsParamsSchema, hubspotGetDealDetailsOutputSchema, hubspotGetTicketsParamsSchema, hubspotGetTicketsOutputSchema, hubspotGetTicketDetailsParamsSchema, hubspotGetTicketDetailsOutputSchema, gitlabGetFileContentParamsSchema, gitlabGetFileContentOutputSchema, jiraPublicCommentOnServiceDeskRequestParamsSchema, jiraPublicCommentOnServiceDeskRequestOutputSchema, googlemailSendGmailParamsSchema, googlemailSendGmailOutputSchema, gitlabListDirectoryParamsSchema, gitlabListDirectoryOutputSchema, } 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, zendeskSearchZendeskByQueryOutputSchema, zendeskSearchZendeskByQueryParamsSchema, 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, resendSendEmailHtmlParamsSchema, resendSendEmailHtmlOutputSchema, 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, googleOauthEditAGoogleCalendarEventParamsSchema, googleOauthEditAGoogleCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, gongGetGongTranscriptsParamsSchema, gongGetGongTranscriptsOutputSchema, ashbyCreateNoteParamsSchema, ashbyCreateNoteOutputSchema, ashbyGetCandidateInfoParamsSchema, ashbyGetCandidateInfoOutputSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, ashbyListCandidatesParamsSchema, ashbyListCandidatesOutputSchema, ashbyListCandidateNotesParamsSchema, ashbyListCandidateNotesOutputSchema, ashbySearchCandidatesParamsSchema, ashbySearchCandidatesOutputSchema, ashbyCreateCandidateParamsSchema, ashbyCreateCandidateOutputSchema, ashbyUpdateCandidateParamsSchema, ashbyUpdateCandidateOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, salesforceFetchSalesforceSchemaByObjectParamsSchema, salesforceFetchSalesforceSchemaByObjectOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, ashbyAddCandidateToProjectParamsSchema, ashbyAddCandidateToProjectOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, kandjiGetFVRecoveryKeyForDeviceParamsSchema, kandjiGetFVRecoveryKeyForDeviceOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, jamfGetJamfComputerInventoryParamsSchema, jamfGetJamfComputerInventoryOutputSchema, jamfGetJamfFileVaultRecoveryKeyParamsSchema, jamfGetJamfFileVaultRecoveryKeyOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, oktaListOktaUsersParamsSchema, oktaListOktaUsersOutputSchema, oktaGetOktaUserParamsSchema, oktaGetOktaUserOutputSchema, oktaListOktaUserGroupsParamsSchema, oktaListOktaUserGroupsOutputSchema, oktaListOktaGroupsParamsSchema, oktaListOktaGroupsOutputSchema, oktaGetOktaGroupParamsSchema, oktaGetOktaGroupOutputSchema, oktaListOktaGroupMembersParamsSchema, oktaListOktaGroupMembersOutputSchema, oktaRemoveUserFromGroupParamsSchema, oktaRemoveUserFromGroupOutputSchema, oktaAddUserToGroupParamsSchema, oktaAddUserToGroupOutputSchema, oktaResetPasswordParamsSchema, oktaResetPasswordOutputSchema, oktaResetMFAParamsSchema, oktaResetMFAOutputSchema, oktaListMFAParamsSchema, oktaListMFAOutputSchema, jamfGetJamfUserComputerIdParamsSchema, jamfGetJamfUserComputerIdOutputSchema, jamfLockJamfComputerByIdParamsSchema, jamfLockJamfComputerByIdOutputSchema, oktaTriggerOktaWorkflowParamsSchema, oktaTriggerOktaWorkflowOutputSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchRepositoryOutputSchema, githubSearchRepositoryParamsSchema, githubSearchOrganizationOutputSchema, githubSearchOrganizationParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, googleOauthSearchDriveByQueryOutputSchema, googleOauthSearchDriveByQueryParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentOutputSchema, googleOauthQueryGoogleBigQueryParamsSchema, googleOauthQueryGoogleBigQueryOutputSchema, githubGetFileContentParamsSchema, githubGetFileContentOutputSchema, githubListDirectoryOutputSchema, githubListDirectoryParamsSchema, linearGetIssuesParamsSchema, linearGetIssuesOutputSchema, linearGetIssueDetailsParamsSchema, linearGetIssueDetailsOutputSchema, linearGetProjectDetailsParamsSchema, linearGetProjectDetailsOutputSchema, linearGetTeamDetailsParamsSchema, linearGetTeamDetailsOutputSchema, linearGetProjectsParamsSchema, linearGetProjectsOutputSchema, linearGetTeamsParamsSchema, linearGetTeamsOutputSchema, hubspotGetContactsParamsSchema, hubspotGetContactsOutputSchema, hubspotGetContactDetailsParamsSchema, hubspotGetContactDetailsOutputSchema, hubspotGetCompaniesParamsSchema, hubspotGetCompaniesOutputSchema, hubspotGetCompanyDetailsParamsSchema, hubspotGetCompanyDetailsOutputSchema, hubspotGetDealsParamsSchema, hubspotGetDealsOutputSchema, hubspotGetDealDetailsParamsSchema, hubspotGetDealDetailsOutputSchema, hubspotGetTicketsParamsSchema, hubspotGetTicketsOutputSchema, hubspotGetTicketDetailsParamsSchema, hubspotGetTicketDetailsOutputSchema, gitlabGetFileContentParamsSchema, gitlabGetFileContentOutputSchema, jiraPublicCommentOnServiceDeskRequestParamsSchema, jiraPublicCommentOnServiceDeskRequestOutputSchema, googlemailSendGmailParamsSchema, googlemailSendGmailOutputSchema, gitlabListDirectoryParamsSchema, gitlabListDirectoryOutputSchema, firecrawlSearchAndScrapeOutputSchema, firecrawlSearchAndScrapeParamsSchema, } 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";
|
|
@@ -141,6 +141,7 @@ import gitlabGetFileContent from "./providers/gitlab/getFileContent.js";
|
|
|
141
141
|
import gitlabListDirectory from "./providers/gitlab/listDirectory.js";
|
|
142
142
|
import publicCommentOnServiceDeskRequest from "./providers/jira/publicCommentOnServiceDeskRequest.js";
|
|
143
143
|
import sendGmail from "./providers/googlemail/sendGmail.js";
|
|
144
|
+
import searchAndScrape from "./providers/firecrawl/searchAndScrape.js";
|
|
144
145
|
const jiraActions = {
|
|
145
146
|
getJiraIssuesByQuery: {
|
|
146
147
|
fn: getJiraIssuesByQuery,
|
|
@@ -422,6 +423,11 @@ export const ActionMapper = {
|
|
|
422
423
|
paramsSchema: firecrawlDeepResearchParamsSchema,
|
|
423
424
|
outputSchema: firecrawlDeepResearchOutputSchema,
|
|
424
425
|
},
|
|
426
|
+
searchAndScrape: {
|
|
427
|
+
fn: searchAndScrape,
|
|
428
|
+
paramsSchema: firecrawlSearchAndScrapeParamsSchema,
|
|
429
|
+
outputSchema: firecrawlSearchAndScrapeOutputSchema,
|
|
430
|
+
},
|
|
425
431
|
},
|
|
426
432
|
resend: {
|
|
427
433
|
sendEmail: {
|
|
@@ -55,6 +55,7 @@ export declare const openstreetmapGetLatitudeLongitudeFromLocationDefinition: Ac
|
|
|
55
55
|
export declare const nwsGetForecastForLocationDefinition: ActionTemplate;
|
|
56
56
|
export declare const firecrawlDeepResearchDefinition: ActionTemplate;
|
|
57
57
|
export declare const firecrawlScrapeUrlDefinition: ActionTemplate;
|
|
58
|
+
export declare const firecrawlSearchAndScrapeDefinition: ActionTemplate;
|
|
58
59
|
export declare const firecrawlScrapeTweetDataWithNitterDefinition: ActionTemplate;
|
|
59
60
|
export declare const resendSendEmailDefinition: ActionTemplate;
|
|
60
61
|
export declare const resendSendEmailHtmlDefinition: ActionTemplate;
|
|
@@ -3037,6 +3037,58 @@ export const firecrawlScrapeUrlDefinition = {
|
|
|
3037
3037
|
name: "scrapeUrl",
|
|
3038
3038
|
provider: "firecrawl",
|
|
3039
3039
|
};
|
|
3040
|
+
export const firecrawlSearchAndScrapeDefinition = {
|
|
3041
|
+
description: "Search and scrape the web using Firecrawl",
|
|
3042
|
+
scopes: [],
|
|
3043
|
+
parameters: {
|
|
3044
|
+
type: "object",
|
|
3045
|
+
required: ["query"],
|
|
3046
|
+
properties: {
|
|
3047
|
+
query: {
|
|
3048
|
+
type: "string",
|
|
3049
|
+
description: "The query to search for",
|
|
3050
|
+
},
|
|
3051
|
+
count: {
|
|
3052
|
+
type: "number",
|
|
3053
|
+
description: "The number of results to return. Default is 5.",
|
|
3054
|
+
},
|
|
3055
|
+
site: {
|
|
3056
|
+
type: "string",
|
|
3057
|
+
description: "The site to restrict the search to (by inserting site:<site.com> in the query). Examples include openai.com, github.com",
|
|
3058
|
+
},
|
|
3059
|
+
},
|
|
3060
|
+
},
|
|
3061
|
+
output: {
|
|
3062
|
+
type: "object",
|
|
3063
|
+
required: ["results"],
|
|
3064
|
+
properties: {
|
|
3065
|
+
results: {
|
|
3066
|
+
type: "array",
|
|
3067
|
+
description: "The results of the search",
|
|
3068
|
+
items: {
|
|
3069
|
+
type: "object",
|
|
3070
|
+
required: ["url", "title", "contents"],
|
|
3071
|
+
properties: {
|
|
3072
|
+
url: {
|
|
3073
|
+
type: "string",
|
|
3074
|
+
description: "The URL of the result",
|
|
3075
|
+
},
|
|
3076
|
+
title: {
|
|
3077
|
+
type: "string",
|
|
3078
|
+
description: "The title of the result",
|
|
3079
|
+
},
|
|
3080
|
+
contents: {
|
|
3081
|
+
type: "string",
|
|
3082
|
+
description: "The contents of the result",
|
|
3083
|
+
},
|
|
3084
|
+
},
|
|
3085
|
+
},
|
|
3086
|
+
},
|
|
3087
|
+
},
|
|
3088
|
+
},
|
|
3089
|
+
name: "searchAndScrape",
|
|
3090
|
+
provider: "firecrawl",
|
|
3091
|
+
};
|
|
3040
3092
|
export const firecrawlScrapeTweetDataWithNitterDefinition = {
|
|
3041
3093
|
description: "Given A tweet URL scrape the tweet data with nitter+firecrawl",
|
|
3042
3094
|
scopes: [],
|
|
@@ -3106,7 +3158,7 @@ export const resendSendEmailHtmlDefinition = {
|
|
|
3106
3158
|
scopes: [],
|
|
3107
3159
|
parameters: {
|
|
3108
3160
|
type: "object",
|
|
3109
|
-
required: ["to", "subject", "
|
|
3161
|
+
required: ["to", "subject", "content"],
|
|
3110
3162
|
properties: {
|
|
3111
3163
|
to: {
|
|
3112
3164
|
type: "string",
|
|
@@ -3116,9 +3168,9 @@ export const resendSendEmailHtmlDefinition = {
|
|
|
3116
3168
|
type: "string",
|
|
3117
3169
|
description: "The subject of the email",
|
|
3118
3170
|
},
|
|
3119
|
-
|
|
3171
|
+
content: {
|
|
3120
3172
|
type: "string",
|
|
3121
|
-
description: "The HTML content of the email",
|
|
3173
|
+
description: "The HTML content of the email to be sent",
|
|
3122
3174
|
},
|
|
3123
3175
|
},
|
|
3124
3176
|
},
|
|
@@ -2995,6 +2995,49 @@ export declare const firecrawlScrapeUrlOutputSchema: z.ZodObject<{
|
|
|
2995
2995
|
}>;
|
|
2996
2996
|
export type firecrawlScrapeUrlOutputType = z.infer<typeof firecrawlScrapeUrlOutputSchema>;
|
|
2997
2997
|
export type firecrawlScrapeUrlFunction = ActionFunction<firecrawlScrapeUrlParamsType, AuthParamsType, firecrawlScrapeUrlOutputType>;
|
|
2998
|
+
export declare const firecrawlSearchAndScrapeParamsSchema: z.ZodObject<{
|
|
2999
|
+
query: z.ZodString;
|
|
3000
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
3001
|
+
site: z.ZodOptional<z.ZodString>;
|
|
3002
|
+
}, "strip", z.ZodTypeAny, {
|
|
3003
|
+
query: string;
|
|
3004
|
+
count?: number | undefined;
|
|
3005
|
+
site?: string | undefined;
|
|
3006
|
+
}, {
|
|
3007
|
+
query: string;
|
|
3008
|
+
count?: number | undefined;
|
|
3009
|
+
site?: string | undefined;
|
|
3010
|
+
}>;
|
|
3011
|
+
export type firecrawlSearchAndScrapeParamsType = z.infer<typeof firecrawlSearchAndScrapeParamsSchema>;
|
|
3012
|
+
export declare const firecrawlSearchAndScrapeOutputSchema: z.ZodObject<{
|
|
3013
|
+
results: z.ZodArray<z.ZodObject<{
|
|
3014
|
+
url: z.ZodString;
|
|
3015
|
+
title: z.ZodString;
|
|
3016
|
+
contents: z.ZodString;
|
|
3017
|
+
}, "strip", z.ZodTypeAny, {
|
|
3018
|
+
title: string;
|
|
3019
|
+
url: string;
|
|
3020
|
+
contents: string;
|
|
3021
|
+
}, {
|
|
3022
|
+
title: string;
|
|
3023
|
+
url: string;
|
|
3024
|
+
contents: string;
|
|
3025
|
+
}>, "many">;
|
|
3026
|
+
}, "strip", z.ZodTypeAny, {
|
|
3027
|
+
results: {
|
|
3028
|
+
title: string;
|
|
3029
|
+
url: string;
|
|
3030
|
+
contents: string;
|
|
3031
|
+
}[];
|
|
3032
|
+
}, {
|
|
3033
|
+
results: {
|
|
3034
|
+
title: string;
|
|
3035
|
+
url: string;
|
|
3036
|
+
contents: string;
|
|
3037
|
+
}[];
|
|
3038
|
+
}>;
|
|
3039
|
+
export type firecrawlSearchAndScrapeOutputType = z.infer<typeof firecrawlSearchAndScrapeOutputSchema>;
|
|
3040
|
+
export type firecrawlSearchAndScrapeFunction = ActionFunction<firecrawlSearchAndScrapeParamsType, AuthParamsType, firecrawlSearchAndScrapeOutputType>;
|
|
2998
3041
|
export declare const firecrawlScrapeTweetDataWithNitterParamsSchema: z.ZodObject<{
|
|
2999
3042
|
tweetUrl: z.ZodString;
|
|
3000
3043
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -3041,15 +3084,15 @@ export type resendSendEmailFunction = ActionFunction<resendSendEmailParamsType,
|
|
|
3041
3084
|
export declare const resendSendEmailHtmlParamsSchema: z.ZodObject<{
|
|
3042
3085
|
to: z.ZodString;
|
|
3043
3086
|
subject: z.ZodString;
|
|
3044
|
-
|
|
3087
|
+
content: z.ZodString;
|
|
3045
3088
|
}, "strip", z.ZodTypeAny, {
|
|
3089
|
+
content: string;
|
|
3046
3090
|
subject: string;
|
|
3047
3091
|
to: string;
|
|
3048
|
-
html: string;
|
|
3049
3092
|
}, {
|
|
3093
|
+
content: string;
|
|
3050
3094
|
subject: string;
|
|
3051
3095
|
to: string;
|
|
3052
|
-
html: string;
|
|
3053
3096
|
}>;
|
|
3054
3097
|
export type resendSendEmailHtmlParamsType = z.infer<typeof resendSendEmailHtmlParamsSchema>;
|
|
3055
3098
|
export declare const resendSendEmailHtmlOutputSchema: z.ZodObject<{
|
|
@@ -911,6 +911,23 @@ export const firecrawlDeepResearchOutputSchema = z.object({
|
|
|
911
911
|
});
|
|
912
912
|
export const firecrawlScrapeUrlParamsSchema = z.object({ url: z.string().describe("The URL to scrape") });
|
|
913
913
|
export const firecrawlScrapeUrlOutputSchema = z.object({ content: z.string().describe("The content of the URL") });
|
|
914
|
+
export const firecrawlSearchAndScrapeParamsSchema = z.object({
|
|
915
|
+
query: z.string().describe("The query to search for"),
|
|
916
|
+
count: z.number().describe("The number of results to return. Default is 5.").optional(),
|
|
917
|
+
site: z
|
|
918
|
+
.string()
|
|
919
|
+
.describe("The site to restrict the search to (by inserting site:<site.com> in the query). Examples include openai.com, github.com")
|
|
920
|
+
.optional(),
|
|
921
|
+
});
|
|
922
|
+
export const firecrawlSearchAndScrapeOutputSchema = z.object({
|
|
923
|
+
results: z
|
|
924
|
+
.array(z.object({
|
|
925
|
+
url: z.string().describe("The URL of the result"),
|
|
926
|
+
title: z.string().describe("The title of the result"),
|
|
927
|
+
contents: z.string().describe("The contents of the result"),
|
|
928
|
+
}))
|
|
929
|
+
.describe("The results of the search"),
|
|
930
|
+
});
|
|
914
931
|
export const firecrawlScrapeTweetDataWithNitterParamsSchema = z.object({
|
|
915
932
|
tweetUrl: z.string().describe("The url for the X(formerly twitter) post"),
|
|
916
933
|
});
|
|
@@ -929,7 +946,7 @@ export const resendSendEmailOutputSchema = z.object({
|
|
|
929
946
|
export const resendSendEmailHtmlParamsSchema = z.object({
|
|
930
947
|
to: z.string().describe("The email address to send the email to"),
|
|
931
948
|
subject: z.string().describe("The subject of the email"),
|
|
932
|
-
|
|
949
|
+
content: z.string().describe("The HTML content of the email to be sent"),
|
|
933
950
|
});
|
|
934
951
|
export const resendSendEmailHtmlOutputSchema = z.object({
|
|
935
952
|
success: z.boolean().describe("Whether the email was sent successfully"),
|
|
@@ -8,28 +8,30 @@ 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
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
+
const axios_1 = __importDefault(require("axios"));
|
|
16
|
+
function getConfluenceApi(baseUrl, username, apiToken) {
|
|
17
|
+
const api = axios_1.default.create({
|
|
15
18
|
baseURL: baseUrl,
|
|
16
19
|
headers: {
|
|
17
20
|
Accept: "application/json",
|
|
21
|
+
// Tokens are associated with a specific user.
|
|
18
22
|
Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
|
|
19
23
|
},
|
|
20
|
-
};
|
|
24
|
+
});
|
|
25
|
+
return api;
|
|
21
26
|
}
|
|
22
27
|
const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
23
|
-
const { pageId, content, title } = params;
|
|
24
|
-
const { baseUrl, authToken
|
|
25
|
-
|
|
26
|
-
throw new Error("Missing required authentication information");
|
|
27
|
-
}
|
|
28
|
-
const config = getConfluenceRequestConfig(baseUrl, username, authToken);
|
|
28
|
+
const { pageId, username, content, title } = params;
|
|
29
|
+
const { baseUrl, authToken } = authParams;
|
|
30
|
+
const api = getConfluenceApi(baseUrl, username, authToken);
|
|
29
31
|
// Get current version number
|
|
30
|
-
const response = yield
|
|
32
|
+
const response = yield api.get(`/api/v2/pages/${pageId}`);
|
|
31
33
|
const currVersion = response.data.version.number;
|
|
32
|
-
|
|
34
|
+
yield api.put(`/api/v2/pages/${pageId}`, {
|
|
33
35
|
id: pageId,
|
|
34
36
|
status: "current",
|
|
35
37
|
title,
|
|
@@ -40,7 +42,6 @@ const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* (
|
|
|
40
42
|
version: {
|
|
41
43
|
number: currVersion + 1,
|
|
42
44
|
},
|
|
43
|
-
};
|
|
44
|
-
yield axiosClient_1.axiosClient.put(`/api/v2/pages/${pageId}`, payload, config);
|
|
45
|
+
});
|
|
45
46
|
});
|
|
46
47
|
exports.default = confluenceUpdatePage;
|
|
@@ -0,0 +1,44 @@
|
|
|
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 FirecrawlApp from "@mendable/firecrawl-js";
|
|
11
|
+
const searchAndScrape = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
12
|
+
const { apiKey } = authParams;
|
|
13
|
+
if (!apiKey)
|
|
14
|
+
throw new Error("Missing Firecrawl API key");
|
|
15
|
+
const app = new FirecrawlApp({ apiKey });
|
|
16
|
+
const { query, count = 5, site } = params;
|
|
17
|
+
const searchQuery = `${query}${site ? ` site:${site}` : ""}`;
|
|
18
|
+
const searchRes = yield app.search(searchQuery, {
|
|
19
|
+
limit: count,
|
|
20
|
+
scrapeOptions: {
|
|
21
|
+
formats: ["markdown"],
|
|
22
|
+
timeout: 7500,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
if (!(searchRes === null || searchRes === void 0 ? void 0 : searchRes.success)) {
|
|
26
|
+
return { results: [] };
|
|
27
|
+
}
|
|
28
|
+
const results = searchRes.data
|
|
29
|
+
.map(r => {
|
|
30
|
+
var _a, _b, _c;
|
|
31
|
+
const url = r.url;
|
|
32
|
+
const contents = r.markdown;
|
|
33
|
+
const title = (_c = (_a = r.title) !== null && _a !== void 0 ? _a : (_b = r.metadata) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : null;
|
|
34
|
+
if (!url || !contents || !title)
|
|
35
|
+
return undefined;
|
|
36
|
+
return { url, title, contents };
|
|
37
|
+
})
|
|
38
|
+
.filter(NotEmpty);
|
|
39
|
+
return { results };
|
|
40
|
+
});
|
|
41
|
+
export default searchAndScrape;
|
|
42
|
+
function NotEmpty(value) {
|
|
43
|
+
return value !== null && value !== undefined;
|
|
44
|
+
}
|
|
@@ -18,7 +18,7 @@ const sendEmailHtml = (_a) => __awaiter(void 0, [_a], void 0, function* ({ param
|
|
|
18
18
|
bcc: authParams.emailBcc,
|
|
19
19
|
to: params.to,
|
|
20
20
|
subject: params.subject,
|
|
21
|
-
html: params.
|
|
21
|
+
html: params.content,
|
|
22
22
|
});
|
|
23
23
|
if (result.error) {
|
|
24
24
|
throw new Error(result.error.message);
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const 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;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
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,161 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import 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;
|