@credal/actions 0.2.179 → 0.2.181
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -0
- package/dist/actions/actionMapper.js +8 -1
- package/dist/actions/autogen/definitions.d.ts +5 -0
- package/dist/actions/autogen/definitions.js +132 -0
- package/dist/actions/autogen/templates.d.ts +1 -0
- package/dist/actions/autogen/templates.js +107 -48
- package/dist/actions/autogen/types.d.ts +50 -11
- package/dist/actions/autogen/types.js +71 -41
- package/dist/actions/definitions.js +35 -0
- package/dist/actions/groups.js +11 -1
- package/dist/actions/invokeMapper.d.ts +9 -0
- package/dist/actions/invokeMapper.js +33 -0
- package/dist/actions/providers/confluence/updatePage.d.ts +3 -0
- package/dist/actions/providers/confluence/updatePage.js +43 -0
- package/dist/actions/providers/credal/callCopilot.d.ts +3 -0
- package/dist/actions/providers/credal/callCopilot.js +36 -0
- package/dist/actions/providers/google-oauth/appendRowsToSpreadsheet.d.ts +7 -0
- package/dist/actions/providers/google-oauth/appendRowsToSpreadsheet.js +61 -0
- package/dist/actions/providers/google-oauth/getSheetValue.d.ts +3 -0
- package/dist/actions/providers/google-oauth/getSheetValue.js +50 -0
- package/dist/actions/providers/google-oauth/getSheetValues.d.ts +3 -0
- package/dist/actions/providers/google-oauth/getSheetValues.js +50 -0
- package/dist/actions/providers/google-oauth/listGmailThreads.d.ts +3 -0
- package/dist/actions/providers/google-oauth/listGmailThreads.js +98 -0
- package/dist/actions/providers/google-oauth/searchGmailMessages.d.ts +3 -0
- package/dist/actions/providers/google-oauth/searchGmailMessages.js +91 -0
- package/dist/actions/providers/googlemaps/nearbysearch.d.ts +3 -0
- package/dist/actions/providers/googlemaps/nearbysearch.js +96 -0
- package/dist/actions/providers/jamf/types.d.ts +8 -0
- package/dist/actions/providers/jamf/types.js +7 -0
- package/dist/actions/providers/jira/createTicket.d.ts +3 -0
- package/dist/actions/providers/jira/createTicket.js +34 -0
- package/dist/actions/providers/math/index.d.ts +1 -0
- package/dist/actions/providers/math/index.js +37 -0
- package/dist/actions/providers/salesforce/createRecord.js +2 -2
- package/dist/actions/providers/salesforce/getRecord.js +2 -2
- package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.d.ts +3 -0
- package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.js +43 -0
- package/dist/actions/providers/salesforce/updateRecord.js +2 -2
- package/dist/actions/providers/slack/index.d.ts +1 -0
- package/dist/actions/providers/slack/index.js +37 -0
- package/dist/actions/providers/slack/listConversations.d.ts +3 -0
- package/dist/actions/providers/slack/listConversations.js +41 -0
- package/dist/actions/providers/slack/list_conversations.d.ts +3 -0
- package/dist/actions/providers/slack/list_conversations.js +60 -0
- package/dist/actions/providers/slack/summarizeChannel.d.ts +3 -0
- package/dist/actions/providers/slack/summarizeChannel.js +51 -0
- package/dist/actions/schema.js +6 -0
- package/dist/actions/types.js +2 -0
- package/dist/main.js +11 -0
- package/package.json +1 -1
- package/dist/actions/providers/github/fetchFile.d.ts +0 -3
- package/dist/actions/providers/github/fetchFile.js +0 -131
- package/dist/actions/providers/github/getContents.d.ts +0 -3
- package/dist/actions/providers/github/getContents.js +0 -41
|
@@ -85,7 +85,7 @@ export const perplexityPerplexityDeepResearchOutputSchema = z.object({
|
|
|
85
85
|
.describe("Array of source citations")
|
|
86
86
|
.optional(),
|
|
87
87
|
})
|
|
88
|
-
.describe("The main research response/analysis")
|
|
88
|
+
.describe("The main research response/analysis object")
|
|
89
89
|
.optional(),
|
|
90
90
|
});
|
|
91
91
|
export const asanaCommentTaskParamsSchema = z.object({
|
|
@@ -421,7 +421,7 @@ export const confluenceFetchPageContentOutputSchema = z.object({
|
|
|
421
421
|
.optional(),
|
|
422
422
|
});
|
|
423
423
|
export const jiraAssignJiraTicketParamsSchema = z.object({
|
|
424
|
-
projectKey: z.string().describe("The key for the project you want to add
|
|
424
|
+
projectKey: z.string().describe("The key for the project you want to add the ticket to."),
|
|
425
425
|
assignee: z.string().describe("The assignee for the ticket, userID or email"),
|
|
426
426
|
issueId: z.string().describe("The issue ID associated with the ticket to be assigned/re-assigned"),
|
|
427
427
|
});
|
|
@@ -443,9 +443,9 @@ export const jiraPublicCommentOnServiceDeskRequestOutputSchema = z.object({
|
|
|
443
443
|
commentUrl: z.string().describe("The url to the created Jira comment").optional(),
|
|
444
444
|
});
|
|
445
445
|
export const jiraCommentJiraTicketParamsSchema = z.object({
|
|
446
|
-
projectKey: z.string().describe("The key for the project"),
|
|
447
|
-
issueId: z.string().describe("The issue ID associated with the ticket to be commented on"),
|
|
448
|
-
comment: z.string().describe("The text to be commented on the ticket"),
|
|
446
|
+
projectKey: z.string().describe("The key for the project to which the ticket you want to comment on belongs."),
|
|
447
|
+
issueId: z.string().describe("The issue ID associated with the ticket to be commented on."),
|
|
448
|
+
comment: z.string().describe("The text to be commented on the ticket."),
|
|
449
449
|
});
|
|
450
450
|
export const jiraCommentJiraTicketOutputSchema = z.object({
|
|
451
451
|
success: z.boolean().describe("Whether the comment was sent successfully"),
|
|
@@ -453,7 +453,7 @@ export const jiraCommentJiraTicketOutputSchema = z.object({
|
|
|
453
453
|
commentUrl: z.string().describe("The url to the created Jira comment").optional(),
|
|
454
454
|
});
|
|
455
455
|
export const jiraCreateJiraTicketParamsSchema = z.object({
|
|
456
|
-
projectKey: z.string().describe("The key for the project you want to add
|
|
456
|
+
projectKey: z.string().describe("The key for the project you want to add the ticket to."),
|
|
457
457
|
summary: z.string().describe("The summary of the new ticket"),
|
|
458
458
|
description: z.string().describe("The description for the new ticket"),
|
|
459
459
|
issueType: z.string().describe("The issue type of the new ticket. Should be Epic, Story, Task, Bug, Sub-task, etc."),
|
|
@@ -492,7 +492,7 @@ export const jiraCreateServiceDeskRequestOutputSchema = z.object({
|
|
|
492
492
|
currentStatus: z.string().describe("The current status of the created request").optional(),
|
|
493
493
|
});
|
|
494
494
|
export const jiraGetJiraTicketDetailsParamsSchema = z.object({
|
|
495
|
-
projectKey: z.string().describe("The key for the project"),
|
|
495
|
+
projectKey: z.string().describe("The key for the project the ticket belongs to."),
|
|
496
496
|
issueId: z.string().describe("The ID of the ticket"),
|
|
497
497
|
});
|
|
498
498
|
export const jiraGetJiraTicketDetailsOutputSchema = z.object({
|
|
@@ -508,7 +508,7 @@ export const jiraGetJiraTicketDetailsOutputSchema = z.object({
|
|
|
508
508
|
.optional(),
|
|
509
509
|
});
|
|
510
510
|
export const jiraGetJiraTicketHistoryParamsSchema = z.object({
|
|
511
|
-
projectKey: z.string().describe("The key for the project"),
|
|
511
|
+
projectKey: z.string().describe("The key for the project the ticket belongs to."),
|
|
512
512
|
issueId: z.string().describe("The ID of the ticket"),
|
|
513
513
|
});
|
|
514
514
|
export const jiraGetJiraTicketHistoryOutputSchema = z.object({
|
|
@@ -517,7 +517,7 @@ export const jiraGetJiraTicketHistoryOutputSchema = z.object({
|
|
|
517
517
|
history: z.array(z.any()).describe("The history data of the Jira ticket").optional(),
|
|
518
518
|
});
|
|
519
519
|
export const jiraUpdateJiraTicketDetailsParamsSchema = z.object({
|
|
520
|
-
projectKey: z.string().describe("The key for the project
|
|
520
|
+
projectKey: z.string().describe("The key for the project the ticket belongs to."),
|
|
521
521
|
issueId: z.string().describe("The issue ID associated with the ticket to be updated"),
|
|
522
522
|
summary: z.string().describe("The updated summary").optional(),
|
|
523
523
|
description: z.string().describe("The updated description").optional(),
|
|
@@ -535,7 +535,7 @@ export const jiraUpdateJiraTicketDetailsOutputSchema = z.object({
|
|
|
535
535
|
error: z.string().describe("Error message if the ticket update failed (only present if success is false)").optional(),
|
|
536
536
|
});
|
|
537
537
|
export const jiraUpdateJiraTicketStatusParamsSchema = z.object({
|
|
538
|
-
projectKey: z.string().describe("The key for the project you want to add
|
|
538
|
+
projectKey: z.string().describe("The key for the project you want to add the ticket to."),
|
|
539
539
|
issueId: z.string().describe("The issue ID associated with the ticket"),
|
|
540
540
|
status: z.string().describe('The status the ticket should be changed to (eg "In Progress", "Closed")'),
|
|
541
541
|
});
|
|
@@ -606,7 +606,7 @@ export const jiraGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
606
606
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
607
607
|
});
|
|
608
608
|
export const jiraOrgAssignJiraTicketParamsSchema = z.object({
|
|
609
|
-
projectKey: z.string().describe("The key for the project you want to add
|
|
609
|
+
projectKey: z.string().describe("The key for the project you want to add the ticket to."),
|
|
610
610
|
assignee: z.string().describe("The assignee for the ticket, userID or email"),
|
|
611
611
|
issueId: z.string().describe("The issue ID associated with the ticket to be assigned/re-assigned"),
|
|
612
612
|
});
|
|
@@ -628,9 +628,9 @@ export const jiraOrgPublicCommentOnServiceDeskRequestOutputSchema = z.object({
|
|
|
628
628
|
commentUrl: z.string().describe("The url to the created Jira comment").optional(),
|
|
629
629
|
});
|
|
630
630
|
export const jiraOrgCommentJiraTicketParamsSchema = z.object({
|
|
631
|
-
projectKey: z.string().describe("The key for the project"),
|
|
632
|
-
issueId: z.string().describe("The issue ID associated with the ticket to be commented on"),
|
|
633
|
-
comment: z.string().describe("The text to be commented on the ticket"),
|
|
631
|
+
projectKey: z.string().describe("The key for the project to which the ticket you want to comment on belongs."),
|
|
632
|
+
issueId: z.string().describe("The issue ID associated with the ticket to be commented on."),
|
|
633
|
+
comment: z.string().describe("The text to be commented on the ticket."),
|
|
634
634
|
});
|
|
635
635
|
export const jiraOrgCommentJiraTicketOutputSchema = z.object({
|
|
636
636
|
success: z.boolean().describe("Whether the comment was sent successfully"),
|
|
@@ -638,7 +638,7 @@ export const jiraOrgCommentJiraTicketOutputSchema = z.object({
|
|
|
638
638
|
commentUrl: z.string().describe("The url to the created Jira comment").optional(),
|
|
639
639
|
});
|
|
640
640
|
export const jiraOrgCreateJiraTicketParamsSchema = z.object({
|
|
641
|
-
projectKey: z.string().describe("The key for the project you want to add
|
|
641
|
+
projectKey: z.string().describe("The key for the project you want to add the ticket to."),
|
|
642
642
|
summary: z.string().describe("The summary of the new ticket"),
|
|
643
643
|
description: z.string().describe("The description for the new ticket"),
|
|
644
644
|
issueType: z.string().describe("The issue type of the new ticket. Should be Epic, Story, Task, Bug, Sub-task, etc."),
|
|
@@ -677,7 +677,7 @@ export const jiraOrgCreateServiceDeskRequestOutputSchema = z.object({
|
|
|
677
677
|
currentStatus: z.string().describe("The current status of the created request").optional(),
|
|
678
678
|
});
|
|
679
679
|
export const jiraOrgGetJiraTicketDetailsParamsSchema = z.object({
|
|
680
|
-
projectKey: z.string().describe("The key for the project"),
|
|
680
|
+
projectKey: z.string().describe("The key for the project the ticket belongs to."),
|
|
681
681
|
issueId: z.string().describe("The ID of the ticket"),
|
|
682
682
|
});
|
|
683
683
|
export const jiraOrgGetJiraTicketDetailsOutputSchema = z.object({
|
|
@@ -693,7 +693,7 @@ export const jiraOrgGetJiraTicketDetailsOutputSchema = z.object({
|
|
|
693
693
|
.optional(),
|
|
694
694
|
});
|
|
695
695
|
export const jiraOrgGetJiraTicketHistoryParamsSchema = z.object({
|
|
696
|
-
projectKey: z.string().describe("The key for the project"),
|
|
696
|
+
projectKey: z.string().describe("The key for the project the ticket belongs to."),
|
|
697
697
|
issueId: z.string().describe("The ID of the ticket"),
|
|
698
698
|
});
|
|
699
699
|
export const jiraOrgGetJiraTicketHistoryOutputSchema = z.object({
|
|
@@ -702,7 +702,7 @@ export const jiraOrgGetJiraTicketHistoryOutputSchema = z.object({
|
|
|
702
702
|
history: z.array(z.any()).describe("The history data of the Jira ticket").optional(),
|
|
703
703
|
});
|
|
704
704
|
export const jiraOrgUpdateJiraTicketDetailsParamsSchema = z.object({
|
|
705
|
-
projectKey: z.string().describe("The key for the project
|
|
705
|
+
projectKey: z.string().describe("The key for the project the ticket belongs to."),
|
|
706
706
|
issueId: z.string().describe("The issue ID associated with the ticket to be updated"),
|
|
707
707
|
summary: z.string().describe("The updated summary").optional(),
|
|
708
708
|
description: z.string().describe("The updated description").optional(),
|
|
@@ -720,7 +720,7 @@ export const jiraOrgUpdateJiraTicketDetailsOutputSchema = z.object({
|
|
|
720
720
|
error: z.string().describe("Error message if the ticket update failed (only present if success is false)").optional(),
|
|
721
721
|
});
|
|
722
722
|
export const jiraOrgUpdateJiraTicketStatusParamsSchema = z.object({
|
|
723
|
-
projectKey: z.string().describe("The key for the project you want to add
|
|
723
|
+
projectKey: z.string().describe("The key for the project you want to add the ticket to."),
|
|
724
724
|
issueId: z.string().describe("The issue ID associated with the ticket"),
|
|
725
725
|
status: z.string().describe('The status the ticket should be changed to (eg "In Progress", "Closed")'),
|
|
726
726
|
});
|
|
@@ -791,7 +791,7 @@ export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
791
791
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
792
792
|
});
|
|
793
793
|
export const jiraDataCenterAssignJiraTicketParamsSchema = z.object({
|
|
794
|
-
projectKey: z.string().describe("The key for the project you want to add
|
|
794
|
+
projectKey: z.string().describe("The key for the project you want to add the ticket to."),
|
|
795
795
|
assignee: z.string().describe("The assignee for the ticket, userID or email"),
|
|
796
796
|
issueId: z.string().describe("The issue ID associated with the ticket to be assigned/re-assigned"),
|
|
797
797
|
});
|
|
@@ -813,9 +813,9 @@ export const jiraDataCenterPublicCommentOnServiceDeskRequestOutputSchema = z.obj
|
|
|
813
813
|
commentUrl: z.string().describe("The url to the created Jira comment").optional(),
|
|
814
814
|
});
|
|
815
815
|
export const jiraDataCenterCommentJiraTicketParamsSchema = z.object({
|
|
816
|
-
projectKey: z.string().describe("The key for the project"),
|
|
817
|
-
issueId: z.string().describe("The issue ID associated with the ticket to be commented on"),
|
|
818
|
-
comment: z.string().describe("The text to be commented on the ticket"),
|
|
816
|
+
projectKey: z.string().describe("The key for the project to which the ticket you want to comment on belongs."),
|
|
817
|
+
issueId: z.string().describe("The issue ID associated with the ticket to be commented on."),
|
|
818
|
+
comment: z.string().describe("The text to be commented on the ticket."),
|
|
819
819
|
});
|
|
820
820
|
export const jiraDataCenterCommentJiraTicketOutputSchema = z.object({
|
|
821
821
|
success: z.boolean().describe("Whether the comment was sent successfully"),
|
|
@@ -823,7 +823,7 @@ export const jiraDataCenterCommentJiraTicketOutputSchema = z.object({
|
|
|
823
823
|
commentUrl: z.string().describe("The url to the created Jira comment").optional(),
|
|
824
824
|
});
|
|
825
825
|
export const jiraDataCenterCreateJiraTicketParamsSchema = z.object({
|
|
826
|
-
projectKey: z.string().describe("The key for the project you want to add
|
|
826
|
+
projectKey: z.string().describe("The key for the project you want to add the ticket to."),
|
|
827
827
|
summary: z.string().describe("The summary of the new ticket"),
|
|
828
828
|
description: z.string().describe("The description for the new ticket"),
|
|
829
829
|
issueType: z.string().describe("The issue type of the new ticket. Should be Epic, Story, Task, Bug, Sub-task, etc."),
|
|
@@ -862,7 +862,7 @@ export const jiraDataCenterCreateServiceDeskRequestOutputSchema = z.object({
|
|
|
862
862
|
currentStatus: z.string().describe("The current status of the created request").optional(),
|
|
863
863
|
});
|
|
864
864
|
export const jiraDataCenterGetJiraTicketDetailsParamsSchema = z.object({
|
|
865
|
-
projectKey: z.string().describe("The key for the project"),
|
|
865
|
+
projectKey: z.string().describe("The key for the project the ticket belongs to."),
|
|
866
866
|
issueId: z.string().describe("The ID of the ticket"),
|
|
867
867
|
});
|
|
868
868
|
export const jiraDataCenterGetJiraTicketDetailsOutputSchema = z.object({
|
|
@@ -878,7 +878,7 @@ export const jiraDataCenterGetJiraTicketDetailsOutputSchema = z.object({
|
|
|
878
878
|
.optional(),
|
|
879
879
|
});
|
|
880
880
|
export const jiraDataCenterGetJiraTicketHistoryParamsSchema = z.object({
|
|
881
|
-
projectKey: z.string().describe("The key for the project"),
|
|
881
|
+
projectKey: z.string().describe("The key for the project the ticket belongs to."),
|
|
882
882
|
issueId: z.string().describe("The ID of the ticket"),
|
|
883
883
|
});
|
|
884
884
|
export const jiraDataCenterGetJiraTicketHistoryOutputSchema = z.object({
|
|
@@ -887,7 +887,7 @@ export const jiraDataCenterGetJiraTicketHistoryOutputSchema = z.object({
|
|
|
887
887
|
history: z.array(z.any()).describe("The history data of the Jira ticket").optional(),
|
|
888
888
|
});
|
|
889
889
|
export const jiraDataCenterUpdateJiraTicketDetailsParamsSchema = z.object({
|
|
890
|
-
projectKey: z.string().describe("The key for the project
|
|
890
|
+
projectKey: z.string().describe("The key for the project the ticket belongs to."),
|
|
891
891
|
issueId: z.string().describe("The issue ID associated with the ticket to be updated"),
|
|
892
892
|
summary: z.string().describe("The updated summary").optional(),
|
|
893
893
|
description: z.string().describe("The updated description").optional(),
|
|
@@ -905,7 +905,7 @@ export const jiraDataCenterUpdateJiraTicketDetailsOutputSchema = z.object({
|
|
|
905
905
|
error: z.string().describe("Error message if the ticket update failed (only present if success is false)").optional(),
|
|
906
906
|
});
|
|
907
907
|
export const jiraDataCenterUpdateJiraTicketStatusParamsSchema = z.object({
|
|
908
|
-
projectKey: z.string().describe("The key for the project you want to add
|
|
908
|
+
projectKey: z.string().describe("The key for the project you want to add the ticket to."),
|
|
909
909
|
issueId: z.string().describe("The issue ID associated with the ticket"),
|
|
910
910
|
status: z.string().describe('The status the ticket should be changed to (eg "In Progress", "Closed")'),
|
|
911
911
|
});
|
|
@@ -1069,7 +1069,7 @@ export const bingGetTopNSearchResultUrlsOutputSchema = z.object({
|
|
|
1069
1069
|
name: z.string().describe("The name or title of the search result").optional(),
|
|
1070
1070
|
url: z.string().describe("The URL of the search result").optional(),
|
|
1071
1071
|
}))
|
|
1072
|
-
.describe("The top
|
|
1072
|
+
.describe("The top search result objects"),
|
|
1073
1073
|
});
|
|
1074
1074
|
export const zendeskCreateZendeskTicketParamsSchema = z.object({
|
|
1075
1075
|
subject: z.string().describe("The subject of the ticket"),
|
|
@@ -1864,11 +1864,11 @@ export const googleOauthUpdateDocOutputSchema = z.object({
|
|
|
1864
1864
|
export const googleOauthScheduleCalendarMeetingParamsSchema = z.object({
|
|
1865
1865
|
calendarId: z.string().describe("The ID of the calendar to schedule the meeting on"),
|
|
1866
1866
|
name: z.string().describe("The name of the meeting"),
|
|
1867
|
-
start: z.string().describe("The start time of the meeting"),
|
|
1868
|
-
end: z.string().describe("The end time of the meeting"),
|
|
1867
|
+
start: z.string().describe("The start time of the meeting (in datetime format)"),
|
|
1868
|
+
end: z.string().describe("The end time of the meeting (in datetime format)"),
|
|
1869
1869
|
description: z.string().describe("The description of the meeting").optional(),
|
|
1870
1870
|
attendees: z
|
|
1871
|
-
.array(z.string().describe("The
|
|
1871
|
+
.array(z.string().describe("The emails of the attendees"))
|
|
1872
1872
|
.describe("The attendees of the meeting")
|
|
1873
1873
|
.optional(),
|
|
1874
1874
|
useGoogleMeet: z.boolean().describe("Whether to use Google Meet for the meeting").optional(),
|
|
@@ -2310,6 +2310,25 @@ export const googleOauthUpdateSpreadsheetOutputSchema = z.object({
|
|
|
2310
2310
|
.optional(),
|
|
2311
2311
|
error: z.string().describe("The error that occurred if the spreadsheet was not updated successfully").optional(),
|
|
2312
2312
|
});
|
|
2313
|
+
export const googleOauthAppendRowsToSpreadsheetParamsSchema = z.object({
|
|
2314
|
+
spreadsheetId: z
|
|
2315
|
+
.string()
|
|
2316
|
+
.describe('The ID of the Google Spreadsheet to update. This should be provided by the user. Can be found in the URL of the spreadsheet. For example, "1bWp1w2OVwH19mkXEiLIaP8As7N-9c_3EXF_Eo5d5Nm0".'),
|
|
2317
|
+
sheetName: z
|
|
2318
|
+
.string()
|
|
2319
|
+
.describe('The name of the SHEET to append to. This should be provided by the user. For example, "Sheet1".')
|
|
2320
|
+
.optional(),
|
|
2321
|
+
rows: z
|
|
2322
|
+
.array(z
|
|
2323
|
+
.array(z.object({ stringValue: z.string().describe("The value of the cell") }))
|
|
2324
|
+
.describe("A list of cells to append to the spreadsheet"))
|
|
2325
|
+
.describe("Rows of cells to append to the spreadsheet"),
|
|
2326
|
+
});
|
|
2327
|
+
export const googleOauthAppendRowsToSpreadsheetOutputSchema = z.object({
|
|
2328
|
+
success: z.boolean().describe("Whether the spreadsheet was updated successfully"),
|
|
2329
|
+
spreadsheetUrl: z.string().describe("The URL of the updated spreadsheet").optional(),
|
|
2330
|
+
error: z.string().describe("The error that occurred if the spreadsheet was not updated successfully").optional(),
|
|
2331
|
+
});
|
|
2313
2332
|
export const googleOauthCreatePresentationParamsSchema = z.object({
|
|
2314
2333
|
title: z.string().describe("The title of the presentation"),
|
|
2315
2334
|
pageSize: z
|
|
@@ -3376,7 +3395,7 @@ export const lookerEnableUserByEmailOutputSchema = z.object({
|
|
|
3376
3395
|
.optional(),
|
|
3377
3396
|
});
|
|
3378
3397
|
export const salesforceUpdateRecordParamsSchema = z.object({
|
|
3379
|
-
|
|
3398
|
+
recordType: z.string().describe("The Salesforce record type to update (e.g., Lead, Account, Contact)"),
|
|
3380
3399
|
recordId: z.string().describe("The ID of the record to update"),
|
|
3381
3400
|
fieldsToUpdate: z
|
|
3382
3401
|
.record(z.string())
|
|
@@ -3387,7 +3406,7 @@ export const salesforceUpdateRecordOutputSchema = z.object({
|
|
|
3387
3406
|
error: z.string().describe("The error that occurred if the record was not successfully updated").optional(),
|
|
3388
3407
|
});
|
|
3389
3408
|
export const salesforceCreateRecordParamsSchema = z.object({
|
|
3390
|
-
|
|
3409
|
+
recordType: z.string().describe("The Salesforce record type to create (e.g., Lead, Account, Contact)"),
|
|
3391
3410
|
fieldsToCreate: z.record(z.string()).describe("The fields to create on the record").optional(),
|
|
3392
3411
|
});
|
|
3393
3412
|
export const salesforceCreateRecordOutputSchema = z.object({
|
|
@@ -3505,7 +3524,7 @@ export const salesforceGetSalesforceRecordsByQueryOutputSchema = z.object({
|
|
|
3505
3524
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
3506
3525
|
});
|
|
3507
3526
|
export const salesforceGetRecordParamsSchema = z.object({
|
|
3508
|
-
|
|
3527
|
+
recordType: z.string().describe("The Salesforce record type to retrieve (e.g., Lead, Account, Contact)"),
|
|
3509
3528
|
recordId: z.string().describe("The ID of the record to retrieve"),
|
|
3510
3529
|
});
|
|
3511
3530
|
export const salesforceGetRecordOutputSchema = z.object({
|
|
@@ -4514,7 +4533,10 @@ export const linearGetTeamsOutputSchema = z.object({
|
|
|
4514
4533
|
.optional(),
|
|
4515
4534
|
});
|
|
4516
4535
|
export const hubspotGetContactsParamsSchema = z.object({
|
|
4517
|
-
query: z
|
|
4536
|
+
query: z
|
|
4537
|
+
.string()
|
|
4538
|
+
.describe("Optional keyword search query to filter contacts by name, email, or other properties")
|
|
4539
|
+
.optional(),
|
|
4518
4540
|
limit: z.number().describe("Maximum number of contacts to return (default 100, max 100)").optional(),
|
|
4519
4541
|
});
|
|
4520
4542
|
export const hubspotGetContactsOutputSchema = z.object({
|
|
@@ -4532,7 +4554,9 @@ export const hubspotGetContactsOutputSchema = z.object({
|
|
|
4532
4554
|
.optional(),
|
|
4533
4555
|
});
|
|
4534
4556
|
export const hubspotGetContactDetailsParamsSchema = z.object({
|
|
4535
|
-
contactId: z
|
|
4557
|
+
contactId: z
|
|
4558
|
+
.string()
|
|
4559
|
+
.describe("The ID of the HubSpot contact to retrieve. If you view the contact online, the url contains record/0-1/{contactId}/."),
|
|
4536
4560
|
});
|
|
4537
4561
|
export const hubspotGetContactDetailsOutputSchema = z.object({
|
|
4538
4562
|
success: z.boolean().describe("Whether the operation was successful"),
|
|
@@ -4562,7 +4586,7 @@ export const hubspotGetContactDetailsOutputSchema = z.object({
|
|
|
4562
4586
|
export const hubspotGetCompaniesParamsSchema = z.object({
|
|
4563
4587
|
query: z
|
|
4564
4588
|
.string()
|
|
4565
|
-
.describe("Optional search query to filter companies by name, domain, or other properties")
|
|
4589
|
+
.describe("Optional keyword search query to filter companies by name, domain, or other properties")
|
|
4566
4590
|
.optional(),
|
|
4567
4591
|
limit: z.number().describe("Maximum number of companies to return (default 100, max 100)").optional(),
|
|
4568
4592
|
});
|
|
@@ -4580,7 +4604,9 @@ export const hubspotGetCompaniesOutputSchema = z.object({
|
|
|
4580
4604
|
.optional(),
|
|
4581
4605
|
});
|
|
4582
4606
|
export const hubspotGetCompanyDetailsParamsSchema = z.object({
|
|
4583
|
-
companyId: z
|
|
4607
|
+
companyId: z
|
|
4608
|
+
.string()
|
|
4609
|
+
.describe("The ID of the HubSpot company to retrieve. If you view the company online, the url contains record/0-2/{companyId}/."),
|
|
4584
4610
|
});
|
|
4585
4611
|
export const hubspotGetCompanyDetailsOutputSchema = z.object({
|
|
4586
4612
|
success: z.boolean().describe("Whether the operation was successful"),
|
|
@@ -4624,7 +4650,9 @@ export const hubspotGetDealsOutputSchema = z.object({
|
|
|
4624
4650
|
.optional(),
|
|
4625
4651
|
});
|
|
4626
4652
|
export const hubspotGetDealDetailsParamsSchema = z.object({
|
|
4627
|
-
dealId: z
|
|
4653
|
+
dealId: z
|
|
4654
|
+
.string()
|
|
4655
|
+
.describe("The ID of the HubSpot deal to retrieve. If you view the deal online, the url contains record/0-3/{dealId}/."),
|
|
4628
4656
|
});
|
|
4629
4657
|
export const hubspotGetDealDetailsOutputSchema = z.object({
|
|
4630
4658
|
success: z.boolean().describe("Whether the operation was successful"),
|
|
@@ -4668,7 +4696,9 @@ export const hubspotGetTicketsOutputSchema = z.object({
|
|
|
4668
4696
|
.optional(),
|
|
4669
4697
|
});
|
|
4670
4698
|
export const hubspotGetTicketDetailsParamsSchema = z.object({
|
|
4671
|
-
ticketId: z
|
|
4699
|
+
ticketId: z
|
|
4700
|
+
.string()
|
|
4701
|
+
.describe("The ID of the HubSpot ticket to retrieve. If you view the ticket online, the url contains record/0-5/{ticketId}/."),
|
|
4672
4702
|
});
|
|
4673
4703
|
export const hubspotGetTicketDetailsOutputSchema = z.object({
|
|
4674
4704
|
success: z.boolean().describe("Whether the operation was successful"),
|
|
@@ -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
|
+
};
|
package/dist/actions/groups.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, jiraGetServiceDesksDefinition, jiraCreateServiceDeskRequestDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, jiraOrgAssignJiraTicketDefinition, jiraOrgCreateJiraTicketDefinition, jiraOrgCommentJiraTicketDefinition, jiraOrgGetJiraTicketDetailsDefinition, jiraOrgGetJiraTicketHistoryDefinition, jiraOrgUpdateJiraTicketDetailsDefinition, jiraOrgUpdateJiraTicketStatusDefinition, jiraOrgGetJiraIssuesByQueryDefinition, googleOauthGetDriveFileContentByIdDefinition, googleOauthSearchDriveByQueryDefinition, googleOauthSearchDriveByQueryAndGetFileContentDefinition, githubGetFileContentDefinition, githubListDirectoryDefinition, } 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, linearGetIssueDetailsDefinition, linearGetProjectsDefinition, linearGetProjectDetailsDefinition, linearGetTeamDetailsDefinition, linearGetTeamsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, jiraOrgAssignJiraTicketDefinition, jiraOrgCreateJiraTicketDefinition, jiraOrgCommentJiraTicketDefinition, jiraOrgGetJiraTicketDetailsDefinition, jiraOrgGetJiraTicketHistoryDefinition, jiraOrgUpdateJiraTicketDetailsDefinition, jiraOrgUpdateJiraTicketStatusDefinition, jiraOrgGetJiraIssuesByQueryDefinition, googleOauthGetDriveFileContentByIdDefinition, googleOauthSearchDriveByQueryDefinition, googleOauthSearchDriveByQueryAndGetFileContentDefinition, githubGetFileContentDefinition, githubListDirectoryDefinition, } from "./autogen/templates.js";
|
|
2
2
|
export const ACTION_GROUPS = {
|
|
3
3
|
GENERIC: {
|
|
4
4
|
description: "Generic utility actions",
|
|
@@ -248,4 +248,14 @@ export const ACTION_GROUPS = {
|
|
|
248
248
|
oktaTriggerOktaWorkflowDefinition,
|
|
249
249
|
],
|
|
250
250
|
},
|
|
251
|
+
LINEAR: {
|
|
252
|
+
description: "Actions for interacting with Linear",
|
|
253
|
+
actions: [
|
|
254
|
+
linearGetIssueDetailsDefinition,
|
|
255
|
+
linearGetProjectsDefinition,
|
|
256
|
+
linearGetProjectDetailsDefinition,
|
|
257
|
+
linearGetTeamDetailsDefinition,
|
|
258
|
+
linearGetTeamsDefinition,
|
|
259
|
+
],
|
|
260
|
+
},
|
|
251
261
|
};
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
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, username, content, title } = params;
|
|
24
|
+
const { baseUrl, authToken } = authParams;
|
|
25
|
+
const config = getConfluenceRequestConfig(baseUrl, username, authToken);
|
|
26
|
+
// Get current version number
|
|
27
|
+
const response = yield axiosClient_1.axiosClient.get(`/api/v2/pages/${pageId}`, config);
|
|
28
|
+
const currVersion = response.data.version.number;
|
|
29
|
+
const payload = {
|
|
30
|
+
id: pageId,
|
|
31
|
+
status: "current",
|
|
32
|
+
title,
|
|
33
|
+
body: {
|
|
34
|
+
representation: "storage",
|
|
35
|
+
value: content,
|
|
36
|
+
},
|
|
37
|
+
version: {
|
|
38
|
+
number: currVersion + 1,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
yield axiosClient_1.axiosClient.put(`/api/v2/pages/${pageId}`, payload, config);
|
|
42
|
+
});
|
|
43
|
+
exports.default = confluenceUpdatePage;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const sdk_1 = require("@credal/sdk");
|
|
13
|
+
const callCopilot = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
14
|
+
var _b;
|
|
15
|
+
const requestBody = {
|
|
16
|
+
agentId: params.agentId,
|
|
17
|
+
query: params.query,
|
|
18
|
+
userEmail: params.userEmail,
|
|
19
|
+
};
|
|
20
|
+
const baseUrl = (_b = authParams.baseUrl) !== null && _b !== void 0 ? _b : "https://app.credal.ai/api";
|
|
21
|
+
const client = new sdk_1.CredalClient({ environment: baseUrl, apiKey: authParams.apiKey });
|
|
22
|
+
const response = yield client.copilots.sendMessage({
|
|
23
|
+
agentId: requestBody.agentId,
|
|
24
|
+
message: requestBody.query,
|
|
25
|
+
userEmail: requestBody.userEmail,
|
|
26
|
+
});
|
|
27
|
+
return {
|
|
28
|
+
response: response.sendChatResult.type === "ai_response_result"
|
|
29
|
+
? response.sendChatResult.response.message
|
|
30
|
+
: "Error getting response",
|
|
31
|
+
referencedSources: response.sendChatResult.type === "ai_response_result" ? response.sendChatResult.referencedSources : [],
|
|
32
|
+
sourcesInDataContext: response.sendChatResult.type === "ai_response_result" ? response.sendChatResult.sourcesInDataContext : [],
|
|
33
|
+
webSearchResults: response.sendChatResult.type === "ai_response_result" ? response.sendChatResult.webSearchResults : [],
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
exports.default = callCopilot;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { googleOauthAppendRowsToSpreadsheetFunction } from "../../autogen/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Appends rows to a Google Spreadsheet using OAuth authentication
|
|
4
|
+
* https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append
|
|
5
|
+
*/
|
|
6
|
+
declare const appendRowsToSpreadsheet: googleOauthAppendRowsToSpreadsheetFunction;
|
|
7
|
+
export default appendRowsToSpreadsheet;
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
/**
|
|
13
|
+
* Appends rows to a Google Spreadsheet using OAuth authentication
|
|
14
|
+
* https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append
|
|
15
|
+
*/
|
|
16
|
+
const appendRowsToSpreadsheet = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
17
|
+
if (!authParams.authToken) {
|
|
18
|
+
throw new Error(MISSING_AUTH_TOKEN);
|
|
19
|
+
}
|
|
20
|
+
const { spreadsheetId, sheetName, rows } = params;
|
|
21
|
+
// Transform rows from schema format to Google Sheets API format
|
|
22
|
+
// Schema: [[{ stringValue: "cell1" }, { stringValue: "cell2" }], ...]
|
|
23
|
+
// API expects: [["cell1", "cell2"], ...]
|
|
24
|
+
const values = rows.map(row => row.map(cell => cell.stringValue));
|
|
25
|
+
const appendUrl = `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}/values/'${sheetName !== null && sheetName !== void 0 ? sheetName : "Sheet1"}':append`;
|
|
26
|
+
try {
|
|
27
|
+
const response = yield axiosClient.post(appendUrl, {
|
|
28
|
+
values,
|
|
29
|
+
majorDimension: "ROWS",
|
|
30
|
+
range: `'${sheetName}'`,
|
|
31
|
+
}, {
|
|
32
|
+
headers: {
|
|
33
|
+
Authorization: `Bearer ${authParams.authToken}`,
|
|
34
|
+
"Content-Type": "application/json",
|
|
35
|
+
},
|
|
36
|
+
params: {
|
|
37
|
+
valueInputOption: "USER_ENTERED",
|
|
38
|
+
insertDataOption: "INSERT_ROWS",
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
if (response.status < 200 || response.status >= 300) {
|
|
42
|
+
return {
|
|
43
|
+
success: false,
|
|
44
|
+
error: response.data.error,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const spreadsheetUrl = `https://docs.google.com/spreadsheets/d/${spreadsheetId}`;
|
|
48
|
+
return {
|
|
49
|
+
success: true,
|
|
50
|
+
spreadsheetUrl,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
console.error("Error appending rows to spreadsheet", error);
|
|
55
|
+
return {
|
|
56
|
+
success: false,
|
|
57
|
+
error: error instanceof Error ? error.message : "Unknown error",
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
export default appendRowsToSpreadsheet;
|