@credal/actions 0.2.184 → 0.2.185

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.
@@ -1,4 +1,4 @@
1
- import { genericFillTemplateParamsSchema, genericFillTemplateOutputSchema, confluenceOverwritePageParamsSchema, confluenceOverwritePageOutputSchema, googlemapsValidateAddressOutputSchema, googlemapsValidateAddressParamsSchema, googleOauthCreateNewGoogleDocParamsSchema, googleOauthCreateNewGoogleDocOutputSchema, mathAddOutputSchema, mathAddParamsSchema, mongoInsertMongoDocOutputSchema, mongoInsertMongoDocParamsSchema, slackSendMessageOutputSchema, slackSendMessageParamsSchema, slackGetChannelMessagesOutputSchema, slackGetChannelMessagesParamsSchema, slackCreateChannelParamsSchema, slackCreateChannelOutputSchema, snowflakeGetRowByFieldValueOutputSchema, snowflakeGetRowByFieldValueParamsSchema, zendeskCreateZendeskTicketOutputSchema, zendeskCreateZendeskTicketParamsSchema, zendeskGetTicketDetailsOutputSchema, zendeskGetTicketDetailsParamsSchema, zendeskUpdateTicketStatusOutputSchema, zendeskUpdateTicketStatusParamsSchema, zendeskAddCommentToTicketOutputSchema, zendeskAddCommentToTicketParamsSchema, zendeskAssignTicketOutputSchema, zendeskAssignTicketParamsSchema, zendeskListZendeskTicketsOutputSchema, zendeskListZendeskTicketsParamsSchema, zendeskSearchZendeskByQueryOutputSchema, zendeskSearchZendeskByQueryParamsSchema, jiraAssignJiraTicketParamsSchema, jiraAssignJiraTicketOutputSchema, jiraCommentJiraTicketParamsSchema, jiraCommentJiraTicketOutputSchema, jiraCreateJiraTicketParamsSchema, jiraCreateJiraTicketOutputSchema, jiraGetJiraTicketDetailsParamsSchema, jiraGetJiraTicketDetailsOutputSchema, jiraGetJiraTicketHistoryParamsSchema, jiraGetJiraTicketHistoryOutputSchema, jiraUpdateJiraTicketDetailsParamsSchema, jiraUpdateJiraTicketDetailsOutputSchema, jiraUpdateJiraTicketStatusParamsSchema, jiraUpdateJiraTicketStatusOutputSchema, jiraCreateServiceDeskRequestParamsSchema, jiraCreateServiceDeskRequestOutputSchema, openstreetmapGetLatitudeLongitudeFromLocationParamsSchema, openstreetmapGetLatitudeLongitudeFromLocationOutputSchema, nwsGetForecastForLocationParamsSchema, nwsGetForecastForLocationOutputSchema, googlemapsNearbysearchRestaurantsOutputSchema, googlemapsNearbysearchRestaurantsParamsSchema, firecrawlScrapeUrlOutputSchema, firecrawlScrapeUrlParamsSchema, resendSendEmailOutputSchema, resendSendEmailHtmlParamsSchema, resendSendEmailHtmlOutputSchema, firecrawlScrapeTweetDataWithNitterParamsSchema, firecrawlScrapeTweetDataWithNitterOutputSchema, resendSendEmailParamsSchema, linkedinCreateShareLinkedinPostUrlParamsSchema, linkedinCreateShareLinkedinPostUrlOutputSchema, xCreateShareXPostUrlParamsSchema, xCreateShareXPostUrlOutputSchema, finnhubSymbolLookupParamsSchema, finnhubSymbolLookupOutputSchema, finnhubGetBasicFinancialsParamsSchema, finnhubGetBasicFinancialsOutputSchema, confluenceFetchPageContentParamsSchema, confluenceFetchPageContentOutputSchema, snowflakeRunSnowflakeQueryParamsSchema, snowflakeRunSnowflakeQueryOutputSchema, lookerEnableUserByEmailParamsSchema, lookerEnableUserByEmailOutputSchema, googleOauthUpdateDocParamsSchema, googleOauthUpdateDocOutputSchema, googleOauthCreateSpreadsheetParamsSchema, googleOauthCreateSpreadsheetOutputSchema, googleOauthUpdateSpreadsheetParamsSchema, googleOauthUpdateSpreadsheetOutputSchema, googleOauthAppendRowsToSpreadsheetParamsSchema, googleOauthAppendRowsToSpreadsheetOutputSchema, googleOauthScheduleCalendarMeetingParamsSchema, googleOauthScheduleCalendarMeetingOutputSchema, googleOauthListCalendarsParamsSchema, googleOauthListCalendarsOutputSchema, googleOauthListCalendarEventsParamsSchema, googleOauthListCalendarEventsOutputSchema, googleOauthUpdateCalendarEventParamsSchema, googleOauthUpdateCalendarEventOutputSchema, googleOauthDeleteCalendarEventParamsSchema, googleOauthDeleteCalendarEventOutputSchema, googleOauthEditAGoogleCalendarEventParamsSchema, googleOauthEditAGoogleCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthGetPresentationParamsSchema, googleOauthGetPresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchOrganizationOutputSchema, githubSearchOrganizationParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, googleOauthSearchDriveByQueryOutputSchema, googleOauthSearchDriveByQueryParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentOutputSchema, googleOauthQueryGoogleBigQueryParamsSchema, googleOauthQueryGoogleBigQueryOutputSchema, githubGetFileContentParamsSchema, githubGetFileContentOutputSchema, githubListDirectoryOutputSchema, githubListDirectoryParamsSchema, githubGetBranchParamsSchema, githubGetBranchOutputSchema, githubListCommitsParamsSchema, githubListCommitsOutputSchema, githubGetPullRequestDetailsParamsSchema, githubGetPullRequestDetailsOutputSchema, linearGetIssuesParamsSchema, linearGetIssuesOutputSchema, linearGetIssueDetailsParamsSchema, linearGetIssueDetailsOutputSchema, linearGetProjectDetailsParamsSchema, linearGetProjectDetailsOutputSchema, linearGetTeamDetailsParamsSchema, linearGetTeamDetailsOutputSchema, linearGetProjectsParamsSchema, linearGetProjectsOutputSchema, linearGetTeamsParamsSchema, linearGetTeamsOutputSchema, hubspotGetContactsParamsSchema, hubspotGetContactsOutputSchema, hubspotGetContactDetailsParamsSchema, hubspotGetContactDetailsOutputSchema, hubspotGetCompaniesParamsSchema, hubspotGetCompaniesOutputSchema, hubspotGetCompanyDetailsParamsSchema, hubspotGetCompanyDetailsOutputSchema, hubspotGetDealsParamsSchema, hubspotGetDealsOutputSchema, hubspotGetDealDetailsParamsSchema, hubspotGetDealDetailsOutputSchema, hubspotGetTicketsParamsSchema, hubspotGetTicketsOutputSchema, hubspotGetTicketDetailsParamsSchema, hubspotGetTicketDetailsOutputSchema, gitlabGetFileContentParamsSchema, gitlabGetFileContentOutputSchema, gitlabGetMergeRequestParamsSchema, gitlabGetMergeRequestOutputSchema, jiraPublicCommentOnServiceDeskRequestParamsSchema, jiraPublicCommentOnServiceDeskRequestOutputSchema, googlemailSendGmailParamsSchema, googlemailSendGmailOutputSchema, gitlabListDirectoryParamsSchema, gitlabListDirectoryOutputSchema, firecrawlSearchAndScrapeOutputSchema, firecrawlSearchAndScrapeParamsSchema, firecrawlGetTopNSearchResultUrlsParamsSchema, firecrawlGetTopNSearchResultUrlsOutputSchema, googleOauthSearchDriveByKeywordsAndGetFileContentParamsSchema, googleOauthSearchDriveByKeywordsAndGetFileContentOutputSchema, perplexityPerplexityDeepResearchParamsSchema, perplexityPerplexityDeepResearchOutputSchema, slackUserSearchSlackParamsSchema, slackUserSearchSlackOutputSchema, slackUserSearchSlackRTSParamsSchema, slackUserSearchSlackRTSOutputSchema, oktaOrgGetOktaUserByNameParamsSchema, oktaOrgGetOktaUserByNameOutputSchema, googleSearchCustomSearchParamsSchema, googleSearchCustomSearchOutputSchema, salesforceSearchAllSalesforceRecordsParamsSchema, salesforceSearchAllSalesforceRecordsOutputSchema, slackSendDmFromBotParamsSchema, slackSendDmFromBotOutputSchema, slackGetChannelMembersParamsSchema, slackGetChannelMembersOutputSchema, } from "./autogen/types.js";
1
+ import { genericFillTemplateParamsSchema, genericFillTemplateOutputSchema, confluenceOverwritePageParamsSchema, confluenceOverwritePageOutputSchema, googlemapsValidateAddressOutputSchema, googlemapsValidateAddressParamsSchema, googleOauthCreateNewGoogleDocParamsSchema, googleOauthCreateNewGoogleDocOutputSchema, mathAddOutputSchema, mathAddParamsSchema, mongoInsertMongoDocOutputSchema, mongoInsertMongoDocParamsSchema, slackSendMessageOutputSchema, slackSendMessageParamsSchema, slackGetChannelMessagesOutputSchema, slackGetChannelMessagesParamsSchema, slackCreateChannelParamsSchema, slackCreateChannelOutputSchema, snowflakeGetRowByFieldValueOutputSchema, snowflakeGetRowByFieldValueParamsSchema, zendeskCreateZendeskTicketOutputSchema, zendeskCreateZendeskTicketParamsSchema, zendeskGetTicketDetailsOutputSchema, zendeskGetTicketDetailsParamsSchema, zendeskUpdateTicketStatusOutputSchema, zendeskUpdateTicketStatusParamsSchema, zendeskAddCommentToTicketOutputSchema, zendeskAddCommentToTicketParamsSchema, zendeskAssignTicketOutputSchema, zendeskAssignTicketParamsSchema, zendeskListZendeskTicketsOutputSchema, zendeskListZendeskTicketsParamsSchema, zendeskSearchZendeskByQueryOutputSchema, zendeskSearchZendeskByQueryParamsSchema, jiraAssignJiraTicketParamsSchema, jiraAssignJiraTicketOutputSchema, jiraCommentJiraTicketParamsSchema, jiraCommentJiraTicketOutputSchema, jiraCreateJiraTicketParamsSchema, jiraCreateJiraTicketOutputSchema, jiraGetJiraTicketDetailsParamsSchema, jiraGetJiraTicketDetailsOutputSchema, jiraGetJiraTicketHistoryParamsSchema, jiraGetJiraTicketHistoryOutputSchema, jiraUpdateJiraTicketDetailsParamsSchema, jiraUpdateJiraTicketDetailsOutputSchema, jiraUpdateJiraTicketStatusParamsSchema, jiraUpdateJiraTicketStatusOutputSchema, jiraCreateServiceDeskRequestParamsSchema, jiraCreateServiceDeskRequestOutputSchema, openstreetmapGetLatitudeLongitudeFromLocationParamsSchema, openstreetmapGetLatitudeLongitudeFromLocationOutputSchema, nwsGetForecastForLocationParamsSchema, nwsGetForecastForLocationOutputSchema, googlemapsNearbysearchRestaurantsOutputSchema, googlemapsNearbysearchRestaurantsParamsSchema, firecrawlScrapeUrlOutputSchema, firecrawlScrapeUrlParamsSchema, resendSendEmailOutputSchema, resendSendEmailHtmlParamsSchema, resendSendEmailHtmlOutputSchema, firecrawlScrapeTweetDataWithNitterParamsSchema, firecrawlScrapeTweetDataWithNitterOutputSchema, resendSendEmailParamsSchema, linkedinCreateShareLinkedinPostUrlParamsSchema, linkedinCreateShareLinkedinPostUrlOutputSchema, xCreateShareXPostUrlParamsSchema, xCreateShareXPostUrlOutputSchema, finnhubSymbolLookupParamsSchema, finnhubSymbolLookupOutputSchema, finnhubGetBasicFinancialsParamsSchema, finnhubGetBasicFinancialsOutputSchema, confluenceFetchPageContentParamsSchema, confluenceFetchPageContentOutputSchema, snowflakeRunSnowflakeQueryParamsSchema, snowflakeRunSnowflakeQueryOutputSchema, lookerEnableUserByEmailParamsSchema, lookerEnableUserByEmailOutputSchema, googleOauthUpdateDocParamsSchema, googleOauthUpdateDocOutputSchema, googleOauthCreateSpreadsheetParamsSchema, googleOauthCreateSpreadsheetOutputSchema, googleOauthUpdateSpreadsheetParamsSchema, googleOauthUpdateSpreadsheetOutputSchema, googleOauthAppendRowsToSpreadsheetParamsSchema, googleOauthAppendRowsToSpreadsheetOutputSchema, googleOauthScheduleCalendarMeetingParamsSchema, googleOauthScheduleCalendarMeetingOutputSchema, googleOauthListCalendarsParamsSchema, googleOauthListCalendarsOutputSchema, googleOauthListCalendarEventsParamsSchema, googleOauthListCalendarEventsOutputSchema, googleOauthUpdateCalendarEventParamsSchema, googleOauthUpdateCalendarEventOutputSchema, googleOauthDeleteCalendarEventParamsSchema, googleOauthDeleteCalendarEventOutputSchema, googleOauthEditAGoogleCalendarEventParamsSchema, googleOauthEditAGoogleCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthGetPresentationParamsSchema, googleOauthGetPresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchOrganizationOutputSchema, githubSearchOrganizationParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, googleOauthSearchDriveByQueryOutputSchema, googleOauthSearchDriveByQueryParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentOutputSchema, googleOauthQueryGoogleBigQueryParamsSchema, googleOauthQueryGoogleBigQueryOutputSchema, githubGetFileContentParamsSchema, githubGetFileContentOutputSchema, githubListDirectoryOutputSchema, githubListDirectoryParamsSchema, githubGetBranchParamsSchema, githubGetBranchOutputSchema, githubListCommitsParamsSchema, githubListCommitsOutputSchema, githubGetPullRequestDetailsParamsSchema, githubGetPullRequestDetailsOutputSchema, linearGetIssuesParamsSchema, linearGetIssuesOutputSchema, linearGetIssueDetailsParamsSchema, linearGetIssueDetailsOutputSchema, linearGetProjectDetailsParamsSchema, linearGetProjectDetailsOutputSchema, linearGetTeamDetailsParamsSchema, linearGetTeamDetailsOutputSchema, linearGetProjectsParamsSchema, linearGetProjectsOutputSchema, linearGetTeamsParamsSchema, linearGetTeamsOutputSchema, hubspotGetContactsParamsSchema, hubspotGetContactsOutputSchema, hubspotGetContactDetailsParamsSchema, hubspotGetContactDetailsOutputSchema, hubspotGetCompaniesParamsSchema, hubspotGetCompaniesOutputSchema, hubspotGetCompanyDetailsParamsSchema, hubspotGetCompanyDetailsOutputSchema, hubspotGetDealsParamsSchema, hubspotGetDealsOutputSchema, hubspotGetDealDetailsParamsSchema, hubspotGetDealDetailsOutputSchema, hubspotGetTicketsParamsSchema, hubspotGetTicketsOutputSchema, hubspotGetTicketDetailsParamsSchema, hubspotGetTicketDetailsOutputSchema, gitlabGetFileContentParamsSchema, gitlabGetFileContentOutputSchema, gitlabGetMergeRequestParamsSchema, gitlabGetMergeRequestOutputSchema, jiraPublicCommentOnServiceDeskRequestParamsSchema, jiraPublicCommentOnServiceDeskRequestOutputSchema, googlemailSendGmailParamsSchema, googlemailSendGmailOutputSchema, gitlabListDirectoryParamsSchema, gitlabListDirectoryOutputSchema, firecrawlSearchAndScrapeOutputSchema, firecrawlSearchAndScrapeParamsSchema, firecrawlGetTopNSearchResultUrlsParamsSchema, firecrawlGetTopNSearchResultUrlsOutputSchema, googleOauthSearchDriveByKeywordsAndGetFileContentParamsSchema, googleOauthSearchDriveByKeywordsAndGetFileContentOutputSchema, perplexityPerplexityDeepResearchParamsSchema, perplexityPerplexityDeepResearchOutputSchema, slackUserSearchSlackParamsSchema, slackUserSearchSlackOutputSchema, slackUserSearchSlackRTSParamsSchema, slackUserSearchSlackRTSOutputSchema, oktaOrgGetOktaUserByNameParamsSchema, oktaOrgGetOktaUserByNameOutputSchema, googleSearchCustomSearchParamsSchema, googleSearchCustomSearchOutputSchema, salesforceSearchAllSalesforceRecordsParamsSchema, salesforceSearchAllSalesforceRecordsOutputSchema, salesforceListReportsParamsSchema, salesforceListReportsOutputSchema, slackSendDmFromBotParamsSchema, slackSendDmFromBotOutputSchema, slackGetChannelMembersParamsSchema, slackGetChannelMembersOutputSchema, } 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";
@@ -129,6 +129,7 @@ import sendDmFromBot from "./providers/slack/sendDmFromBot.js";
129
129
  import getOktaUserByName from "./providers/oktaOrg/getOktaUserByName.js";
