@credal/actions 0.2.69 → 0.2.71
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/definitions.d.ts +5 -0
- package/dist/actions/autogen/definitions.js +132 -0
- package/dist/actions/autogen/templates.d.ts +1 -0
- package/dist/actions/autogen/templates.js +70 -2
- package/dist/actions/autogen/types.d.ts +62 -3
- package/dist/actions/autogen/types.js +25 -1
- package/dist/actions/definitions.js +35 -0
- package/dist/actions/invokeMapper.d.ts +9 -0
- package/dist/actions/invokeMapper.js +33 -0
- package/dist/actions/providers/confluence/updatePage.js +9 -13
- package/dist/actions/providers/gitlab/listDirectory.d.ts +6 -0
- package/dist/actions/providers/gitlab/listDirectory.js +55 -0
- package/dist/actions/providers/google-oauth/getSheetValue.d.ts +3 -0
- package/dist/actions/providers/google-oauth/getSheetValue.js +50 -0
- package/dist/actions/providers/google-oauth/getSheetValues.d.ts +3 -0
- package/dist/actions/providers/google-oauth/getSheetValues.js +50 -0
- package/dist/actions/providers/google-oauth/listGmailThreads.d.ts +3 -0
- package/dist/actions/providers/google-oauth/listGmailThreads.js +98 -0
- package/dist/actions/providers/google-oauth/searchGmailMessages.d.ts +3 -0
- package/dist/actions/providers/google-oauth/searchGmailMessages.js +91 -0
- package/dist/actions/providers/googlemaps/nearbysearch.d.ts +3 -0
- package/dist/actions/providers/googlemaps/nearbysearch.js +96 -0
- package/dist/actions/providers/jira/createTicket.d.ts +3 -0
- package/dist/actions/providers/jira/createTicket.js +34 -0
- package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.d.ts +3 -0
- package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.js +43 -0
- package/dist/actions/providers/slack/getChannelMessages.js +14 -7
- package/dist/actions/providers/slack/listConversations.d.ts +1 -1
- package/dist/actions/providers/slack/list_conversations.d.ts +3 -0
- package/dist/actions/providers/slack/list_conversations.js +60 -0
- package/dist/actions/providers/slack/summarizeChannel.d.ts +3 -0
- package/dist/actions/providers/slack/summarizeChannel.js +51 -0
- package/dist/actions/schema.js +6 -0
- package/dist/actions/types.js +2 -0
- package/dist/main.js +11 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { genericFillTemplateParamsSchema, genericFillTemplateOutputSchema, confluenceOverwritePageParamsSchema, confluenceOverwritePageOutputSchema, googlemapsValidateAddressOutputSchema, googlemapsValidateAddressParamsSchema, googleOauthCreateNewGoogleDocParamsSchema, googleOauthCreateNewGoogleDocOutputSchema, mathAddOutputSchema, mathAddParamsSchema, mongoInsertMongoDocOutputSchema, mongoInsertMongoDocParamsSchema, slackSendMessageOutputSchema, slackSendMessageParamsSchema, slackGetChannelMessagesOutputSchema, slackGetChannelMessagesParamsSchema, slackArchiveChannelParamsSchema, slackArchiveChannelOutputSchema, slackCreateChannelParamsSchema, slackCreateChannelOutputSchema, snowflakeGetRowByFieldValueOutputSchema, snowflakeGetRowByFieldValueParamsSchema, zendeskCreateZendeskTicketOutputSchema, zendeskCreateZendeskTicketParamsSchema, zendeskGetTicketDetailsOutputSchema, zendeskGetTicketDetailsParamsSchema, zendeskUpdateTicketStatusOutputSchema, zendeskUpdateTicketStatusParamsSchema, zendeskAddCommentToTicketOutputSchema, zendeskAddCommentToTicketParamsSchema, zendeskAssignTicketOutputSchema, zendeskAssignTicketParamsSchema, zendeskListZendeskTicketsOutputSchema, zendeskListZendeskTicketsParamsSchema, 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, firecrawlScrapeTweetDataWithNitterParamsSchema, firecrawlScrapeTweetDataWithNitterOutputSchema, resendSendEmailParamsSchema, linkedinCreateShareLinkedinPostUrlParamsSchema, linkedinCreateShareLinkedinPostUrlOutputSchema, xCreateShareXPostUrlParamsSchema, xCreateShareXPostUrlOutputSchema, finnhubSymbolLookupParamsSchema, finnhubSymbolLookupOutputSchema, finnhubGetBasicFinancialsParamsSchema, finnhubGetBasicFinancialsOutputSchema, confluenceFetchPageContentParamsSchema, confluenceFetchPageContentOutputSchema, snowflakeRunSnowflakeQueryParamsSchema, snowflakeRunSnowflakeQueryOutputSchema, lookerEnableUserByEmailParamsSchema, lookerEnableUserByEmailOutputSchema, googleOauthUpdateDocParamsSchema, googleOauthUpdateDocOutputSchema, googleOauthCreateSpreadsheetParamsSchema, googleOauthCreateSpreadsheetOutputSchema, googleOauthUpdateSpreadsheetParamsSchema, googleOauthUpdateSpreadsheetOutputSchema, googleOauthScheduleCalendarMeetingParamsSchema, googleOauthScheduleCalendarMeetingOutputSchema, googleOauthListCalendarsParamsSchema, googleOauthListCalendarsOutputSchema, googleOauthListCalendarEventsParamsSchema, googleOauthListCalendarEventsOutputSchema, googleOauthUpdateCalendarEventParamsSchema, googleOauthUpdateCalendarEventOutputSchema, googleOauthDeleteCalendarEventParamsSchema, googleOauthDeleteCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, gongGetGongTranscriptsParamsSchema, gongGetGongTranscriptsOutputSchema, ashbyCreateNoteParamsSchema, ashbyCreateNoteOutputSchema, ashbyGetCandidateInfoParamsSchema, ashbyGetCandidateInfoOutputSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, ashbyListCandidatesParamsSchema, ashbyListCandidatesOutputSchema, ashbyListCandidateNotesParamsSchema, ashbyListCandidateNotesOutputSchema, ashbySearchCandidatesParamsSchema, ashbySearchCandidatesOutputSchema, ashbyCreateCandidateParamsSchema, ashbyCreateCandidateOutputSchema, ashbyUpdateCandidateParamsSchema, ashbyUpdateCandidateOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, salesforceFetchSalesforceSchemaByObjectParamsSchema, salesforceFetchSalesforceSchemaByObjectOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, ashbyAddCandidateToProjectParamsSchema, ashbyAddCandidateToProjectOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, kandjiGetFVRecoveryKeyForDeviceParamsSchema, kandjiGetFVRecoveryKeyForDeviceOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, jamfGetJamfComputerInventoryParamsSchema, jamfGetJamfComputerInventoryOutputSchema, jamfGetJamfFileVaultRecoveryKeyParamsSchema, jamfGetJamfFileVaultRecoveryKeyOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, oktaListOktaUsersParamsSchema, oktaListOktaUsersOutputSchema, oktaGetOktaUserParamsSchema, oktaGetOktaUserOutputSchema, oktaListOktaUserGroupsParamsSchema, oktaListOktaUserGroupsOutputSchema, oktaListOktaGroupsParamsSchema, oktaListOktaGroupsOutputSchema, oktaGetOktaGroupParamsSchema, oktaGetOktaGroupOutputSchema, oktaListOktaGroupMembersParamsSchema, oktaListOktaGroupMembersOutputSchema, oktaRemoveUserFromGroupParamsSchema, oktaRemoveUserFromGroupOutputSchema, oktaAddUserToGroupParamsSchema, oktaAddUserToGroupOutputSchema, oktaResetPasswordParamsSchema, oktaResetPasswordOutputSchema, oktaResetMFAParamsSchema, oktaResetMFAOutputSchema, oktaListMFAParamsSchema, oktaListMFAOutputSchema, jamfGetJamfUserComputerIdParamsSchema, jamfGetJamfUserComputerIdOutputSchema, jamfLockJamfComputerByIdParamsSchema, jamfLockJamfComputerByIdOutputSchema, oktaTriggerOktaWorkflowParamsSchema, oktaTriggerOktaWorkflowOutputSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchRepositoryOutputSchema, githubSearchRepositoryParamsSchema, githubSearchOrganizationOutputSchema, githubSearchOrganizationParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, googleOauthSearchDriveByQueryOutputSchema, googleOauthSearchDriveByQueryParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentOutputSchema, githubGetFileContentParamsSchema, githubGetFileContentOutputSchema, githubListDirectoryOutputSchema, githubListDirectoryParamsSchema, linearGetIssuesParamsSchema, linearGetIssuesOutputSchema, linearGetIssueDetailsParamsSchema, linearGetIssueDetailsOutputSchema, linearGetProjectDetailsParamsSchema, linearGetProjectDetailsOutputSchema, linearGetTeamDetailsParamsSchema, linearGetTeamDetailsOutputSchema, linearGetProjectsParamsSchema, linearGetProjectsOutputSchema, linearGetTeamsParamsSchema, linearGetTeamsOutputSchema, gitlabGetFileContentParamsSchema, gitlabGetFileContentOutputSchema, jiraPublicCommentOnServiceDeskRequestParamsSchema, jiraPublicCommentOnServiceDeskRequestOutputSchema, googlemailSendGmailParamsSchema, googlemailSendGmailOutputSchema, } 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, firecrawlScrapeTweetDataWithNitterParamsSchema, firecrawlScrapeTweetDataWithNitterOutputSchema, resendSendEmailParamsSchema, linkedinCreateShareLinkedinPostUrlParamsSchema, linkedinCreateShareLinkedinPostUrlOutputSchema, xCreateShareXPostUrlParamsSchema, xCreateShareXPostUrlOutputSchema, finnhubSymbolLookupParamsSchema, finnhubSymbolLookupOutputSchema, finnhubGetBasicFinancialsParamsSchema, finnhubGetBasicFinancialsOutputSchema, confluenceFetchPageContentParamsSchema, confluenceFetchPageContentOutputSchema, snowflakeRunSnowflakeQueryParamsSchema, snowflakeRunSnowflakeQueryOutputSchema, lookerEnableUserByEmailParamsSchema, lookerEnableUserByEmailOutputSchema, googleOauthUpdateDocParamsSchema, googleOauthUpdateDocOutputSchema, googleOauthCreateSpreadsheetParamsSchema, googleOauthCreateSpreadsheetOutputSchema, googleOauthUpdateSpreadsheetParamsSchema, googleOauthUpdateSpreadsheetOutputSchema, googleOauthScheduleCalendarMeetingParamsSchema, googleOauthScheduleCalendarMeetingOutputSchema, googleOauthListCalendarsParamsSchema, googleOauthListCalendarsOutputSchema, googleOauthListCalendarEventsParamsSchema, googleOauthListCalendarEventsOutputSchema, googleOauthUpdateCalendarEventParamsSchema, googleOauthUpdateCalendarEventOutputSchema, googleOauthDeleteCalendarEventParamsSchema, googleOauthDeleteCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, gongGetGongTranscriptsParamsSchema, gongGetGongTranscriptsOutputSchema, ashbyCreateNoteParamsSchema, ashbyCreateNoteOutputSchema, ashbyGetCandidateInfoParamsSchema, ashbyGetCandidateInfoOutputSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, ashbyListCandidatesParamsSchema, ashbyListCandidatesOutputSchema, ashbyListCandidateNotesParamsSchema, ashbyListCandidateNotesOutputSchema, ashbySearchCandidatesParamsSchema, ashbySearchCandidatesOutputSchema, ashbyCreateCandidateParamsSchema, ashbyCreateCandidateOutputSchema, ashbyUpdateCandidateParamsSchema, ashbyUpdateCandidateOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, salesforceFetchSalesforceSchemaByObjectParamsSchema, salesforceFetchSalesforceSchemaByObjectOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, ashbyAddCandidateToProjectParamsSchema, ashbyAddCandidateToProjectOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, kandjiGetFVRecoveryKeyForDeviceParamsSchema, kandjiGetFVRecoveryKeyForDeviceOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, jamfGetJamfComputerInventoryParamsSchema, jamfGetJamfComputerInventoryOutputSchema, jamfGetJamfFileVaultRecoveryKeyParamsSchema, jamfGetJamfFileVaultRecoveryKeyOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, oktaListOktaUsersParamsSchema, oktaListOktaUsersOutputSchema, oktaGetOktaUserParamsSchema, oktaGetOktaUserOutputSchema, oktaListOktaUserGroupsParamsSchema, oktaListOktaUserGroupsOutputSchema, oktaListOktaGroupsParamsSchema, oktaListOktaGroupsOutputSchema, oktaGetOktaGroupParamsSchema, oktaGetOktaGroupOutputSchema, oktaListOktaGroupMembersParamsSchema, oktaListOktaGroupMembersOutputSchema, oktaRemoveUserFromGroupParamsSchema, oktaRemoveUserFromGroupOutputSchema, oktaAddUserToGroupParamsSchema, oktaAddUserToGroupOutputSchema, oktaResetPasswordParamsSchema, oktaResetPasswordOutputSchema, oktaResetMFAParamsSchema, oktaResetMFAOutputSchema, oktaListMFAParamsSchema, oktaListMFAOutputSchema, jamfGetJamfUserComputerIdParamsSchema, jamfGetJamfUserComputerIdOutputSchema, jamfLockJamfComputerByIdParamsSchema, jamfLockJamfComputerByIdOutputSchema, oktaTriggerOktaWorkflowParamsSchema, oktaTriggerOktaWorkflowOutputSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchRepositoryOutputSchema, githubSearchRepositoryParamsSchema, githubSearchOrganizationOutputSchema, githubSearchOrganizationParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, googleOauthSearchDriveByQueryOutputSchema, googleOauthSearchDriveByQueryParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentOutputSchema, githubGetFileContentParamsSchema, githubGetFileContentOutputSchema, githubListDirectoryOutputSchema, githubListDirectoryParamsSchema, linearGetIssuesParamsSchema, linearGetIssuesOutputSchema, linearGetIssueDetailsParamsSchema, linearGetIssueDetailsOutputSchema, linearGetProjectDetailsParamsSchema, linearGetProjectDetailsOutputSchema, linearGetTeamDetailsParamsSchema, linearGetTeamDetailsOutputSchema, linearGetProjectsParamsSchema, linearGetProjectsOutputSchema, linearGetTeamsParamsSchema, linearGetTeamsOutputSchema, gitlabGetFileContentParamsSchema, gitlabGetFileContentOutputSchema, jiraPublicCommentOnServiceDeskRequestParamsSchema, jiraPublicCommentOnServiceDeskRequestOutputSchema, googlemailSendGmailParamsSchema, googlemailSendGmailOutputSchema, gitlabListDirectoryParamsSchema, gitlabListDirectoryOutputSchema, } 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";
|
|
@@ -127,6 +127,7 @@ import getTeamDetails from "./providers/linear/getTeamDetails.js";
|
|
|
127
127
|
import getProjects from "./providers/linear/getProjects.js";
|
|
128
128
|
import getTeams from "./providers/linear/getTeams.js";
|
|
129
129
|
import gitlabGetFileContent from "./providers/gitlab/getFileContent.js";
|
|
130
|
+
import gitlabListDirectory from "./providers/gitlab/listDirectory.js";
|
|
130
131
|
import publicCommentOnServiceDeskRequest from "./providers/jira/publicCommentOnServiceDeskRequest.js";
|
|
131
132
|
import sendGmail from "./providers/googlemail/sendGmail.js";
|
|
132
133
|
const jiraActions = {
|
|
@@ -813,6 +814,11 @@ export const ActionMapper = {
|
|
|
813
814
|
paramsSchema: gitlabGetFileContentParamsSchema,
|
|
814
815
|
outputSchema: gitlabGetFileContentOutputSchema,
|
|
815
816
|
},
|
|
817
|
+
listDirectory: {
|
|
818
|
+
fn: gitlabListDirectory,
|
|
819
|
+
paramsSchema: gitlabListDirectoryParamsSchema,
|
|
820
|
+
outputSchema: gitlabListDirectoryOutputSchema,
|
|
821
|
+
},
|
|
816
822
|
},
|
|
817
823
|
linear: {
|
|
818
824
|
getIssues: {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ActionTemplate } from "@/actions/parse";
|
|
2
|
+
export declare const slackSendMessageDefinition: ActionTemplate;
|
|
3
|
+
export declare const slackListConversationsDefinition: ActionTemplate;
|
|
4
|
+
export declare const mathAddDefinition: ActionTemplate;
|
|
5
|
+
export declare const confluenceUpdatePageDefinition: ActionTemplate;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.confluenceUpdatePageDefinition = exports.mathAddDefinition = exports.slackListConversationsDefinition = exports.slackSendMessageDefinition = void 0;
|
|
4
|
+
exports.slackSendMessageDefinition = {
|
|
5
|
+
provider: "slack",
|
|
6
|
+
name: "send_message",
|
|
7
|
+
description: "Sends a message to a Slack channel",
|
|
8
|
+
scopes: ["chat:write"],
|
|
9
|
+
parameters: {
|
|
10
|
+
channel: {
|
|
11
|
+
type: "string",
|
|
12
|
+
description: "The Slack channel to send the message to (e.g., \\#general, \\#alerts)",
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
message: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "The message content to send to Slack. Can include markdown formatting.",
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
output: {},
|
|
22
|
+
};
|
|
23
|
+
exports.slackListConversationsDefinition = {
|
|
24
|
+
provider: "slack",
|
|
25
|
+
name: "list_conversations",
|
|
26
|
+
description: "Lists all conversations in a Slack workspace",
|
|
27
|
+
scopes: ["channels:read", "groups:read", "im:read", "mpim:read"],
|
|
28
|
+
authToken: {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "The Slack access token to use",
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
parameters: {},
|
|
34
|
+
output: {
|
|
35
|
+
channels: {
|
|
36
|
+
type: "array",
|
|
37
|
+
description: "A list of channels in Slack",
|
|
38
|
+
required: true,
|
|
39
|
+
items: {
|
|
40
|
+
type: "object",
|
|
41
|
+
description: "A channel in Slack",
|
|
42
|
+
required: true,
|
|
43
|
+
properties: {
|
|
44
|
+
id: {
|
|
45
|
+
type: "string",
|
|
46
|
+
description: "The ID of the channel",
|
|
47
|
+
required: true,
|
|
48
|
+
},
|
|
49
|
+
name: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "The name of the channel",
|
|
52
|
+
required: true,
|
|
53
|
+
},
|
|
54
|
+
topic: {
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "The topic of the channel",
|
|
57
|
+
required: true,
|
|
58
|
+
},
|
|
59
|
+
purpose: {
|
|
60
|
+
type: "string",
|
|
61
|
+
description: "The purpose of the channel",
|
|
62
|
+
required: true,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
exports.mathAddDefinition = {
|
|
70
|
+
provider: "math",
|
|
71
|
+
name: "add",
|
|
72
|
+
description: "Adds two numbers together",
|
|
73
|
+
scopes: [],
|
|
74
|
+
parameters: {
|
|
75
|
+
a: {
|
|
76
|
+
type: "number",
|
|
77
|
+
description: "The first number to add",
|
|
78
|
+
required: true,
|
|
79
|
+
},
|
|
80
|
+
b: {
|
|
81
|
+
type: "number",
|
|
82
|
+
description: "The second number to add",
|
|
83
|
+
required: true,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
output: {
|
|
87
|
+
result: {
|
|
88
|
+
type: "number",
|
|
89
|
+
description: "The sum of the two numbers",
|
|
90
|
+
required: true,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
exports.confluenceUpdatePageDefinition = {
|
|
95
|
+
provider: "confluence",
|
|
96
|
+
name: "updatePage",
|
|
97
|
+
description: "Updates a confluence page with the new content specified",
|
|
98
|
+
scopes: [],
|
|
99
|
+
authToken: {
|
|
100
|
+
type: "string",
|
|
101
|
+
description: "The access token to use for confluence",
|
|
102
|
+
required: true,
|
|
103
|
+
},
|
|
104
|
+
baseUrl: {
|
|
105
|
+
type: "string",
|
|
106
|
+
description: "The base url required to access the confluence instance",
|
|
107
|
+
required: true,
|
|
108
|
+
},
|
|
109
|
+
parameters: {
|
|
110
|
+
pageId: {
|
|
111
|
+
type: "string",
|
|
112
|
+
description: "The page id that should be updated",
|
|
113
|
+
required: true,
|
|
114
|
+
},
|
|
115
|
+
title: {
|
|
116
|
+
type: "string",
|
|
117
|
+
description: "The title of the page that should be updated",
|
|
118
|
+
required: true,
|
|
119
|
+
},
|
|
120
|
+
username: {
|
|
121
|
+
type: "string",
|
|
122
|
+
description: "The username of the person updating the page",
|
|
123
|
+
required: true,
|
|
124
|
+
},
|
|
125
|
+
content: {
|
|
126
|
+
type: "string",
|
|
127
|
+
description: "The new content for the page",
|
|
128
|
+
required: true,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
output: {},
|
|
132
|
+
};
|
|
@@ -134,6 +134,7 @@ export declare const jamfGetJamfUserComputerIdDefinition: ActionTemplate;
|
|
|
134
134
|
export declare const jamfLockJamfComputerByIdDefinition: ActionTemplate;
|
|
135
135
|
export declare const gitlabSearchGroupDefinition: ActionTemplate;
|
|
136
136
|
export declare const gitlabGetFileContentDefinition: ActionTemplate;
|
|
137
|
+
export declare const gitlabListDirectoryDefinition: ActionTemplate;
|
|
137
138
|
export declare const linearGetIssuesDefinition: ActionTemplate;
|
|
138
139
|
export declare const linearGetIssueDetailsDefinition: ActionTemplate;
|
|
139
140
|
export declare const linearGetProjectsDefinition: ActionTemplate;
|
|
@@ -613,11 +613,15 @@ export const slackGetChannelMessagesDefinition = {
|
|
|
613
613
|
scopes: ["channels:history"],
|
|
614
614
|
parameters: {
|
|
615
615
|
type: "object",
|
|
616
|
-
required: ["
|
|
616
|
+
required: ["oldest"],
|
|
617
617
|
properties: {
|
|
618
|
+
channelId: {
|
|
619
|
+
type: "string",
|
|
620
|
+
description: "The ID of the channel to get messages from. Either the channelId or channelName must be provided.",
|
|
621
|
+
},
|
|
618
622
|
channelName: {
|
|
619
623
|
type: "string",
|
|
620
|
-
description: "Name of the channel to summarize",
|
|
624
|
+
description: "Name of the channel to summarize. Either the channelId or channelName must be provided.",
|
|
621
625
|
},
|
|
622
626
|
oldest: {
|
|
623
627
|
type: "string",
|
|
@@ -10527,6 +10531,70 @@ export const gitlabGetFileContentDefinition = {
|
|
|
10527
10531
|
name: "getFileContent",
|
|
10528
10532
|
provider: "gitlab",
|
|
10529
10533
|
};
|
|
10534
|
+
export const gitlabListDirectoryDefinition = {
|
|
10535
|
+
description: "List directory contents of a path in a GitLab repository",
|
|
10536
|
+
scopes: [],
|
|
10537
|
+
parameters: {
|
|
10538
|
+
type: "object",
|
|
10539
|
+
required: ["group", "project", "path"],
|
|
10540
|
+
properties: {
|
|
10541
|
+
group: {
|
|
10542
|
+
type: "string",
|
|
10543
|
+
description: 'The group or namespace that owns the project (e.g., "my-group" or "org/subgroup")',
|
|
10544
|
+
},
|
|
10545
|
+
project: {
|
|
10546
|
+
type: "string",
|
|
10547
|
+
description: 'The name of the GitLab project (e.g., "my-repo")',
|
|
10548
|
+
},
|
|
10549
|
+
path: {
|
|
10550
|
+
type: "string",
|
|
10551
|
+
description: "The path to list directory contents from (empty string for root)",
|
|
10552
|
+
},
|
|
10553
|
+
ref: {
|
|
10554
|
+
type: "string",
|
|
10555
|
+
description: 'The branch, tag, or commit (defaults to "main")',
|
|
10556
|
+
},
|
|
10557
|
+
},
|
|
10558
|
+
},
|
|
10559
|
+
output: {
|
|
10560
|
+
type: "object",
|
|
10561
|
+
required: ["content"],
|
|
10562
|
+
properties: {
|
|
10563
|
+
content: {
|
|
10564
|
+
type: "array",
|
|
10565
|
+
description: "Array of directory contents",
|
|
10566
|
+
items: {
|
|
10567
|
+
type: "object",
|
|
10568
|
+
required: ["name", "path", "type", "htmlUrl"],
|
|
10569
|
+
properties: {
|
|
10570
|
+
name: {
|
|
10571
|
+
type: "string",
|
|
10572
|
+
description: "The name of the file or directory",
|
|
10573
|
+
},
|
|
10574
|
+
path: {
|
|
10575
|
+
type: "string",
|
|
10576
|
+
description: "The path of the file or directory",
|
|
10577
|
+
},
|
|
10578
|
+
type: {
|
|
10579
|
+
type: "string",
|
|
10580
|
+
description: 'The type of the entry (either "blob" for file or "tree" for directory)',
|
|
10581
|
+
},
|
|
10582
|
+
size: {
|
|
10583
|
+
type: "number",
|
|
10584
|
+
description: "The size of the file in bytes (only for blobs; omitted or 0 for trees)",
|
|
10585
|
+
},
|
|
10586
|
+
htmlUrl: {
|
|
10587
|
+
type: "string",
|
|
10588
|
+
description: "The URL of the file or folder in the GitLab UI",
|
|
10589
|
+
},
|
|
10590
|
+
},
|
|
10591
|
+
},
|
|
10592
|
+
},
|
|
10593
|
+
},
|
|
10594
|
+
},
|
|
10595
|
+
name: "listDirectory",
|
|
10596
|
+
provider: "gitlab",
|
|
10597
|
+
};
|
|
10530
10598
|
export const linearGetIssuesDefinition = {
|
|
10531
10599
|
description: "Get Linear issues with optional query filter",
|
|
10532
10600
|
scopes: [],
|
|
@@ -765,14 +765,17 @@ export declare const slackSendMessageOutputSchema: z.ZodObject<{
|
|
|
765
765
|
export type slackSendMessageOutputType = z.infer<typeof slackSendMessageOutputSchema>;
|
|
766
766
|
export type slackSendMessageFunction = ActionFunction<slackSendMessageParamsType, AuthParamsType, slackSendMessageOutputType>;
|
|
767
767
|
export declare const slackGetChannelMessagesParamsSchema: z.ZodObject<{
|
|
768
|
-
|
|
768
|
+
channelId: z.ZodOptional<z.ZodString>;
|
|
769
|
+
channelName: z.ZodOptional<z.ZodString>;
|
|
769
770
|
oldest: z.ZodString;
|
|
770
771
|
}, "strip", z.ZodTypeAny, {
|
|
771
|
-
channelName: string;
|
|
772
772
|
oldest: string;
|
|
773
|
+
channelName?: string | undefined;
|
|
774
|
+
channelId?: string | undefined;
|
|
773
775
|
}, {
|
|
774
|
-
channelName: string;
|
|
775
776
|
oldest: string;
|
|
777
|
+
channelName?: string | undefined;
|
|
778
|
+
channelId?: string | undefined;
|
|
776
779
|
}>;
|
|
777
780
|
export type slackGetChannelMessagesParamsType = z.infer<typeof slackGetChannelMessagesParamsSchema>;
|
|
778
781
|
export declare const slackGetChannelMessagesOutputSchema: z.ZodObject<{
|
|
@@ -7400,6 +7403,62 @@ export declare const gitlabGetFileContentOutputSchema: z.ZodObject<{
|
|
|
7400
7403
|
}>;
|
|
7401
7404
|
export type gitlabGetFileContentOutputType = z.infer<typeof gitlabGetFileContentOutputSchema>;
|
|
7402
7405
|
export type gitlabGetFileContentFunction = ActionFunction<gitlabGetFileContentParamsType, AuthParamsType, gitlabGetFileContentOutputType>;
|
|
7406
|
+
export declare const gitlabListDirectoryParamsSchema: z.ZodObject<{
|
|
7407
|
+
group: z.ZodString;
|
|
7408
|
+
project: z.ZodString;
|
|
7409
|
+
path: z.ZodString;
|
|
7410
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
7411
|
+
}, "strip", z.ZodTypeAny, {
|
|
7412
|
+
path: string;
|
|
7413
|
+
group: string;
|
|
7414
|
+
project: string;
|
|
7415
|
+
ref?: string | undefined;
|
|
7416
|
+
}, {
|
|
7417
|
+
path: string;
|
|
7418
|
+
group: string;
|
|
7419
|
+
project: string;
|
|
7420
|
+
ref?: string | undefined;
|
|
7421
|
+
}>;
|
|
7422
|
+
export type gitlabListDirectoryParamsType = z.infer<typeof gitlabListDirectoryParamsSchema>;
|
|
7423
|
+
export declare const gitlabListDirectoryOutputSchema: z.ZodObject<{
|
|
7424
|
+
content: z.ZodArray<z.ZodObject<{
|
|
7425
|
+
name: z.ZodString;
|
|
7426
|
+
path: z.ZodString;
|
|
7427
|
+
type: z.ZodString;
|
|
7428
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
7429
|
+
htmlUrl: z.ZodString;
|
|
7430
|
+
}, "strip", z.ZodTypeAny, {
|
|
7431
|
+
type: string;
|
|
7432
|
+
path: string;
|
|
7433
|
+
name: string;
|
|
7434
|
+
htmlUrl: string;
|
|
7435
|
+
size?: number | undefined;
|
|
7436
|
+
}, {
|
|
7437
|
+
type: string;
|
|
7438
|
+
path: string;
|
|
7439
|
+
name: string;
|
|
7440
|
+
htmlUrl: string;
|
|
7441
|
+
size?: number | undefined;
|
|
7442
|
+
}>, "many">;
|
|
7443
|
+
}, "strip", z.ZodTypeAny, {
|
|
7444
|
+
content: {
|
|
7445
|
+
type: string;
|
|
7446
|
+
path: string;
|
|
7447
|
+
name: string;
|
|
7448
|
+
htmlUrl: string;
|
|
7449
|
+
size?: number | undefined;
|
|
7450
|
+
}[];
|
|
7451
|
+
}, {
|
|
7452
|
+
content: {
|
|
7453
|
+
type: string;
|
|
7454
|
+
path: string;
|
|
7455
|
+
name: string;
|
|
7456
|
+
htmlUrl: string;
|
|
7457
|
+
size?: number | undefined;
|
|
7458
|
+
}[];
|
|
7459
|
+
}>;
|
|
7460
|
+
export type gitlabListDirectoryOutputType = z.infer<typeof gitlabListDirectoryOutputSchema>;
|
|
7461
|
+
export type gitlabListDirectoryFunction = ActionFunction<gitlabListDirectoryParamsType, AuthParamsType, gitlabListDirectoryOutputType>;
|
|
7403
7462
|
export declare const linearGetIssuesParamsSchema: z.ZodObject<{
|
|
7404
7463
|
query: z.ZodOptional<z.ZodString>;
|
|
7405
7464
|
maxResults: z.ZodOptional<z.ZodNumber>;
|
|
@@ -231,7 +231,14 @@ export const slackSendMessageOutputSchema = z.object({
|
|
|
231
231
|
error: z.string().describe("The error that occurred if the email was not sent successfully").optional(),
|
|
232
232
|
});
|
|
233
233
|
export const slackGetChannelMessagesParamsSchema = z.object({
|
|
234
|
-
|
|
234
|
+
channelId: z
|
|
235
|
+
.string()
|
|
236
|
+
.describe("The ID of the channel to get messages from. Either the channelId or channelName must be provided.")
|
|
237
|
+
.optional(),
|
|
238
|
+
channelName: z
|
|
239
|
+
.string()
|
|
240
|
+
.describe("Name of the channel to summarize. Either the channelId or channelName must be provided.")
|
|
241
|
+
.optional(),
|
|
235
242
|
oldest: z.string().describe("Only messages after this Unix timestamp will be included in results"),
|
|
236
243
|
});
|
|
237
244
|
export const slackGetChannelMessagesOutputSchema = z.object({
|
|
@@ -3640,6 +3647,23 @@ export const gitlabGetFileContentOutputSchema = z.object({
|
|
|
3640
3647
|
name: z.string().describe("The name of the file").optional(),
|
|
3641
3648
|
htmlUrl: z.string().describe("The URL of the file in the GitLab UI").optional(),
|
|
3642
3649
|
});
|
|
3650
|
+
export const gitlabListDirectoryParamsSchema = z.object({
|
|
3651
|
+
group: z.string().describe('The group or namespace that owns the project (e.g., "my-group" or "org/subgroup")'),
|
|
3652
|
+
project: z.string().describe('The name of the GitLab project (e.g., "my-repo")'),
|
|
3653
|
+
path: z.string().describe("The path to list directory contents from (empty string for root)"),
|
|
3654
|
+
ref: z.string().describe('The branch, tag, or commit (defaults to "main")').optional(),
|
|
3655
|
+
});
|
|
3656
|
+
export const gitlabListDirectoryOutputSchema = z.object({
|
|
3657
|
+
content: z
|
|
3658
|
+
.array(z.object({
|
|
3659
|
+
name: z.string().describe("The name of the file or directory"),
|
|
3660
|
+
path: z.string().describe("The path of the file or directory"),
|
|
3661
|
+
type: z.string().describe('The type of the entry (either "blob" for file or "tree" for directory)'),
|
|
3662
|
+
size: z.number().describe("The size of the file in bytes (only for blobs; omitted or 0 for trees)").optional(),
|
|
3663
|
+
htmlUrl: z.string().describe("The URL of the file or folder in the GitLab UI"),
|
|
3664
|
+
}))
|
|
3665
|
+
.describe("Array of directory contents"),
|
|
3666
|
+
});
|
|
3643
3667
|
export const linearGetIssuesParamsSchema = z.object({
|
|
3644
3668
|
query: z.string().describe("Optional query string to filter issues").optional(),
|
|
3645
3669
|
maxResults: z.number().describe("Optional limit to number of results").optional(),
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mathAddDefinition = exports.slackSendMessageDefinition = void 0;
|
|
4
|
+
exports.slackSendMessageDefinition = {
|
|
5
|
+
name: "send_message",
|
|
6
|
+
description: "Sends a message to a Slack channel",
|
|
7
|
+
parameters: {
|
|
8
|
+
"channel": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The Slack channel to send the message to (e.g., \\#general, \\#alerts)",
|
|
11
|
+
"required": true
|
|
12
|
+
},
|
|
13
|
+
"message": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The message content to send to Slack. Can include markdown formatting.",
|
|
16
|
+
"required": true
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.mathAddDefinition = {
|
|
21
|
+
name: "add",
|
|
22
|
+
description: "Adds two numbers together",
|
|
23
|
+
parameters: {
|
|
24
|
+
"a": {
|
|
25
|
+
"type": "number",
|
|
26
|
+
"description": "The first number to add",
|
|
27
|
+
"required": true
|
|
28
|
+
},
|
|
29
|
+
"b": {
|
|
30
|
+
"type": "number",
|
|
31
|
+
"description": "The second number to add",
|
|
32
|
+
"required": true
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ActionFunction } from "./autogen/types";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
interface ActionFunctionComponents {
|
|
4
|
+
fn: ActionFunction<any, any, any>;
|
|
5
|
+
paramsSchema: z.ZodSchema;
|
|
6
|
+
outputSchema: z.ZodSchema;
|
|
7
|
+
}
|
|
8
|
+
export declare const FunctionMapper: Record<string, Record<string, ActionFunctionComponents>>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FunctionMapper = void 0;
|
|
7
|
+
const add_1 = __importDefault(require("./providers/math/add"));
|
|
8
|
+
const list_conversations_1 = __importDefault(require("./providers/slack/list_conversations"));
|
|
9
|
+
const updatePage_1 = __importDefault(require("./providers/confluence/updatePage"));
|
|
10
|
+
const types_1 = require("./autogen/types");
|
|
11
|
+
exports.FunctionMapper = {
|
|
12
|
+
math: {
|
|
13
|
+
add: {
|
|
14
|
+
fn: add_1.default,
|
|
15
|
+
paramsSchema: types_1.mathAddParamsSchema,
|
|
16
|
+
outputSchema: types_1.mathAddOutputSchema,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
slack: {
|
|
20
|
+
listConversations: {
|
|
21
|
+
fn: list_conversations_1.default,
|
|
22
|
+
paramsSchema: types_1.slackListConversationsParamsSchema,
|
|
23
|
+
outputSchema: types_1.slackListConversationsOutputSchema,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
confluence: {
|
|
27
|
+
updatePage: {
|
|
28
|
+
fn: updatePage_1.default,
|
|
29
|
+
paramsSchema: types_1.confluenceUpdatePageParamsSchema,
|
|
30
|
+
outputSchema: types_1.confluenceUpdatePageOutputSchema,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -8,30 +8,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
|
|
12
|
+
const axiosClient_1 = require("../../util/axiosClient");
|
|
13
|
+
function getConfluenceRequestConfig(baseUrl, username, apiToken) {
|
|
14
|
+
return {
|
|
18
15
|
baseURL: baseUrl,
|
|
19
16
|
headers: {
|
|
20
17
|
Accept: "application/json",
|
|
21
|
-
// Tokens are associated with a specific user.
|
|
22
18
|
Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
|
|
23
19
|
},
|
|
24
|
-
}
|
|
25
|
-
return api;
|
|
20
|
+
};
|
|
26
21
|
}
|
|
27
22
|
const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
28
23
|
const { pageId, username, content, title } = params;
|
|
29
24
|
const { baseUrl, authToken } = authParams;
|
|
30
|
-
const
|
|
25
|
+
const config = getConfluenceRequestConfig(baseUrl, username, authToken);
|
|
31
26
|
// Get current version number
|
|
32
|
-
const response = yield
|
|
27
|
+
const response = yield axiosClient_1.axiosClient.get(`/api/v2/pages/${pageId}`, config);
|
|
33
28
|
const currVersion = response.data.version.number;
|
|
34
|
-
|
|
29
|
+
const payload = {
|
|
35
30
|
id: pageId,
|
|
36
31
|
status: "current",
|
|
37
32
|
title,
|
|
@@ -42,6 +37,7 @@ const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* (
|
|
|
42
37
|
version: {
|
|
43
38
|
number: currVersion + 1,
|
|
44
39
|
},
|
|
45
|
-
}
|
|
40
|
+
};
|
|
41
|
+
yield axiosClient_1.axiosClient.put(`/api/v2/pages/${pageId}`, payload, config);
|
|
46
42
|
});
|
|
47
43
|
exports.default = confluenceUpdatePage;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
|
11
|
+
const GITLAB_API_URL = "https://gitlab.com";
|
|
12
|
+
function gitlabFetch(endpoint, authToken) {
|
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
const res = yield fetch(endpoint, {
|
|
15
|
+
headers: {
|
|
16
|
+
Authorization: `Bearer ${authToken}`,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
if (!res.ok) {
|
|
20
|
+
const text = yield res.text();
|
|
21
|
+
throw new Error(`GitLab API error: ${res.status} ${text}`);
|
|
22
|
+
}
|
|
23
|
+
return res.json();
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* List directory contents from a GitLab project
|
|
28
|
+
*/
|
|
29
|
+
const listDirectory = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
30
|
+
const { authToken, baseUrl } = authParams;
|
|
31
|
+
const gitlabBaseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : GITLAB_API_URL;
|
|
32
|
+
if (!authToken)
|
|
33
|
+
throw new Error(MISSING_AUTH_TOKEN);
|
|
34
|
+
const { group, project, path, ref = "main" } = params;
|
|
35
|
+
const fullPath = `${group}/${project}`;
|
|
36
|
+
const encodedProjectPath = encodeURIComponent(fullPath);
|
|
37
|
+
const url = `${gitlabBaseUrl}/api/v4/projects/${encodedProjectPath}/repository/tree` +
|
|
38
|
+
`?path=${encodeURIComponent(path)}` +
|
|
39
|
+
`&ref=${encodeURIComponent(ref)}`;
|
|
40
|
+
const treeItems = yield gitlabFetch(url, authToken);
|
|
41
|
+
const content = treeItems.map(item => {
|
|
42
|
+
var _a;
|
|
43
|
+
const isFile = item.type === "blob";
|
|
44
|
+
const htmlUrl = `${gitlabBaseUrl}/${fullPath}/-/blob/${ref}/${item.path}`;
|
|
45
|
+
return {
|
|
46
|
+
name: item.name,
|
|
47
|
+
path: item.path,
|
|
48
|
+
type: item.type, // "blob" or "tree"
|
|
49
|
+
size: isFile ? ((_a = item.size) !== null && _a !== void 0 ? _a : 0) : 0, // Size may not be returned; fallback to 0
|
|
50
|
+
htmlUrl,
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
return { content };
|
|
54
|
+
});
|
|
55
|
+
export default listDirectory;
|