@credal/actions 0.1.67 → 0.1.69

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.
@@ -79,6 +79,8 @@ const listPullRequests_1 = __importDefault(require("./providers/github/listPullR
79
79
  const getJiraIssuesByQuery_1 = __importDefault(require("./providers/jira/getJiraIssuesByQuery"));
80
80
  const createRecord_1 = __importDefault(require("./providers/salesforce/createRecord"));
81
81
  const getTopNSearchResultUrls_1 = __importDefault(require("./providers/bing/getTopNSearchResultUrls"));
82
+ const getGongTranscripts_1 = __importDefault(require("./providers/gong/getGongTranscripts"));
83
+ const types_2 = require("./autogen/types");
82
84
  exports.ActionMapper = {
83
85
  generic: {
84
86
  fillTemplate: {
@@ -348,6 +350,13 @@ exports.ActionMapper = {
348
350
  outputSchema: types_1.xCreateShareXPostUrlOutputSchema,
349
351
  },
350
352
  },
353
+ gong: {
354
+ getGongTranscripts: {
355
+ fn: getGongTranscripts_1.default,
356
+ paramsSchema: types_2.gongGetGongTranscriptsParamsSchema,
357
+ outputSchema: types_2.gongGetGongTranscriptsOutputSchema,
358
+ },
359
+ },
351
360
  finnhub: {
352
361
  symbolLookup: {
353
362
  fn: symbolLookup_1.default,
@@ -45,6 +45,7 @@ export declare const googleOauthCreateSpreadsheetDefinition: ActionTemplate;
45
45
  export declare const googleOauthUpdateSpreadsheetDefinition: ActionTemplate;
46
46
  export declare const googleOauthCreatePresentationDefinition: ActionTemplate;
47
47
  export declare const googleOauthUpdatePresentationDefinition: ActionTemplate;
48
+ export declare const gongGetGongTranscriptsDefinition: ActionTemplate;
48
49
  export declare const finnhubSymbolLookupDefinition: ActionTemplate;
49
50
  export declare const finnhubGetBasicFinancialsDefinition: ActionTemplate;
50
51
  export declare const lookerEnableUserByEmailDefinition: ActionTemplate;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ashbyCreateNoteDefinition = exports.lookerEnableUserByEmailDefinition = exports.finnhubGetBasicFinancialsDefinition = exports.finnhubSymbolLookupDefinition = exports.googleOauthUpdatePresentationDefinition = exports.googleOauthCreatePresentationDefinition = exports.googleOauthUpdateSpreadsheetDefinition = exports.googleOauthCreateSpreadsheetDefinition = exports.googleOauthScheduleCalendarMeetingDefinition = exports.googleOauthUpdateDocDefinition = exports.googleOauthCreateNewGoogleDocDefinition = exports.resendSendEmailDefinition = exports.firecrawlScrapeTweetDataWithNitterDefinition = exports.firecrawlScrapeUrlDefinition = exports.firecrawlDeepResearchDefinition = exports.nwsGetForecastForLocationDefinition = exports.openstreetmapGetLatitudeLongitudeFromLocationDefinition = exports.snowflakeRunSnowflakeQueryDefinition = exports.snowflakeGetRowByFieldValueDefinition = exports.mongoInsertMongoDocDefinition = exports.xCreateShareXPostUrlDefinition = exports.linkedinCreateShareLinkedinPostUrlDefinition = exports.zendeskAssignTicketDefinition = exports.zendeskAddCommentToTicketDefinition = exports.zendeskUpdateTicketStatusDefinition = exports.zendeskGetTicketDetailsDefinition = exports.zendeskListZendeskTicketsDefinition = exports.zendeskCreateZendeskTicketDefinition = exports.credalCallCopilotDefinition = exports.bingGetTopNSearchResultUrlsDefinition = exports.googlemapsNearbysearchRestaurantsDefinition = exports.googlemapsValidateAddressDefinition = exports.jiraGetJiraIssuesByQueryDefinition = exports.jiraUpdateJiraTicketStatusDefinition = exports.jiraUpdateJiraTicketDetailsDefinition = exports.jiraGetJiraTicketHistoryDefinition = exports.jiraGetJiraTicketDetailsDefinition = exports.jiraCreateJiraTicketDefinition = exports.jiraCommentJiraTicketDefinition = exports.jiraAssignJiraTicketDefinition = exports.confluenceFetchPageContentDefinition = exports.confluenceOverwritePageDefinition = exports.mathAddDefinition = exports.slackGetChannelMessagesDefinition = exports.slackListConversationsDefinition = exports.slackSendMessageDefinition = exports.asanaUpdateTaskDefinition = exports.asanaCreateTaskDefinition = exports.asanaCommentTaskDefinition = exports.genericFillTemplateDefinition = void 0;
4
- exports.githubListPullRequestsDefinition = exports.githubCreatePullRequestDefinition = exports.githubCreateBranchDefinition = exports.githubCreateOrUpdateFileDefinition = exports.microsoftGetDocumentDefinition = exports.microsoftMessageTeamsChannelDefinition = exports.microsoftMessageTeamsChatDefinition = exports.microsoftUpdateSpreadsheetDefinition = exports.microsoftUpdateDocumentDefinition = exports.microsoftCreateDocumentDefinition = exports.salesforceFetchSalesforceSchemaByObjectDefinition = exports.salesforceGetRecordDefinition = exports.salesforceGetSalesforceRecordsByQueryDefinition = exports.salesforceGenerateSalesReportDefinition = exports.salesforceCreateCaseDefinition = exports.salesforceCreateRecordDefinition = exports.salesforceUpdateRecordDefinition = exports.ashbyUpdateCandidateDefinition = exports.ashbyCreateCandidateDefinition = exports.ashbyListCandidateNotesDefinition = exports.ashbySearchCandidatesDefinition = exports.ashbyListCandidatesDefinition = exports.ashbyAddCandidateToProjectDefinition = exports.ashbyGetCandidateInfoDefinition = void 0;
3
+ exports.lookerEnableUserByEmailDefinition = exports.finnhubGetBasicFinancialsDefinition = exports.finnhubSymbolLookupDefinition = exports.gongGetGongTranscriptsDefinition = exports.googleOauthUpdatePresentationDefinition = exports.googleOauthCreatePresentationDefinition = exports.googleOauthUpdateSpreadsheetDefinition = exports.googleOauthCreateSpreadsheetDefinition = exports.googleOauthScheduleCalendarMeetingDefinition = exports.googleOauthUpdateDocDefinition = exports.googleOauthCreateNewGoogleDocDefinition = exports.resendSendEmailDefinition = exports.firecrawlScrapeTweetDataWithNitterDefinition = exports.firecrawlScrapeUrlDefinition = exports.firecrawlDeepResearchDefinition = exports.nwsGetForecastForLocationDefinition = exports.openstreetmapGetLatitudeLongitudeFromLocationDefinition = exports.snowflakeRunSnowflakeQueryDefinition = exports.snowflakeGetRowByFieldValueDefinition = exports.mongoInsertMongoDocDefinition = exports.xCreateShareXPostUrlDefinition = exports.linkedinCreateShareLinkedinPostUrlDefinition = exports.zendeskAssignTicketDefinition = exports.zendeskAddCommentToTicketDefinition = exports.zendeskUpdateTicketStatusDefinition = exports.zendeskGetTicketDetailsDefinition = exports.zendeskListZendeskTicketsDefinition = exports.zendeskCreateZendeskTicketDefinition = exports.credalCallCopilotDefinition = exports.bingGetTopNSearchResultUrlsDefinition = exports.googlemapsNearbysearchRestaurantsDefinition = exports.googlemapsValidateAddressDefinition = exports.jiraGetJiraIssuesByQueryDefinition = exports.jiraUpdateJiraTicketStatusDefinition = exports.jiraUpdateJiraTicketDetailsDefinition = exports.jiraGetJiraTicketHistoryDefinition = exports.jiraGetJiraTicketDetailsDefinition = exports.jiraCreateJiraTicketDefinition = exports.jiraCommentJiraTicketDefinition = exports.jiraAssignJiraTicketDefinition = exports.confluenceFetchPageContentDefinition = exports.confluenceOverwritePageDefinition = exports.mathAddDefinition = exports.slackGetChannelMessagesDefinition = exports.slackListConversationsDefinition = exports.slackSendMessageDefinition = exports.asanaUpdateTaskDefinition = exports.asanaCreateTaskDefinition = exports.asanaCommentTaskDefinition = exports.genericFillTemplateDefinition = void 0;
4
+ exports.githubListPullRequestsDefinition = exports.githubCreatePullRequestDefinition = exports.githubCreateBranchDefinition = exports.githubCreateOrUpdateFileDefinition = exports.microsoftGetDocumentDefinition = exports.microsoftMessageTeamsChannelDefinition = exports.microsoftMessageTeamsChatDefinition = exports.microsoftUpdateSpreadsheetDefinition = exports.microsoftUpdateDocumentDefinition = exports.microsoftCreateDocumentDefinition = exports.salesforceFetchSalesforceSchemaByObjectDefinition = exports.salesforceGetRecordDefinition = exports.salesforceGetSalesforceRecordsByQueryDefinition = exports.salesforceGenerateSalesReportDefinition = exports.salesforceCreateCaseDefinition = exports.salesforceCreateRecordDefinition = exports.salesforceUpdateRecordDefinition = exports.ashbyUpdateCandidateDefinition = exports.ashbyCreateCandidateDefinition = exports.ashbyListCandidateNotesDefinition = exports.ashbySearchCandidatesDefinition = exports.ashbyListCandidatesDefinition = exports.ashbyAddCandidateToProjectDefinition = exports.ashbyGetCandidateInfoDefinition = exports.ashbyCreateNoteDefinition = void 0;
5
5
  exports.genericFillTemplateDefinition = {
6
6
  description: "Simple utility that takes a template and returns it filled in",
7
7
  scopes: [],
@@ -4884,6 +4884,106 @@ exports.googleOauthUpdatePresentationDefinition = {
4884
4884
  name: "updatePresentation",
4885
4885
  provider: "googleOauth",
4886
4886
  };
4887
+ exports.gongGetGongTranscriptsDefinition = {
4888
+ description: "Get sales call transcripts from Gong",
4889
+ scopes: [],
4890
+ parameters: {
4891
+ type: "object",
4892
+ required: ["userRole"],
4893
+ properties: {
4894
+ userRole: {
4895
+ type: "string",
4896
+ description: "The role of users whose transcripts are being fetched",
4897
+ },
4898
+ trackers: {
4899
+ type: "array",
4900
+ description: "The trackers to fetch transcripts for",
4901
+ items: {
4902
+ type: "string",
4903
+ description: "The names of the trackers to fetch transcripts for",
4904
+ },
4905
+ },
4906
+ startDate: {
4907
+ type: "string",
4908
+ description: "The start date of the transcripts to fetch in ISO 8601 format",
4909
+ },
4910
+ endDate: {
4911
+ type: "string",
4912
+ description: "The end date of the transcripts to fetch in ISO 8601 format",
4913
+ },
4914
+ },
4915
+ },
4916
+ output: {
4917
+ type: "object",
4918
+ required: ["success"],
4919
+ properties: {
4920
+ success: {
4921
+ type: "boolean",
4922
+ description: "Whether the transcripts were fetched successfully",
4923
+ },
4924
+ callTranscripts: {
4925
+ type: "array",
4926
+ description: "The transcripts fetched",
4927
+ items: {
4928
+ type: "object",
4929
+ description: "A transcript",
4930
+ properties: {
4931
+ callId: {
4932
+ type: "string",
4933
+ description: "The ID of the transcript",
4934
+ },
4935
+ transcript: {
4936
+ type: "array",
4937
+ description: "The transcript",
4938
+ items: {
4939
+ type: "object",
4940
+ description: "A transcript",
4941
+ properties: {
4942
+ speakerName: {
4943
+ type: "string",
4944
+ description: "The name of the speaker",
4945
+ },
4946
+ topic: {
4947
+ type: "string",
4948
+ description: "The topic of the transcript",
4949
+ },
4950
+ sentences: {
4951
+ type: "array",
4952
+ description: "The sentences in the transcript",
4953
+ items: {
4954
+ type: "object",
4955
+ description: "A sentence",
4956
+ properties: {
4957
+ start: {
4958
+ type: "number",
4959
+ description: "The start time of the sentence in seconds",
4960
+ },
4961
+ end: {
4962
+ type: "number",
4963
+ description: "The end time of the sentence in seconds",
4964
+ },
4965
+ text: {
4966
+ type: "string",
4967
+ description: "The text of the sentence",
4968
+ },
4969
+ },
4970
+ },
4971
+ },
4972
+ },
4973
+ },
4974
+ },
4975
+ },
4976
+ },
4977
+ },
4978
+ error: {
4979
+ type: "string",
4980
+ description: "The error that occurred if the transcripts weren't fetched successfully",
4981
+ },
4982
+ },
4983
+ },
4984
+ name: "getGongTranscripts",
4985
+ provider: "gong",
4986
+ };
4887
4987
  exports.finnhubSymbolLookupDefinition = {
4888
4988
  description: "Look up a stock symbol by name",
4889
4989
  scopes: [],
@@ -1971,6 +1971,117 @@ export declare const googleOauthUpdatePresentationOutputSchema: z.ZodObject<{
1971
1971
  }>;
1972
1972
  export type googleOauthUpdatePresentationOutputType = z.infer<typeof googleOauthUpdatePresentationOutputSchema>;
1973
1973
  export type googleOauthUpdatePresentationFunction = ActionFunction<googleOauthUpdatePresentationParamsType, AuthParamsType, googleOauthUpdatePresentationOutputType>;
1974
+ export declare const gongGetGongTranscriptsParamsSchema: z.ZodObject<{
1975
+ userRole: z.ZodString;
1976
+ trackers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1977
+ startDate: z.ZodOptional<z.ZodString>;
1978
+ endDate: z.ZodOptional<z.ZodString>;
1979
+ }, "strip", z.ZodTypeAny, {
1980
+ userRole: string;
1981
+ trackers?: string[] | undefined;
1982
+ startDate?: string | undefined;
1983
+ endDate?: string | undefined;
1984
+ }, {
1985
+ userRole: string;
1986
+ trackers?: string[] | undefined;
1987
+ startDate?: string | undefined;
1988
+ endDate?: string | undefined;
1989
+ }>;
1990
+ export type gongGetGongTranscriptsParamsType = z.infer<typeof gongGetGongTranscriptsParamsSchema>;
1991
+ export declare const gongGetGongTranscriptsOutputSchema: z.ZodObject<{
1992
+ success: z.ZodBoolean;
1993
+ callTranscripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1994
+ callId: z.ZodOptional<z.ZodString>;
1995
+ transcript: z.ZodOptional<z.ZodArray<z.ZodObject<{
1996
+ speakerName: z.ZodOptional<z.ZodString>;
1997
+ topic: z.ZodOptional<z.ZodString>;
1998
+ sentences: z.ZodOptional<z.ZodArray<z.ZodObject<{
1999
+ start: z.ZodOptional<z.ZodNumber>;
2000
+ end: z.ZodOptional<z.ZodNumber>;
2001
+ text: z.ZodOptional<z.ZodString>;
2002
+ }, "strip", z.ZodTypeAny, {
2003
+ text?: string | undefined;
2004
+ start?: number | undefined;
2005
+ end?: number | undefined;
2006
+ }, {
2007
+ text?: string | undefined;
2008
+ start?: number | undefined;
2009
+ end?: number | undefined;
2010
+ }>, "many">>;
2011
+ }, "strip", z.ZodTypeAny, {
2012
+ topic?: string | undefined;
2013
+ speakerName?: string | undefined;
2014
+ sentences?: {
2015
+ text?: string | undefined;
2016
+ start?: number | undefined;
2017
+ end?: number | undefined;
2018
+ }[] | undefined;
2019
+ }, {
2020
+ topic?: string | undefined;
2021
+ speakerName?: string | undefined;
2022
+ sentences?: {
2023
+ text?: string | undefined;
2024
+ start?: number | undefined;
2025
+ end?: number | undefined;
2026
+ }[] | undefined;
2027
+ }>, "many">>;
2028
+ }, "strip", z.ZodTypeAny, {
2029
+ callId?: string | undefined;
2030
+ transcript?: {
2031
+ topic?: string | undefined;
2032
+ speakerName?: string | undefined;
2033
+ sentences?: {
2034
+ text?: string | undefined;
2035
+ start?: number | undefined;
2036
+ end?: number | undefined;
2037
+ }[] | undefined;
2038
+ }[] | undefined;
2039
+ }, {
2040
+ callId?: string | undefined;
2041
+ transcript?: {
2042
+ topic?: string | undefined;
2043
+ speakerName?: string | undefined;
2044
+ sentences?: {
2045
+ text?: string | undefined;
2046
+ start?: number | undefined;
2047
+ end?: number | undefined;
2048
+ }[] | undefined;
2049
+ }[] | undefined;
2050
+ }>, "many">>;
2051
+ error: z.ZodOptional<z.ZodString>;
2052
+ }, "strip", z.ZodTypeAny, {
2053
+ success: boolean;
2054
+ error?: string | undefined;
2055
+ callTranscripts?: {
2056
+ callId?: string | undefined;
2057
+ transcript?: {
2058
+ topic?: string | undefined;
2059
+ speakerName?: string | undefined;
2060
+ sentences?: {
2061
+ text?: string | undefined;
2062
+ start?: number | undefined;
2063
+ end?: number | undefined;
2064
+ }[] | undefined;
2065
+ }[] | undefined;
2066
+ }[] | undefined;
2067
+ }, {
2068
+ success: boolean;
2069
+ error?: string | undefined;
2070
+ callTranscripts?: {
2071
+ callId?: string | undefined;
2072
+ transcript?: {
2073
+ topic?: string | undefined;
2074
+ speakerName?: string | undefined;
2075
+ sentences?: {
2076
+ text?: string | undefined;
2077
+ start?: number | undefined;
2078
+ end?: number | undefined;
2079
+ }[] | undefined;
2080
+ }[] | undefined;
2081
+ }[] | undefined;
2082
+ }>;
2083
+ export type gongGetGongTranscriptsOutputType = z.infer<typeof gongGetGongTranscriptsOutputSchema>;
2084
+ export type gongGetGongTranscriptsFunction = ActionFunction<gongGetGongTranscriptsParamsType, AuthParamsType, gongGetGongTranscriptsOutputType>;
1974
2085
  export declare const finnhubSymbolLookupParamsSchema: z.ZodObject<{
1975
2086
  query: z.ZodString;
1976
2087
  }, "strip", z.ZodTypeAny, {
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.zendeskGetTicketDetailsParamsSchema = exports.zendeskListZendeskTicketsOutputSchema = exports.zendeskListZendeskTicketsParamsSchema = exports.zendeskCreateZendeskTicketOutputSchema = exports.zendeskCreateZendeskTicketParamsSchema = exports.credalCallCopilotOutputSchema = exports.credalCallCopilotParamsSchema = exports.bingGetTopNSearchResultUrlsOutputSchema = exports.bingGetTopNSearchResultUrlsParamsSchema = exports.googlemapsNearbysearchRestaurantsOutputSchema = exports.googlemapsNearbysearchRestaurantsParamsSchema = exports.googlemapsValidateAddressOutputSchema = exports.googlemapsValidateAddressParamsSchema = exports.jiraGetJiraIssuesByQueryOutputSchema = exports.jiraGetJiraIssuesByQueryParamsSchema = exports.jiraUpdateJiraTicketStatusOutputSchema = exports.jiraUpdateJiraTicketStatusParamsSchema = exports.jiraUpdateJiraTicketDetailsOutputSchema = exports.jiraUpdateJiraTicketDetailsParamsSchema = exports.jiraGetJiraTicketHistoryOutputSchema = exports.jiraGetJiraTicketHistoryParamsSchema = exports.jiraGetJiraTicketDetailsOutputSchema = exports.jiraGetJiraTicketDetailsParamsSchema = exports.jiraCreateJiraTicketOutputSchema = exports.jiraCreateJiraTicketParamsSchema = exports.jiraCommentJiraTicketOutputSchema = exports.jiraCommentJiraTicketParamsSchema = exports.jiraAssignJiraTicketOutputSchema = exports.jiraAssignJiraTicketParamsSchema = exports.confluenceFetchPageContentOutputSchema = exports.confluenceFetchPageContentParamsSchema = exports.confluenceOverwritePageOutputSchema = exports.confluenceOverwritePageParamsSchema = exports.mathAddOutputSchema = exports.mathAddParamsSchema = exports.slackGetChannelMessagesOutputSchema = exports.slackGetChannelMessagesParamsSchema = exports.slackListConversationsOutputSchema = exports.slackListConversationsParamsSchema = exports.slackSendMessageOutputSchema = exports.slackSendMessageParamsSchema = exports.asanaUpdateTaskOutputSchema = exports.asanaUpdateTaskParamsSchema = exports.asanaCreateTaskOutputSchema = exports.asanaCreateTaskParamsSchema = exports.asanaCommentTaskOutputSchema = exports.asanaCommentTaskParamsSchema = exports.genericFillTemplateOutputSchema = exports.genericFillTemplateParamsSchema = exports.AuthParamsSchema = void 0;
4
- exports.ashbyCreateNoteParamsSchema = exports.lookerEnableUserByEmailOutputSchema = exports.lookerEnableUserByEmailParamsSchema = exports.finnhubGetBasicFinancialsOutputSchema = exports.finnhubGetBasicFinancialsParamsSchema = exports.finnhubSymbolLookupOutputSchema = exports.finnhubSymbolLookupParamsSchema = exports.googleOauthUpdatePresentationOutputSchema = exports.googleOauthUpdatePresentationParamsSchema = exports.googleOauthCreatePresentationOutputSchema = exports.googleOauthCreatePresentationParamsSchema = exports.googleOauthUpdateSpreadsheetOutputSchema = exports.googleOauthUpdateSpreadsheetParamsSchema = exports.googleOauthCreateSpreadsheetOutputSchema = exports.googleOauthCreateSpreadsheetParamsSchema = exports.googleOauthScheduleCalendarMeetingOutputSchema = exports.googleOauthScheduleCalendarMeetingParamsSchema = exports.googleOauthUpdateDocOutputSchema = exports.googleOauthUpdateDocParamsSchema = exports.googleOauthCreateNewGoogleDocOutputSchema = exports.googleOauthCreateNewGoogleDocParamsSchema = exports.resendSendEmailOutputSchema = exports.resendSendEmailParamsSchema = exports.firecrawlScrapeTweetDataWithNitterOutputSchema = exports.firecrawlScrapeTweetDataWithNitterParamsSchema = exports.firecrawlScrapeUrlOutputSchema = exports.firecrawlScrapeUrlParamsSchema = exports.firecrawlDeepResearchOutputSchema = exports.firecrawlDeepResearchParamsSchema = exports.nwsGetForecastForLocationOutputSchema = exports.nwsGetForecastForLocationParamsSchema = exports.openstreetmapGetLatitudeLongitudeFromLocationOutputSchema = exports.openstreetmapGetLatitudeLongitudeFromLocationParamsSchema = exports.snowflakeRunSnowflakeQueryOutputSchema = exports.snowflakeRunSnowflakeQueryParamsSchema = exports.snowflakeGetRowByFieldValueOutputSchema = exports.snowflakeGetRowByFieldValueParamsSchema = exports.mongoInsertMongoDocOutputSchema = exports.mongoInsertMongoDocParamsSchema = exports.xCreateShareXPostUrlOutputSchema = exports.xCreateShareXPostUrlParamsSchema = exports.linkedinCreateShareLinkedinPostUrlOutputSchema = exports.linkedinCreateShareLinkedinPostUrlParamsSchema = exports.zendeskAssignTicketOutputSchema = exports.zendeskAssignTicketParamsSchema = exports.zendeskAddCommentToTicketOutputSchema = exports.zendeskAddCommentToTicketParamsSchema = exports.zendeskUpdateTicketStatusOutputSchema = exports.zendeskUpdateTicketStatusParamsSchema = exports.zendeskGetTicketDetailsOutputSchema = void 0;
5
- exports.githubListPullRequestsOutputSchema = exports.githubListPullRequestsParamsSchema = exports.githubCreatePullRequestOutputSchema = exports.githubCreatePullRequestParamsSchema = exports.githubCreateBranchOutputSchema = exports.githubCreateBranchParamsSchema = exports.githubCreateOrUpdateFileOutputSchema = exports.githubCreateOrUpdateFileParamsSchema = exports.microsoftGetDocumentOutputSchema = exports.microsoftGetDocumentParamsSchema = exports.microsoftMessageTeamsChannelOutputSchema = exports.microsoftMessageTeamsChannelParamsSchema = exports.microsoftMessageTeamsChatOutputSchema = exports.microsoftMessageTeamsChatParamsSchema = exports.microsoftUpdateSpreadsheetOutputSchema = exports.microsoftUpdateSpreadsheetParamsSchema = exports.microsoftUpdateDocumentOutputSchema = exports.microsoftUpdateDocumentParamsSchema = exports.microsoftCreateDocumentOutputSchema = exports.microsoftCreateDocumentParamsSchema = exports.salesforceFetchSalesforceSchemaByObjectOutputSchema = exports.salesforceFetchSalesforceSchemaByObjectParamsSchema = exports.salesforceGetRecordOutputSchema = exports.salesforceGetRecordParamsSchema = exports.salesforceGetSalesforceRecordsByQueryOutputSchema = exports.salesforceGetSalesforceRecordsByQueryParamsSchema = exports.salesforceGenerateSalesReportOutputSchema = exports.salesforceGenerateSalesReportParamsSchema = exports.salesforceCreateCaseOutputSchema = exports.salesforceCreateCaseParamsSchema = exports.salesforceCreateRecordOutputSchema = exports.salesforceCreateRecordParamsSchema = exports.salesforceUpdateRecordOutputSchema = exports.salesforceUpdateRecordParamsSchema = exports.ashbyUpdateCandidateOutputSchema = exports.ashbyUpdateCandidateParamsSchema = exports.ashbyCreateCandidateOutputSchema = exports.ashbyCreateCandidateParamsSchema = exports.ashbyListCandidateNotesOutputSchema = exports.ashbyListCandidateNotesParamsSchema = exports.ashbySearchCandidatesOutputSchema = exports.ashbySearchCandidatesParamsSchema = exports.ashbyListCandidatesOutputSchema = exports.ashbyListCandidatesParamsSchema = exports.ashbyAddCandidateToProjectOutputSchema = exports.ashbyAddCandidateToProjectParamsSchema = exports.ashbyGetCandidateInfoOutputSchema = exports.ashbyGetCandidateInfoParamsSchema = exports.ashbyCreateNoteOutputSchema = void 0;
4
+ exports.lookerEnableUserByEmailParamsSchema = exports.finnhubGetBasicFinancialsOutputSchema = exports.finnhubGetBasicFinancialsParamsSchema = exports.finnhubSymbolLookupOutputSchema = exports.finnhubSymbolLookupParamsSchema = exports.gongGetGongTranscriptsOutputSchema = exports.gongGetGongTranscriptsParamsSchema = exports.googleOauthUpdatePresentationOutputSchema = exports.googleOauthUpdatePresentationParamsSchema = exports.googleOauthCreatePresentationOutputSchema = exports.googleOauthCreatePresentationParamsSchema = exports.googleOauthUpdateSpreadsheetOutputSchema = exports.googleOauthUpdateSpreadsheetParamsSchema = exports.googleOauthCreateSpreadsheetOutputSchema = exports.googleOauthCreateSpreadsheetParamsSchema = exports.googleOauthScheduleCalendarMeetingOutputSchema = exports.googleOauthScheduleCalendarMeetingParamsSchema = exports.googleOauthUpdateDocOutputSchema = exports.googleOauthUpdateDocParamsSchema = exports.googleOauthCreateNewGoogleDocOutputSchema = exports.googleOauthCreateNewGoogleDocParamsSchema = exports.resendSendEmailOutputSchema = exports.resendSendEmailParamsSchema = exports.firecrawlScrapeTweetDataWithNitterOutputSchema = exports.firecrawlScrapeTweetDataWithNitterParamsSchema = exports.firecrawlScrapeUrlOutputSchema = exports.firecrawlScrapeUrlParamsSchema = exports.firecrawlDeepResearchOutputSchema = exports.firecrawlDeepResearchParamsSchema = exports.nwsGetForecastForLocationOutputSchema = exports.nwsGetForecastForLocationParamsSchema = exports.openstreetmapGetLatitudeLongitudeFromLocationOutputSchema = exports.openstreetmapGetLatitudeLongitudeFromLocationParamsSchema = exports.snowflakeRunSnowflakeQueryOutputSchema = exports.snowflakeRunSnowflakeQueryParamsSchema = exports.snowflakeGetRowByFieldValueOutputSchema = exports.snowflakeGetRowByFieldValueParamsSchema = exports.mongoInsertMongoDocOutputSchema = exports.mongoInsertMongoDocParamsSchema = exports.xCreateShareXPostUrlOutputSchema = exports.xCreateShareXPostUrlParamsSchema = exports.linkedinCreateShareLinkedinPostUrlOutputSchema = exports.linkedinCreateShareLinkedinPostUrlParamsSchema = exports.zendeskAssignTicketOutputSchema = exports.zendeskAssignTicketParamsSchema = exports.zendeskAddCommentToTicketOutputSchema = exports.zendeskAddCommentToTicketParamsSchema = exports.zendeskUpdateTicketStatusOutputSchema = exports.zendeskUpdateTicketStatusParamsSchema = exports.zendeskGetTicketDetailsOutputSchema = void 0;
5
+ exports.githubListPullRequestsParamsSchema = exports.githubCreatePullRequestOutputSchema = exports.githubCreatePullRequestParamsSchema = exports.githubCreateBranchOutputSchema = exports.githubCreateBranchParamsSchema = exports.githubCreateOrUpdateFileOutputSchema = exports.githubCreateOrUpdateFileParamsSchema = exports.microsoftGetDocumentOutputSchema = exports.microsoftGetDocumentParamsSchema = exports.microsoftMessageTeamsChannelOutputSchema = exports.microsoftMessageTeamsChannelParamsSchema = exports.microsoftMessageTeamsChatOutputSchema = exports.microsoftMessageTeamsChatParamsSchema = exports.microsoftUpdateSpreadsheetOutputSchema = exports.microsoftUpdateSpreadsheetParamsSchema = exports.microsoftUpdateDocumentOutputSchema = exports.microsoftUpdateDocumentParamsSchema = exports.microsoftCreateDocumentOutputSchema = exports.microsoftCreateDocumentParamsSchema = exports.salesforceFetchSalesforceSchemaByObjectOutputSchema = exports.salesforceFetchSalesforceSchemaByObjectParamsSchema = exports.salesforceGetRecordOutputSchema = exports.salesforceGetRecordParamsSchema = exports.salesforceGetSalesforceRecordsByQueryOutputSchema = exports.salesforceGetSalesforceRecordsByQueryParamsSchema = exports.salesforceGenerateSalesReportOutputSchema = exports.salesforceGenerateSalesReportParamsSchema = exports.salesforceCreateCaseOutputSchema = exports.salesforceCreateCaseParamsSchema = exports.salesforceCreateRecordOutputSchema = exports.salesforceCreateRecordParamsSchema = exports.salesforceUpdateRecordOutputSchema = exports.salesforceUpdateRecordParamsSchema = exports.ashbyUpdateCandidateOutputSchema = exports.ashbyUpdateCandidateParamsSchema = exports.ashbyCreateCandidateOutputSchema = exports.ashbyCreateCandidateParamsSchema = exports.ashbyListCandidateNotesOutputSchema = exports.ashbyListCandidateNotesParamsSchema = exports.ashbySearchCandidatesOutputSchema = exports.ashbySearchCandidatesParamsSchema = exports.ashbyListCandidatesOutputSchema = exports.ashbyListCandidatesParamsSchema = exports.ashbyAddCandidateToProjectOutputSchema = exports.ashbyAddCandidateToProjectParamsSchema = exports.ashbyGetCandidateInfoOutputSchema = exports.ashbyGetCandidateInfoParamsSchema = exports.ashbyCreateNoteOutputSchema = exports.ashbyCreateNoteParamsSchema = exports.lookerEnableUserByEmailOutputSchema = void 0;
6
+ exports.githubListPullRequestsOutputSchema = void 0;
6
7
  const zod_1 = require("zod");
7
8
  exports.AuthParamsSchema = zod_1.z.object({
8
9
  authToken: zod_1.z.string().optional(),
@@ -1981,6 +1982,46 @@ exports.googleOauthUpdatePresentationOutputSchema = zod_1.z.object({
1981
1982
  error: zod_1.z.string().describe("The error that occurred if the presentation was not created successfully").optional(),
1982
1983
  presentationUrl: zod_1.z.string().describe("The URL of the created presentation").optional(),
1983
1984
  });
1985
+ exports.gongGetGongTranscriptsParamsSchema = zod_1.z.object({
1986
+ userRole: zod_1.z.string().describe("The role of users whose transcripts are being fetched"),
1987
+ trackers: zod_1.z
1988
+ .array(zod_1.z.string().describe("The names of the trackers to fetch transcripts for"))
1989
+ .describe("The trackers to fetch transcripts for")
1990
+ .optional(),
1991
+ startDate: zod_1.z.string().describe("The start date of the transcripts to fetch in ISO 8601 format").optional(),
1992
+ endDate: zod_1.z.string().describe("The end date of the transcripts to fetch in ISO 8601 format").optional(),
1993
+ });
1994
+ exports.gongGetGongTranscriptsOutputSchema = zod_1.z.object({
1995
+ success: zod_1.z.boolean().describe("Whether the transcripts were fetched successfully"),
1996
+ callTranscripts: zod_1.z
1997
+ .array(zod_1.z
1998
+ .object({
1999
+ callId: zod_1.z.string().describe("The ID of the transcript").optional(),
2000
+ transcript: zod_1.z
2001
+ .array(zod_1.z
2002
+ .object({
2003
+ speakerName: zod_1.z.string().describe("The name of the speaker").optional(),
2004
+ topic: zod_1.z.string().describe("The topic of the transcript").optional(),
2005
+ sentences: zod_1.z
2006
+ .array(zod_1.z
2007
+ .object({
2008
+ start: zod_1.z.number().describe("The start time of the sentence in seconds").optional(),
2009
+ end: zod_1.z.number().describe("The end time of the sentence in seconds").optional(),
2010
+ text: zod_1.z.string().describe("The text of the sentence").optional(),
2011
+ })
2012
+ .describe("A sentence"))
2013
+ .describe("The sentences in the transcript")
2014
+ .optional(),
2015
+ })
2016
+ .describe("A transcript"))
2017
+ .describe("The transcript")
2018
+ .optional(),
2019
+ })
2020
+ .describe("A transcript"))
2021
+ .describe("The transcripts fetched")
2022
+ .optional(),
2023
+ error: zod_1.z.string().describe("The error that occurred if the transcripts weren't fetched successfully").optional(),
2024
+ });
1984
2025
  exports.finnhubSymbolLookupParamsSchema = zod_1.z.object({
1985
2026
  query: zod_1.z.string().describe("The symbol or colloquial name of the company to look up"),
1986
2027
  });
@@ -110,6 +110,10 @@ exports.ACTION_GROUPS = {
110
110
  description: "Actions for interacting with X(formerly twitter)",
111
111
  actions: [templates_1.xCreateShareXPostUrlDefinition],
112
112
  },
113
+ GONG: {
114
+ description: "Actions for interacting with Gong",
115
+ actions: [templates_1.gongGetGongTranscriptsDefinition],
116
+ },
113
117
  FINNHUB: {
114
118
  description: "Action for interacting with Finnhub for stock market data",
115
119
  actions: [templates_1.finnhubSymbolLookupDefinition, templates_1.finnhubGetBasicFinancialsDefinition],
@@ -8,30 +8,28 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
11
  Object.defineProperty(exports, "__esModule", { value: true });
15
- const axios_1 = __importDefault(require("axios"));
16
- function getConfluenceApi(baseUrl, username, apiToken) {
17
- const api = axios_1.default.create({
12
+ const axiosClient_1 = require("../../util/axiosClient");
13
+ function getConfluenceRequestConfig(baseUrl, username, apiToken) {
14
+ return {
18
15
  baseURL: baseUrl,
19
16
  headers: {
20
17
  Accept: "application/json",
21
- // Tokens are associated with a specific user.
22
18
  Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
23
19
  },
24
- });
25
- return api;
20
+ };
26
21
  }
27
22
  const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
28
- const { pageId, username, content, title } = params;
29
- const { baseUrl, authToken } = authParams;
30
- const api = getConfluenceApi(baseUrl, username, authToken);
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);
31
29
  // Get current version number
32
- const response = yield api.get(`/api/v2/pages/${pageId}`);
30
+ const response = yield axiosClient_1.axiosClient.get(`/api/v2/pages/${pageId}`, config);
33
31
  const currVersion = response.data.version.number;
34
- yield api.put(`/api/v2/pages/${pageId}`, {
32
+ const payload = {
35
33
  id: pageId,
36
34
  status: "current",
37
35
  title,
@@ -42,6 +40,7 @@ const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* (
42
40
  version: {
43
41
  number: currVersion + 1,
44
42
  },
45
- });
43
+ };
44
+ yield axiosClient_1.axiosClient.put(`/api/v2/pages/${pageId}`, payload, config);
46
45
  });
47
46
  exports.default = confluenceUpdatePage;
@@ -0,0 +1,7 @@
1
+ import type { ActionFunction } from "../../autogen/types";
2
+ declare const fillTemplateAction: ActionFunction<{
3
+ template: string;
4
+ }, {
5
+ result: string;
6
+ }, unknown>;
7
+ export default fillTemplateAction;
@@ -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,3 @@
1
+ import type { genericUniversalTestActionFunction } from "../../autogen/types";
2
+ declare const genericApiCall: genericUniversalTestActionFunction;
3
+ export default genericApiCall;
@@ -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,3 @@
1
+ import type { gongGetGongTranscriptsFunction } from "../../autogen/types";
2
+ declare const getGongTranscripts: gongGetGongTranscriptsFunction;
3
+ export default getGongTranscripts;
@@ -0,0 +1,237 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ const axios_1 = __importStar(require("axios"));
46
+ const zod_1 = require("zod");
47
+ const UserSchema = zod_1.z.object({
48
+ id: zod_1.z.string(),
49
+ name: zod_1.z.string(),
50
+ title: zod_1.z.string(),
51
+ });
52
+ const TrackerSchema = zod_1.z.object({
53
+ id: zod_1.z.string(),
54
+ name: zod_1.z.string(),
55
+ });
56
+ const CallSchema = zod_1.z.object({
57
+ id: zod_1.z.string(),
58
+ primaryUserId: zod_1.z.string().optional(),
59
+ started: zod_1.z.string().optional(),
60
+ });
61
+ const SentenceSchema = zod_1.z.object({
62
+ start: zod_1.z.number(),
63
+ end: zod_1.z.number(),
64
+ text: zod_1.z.string(),
65
+ });
66
+ const TranscriptSchema = zod_1.z.object({
67
+ callId: zod_1.z.string(),
68
+ transcript: zod_1.z.array(zod_1.z.object({
69
+ speakerId: zod_1.z.string(),
70
+ topic: zod_1.z.string(),
71
+ sentences: zod_1.z.array(SentenceSchema),
72
+ })),
73
+ });
74
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
75
+ const GongResponseSchema = zod_1.z.object({
76
+ users: zod_1.z.array(UserSchema).optional(),
77
+ trackers: zod_1.z.array(TrackerSchema).optional(),
78
+ calls: zod_1.z.array(CallSchema).optional(),
79
+ callTranscripts: zod_1.z.array(TranscriptSchema).optional(),
80
+ cursor: zod_1.z.string().optional(),
81
+ });
82
+ function getUsers(authToken_1) {
83
+ return __awaiter(this, arguments, void 0, function* (authToken, params = {}) {
84
+ let results = [];
85
+ let cursor = undefined;
86
+ do {
87
+ const response = yield axios_1.default.post(`https://api.gong.io/v2/users/extensive` + (cursor ? `?cursor=${cursor}` : ""), {
88
+ filter: Object.assign({}, params),
89
+ }, {
90
+ headers: {
91
+ Authorization: `Bearer ${authToken}`,
92
+ "Content-Type": "application/json",
93
+ },
94
+ });
95
+ if (!response) {
96
+ return results;
97
+ }
98
+ const parsedItems = zod_1.z.array(UserSchema).safeParse(response.data.users);
99
+ if (parsedItems.success) {
100
+ results = [...results, ...parsedItems.data];
101
+ }
102
+ else {
103
+ return results;
104
+ }
105
+ cursor = response.data.cursor;
106
+ } while (cursor);
107
+ return results;
108
+ });
109
+ }
110
+ function getTrackers(authToken_1) {
111
+ return __awaiter(this, arguments, void 0, function* (authToken, params = {}) {
112
+ let results = [];
113
+ let cursor = undefined;
114
+ do {
115
+ const response = yield axios_1.default.get(`https://api.gong.io/v2/settings/trackers` + (cursor ? `?cursor=${cursor}` : ""), {
116
+ headers: {
117
+ Authorization: `Bearer ${authToken}`,
118
+ "Content-Type": "application/json",
119
+ },
120
+ params: {
121
+ filter: Object.assign({}, params),
122
+ },
123
+ });
124
+ if (!response) {
125
+ return results;
126
+ }
127
+ const parsedItems = zod_1.z.array(TrackerSchema).safeParse(response.data.trackers);
128
+ if (parsedItems.success) {
129
+ results = [...results, ...parsedItems.data];
130
+ }
131
+ else {
132
+ return results;
133
+ }
134
+ cursor = response.data.cursor;
135
+ } while (cursor);
136
+ return results;
137
+ });
138
+ }
139
+ function getCalls(authToken_1) {
140
+ return __awaiter(this, arguments, void 0, function* (authToken, params = {}) {
141
+ let results = [];
142
+ let cursor = undefined;
143
+ do {
144
+ const response = yield axios_1.default.post(`https://api.gong.io/v2/calls/extensive` + (cursor ? `?cursor=${cursor}` : ""), {
145
+ filter: Object.assign({}, params),
146
+ }, {
147
+ headers: {
148
+ Authorization: `Bearer ${authToken}`,
149
+ "Content-Type": "application/json",
150
+ },
151
+ });
152
+ if (!response) {
153
+ return results;
154
+ }
155
+ const parsedItems = zod_1.z.array(CallSchema).safeParse(response.data.calls);
156
+ if (parsedItems.success) {
157
+ results = [...results, ...parsedItems.data];
158
+ }
159
+ else {
160
+ return results;
161
+ }
162
+ cursor = response.data.cursor;
163
+ } while (cursor);
164
+ return results;
165
+ });
166
+ }
167
+ function getTranscripts(authToken_1) {
168
+ return __awaiter(this, arguments, void 0, function* (authToken, params = {}) {
169
+ let results = [];
170
+ let cursor = undefined;
171
+ do {
172
+ const response = yield axios_1.default.post(`https://api.gong.io/v2/transcript/calls/transcripts` + (cursor ? `?cursor=${cursor}` : ""), {
173
+ filter: Object.assign({}, params),
174
+ }, {
175
+ headers: {
176
+ Authorization: `Bearer ${authToken}`,
177
+ "Content-Type": "application/json",
178
+ },
179
+ });
180
+ if (!response) {
181
+ return results;
182
+ }
183
+ const parsedItems = zod_1.z.array(TranscriptSchema).safeParse(response.data.callTranscripts);
184
+ if (parsedItems.success) {
185
+ results = [...results, ...parsedItems.data];
186
+ }
187
+ else {
188
+ return results;
189
+ }
190
+ cursor = response.data.cursor;
191
+ } while (cursor);
192
+ return results;
193
+ });
194
+ }
195
+ // Retrieves transcripts from Gong based on the provided parameters
196
+ const getGongTranscripts = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
197
+ var _b, _c, _d, _e, _f, _g, _h;
198
+ if (!authParams.authToken) {
199
+ return {
200
+ success: false,
201
+ error: "No auth token provided",
202
+ };
203
+ }
204
+ try {
205
+ const gongUsers = yield getUsers(authParams.authToken, { userRole: params.userRole });
206
+ const filteredGongUsers = gongUsers.filter(user => user.title === params.userRole);
207
+ const trackers = yield getTrackers(authParams.authToken, {});
208
+ const filteredTrackers = trackers.filter(tracker => { var _a; return ((_a = params.trackers) !== null && _a !== void 0 ? _a : []).includes(tracker.name); });
209
+ // Get calls owned by the users and filtered by the trackers
210
+ const calls = yield getCalls(authParams.authToken, {
211
+ fromDateTime: (_b = params.startDate) !== null && _b !== void 0 ? _b : "",
212
+ toDateTime: (_c = params.endDate) !== null && _c !== void 0 ? _c : "",
213
+ primaryUserIds: filteredGongUsers.length > 0 ? filteredGongUsers.map(user => user.id) : undefined,
214
+ trackerIds: filteredTrackers.length > 0 ? filteredTrackers.map(tracker => tracker.id) : undefined,
215
+ });
216
+ // Get transcripts for the calls we found
217
+ const callTranscripts = yield getTranscripts(authParams.authToken, {
218
+ fromDateTime: (_d = params.startDate) !== null && _d !== void 0 ? _d : "",
219
+ toDateTime: (_e = params.endDate) !== null && _e !== void 0 ? _e : "",
220
+ callIds: calls.map(call => call.id),
221
+ });
222
+ // Map speaker IDs to names in the transcripts
223
+ const userIdToNameMap = Object.fromEntries(filteredGongUsers.map(user => [user.id, user.name]));
224
+ const callTranscriptsWithNames = callTranscripts.map(callTranscript => (Object.assign(Object.assign({}, callTranscript), { transcript: callTranscript.transcript.map((transcript) => (Object.assign(Object.assign({}, transcript), { speakerName: userIdToNameMap[transcript.speakerId] || transcript.speakerId }))) })));
225
+ return {
226
+ success: true,
227
+ callTranscripts: callTranscriptsWithNames,
228
+ };
229
+ }
230
+ catch (error) {
231
+ return {
232
+ success: false,
233
+ error: error instanceof axios_1.AxiosError ? ((_h = (_g = (_f = error.response) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.errors) !== null && _h !== void 0 ? _h : error.message) : error,
234
+ };
235
+ }
236
+ });
237
+ exports.default = getGongTranscripts;
@@ -0,0 +1,3 @@
1
+ import { googlemapsNearbysearchFunction } from "../../autogen/types";
2
+ declare const nearbysearch: googlemapsNearbysearchFunction;
3
+ export default nearbysearch;
@@ -0,0 +1,96 @@
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 types_1 = require("../../autogen/types");
17
+ const INCLUDED_TYPES = [
18
+ "monument",
19
+ "museum",
20
+ "art_gallery",
21
+ "sculpture",
22
+ "cultural_landmark",
23
+ "historical_place",
24
+ "performing_arts_theater",
25
+ "university",
26
+ "aquarium",
27
+ "botanical_garden",
28
+ "comedy_club",
29
+ "park",
30
+ "movie_theater",
31
+ "national_park",
32
+ "garden",
33
+ "night_club",
34
+ "tourist_attraction",
35
+ "water_park",
36
+ "zoo",
37
+ "bar",
38
+ "restaurant",
39
+ "food_court",
40
+ "bakery",
41
+ "cafe",
42
+ "coffee_shop",
43
+ "pub",
44
+ "wine_bar",
45
+ "spa",
46
+ "beach",
47
+ "market",
48
+ "shopping_mall",
49
+ "stadium",
50
+ ];
51
+ const nearbysearch = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
52
+ const url = `https://places.googleapis.com/v1/places:searchNearby`;
53
+ const fieldMask = [
54
+ "places.displayName",
55
+ "places.formattedAddress",
56
+ "places.priceLevel",
57
+ "places.rating",
58
+ "places.primaryTypeDisplayName",
59
+ "places.editorialSummary",
60
+ "places.regularOpeningHours",
61
+ ].join(",");
62
+ const response = yield axios_1.default.post(url, {
63
+ maxResultCount: 20,
64
+ includedTypes: INCLUDED_TYPES,
65
+ locationRestriction: {
66
+ circle: {
67
+ center: {
68
+ latitude: params.latitude,
69
+ longitude: params.longitude,
70
+ },
71
+ radius: 10000,
72
+ },
73
+ },
74
+ }, {
75
+ headers: {
76
+ "X-Goog-Api-Key": authParams.apiKey,
77
+ "X-Goog-FieldMask": fieldMask,
78
+ "Content-Type": "application/json",
79
+ },
80
+ });
81
+ return types_1.googlemapsNearbysearchOutputSchema.parse({
82
+ results: response.data.places.map((place) => {
83
+ var _a, _b;
84
+ return ({
85
+ name: place.displayName.text,
86
+ address: place.formattedAddress,
87
+ priceLevel: place.priceLevel,
88
+ rating: place.rating,
89
+ primaryType: place.primaryTypeDisplayName.text,
90
+ editorialSummary: ((_a = place.editorialSummary) === null || _a === void 0 ? void 0 : _a.text) || "",
91
+ openingHours: ((_b = place.regularOpeningHours) === null || _b === void 0 ? void 0 : _b.weekdayDescriptions.join("\n")) || "",
92
+ });
93
+ }),
94
+ });
95
+ });
96
+ exports.default = nearbysearch;
@@ -0,0 +1,3 @@
1
+ import { snowflakeRunSnowflakeQueryWriteResultsToS3Function } from "../../autogen/types";
2
+ declare const runSnowflakeQueryWriteResultsToS3: snowflakeRunSnowflakeQueryWriteResultsToS3Function;
3
+ export default runSnowflakeQueryWriteResultsToS3;
@@ -0,0 +1,154 @@
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 snowflake_sdk_1 = __importDefault(require("snowflake-sdk"));
16
+ const crypto_1 = __importDefault(require("crypto"));
17
+ const client_s3_1 = require("@aws-sdk/client-s3");
18
+ const s3_request_presigner_1 = require("@aws-sdk/s3-request-presigner");
19
+ const uuid_1 = require("uuid");
20
+ // Only log errors.
21
+ snowflake_sdk_1.default.configure({ logLevel: "ERROR" });
22
+ const runSnowflakeQueryWriteResultsToS3 = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
23
+ const { databaseName, warehouse, query, user, accountName, s3BucketName, s3Region, outputFormat = "json" } = params;
24
+ const { apiKey: privateKey, awsAccessKeyId, awsSecretAccessKey } = authParams;
25
+ if (!privateKey) {
26
+ throw new Error("Snowflake private key is required");
27
+ }
28
+ if (!awsAccessKeyId || !awsSecretAccessKey) {
29
+ throw new Error("AWS credentials are required");
30
+ }
31
+ if (!accountName || !user || !databaseName || !warehouse || !query || !s3BucketName) {
32
+ throw new Error("Missing required parameters for Snowflake query or S3 destination");
33
+ }
34
+ const getPrivateKeyCorrectFormat = (privateKey) => {
35
+ const buffer = Buffer.from(privateKey);
36
+ const privateKeyObject = crypto_1.default.createPrivateKey({
37
+ key: buffer,
38
+ format: "pem",
39
+ passphrase: "password",
40
+ });
41
+ const privateKeyCorrectFormat = privateKeyObject.export({
42
+ format: "pem",
43
+ type: "pkcs8",
44
+ });
45
+ return privateKeyCorrectFormat.toString();
46
+ };
47
+ const executeQueryAndFormatData = () => __awaiter(void 0, void 0, void 0, function* () {
48
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
49
+ const queryResults = yield new Promise((resolve, reject) => {
50
+ connection.execute({
51
+ sqlText: query,
52
+ complete: (err, stmt, rows) => {
53
+ if (err) {
54
+ return reject(err);
55
+ }
56
+ return resolve(rows || []);
57
+ },
58
+ });
59
+ });
60
+ // Format the results based on the output format
61
+ let formattedData;
62
+ if (outputFormat.toLowerCase() === "csv") {
63
+ if (queryResults.length === 0) {
64
+ formattedData = "";
65
+ }
66
+ else {
67
+ const headers = Object.keys(queryResults[0]).join(",");
68
+ const rows = queryResults.map(row => Object.values(row)
69
+ .map(value => (typeof value === "object" && value !== null ? JSON.stringify(value) : value))
70
+ .join(","));
71
+ formattedData = [headers, ...rows].join("\n");
72
+ }
73
+ }
74
+ else {
75
+ // Default to JSON
76
+ formattedData = JSON.stringify(queryResults, null, 2);
77
+ }
78
+ return { formattedData, resultsLength: queryResults.length };
79
+ });
80
+ const uploadToS3AndGetURL = (formattedData) => __awaiter(void 0, void 0, void 0, function* () {
81
+ // Create S3 client
82
+ const s3Client = new client_s3_1.S3Client({
83
+ region: s3Region,
84
+ credentials: {
85
+ accessKeyId: awsAccessKeyId,
86
+ secretAccessKey: awsSecretAccessKey,
87
+ },
88
+ });
89
+ const contentType = outputFormat.toLowerCase() === "csv" ? "text/csv" : "application/json";
90
+ const fileExtension = outputFormat.toLowerCase() === "csv" ? "csv" : "json";
91
+ const finalKey = `${databaseName}/${(0, uuid_1.v4)()}.${fileExtension}`;
92
+ // Upload to S3 without ACL
93
+ const uploadCommand = new client_s3_1.PutObjectCommand({
94
+ Bucket: s3BucketName,
95
+ Key: finalKey,
96
+ Body: formattedData,
97
+ ContentType: contentType,
98
+ });
99
+ yield s3Client.send(uploadCommand);
100
+ // Generate a presigned URL (valid for an hour)
101
+ const getObjectCommand = new client_s3_1.GetObjectCommand({
102
+ Bucket: s3BucketName,
103
+ Key: finalKey,
104
+ });
105
+ const presignedUrl = yield (0, s3_request_presigner_1.getSignedUrl)(s3Client, getObjectCommand, { expiresIn: 3600 });
106
+ return presignedUrl;
107
+ });
108
+ // Process the private key
109
+ const privateKeyCorrectFormatString = getPrivateKeyCorrectFormat(privateKey);
110
+ // Set up a connection using snowflake-sdk
111
+ const connection = snowflake_sdk_1.default.createConnection({
112
+ account: accountName,
113
+ username: user,
114
+ privateKey: privateKeyCorrectFormatString,
115
+ authenticator: "SNOWFLAKE_JWT",
116
+ role: "ACCOUNTADMIN",
117
+ warehouse: warehouse,
118
+ database: databaseName,
119
+ });
120
+ try {
121
+ // Connect to Snowflake
122
+ yield new Promise((resolve, reject) => {
123
+ connection.connect((err, conn) => {
124
+ if (err) {
125
+ console.error("Unable to connect to Snowflake:", err.message);
126
+ return reject(err);
127
+ }
128
+ resolve(conn);
129
+ });
130
+ });
131
+ const { formattedData, resultsLength } = yield executeQueryAndFormatData();
132
+ const presignedUrl = yield uploadToS3AndGetURL(formattedData);
133
+ // Return fields to match schema definition
134
+ connection.destroy(err => {
135
+ if (err) {
136
+ console.log("Failed to disconnect from Snowflake:", err);
137
+ }
138
+ });
139
+ return {
140
+ bucketUrl: presignedUrl,
141
+ message: `Query results successfully written to S3. URL valid for 1 hour.`,
142
+ rowCount: resultsLength,
143
+ };
144
+ }
145
+ catch (error) {
146
+ connection.destroy(err => {
147
+ if (err) {
148
+ console.log("Failed to disconnect from Snowflake:", err);
149
+ }
150
+ });
151
+ throw Error(`An error occurred: ${error}`);
152
+ }
153
+ });
154
+ exports.default = runSnowflakeQueryWriteResultsToS3;
@@ -0,0 +1,3 @@
1
+ import { xScrapePostDataWithNitterFunction } from "../../autogen/types";
2
+ declare const scrapeTweetDataWithNitter: xScrapePostDataWithNitterFunction;
3
+ export default scrapeTweetDataWithNitter;
@@ -0,0 +1,45 @@
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 firecrawl_js_1 = __importDefault(require("@mendable/firecrawl-js"));
16
+ const scrapeTweetDataWithNitter = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
17
+ const tweetUrlRegex = /^(?:https?:\/\/)?(?:www\.)?(?:twitter\.com|x\.com)\/([a-zA-Z0-9_]+)\/status\/(\d+)(?:\?.*)?$/;
18
+ if (!tweetUrlRegex.test(params.tweetUrl)) {
19
+ throw new Error("Invalid tweet URL. Expected format: https://twitter.com/username/status/id or https://x.com/username/status/id");
20
+ }
21
+ const nitterUrl = params.tweetUrl.replace(/^(?:https?:\/\/)?(?:www\.)?(?:twitter\.com|x\.com)/i, "https://nitter.net");
22
+ // Initialize Firecrawl
23
+ if (!authParams.apiKey) {
24
+ throw new Error("API key is required for X+Nitter+Firecrawl");
25
+ }
26
+ const firecrawl = new firecrawl_js_1.default({
27
+ apiKey: authParams.apiKey,
28
+ });
29
+ try {
30
+ // Scrape the Nitter URL
31
+ const result = yield firecrawl.scrapeUrl(nitterUrl);
32
+ if (!result.success) {
33
+ throw new Error(`Failed to scrape tweet: ${result.error || "Unknown error"}`);
34
+ }
35
+ // Extract the tweet text from the scraped content - simple approach - in practice, you might need more robust parsing based on nitter html structure
36
+ const tweetContent = result.markdown;
37
+ return {
38
+ text: tweetContent || "Error scraping with firecrawl",
39
+ };
40
+ }
41
+ catch (error) {
42
+ throw new Error(`Error scraping tweet: ${error instanceof Error ? error.message : error}`);
43
+ }
44
+ });
45
+ exports.default = scrapeTweetDataWithNitter;
@@ -19,7 +19,7 @@ function formatDataForCodeInterpreter(queryResults, outputFormat = "json") {
19
19
  // Helper function to properly escape CSV fields
20
20
  const escapeCsvField = (field) => {
21
21
  if (field === null || field === undefined)
22
- return "";
22
+ return "null";
23
23
  const stringValue = typeof field === "object" ? JSON.stringify(field) : String(field);
24
24
  // If the field contains commas, quotes, or newlines, it needs to be quoted
25
25
  if (stringValue.includes(",") ||
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.1.67",
3
+ "version": "0.1.69",
4
4
  "description": "AI Actions by Credal AI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "test": "npx ts-node -r tsconfig-paths/register --project tsconfig.json ",
9
+ "jest-test": "jest",
9
10
  "build": "tsc",
10
11
  "dev": "ts-node-dev -r tsconfig-paths/register src/app.ts",
11
12
  "generate:types": "ts-node -r tsconfig-paths/register src/actions/parse.ts",
@@ -24,6 +25,7 @@
24
25
  "license": "ISC",
25
26
  "devDependencies": {
26
27
  "@eslint/js": "^9.16.0",
28
+ "@jest/globals": "^29.7.0",
27
29
  "@types/js-yaml": "^4.0.9",
28
30
  "@types/jsonwebtoken": "^9.0.9",
29
31
  "@types/node": "^22.10.1",
@@ -34,6 +36,7 @@
34
36
  "globals": "^15.13.0",
35
37
  "js-yaml": "^4.1.0",
36
38
  "prettier": "^3.4.2",
39
+ "ts-jest": "^29.3.2",
37
40
  "ts-morph": "^24.0.0",
38
41
  "ts-node-dev": "^2.0.0",
39
42
  "tsconfig-paths": "^4.2.0",