@credal/actions 0.2.85 → 0.2.87
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 +1 -7
- package/dist/actions/autogen/templates.d.ts +0 -1
- package/dist/actions/autogen/templates.js +7 -33
- package/dist/actions/autogen/types.d.ts +9 -23
- package/dist/actions/autogen/types.js +6 -8
- package/dist/actions/providers/confluence/updatePage.js +15 -14
- package/dist/actions/providers/google-oauth/getDriveFileContentById.js +46 -50
- package/dist/actions/providers/google-oauth/searchDriveByQuery.js +4 -6
- package/dist/actions/providers/jamf/types.d.ts +8 -0
- package/dist/actions/providers/jamf/types.js +7 -0
- package/dist/actions/providers/slack/createChannel.js +20 -0
- package/dist/actions/providers/slack/getChannelMessages.js +1 -1
- package/dist/actions/providers/slack/helpers.js +1 -0
- package/dist/actions/providers/slack/sendMessage.js +12 -5
- 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, firecrawlSearchAndScrapeOutputSchema, firecrawlSearchAndScrapeParamsSchema, firecrawlGetTopNSearchResultUrlsParamsSchema, firecrawlGetTopNSearchResultUrlsOutputSchema, } from "./autogen/types.js";
|
|
1
|
+
import { genericFillTemplateParamsSchema, genericFillTemplateOutputSchema, confluenceOverwritePageParamsSchema, confluenceOverwritePageOutputSchema, googlemapsValidateAddressOutputSchema, googlemapsValidateAddressParamsSchema, googleOauthCreateNewGoogleDocParamsSchema, googleOauthCreateNewGoogleDocOutputSchema, mathAddOutputSchema, mathAddParamsSchema, mongoInsertMongoDocOutputSchema, mongoInsertMongoDocParamsSchema, slackSendMessageOutputSchema, slackSendMessageParamsSchema, slackGetChannelMessagesOutputSchema, slackGetChannelMessagesParamsSchema, 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, firecrawlGetTopNSearchResultUrlsParamsSchema, firecrawlGetTopNSearchResultUrlsOutputSchema, } 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";
|
|
@@ -107,7 +107,6 @@ import resetPassword from "./providers/okta/resetPassword.js";
|
|
|
107
107
|
import resetMFA from "./providers/okta/resetMFA.js";
|
|
108
108
|
import listMFA from "./providers/okta/listMFA.js";
|
|
109
109
|
import createChannel from "./providers/slack/createChannel.js";
|
|
110
|
-
import archiveChannel from "./providers/slack/archiveChannel.js";
|
|
111
110
|
import getJamfUserComputerId from "./providers/jamf/getJamfUserComputerId.js";
|
|
112
111
|
import lockJamfComputerById from "./providers/jamf/lockJamfComputerById.js";
|
|
113
112
|
import triggerOktaWorkflow from "./providers/okta/triggerOktaWorkflow.js";
|
|
@@ -285,11 +284,6 @@ export const ActionMapper = {
|
|
|
285
284
|
paramsSchema: slackCreateChannelParamsSchema,
|
|
286
285
|
outputSchema: slackCreateChannelOutputSchema,
|
|
287
286
|
},
|
|
288
|
-
archiveChannel: {
|
|
289
|
-
fn: archiveChannel,
|
|
290
|
-
paramsSchema: slackArchiveChannelParamsSchema,
|
|
291
|
-
outputSchema: slackArchiveChannelOutputSchema,
|
|
292
|
-
},
|
|
293
287
|
},
|
|
294
288
|
confluence: {
|
|
295
289
|
overwritePage: {
|
|
@@ -7,7 +7,6 @@ export declare const asanaUpdateTaskDefinition: ActionTemplate;
|
|
|
7
7
|
export declare const asanaSearchTasksDefinition: ActionTemplate;
|
|
8
8
|
export declare const asanaGetTasksDetailsDefinition: ActionTemplate;
|
|
9
9
|
export declare const slackCreateChannelDefinition: ActionTemplate;
|
|
10
|
-
export declare const slackArchiveChannelDefinition: ActionTemplate;
|
|
11
10
|
export declare const slackSendMessageDefinition: ActionTemplate;
|
|
12
11
|
export declare const slackGetChannelMessagesDefinition: ActionTemplate;
|
|
13
12
|
export declare const mathAddDefinition: ActionTemplate;
|
|
@@ -544,43 +544,17 @@ export const slackCreateChannelDefinition = {
|
|
|
544
544
|
name: "createChannel",
|
|
545
545
|
provider: "slack",
|
|
546
546
|
};
|
|
547
|
-
export const slackArchiveChannelDefinition = {
|
|
548
|
-
description: "Archives a Slack channel using a bot token, joins the channel to archive if not already a member",
|
|
549
|
-
scopes: ["channels:manage"],
|
|
550
|
-
parameters: {
|
|
551
|
-
type: "object",
|
|
552
|
-
required: ["channelName"],
|
|
553
|
-
properties: {
|
|
554
|
-
channelName: {
|
|
555
|
-
type: "string",
|
|
556
|
-
description: "The name of the channel to archive",
|
|
557
|
-
},
|
|
558
|
-
},
|
|
559
|
-
},
|
|
560
|
-
output: {
|
|
561
|
-
type: "object",
|
|
562
|
-
required: ["success"],
|
|
563
|
-
properties: {
|
|
564
|
-
success: {
|
|
565
|
-
type: "boolean",
|
|
566
|
-
description: "Whether the channel was archived successfully",
|
|
567
|
-
},
|
|
568
|
-
error: {
|
|
569
|
-
type: "string",
|
|
570
|
-
description: "The error that occurred if the channel was not archived successfully",
|
|
571
|
-
},
|
|
572
|
-
},
|
|
573
|
-
},
|
|
574
|
-
name: "archiveChannel",
|
|
575
|
-
provider: "slack",
|
|
576
|
-
};
|
|
577
547
|
export const slackSendMessageDefinition = {
|
|
578
548
|
description: "Sends a message to a Slack channel",
|
|
579
549
|
scopes: ["chat:write"],
|
|
580
550
|
parameters: {
|
|
581
551
|
type: "object",
|
|
582
|
-
required: ["
|
|
552
|
+
required: ["message"],
|
|
583
553
|
properties: {
|
|
554
|
+
channelId: {
|
|
555
|
+
type: "string",
|
|
556
|
+
description: "The ID of the channel to send the message to",
|
|
557
|
+
},
|
|
584
558
|
channelName: {
|
|
585
559
|
type: "string",
|
|
586
560
|
description: "The name of the Slack channel to send the message to (e.g. general, alerts)",
|
|
@@ -6865,7 +6839,7 @@ export const googleOauthSearchDriveByQueryAndGetFileContentDefinition = {
|
|
|
6865
6839
|
properties: {
|
|
6866
6840
|
query: {
|
|
6867
6841
|
type: "string",
|
|
6868
|
-
description: "
|
|
6842
|
+
description: "Google Drive API search syntax, eg \"fullText contains 'Valentine\\'s Day'\"",
|
|
6869
6843
|
},
|
|
6870
6844
|
limit: {
|
|
6871
6845
|
type: "number",
|
|
@@ -6877,7 +6851,7 @@ export const googleOauthSearchDriveByQueryAndGetFileContentDefinition = {
|
|
|
6877
6851
|
},
|
|
6878
6852
|
searchDriveByDrive: {
|
|
6879
6853
|
type: "boolean",
|
|
6880
|
-
description: "
|
|
6854
|
+
description: "Search drive by drive or run a general search",
|
|
6881
6855
|
},
|
|
6882
6856
|
orderByQuery: {
|
|
6883
6857
|
type: "string",
|
|
@@ -58,7 +58,9 @@ export declare const AuthParamsSchema: z.ZodObject<{
|
|
|
58
58
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
59
59
|
refreshToken: z.ZodOptional<z.ZodString>;
|
|
60
60
|
redirectUri: z.ZodOptional<z.ZodString>;
|
|
61
|
+
userEmail: z.ZodOptional<z.ZodString>;
|
|
61
62
|
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
userEmail?: string | undefined;
|
|
62
64
|
subdomain?: string | undefined;
|
|
63
65
|
username?: string | undefined;
|
|
64
66
|
authToken?: string | undefined;
|
|
@@ -78,6 +80,7 @@ export declare const AuthParamsSchema: z.ZodObject<{
|
|
|
78
80
|
refreshToken?: string | undefined;
|
|
79
81
|
redirectUri?: string | undefined;
|
|
80
82
|
}, {
|
|
83
|
+
userEmail?: string | undefined;
|
|
81
84
|
subdomain?: string | undefined;
|
|
82
85
|
username?: string | undefined;
|
|
83
86
|
authToken?: string | undefined;
|
|
@@ -722,35 +725,18 @@ export declare const slackCreateChannelOutputSchema: z.ZodObject<{
|
|
|
722
725
|
}>;
|
|
723
726
|
export type slackCreateChannelOutputType = z.infer<typeof slackCreateChannelOutputSchema>;
|
|
724
727
|
export type slackCreateChannelFunction = ActionFunction<slackCreateChannelParamsType, AuthParamsType, slackCreateChannelOutputType>;
|
|
725
|
-
export declare const slackArchiveChannelParamsSchema: z.ZodObject<{
|
|
726
|
-
channelName: z.ZodString;
|
|
727
|
-
}, "strip", z.ZodTypeAny, {
|
|
728
|
-
channelName: string;
|
|
729
|
-
}, {
|
|
730
|
-
channelName: string;
|
|
731
|
-
}>;
|
|
732
|
-
export type slackArchiveChannelParamsType = z.infer<typeof slackArchiveChannelParamsSchema>;
|
|
733
|
-
export declare const slackArchiveChannelOutputSchema: z.ZodObject<{
|
|
734
|
-
success: z.ZodBoolean;
|
|
735
|
-
error: z.ZodOptional<z.ZodString>;
|
|
736
|
-
}, "strip", z.ZodTypeAny, {
|
|
737
|
-
success: boolean;
|
|
738
|
-
error?: string | undefined;
|
|
739
|
-
}, {
|
|
740
|
-
success: boolean;
|
|
741
|
-
error?: string | undefined;
|
|
742
|
-
}>;
|
|
743
|
-
export type slackArchiveChannelOutputType = z.infer<typeof slackArchiveChannelOutputSchema>;
|
|
744
|
-
export type slackArchiveChannelFunction = ActionFunction<slackArchiveChannelParamsType, AuthParamsType, slackArchiveChannelOutputType>;
|
|
745
728
|
export declare const slackSendMessageParamsSchema: z.ZodObject<{
|
|
746
|
-
|
|
729
|
+
channelId: z.ZodOptional<z.ZodString>;
|
|
730
|
+
channelName: z.ZodOptional<z.ZodString>;
|
|
747
731
|
message: z.ZodString;
|
|
748
732
|
}, "strip", z.ZodTypeAny, {
|
|
749
733
|
message: string;
|
|
750
|
-
channelName
|
|
734
|
+
channelName?: string | undefined;
|
|
735
|
+
channelId?: string | undefined;
|
|
751
736
|
}, {
|
|
752
737
|
message: string;
|
|
753
|
-
channelName
|
|
738
|
+
channelName?: string | undefined;
|
|
739
|
+
channelId?: string | undefined;
|
|
754
740
|
}>;
|
|
755
741
|
export type slackSendMessageParamsType = z.infer<typeof slackSendMessageParamsSchema>;
|
|
756
742
|
export declare const slackSendMessageOutputSchema: z.ZodObject<{
|
|
@@ -55,6 +55,7 @@ export const AuthParamsSchema = z.object({
|
|
|
55
55
|
tenantId: z.string().optional(),
|
|
56
56
|
refreshToken: z.string().optional(),
|
|
57
57
|
redirectUri: z.string().optional(),
|
|
58
|
+
userEmail: z.string().optional(),
|
|
58
59
|
});
|
|
59
60
|
export const genericFillTemplateParamsSchema = z.object({
|
|
60
61
|
template: z.string().describe("The template string to be processed and returned"),
|
|
@@ -216,15 +217,12 @@ export const slackCreateChannelOutputSchema = z.object({
|
|
|
216
217
|
channelUrl: z.string().describe("The URL of the created channel").optional(),
|
|
217
218
|
error: z.string().describe("The error that occurred if the channel was not created successfully").optional(),
|
|
218
219
|
});
|
|
219
|
-
export const slackArchiveChannelParamsSchema = z.object({
|
|
220
|
-
channelName: z.string().describe("The name of the channel to archive"),
|
|
221
|
-
});
|
|
222
|
-
export const slackArchiveChannelOutputSchema = z.object({
|
|
223
|
-
success: z.boolean().describe("Whether the channel was archived successfully"),
|
|
224
|
-
error: z.string().describe("The error that occurred if the channel was not archived successfully").optional(),
|
|
225
|
-
});
|
|
226
220
|
export const slackSendMessageParamsSchema = z.object({
|
|
227
|
-
|
|
221
|
+
channelId: z.string().describe("The ID of the channel to send the message to").optional(),
|
|
222
|
+
channelName: z
|
|
223
|
+
.string()
|
|
224
|
+
.describe("The name of the Slack channel to send the message to (e.g. general, alerts)")
|
|
225
|
+
.optional(),
|
|
228
226
|
message: z.string().describe("The message content to send to Slack. Can include markdown formatting."),
|
|
229
227
|
});
|
|
230
228
|
export const slackSendMessageOutputSchema = z.object({
|
|
@@ -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;
|
|
@@ -13,48 +13,57 @@ import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
|
|
13
13
|
import { extractTextFromPdf } from "../../../utils/pdf.js";
|
|
14
14
|
import { getGoogleDocContent, getGoogleSheetContent, getGoogleSlidesContent } from "../../../utils/google.js";
|
|
15
15
|
const getDriveFileContentById = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
16
|
+
var _b, _c, _d, _e;
|
|
16
17
|
if (!authParams.authToken) {
|
|
17
18
|
return { success: false, error: MISSING_AUTH_TOKEN };
|
|
18
19
|
}
|
|
19
20
|
const BASE_URL = "https://www.googleapis.com/drive/v3/files/";
|
|
20
|
-
const {
|
|
21
|
-
const
|
|
22
|
-
const
|
|
21
|
+
const headers = { Authorization: `Bearer ${authParams.authToken}` };
|
|
22
|
+
const { limit } = params;
|
|
23
|
+
const timeoutLimit = params.timeoutLimit !== undefined && params.timeoutLimit > 0 ? params.timeoutLimit * 1000 : 15000;
|
|
24
|
+
const axiosClient = createAxiosClientWithTimeout(timeoutLimit);
|
|
25
|
+
// helper to fetch drive metadata with fields we need (incl. shortcut details)
|
|
26
|
+
const fetchMeta = (fid) => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
|
+
const metaUrl = `${BASE_URL}${encodeURIComponent(fid)}` +
|
|
28
|
+
`?fields=name,mimeType,size,driveId,parents,` +
|
|
29
|
+
`shortcutDetails(targetId,targetMimeType)` +
|
|
30
|
+
`&supportsAllDrives=true`;
|
|
31
|
+
const res = yield axiosClient.get(metaUrl, { headers });
|
|
32
|
+
return res.data;
|
|
33
|
+
});
|
|
23
34
|
try {
|
|
24
|
-
//
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
// 1) metadata (possibly a shortcut)
|
|
36
|
+
let meta = yield fetchMeta(params.fileId);
|
|
37
|
+
// 2) resolve shortcut transparently (re-point to target id + mime)
|
|
38
|
+
if (meta.mimeType === "application/vnd.google-apps.shortcut" && ((_b = meta.shortcutDetails) === null || _b === void 0 ? void 0 : _b.targetId)) {
|
|
39
|
+
meta = yield fetchMeta(meta.shortcutDetails.targetId);
|
|
40
|
+
}
|
|
41
|
+
const fileName = (_c = meta.name) !== null && _c !== void 0 ? _c : "";
|
|
42
|
+
const mimeType = (_d = meta.mimeType) !== null && _d !== void 0 ? _d : "";
|
|
43
|
+
const size = meta.size ? parseInt(meta.size, 10) : undefined;
|
|
44
|
+
const driveId = meta.driveId;
|
|
30
45
|
// Check if file is too large (50MB limit for safety)
|
|
31
46
|
const maxMegabytes = params.fileSizeLimit && params.fileSizeLimit > 0 ? params.fileSizeLimit : 50;
|
|
32
47
|
const maxFileSize = maxMegabytes * 1024 * 1024;
|
|
33
|
-
if (size &&
|
|
34
|
-
return {
|
|
35
|
-
success: false,
|
|
36
|
-
error: "File too large (" + maxMegabytes + "MB)",
|
|
37
|
-
};
|
|
48
|
+
if (size !== undefined && size > maxFileSize) {
|
|
49
|
+
return { success: false, error: `File too large (${maxMegabytes}MB)` };
|
|
38
50
|
}
|
|
39
51
|
let content = "";
|
|
40
|
-
const
|
|
52
|
+
const sharedDriveParam = driveId ? "&supportsAllDrives=true" : "";
|
|
41
53
|
// Google Docs - use Google Docs API instead of Drive export
|
|
42
54
|
if (mimeType === "application/vnd.google-apps.document") {
|
|
43
|
-
content = yield getGoogleDocContent(fileId, authParams.authToken, axiosClient,
|
|
55
|
+
content = yield getGoogleDocContent(params.fileId, authParams.authToken, axiosClient, sharedDriveParam);
|
|
44
56
|
}
|
|
45
|
-
// Google Sheets - use Google Sheets API instead of Drive export
|
|
46
57
|
else if (mimeType === "application/vnd.google-apps.spreadsheet") {
|
|
47
|
-
content = yield getGoogleSheetContent(fileId, authParams.authToken, axiosClient,
|
|
58
|
+
content = yield getGoogleSheetContent(params.fileId, authParams.authToken, axiosClient, sharedDriveParam);
|
|
48
59
|
}
|
|
49
|
-
// Google Slides - use Google Slides API instead of Drive export
|
|
50
60
|
else if (mimeType === "application/vnd.google-apps.presentation") {
|
|
51
|
-
content = yield getGoogleSlidesContent(fileId, authParams.authToken, axiosClient,
|
|
61
|
+
content = yield getGoogleSlidesContent(params.fileId, authParams.authToken, axiosClient, sharedDriveParam);
|
|
52
62
|
}
|
|
53
|
-
// PDF files - download and extract text using pdfjs-dist
|
|
54
63
|
else if (mimeType === "application/pdf") {
|
|
55
|
-
const downloadUrl = `${BASE_URL}${encodeURIComponent(fileId)}?alt=media${
|
|
64
|
+
const downloadUrl = `${BASE_URL}${encodeURIComponent(params.fileId)}?alt=media${sharedDriveParam}`;
|
|
56
65
|
const downloadRes = yield axiosClient.get(downloadUrl, {
|
|
57
|
-
headers
|
|
66
|
+
headers,
|
|
58
67
|
responseType: "arraybuffer",
|
|
59
68
|
});
|
|
60
69
|
try {
|
|
@@ -67,18 +76,16 @@ const getDriveFileContentById = (_a) => __awaiter(void 0, [_a], void 0, function
|
|
|
67
76
|
};
|
|
68
77
|
}
|
|
69
78
|
}
|
|
70
|
-
// Word documents (.docx or .doc) - download and extract text using mammoth
|
|
71
79
|
else if (mimeType === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ||
|
|
72
80
|
mimeType === "application/msword") {
|
|
73
|
-
const downloadUrl = `${BASE_URL}${encodeURIComponent(fileId)}?alt=media${
|
|
81
|
+
const downloadUrl = `${BASE_URL}${encodeURIComponent(params.fileId)}?alt=media${sharedDriveParam}`;
|
|
74
82
|
const downloadRes = yield axiosClient.get(downloadUrl, {
|
|
75
|
-
headers
|
|
83
|
+
headers,
|
|
76
84
|
responseType: "arraybuffer",
|
|
77
85
|
});
|
|
78
86
|
try {
|
|
79
|
-
// mammoth works with .docx files. It will ignore formatting and return raw text
|
|
80
87
|
const result = yield mammoth.extractRawText({ buffer: Buffer.from(downloadRes.data) });
|
|
81
|
-
content = result.value
|
|
88
|
+
content = (_e = result.value) !== null && _e !== void 0 ? _e : "";
|
|
82
89
|
}
|
|
83
90
|
catch (wordError) {
|
|
84
91
|
return {
|
|
@@ -87,38 +94,27 @@ const getDriveFileContentById = (_a) => __awaiter(void 0, [_a], void 0, function
|
|
|
87
94
|
};
|
|
88
95
|
}
|
|
89
96
|
}
|
|
90
|
-
else if (mimeType === "text/plain" ||
|
|
91
|
-
|
|
92
|
-
mimeType === "application/rtf" ||
|
|
93
|
-
(mimeType === null || mimeType === void 0 ? void 0 : mimeType.startsWith("text/"))) {
|
|
94
|
-
// Text-based files
|
|
95
|
-
const downloadUrl = `${BASE_URL}${encodeURIComponent(fileId)}?alt=media${sharedDriveParams}`;
|
|
97
|
+
else if (mimeType === "text/plain" || mimeType === "text/html" || mimeType === "application/rtf") {
|
|
98
|
+
const downloadUrl = `${BASE_URL}${encodeURIComponent(params.fileId)}?alt=media${sharedDriveParam}`;
|
|
96
99
|
const downloadRes = yield axiosClient.get(downloadUrl, {
|
|
97
|
-
headers
|
|
100
|
+
headers,
|
|
98
101
|
responseType: "text",
|
|
99
102
|
});
|
|
100
103
|
content = downloadRes.data;
|
|
101
104
|
}
|
|
102
105
|
else {
|
|
103
|
-
|
|
104
|
-
return {
|
|
105
|
-
success: false,
|
|
106
|
-
error: `Unsupported file type: ${mimeType}`,
|
|
107
|
-
};
|
|
106
|
+
return { success: false, error: `Unsupported file type: ${mimeType}` };
|
|
108
107
|
}
|
|
109
|
-
//
|
|
110
|
-
content = content
|
|
108
|
+
// 5) normalize whitespace + apply content limit
|
|
109
|
+
content = (content !== null && content !== void 0 ? content : "")
|
|
110
|
+
.trim()
|
|
111
|
+
.replace(/\r?\n+/g, " ")
|
|
112
|
+
.replace(/ +/g, " ");
|
|
111
113
|
const originalLength = content.length;
|
|
112
|
-
content = content.replace(/\r?\n+/g, " ").replace(/ +/g, " ");
|
|
113
114
|
if (limit && content.length > limit) {
|
|
114
|
-
content = content.
|
|
115
|
+
content = content.slice(0, limit);
|
|
115
116
|
}
|
|
116
|
-
return {
|
|
117
|
-
success: true,
|
|
118
|
-
content,
|
|
119
|
-
fileName,
|
|
120
|
-
fileLength: originalLength,
|
|
121
|
-
};
|
|
117
|
+
return { success: true, content, fileName, fileLength: originalLength };
|
|
122
118
|
}
|
|
123
119
|
catch (error) {
|
|
124
120
|
console.error("Error getting Google Drive file content", error);
|
|
@@ -42,7 +42,7 @@ const searchDriveByQuery = (_a) => __awaiter(void 0, [_a], void 0, function* ({
|
|
|
42
42
|
}
|
|
43
43
|
const { query, limit, searchDriveByDrive, orderByQuery } = params;
|
|
44
44
|
// Can't use orderBy on quereis that include fullText
|
|
45
|
-
const safeOrderBy = query.includes("fullText") ? undefined : orderByQuery;
|
|
45
|
+
const safeOrderBy = query.includes("fullText") ? undefined : (orderByQuery !== null && orderByQuery !== void 0 ? orderByQuery : "modifiedTime desc");
|
|
46
46
|
try {
|
|
47
47
|
if (searchDriveByDrive) {
|
|
48
48
|
return yield searchAllDrivesIndividually(query, authParams.authToken, limit, safeOrderBy);
|
|
@@ -63,8 +63,7 @@ const searchDriveByQuery = (_a) => __awaiter(void 0, [_a], void 0, function* ({
|
|
|
63
63
|
// Original search method - search all drives at once
|
|
64
64
|
const searchAllDrivesAtOnce = (query, authToken, limit, orderByQuery) => __awaiter(void 0, void 0, void 0, function* () {
|
|
65
65
|
var _a;
|
|
66
|
-
const
|
|
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)}`;
|
|
66
|
+
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${orderByQuery ? `&orderBy=${encodeURIComponent(orderByQuery)}` : ""}`;
|
|
68
67
|
const res = yield axiosClient.get(url, {
|
|
69
68
|
headers: {
|
|
70
69
|
Authorization: `Bearer ${authToken}`,
|
|
@@ -136,17 +135,16 @@ const getAllDrives = (authToken) => __awaiter(void 0, void 0, void 0, function*
|
|
|
136
135
|
const searchSingleDrive = (query, driveId, authToken, orderByQuery) => __awaiter(void 0, void 0, void 0, function* () {
|
|
137
136
|
var _a;
|
|
138
137
|
const files = [];
|
|
139
|
-
const orderBy = orderByQuery || "modifiedTime desc";
|
|
140
138
|
let nextPageToken;
|
|
141
139
|
do {
|
|
142
140
|
let url;
|
|
143
141
|
if (driveId === "root") {
|
|
144
142
|
// Search in user's personal drive
|
|
145
|
-
url = `https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(query)}&fields=files(id,name,mimeType,webViewLink),nextPageToken&pageSize=1000
|
|
143
|
+
url = `https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(query)}&fields=files(id,name,mimeType,webViewLink),nextPageToken&pageSize=1000${orderByQuery ? `&orderBy=${encodeURIComponent(orderByQuery)}` : ""}${nextPageToken ? `&pageToken=${nextPageToken}` : ""}`;
|
|
146
144
|
}
|
|
147
145
|
else {
|
|
148
146
|
// Search in specific shared drive
|
|
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
|
|
147
|
+
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${orderByQuery ? `&orderBy=${encodeURIComponent(orderByQuery)}` : ""}${nextPageToken ? `&pageToken=${nextPageToken}` : ""}`;
|
|
150
148
|
}
|
|
151
149
|
const res = yield axiosClient.get(url, {
|
|
152
150
|
headers: {
|
|
@@ -10,9 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { WebClient } from "@slack/web-api";
|
|
11
11
|
import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
|
12
12
|
const createChannel = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
13
|
+
var _b;
|
|
13
14
|
if (!authParams.authToken) {
|
|
14
15
|
throw new Error(MISSING_AUTH_TOKEN);
|
|
15
16
|
}
|
|
17
|
+
const userEmail = authParams.userEmail;
|
|
16
18
|
try {
|
|
17
19
|
const client = new WebClient(authParams.authToken);
|
|
18
20
|
const { channelName, isPrivate } = params;
|
|
@@ -27,6 +29,24 @@ const createChannel = (_a) => __awaiter(void 0, [_a], void 0, function* ({ param
|
|
|
27
29
|
error: error || "Unknown error creating channel",
|
|
28
30
|
};
|
|
29
31
|
}
|
|
32
|
+
if (!userEmail) {
|
|
33
|
+
return {
|
|
34
|
+
success: false,
|
|
35
|
+
error: "userEmail must be provided in authParams to invite user to private channel",
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const userID = yield client.users.lookupByEmail({ email: userEmail });
|
|
39
|
+
if (!((_b = userID.user) === null || _b === void 0 ? void 0 : _b.id)) {
|
|
40
|
+
return {
|
|
41
|
+
success: false,
|
|
42
|
+
error: `Could not find user with email ${userEmail}`,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
// Add the user who asked to create the channel to the channel
|
|
46
|
+
yield client.conversations.invite({
|
|
47
|
+
channel: channel.id,
|
|
48
|
+
users: userID.user.id,
|
|
49
|
+
});
|
|
30
50
|
return {
|
|
31
51
|
success: true,
|
|
32
52
|
channelId: channel.id,
|
|
@@ -22,7 +22,7 @@ const getChannelMessages = (_a) => __awaiter(void 0, [_a], void 0, function* ({
|
|
|
22
22
|
let channelId = inputChannelId;
|
|
23
23
|
if (!channelId) {
|
|
24
24
|
const allChannels = yield getSlackChannels(client);
|
|
25
|
-
const channel = allChannels.find(channel => channel.name === channelName
|
|
25
|
+
const channel = allChannels.find(channel => channel.name === channelName);
|
|
26
26
|
if (!channel || !channel.id) {
|
|
27
27
|
throw Error(`Channel with name ${channelName} not found`);
|
|
28
28
|
}
|
|
@@ -22,6 +22,7 @@ export function getSlackChannels(client) {
|
|
|
22
22
|
const allChannelsIterable = yield client.paginate("conversations.list", {
|
|
23
23
|
exclude_archived: true,
|
|
24
24
|
limit,
|
|
25
|
+
types: "public_channel,private_channel",
|
|
25
26
|
});
|
|
26
27
|
try {
|
|
27
28
|
for (var _d = true, _e = __asyncValues(allChannelsIterable), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
@@ -12,19 +12,26 @@ import { slackSendMessageOutputSchema, } from "../../autogen/types.js";
|
|
|
12
12
|
import { getSlackChannels } from "./helpers.js";
|
|
13
13
|
import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
|
14
14
|
const sendMessage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
15
|
+
var _b;
|
|
15
16
|
if (!authParams.authToken) {
|
|
16
17
|
throw new Error(MISSING_AUTH_TOKEN);
|
|
17
18
|
}
|
|
19
|
+
const { channelId: inputChannelId, channelName, message } = params;
|
|
20
|
+
if (!inputChannelId && !channelName) {
|
|
21
|
+
throw Error("Either channelId or channelName must be provided");
|
|
22
|
+
}
|
|
18
23
|
const client = new WebClient(authParams.authToken);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
let channelId = inputChannelId;
|
|
25
|
+
if (!channelId) {
|
|
26
|
+
const allChannels = yield getSlackChannels(client);
|
|
27
|
+
channelId = (_b = allChannels.find(channel => channel.name == channelName)) === null || _b === void 0 ? void 0 : _b.id;
|
|
28
|
+
}
|
|
29
|
+
if (!channelId) {
|
|
23
30
|
throw Error(`Channel with name ${channelName} not found`);
|
|
24
31
|
}
|
|
25
32
|
try {
|
|
26
33
|
yield client.chat.postMessage({
|
|
27
|
-
channel:
|
|
34
|
+
channel: channelId,
|
|
28
35
|
blocks: [
|
|
29
36
|
{
|
|
30
37
|
type: "section",
|
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;
|