@credal/actions 0.2.34 → 0.2.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/actionMapper.js +7 -1
- package/dist/actions/autogen/templates.d.ts +1 -0
- package/dist/actions/autogen/templates.js +50 -0
- package/dist/actions/autogen/types.d.ts +35 -0
- package/dist/actions/autogen/types.js +12 -0
- package/dist/actions/groups.js +2 -1
- package/dist/actions/providers/confluence/updatePage.d.ts +3 -0
- package/dist/actions/providers/confluence/updatePage.js +46 -0
- package/dist/actions/providers/generic/fillTemplateAction.d.ts +7 -0
- package/dist/actions/providers/generic/fillTemplateAction.js +18 -0
- package/dist/actions/providers/generic/genericApiCall.d.ts +3 -0
- package/dist/actions/providers/generic/genericApiCall.js +38 -0
- package/dist/actions/providers/google-oauth/getDriveContentById.d.ts +3 -0
- package/dist/actions/providers/google-oauth/getDriveContentById.js +161 -0
- package/dist/actions/providers/google-oauth/getDriveFileContentById.d.ts +3 -0
- package/dist/actions/providers/google-oauth/getDriveFileContentById.js +152 -0
- package/dist/actions/providers/google-oauth/searchAndGetDriveContentByKeywords.d.ts +3 -0
- package/dist/actions/providers/google-oauth/searchAndGetDriveContentByKeywords.js +47 -0
- package/dist/actions/providers/google-oauth/searchDriveByKeywords.js +2 -2
- package/dist/actions/providers/google-oauth/utils/extractContentFromDriveFileId.d.ts +16 -0
- package/dist/actions/providers/google-oauth/utils/extractContentFromDriveFileId.js +174 -0
- package/dist/actions/providers/googlemaps/nearbysearch.d.ts +3 -0
- package/dist/actions/providers/googlemaps/nearbysearch.js +96 -0
- package/dist/actions/providers/snowflake/runSnowflakeQueryWriteResultsToS3.d.ts +3 -0
- package/dist/actions/providers/snowflake/runSnowflakeQueryWriteResultsToS3.js +154 -0
- package/dist/actions/providers/x/scrapeTweetDataWithNitter.d.ts +3 -0
- package/dist/actions/providers/x/scrapeTweetDataWithNitter.js +45 -0
- package/package.json +2 -1
- package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.d.ts +0 -3
- package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.js +0 -43
@@ -1,4 +1,4 @@
|
|
1
|
-
import { genericFillTemplateParamsSchema, genericFillTemplateOutputSchema, confluenceOverwritePageParamsSchema, confluenceOverwritePageOutputSchema, googlemapsValidateAddressOutputSchema, googlemapsValidateAddressParamsSchema, googleOauthCreateNewGoogleDocParamsSchema, googleOauthCreateNewGoogleDocOutputSchema, mathAddOutputSchema, mathAddParamsSchema, mongoInsertMongoDocOutputSchema, mongoInsertMongoDocParamsSchema, slackSendMessageOutputSchema, slackSendMessageParamsSchema, slackGetChannelMessagesOutputSchema, slackGetChannelMessagesParamsSchema, slackArchiveChannelParamsSchema, slackArchiveChannelOutputSchema, slackCreateChannelParamsSchema, slackCreateChannelOutputSchema, snowflakeGetRowByFieldValueOutputSchema, snowflakeGetRowByFieldValueParamsSchema, zendeskCreateZendeskTicketOutputSchema, zendeskCreateZendeskTicketParamsSchema, zendeskGetTicketDetailsOutputSchema, zendeskGetTicketDetailsParamsSchema, zendeskUpdateTicketStatusOutputSchema, zendeskUpdateTicketStatusParamsSchema, zendeskAddCommentToTicketOutputSchema, zendeskAddCommentToTicketParamsSchema, zendeskAssignTicketOutputSchema, zendeskAssignTicketParamsSchema, zendeskListZendeskTicketsOutputSchema, zendeskListZendeskTicketsParamsSchema, jiraAssignJiraTicketParamsSchema, jiraAssignJiraTicketOutputSchema, jiraCommentJiraTicketParamsSchema, jiraCommentJiraTicketOutputSchema, jiraCreateJiraTicketParamsSchema, jiraCreateJiraTicketOutputSchema, jiraGetJiraTicketDetailsParamsSchema, jiraGetJiraTicketDetailsOutputSchema, jiraGetJiraTicketHistoryParamsSchema, jiraGetJiraTicketHistoryOutputSchema, jiraUpdateJiraTicketDetailsParamsSchema, jiraUpdateJiraTicketDetailsOutputSchema, jiraUpdateJiraTicketStatusParamsSchema, jiraUpdateJiraTicketStatusOutputSchema, jiraGetServiceDesksParamsSchema, jiraGetServiceDesksOutputSchema, jiraCreateServiceDeskRequestParamsSchema, jiraCreateServiceDeskRequestOutputSchema, openstreetmapGetLatitudeLongitudeFromLocationParamsSchema, openstreetmapGetLatitudeLongitudeFromLocationOutputSchema, nwsGetForecastForLocationParamsSchema, nwsGetForecastForLocationOutputSchema, googlemapsNearbysearchRestaurantsOutputSchema, googlemapsNearbysearchRestaurantsParamsSchema, firecrawlScrapeUrlOutputSchema, firecrawlScrapeUrlParamsSchema, resendSendEmailOutputSchema, firecrawlScrapeTweetDataWithNitterParamsSchema, firecrawlScrapeTweetDataWithNitterOutputSchema, resendSendEmailParamsSchema, linkedinCreateShareLinkedinPostUrlParamsSchema, linkedinCreateShareLinkedinPostUrlOutputSchema, xCreateShareXPostUrlParamsSchema, xCreateShareXPostUrlOutputSchema, finnhubSymbolLookupParamsSchema, finnhubSymbolLookupOutputSchema, finnhubGetBasicFinancialsParamsSchema, finnhubGetBasicFinancialsOutputSchema, confluenceFetchPageContentParamsSchema, confluenceFetchPageContentOutputSchema, snowflakeRunSnowflakeQueryParamsSchema, snowflakeRunSnowflakeQueryOutputSchema, lookerEnableUserByEmailParamsSchema, lookerEnableUserByEmailOutputSchema, googleOauthUpdateDocParamsSchema, googleOauthUpdateDocOutputSchema, googleOauthCreateSpreadsheetParamsSchema, googleOauthCreateSpreadsheetOutputSchema, googleOauthUpdateSpreadsheetParamsSchema, googleOauthUpdateSpreadsheetOutputSchema, googleOauthScheduleCalendarMeetingParamsSchema, googleOauthScheduleCalendarMeetingOutputSchema, googleOauthListCalendarsParamsSchema, googleOauthListCalendarsOutputSchema, googleOauthListCalendarEventsParamsSchema, googleOauthListCalendarEventsOutputSchema, googleOauthUpdateCalendarEventParamsSchema, googleOauthUpdateCalendarEventOutputSchema, googleOauthDeleteCalendarEventParamsSchema, googleOauthDeleteCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, gongGetGongTranscriptsParamsSchema, gongGetGongTranscriptsOutputSchema, ashbyCreateNoteParamsSchema, ashbyCreateNoteOutputSchema, ashbyGetCandidateInfoParamsSchema, ashbyGetCandidateInfoOutputSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, ashbyListCandidatesParamsSchema, ashbyListCandidatesOutputSchema, ashbyListCandidateNotesParamsSchema, ashbyListCandidateNotesOutputSchema, ashbySearchCandidatesParamsSchema, ashbySearchCandidatesOutputSchema, ashbyCreateCandidateParamsSchema, ashbyCreateCandidateOutputSchema, ashbyUpdateCandidateParamsSchema, ashbyUpdateCandidateOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, salesforceFetchSalesforceSchemaByObjectParamsSchema, salesforceFetchSalesforceSchemaByObjectOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, ashbyAddCandidateToProjectParamsSchema, ashbyAddCandidateToProjectOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, kandjiGetFVRecoveryKeyForDeviceParamsSchema, kandjiGetFVRecoveryKeyForDeviceOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, jamfGetJamfComputerInventoryParamsSchema, jamfGetJamfComputerInventoryOutputSchema, jamfGetJamfFileVaultRecoveryKeyParamsSchema, jamfGetJamfFileVaultRecoveryKeyOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, oktaListOktaUsersParamsSchema, oktaListOktaUsersOutputSchema, oktaGetOktaUserParamsSchema, oktaGetOktaUserOutputSchema, oktaListOktaUserGroupsParamsSchema, oktaListOktaUserGroupsOutputSchema, oktaListOktaGroupsParamsSchema, oktaListOktaGroupsOutputSchema, oktaGetOktaGroupParamsSchema, oktaGetOktaGroupOutputSchema, oktaListOktaGroupMembersParamsSchema, oktaListOktaGroupMembersOutputSchema, oktaRemoveUserFromGroupParamsSchema, oktaRemoveUserFromGroupOutputSchema, oktaAddUserToGroupParamsSchema, oktaAddUserToGroupOutputSchema, oktaResetPasswordParamsSchema, oktaResetPasswordOutputSchema, oktaResetMFAParamsSchema, oktaResetMFAOutputSchema, oktaListMFAParamsSchema, oktaListMFAOutputSchema, jamfGetJamfUserComputerIdParamsSchema, jamfGetJamfUserComputerIdOutputSchema, jamfLockJamfComputerByIdParamsSchema, jamfLockJamfComputerByIdOutputSchema, oktaTriggerOktaWorkflowParamsSchema, oktaTriggerOktaWorkflowOutputSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchRepositoryOutputSchema, githubSearchRepositoryParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, } from "./autogen/types.js";
|
1
|
+
import { genericFillTemplateParamsSchema, genericFillTemplateOutputSchema, confluenceOverwritePageParamsSchema, confluenceOverwritePageOutputSchema, googlemapsValidateAddressOutputSchema, googlemapsValidateAddressParamsSchema, googleOauthCreateNewGoogleDocParamsSchema, googleOauthCreateNewGoogleDocOutputSchema, mathAddOutputSchema, mathAddParamsSchema, mongoInsertMongoDocOutputSchema, mongoInsertMongoDocParamsSchema, slackSendMessageOutputSchema, slackSendMessageParamsSchema, slackGetChannelMessagesOutputSchema, slackGetChannelMessagesParamsSchema, slackArchiveChannelParamsSchema, slackArchiveChannelOutputSchema, slackCreateChannelParamsSchema, slackCreateChannelOutputSchema, snowflakeGetRowByFieldValueOutputSchema, snowflakeGetRowByFieldValueParamsSchema, zendeskCreateZendeskTicketOutputSchema, zendeskCreateZendeskTicketParamsSchema, zendeskGetTicketDetailsOutputSchema, zendeskGetTicketDetailsParamsSchema, zendeskUpdateTicketStatusOutputSchema, zendeskUpdateTicketStatusParamsSchema, zendeskAddCommentToTicketOutputSchema, zendeskAddCommentToTicketParamsSchema, zendeskAssignTicketOutputSchema, zendeskAssignTicketParamsSchema, zendeskListZendeskTicketsOutputSchema, zendeskListZendeskTicketsParamsSchema, jiraAssignJiraTicketParamsSchema, jiraAssignJiraTicketOutputSchema, jiraCommentJiraTicketParamsSchema, jiraCommentJiraTicketOutputSchema, jiraCreateJiraTicketParamsSchema, jiraCreateJiraTicketOutputSchema, jiraGetJiraTicketDetailsParamsSchema, jiraGetJiraTicketDetailsOutputSchema, jiraGetJiraTicketHistoryParamsSchema, jiraGetJiraTicketHistoryOutputSchema, jiraUpdateJiraTicketDetailsParamsSchema, jiraUpdateJiraTicketDetailsOutputSchema, jiraUpdateJiraTicketStatusParamsSchema, jiraUpdateJiraTicketStatusOutputSchema, jiraGetServiceDesksParamsSchema, jiraGetServiceDesksOutputSchema, jiraCreateServiceDeskRequestParamsSchema, jiraCreateServiceDeskRequestOutputSchema, openstreetmapGetLatitudeLongitudeFromLocationParamsSchema, openstreetmapGetLatitudeLongitudeFromLocationOutputSchema, nwsGetForecastForLocationParamsSchema, nwsGetForecastForLocationOutputSchema, googlemapsNearbysearchRestaurantsOutputSchema, googlemapsNearbysearchRestaurantsParamsSchema, firecrawlScrapeUrlOutputSchema, firecrawlScrapeUrlParamsSchema, resendSendEmailOutputSchema, firecrawlScrapeTweetDataWithNitterParamsSchema, firecrawlScrapeTweetDataWithNitterOutputSchema, resendSendEmailParamsSchema, linkedinCreateShareLinkedinPostUrlParamsSchema, linkedinCreateShareLinkedinPostUrlOutputSchema, xCreateShareXPostUrlParamsSchema, xCreateShareXPostUrlOutputSchema, finnhubSymbolLookupParamsSchema, finnhubSymbolLookupOutputSchema, finnhubGetBasicFinancialsParamsSchema, finnhubGetBasicFinancialsOutputSchema, confluenceFetchPageContentParamsSchema, confluenceFetchPageContentOutputSchema, snowflakeRunSnowflakeQueryParamsSchema, snowflakeRunSnowflakeQueryOutputSchema, lookerEnableUserByEmailParamsSchema, lookerEnableUserByEmailOutputSchema, googleOauthUpdateDocParamsSchema, googleOauthUpdateDocOutputSchema, googleOauthCreateSpreadsheetParamsSchema, googleOauthCreateSpreadsheetOutputSchema, googleOauthUpdateSpreadsheetParamsSchema, googleOauthUpdateSpreadsheetOutputSchema, googleOauthScheduleCalendarMeetingParamsSchema, googleOauthScheduleCalendarMeetingOutputSchema, googleOauthListCalendarsParamsSchema, googleOauthListCalendarsOutputSchema, googleOauthListCalendarEventsParamsSchema, googleOauthListCalendarEventsOutputSchema, googleOauthUpdateCalendarEventParamsSchema, googleOauthUpdateCalendarEventOutputSchema, googleOauthDeleteCalendarEventParamsSchema, googleOauthDeleteCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, gongGetGongTranscriptsParamsSchema, gongGetGongTranscriptsOutputSchema, ashbyCreateNoteParamsSchema, ashbyCreateNoteOutputSchema, ashbyGetCandidateInfoParamsSchema, ashbyGetCandidateInfoOutputSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, ashbyListCandidatesParamsSchema, ashbyListCandidatesOutputSchema, ashbyListCandidateNotesParamsSchema, ashbyListCandidateNotesOutputSchema, ashbySearchCandidatesParamsSchema, ashbySearchCandidatesOutputSchema, ashbyCreateCandidateParamsSchema, ashbyCreateCandidateOutputSchema, ashbyUpdateCandidateParamsSchema, ashbyUpdateCandidateOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, salesforceFetchSalesforceSchemaByObjectParamsSchema, salesforceFetchSalesforceSchemaByObjectOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, ashbyAddCandidateToProjectParamsSchema, ashbyAddCandidateToProjectOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, kandjiGetFVRecoveryKeyForDeviceParamsSchema, kandjiGetFVRecoveryKeyForDeviceOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, jamfGetJamfComputerInventoryParamsSchema, jamfGetJamfComputerInventoryOutputSchema, jamfGetJamfFileVaultRecoveryKeyParamsSchema, jamfGetJamfFileVaultRecoveryKeyOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, oktaListOktaUsersParamsSchema, oktaListOktaUsersOutputSchema, oktaGetOktaUserParamsSchema, oktaGetOktaUserOutputSchema, oktaListOktaUserGroupsParamsSchema, oktaListOktaUserGroupsOutputSchema, oktaListOktaGroupsParamsSchema, oktaListOktaGroupsOutputSchema, oktaGetOktaGroupParamsSchema, oktaGetOktaGroupOutputSchema, oktaListOktaGroupMembersParamsSchema, oktaListOktaGroupMembersOutputSchema, oktaRemoveUserFromGroupParamsSchema, oktaRemoveUserFromGroupOutputSchema, oktaAddUserToGroupParamsSchema, oktaAddUserToGroupOutputSchema, oktaResetPasswordParamsSchema, oktaResetPasswordOutputSchema, oktaResetMFAParamsSchema, oktaResetMFAOutputSchema, oktaListMFAParamsSchema, oktaListMFAOutputSchema, jamfGetJamfUserComputerIdParamsSchema, jamfGetJamfUserComputerIdOutputSchema, jamfLockJamfComputerByIdParamsSchema, jamfLockJamfComputerByIdOutputSchema, oktaTriggerOktaWorkflowParamsSchema, oktaTriggerOktaWorkflowOutputSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchRepositoryOutputSchema, githubSearchRepositoryParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, } 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";
|
@@ -113,6 +113,7 @@ import searchRepository from "./providers/github/searchRepository.js";
|
|
113
113
|
import getServiceDesks from "./providers/jira/getServiceDesks.js";
|
114
114
|
import createServiceDeskRequest from "./providers/jira/createServiceDeskRequest.js";
|
115
115
|
import searchSalesforceRecords from "./providers/salesforce/searchSalesforceRecords.js";
|
116
|
+
import getDriveFileContentById from "./providers/google-oauth/getDriveFileContentById.js";
|
116
117
|
const jiraActions = {
|
117
118
|
getJiraIssuesByQuery: {
|
118
119
|
fn: getJiraIssuesByQuery,
|
@@ -433,6 +434,11 @@ export const ActionMapper = {
|
|
433
434
|
paramsSchema: googleOauthSearchDriveByKeywordsParamsSchema,
|
434
435
|
outputSchema: googleOauthSearchDriveByKeywordsOutputSchema,
|
435
436
|
},
|
437
|
+
getDriveFileContentById: {
|
438
|
+
fn: getDriveFileContentById,
|
439
|
+
paramsSchema: googleOauthGetDriveFileContentByIdParamsSchema,
|
440
|
+
outputSchema: googleOauthGetDriveFileContentByIdOutputSchema,
|
441
|
+
},
|
436
442
|
listCalendars: {
|
437
443
|
fn: listCalendars,
|
438
444
|
paramsSchema: googleOauthListCalendarsParamsSchema,
|
@@ -67,6 +67,7 @@ export declare const googleOauthUpdateSpreadsheetDefinition: ActionTemplate;
|
|
67
67
|
export declare const googleOauthCreatePresentationDefinition: ActionTemplate;
|
68
68
|
export declare const googleOauthUpdatePresentationDefinition: ActionTemplate;
|
69
69
|
export declare const googleOauthSearchDriveByKeywordsDefinition: ActionTemplate;
|
70
|
+
export declare const googleOauthGetDriveFileContentByIdDefinition: ActionTemplate;
|
70
71
|
export declare const googleOauthListGroupsDefinition: ActionTemplate;
|
71
72
|
export declare const googleOauthGetGroupDefinition: ActionTemplate;
|
72
73
|
export declare const googleOauthListGroupMembersDefinition: ActionTemplate;
|
@@ -6175,6 +6175,10 @@ export const googleOauthSearchDriveByKeywordsDefinition = {
|
|
6175
6175
|
type: "string",
|
6176
6176
|
},
|
6177
6177
|
},
|
6178
|
+
limit: {
|
6179
|
+
type: "integer",
|
6180
|
+
description: "The maximum number of files to return",
|
6181
|
+
},
|
6178
6182
|
},
|
6179
6183
|
},
|
6180
6184
|
output: {
|
@@ -6220,6 +6224,52 @@ export const googleOauthSearchDriveByKeywordsDefinition = {
|
|
6220
6224
|
name: "searchDriveByKeywords",
|
6221
6225
|
provider: "googleOauth",
|
6222
6226
|
};
|
6227
|
+
export const googleOauthGetDriveFileContentByIdDefinition = {
|
6228
|
+
description: "Get text content of a Google Drive file by its ID.",
|
6229
|
+
scopes: ["drive.readonly"],
|
6230
|
+
parameters: {
|
6231
|
+
type: "object",
|
6232
|
+
required: ["fileId", "limit"],
|
6233
|
+
properties: {
|
6234
|
+
fileId: {
|
6235
|
+
type: "string",
|
6236
|
+
description: "The ID of the file to get content from",
|
6237
|
+
},
|
6238
|
+
limit: {
|
6239
|
+
type: "integer",
|
6240
|
+
description: "The character limit for the file content",
|
6241
|
+
},
|
6242
|
+
},
|
6243
|
+
},
|
6244
|
+
output: {
|
6245
|
+
type: "object",
|
6246
|
+
required: ["success"],
|
6247
|
+
properties: {
|
6248
|
+
success: {
|
6249
|
+
type: "boolean",
|
6250
|
+
description: "Whether the file content was retrieved successfully",
|
6251
|
+
},
|
6252
|
+
content: {
|
6253
|
+
type: "string",
|
6254
|
+
description: "The content of the file",
|
6255
|
+
},
|
6256
|
+
fileName: {
|
6257
|
+
type: "string",
|
6258
|
+
description: "The name of the file",
|
6259
|
+
},
|
6260
|
+
fileLength: {
|
6261
|
+
type: "integer",
|
6262
|
+
description: "The length of the file content prior to truncating",
|
6263
|
+
},
|
6264
|
+
error: {
|
6265
|
+
type: "string",
|
6266
|
+
description: "Error message if file content retrieval failed",
|
6267
|
+
},
|
6268
|
+
},
|
6269
|
+
},
|
6270
|
+
name: "getDriveFileContentById",
|
6271
|
+
provider: "googleOauth",
|
6272
|
+
};
|
6223
6273
|
export const googleOauthListGroupsDefinition = {
|
6224
6274
|
description: "List all Google Groups for the customer.",
|
6225
6275
|
scopes: ["https://www.googleapis.com/auth/admin.directory.group.readonly"],
|
@@ -3270,10 +3270,13 @@ export type googleOauthUpdatePresentationOutputType = z.infer<typeof googleOauth
|
|
3270
3270
|
export type googleOauthUpdatePresentationFunction = ActionFunction<googleOauthUpdatePresentationParamsType, AuthParamsType, googleOauthUpdatePresentationOutputType>;
|
3271
3271
|
export declare const googleOauthSearchDriveByKeywordsParamsSchema: z.ZodObject<{
|
3272
3272
|
keywords: z.ZodArray<z.ZodString, "many">;
|
3273
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
3273
3274
|
}, "strip", z.ZodTypeAny, {
|
3274
3275
|
keywords: string[];
|
3276
|
+
limit?: number | undefined;
|
3275
3277
|
}, {
|
3276
3278
|
keywords: string[];
|
3279
|
+
limit?: number | undefined;
|
3277
3280
|
}>;
|
3278
3281
|
export type googleOauthSearchDriveByKeywordsParamsType = z.infer<typeof googleOauthSearchDriveByKeywordsParamsSchema>;
|
3279
3282
|
export declare const googleOauthSearchDriveByKeywordsOutputSchema: z.ZodObject<{
|
@@ -3316,6 +3319,38 @@ export declare const googleOauthSearchDriveByKeywordsOutputSchema: z.ZodObject<{
|
|
3316
3319
|
}>;
|
3317
3320
|
export type googleOauthSearchDriveByKeywordsOutputType = z.infer<typeof googleOauthSearchDriveByKeywordsOutputSchema>;
|
3318
3321
|
export type googleOauthSearchDriveByKeywordsFunction = ActionFunction<googleOauthSearchDriveByKeywordsParamsType, AuthParamsType, googleOauthSearchDriveByKeywordsOutputType>;
|
3322
|
+
export declare const googleOauthGetDriveFileContentByIdParamsSchema: z.ZodObject<{
|
3323
|
+
fileId: z.ZodString;
|
3324
|
+
limit: z.ZodNumber;
|
3325
|
+
}, "strip", z.ZodTypeAny, {
|
3326
|
+
limit: number;
|
3327
|
+
fileId: string;
|
3328
|
+
}, {
|
3329
|
+
limit: number;
|
3330
|
+
fileId: string;
|
3331
|
+
}>;
|
3332
|
+
export type googleOauthGetDriveFileContentByIdParamsType = z.infer<typeof googleOauthGetDriveFileContentByIdParamsSchema>;
|
3333
|
+
export declare const googleOauthGetDriveFileContentByIdOutputSchema: z.ZodObject<{
|
3334
|
+
success: z.ZodBoolean;
|
3335
|
+
content: z.ZodOptional<z.ZodString>;
|
3336
|
+
fileName: z.ZodOptional<z.ZodString>;
|
3337
|
+
fileLength: z.ZodOptional<z.ZodNumber>;
|
3338
|
+
error: z.ZodOptional<z.ZodString>;
|
3339
|
+
}, "strip", z.ZodTypeAny, {
|
3340
|
+
success: boolean;
|
3341
|
+
error?: string | undefined;
|
3342
|
+
content?: string | undefined;
|
3343
|
+
fileName?: string | undefined;
|
3344
|
+
fileLength?: number | undefined;
|
3345
|
+
}, {
|
3346
|
+
success: boolean;
|
3347
|
+
error?: string | undefined;
|
3348
|
+
content?: string | undefined;
|
3349
|
+
fileName?: string | undefined;
|
3350
|
+
fileLength?: number | undefined;
|
3351
|
+
}>;
|
3352
|
+
export type googleOauthGetDriveFileContentByIdOutputType = z.infer<typeof googleOauthGetDriveFileContentByIdOutputSchema>;
|
3353
|
+
export type googleOauthGetDriveFileContentByIdFunction = ActionFunction<googleOauthGetDriveFileContentByIdParamsType, AuthParamsType, googleOauthGetDriveFileContentByIdOutputType>;
|
3319
3354
|
export declare const googleOauthListGroupsParamsSchema: z.ZodObject<{
|
3320
3355
|
maxResults: z.ZodOptional<z.ZodNumber>;
|
3321
3356
|
}, "strip", z.ZodTypeAny, {
|
@@ -2390,6 +2390,7 @@ export const googleOauthUpdatePresentationOutputSchema = z.object({
|
|
2390
2390
|
});
|
2391
2391
|
export const googleOauthSearchDriveByKeywordsParamsSchema = z.object({
|
2392
2392
|
keywords: z.array(z.string()).describe("List of keywords to search for in file contents."),
|
2393
|
+
limit: z.number().int().describe("The maximum number of files to return").optional(),
|
2393
2394
|
});
|
2394
2395
|
export const googleOauthSearchDriveByKeywordsOutputSchema = z.object({
|
2395
2396
|
success: z.boolean().describe("Whether the search was successful"),
|
@@ -2404,6 +2405,17 @@ export const googleOauthSearchDriveByKeywordsOutputSchema = z.object({
|
|
2404
2405
|
.optional(),
|
2405
2406
|
error: z.string().describe("Error message if search failed").optional(),
|
2406
2407
|
});
|
2408
|
+
export const googleOauthGetDriveFileContentByIdParamsSchema = z.object({
|
2409
|
+
fileId: z.string().describe("The ID of the file to get content from"),
|
2410
|
+
limit: z.number().int().describe("The character limit for the file content"),
|
2411
|
+
});
|
2412
|
+
export const googleOauthGetDriveFileContentByIdOutputSchema = z.object({
|
2413
|
+
success: z.boolean().describe("Whether the file content was retrieved successfully"),
|
2414
|
+
content: z.string().describe("The content of the file").optional(),
|
2415
|
+
fileName: z.string().describe("The name of the file").optional(),
|
2416
|
+
fileLength: z.number().int().describe("The length of the file content prior to truncating").optional(),
|
2417
|
+
error: z.string().describe("Error message if file content retrieval failed").optional(),
|
2418
|
+
});
|
2407
2419
|
export const googleOauthListGroupsParamsSchema = z.object({
|
2408
2420
|
maxResults: z.number().int().describe("The maximum number of groups to return (max allowed is 200)").optional(),
|
2409
2421
|
});
|
package/dist/actions/groups.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, jiraGetServiceDesksDefinition, jiraCreateServiceDeskRequestDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, jiraOrgAssignJiraTicketDefinition, jiraOrgCreateJiraTicketDefinition, jiraOrgCommentJiraTicketDefinition, jiraOrgGetJiraTicketDetailsDefinition, jiraOrgGetJiraTicketHistoryDefinition, jiraOrgUpdateJiraTicketDetailsDefinition, jiraOrgUpdateJiraTicketStatusDefinition, jiraOrgGetJiraIssuesByQueryDefinition, } from "./autogen/templates.js";
|
1
|
+
import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, jiraGetServiceDesksDefinition, jiraCreateServiceDeskRequestDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, jiraOrgAssignJiraTicketDefinition, jiraOrgCreateJiraTicketDefinition, jiraOrgCommentJiraTicketDefinition, jiraOrgGetJiraTicketDetailsDefinition, jiraOrgGetJiraTicketHistoryDefinition, jiraOrgUpdateJiraTicketDetailsDefinition, jiraOrgUpdateJiraTicketStatusDefinition, jiraOrgGetJiraIssuesByQueryDefinition, googleOauthGetDriveFileContentByIdDefinition, } from "./autogen/templates.js";
|
2
2
|
export const ACTION_GROUPS = {
|
3
3
|
GENERIC: {
|
4
4
|
description: "Generic utility actions",
|
@@ -46,6 +46,7 @@ export const ACTION_GROUPS = {
|
|
46
46
|
googleOauthCreatePresentationDefinition,
|
47
47
|
googleOauthUpdatePresentationDefinition,
|
48
48
|
googleOauthSearchDriveByKeywordsDefinition,
|
49
|
+
googleOauthGetDriveFileContentByIdDefinition,
|
49
50
|
],
|
50
51
|
},
|
51
52
|
GOOGLE_CALENDAR: {
|
@@ -0,0 +1,46 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const axiosClient_1 = require("../../util/axiosClient");
|
13
|
+
function getConfluenceRequestConfig(baseUrl, username, apiToken) {
|
14
|
+
return {
|
15
|
+
baseURL: baseUrl,
|
16
|
+
headers: {
|
17
|
+
Accept: "application/json",
|
18
|
+
Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
|
19
|
+
},
|
20
|
+
};
|
21
|
+
}
|
22
|
+
const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
23
|
+
const { pageId, content, title } = params;
|
24
|
+
const { baseUrl, authToken, username } = authParams;
|
25
|
+
if (!baseUrl || !authToken || !username) {
|
26
|
+
throw new Error("Missing required authentication information");
|
27
|
+
}
|
28
|
+
const config = getConfluenceRequestConfig(baseUrl, username, authToken);
|
29
|
+
// Get current version number
|
30
|
+
const response = yield axiosClient_1.axiosClient.get(`/api/v2/pages/${pageId}`, config);
|
31
|
+
const currVersion = response.data.version.number;
|
32
|
+
const payload = {
|
33
|
+
id: pageId,
|
34
|
+
status: "current",
|
35
|
+
title,
|
36
|
+
body: {
|
37
|
+
representation: "storage",
|
38
|
+
value: content,
|
39
|
+
},
|
40
|
+
version: {
|
41
|
+
number: currVersion + 1,
|
42
|
+
},
|
43
|
+
};
|
44
|
+
yield axiosClient_1.axiosClient.put(`/api/v2/pages/${pageId}`, payload, config);
|
45
|
+
});
|
46
|
+
exports.default = confluenceUpdatePage;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const fillTemplateAction = (_a) => __awaiter(void 0, [_a], void 0, function* ({ template }) {
|
13
|
+
// Simply return the template without any modification
|
14
|
+
return {
|
15
|
+
result: template,
|
16
|
+
};
|
17
|
+
});
|
18
|
+
exports.default = fillTemplateAction;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const axios_1 = __importDefault(require("axios"));
|
16
|
+
const genericApiCall = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, }) {
|
17
|
+
try {
|
18
|
+
const { endpoint, method, headers, body } = params;
|
19
|
+
const response = yield (0, axios_1.default)({
|
20
|
+
url: endpoint,
|
21
|
+
method,
|
22
|
+
headers,
|
23
|
+
data: method !== "GET" ? body : undefined,
|
24
|
+
});
|
25
|
+
return {
|
26
|
+
statusCode: response.status,
|
27
|
+
headers: response.headers,
|
28
|
+
data: response.data,
|
29
|
+
};
|
30
|
+
}
|
31
|
+
catch (error) {
|
32
|
+
if (axios_1.default.isAxiosError(error)) {
|
33
|
+
throw Error("Axios Error: " + (error.message || "Failed to make API call"));
|
34
|
+
}
|
35
|
+
throw Error("Error: " + (error || "Failed to make API call"));
|
36
|
+
}
|
37
|
+
});
|
38
|
+
exports.default = genericApiCall;
|
@@ -0,0 +1,161 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
import pdf from "pdf-parse/lib/pdf-parse.js";
|
11
|
+
import { axiosClient } from "../../util/axiosClient.js";
|
12
|
+
import mammoth from "mammoth";
|
13
|
+
import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
14
|
+
const getDriveFileContentByID = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
15
|
+
if (!authParams.authToken) {
|
16
|
+
return { success: false, error: MISSING_AUTH_TOKEN };
|
17
|
+
}
|
18
|
+
const { fileId, limit } = params;
|
19
|
+
try {
|
20
|
+
// First, get file metadata to determine the file type
|
21
|
+
const metadataUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?fields=name,mimeType,size`;
|
22
|
+
const metadataRes = yield axiosClient.get(metadataUrl, {
|
23
|
+
headers: {
|
24
|
+
Authorization: `Bearer ${authParams.authToken}`,
|
25
|
+
},
|
26
|
+
});
|
27
|
+
const { name: fileName, mimeType, size } = metadataRes.data;
|
28
|
+
// Check if file is too large (50MB limit for safety)
|
29
|
+
if (size && parseInt(size) > 50 * 1024 * 1024) {
|
30
|
+
return {
|
31
|
+
success: false,
|
32
|
+
error: "File too large (>50MB)",
|
33
|
+
};
|
34
|
+
}
|
35
|
+
let content = "";
|
36
|
+
// Handle different file types - read content directly
|
37
|
+
if (mimeType === "application/vnd.google-apps.document") {
|
38
|
+
// Google Docs - download as plain text
|
39
|
+
const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media&format=txt`;
|
40
|
+
const downloadRes = yield axiosClient.get(downloadUrl, {
|
41
|
+
headers: {
|
42
|
+
Authorization: `Bearer ${authParams.authToken}`,
|
43
|
+
},
|
44
|
+
responseType: 'text',
|
45
|
+
});
|
46
|
+
content = downloadRes.data;
|
47
|
+
}
|
48
|
+
else if (mimeType === "application/vnd.google-apps.spreadsheet") {
|
49
|
+
// Google Sheets - download as CSV
|
50
|
+
const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media&format=csv`;
|
51
|
+
const downloadRes = yield axiosClient.get(downloadUrl, {
|
52
|
+
headers: {
|
53
|
+
Authorization: `Bearer ${authParams.authToken}`,
|
54
|
+
},
|
55
|
+
responseType: 'text',
|
56
|
+
});
|
57
|
+
content = downloadRes.data;
|
58
|
+
}
|
59
|
+
else if (mimeType === "application/vnd.google-apps.presentation") {
|
60
|
+
// Google Slides - download as plain text
|
61
|
+
const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media&format=txt`;
|
62
|
+
const downloadRes = yield axiosClient.get(downloadUrl, {
|
63
|
+
headers: {
|
64
|
+
Authorization: `Bearer ${authParams.authToken}`,
|
65
|
+
},
|
66
|
+
responseType: 'text',
|
67
|
+
});
|
68
|
+
content = downloadRes.data;
|
69
|
+
}
|
70
|
+
else if (mimeType === "application/pdf") {
|
71
|
+
// PDF files - use pdf-parse
|
72
|
+
const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media`;
|
73
|
+
const downloadRes = yield axiosClient.get(downloadUrl, {
|
74
|
+
headers: {
|
75
|
+
Authorization: `Bearer ${authParams.authToken}`,
|
76
|
+
},
|
77
|
+
responseType: 'arraybuffer',
|
78
|
+
});
|
79
|
+
try {
|
80
|
+
const pdfData = yield pdf(downloadRes.data);
|
81
|
+
content = pdfData.text;
|
82
|
+
}
|
83
|
+
catch (pdfError) {
|
84
|
+
return {
|
85
|
+
success: false,
|
86
|
+
error: `Failed to parse PDF: ${pdfError instanceof Error ? pdfError.message : 'Unknown PDF error'}`,
|
87
|
+
};
|
88
|
+
}
|
89
|
+
}
|
90
|
+
else if (mimeType === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ||
|
91
|
+
mimeType === "application/msword") {
|
92
|
+
// Word documents (.docx or .doc) - download and extract text using mammoth
|
93
|
+
const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media`;
|
94
|
+
const downloadRes = yield axiosClient.get(downloadUrl, {
|
95
|
+
headers: {
|
96
|
+
Authorization: `Bearer ${authParams.authToken}`,
|
97
|
+
},
|
98
|
+
responseType: 'arraybuffer',
|
99
|
+
});
|
100
|
+
try {
|
101
|
+
// mammoth works with .docx files. It will ignore formatting and return raw text
|
102
|
+
const result = yield mammoth.extractRawText({ buffer: Buffer.from(downloadRes.data) });
|
103
|
+
content = result.value; // raw text
|
104
|
+
}
|
105
|
+
catch (wordError) {
|
106
|
+
return {
|
107
|
+
success: false,
|
108
|
+
error: `Failed to parse Word document: ${wordError instanceof Error ? wordError.message : 'Unknown Word error'}`,
|
109
|
+
};
|
110
|
+
}
|
111
|
+
}
|
112
|
+
else if (mimeType === "text/plain" ||
|
113
|
+
mimeType === "text/html" ||
|
114
|
+
mimeType === "application/rtf" ||
|
115
|
+
(mimeType === null || mimeType === void 0 ? void 0 : mimeType.startsWith("text/"))) {
|
116
|
+
// Text-based files
|
117
|
+
const downloadUrl = `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}?alt=media`;
|
118
|
+
const downloadRes = yield axiosClient.get(downloadUrl, {
|
119
|
+
headers: {
|
120
|
+
Authorization: `Bearer ${authParams.authToken}`,
|
121
|
+
},
|
122
|
+
responseType: 'text',
|
123
|
+
});
|
124
|
+
content = downloadRes.data;
|
125
|
+
}
|
126
|
+
else if (mimeType === null || mimeType === void 0 ? void 0 : mimeType.startsWith("image/")) {
|
127
|
+
// Skip images
|
128
|
+
return {
|
129
|
+
success: false,
|
130
|
+
error: "Image files are not supported for text extraction",
|
131
|
+
};
|
132
|
+
}
|
133
|
+
else {
|
134
|
+
// Unsupported file type
|
135
|
+
return {
|
136
|
+
success: false,
|
137
|
+
error: `Unsupported file type: ${mimeType}`,
|
138
|
+
};
|
139
|
+
}
|
140
|
+
content = content.trim();
|
141
|
+
const originalLength = content.length;
|
142
|
+
// Naive way to truncate content
|
143
|
+
if (limit && content.length > limit) {
|
144
|
+
content = content.substring(0, limit);
|
145
|
+
}
|
146
|
+
return {
|
147
|
+
success: true,
|
148
|
+
content,
|
149
|
+
fileName,
|
150
|
+
fileLength: originalLength,
|
151
|
+
};
|
152
|
+
}
|
153
|
+
catch (error) {
|
154
|
+
console.error("Error getting Google Drive file content", error);
|
155
|
+
return {
|
156
|
+
success: false,
|
157
|
+
error: error instanceof Error ? error.message : "Unknown error",
|
158
|
+
};
|
159
|
+
}
|
160
|
+
});
|
161
|
+
export default getDriveFileContentByID;
|