@credal/actions 0.1.40 → 0.1.42

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.
Files changed (102) hide show
  1. package/README.md +3 -2
  2. package/dist/actions/actionMapper.d.ts +1 -1
  3. package/dist/actions/actionMapper.js +8 -0
  4. package/dist/actions/autogen/templates.d.ts +1 -0
  5. package/dist/actions/autogen/templates.js +28 -2
  6. package/dist/actions/autogen/types.d.ts +17 -0
  7. package/dist/actions/autogen/types.js +9 -3
  8. package/dist/actions/groups.d.ts +1 -1
  9. package/dist/actions/groups.js +4 -0
  10. package/dist/actions/providers/asana/commentAsanaTask.d.ts +1 -1
  11. package/dist/actions/providers/asana/createAsanaTask.d.ts +1 -1
  12. package/dist/actions/providers/asana/updateAsanaTask.d.ts +1 -1
  13. package/dist/actions/providers/ashby/addCandidateToProject.d.ts +1 -1
  14. package/dist/actions/providers/ashby/createCandidate.d.ts +1 -1
  15. package/dist/actions/providers/ashby/createNote.d.ts +1 -1
  16. package/dist/actions/providers/ashby/getCandidateInfo.d.ts +1 -1
  17. package/dist/actions/providers/ashby/listCandidateNotes.d.ts +1 -1
  18. package/dist/actions/providers/ashby/listCandidates.d.ts +1 -1
  19. package/dist/actions/providers/ashby/searchCandidates.d.ts +1 -1
  20. package/dist/actions/providers/ashby/updateCandidate.d.ts +1 -1
  21. package/dist/actions/providers/confluence/fetchPageContent.d.ts +1 -1
  22. package/dist/actions/providers/confluence/overwritePage.d.ts +1 -1
  23. package/dist/actions/providers/confluence/updatePage.d.ts +3 -0
  24. package/dist/actions/providers/confluence/updatePage.js +46 -0
  25. package/dist/actions/providers/credal/callCopilot.d.ts +1 -1
  26. package/dist/actions/providers/finnhub/getBasicFinancials.d.ts +1 -1
  27. package/dist/actions/providers/finnhub/symbolLookup.d.ts +1 -1
  28. package/dist/actions/providers/firecrawl/scrapeTweetDataWithNitter.d.ts +1 -1
  29. package/dist/actions/providers/firecrawl/scrapeUrl.d.ts +1 -1
  30. package/dist/actions/providers/generic/fillTemplate.d.ts +3 -0
  31. package/dist/actions/providers/generic/fillTemplate.js +17 -0
  32. package/dist/actions/providers/generic/fillTemplateAction.d.ts +7 -0
  33. package/dist/actions/providers/generic/fillTemplateAction.js +18 -0
  34. package/dist/actions/providers/generic/genericApiCall.d.ts +3 -0
  35. package/dist/actions/providers/generic/genericApiCall.js +38 -0
  36. package/dist/actions/providers/github/createBranch.d.ts +1 -1
  37. package/dist/actions/providers/github/createOrUpdateFile.d.ts +1 -1
  38. package/dist/actions/providers/github/createPullRequest.d.ts +1 -1
  39. package/dist/actions/providers/google-oauth/createNewGoogleDoc.d.ts +1 -1
  40. package/dist/actions/providers/google-oauth/createPresentation.d.ts +1 -1
  41. package/dist/actions/providers/google-oauth/createSpreadsheet.d.ts +1 -1
  42. package/dist/actions/providers/google-oauth/scheduleCalendarMeeting.d.ts +1 -1
  43. package/dist/actions/providers/google-oauth/updateDoc.d.ts +1 -1
  44. package/dist/actions/providers/google-oauth/updatePresentation.d.ts +1 -1
  45. package/dist/actions/providers/google-oauth/updateSpreadsheet.d.ts +1 -1
  46. package/dist/actions/providers/googlemaps/nearbysearch.d.ts +3 -0
  47. package/dist/actions/providers/googlemaps/nearbysearch.js +96 -0
  48. package/dist/actions/providers/googlemaps/nearbysearchRestaurants.d.ts +1 -1
  49. package/dist/actions/providers/googlemaps/validateAddress.d.ts +1 -1
  50. package/dist/actions/providers/jira/assignJiraTicket.d.ts +1 -1
  51. package/dist/actions/providers/jira/commentJiraTicket.d.ts +1 -1
  52. package/dist/actions/providers/jira/createJiraTicket.d.ts +1 -1
  53. package/dist/actions/providers/jira/getJiraTicketDetails.d.ts +1 -1
  54. package/dist/actions/providers/jira/getJiraTicketHistory.d.ts +1 -1
  55. package/dist/actions/providers/jira/updateJiraTicketDetails.d.ts +1 -1
  56. package/dist/actions/providers/jira/updateJiraTicketStatus.d.ts +1 -1
  57. package/dist/actions/providers/linkedin/createSharePostLinkedinUrl.d.ts +1 -1
  58. package/dist/actions/providers/looker/enableUserByEmail.d.ts +1 -1
  59. package/dist/actions/providers/math/add.d.ts +1 -1
  60. package/dist/actions/providers/microsoft/createDocument.d.ts +1 -1
  61. package/dist/actions/providers/microsoft/getDocument.d.ts +1 -1
  62. package/dist/actions/providers/microsoft/messageTeamsChannel.d.ts +1 -1
  63. package/dist/actions/providers/microsoft/messageTeamsChat.d.ts +1 -1
  64. package/dist/actions/providers/microsoft/updateDocument.d.ts +1 -1
  65. package/dist/actions/providers/microsoft/updateSpreadsheet.d.ts +1 -1
  66. package/dist/actions/providers/microsoft/utils.d.ts +1 -1
  67. package/dist/actions/providers/mongodb/insertMongoDoc.d.ts +1 -1
  68. package/dist/actions/providers/nws/getForecastForLocation.d.ts +1 -1
  69. package/dist/actions/providers/openstreetmap/getLatitudeLongitudeFromLocation.d.ts +1 -1
  70. package/dist/actions/providers/resend/sendEmail.d.ts +1 -1
  71. package/dist/actions/providers/salesforce/createCase.d.ts +1 -1
  72. package/dist/actions/providers/salesforce/generateSalesReport.d.ts +1 -1
  73. package/dist/actions/providers/salesforce/getRecord.d.ts +1 -1
  74. package/dist/actions/providers/salesforce/getSalesforceRecordsByQuery.d.ts +1 -1
  75. package/dist/actions/providers/salesforce/getSalesforceRecordsByQuery.js +1 -1
  76. package/dist/actions/providers/salesforce/updateRecord.d.ts +1 -1
  77. package/dist/actions/providers/slack/getChannelMessages.d.ts +1 -1
  78. package/dist/actions/providers/slack/helpers.d.ts +2 -2
  79. package/dist/actions/providers/slack/listConversations.d.ts +1 -1
  80. package/dist/actions/providers/slack/sendMessage.d.ts +1 -1
  81. package/dist/actions/providers/snowflake/auth/getSnowflakeConnection.d.ts +8 -0
  82. package/dist/actions/providers/snowflake/auth/getSnowflakeConnection.js +53 -0
  83. package/dist/actions/providers/snowflake/getRowByFieldValue.d.ts +1 -1
  84. package/dist/actions/providers/snowflake/getRowByFieldValue.js +5 -13
  85. package/dist/actions/providers/snowflake/runSnowflakeQuery.d.ts +1 -1
  86. package/dist/actions/providers/snowflake/runSnowflakeQuery.js +3 -9
  87. package/dist/actions/providers/snowflake/runSnowflakeQueryWriteResultsToS3.d.ts +3 -0
  88. package/dist/actions/providers/snowflake/runSnowflakeQueryWriteResultsToS3.js +154 -0
  89. package/dist/actions/providers/x/createXSharePostUrl.d.ts +1 -1
  90. package/dist/actions/providers/x/scrapeTweetDataWithNitter.d.ts +3 -0
  91. package/dist/actions/providers/x/scrapeTweetDataWithNitter.js +45 -0
  92. package/dist/actions/providers/zendesk/addCommentToTicket.d.ts +1 -1
  93. package/dist/actions/providers/zendesk/assignTicket.d.ts +1 -1
  94. package/dist/actions/providers/zendesk/createZendeskTicket.d.ts +1 -1
  95. package/dist/actions/providers/zendesk/getTicketDetails.d.ts +1 -1
  96. package/dist/actions/providers/zendesk/updateTicketStatus.d.ts +1 -1
  97. package/dist/actions/util/axiosClient.d.ts +1 -1
  98. package/dist/actions/util/axiosClient.js +0 -1
  99. package/dist/app.d.ts +2 -2
  100. package/package.json +2 -1
  101. package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.d.ts +0 -3
  102. package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.js +0 -43
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  ![Credal Logo](assets/credal-logo.svg)
2
2
 
