@credal/actions 0.2.148 → 0.2.150
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/dist/actions/actionMapper.js +1 -0
- package/dist/actions/autogen/templates.d.ts +11 -0
- package/dist/actions/autogen/templates.js +734 -10
- package/dist/actions/autogen/types.d.ts +723 -12
- package/dist/actions/autogen/types.js +212 -4
- package/dist/actions/groups.js +14 -1
- package/dist/actions/invoke.js +1 -1
- package/dist/actions/providers/confluence/updatePage.d.ts +3 -0
- package/dist/actions/providers/confluence/updatePage.js +47 -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/assignJiraTicket.js +16 -12
- package/dist/actions/providers/jira/commentJiraTicket.js +10 -22
- package/dist/actions/providers/jira/createJiraTicket.js +39 -49
- package/dist/actions/providers/jira/getJiraIssuesByQuery.js +37 -36
- package/dist/actions/providers/jira/getJiraTicketDetails.js +7 -5
- package/dist/actions/providers/jira/getJiraTicketHistory.js +10 -8
- package/dist/actions/providers/jira/updateJiraTicketDetails.js +16 -37
- package/dist/actions/providers/jira/updateJiraTicketStatus.js +8 -6
- package/dist/actions/providers/jira/utils.d.ts +55 -2
- package/dist/actions/providers/jira/utils.js +129 -9
- package/dist/actions/providers/slack/archiveChannel.js +9 -2
- package/dist/actions/providers/slackUser/searchSlack.d.ts +3 -3
- package/dist/actions/providers/slackUser/searchSlack.js +76 -74
- package/package.json +1 -1
- package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.d.ts +0 -3
- package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.js +0 -43
|
@@ -10,6 +10,7 @@ export var ProviderName;
|
|
|
10
10
|
ProviderName["CONFLUENCE"] = "confluence";
|
|
11
11
|
ProviderName["JIRA"] = "jira";
|
|
12
12
|
ProviderName["JIRAORG"] = "jiraOrg";
|
|
13
|
+
ProviderName["JIRADATACENTER"] = "jiraDataCenter";
|
|
13
14
|
ProviderName["KANDJI"] = "kandji";
|
|
14
15
|
ProviderName["GOOGLEMAPS"] = "googlemaps";
|
|
15
16
|
ProviderName["BING"] = "bing";
|
|
@@ -414,7 +415,12 @@ export const jiraCreateJiraTicketParamsSchema = z.object({
|
|
|
414
415
|
.optional(),
|
|
415
416
|
});
|
|
416
417
|
export const jiraCreateJiraTicketOutputSchema = z.object({
|
|
417
|
-
|
|
418
|
+
success: z.boolean().describe("Whether the ticket was successfully created"),
|
|
419
|
+
ticketUrl: z.string().describe("The url to the created Jira Ticket (only present if success is true)").optional(),
|
|
420
|
+
error: z
|
|
421
|
+
.string()
|
|
422
|
+
.describe("Error message if the ticket creation failed (only present if success is false)")
|
|
423
|
+
.optional(),
|
|
418
424
|
});
|
|
419
425
|
export const jiraGetServiceDesksParamsSchema = z.object({});
|
|
420
426
|
export const jiraGetServiceDesksOutputSchema = z.object({
|
|
@@ -503,7 +509,9 @@ export const jiraUpdateJiraTicketDetailsParamsSchema = z.object({
|
|
|
503
509
|
.optional(),
|
|
504
510
|
});
|
|
505
511
|
export const jiraUpdateJiraTicketDetailsOutputSchema = z.object({
|
|
506
|
-
|
|
512
|
+
success: z.boolean().describe("Whether the ticket was successfully updated"),
|
|
513
|
+
ticketUrl: z.string().describe("The url to the Jira ticket (only present if success is true)").optional(),
|
|
514
|
+
error: z.string().describe("Error message if the ticket update failed (only present if success is false)").optional(),
|
|
507
515
|
});
|
|
508
516
|
export const jiraUpdateJiraTicketStatusParamsSchema = z.object({
|
|
509
517
|
projectKey: z.string().describe("The key for the project you want to add it to"),
|
|
@@ -600,7 +608,12 @@ export const jiraOrgCreateJiraTicketParamsSchema = z.object({
|
|
|
600
608
|
.optional(),
|
|
601
609
|
});
|
|
602
610
|
export const jiraOrgCreateJiraTicketOutputSchema = z.object({
|
|
603
|
-
|
|
611
|
+
success: z.boolean().describe("Whether the ticket was successfully created"),
|
|
612
|
+
ticketUrl: z.string().describe("The url to the created Jira Ticket (only present if success is true)").optional(),
|
|
613
|
+
error: z
|
|
614
|
+
.string()
|
|
615
|
+
.describe("Error message if the ticket creation failed (only present if success is false)")
|
|
616
|
+
.optional(),
|
|
604
617
|
});
|
|
605
618
|
export const jiraOrgGetServiceDesksParamsSchema = z.object({});
|
|
606
619
|
export const jiraOrgGetServiceDesksOutputSchema = z.object({
|
|
@@ -689,7 +702,9 @@ export const jiraOrgUpdateJiraTicketDetailsParamsSchema = z.object({
|
|
|
689
702
|
.optional(),
|
|
690
703
|
});
|
|
691
704
|
export const jiraOrgUpdateJiraTicketDetailsOutputSchema = z.object({
|
|
692
|
-
|
|
705
|
+
success: z.boolean().describe("Whether the ticket was successfully updated"),
|
|
706
|
+
ticketUrl: z.string().describe("The url to the Jira ticket (only present if success is true)").optional(),
|
|
707
|
+
error: z.string().describe("Error message if the ticket update failed (only present if success is false)").optional(),
|
|
693
708
|
});
|
|
694
709
|
export const jiraOrgUpdateJiraTicketStatusParamsSchema = z.object({
|
|
695
710
|
projectKey: z.string().describe("The key for the project you want to add it to"),
|
|
@@ -739,6 +754,199 @@ export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
739
754
|
.optional(),
|
|
740
755
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
741
756
|
});
|
|
757
|
+
export const jiraDataCenterAssignJiraTicketParamsSchema = z.object({
|
|
758
|
+
projectKey: z.string().describe("The key for the project you want to add it to"),
|
|
759
|
+
assignee: z.string().describe("The assignee for the ticket, userID or email"),
|
|
760
|
+
issueId: z.string().describe("The issue ID associated with the ticket to be assigned/re-assigned"),
|
|
761
|
+
});
|
|
762
|
+
export const jiraDataCenterAssignJiraTicketOutputSchema = z.object({
|
|
763
|
+
success: z.boolean().describe("Whether the ticket was successfully assigned/reassigned"),
|
|
764
|
+
error: z
|
|
765
|
+
.string()
|
|
766
|
+
.describe("The error that occurred if the ticket was not successfully assigned/reassigned")
|
|
767
|
+
.optional(),
|
|
768
|
+
ticketUrl: z.string().describe("The url to the newly assigned/reassigned Jira ticket").optional(),
|
|
769
|
+
});
|
|
770
|
+
export const jiraDataCenterPublicCommentOnServiceDeskRequestParamsSchema = z.object({
|
|
771
|
+
issueId: z.string().describe("The issue ID associated with the ticket to be commented on"),
|
|
772
|
+
comment: z.string().describe("The text to be commented on the ticket"),
|
|
773
|
+
});
|
|
774
|
+
export const jiraDataCenterPublicCommentOnServiceDeskRequestOutputSchema = z.object({
|
|
775
|
+
success: z.boolean().describe("Whether the comment was sent successfully"),
|
|
776
|
+
error: z.string().describe("The error that occurred if the comment was not sent successfully").optional(),
|
|
777
|
+
commentUrl: z.string().describe("The url to the created Jira comment").optional(),
|
|
778
|
+
});
|
|
779
|
+
export const jiraDataCenterCommentJiraTicketParamsSchema = z.object({
|
|
780
|
+
projectKey: z.string().describe("The key for the project"),
|
|
781
|
+
issueId: z.string().describe("The issue ID associated with the ticket to be commented on"),
|
|
782
|
+
comment: z.string().describe("The text to be commented on the ticket"),
|
|
783
|
+
});
|
|
784
|
+
export const jiraDataCenterCommentJiraTicketOutputSchema = z.object({
|
|
785
|
+
success: z.boolean().describe("Whether the comment was sent successfully"),
|
|
786
|
+
error: z.string().describe("The error that occurred if the comment was not sent successfully").optional(),
|
|
787
|
+
commentUrl: z.string().describe("The url to the created Jira comment").optional(),
|
|
788
|
+
});
|
|
789
|
+
export const jiraDataCenterCreateJiraTicketParamsSchema = z.object({
|
|
790
|
+
projectKey: z.string().describe("The key for the project you want to add it to"),
|
|
791
|
+
summary: z.string().describe("The summary of the new ticket"),
|
|
792
|
+
description: z.string().describe("The description for the new ticket"),
|
|
793
|
+
issueType: z.string().describe("The issue type of the new ticket. Should be Epic, Story, Task, Bug, Sub-task, etc."),
|
|
794
|
+
reporter: z.string().describe("The reporter for the new ticket creation").optional(),
|
|
795
|
+
assignee: z.string().describe("The assignee for the new ticket creation").optional(),
|
|
796
|
+
requestTypeId: z.string().describe("The request type ID for Jira Service Management tickets").optional(),
|
|
797
|
+
customFields: z
|
|
798
|
+
.object({})
|
|
799
|
+
.catchall(z.any())
|
|
800
|
+
.describe("Custom fields to be set on the create ticket request")
|
|
801
|
+
.optional(),
|
|
802
|
+
});
|
|
803
|
+
export const jiraDataCenterCreateJiraTicketOutputSchema = z.object({
|
|
804
|
+
success: z.boolean().describe("Whether the ticket was successfully created"),
|
|
805
|
+
ticketUrl: z.string().describe("The url to the created Jira Ticket (only present if success is true)").optional(),
|
|
806
|
+
error: z
|
|
807
|
+
.string()
|
|
808
|
+
.describe("Error message if the ticket creation failed (only present if success is false)")
|
|
809
|
+
.optional(),
|
|
810
|
+
});
|
|
811
|
+
export const jiraDataCenterGetServiceDesksParamsSchema = z.object({});
|
|
812
|
+
export const jiraDataCenterGetServiceDesksOutputSchema = z.object({
|
|
813
|
+
success: z.boolean().describe("Whether the service desks were retrieved successfully"),
|
|
814
|
+
error: z.string().describe("The error that occurred if the service desks were not retrieved successfully").optional(),
|
|
815
|
+
serviceDesks: z
|
|
816
|
+
.array(z
|
|
817
|
+
.object({
|
|
818
|
+
id: z.string().describe("The ID of the service desk").optional(),
|
|
819
|
+
projectId: z.string().describe("The ID of the project").optional(),
|
|
820
|
+
projectKey: z.string().describe("The key of the project").optional(),
|
|
821
|
+
projectName: z.string().describe("The name of the service desk").optional(),
|
|
822
|
+
requestTypes: z
|
|
823
|
+
.array(z
|
|
824
|
+
.object({
|
|
825
|
+
id: z.string().describe("The ID of the request type").optional(),
|
|
826
|
+
name: z.string().describe("The name of the request type").optional(),
|
|
827
|
+
description: z.string().describe("The description of the request type").optional(),
|
|
828
|
+
issueTypeId: z.string().describe("The ID of the issue type").optional(),
|
|
829
|
+
portalId: z.string().describe("The ID of the customer portal").optional(),
|
|
830
|
+
helpText: z.string().describe("The help text for the request type").optional(),
|
|
831
|
+
serviceDeskId: z.string().describe("The ID of the service desk").optional(),
|
|
832
|
+
canCreateRequest: z.boolean().describe("Whether the request type can be created").optional(),
|
|
833
|
+
})
|
|
834
|
+
.describe("A request type"))
|
|
835
|
+
.describe("The list of request types")
|
|
836
|
+
.optional(),
|
|
837
|
+
})
|
|
838
|
+
.describe("A service desk"))
|
|
839
|
+
.describe("The list of service desks")
|
|
840
|
+
.optional(),
|
|
841
|
+
});
|
|
842
|
+
export const jiraDataCenterCreateServiceDeskRequestParamsSchema = z.object({
|
|
843
|
+
serviceDeskId: z.string().describe("The ID of the service desk to create the request in"),
|
|
844
|
+
requestTypeId: z.string().describe("The ID of the request type to use for the new request"),
|
|
845
|
+
summary: z.string().describe("The summary of the new service desk request"),
|
|
846
|
+
description: z.string().describe("The description for the new service desk request"),
|
|
847
|
+
reporter: z
|
|
848
|
+
.string()
|
|
849
|
+
.describe("The email address of the person reporting the issue (for raising on behalf of)")
|
|
850
|
+
.optional(),
|
|
851
|
+
});
|
|
852
|
+
export const jiraDataCenterCreateServiceDeskRequestOutputSchema = z.object({
|
|
853
|
+
success: z.boolean().describe("Whether the request was created successfully"),
|
|
854
|
+
error: z.string().describe("The error that occurred if the request was not created successfully").optional(),
|
|
855
|
+
issueKey: z.string().describe("The Jira issue key of the created request").optional(),
|
|
856
|
+
webLink: z.string().describe("The link to the customer portal request, if available").optional(),
|
|
857
|
+
currentStatus: z.string().describe("The current status of the created request").optional(),
|
|
858
|
+
});
|
|
859
|
+
export const jiraDataCenterGetJiraTicketDetailsParamsSchema = z.object({
|
|
860
|
+
projectKey: z.string().describe("The key for the project"),
|
|
861
|
+
issueId: z.string().describe("The ID of the ticket"),
|
|
862
|
+
});
|
|
863
|
+
export const jiraDataCenterGetJiraTicketDetailsOutputSchema = z.object({
|
|
864
|
+
success: z.boolean().describe("Whether the status was updated successfully"),
|
|
865
|
+
error: z.string().describe("The error that occurred if the retrieval was unsuccessful").optional(),
|
|
866
|
+
results: z
|
|
867
|
+
.array(z.object({
|
|
868
|
+
name: z.string().describe("The name of the result"),
|
|
869
|
+
url: z.string().describe("The URL of the result"),
|
|
870
|
+
contents: z.object({}).catchall(z.any()).describe("The data of the Jira ticket"),
|
|
871
|
+
}))
|
|
872
|
+
.describe("The results of the Jira ticket")
|
|
873
|
+
.optional(),
|
|
874
|
+
});
|
|
875
|
+
export const jiraDataCenterGetJiraTicketHistoryParamsSchema = z.object({
|
|
876
|
+
projectKey: z.string().describe("The key for the project"),
|
|
877
|
+
issueId: z.string().describe("The ID of the ticket"),
|
|
878
|
+
});
|
|
879
|
+
export const jiraDataCenterGetJiraTicketHistoryOutputSchema = z.object({
|
|
880
|
+
success: z.boolean().describe("Whether the status was updated successfully"),
|
|
881
|
+
error: z.string().describe("The error that occurred if the retrieval was unsuccessful").optional(),
|
|
882
|
+
history: z.array(z.any()).describe("The history data of the Jira ticket").optional(),
|
|
883
|
+
});
|
|
884
|
+
export const jiraDataCenterUpdateJiraTicketDetailsParamsSchema = z.object({
|
|
885
|
+
projectKey: z.string().describe("The key for the project you want to add it to"),
|
|
886
|
+
issueId: z.string().describe("The issue ID associated with the ticket to be updated"),
|
|
887
|
+
summary: z.string().describe("The updated summary").optional(),
|
|
888
|
+
description: z.string().describe("The updated description").optional(),
|
|
889
|
+
issueType: z.string().describe("The updated issue type").optional(),
|
|
890
|
+
requestTypeId: z.string().describe("The request type ID for Jira Service Management tickets").optional(),
|
|
891
|
+
customFields: z
|
|
892
|
+
.object({})
|
|
893
|
+
.catchall(z.any())
|
|
894
|
+
.describe("Custom fields to be set on the update ticket request")
|
|
895
|
+
.optional(),
|
|
896
|
+
});
|
|
897
|
+
export const jiraDataCenterUpdateJiraTicketDetailsOutputSchema = z.object({
|
|
898
|
+
success: z.boolean().describe("Whether the ticket was successfully updated"),
|
|
899
|
+
ticketUrl: z.string().describe("The url to the Jira ticket (only present if success is true)").optional(),
|
|
900
|
+
error: z.string().describe("Error message if the ticket update failed (only present if success is false)").optional(),
|
|
901
|
+
});
|
|
902
|
+
export const jiraDataCenterUpdateJiraTicketStatusParamsSchema = z.object({
|
|
903
|
+
projectKey: z.string().describe("The key for the project you want to add it to"),
|
|
904
|
+
issueId: z.string().describe("The issue ID associated with the ticket"),
|
|
905
|
+
status: z.string().describe('The status the ticket should be changed to (eg "In Progress", "Closed")'),
|
|
906
|
+
});
|
|
907
|
+
export const jiraDataCenterUpdateJiraTicketStatusOutputSchema = z.object({
|
|
908
|
+
success: z.boolean().describe("Whether the status was updated successfully"),
|
|
909
|
+
error: z.string().describe("The error that occurred if the status was not updated successfully").optional(),
|
|
910
|
+
ticketUrl: z.string().describe("The url to the Jira ticket").optional(),
|
|
911
|
+
});
|
|
912
|
+
export const jiraDataCenterGetJiraIssuesByQueryParamsSchema = z.object({
|
|
913
|
+
query: z.string().describe("The JQL query to execute"),
|
|
914
|
+
limit: z.number().describe("The maximum number of records to retrieve").optional(),
|
|
915
|
+
});
|
|
916
|
+
export const jiraDataCenterGetJiraIssuesByQueryOutputSchema = z.object({
|
|
917
|
+
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
918
|
+
results: z
|
|
919
|
+
.array(z.object({
|
|
920
|
+
name: z.string().describe("The name of the result"),
|
|
921
|
+
url: z.string().describe("The URL of the result"),
|
|
922
|
+
contents: z
|
|
923
|
+
.object({
|
|
924
|
+
id: z.string().describe("Internal Jira issue ID"),
|
|
925
|
+
key: z.string().describe("Human-readable issue key (e.g. SSPR-123)"),
|
|
926
|
+
summary: z.string().describe("Summary of the issue"),
|
|
927
|
+
description: z.string().describe("Plain text description"),
|
|
928
|
+
url: z.string().describe("The web url of the Jira ticket"),
|
|
929
|
+
project: z.object({ id: z.string().optional(), key: z.string().optional(), name: z.string().optional() }),
|
|
930
|
+
issueType: z.object({ id: z.string().optional(), name: z.string().optional() }),
|
|
931
|
+
status: z.object({
|
|
932
|
+
id: z.string().optional(),
|
|
933
|
+
name: z.string().optional(),
|
|
934
|
+
category: z.string().optional(),
|
|
935
|
+
}),
|
|
936
|
+
assignee: z.string().nullable().describe("Email of the assignee, if any").optional(),
|
|
937
|
+
reporter: z.string().nullable().describe("Email of the reporter, if any").optional(),
|
|
938
|
+
creator: z.string().nullable().describe("Email of the creator, if any").optional(),
|
|
939
|
+
created: z.string().datetime({ offset: true }),
|
|
940
|
+
updated: z.string().datetime({ offset: true }),
|
|
941
|
+
resolution: z.string().nullable().optional(),
|
|
942
|
+
dueDate: z.string().date().nullable().optional(),
|
|
943
|
+
})
|
|
944
|
+
.describe("The result object containing issues"),
|
|
945
|
+
}))
|
|
946
|
+
.describe("The results of the Jira issues")
|
|
947
|
+
.optional(),
|
|
948
|
+
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
949
|
+
});
|
|
742
950
|
export const kandjiGetFVRecoveryKeyForDeviceParamsSchema = z.object({
|
|
743
951
|
userEmail: z.string().describe("The email of the user requesting the recovery key"),
|
|
744
952
|
subdomain: z.string().describe("The subdomain of the Kandji account"),
|
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, } 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",
|
|
@@ -47,6 +47,7 @@ export const ACTION_GROUPS = {
|
|
|
47
47
|
googleOauthUpdatePresentationDefinition,
|
|
48
48
|
googleOauthSearchDriveByKeywordsDefinition,
|
|
49
49
|
googleOauthSearchDriveByQueryDefinition,
|
|
50
|
+
googleOauthSearchDriveByQueryAndGetFileContentDefinition,
|
|
50
51
|
googleOauthGetDriveFileContentByIdDefinition,
|
|
51
52
|
],
|
|
52
53
|
},
|
|
@@ -198,6 +199,8 @@ export const ACTION_GROUPS = {
|
|
|
198
199
|
githubCreateBranchDefinition,
|
|
199
200
|
githubCreatePullRequestDefinition,
|
|
200
201
|
githubListPullRequestsDefinition,
|
|
202
|
+
githubGetFileContentDefinition,
|
|
203
|
+
githubListDirectoryDefinition,
|
|
201
204
|
],
|
|
202
205
|
},
|
|
203
206
|
ASHBY: {
|
|
@@ -245,4 +248,14 @@ export const ACTION_GROUPS = {
|
|
|
245
248
|
oktaTriggerOktaWorkflowDefinition,
|
|
246
249
|
],
|
|
247
250
|
},
|
|
251
|
+
LINEAR: {
|
|
252
|
+
description: "Actions for interacting with Linear",
|
|
253
|
+
actions: [
|
|
254
|
+
linearGetIssueDetailsDefinition,
|
|
255
|
+
linearGetProjectsDefinition,
|
|
256
|
+
linearGetProjectDetailsDefinition,
|
|
257
|
+
linearGetTeamDetailsDefinition,
|
|
258
|
+
linearGetTeamsDefinition,
|
|
259
|
+
],
|
|
260
|
+
},
|
|
248
261
|
};
|
package/dist/actions/invoke.js
CHANGED
|
@@ -20,7 +20,7 @@ export function invokeAction(input) {
|
|
|
20
20
|
if (!safeParseParams.success) {
|
|
21
21
|
throw new Error(`Invalid parameters for action '${name}': ${safeParseParams.error}`);
|
|
22
22
|
}
|
|
23
|
-
return providerFunction({ params: parameters, authParams });
|
|
23
|
+
return providerFunction({ params: parameters, authParams: Object.assign(Object.assign({}, authParams), { provider }) });
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
function isProviderName(value) {
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
function getConfluenceApi(baseUrl, username, apiToken) {
|
|
17
|
+
const api = axios_1.default.create({
|
|
18
|
+
baseURL: baseUrl,
|
|
19
|
+
headers: {
|
|
20
|
+
Accept: "application/json",
|
|
21
|
+
// Tokens are associated with a specific user.
|
|
22
|
+
Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
return api;
|
|
26
|
+
}
|
|
27
|
+
const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
28
|
+
const { pageId, username, content, title } = params;
|
|
29
|
+
const { baseUrl, authToken } = authParams;
|
|
30
|
+
const api = getConfluenceApi(baseUrl, username, authToken);
|
|
31
|
+
// Get current version number
|
|
32
|
+
const response = yield api.get(`/api/v2/pages/${pageId}`);
|
|
33
|
+
const currVersion = response.data.version.number;
|
|
34
|
+
yield api.put(`/api/v2/pages/${pageId}`, {
|
|
35
|
+
id: pageId,
|
|
36
|
+
status: "current",
|
|
37
|
+
title,
|
|
38
|
+
body: {
|
|
39
|
+
representation: "storage",
|
|
40
|
+
value: content,
|
|
41
|
+
},
|
|
42
|
+
version: {
|
|
43
|
+
number: currVersion + 1,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
exports.default = confluenceUpdatePage;
|
|
@@ -8,22 +8,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import axios from "axios";
|
|
11
|
-
import { getUserAccountIdFromEmail } from "./utils.js";
|
|
11
|
+
import { getUserAccountIdFromEmail, getJiraApiConfig, getErrorMessage } from "./utils.js";
|
|
12
12
|
const assignJiraTicket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
13
|
-
const { authToken
|
|
14
|
-
const apiUrl =
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const { authToken } = authParams;
|
|
14
|
+
const { apiUrl, browseUrl, strategy } = getJiraApiConfig(authParams);
|
|
15
|
+
const { issueId, assignee } = params;
|
|
16
|
+
if (!authToken) {
|
|
17
|
+
throw new Error("Auth token is required");
|
|
17
18
|
}
|
|
18
19
|
try {
|
|
19
|
-
let assigneeId =
|
|
20
|
+
let assigneeId = assignee;
|
|
20
21
|
if (assigneeId && assigneeId.includes("@")) {
|
|
21
|
-
assigneeId = yield getUserAccountIdFromEmail(assigneeId, apiUrl, authToken);
|
|
22
|
+
assigneeId = yield getUserAccountIdFromEmail(assigneeId, apiUrl, authToken, strategy);
|
|
22
23
|
}
|
|
23
24
|
if (!assigneeId) {
|
|
24
25
|
throw new Error("Unable to get valid assignee account ID.");
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
+
const assigneePayload = strategy.formatUser(assigneeId);
|
|
28
|
+
if (!assigneePayload) {
|
|
29
|
+
throw new Error("Unable to create assignee payload.");
|
|
30
|
+
}
|
|
31
|
+
yield axios.put(`${apiUrl}/issue/${issueId}/assignee`, assigneePayload, {
|
|
27
32
|
headers: {
|
|
28
33
|
Authorization: `Bearer ${authToken}`,
|
|
29
34
|
Accept: "application/json",
|
|
@@ -32,15 +37,14 @@ const assignJiraTicket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ pa
|
|
|
32
37
|
});
|
|
33
38
|
return {
|
|
34
39
|
success: true,
|
|
35
|
-
ticketUrl: `${
|
|
40
|
+
ticketUrl: `${browseUrl}/browse/${issueId}`,
|
|
36
41
|
};
|
|
37
42
|
}
|
|
38
43
|
catch (error) {
|
|
39
|
-
|
|
40
|
-
console.error("Error assigning issue:", axiosError);
|
|
44
|
+
console.error("Error assigning issue:", error);
|
|
41
45
|
return {
|
|
42
46
|
success: false,
|
|
43
|
-
error:
|
|
47
|
+
error: getErrorMessage(error),
|
|
44
48
|
};
|
|
45
49
|
}
|
|
46
50
|
});
|
|
@@ -8,29 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { axiosClient } from "../../util/axiosClient.js";
|
|
11
|
+
import { getJiraApiConfig, getErrorMessage } from "./utils.js";
|
|
11
12
|
const commentJiraTicket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
12
|
-
const { authToken
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const { authToken } = authParams;
|
|
14
|
+
const { apiUrl, browseUrl, strategy } = getJiraApiConfig(authParams);
|
|
15
|
+
const { issueId, comment } = params;
|
|
16
|
+
if (!authToken) {
|
|
17
|
+
throw new Error("Auth token is required");
|
|
15
18
|
}
|
|
16
|
-
const apiUrl = `https://api.atlassian.com/ex/jira/${cloudId}/rest/api/3/issue/${params.issueId}/comment`;
|
|
17
19
|
try {
|
|
18
|
-
const response = yield axiosClient.post(apiUrl
|
|
19
|
-
body:
|
|
20
|
-
type: "doc",
|
|
21
|
-
version: 1,
|
|
22
|
-
content: [
|
|
23
|
-
{
|
|
24
|
-
type: "paragraph",
|
|
25
|
-
content: [
|
|
26
|
-
{
|
|
27
|
-
type: "text",
|
|
28
|
-
text: params.comment,
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
20
|
+
const response = yield axiosClient.post(`${apiUrl}/issue/${issueId}/comment`, {
|
|
21
|
+
body: strategy.formatText(comment),
|
|
34
22
|
}, {
|
|
35
23
|
headers: {
|
|
36
24
|
Authorization: `Bearer ${authToken}`,
|
|
@@ -40,14 +28,14 @@ const commentJiraTicket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ p
|
|
|
40
28
|
});
|
|
41
29
|
return {
|
|
42
30
|
success: true,
|
|
43
|
-
commentUrl: `${
|
|
31
|
+
commentUrl: `${browseUrl}/browse/${issueId}?focusedCommentId=${response.data.id}`,
|
|
44
32
|
};
|
|
45
33
|
}
|
|
46
34
|
catch (error) {
|
|
47
35
|
console.error("Error commenting on Jira ticket: ", error);
|
|
48
36
|
return {
|
|
49
37
|
success: false,
|
|
50
|
-
error: error
|
|
38
|
+
error: getErrorMessage(error),
|
|
51
39
|
};
|
|
52
40
|
}
|
|
53
41
|
});
|
|
@@ -8,61 +8,51 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { axiosClient } from "../../util/axiosClient.js";
|
|
11
|
-
import {
|
|
11
|
+
import { resolveAccountIdIfEmail, resolveRequestTypeField, getJiraApiConfig, getErrorMessage } from "./utils.js";
|
|
12
12
|
const createJiraTicket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
13
|
-
const { authToken
|
|
14
|
-
const apiUrl =
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const { authToken } = authParams;
|
|
14
|
+
const { apiUrl, browseUrl, strategy } = getJiraApiConfig(authParams);
|
|
15
|
+
// authToken is guaranteed to exist after getJiraApiConfig succeeds
|
|
16
|
+
if (!authToken) {
|
|
17
|
+
throw new Error("Auth token is required");
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (params.assignee && typeof params.assignee === "string" && params.assignee.includes("@") && authToken) {
|
|
26
|
-
assigneeId = yield getUserAccountIdFromEmail(params.assignee, apiUrl, authToken);
|
|
27
|
-
}
|
|
28
|
-
// If request type is provided, find the custom field ID and prepare the value
|
|
29
|
-
const requestTypeField = {};
|
|
30
|
-
if (params.requestTypeId && authToken) {
|
|
31
|
-
const requestTypeFieldId = yield getRequestTypeCustomFieldId(params.projectKey, apiUrl, authToken);
|
|
32
|
-
if (requestTypeFieldId) {
|
|
33
|
-
requestTypeField[requestTypeFieldId] = params.requestTypeId;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
const description = {
|
|
37
|
-
type: "doc",
|
|
38
|
-
version: 1,
|
|
39
|
-
content: [
|
|
40
|
-
{
|
|
41
|
-
type: "paragraph",
|
|
42
|
-
content: [
|
|
43
|
-
{
|
|
44
|
-
type: "text",
|
|
45
|
-
text: params.description,
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
};
|
|
19
|
+
const [reporterId, assigneeId] = yield Promise.all([
|
|
20
|
+
resolveAccountIdIfEmail(params.reporter, apiUrl, authToken, strategy),
|
|
21
|
+
resolveAccountIdIfEmail(params.assignee, apiUrl, authToken, strategy),
|
|
22
|
+
]);
|
|
23
|
+
const { field: requestTypeField, message: partialUpdateMessage } = yield resolveRequestTypeField(params.requestTypeId, params.projectKey, apiUrl, authToken);
|
|
24
|
+
const reporterAssignment = strategy.formatUserAssignment(reporterId);
|
|
25
|
+
const assigneeAssignment = strategy.formatUserAssignment(assigneeId);
|
|
51
26
|
const payload = {
|
|
52
27
|
fields: Object.assign(Object.assign(Object.assign(Object.assign({ project: {
|
|
53
28
|
key: params.projectKey,
|
|
54
|
-
}, summary: params.summary, description: description, issuetype: {
|
|
29
|
+
}, summary: params.summary, description: strategy.formatText(params.description), issuetype: {
|
|
55
30
|
name: params.issueType,
|
|
56
|
-
} }, (
|
|
57
|
-
};
|
|
58
|
-
const response = yield axiosClient.post(`${apiUrl}/issue`, payload, {
|
|
59
|
-
headers: {
|
|
60
|
-
Authorization: `Bearer ${authToken}`,
|
|
61
|
-
Accept: "application/json",
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
return {
|
|
65
|
-
ticketUrl: `${baseUrl}/browse/${response.data.key}`,
|
|
31
|
+
} }, (reporterAssignment && { reporter: reporterAssignment })), (assigneeAssignment && { assignee: assigneeAssignment })), (Object.keys(requestTypeField).length > 0 && requestTypeField)), (params.customFields && params.customFields)),
|
|
66
32
|
};
|
|
33
|
+
try {
|
|
34
|
+
const response = yield axiosClient.post(`${apiUrl}/issue`, payload, {
|
|
35
|
+
headers: {
|
|
36
|
+
Authorization: `Bearer ${authToken}`,
|
|
37
|
+
Accept: "application/json",
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
const ticketKey = response.data.key;
|
|
41
|
+
if (!ticketKey) {
|
|
42
|
+
// Check if we got HTML instead of JSON (common when auth fails)
|
|
43
|
+
if (typeof response.data === "string" && response.data.includes("<!DOCTYPE html>")) {
|
|
44
|
+
throw new Error("Received HTML response instead of JSON - this usually indicates authentication failed or the server redirected to a login page");
|
|
45
|
+
}
|
|
46
|
+
console.error("No ticket key in response:", JSON.stringify(response.data, null, 2));
|
|
47
|
+
throw new Error("Failed to get ticket key from Jira response");
|
|
48
|
+
}
|
|
49
|
+
return Object.assign({ success: true, ticketUrl: `${browseUrl}/browse/${ticketKey}` }, (partialUpdateMessage && { error: partialUpdateMessage }));
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
return {
|
|
53
|
+
success: false,
|
|
54
|
+
error: getErrorMessage(error),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
67
57
|
});
|
|
68
58
|
export default createJiraTicket;
|