@credal/actions 0.2.31 → 0.2.33

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 (39) hide show
  1. package/dist/actions/actionMapper.js +57 -43
  2. package/dist/actions/autogen/definitions.d.ts +5 -0
  3. package/dist/actions/autogen/definitions.js +132 -0
  4. package/dist/actions/autogen/templates.d.ts +12 -0
  5. package/dist/actions/autogen/templates.js +647 -0
  6. package/dist/actions/autogen/types.d.ts +535 -0
  7. package/dist/actions/autogen/types.js +188 -0
  8. package/dist/actions/definitions.js +35 -0
  9. package/dist/actions/groups.js +16 -1
  10. package/dist/actions/invokeMapper.d.ts +9 -0
  11. package/dist/actions/invokeMapper.js +33 -0
  12. package/dist/actions/providers/confluence/updatePage.js +9 -13
  13. package/dist/actions/providers/google-oauth/getSheetValue.d.ts +3 -0
  14. package/dist/actions/providers/google-oauth/getSheetValue.js +50 -0
  15. package/dist/actions/providers/google-oauth/getSheetValues.d.ts +3 -0
  16. package/dist/actions/providers/google-oauth/getSheetValues.js +50 -0
  17. package/dist/actions/providers/google-oauth/listGmailThreads.d.ts +3 -0
  18. package/dist/actions/providers/google-oauth/listGmailThreads.js +98 -0
  19. package/dist/actions/providers/google-oauth/searchGmailMessages.d.ts +3 -0
  20. package/dist/actions/providers/google-oauth/searchGmailMessages.js +91 -0
  21. package/dist/actions/providers/googlemaps/nearbysearch.d.ts +3 -0
  22. package/dist/actions/providers/googlemaps/nearbysearch.js +96 -0
  23. package/dist/actions/providers/jira/createServiceDeskRequest.d.ts +3 -0
  24. package/dist/actions/providers/jira/createServiceDeskRequest.js +54 -0
  25. package/dist/actions/providers/jira/createTicket.d.ts +3 -0
  26. package/dist/actions/providers/jira/createTicket.js +34 -0
  27. package/dist/actions/providers/jira/getServiceDesks.d.ts +3 -0
  28. package/dist/actions/providers/jira/getServiceDesks.js +101 -0
  29. package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.d.ts +3 -0
  30. package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.js +43 -0
  31. package/dist/actions/providers/slack/listConversations.d.ts +1 -1
  32. package/dist/actions/providers/slack/list_conversations.d.ts +3 -0
  33. package/dist/actions/providers/slack/list_conversations.js +60 -0
  34. package/dist/actions/providers/slack/summarizeChannel.d.ts +3 -0
  35. package/dist/actions/providers/slack/summarizeChannel.js +51 -0
  36. package/dist/actions/schema.js +6 -0
  37. package/dist/actions/types.js +2 -0
  38. package/dist/main.js +11 -0
  39. package/package.json +1 -1
@@ -7,6 +7,7 @@ export var ProviderName;
7
7
  ProviderName["MATH"] = "math";
8
8
  ProviderName["CONFLUENCE"] = "confluence";
9
9
  ProviderName["JIRA"] = "jira";
10
+ ProviderName["JIRAORG"] = "jiraOrg";
10
11
  ProviderName["KANDJI"] = "kandji";
11
12
  ProviderName["GOOGLEMAPS"] = "googlemaps";
12
13
  ProviderName["BING"] = "bing";