3
3
  ## Credal.ai's Open Source Actions Framework
4
+
4
5
  Easily add custom actions for your Credal Copilots. Read more about Credal's Agent platform [here](https://www.credal.ai/products/ai-agent-platform).
5
6
 
6
7
  ## Adding or updating actions
@@ -24,12 +25,12 @@ const result = await runAction(
24
25
  "listConversations",
25
26
  "slack",
26
27
  { authToken: "xoxb-..." },
27
- {}
28
+ {},
28
29
  );
29
30
  ```
30
31
 
31
32
  ## Running a basic test for `runAction`
32
33
 
33
34
  ```
34
- npx ts-node -r tsconfig-paths/register --project tsconfig.json tests/testRunMathAction.ts
35
+ npm run test tests/testRunMathAction.ts
35
36
  ```
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import type { z } from "zod";
2
2
  import { type ActionFunction } from "./autogen/types";
3
3
  interface ActionFunctionComponents {
4
4
  fn: ActionFunction<any, any, any>;
@@ -8,6 +8,7 @@ const types_1 = require("./autogen/types");
8
8
  const callCopilot_1 = __importDefault(require("./providers/credal/callCopilot"));
9
9
  const validateAddress_1 = __importDefault(require("./providers/googlemaps/validateAddress"));
10
10
  const add_1 = __importDefault(require("./providers/math/add"));
11
+ const fillTemplate_1 = __importDefault(require("./providers/generic/fillTemplate"));
11
12
  const insertMongoDoc_1 = __importDefault(require("./providers/mongodb/insertMongoDoc"));
12
13
  const listConversations_1 = __importDefault(require("./providers/slack/listConversations"));
13
14
  const sendMessage_1 = __importDefault(require("./providers/slack/sendMessage"));
@@ -72,6 +73,13 @@ const updateDocument_1 = __importDefault(require("./providers/microsoft/updateDo
72
73
  const createDocument_1 = __importDefault(require("./providers/microsoft/createDocument"));
73
74
  const getDocument_1 = __importDefault(require("./providers/microsoft/getDocument"));
74
75
  exports.ActionMapper = {
76
+ generic: {
77
+ fillTemplateAction: {
78
+ fn: fillTemplate_1.default,
79
+ paramsSchema: types_1.genericFillTemplateActionParamsSchema,
80
+ outputSchema: types_1.genericFillTemplateActionOutputSchema,
81
+ },
82
+ },
75
83
  asana: {
76
84
  commentTask: {
77
85
  fn: commentAsanaTask_1.default,
@@ -1,4 +1,5 @@
1
1
  import { ActionTemplate } from "../../actions/parse";
2
+ export declare const genericFillTemplateActionDefinition: ActionTemplate;
2
3
  export declare const asanaCommentTaskDefinition: ActionTemplate;
3
4
  export declare const asanaCreateTaskDefinition: ActionTemplate;
4
5
  export declare const asanaUpdateTaskDefinition: ActionTemplate;
@@ -1,7 +1,33 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ashbyListCandidateNotesDefinition = exports.ashbySearchCandidatesDefinition = exports.ashbyListCandidatesDefinition = exports.ashbyAddCandidateToProjectDefinition = exports.ashbyGetCandidateInfoDefinition = 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.nwsGetForecastForLocationDefinition = exports.openstreetmapGetLatitudeLongitudeFromLocationDefinition = exports.snowflakeRunSnowflakeQueryDefinition = exports.snowflakeGetRowByFieldValueDefinition = exports.mongoInsertMongoDocDefinition = exports.xCreateShareXPostUrlDefinition = exports.linkedinCreateShareLinkedinPostUrlDefinition = exports.zendeskAssignTicketDefinition = exports.zendeskAddCommentToTicketDefinition = exports.zendeskUpdateTicketStatusDefinition = exports.zendeskGetTicketDetailsDefinition = exports.zendeskCreateZendeskTicketDefinition = exports.credalCallCopilotDefinition = exports.googlemapsNearbysearchRestaurantsDefinition = exports.googlemapsValidateAddressDefinition = 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 = void 0;
4
- exports.githubCreatePullRequestDefinition = exports.githubCreateBranchDefinition = exports.githubCreateOrUpdateFileDefinition = exports.microsoftGetDocumentDefinition = exports.microsoftMessageTeamsChannelDefinition = exports.microsoftMessageTeamsChatDefinition = exports.microsoftUpdateSpreadsheetDefinition = exports.microsoftUpdateDocumentDefinition = exports.microsoftCreateDocumentDefinition = exports.salesforceGetRecordDefinition = exports.salesforceGetSalesforceRecordsByQueryDefinition = exports.salesforceGenerateSalesReportDefinition = exports.salesforceCreateCaseDefinition = exports.salesforceUpdateRecordDefinition = exports.ashbyUpdateCandidateDefinition = exports.ashbyCreateCandidateDefinition = void 0;
3
+ exports.ashbySearchCandidatesDefinition = exports.ashbyListCandidatesDefinition = exports.ashbyAddCandidateToProjectDefinition = exports.ashbyGetCandidateInfoDefinition = 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.nwsGetForecastForLocationDefinition = exports.openstreetmapGetLatitudeLongitudeFromLocationDefinition = exports.snowflakeRunSnowflakeQueryDefinition = exports.snowflakeGetRowByFieldValueDefinition = exports.mongoInsertMongoDocDefinition = exports.xCreateShareXPostUrlDefinition = exports.linkedinCreateShareLinkedinPostUrlDefinition = exports.zendeskAssignTicketDefinition = exports.zendeskAddCommentToTicketDefinition = exports.zendeskUpdateTicketStatusDefinition = exports.zendeskGetTicketDetailsDefinition = exports.zendeskCreateZendeskTicketDefinition = exports.credalCallCopilotDefinition = exports.googlemapsNearbysearchRestaurantsDefinition = exports.googlemapsValidateAddressDefinition = 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.genericFillTemplateActionDefinition = void 0;
4
+ exports.githubCreatePullRequestDefinition = exports.githubCreateBranchDefinition = exports.githubCreateOrUpdateFileDefinition = exports.microsoftGetDocumentDefinition = exports.microsoftMessageTeamsChannelDefinition = exports.microsoftMessageTeamsChatDefinition = exports.microsoftUpdateSpreadsheetDefinition = exports.microsoftUpdateDocumentDefinition = exports.microsoftCreateDocumentDefinition = exports.salesforceGetRecordDefinition = exports.salesforceGetSalesforceRecordsByQueryDefinition = exports.salesforceGenerateSalesReportDefinition = exports.salesforceCreateCaseDefinition = exports.salesforceUpdateRecordDefinition = exports.ashbyUpdateCandidateDefinition = exports.ashbyCreateCandidateDefinition = exports.ashbyListCandidateNotesDefinition = void 0;
5
+ exports.genericFillTemplateActionDefinition = {
6
+ description: "Simple utility that takes a template and returns it without modification",
7
+ scopes: [],
8
+ parameters: {
9
+ type: "object",
10
+ required: ["template"],
11
+ properties: {
12
+ template: {
13
+ type: "string",
14
+ description: "The template string to be processed and returned",
15
+ },
16
+ },
17
+ },
18
+ output: {
19
+ type: "object",
20
+ required: ["result"],
21
+ properties: {
22
+ result: {
23
+ type: "string",
24
+ description: "The template string returned without modification",
25
+ },
26
+ },
27
+ },
28
+ name: "fillTemplateAction",
29
+ provider: "generic",
30
+ };
5
31
  exports.asanaCommentTaskDefinition = {
6
32
  description: "Comments on an Asana task with specified content",
7
33
  scopes: [],
@@ -62,6 +62,23 @@ export declare const AuthParamsSchema: z.ZodObject<{
62
62
  redirectUri?: string | undefined;
63
63
  }>;
64
64
  export type AuthParamsType = z.infer<typeof AuthParamsSchema>;
65
+ export declare const genericFillTemplateActionParamsSchema: z.ZodObject<{
66
+ template: z.ZodString;
67
+ }, "strip", z.ZodTypeAny, {
68
+ template: string;
69
+ }, {
70
+ template: string;
71
+ }>;
72
+ export type genericFillTemplateActionParamsType = z.infer<typeof genericFillTemplateActionParamsSchema>;
73
+ export declare const genericFillTemplateActionOutputSchema: z.ZodObject<{
74
+ result: z.ZodString;
75
+ }, "strip", z.ZodTypeAny, {
76
+ result: string;
77
+ }, {
78
+ result: string;
79
+ }>;
80
+ export type genericFillTemplateActionOutputType = z.infer<typeof genericFillTemplateActionOutputSchema>;
81
+ export type genericFillTemplateActionFunction = ActionFunction<genericFillTemplateActionParamsType, AuthParamsType, genericFillTemplateActionOutputType>;
65
82
  export declare const asanaCommentTaskParamsSchema: z.ZodObject<{
66
83
  taskId: z.ZodString;
67
84
  commentText: z.ZodString;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.linkedinCreateShareLinkedinPostUrlParamsSchema = exports.zendeskAssignTicketOutputSchema = exports.zendeskAssignTicketParamsSchema = exports.zendeskAddCommentToTicketOutputSchema = exports.zendeskAddCommentToTicketParamsSchema = exports.zendeskUpdateTicketStatusOutputSchema = exports.zendeskUpdateTicketStatusParamsSchema = exports.zendeskGetTicketDetailsOutputSchema = exports.zendeskGetTicketDetailsParamsSchema = exports.zendeskCreateZendeskTicketOutputSchema = exports.zendeskCreateZendeskTicketParamsSchema = exports.credalCallCopilotOutputSchema = exports.credalCallCopilotParamsSchema = exports.googlemapsNearbysearchRestaurantsOutputSchema = exports.googlemapsNearbysearchRestaurantsParamsSchema = exports.googlemapsValidateAddressOutputSchema = exports.googlemapsValidateAddressParamsSchema = 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.AuthParamsSchema = void 0;
4
- exports.ashbyListCandidateNotesParamsSchema = exports.ashbySearchCandidatesOutputSchema = exports.ashbySearchCandidatesParamsSchema = exports.ashbyListCandidatesOutputSchema = exports.ashbyListCandidatesParamsSchema = exports.ashbyAddCandidateToProjectOutputSchema = exports.ashbyAddCandidateToProjectParamsSchema = exports.ashbyGetCandidateInfoOutputSchema = exports.ashbyGetCandidateInfoParamsSchema = exports.ashbyCreateNoteOutputSchema = 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.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 = void 0;
5
- 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.salesforceGetRecordOutputSchema = exports.salesforceGetRecordParamsSchema = exports.salesforceGetSalesforceRecordsByQueryOutputSchema = exports.salesforceGetSalesforceRecordsByQueryParamsSchema = exports.salesforceGenerateSalesReportOutputSchema = exports.salesforceGenerateSalesReportParamsSchema = exports.salesforceCreateCaseOutputSchema = exports.salesforceCreateCaseParamsSchema = exports.salesforceUpdateRecordOutputSchema = exports.salesforceUpdateRecordParamsSchema = exports.ashbyUpdateCandidateOutputSchema = exports.ashbyUpdateCandidateParamsSchema = exports.ashbyCreateCandidateOutputSchema = exports.ashbyCreateCandidateParamsSchema = exports.ashbyListCandidateNotesOutputSchema = void 0;
3
+ exports.zendeskAssignTicketParamsSchema = exports.zendeskAddCommentToTicketOutputSchema = exports.zendeskAddCommentToTicketParamsSchema = exports.zendeskUpdateTicketStatusOutputSchema = exports.zendeskUpdateTicketStatusParamsSchema = exports.zendeskGetTicketDetailsOutputSchema = exports.zendeskGetTicketDetailsParamsSchema = exports.zendeskCreateZendeskTicketOutputSchema = exports.zendeskCreateZendeskTicketParamsSchema = exports.credalCallCopilotOutputSchema = exports.credalCallCopilotParamsSchema = exports.googlemapsNearbysearchRestaurantsOutputSchema = exports.googlemapsNearbysearchRestaurantsParamsSchema = exports.googlemapsValidateAddressOutputSchema = exports.googlemapsValidateAddressParamsSchema = 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.genericFillTemplateActionOutputSchema = exports.genericFillTemplateActionParamsSchema = exports.AuthParamsSchema = void 0;
4
+ exports.ashbySearchCandidatesParamsSchema = exports.ashbyListCandidatesOutputSchema = exports.ashbyListCandidatesParamsSchema = exports.ashbyAddCandidateToProjectOutputSchema = exports.ashbyAddCandidateToProjectParamsSchema = exports.ashbyGetCandidateInfoOutputSchema = exports.ashbyGetCandidateInfoParamsSchema = exports.ashbyCreateNoteOutputSchema = 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.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 = void 0;
5
+ 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.salesforceGetRecordOutputSchema = exports.salesforceGetRecordParamsSchema = exports.salesforceGetSalesforceRecordsByQueryOutputSchema = exports.salesforceGetSalesforceRecordsByQueryParamsSchema = exports.salesforceGenerateSalesReportOutputSchema = exports.salesforceGenerateSalesReportParamsSchema = exports.salesforceCreateCaseOutputSchema = exports.salesforceCreateCaseParamsSchema = exports.salesforceUpdateRecordOutputSchema = exports.salesforceUpdateRecordParamsSchema = exports.ashbyUpdateCandidateOutputSchema = exports.ashbyUpdateCandidateParamsSchema = exports.ashbyCreateCandidateOutputSchema = exports.ashbyCreateCandidateParamsSchema = exports.ashbyListCandidateNotesOutputSchema = exports.ashbyListCandidateNotesParamsSchema = exports.ashbySearchCandidatesOutputSchema = void 0;
6
6
  const zod_1 = require("zod");
7
7
  exports.AuthParamsSchema = zod_1.z.object({
8
8
  authToken: zod_1.z.string().optional(),
@@ -24,6 +24,12 @@ exports.AuthParamsSchema = zod_1.z.object({
24
24
  refreshToken: zod_1.z.string().optional(),
25
25
  redirectUri: zod_1.z.string().optional(),
26
26
  });
27
+ exports.genericFillTemplateActionParamsSchema = zod_1.z.object({
28
+ template: zod_1.z.string().describe("The template string to be processed and returned"),
29
+ });
30
+ exports.genericFillTemplateActionOutputSchema = zod_1.z.object({
31
+ result: zod_1.z.string().describe("The template string returned without modification"),
32
+ });
27
33
  exports.asanaCommentTaskParamsSchema = zod_1.z.object({
28
34
  taskId: zod_1.z.string().describe("Task gid the comment should be added to"),
29
35
  commentText: zod_1.z.string().describe("The comment text to be added"),
@@ -1,4 +1,4 @@
1
- import { ActionTemplate } from "../actions/parse";
1
+ import type { ActionTemplate } from "../actions/parse";
2
2
  export type ActionGroups = Record<string, {
3
3
  description: string;
4
4
  actions: ActionTemplate[];
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ACTION_GROUPS = void 0;
4
4
  const templates_1 = require("../actions/autogen/templates");
5
5
  exports.ACTION_GROUPS = {
6
+ GENERIC: {
7
+ description: "Generic utility actions",
8
+ actions: [templates_1.genericFillTemplateActionDefinition],
9
+ },
6
10
  ASANA: {
7
11
  description: "Actions for interacting with Asana",
8
12
  actions: [templates_1.asanaCommentTaskDefinition, templates_1.asanaCreateTaskDefinition, templates_1.asanaUpdateTaskDefinition],
@@ -1,3 +1,3 @@
1
- import { asanaCommentTaskFunction } from "../../autogen/types";
1
+ import type { asanaCommentTaskFunction } from "../../autogen/types";
2
2
  declare const commentAsanaTask: asanaCommentTaskFunction;
3
3
  export default commentAsanaTask;
@@ -1,3 +1,3 @@
1
- import { asanaCreateTaskFunction } from "../../autogen/types";
1
+ import type { asanaCreateTaskFunction } from "../../autogen/types";
2
2
  declare const createAsanaTask: asanaCreateTaskFunction;
3
3
  export default createAsanaTask;
@@ -1,3 +1,3 @@
1
- import { asanaUpdateTaskFunction } from "../../autogen/types";
1
+ import type { asanaUpdateTaskFunction } from "../../autogen/types";
2
2
  declare const updateAsanaTask: asanaUpdateTaskFunction;
3
3
  export default updateAsanaTask;
@@ -1,3 +1,3 @@
1
- import { ashbyAddCandidateToProjectFunction } from "../../autogen/types";
1
+ import type { ashbyAddCandidateToProjectFunction } from "../../autogen/types";
2
2
  declare const addCandidateToProject: ashbyAddCandidateToProjectFunction;
3
3
  export default addCandidateToProject;
@@ -1,3 +1,3 @@
1
- import { ashbyCreateCandidateFunction } from "../../autogen/types";
1
+ import type { ashbyCreateCandidateFunction } from "../../autogen/types";
2
2
  declare const createCandidate: ashbyCreateCandidateFunction;
3
3
  export default createCandidate;
@@ -1,3 +1,3 @@
1
- import { ashbyCreateNoteFunction } from "../../autogen/types";
1
+ import type { ashbyCreateNoteFunction } from "../../autogen/types";
2
2
  declare const createNote: ashbyCreateNoteFunction;
3
3
  export default createNote;
@@ -1,3 +1,3 @@
1
- import { ashbyGetCandidateInfoFunction } from "../../autogen/types";
1
+ import type { ashbyGetCandidateInfoFunction } from "../../autogen/types";
2
2
  declare const getCandidateInfo: ashbyGetCandidateInfoFunction;
3
3
  export default getCandidateInfo;
@@ -1,3 +1,3 @@
1
- import { ashbyListCandidateNotesFunction } from "../../autogen/types";
1
+ import type { ashbyListCandidateNotesFunction } from "../../autogen/types";
2
2
  declare const listCandidateNotes: ashbyListCandidateNotesFunction;
3
3
  export default listCandidateNotes;
@@ -1,3 +1,3 @@
1
- import { ashbyListCandidatesFunction } from "../../autogen/types";
1
+ import type { ashbyListCandidatesFunction } from "../../autogen/types";
2
2
  declare const listCandidates: ashbyListCandidatesFunction;
3
3
  export default listCandidates;
@@ -1,3 +1,3 @@
1
- import { ashbySearchCandidatesFunction } from "../../autogen/types";
1
+ import type { ashbySearchCandidatesFunction } from "../../autogen/types";
2
2
  declare const searchCandidates: ashbySearchCandidatesFunction;
3
3
  export default searchCandidates;
@@ -1,3 +1,3 @@
1
- import { ashbyUpdateCandidateFunction } from "../../autogen/types";
1
+ import type { ashbyUpdateCandidateFunction } from "../../autogen/types";
2
2
  declare const updateCandidate: ashbyUpdateCandidateFunction;
3
3
  export default updateCandidate;
@@ -1,3 +1,3 @@
1
- import { confluenceFetchPageContentFunction } from "../../autogen/types";
1
+ import type { confluenceFetchPageContentFunction } from "../../autogen/types";
2
2
  declare const confluenceFetchPageContent: confluenceFetchPageContentFunction;
3
3
  export default confluenceFetchPageContent;
@@ -1,3 +1,3 @@
1
- import { confluenceOverwritePageFunction } from "../../autogen/types";
1
+ import type { confluenceOverwritePageFunction } from "../../autogen/types";
2
2
  declare const confluenceOverwritePage: confluenceOverwritePageFunction;
3
3
  export default confluenceOverwritePage;
@@ -0,0 +1,3 @@
1
+ import { confluenceUpdatePageFunction } from "../../../actions/autogen/types";
2
+ declare const confluenceUpdatePage: confluenceUpdatePageFunction;
3
+ export default confluenceUpdatePage;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const axiosClient_1 = require("../../util/axiosClient");
13
+ function getConfluenceRequestConfig(baseUrl, username, apiToken) {
14
+ return {
15
+ baseURL: baseUrl,
16
+ headers: {
17
+ Accept: "application/json",
18
+ Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
19
+ },
20
+ };
21
+ }
22
+ const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
23
+ const { pageId, content, title } = params;
24
+ const { baseUrl, authToken, username } = authParams;
25
+ if (!baseUrl || !authToken || !username) {
26
+ throw new Error("Missing required authentication information");
27
+ }
28
+ const config = getConfluenceRequestConfig(baseUrl, username, authToken);
29
+ // Get current version number
30
+ const response = yield axiosClient_1.axiosClient.get(`/api/v2/pages/${pageId}`, config);
31
+ const currVersion = response.data.version.number;
32
+ const payload = {
33
+ id: pageId,
34
+ status: "current",
35
+ title,
36
+ body: {
37
+ representation: "storage",
38
+ value: content,
39
+ },
40
+ version: {
41
+ number: currVersion + 1,
42
+ },
43
+ };
44
+ yield axiosClient_1.axiosClient.put(`/api/v2/pages/${pageId}`, payload, config);
45
+ });
46
+ exports.default = confluenceUpdatePage;
@@ -1,3 +1,3 @@
1
- import { credalCallCopilotFunction } from "../../autogen/types";
1
+ import type { credalCallCopilotFunction } from "../../autogen/types";
2
2
  declare const callCopilot: credalCallCopilotFunction;
3
3
  export default callCopilot;
@@ -1,3 +1,3 @@
1
- import { finnhubGetBasicFinancialsFunction } from "../../autogen/types";
1
+ import type { finnhubGetBasicFinancialsFunction } from "../../autogen/types";
2
2
  declare const getBasicFinancials: finnhubGetBasicFinancialsFunction;
3
3
  export default getBasicFinancials;
@@ -1,3 +1,3 @@
1
- import { finnhubSymbolLookupFunction } from "../../autogen/types";
1
+ import type { finnhubSymbolLookupFunction } from "../../autogen/types";
2
2
  declare const symbolLookup: finnhubSymbolLookupFunction;
3
3
  export default symbolLookup;
@@ -1,3 +1,3 @@
1
- import { firecrawlScrapeTweetDataWithNitterFunction } from "../../autogen/types";
1
+ import type { firecrawlScrapeTweetDataWithNitterFunction } from "../../autogen/types";
2
2
  declare const scrapeTweetDataWithNitter: firecrawlScrapeTweetDataWithNitterFunction;
3
3
  export default scrapeTweetDataWithNitter;
@@ -1,3 +1,3 @@
1
- import { firecrawlScrapeUrlFunction } from "../../autogen/types";
1
+ import type { firecrawlScrapeUrlFunction } from "../../autogen/types";
2
2
  declare const scrapeUrl: firecrawlScrapeUrlFunction;
3
3
  export default scrapeUrl;
@@ -0,0 +1,3 @@
1
+ import type { genericFillTemplateActionFunction } from "../../autogen/types";
2
+ declare const fillTemplate: genericFillTemplateActionFunction;
3
+ export default fillTemplate;
@@ -0,0 +1,17 @@
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 fillTemplate = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, }) {
13
+ return {
14
+ result: params.template,
15
+ };
16
+ });
17
+ exports.default = fillTemplate;
@@ -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;
@@ -1,4 +1,4 @@
1
- import { githubCreateBranchFunction } from "../../autogen/types";
1
+ import type { githubCreateBranchFunction } from "../../autogen/types";
2
2
  /**
3
3
  * Creates a new branch in a GitHub repository
4
4
  */
@@ -1,4 +1,4 @@
1
- import { githubCreateOrUpdateFileFunction } from "../../autogen/types";
1
+ import type { githubCreateOrUpdateFileFunction } from "../../autogen/types";
2
2
  /**
3
3
  * Creates or updates a file in a GitHub repository
4
4
  */
@@ -1,4 +1,4 @@
1
- import { githubCreatePullRequestFunction } from "../../autogen/types";
1
+ import type { githubCreatePullRequestFunction } from "../../autogen/types";
2
2
  /**
3
3
  * Creates a pull request in a GitHub repository
4
4
  */
@@ -1,4 +1,4 @@
1
- import { googleOauthCreateNewGoogleDocFunction } from "../../autogen/types";
1
+ import type { googleOauthCreateNewGoogleDocFunction } from "../../autogen/types";
2
2
  /**
3
3
  * Creates a new Google Doc document using OAuth authentication
4
4
  */
@@ -1,4 +1,4 @@
1
- import { googleOauthCreatePresentationFunction } from "../../autogen/types";
1
+ import type { googleOauthCreatePresentationFunction } from "../../autogen/types";
2
2
  /**
3
3
  * Creates a new Google Slides presentation using OAuth authentication
4
4
  */
@@ -1,4 +1,4 @@
1
- import { googleOauthCreateSpreadsheetFunction } from "../../autogen/types";
1
+ import type { googleOauthCreateSpreadsheetFunction } from "../../autogen/types";
2
2
  /**
3
3
  * Creates a new Google Spreadsheet using OAuth authentication
4
4
  */
@@ -1,4 +1,4 @@
1
- import { googleOauthScheduleCalendarMeetingFunction } from "../../autogen/types";
1
+ import type { googleOauthScheduleCalendarMeetingFunction } from "../../autogen/types";
2
2
  /**
3
3
  * Creates a new Google calendar event using OAuth authentication
4
4
  */
@@ -1,4 +1,4 @@
1
- import { googleOauthUpdateDocFunction } from "../../autogen/types";
1
+ import type { googleOauthUpdateDocFunction } from "../../autogen/types";
2
2
  /**
3
3
  * Updates an existing Google Docs document using OAuth authentication with batch requests
4
4
  * https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/batchUpdate
@@ -1,4 +1,4 @@
1
- import { googleOauthUpdatePresentationFunction } from "../../autogen/types";
1
+ import type { googleOauthUpdatePresentationFunction } from "../../autogen/types";
2
2
  /**
3
3
  * Updates an existing Google Slides presentation using OAuth authentication with batch requests
4
4
  * https://developers.google.com/slides/api/reference/rest/v1/presentations/batchUpdate
@@ -1,4 +1,4 @@
1
- import { googleOauthUpdateSpreadsheetFunction } from "../../autogen/types";
1
+ import type { googleOauthUpdateSpreadsheetFunction } from "../../autogen/types";
2
2
  /**
3
3
  * Update a Google Spreadsheet using OAuth authentication
4
4
  * https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/batchUpdate
@@ -0,0 +1,3 @@
1
+ import { googlemapsNearbysearchFunction } from "../../autogen/types";
2
+ declare const nearbysearch: googlemapsNearbysearchFunction;
3
+ export default nearbysearch;