130
130
  import customSearch from "./providers/googleSearch/customSearch.js";
131
131
  import searchAllSalesforceRecords from "./providers/salesforce/searchAllSalesforceRecords.js";
132
+ import listReports from "./providers/salesforce/listReports.js";
132
133
  const jiraActions = {
133
134
  getJiraIssuesByQuery: {
134
135
  fn: getJiraIssuesByQuery,
@@ -766,6 +767,12 @@ export const ActionMapper = {
766
767
  outputSchema: salesforceSearchAllSalesforceRecordsOutputSchema,
767
768
  actionType: "read",
768
769
  },
770
+ listReports: {
771
+ fn: listReports,
772
+ paramsSchema: salesforceListReportsParamsSchema,
773
+ outputSchema: salesforceListReportsOutputSchema,
774
+ actionType: "read",
775
+ },
769
776
  getSalesforceRecordsByQuery: {
770
777
  fn: getSalesforceRecordsByQuery,
771
778
  paramsSchema: salesforceGetSalesforceRecordsByQueryParamsSchema,
@@ -1003,4 +1010,5 @@ export const ActionMapper = {
1003
1010
  actionType: "read",
1004
1011
  },
1005
1012
  },
1013
+ boxUser: {},
1006
1014
  };
@@ -110,6 +110,7 @@ export declare const salesforceCreateRecordDefinition: ActionTemplate;
110
110
  export declare const salesforceCreateCaseDefinition: ActionTemplate;
111
111
  export declare const salesforceGenerateSalesReportDefinition: ActionTemplate;
112
112
  export declare const salesforceSearchAllSalesforceRecordsDefinition: ActionTemplate;
113
+ export declare const salesforceListReportsDefinition: ActionTemplate;
113
114
  export declare const salesforceSearchSalesforceRecordsDefinition: ActionTemplate;
114
115
  export declare const salesforceGetSalesforceRecordsByQueryDefinition: ActionTemplate;
115
116
  export declare const salesforceGetRecordDefinition: ActionTemplate;
@@ -9862,6 +9862,40 @@ export const salesforceSearchAllSalesforceRecordsDefinition = {
9862
9862
  name: "searchAllSalesforceRecords",
9863
9863
  provider: "salesforce",
9864
9864
  };
9865
+ export const salesforceListReportsDefinition = {
9866
+ description: "List all available Salesforce reports",
9867
+ scopes: [],
9868
+ tags: [],
9869
+ parameters: {
9870
+ type: "object",
9871
+ properties: {},
9872
+ },
9873
+ output: {
9874
+ type: "object",
9875
+ required: ["success"],
9876
+ properties: {
9877
+ success: {
9878
+ type: "boolean",
9879
+ description: "Whether the reports were successfully retrieved",
9880
+ },
9881
+ reports: {
9882
+ type: "array",
9883
+ description: "List of available reports",
9884
+ items: {
9885
+ type: "object",
9886
+ description: "A Salesforce report",
9887
+ additionalProperties: true,
9888
+ },
9889
+ },
9890
+ error: {
9891
+ type: "string",
9892
+ description: "The error that occurred if the reports were not successfully retrieved",
9893
+ },
9894
+ },
9895
+ },
9896
+ name: "listReports",
9897
+ provider: "salesforce",
9898
+ };
9865
9899
  export const salesforceSearchSalesforceRecordsDefinition = {
9866
9900
  description: "Search for Salesforce records by keyword",
9867
9901
  scopes: [],
@@ -33,7 +33,8 @@ export declare enum ProviderName {
33
33
  NOTION = "notion",
34
34
  GITLAB = "gitlab",
35
35
  LINEAR = "linear",
36
- HUBSPOT = "hubspot"
36
+ HUBSPOT = "hubspot",
37
+ BOXUSER = "boxUser"
37
38
  }
38
39
  export declare enum ActionName {
39
40
  FILLTEMPLATE = "fillTemplate",
@@ -50,6 +51,7 @@ export declare enum ActionName {
50
51
  GETCHANNELMESSAGES = "getChannelMessages",
51
52
  GETCHANNELMEMBERS = "getChannelMembers",
52
53
  SEARCHSLACK = "searchSlack",
54
+ SEARCHSLACKRTS = "searchSlackRTS",
53
55
  ADD = "add",
54
56
  OVERWRITEPAGE = "overwritePage",
55
57
  FETCHPAGECONTENT = "fetchPageContent",
@@ -125,6 +127,7 @@ export declare enum ActionName {
125
127
  CREATECASE = "createCase",
126
128
  GENERATESALESREPORT = "generateSalesReport",
127
129
  SEARCHALLSALESFORCERECORDS = "searchAllSalesforceRecords",
130
+ LISTREPORTS = "listReports",
128
131
  SEARCHSALESFORCERECORDS = "searchSalesforceRecords",
129
132
  GETSALESFORCERECORDSBYQUERY = "getSalesforceRecordsByQuery",
130
133
  GETRECORD = "getRecord",
@@ -7102,6 +7105,23 @@ export declare const salesforceSearchAllSalesforceRecordsOutputSchema: z.ZodObje
7102
7105
  }>;
7103
7106
  export type salesforceSearchAllSalesforceRecordsOutputType = z.infer<typeof salesforceSearchAllSalesforceRecordsOutputSchema>;
7104
7107
  export type salesforceSearchAllSalesforceRecordsFunction = ActionFunction<salesforceSearchAllSalesforceRecordsParamsType, AuthParamsType, salesforceSearchAllSalesforceRecordsOutputType>;
7108
+ export declare const salesforceListReportsParamsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
7109
+ export type salesforceListReportsParamsType = z.infer<typeof salesforceListReportsParamsSchema>;
7110
+ export declare const salesforceListReportsOutputSchema: z.ZodObject<{
7111
+ success: z.ZodBoolean;
7112
+ reports: z.ZodOptional<z.ZodArray<z.ZodObject<{}, "strip", z.ZodAny, z.objectOutputType<{}, z.ZodAny, "strip">, z.objectInputType<{}, z.ZodAny, "strip">>, "many">>;
7113
+ error: z.ZodOptional<z.ZodString>;
7114
+ }, "strip", z.ZodTypeAny, {
7115
+ success: boolean;
7116
+ error?: string | undefined;
7117
+ reports?: z.objectOutputType<{}, z.ZodAny, "strip">[] | undefined;
7118
+ }, {
7119
+ success: boolean;
7120
+ error?: string | undefined;
7121
+ reports?: z.objectInputType<{}, z.ZodAny, "strip">[] | undefined;
7122
+ }>;
7123
+ export type salesforceListReportsOutputType = z.infer<typeof salesforceListReportsOutputSchema>;
7124
+ export type salesforceListReportsFunction = ActionFunction<salesforceListReportsParamsType, AuthParamsType, salesforceListReportsOutputType>;
7105
7125
  export declare const salesforceSearchSalesforceRecordsParamsSchema: z.ZodObject<{
7106
7126
  keyword: z.ZodString;
7107
7127
  recordType: z.ZodString;
@@ -35,6 +35,7 @@ export var ProviderName;
35
35
  ProviderName["GITLAB"] = "gitlab";
36
36
  ProviderName["LINEAR"] = "linear";
37
37
  ProviderName["HUBSPOT"] = "hubspot";
38
+ ProviderName["BOXUSER"] = "boxUser";
38
39
  })(ProviderName || (ProviderName = {}));
39
40
  export var ActionName;
40
41
  (function (ActionName) {
@@ -52,6 +53,7 @@ export var ActionName;
52
53
  ActionName["GETCHANNELMESSAGES"] = "getChannelMessages";
53
54
  ActionName["GETCHANNELMEMBERS"] = "getChannelMembers";
54
55
  ActionName["SEARCHSLACK"] = "searchSlack";
56
+ ActionName["SEARCHSLACKRTS"] = "searchSlackRTS";
55
57
  ActionName["ADD"] = "add";
56
58
  ActionName["OVERWRITEPAGE"] = "overwritePage";
57
59
  ActionName["FETCHPAGECONTENT"] = "fetchPageContent";
@@ -127,6 +129,7 @@ export var ActionName;
127
129
  ActionName["CREATECASE"] = "createCase";
128
130
  ActionName["GENERATESALESREPORT"] = "generateSalesReport";
129
131
  ActionName["SEARCHALLSALESFORCERECORDS"] = "searchAllSalesforceRecords";
132
+ ActionName["LISTREPORTS"] = "listReports";
130
133
  ActionName["SEARCHSALESFORCERECORDS"] = "searchSalesforceRecords";
131
134
  ActionName["GETSALESFORCERECORDSBYQUERY"] = "getSalesforceRecordsByQuery";
132
135
  ActionName["GETRECORD"] = "getRecord";
@@ -3659,6 +3662,15 @@ export const salesforceSearchAllSalesforceRecordsOutputSchema = z.object({
3659
3662
  .optional(),
3660
3663
  error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
3661
3664
  });
3665
+ export const salesforceListReportsParamsSchema = z.object({});
3666
+ export const salesforceListReportsOutputSchema = z.object({
3667
+ success: z.boolean().describe("Whether the reports were successfully retrieved"),
3668
+ reports: z
3669
+ .array(z.object({}).catchall(z.any()).describe("A Salesforce report"))
3670
+ .describe("List of available reports")
3671
+ .optional(),
3672
+ error: z.string().describe("The error that occurred if the reports were not successfully retrieved").optional(),
3673
+ });
3662
3674
  export const salesforceSearchSalesforceRecordsParamsSchema = z.object({
3663
3675
  keyword: z.string().describe("The keyword to search for"),
3664
3676
  recordType: z.string().describe("The type of record to search for"),
@@ -1,4 +1,4 @@
1
- import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, jiraGetServiceDesksDefinition, jiraCreateServiceDeskRequestDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, jiraOrgAssignJiraTicketDefinition, jiraOrgCreateJiraTicketDefinition, jiraOrgCommentJiraTicketDefinition, jiraOrgGetJiraTicketDetailsDefinition, jiraOrgGetJiraTicketHistoryDefinition, jiraOrgUpdateJiraTicketDetailsDefinition, jiraOrgUpdateJiraTicketStatusDefinition, jiraOrgGetJiraIssuesByQueryDefinition, googleOauthGetDriveFileContentByIdDefinition, googleOauthSearchDriveByQueryDefinition, } from "./autogen/templates.js";
1
+ import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, jiraGetServiceDesksDefinition, jiraCreateServiceDeskRequestDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, jiraOrgAssignJiraTicketDefinition, jiraOrgCreateJiraTicketDefinition, jiraOrgCommentJiraTicketDefinition, jiraOrgGetJiraTicketDetailsDefinition, jiraOrgGetJiraTicketHistoryDefinition, jiraOrgUpdateJiraTicketDetailsDefinition, jiraOrgUpdateJiraTicketStatusDefinition, jiraOrgGetJiraIssuesByQueryDefinition, googleOauthGetDriveFileContentByIdDefinition, googleOauthSearchDriveByQueryDefinition, googleOauthSearchDriveByQueryAndGetFileContentDefinition, githubGetFileContentDefinition, githubListDirectoryDefinition, } from "./autogen/templates.js";
2
2
  export const ACTION_GROUPS = {
3
3
  GENERIC: {
4
4
  description: "Generic utility actions",
@@ -47,6 +47,7 @@ export const ACTION_GROUPS = {
47
47
  googleOauthUpdatePresentationDefinition,
48
48
  googleOauthSearchDriveByKeywordsDefinition,
49
49
  googleOauthSearchDriveByQueryDefinition,
50
+ googleOauthSearchDriveByQueryAndGetFileContentDefinition,
50
51
  googleOauthGetDriveFileContentByIdDefinition,
51
52
  ],
52
53
  },
@@ -198,6 +199,8 @@ export const ACTION_GROUPS = {
198
199
  githubCreateBranchDefinition,
199
200
  githubCreatePullRequestDefinition,
200
201
  githubListPullRequestsDefinition,
202
+ githubGetFileContentDefinition,
203
+ githubListDirectoryDefinition,
201
204
  ],
202
205
  },
203
206
  ASHBY: {
@@ -0,0 +1,3 @@
1
+ import type { githubSearchRepositoryFunction } from "../../autogen/types.js";
2
+ declare const searchRepository: githubSearchRepositoryFunction;
3
+ export default searchRepository;
@@ -0,0 +1,131 @@
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
+ // Limits on the number of results to return
12
+ const MAX_CODE_RESULTS = 15;
13
+ const MAX_COMMITS = 10;
14
+ const MAX_FILES_PER_COMMIT = 5;
15
+ const MAX_ISSUES_OR_PRS = 10;
16
+ const MAX_FILES_PER_PR = 5;
17
+ const MAX_PATCH_LINES = 20;
18
+ const MAX_FRAGMENT_LINES = 20;
19
+ const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
20
+ const { Octokit } = yield import("octokit");
21
+ if (!authParams.authToken) {
22
+ throw new Error(MISSING_AUTH_TOKEN);
23
+ }
24
+ const octokit = new Octokit({ auth: authParams.authToken });
25
+ const { organization, repository, query } = params;
26
+ // Search CODE with text match metadata
27
+ const codeResultsResponse = yield octokit.rest.search.code({
28
+ q: `${query} in:file,path repo:${organization}/${repository}`,
29
+ text_match: true,
30
+ headers: {
31
+ accept: "application/vnd.github.v3.text-match+json",
32
+ },
33
+ });
34
+ const codeResults = codeResultsResponse.data.items.slice(0, MAX_CODE_RESULTS).map(item => ({
35
+ name: item.name,
36
+ path: item.path,
37
+ sha: item.sha,
38
+ url: item.url,
39
+ repository: {
40
+ full_name: item.repository.full_name,
41
+ html_url: item.repository.html_url,
42
+ },
43
+ score: item.score,
44
+ textMatches: item.text_matches
45
+ ? item.text_matches.map(match => {
46
+ var _a, _b, _c, _d;
47
+ return ({
48
+ object_url: (_a = match.object_url) !== null && _a !== void 0 ? _a : undefined,
49
+ object_type: (_b = match.object_type) !== null && _b !== void 0 ? _b : undefined,
50
+ fragment: (_c = match.fragment) === null || _c === void 0 ? void 0 : _c.split("\n").slice(0, MAX_FRAGMENT_LINES).join("\n"),
51
+ matches: (_d = match.matches) !== null && _d !== void 0 ? _d : [],
52
+ });
53
+ })
54
+ : [],
55
+ }));
56
+ // Search COMMITS
57
+ const commitResults = yield octokit.rest.search.commits({
58
+ q: `${query} repo:${organization}/${repository}`,
59
+ headers: {
60
+ accept: "application/vnd.github.cloak-preview+json",
61
+ },
62
+ });
63
+ const commitSHAs = commitResults.data.items.slice(0, MAX_COMMITS).map(item => item.sha);
64
+ const commitDetails = yield Promise.all(commitSHAs.map(sha => octokit.rest.repos.getCommit({ owner: organization, repo: repository, ref: sha })));
65
+ const enrichedCommits = commitResults.data.items.slice(0, MAX_COMMITS).map(item => {
66
+ var _a, _b;
67
+ const full = commitDetails.find(c => c.data.sha === item.sha);
68
+ return {
69
+ sha: item.sha,
70
+ url: item.url,
71
+ commit: {
72
+ message: item.commit.message,
73
+ author: item.commit.author,
74
+ },
75
+ score: item.score,
76
+ author: (_a = item.author) !== null && _a !== void 0 ? _a : undefined,
77
+ files: ((_b = full === null || full === void 0 ? void 0 : full.data.files) === null || _b === void 0 ? void 0 : _b.slice(0, MAX_FILES_PER_COMMIT).map(f => {
78
+ var _a;
79
+ return ({
80
+ filename: f.filename,
81
+ status: f.status,
82
+ patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).join("\n"),
83
+ });
84
+ })) || [],
85
+ };
86
+ });
87
+ // Search ISSUES & PRs
88
+ const issueResults = yield octokit.rest.search.issuesAndPullRequests({
89
+ q: `${query} repo:${organization}/${repository}`,
90
+ });
91
+ const prItems = issueResults.data.items.filter(item => item.pull_request).slice(0, MAX_ISSUES_OR_PRS);
92
+ const prNumbers = prItems.map(item => item.number);
93
+ const prFiles = yield Promise.all(prNumbers.map(number => octokit.rest.pulls.listFiles({ owner: organization, repo: repository, pull_number: number })));
94
+ const issuesAndPRs = issueResults.data.items
95
+ .slice(0, MAX_ISSUES_OR_PRS)
96
+ .map(item => {
97
+ var _a, _b, _c, _d;
98
+ const isPR = !!item.pull_request;
99
+ const prIndex = prNumbers.indexOf(item.number);
100
+ const files = isPR && prIndex !== -1
101
+ ? prFiles[prIndex].data.slice(0, MAX_FILES_PER_PR).map(f => {
102
+ var _a;
103
+ return ({
104
+ filename: f.filename,
105
+ status: f.status,
106
+ patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).join("\n"),
107
+ });
108
+ })
109
+ : undefined;
110
+ return {
111
+ number: item.number,
112
+ title: item.title,
113
+ html_url: item.html_url,
114
+ state: item.state,
115
+ isPullRequest: isPR,
116
+ body: item.body,
117
+ user: {
118
+ email: (_b = (_a = item.user) === null || _a === void 0 ? void 0 : _a.email) !== null && _b !== void 0 ? _b : undefined,
119
+ name: (_d = (_c = item.user) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : undefined,
120
+ },
121
+ score: item.score,
122
+ files,
123
+ };
124
+ });
125
+ return {
126
+ code: codeResults,
127
+ commits: enrichedCommits,
128
+ issuesAndPullRequests: issuesAndPRs,
129
+ };
130
+ });
131
+ export default searchRepository;
@@ -0,0 +1,3 @@
1
+ import type { githubSearchRepositoryFunction } from "../../autogen/types.js";
2
+ declare const searchRepository: githubSearchRepositoryFunction;
3
+ export default searchRepository;
@@ -0,0 +1,41 @@
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
+ // Limits on the number of results to return
12
+ const MAX_CODE_RESULTS = 15;
13
+ const MAX_COMMITS = 10;
14
+ const MAX_FILES_PER_COMMIT = 5;
15
+ const MAX_ISSUES_OR_PRS = 10;
16
+ const MAX_FILES_PER_PR = 5;
17
+ const MAX_PATCH_LINES = 20;
18
+ const MAX_FRAGMENT_LINES = 20;
19
+ const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
20
+ const { Octokit } = yield import("octokit");
21
+ if (!authParams.authToken) {
22
+ throw new Error(MISSING_AUTH_TOKEN);
23
+ }
24
+ const octokit = new Octokit({ auth: authParams.authToken });
25
+ const { organization, repository, query } = params;
26
+ // Search CODE with text match metadata
27
+ const codeResultsResponse = yield octokit.rest.search.code({
28
+ q: `${query} in:file,path repo:${organization}/${repository}`,
29
+ text_match: true,
30
+ headers: {
31
+ accept: "application/vnd.github.v3.text-match+json",
32
+ },
33
+ });
34
+ const commitResults = yield octokit.rest.repos.getCommit({ owner: organization, repo: repository, ref: sha });
35
+ return {
36
+ code: codeResults,
37
+ commits: enrichedCommits,
38
+ issuesAndPullRequests: issuesAndPRs,
39
+ };
40
+ });
41
+ export default searchRepository;
@@ -0,0 +1,3 @@
1
+ import type { salesforceListReportsFunction } from "../../autogen/types.js";
2
+ declare const listReports: salesforceListReportsFunction;
3
+ export default listReports;
@@ -0,0 +1,36 @@
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 { ApiError, axiosClient } from "../../util/axiosClient.js";
11
+ const listReports = (_a) => __awaiter(void 0, [_a], void 0, function* ({ authParams, }) {
12
+ const { authToken, baseUrl } = authParams;
13
+ if (!authToken || !baseUrl) {
14
+ return { success: false, error: "authToken and baseUrl are required for Salesforce API" };
15
+ }
16
+ const url = `${baseUrl}/services/data/v65.0/analytics/reports`;
17
+ try {
18
+ const response = yield axiosClient.get(url, { headers: { Authorization: `Bearer ${authToken}` } });
19
+ return {
20
+ success: true,
21
+ reports: response.data,
22
+ };
23
+ }
24
+ catch (error) {
25
+ console.error("Error listing Salesforce reports:", error);
26
+ return {
27
+ success: false,
28
+ error: error instanceof ApiError
29
+ ? Array.isArray(error.data) && error.data.length > 0
30
+ ? error.data[0].message
31
+ : error.message
32
+ : "An unknown error occurred",
33
+ };
34
+ }
35
+ });
36
+ export default listReports;
@@ -9,14 +9,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { WebClient } from "@slack/web-api";
11
11
  import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
12
+ import { getSlackChannels } from "./helpers.js";
12
13
  const archiveChannel = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
13
14
  if (!authParams.authToken) {
14
15
  throw new Error(MISSING_AUTH_TOKEN);
15
16
  }
16
17
  try {
17
18
  const client = new WebClient(authParams.authToken);
18
- const { channelId } = params;
19
- const result = yield client.conversations.archive({ channel: channelId });
19
+ const { channelName } = params;
20
+ const allChannels = yield getSlackChannels(client);
21
+ const channel = allChannels.find(channel => channel.name == channelName);
22
+ if (!channel || !channel.id) {
23
+ throw Error(`Channel with name ${channelName} not found`);
24
+ }
25
+ yield client.conversations.join({ channel: channel.id });
26
+ const result = yield client.conversations.archive({ channel: channel.id });
20
27
  if (!result.ok) {
21
28
  return {
22
29
  success: false,
@@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ import Papa from "papaparse";
10
11
  import { isAxiosTimeoutError } from "../actions/util/axiosClient.js";
11
12
  // Helper function to parse Google Docs content to plain text
12
13
  export function parseGoogleDocFromRawContentToPlainText(snapshotRawContent) {
@@ -113,46 +114,91 @@ export function parseGoogleDocFromRawContentToPlainText(snapshotRawContent) {
113
114
  const validDocSections = docSections.filter(section => section.heading || section.paragraphs.length > 0);
114
115
  return validDocSections.map(section => section.paragraphs.join(" ")).join("\n");
115
116
  }
117
+ // Helper to convert 0-based column index to Excel-style column letter (0 -> "A", 25 -> "Z", 26 -> "AA")
118
+ function columnIndexToLetter(index) {
119
+ let letter = "";
120
+ while (index >= 0) {
121
+ letter = String.fromCharCode((index % 26) + 65) + letter;
122
+ index = Math.floor(index / 26) - 1;
123
+ }
124
+ return letter;
125
+ }
126
+ // Helper to parse CSV string into the JSON sheet format
127
+ function parseCSVToSheetJson(csvData, sheetName = "Sheet1") {
128
+ const headers = [];
129
+ const rows = [];
130
+ const parsed = Papa.parse(csvData, {
131
+ skipEmptyLines: true,
132
+ });
133
+ parsed.data.forEach((values, rowIndex) => {
134
+ values.forEach((value, colIndex) => {
135
+ const column = columnIndexToLetter(colIndex);
136
+ if (rowIndex === 0) {
137
+ // Headers: keep all cells (including empty) to preserve column positions
138
+ headers.push({ column, header: value.trim() });
139
+ }
140
+ else {
141
+ // Rows: skip empty or whitespace-only cells
142
+ const trimmedValue = value.trim();
143
+ if (!trimmedValue)
144
+ return;
145
+ rows.push({ column, row: rowIndex + 1, value: trimmedValue });
146
+ }
147
+ });
148
+ });
149
+ return JSON.stringify([{ sheetName, headers, rows }]);
150
+ }
116
151
  export function parseGoogleSheetsFromRawContentToPlainText(snapshotRawContent) {
117
152
  var _a;
118
153
  if (!snapshotRawContent.sheets)
119
- return "";
120
- const sheetContents = [];
154
+ return "[]";
155
+ const sheetsData = [];
121
156
  for (const sheet of snapshotRawContent.sheets) {
122
157
  if (!sheet.data || !((_a = sheet.properties) === null || _a === void 0 ? void 0 : _a.title))
123
158
  continue;
124
- const sheetTitle = sheet.properties.title;
125
- const sheetRows = [`Sheet: ${sheetTitle}`];
159
+ const sheetName = sheet.properties.title;
160
+ const headers = [];
161
+ const rows = [];
162
+ // Helper to extract cell value
163
+ const getCellValue = (cell) => {
164
+ var _a, _b, _c;
165
+ if (cell.formattedValue)
166
+ return cell.formattedValue;
167
+ if ((_a = cell.userEnteredValue) === null || _a === void 0 ? void 0 : _a.stringValue)
168
+ return cell.userEnteredValue.stringValue;
169
+ if (((_b = cell.userEnteredValue) === null || _b === void 0 ? void 0 : _b.numberValue) !== undefined)
170
+ return cell.userEnteredValue.numberValue.toString();
171
+ if (((_c = cell.userEnteredValue) === null || _c === void 0 ? void 0 : _c.boolValue) !== undefined)
172
+ return cell.userEnteredValue.boolValue.toString();
173
+ return "";
174
+ };
126
175
  for (const gridData of sheet.data) {
127
176
  if (!gridData.rowData)
128
177
  continue;
129
- for (const rowData of gridData.rowData) {
178
+ gridData.rowData.forEach((rowData, rowIndex) => {
130
179
  if (!rowData.values)
131
- continue;
132
- const cellValues = rowData.values
133
- .map(cell => {
134
- var _a, _b, _c;
135
- if (cell.formattedValue)
136
- return cell.formattedValue;
137
- if ((_a = cell.userEnteredValue) === null || _a === void 0 ? void 0 : _a.stringValue)
138
- return cell.userEnteredValue.stringValue;
139
- if ((_b = cell.userEnteredValue) === null || _b === void 0 ? void 0 : _b.numberValue)
140
- return cell.userEnteredValue.numberValue.toString();
141
- if ((_c = cell.userEnteredValue) === null || _c === void 0 ? void 0 : _c.boolValue)
142
- return cell.userEnteredValue.boolValue.toString();
143
- return "";
144
- })
145
- .filter(value => value !== "");
146
- if (cellValues.length > 0) {
147
- sheetRows.push(cellValues.join(" | "));
148
- }
149
- }
180
+ return;
181
+ rowData.values.forEach((cell, colIndex) => {
182
+ const column = columnIndexToLetter(colIndex);
183
+ const value = getCellValue(cell).trim();
184
+ if (rowIndex === 0) {
185
+ // Headers: keep all cells (including empty) to preserve column positions
186
+ headers.push({ column, header: value });
187
+ }
188
+ else {
189
+ // Rows: skip empty or whitespace-only cells
190
+ if (!value)
191
+ return;
192
+ rows.push({ column, row: rowIndex + 1, value });
193
+ }
194
+ });
195
+ });
150
196
  }
151
- if (sheetRows.length > 1) {
152
- sheetContents.push(sheetRows.join("\n"));
197
+ if (headers.length > 0 || rows.length > 0) {
198
+ sheetsData.push({ sheetName, headers, rows });
153
199
  }
154
200
  }
155
- return sheetContents.join("\n\n");
201
+ return JSON.stringify(sheetsData);
156
202
  }
157
203
  export function parseGoogleSlidesFromRawContentToPlainText(snapshotRawContent) {
158
204
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -297,11 +343,13 @@ export function getGoogleSheetContent(fileId, authToken, axiosClient, sharedDriv
297
343
  headers: { Authorization: `Bearer ${authToken}` },
298
344
  responseType: "text",
299
345
  });
300
- return exportRes.data
346
+ // Clean up trailing commas and convert to JSON format
347
+ const cleanedCsv = exportRes.data
301
348
  .split("\n")
302
349
  .map((line) => line.replace(/,+$/, ""))
303
350
  .map((line) => line.replace(/,{2,}/g, ","))
304
351
  .join("\n");
352
+ return parseCSVToSheetJson(cleanedCsv);
305
353
  }
306
354
  catch (exportError) {
307
355
  // Check if it's a 404 or permission error
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.2.184",
3
+ "version": "0.2.185",
4
4
  "type": "module",
5
5
  "description": "AI Actions by Credal AI",
6
6
  "sideEffects": false,
@@ -36,6 +36,7 @@
36
36
  "@types/jsonwebtoken": "^9.0.9",
37
37
  "@types/node": "^24.0.0",
38
38
  "@types/node-forge": "^1.3.11",
39
+ "@types/papaparse": "^5.5.2",
39
40
  "@typescript-eslint/eslint-plugin": "^8.18.0",
40
41
  "@typescript-eslint/parser": "^8.18.0",
41
42
  "eslint": "^9.16.0",
@@ -73,6 +74,7 @@
73
74
  "node-forge": "^1.3.3",
74
75
  "officeparser": "^5.2.2",
75
76
  "p-limit": "^7.1.1",
77
+ "papaparse": "^5.5.3",
76
78
  "resend": "^4.7.0",
77
79
  "snowflake-sdk": "^2.0.2",
78
80
  "ts-node": "^10.9.2",
@@ -1,3 +0,0 @@
1
- import type { credalCallCopilotFunction } from "../../autogen/types";
2
- declare const callCopilot: credalCallCopilotFunction;
3
- export default callCopilot;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const sdk_1 = require("@credal/sdk");
13
- const callCopilot = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
- var _b;
15
- const requestBody = {
16
- agentId: params.agentId,
17
- query: params.query,
18
- userEmail: params.userEmail,
19
- };
20
- const baseUrl = (_b = authParams.baseUrl) !== null && _b !== void 0 ? _b : "https://app.credal.ai/api";
21
- const client = new sdk_1.CredalClient({ environment: baseUrl, apiKey: authParams.apiKey });
22
- const response = yield client.copilots.sendMessage({
23
- agentId: requestBody.agentId,
24
- message: requestBody.query,
25
- userEmail: requestBody.userEmail,
26
- });
27
- return {
28
- response: response.sendChatResult.type === "ai_response_result"
29
- ? response.sendChatResult.response.message
30
- : "Error getting response",
31
- referencedSources: response.sendChatResult.type === "ai_response_result" ? response.sendChatResult.referencedSources : [],
32
- sourcesInDataContext: response.sendChatResult.type === "ai_response_result" ? response.sendChatResult.sourcesInDataContext : [],
33
- webSearchResults: response.sendChatResult.type === "ai_response_result" ? response.sendChatResult.webSearchResults : [],
34
- };
35
- });
36
- exports.default = callCopilot;
@@ -1 +0,0 @@
1
- export * as add from "./add";
@@ -1,37 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.add = void 0;
37
- exports.add = __importStar(require("./add"));
@@ -1,3 +0,0 @@
1
- import { salesforceGetSalesforceRecordsByQueryFunction } from "../../autogen/types";
2
- declare const getSalesforceRecordByQuery: salesforceGetSalesforceRecordsByQueryFunction;
3
- export default getSalesforceRecordByQuery;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const axiosClient_1 = require("../../util/axiosClient");
13
- const getSalesforceRecordByQuery = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
- const { authToken, baseUrl } = authParams;
15
- const { query, limit } = params;
16
- if (!authToken || !baseUrl) {
17
- return {
18
- success: false,
19
- error: "authToken and baseUrl are required for Salesforce API",
20
- };
21
- }
22
- // The API limits the maximum number of records returned to 2000, the limit lets the user set a smaller custom limit
23
- const url = `${baseUrl}/services/data/v56.0/query/?q=${encodeURIComponent(query + " LIMIT " + (limit != undefined && limit <= 2000 ? limit : 2000))}`;
24
- try {
25
- const response = yield axiosClient_1.axiosClient.get(url, {
26
- headers: {
27
- Authorization: `Bearer ${authToken}`,
28
- },
29
- });
30
- return {
31
- success: true,
32
- records: response.data,
33
- };
34
- }
35
- catch (error) {
36
- console.error("Error retrieving Salesforce record:", error);
37
- return {
38
- success: false,
39
- error: error instanceof Error ? error.message : "An unknown error occurred",
40
- };
41
- }
42
- });
43
- exports.default = getSalesforceRecordByQuery;
@@ -1 +0,0 @@
1
- export * as listConversations from "./listConversations";
@@ -1,37 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.listConversations = void 0;
37
- exports.listConversations = __importStar(require("./listConversations"));
@@ -1,3 +0,0 @@
1
- import type { slackListConversationsFunction } from "../../autogen/types";
2
- declare const slackListConversations: slackListConversationsFunction;
3
- export default slackListConversations;
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const web_api_1 = require("@slack/web-api");
13
- const helpers_1 = require("./helpers");
14
- const slackListConversations = (_a) => __awaiter(void 0, [_a], void 0, function* ({ authParams, }) {
15
- const client = new web_api_1.WebClient(authParams.authToken);
16
- try {
17
- const allChannels = yield (0, helpers_1.getSlackChannels)(client);
18
- const filteredChannels = [];
19
- for (const channel of allChannels) {
20
- if (channel.name && channel.topic && channel.topic.value && channel.purpose && channel.purpose.value) {
21
- const purpose = channel.purpose.value;
22
- const topic = channel.topic.value;
23
- const name = channel.name;
24
- filteredChannels.push(Object.assign(Object.assign({}, channel), { purpose, topic, name }));
25
- }
26
- }
27
- return {
28
- channels: filteredChannels,
29
- };
30
- }
31
- catch (error) {
32
- if (error instanceof Error) {
33
- // Enhance error with more context
34
- throw new Error(`Failed to list Slack conversations: ${error.message}`);
35
- }
36
- else {
37
- throw error;
38
- }
39
- }
40
- });
41
- exports.default = slackListConversations;