@@ -301,6 +302,54 @@ export const jiraCreateJiraTicketParamsSchema = z.object({
301
302
  export const jiraCreateJiraTicketOutputSchema = z.object({
302
303
  ticketUrl: z.string().describe("The url to the created Jira Ticket"),
303
304
  });
305
+ export const jiraGetServiceDesksParamsSchema = z.object({});
306
+ export const jiraGetServiceDesksOutputSchema = z.object({
307
+ success: z.boolean().describe("Whether the service desks were retrieved successfully"),
308
+ error: z.string().describe("The error that occurred if the service desks were not retrieved successfully").optional(),
309
+ serviceDesks: z
310
+ .array(z
311
+ .object({
312
+ id: z.string().describe("The ID of the service desk").optional(),
313
+ projectId: z.string().describe("The ID of the project").optional(),
314
+ projectKey: z.string().describe("The key of the project").optional(),
315
+ projectName: z.string().describe("The name of the service desk").optional(),
316
+ requestTypes: z
317
+ .array(z
318
+ .object({
319
+ id: z.string().describe("The ID of the request type").optional(),
320
+ name: z.string().describe("The name of the request type").optional(),
321
+ description: z.string().describe("The description of the request type").optional(),
322
+ issueTypeId: z.string().describe("The ID of the issue type").optional(),
323
+ portalId: z.string().describe("The ID of the customer portal").optional(),
324
+ helpText: z.string().describe("The help text for the request type").optional(),
325
+ serviceDeskId: z.string().describe("The ID of the service desk").optional(),
326
+ canCreateRequest: z.boolean().describe("Whether the request type can be created").optional(),
327
+ })
328
+ .describe("A request type"))
329
+ .describe("The list of request types")
330
+ .optional(),
331
+ })
332
+ .describe("A service desk"))
333
+ .describe("The list of service desks")
334
+ .optional(),
335
+ });
336
+ export const jiraCreateServiceDeskRequestParamsSchema = z.object({
337
+ serviceDeskId: z.string().describe("The ID of the service desk to create the request in"),
338
+ requestTypeId: z.string().describe("The ID of the request type to use for the new request"),
339
+ summary: z.string().describe("The summary of the new service desk request"),
340
+ description: z.string().describe("The description for the new service desk request"),
341
+ reporter: z
342
+ .string()
343
+ .describe("The email address of the person reporting the issue (for raising on behalf of)")
344
+ .optional(),
345
+ });
346
+ export const jiraCreateServiceDeskRequestOutputSchema = z.object({
347
+ success: z.boolean().describe("Whether the request was created successfully"),
348
+ error: z.string().describe("The error that occurred if the request was not created successfully").optional(),
349
+ issueKey: z.string().describe("The Jira issue key of the created request").optional(),
350
+ webLink: z.string().describe("The link to the customer portal request, if available").optional(),
351
+ currentStatus: z.string().describe("The current status of the created request").optional(),
352
+ });
304
353
  export const jiraGetJiraTicketDetailsParamsSchema = z.object({
305
354
  projectKey: z.string().describe("The key for the project"),
306
355
  issueId: z.string().describe("The ID of the ticket"),
@@ -353,6 +402,145 @@ export const jiraGetJiraIssuesByQueryOutputSchema = z.object({
353
402
  records: z.array(z.record(z.string()).describe("An issue from Jira")).describe("The retrieved records").optional(),
354
403
  error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
355
404
  });
405
+ export const jiraOrgAssignJiraTicketParamsSchema = z.object({
406
+ projectKey: z.string().describe("The key for the project you want to add it to"),
407
+ assignee: z.string().describe("The assignee for the ticket, userID or email"),
408
+ issueId: z.string().describe("The issue ID associated with the ticket to be assigned/re-assigned"),
409
+ });
410
+ export const jiraOrgAssignJiraTicketOutputSchema = z.object({
411
+ success: z.boolean().describe("Whether the ticket was successfully assigned/reassigned"),
412
+ error: z
413
+ .string()
414
+ .describe("The error that occurred if the ticket was not successfully assigned/reassigned")
415
+ .optional(),
416
+ ticketUrl: z.string().describe("The url to the newly assigned/reassigned Jira ticket").optional(),
417
+ });
418
+ export const jiraOrgCommentJiraTicketParamsSchema = z.object({
419
+ projectKey: z.string().describe("The key for the project"),
420
+ issueId: z.string().describe("The issue ID associated with the ticket to be commented on"),
421
+ comment: z.string().describe("The text to be commented on the ticket"),
422
+ });
423
+ export const jiraOrgCommentJiraTicketOutputSchema = z.object({
424
+ success: z.boolean().describe("Whether the comment was sent successfully"),
425
+ error: z.string().describe("The error that occurred if the comment was not sent successfully").optional(),
426
+ commentUrl: z.string().describe("The url to the created Jira comment").optional(),
427
+ });
428
+ export const jiraOrgCreateJiraTicketParamsSchema = z.object({
429
+ projectKey: z.string().describe("The key for the project you want to add it to"),
430
+ summary: z.string().describe("The summary of the new ticket"),
431
+ description: z.string().describe("The description for the new ticket"),
432
+ issueType: z.string().describe("The issue type of the new ticket. Should be Epic, Story, Task, Bug, Sub-task, etc."),
433
+ reporter: z.string().describe("The reporter for the new ticket creation").optional(),
434
+ assignee: z.string().describe("The assignee for the new ticket creation").optional(),
435
+ customFields: z
436
+ .object({})
437
+ .catchall(z.any())
438
+ .describe("Custom fields to be set on the create ticket request")
439
+ .optional(),
440
+ });
441
+ export const jiraOrgCreateJiraTicketOutputSchema = z.object({
442
+ ticketUrl: z.string().describe("The url to the created Jira Ticket"),
443
+ });
444
+ export const jiraOrgGetServiceDesksParamsSchema = z.object({});
445
+ export const jiraOrgGetServiceDesksOutputSchema = z.object({
446
+ success: z.boolean().describe("Whether the service desks were retrieved successfully"),
447
+ error: z.string().describe("The error that occurred if the service desks were not retrieved successfully").optional(),
448
+ serviceDesks: z
449
+ .array(z
450
+ .object({
451
+ id: z.string().describe("The ID of the service desk").optional(),
452
+ projectId: z.string().describe("The ID of the project").optional(),
453
+ projectKey: z.string().describe("The key of the project").optional(),
454
+ projectName: z.string().describe("The name of the service desk").optional(),
455
+ requestTypes: z
456
+ .array(z
457
+ .object({
458
+ id: z.string().describe("The ID of the request type").optional(),
459
+ name: z.string().describe("The name of the request type").optional(),
460
+ description: z.string().describe("The description of the request type").optional(),
461
+ issueTypeId: z.string().describe("The ID of the issue type").optional(),
462
+ portalId: z.string().describe("The ID of the customer portal").optional(),
463
+ helpText: z.string().describe("The help text for the request type").optional(),
464
+ serviceDeskId: z.string().describe("The ID of the service desk").optional(),
465
+ canCreateRequest: z.boolean().describe("Whether the request type can be created").optional(),
466
+ })
467
+ .describe("A request type"))
468
+ .describe("The list of request types")
469
+ .optional(),
470
+ })
471
+ .describe("A service desk"))
472
+ .describe("The list of service desks")
473
+ .optional(),
474
+ });
475
+ export const jiraOrgCreateServiceDeskRequestParamsSchema = z.object({
476
+ serviceDeskId: z.string().describe("The ID of the service desk to create the request in"),
477
+ requestTypeId: z.string().describe("The ID of the request type to use for the new request"),
478
+ summary: z.string().describe("The summary of the new service desk request"),
479
+ description: z.string().describe("The description for the new service desk request"),
480
+ reporter: z
481
+ .string()
482
+ .describe("The email address of the person reporting the issue (for raising on behalf of)")
483
+ .optional(),
484
+ });
485
+ export const jiraOrgCreateServiceDeskRequestOutputSchema = z.object({
486
+ success: z.boolean().describe("Whether the request was created successfully"),
487
+ error: z.string().describe("The error that occurred if the request was not created successfully").optional(),
488
+ issueKey: z.string().describe("The Jira issue key of the created request").optional(),
489
+ webLink: z.string().describe("The link to the customer portal request, if available").optional(),
490
+ currentStatus: z.string().describe("The current status of the created request").optional(),
491
+ });
492
+ export const jiraOrgGetJiraTicketDetailsParamsSchema = z.object({
493
+ projectKey: z.string().describe("The key for the project"),
494
+ issueId: z.string().describe("The ID of the ticket"),
495
+ });
496
+ export const jiraOrgGetJiraTicketDetailsOutputSchema = z.object({
497
+ success: z.boolean().describe("Whether the status was updated successfully"),
498
+ error: z.string().describe("The error that occurred if the retrieval was unsuccessful").optional(),
499
+ data: z.object({}).catchall(z.any()).describe("The data of the Jira ticket").optional(),
500
+ });
501
+ export const jiraOrgGetJiraTicketHistoryParamsSchema = z.object({
502
+ projectKey: z.string().describe("The key for the project"),
503
+ issueId: z.string().describe("The ID of the ticket"),
504
+ });
505
+ export const jiraOrgGetJiraTicketHistoryOutputSchema = z.object({
506
+ success: z.boolean().describe("Whether the status was updated successfully"),
507
+ error: z.string().describe("The error that occurred if the retrieval was unsuccessful").optional(),
508
+ history: z.array(z.any()).describe("The history data of the Jira ticket").optional(),
509
+ });
510
+ export const jiraOrgUpdateJiraTicketDetailsParamsSchema = z.object({
511
+ projectKey: z.string().describe("The key for the project you want to add it to"),
512
+ issueId: z.string().describe("The issue ID associated with the ticket to be updated"),
513
+ summary: z.string().describe("The updated summary").optional(),
514
+ description: z.string().describe("The updated description").optional(),
515
+ issueType: z.string().describe("The updated issue type").optional(),
516
+ customFields: z
517
+ .object({})
518
+ .catchall(z.any())
519
+ .describe("Custom fields to be set on the update ticket request")
520
+ .optional(),
521
+ });
522
+ export const jiraOrgUpdateJiraTicketDetailsOutputSchema = z.object({
523
+ ticketUrl: z.string().describe("The url to the Jira ticket"),
524
+ });
525
+ export const jiraOrgUpdateJiraTicketStatusParamsSchema = z.object({
526
+ projectKey: z.string().describe("The key for the project you want to add it to"),
527
+ issueId: z.string().describe("The issue ID associated with the ticket"),
528
+ status: z.string().describe('The status the ticket should be changed to (eg "In Progress", "Closed")'),
529
+ });
530
+ export const jiraOrgUpdateJiraTicketStatusOutputSchema = z.object({
531
+ success: z.boolean().describe("Whether the status was updated successfully"),
532
+ error: z.string().describe("The error that occurred if the status was not updated successfully").optional(),
533
+ ticketUrl: z.string().describe("The url to the Jira ticket").optional(),
534
+ });
535
+ export const jiraOrgGetJiraIssuesByQueryParamsSchema = z.object({
536
+ query: z.string().describe("The JQL query to execute"),
537
+ limit: z.number().describe("The maximum number of records to retrieve").optional(),
538
+ });
539
+ export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
540
+ success: z.boolean().describe("Whether the records were successfully retrieved"),
541
+ records: z.array(z.record(z.string()).describe("An issue from Jira")).describe("The retrieved records").optional(),
542
+ error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
543
+ });
356
544
  export const kandjiGetFVRecoveryKeyForDeviceParamsSchema = z.object({
357
545
  userEmail: z.string().describe("The email of the user requesting the recovery key"),
358
546
  subdomain: z.string().describe("The subdomain of the Kandji account"),
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mathAddDefinition = exports.slackSendMessageDefinition = void 0;
4
+ exports.slackSendMessageDefinition = {
5
+ name: "send_message",
6
+ description: "Sends a message to a Slack channel",
7
+ parameters: {
8
+ "channel": {
9
+ "type": "string",
10
+ "description": "The Slack channel to send the message to (e.g., \\#general, \\#alerts)",
11
+ "required": true
12
+ },
13
+ "message": {
14
+ "type": "string",
15
+ "description": "The message content to send to Slack. Can include markdown formatting.",
16
+ "required": true
17
+ }
18
+ }
19
+ };
20
+ exports.mathAddDefinition = {
21
+ name: "add",
22
+ description: "Adds two numbers together",
23
+ parameters: {
24
+ "a": {
25
+ "type": "number",
26
+ "description": "The first number to add",
27
+ "required": true
28
+ },
29
+ "b": {
30
+ "type": "number",
31
+ "description": "The second number to add",
32
+ "required": true
33
+ }
34
+ }
35
+ };
@@ -1,4 +1,4 @@
1
- import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, } from "./autogen/templates.js";
1
+ import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, jiraGetServiceDesksDefinition, jiraCreateServiceDeskRequestDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, jiraOrgAssignJiraTicketDefinition, jiraOrgCreateJiraTicketDefinition, jiraOrgCommentJiraTicketDefinition, jiraOrgGetJiraTicketDetailsDefinition, jiraOrgGetJiraTicketHistoryDefinition, jiraOrgUpdateJiraTicketDetailsDefinition, jiraOrgUpdateJiraTicketStatusDefinition, jiraOrgGetJiraIssuesByQueryDefinition, } from "./autogen/templates.js";
2
2
  export const ACTION_GROUPS = {
3
3
  GENERIC: {
4
4
  description: "Generic utility actions",
@@ -100,6 +100,21 @@ export const ACTION_GROUPS = {
100
100
  jiraUpdateJiraTicketDetailsDefinition,
101
101
  jiraUpdateJiraTicketStatusDefinition,
102
102
  jiraGetJiraIssuesByQueryDefinition,
103
+ jiraGetServiceDesksDefinition,
104
+ jiraCreateServiceDeskRequestDefinition,
105
+ ],
106
+ },
107
+ JIRA_ORG_ACTIONS: {
108
+ description: "Action for interacting with Jira tickets",
109
+ actions: [
110
+ jiraOrgAssignJiraTicketDefinition,
111
+ jiraOrgCreateJiraTicketDefinition,
112
+ jiraOrgCommentJiraTicketDefinition,
113
+ jiraOrgGetJiraTicketDetailsDefinition,
114
+ jiraOrgGetJiraTicketHistoryDefinition,
115
+ jiraOrgUpdateJiraTicketDetailsDefinition,
116
+ jiraOrgUpdateJiraTicketStatusDefinition,
117
+ jiraOrgGetJiraIssuesByQueryDefinition,
103
118
  ],
104
119
  },
105
120
  OPENSTREETMAP_GET_LATITUDE_LONGITUDE_FROM_LOCATION: {
@@ -0,0 +1,9 @@
1
+ import { type ActionFunction } from "./autogen/types";
2
+ import { z } from "zod";
3
+ interface ActionFunctionComponents {
4
+ fn: ActionFunction<any, any, any>;
5
+ paramsSchema: z.ZodSchema;
6
+ outputSchema: z.ZodSchema;
7
+ }
8
+ export declare const FunctionMapper: Record<string, Record<string, ActionFunctionComponents>>;
9
+ export {};
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.FunctionMapper = void 0;
7
+ const add_1 = __importDefault(require("./providers/math/add"));
8
+ const list_conversations_1 = __importDefault(require("./providers/slack/list_conversations"));
9
+ const updatePage_1 = __importDefault(require("./providers/confluence/updatePage"));
10
+ const types_1 = require("./autogen/types");
11
+ exports.FunctionMapper = {
12
+ math: {
13
+ add: {
14
+ fn: add_1.default,
15
+ paramsSchema: types_1.mathAddParamsSchema,
16
+ outputSchema: types_1.mathAddOutputSchema,
17
+ },
18
+ },
19
+ slack: {
20
+ listConversations: {
21
+ fn: list_conversations_1.default,
22
+ paramsSchema: types_1.slackListConversationsParamsSchema,
23
+ outputSchema: types_1.slackListConversationsOutputSchema,
24
+ },
25
+ },
26
+ confluence: {
27
+ updatePage: {
28
+ fn: updatePage_1.default,
29
+ paramsSchema: types_1.confluenceUpdatePageParamsSchema,
30
+ outputSchema: types_1.confluenceUpdatePageOutputSchema,
31
+ },
32
+ },
33
+ };
@@ -8,30 +8,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
11
  Object.defineProperty(exports, "__esModule", { value: true });
15
- const 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
23
  const { pageId, username, content, title } = params;
29
24
  const { baseUrl, authToken } = authParams;
30
- const api = getConfluenceApi(baseUrl, username, authToken);
25
+ const config = getConfluenceRequestConfig(baseUrl, username, authToken);
31
26
  // Get current version number
32
- const response = yield api.get(`/api/v2/pages/${pageId}`);
27
+ const response = yield axiosClient_1.axiosClient.get(`/api/v2/pages/${pageId}`, config);
33
28
  const currVersion = response.data.version.number;
34
- yield api.put(`/api/v2/pages/${pageId}`, {
29
+ const payload = {
35
30
  id: pageId,
36
31
  status: "current",
37
32
  title,
@@ -42,6 +37,7 @@ const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* (
42
37
  version: {
43
38
  number: currVersion + 1,
44
39
  },
45
- });
40
+ };
41
+ yield axiosClient_1.axiosClient.put(`/api/v2/pages/${pageId}`, payload, config);
46
42
  });
47
43
  exports.default = confluenceUpdatePage;
@@ -0,0 +1,3 @@
1
+ import type { googleOauthGetSheetValuesFunction } from "../../autogen/types.js";
2
+ declare const getSheetValues: googleOauthGetSheetValuesFunction;
3
+ export default getSheetValues;
@@ -0,0 +1,50 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { axiosClient } from "../../util/axiosClient.js";
11
+ import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
12
+ const getSheetValues = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
13
+ const { authToken } = authParams;
14
+ const { spreadsheetId, ranges } = params;
15
+ if (!authToken) {
16
+ return { success: false, error: MISSING_AUTH_TOKEN };
17
+ }
18
+ try {
19
+ const url = new URL(`https://sheets.googleapis.com/v4/spreadsheets/${encodeURIComponent(spreadsheetId)}/values:batchGet`);
20
+ // Add ranges as query parameters if provided
21
+ if (ranges && ranges.length > 0) {
22
+ ranges.forEach(range => {
23
+ url.searchParams.append("ranges", range);
24
+ });
25
+ }
26
+ const response = yield axiosClient.get(url.toString(), {
27
+ headers: { Authorization: `Bearer ${authToken}` },
28
+ });
29
+ const { valueRanges } = response.data;
30
+ // Transform the response to match our schema
31
+ const transformedValueRanges = valueRanges === null || valueRanges === void 0 ? void 0 : valueRanges.map((vr) => {
32
+ var _a;
33
+ return ({
34
+ range: vr.range,
35
+ values: ((_a = vr.values) === null || _a === void 0 ? void 0 : _a.flatMap(row => row.map(cell => ({ value: cell != null ? String(cell) : undefined })))) || [],
36
+ });
37
+ });
38
+ return {
39
+ success: true,
40
+ valueRanges: transformedValueRanges,
41
+ };
42
+ }
43
+ catch (error) {
44
+ return {
45
+ success: false,
46
+ error: error instanceof Error ? error.message : "Unknown error",
47
+ };
48
+ }
49
+ });
50
+ export default getSheetValues;
@@ -0,0 +1,3 @@
1
+ import type { googleOauthGetSheetValuesFunction } from "../../autogen/types.js";
2
+ declare const getSheetValues: googleOauthGetSheetValuesFunction;
3
+ export default getSheetValues;
@@ -0,0 +1,50 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { axiosClient } from "../../util/axiosClient.js";
11
+ import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
12
+ const getSheetValues = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
13
+ const { authToken } = authParams;
14
+ const { spreadsheetId, ranges } = params;
15
+ if (!authToken) {
16
+ return { success: false, error: MISSING_AUTH_TOKEN };
17
+ }
18
+ try {
19
+ const url = new URL(`https://sheets.googleapis.com/v4/spreadsheets/${encodeURIComponent(spreadsheetId)}/values:batchGet`);
20
+ // Add ranges as query parameters if provided
21
+ if (ranges && ranges.length > 0) {
22
+ ranges.forEach(range => {
23
+ url.searchParams.append("ranges", range);
24
+ });
25
+ }
26
+ const response = yield axiosClient.get(url.toString(), {
27
+ headers: { Authorization: `Bearer ${authToken}` },
28
+ });
29
+ const { valueRanges } = response.data;
30
+ // Transform the response to match our schema
31
+ const transformedValueRanges = valueRanges === null || valueRanges === void 0 ? void 0 : valueRanges.map((vr) => {
32
+ var _a;
33
+ return ({
34
+ range: vr.range,
35
+ values: ((_a = vr.values) === null || _a === void 0 ? void 0 : _a.flatMap(row => row.map(cell => ({ value: cell != null ? String(cell) : undefined })))) || [],
36
+ });
37
+ });
38
+ return {
39
+ success: true,
40
+ valueRanges: transformedValueRanges,
41
+ };
42
+ }
43
+ catch (error) {
44
+ return {
45
+ success: false,
46
+ error: error instanceof Error ? error.message : "Unknown error",
47
+ };
48
+ }
49
+ });
50
+ export default getSheetValues;
@@ -0,0 +1,3 @@
1
+ import type { googleOauthListGmailThreadsFunction } from "../../autogen/types";
2
+ declare const listGmailThreads: googleOauthListGmailThreadsFunction;
3
+ export default listGmailThreads;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const axiosClient_1 = require("../../util/axiosClient");
13
+ const missingAuthConstants_1 = require("../../util/missingAuthConstants");
14
+ const decodeMessage_1 = require("./utils/decodeMessage");
15
+ const listGmailThreads = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
16
+ if (!authParams.authToken) {
17
+ return { success: false, error: missingAuthConstants_1.MISSING_AUTH_TOKEN, threads: [] };
18
+ }
19
+ const { query, maxResults } = params;
20
+ const allThreads = [];
21
+ const errorMessages = [];
22
+ const max = maxResults !== null && maxResults !== void 0 ? maxResults : 100;
23
+ let fetched = 0;
24
+ let pageToken = undefined;
25
+ try {
26
+ while (fetched < max) {
27
+ const url = `https://gmail.googleapis.com/gmail/v1/users/me/threads?q=${encodeURIComponent(query)}` +
28
+ (pageToken ? `&pageToken=${encodeURIComponent(pageToken)}` : "") +
29
+ `&maxResults=${Math.min(100, max - fetched)}`;
30
+ const listRes = yield axiosClient_1.axiosClient.get(url, {
31
+ headers: {
32
+ Authorization: `Bearer ${authParams.authToken}`,
33
+ },
34
+ });
35
+ const { threads: threadList = [], nextPageToken } = listRes.data;
36
+ if (!Array.isArray(threadList) || threadList.length === 0)
37
+ break;
38
+ const remaining = max - allThreads.length;
39
+ const batch = threadList.slice(0, remaining);
40
+ const results = yield Promise.all(batch.map((thread) => __awaiter(void 0, void 0, void 0, function* () {
41
+ try {
42
+ const threadRes = yield axiosClient_1.axiosClient.get(`https://gmail.googleapis.com/gmail/v1/users/me/threads/${thread.id}?format=full`, {
43
+ headers: {
44
+ Authorization: `Bearer ${authParams.authToken}`,
45
+ },
46
+ });
47
+ const { id, historyId, messages } = threadRes.data;
48
+ return {
49
+ id,
50
+ historyId,
51
+ messages: Array.isArray(messages)
52
+ ? messages.map(msg => {
53
+ const { id, threadId, snippet, labelIds, internalDate } = msg;
54
+ const emailBody = (0, decodeMessage_1.getEmailContent)(msg) || "";
55
+ return {
56
+ id,
57
+ threadId,
58
+ snippet,
59
+ labelIds,
60
+ internalDate,
61
+ emailBody,
62
+ };
63
+ })
64
+ : [],
65
+ };
66
+ }
67
+ catch (err) {
68
+ errorMessages.push(err instanceof Error ? err.message : "Failed to fetch thread details");
69
+ return {
70
+ id: thread.id,
71
+ snippet: "",
72
+ historyId: "",
73
+ messages: [],
74
+ error: err instanceof Error ? err.message : "Failed to fetch thread details",
75
+ };
76
+ }
77
+ })));
78
+ allThreads.push(...results);
79
+ fetched = allThreads.length;
80
+ if (!nextPageToken || allThreads.length >= max)
81
+ break;
82
+ pageToken = nextPageToken;
83
+ }
84
+ return {
85
+ success: errorMessages.length === 0,
86
+ threads: allThreads,
87
+ error: errorMessages.join("; "),
88
+ };
89
+ }
90
+ catch (error) {
91
+ return {
92
+ success: false,
93
+ error: error instanceof Error ? error.message : "Unknown error listing Gmail threads",
94
+ threads: [],
95
+ };
96
+ }
97
+ });
98
+ exports.default = listGmailThreads;
@@ -0,0 +1,3 @@
1
+ import type { googleOauthSearchGmailMessagesFunction } from "../../autogen/types";
2
+ declare const searchGmailMessages: googleOauthSearchGmailMessagesFunction;
3
+ export default searchGmailMessages;