@credal/actions 0.2.225 → 0.2.228
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 +8 -1
- package/dist/actions/autogen/templates.d.ts +1 -0
- package/dist/actions/autogen/templates.js +48 -3
- package/dist/actions/autogen/types.d.ts +27 -0
- package/dist/actions/autogen/types.js +24 -3
- package/dist/actions/providers/github/searchRepository.js +7 -7
- package/dist/actions/providers/google-oauth/scheduleCalendarMeeting.js +2 -2
- package/dist/actions/providers/microsoft/createDocument.js +12 -2
- package/dist/actions/providers/microsoft/updateDocument.js +16 -3
- package/dist/actions/providers/microsoft/utils.d.ts +8 -0
- package/dist/actions/providers/microsoft/utils.js +21 -0
- package/dist/actions/providers/zendesk/searchZendeskTicketsByQuery.d.ts +3 -0
- package/dist/actions/providers/zendesk/searchZendeskTicketsByQuery.js +39 -0
- package/package.json +2 -3
- package/dist/actions/providers/ashby/addCandidateToProject.d.ts +0 -3
- package/dist/actions/providers/ashby/addCandidateToProject.js +0 -31
- package/dist/actions/providers/ashby/createCandidate.d.ts +0 -3
- package/dist/actions/providers/ashby/createCandidate.js +0 -38
- package/dist/actions/providers/ashby/createNote.d.ts +0 -3
- package/dist/actions/providers/ashby/createNote.js +0 -31
- package/dist/actions/providers/ashby/getCandidateInfo.d.ts +0 -3
- package/dist/actions/providers/ashby/getCandidateInfo.js +0 -33
- package/dist/actions/providers/ashby/listCandidateNotes.d.ts +0 -3
- package/dist/actions/providers/ashby/listCandidateNotes.js +0 -33
- package/dist/actions/providers/ashby/listCandidates.d.ts +0 -3
- package/dist/actions/providers/ashby/listCandidates.js +0 -30
- package/dist/actions/providers/ashby/searchCandidates.d.ts +0 -3
- package/dist/actions/providers/ashby/searchCandidates.js +0 -34
- package/dist/actions/providers/ashby/updateCandidate.d.ts +0 -3
- package/dist/actions/providers/ashby/updateCandidate.js +0 -56
- package/dist/actions/providers/gong/getGongTranscripts.d.ts +0 -3
- package/dist/actions/providers/gong/getGongTranscripts.js +0 -315
- package/dist/actions/providers/google-oauth/listFilesWithAssignedComments.d.ts +0 -3
- package/dist/actions/providers/google-oauth/listFilesWithAssignedComments.js +0 -41
- package/dist/actions/providers/jamf/getJamfComputerInventory.d.ts +0 -3
- package/dist/actions/providers/jamf/getJamfComputerInventory.js +0 -37
- package/dist/actions/providers/jamf/getJamfFileVaultRecoveryKey.d.ts +0 -3
- package/dist/actions/providers/jamf/getJamfFileVaultRecoveryKey.js +0 -39
- package/dist/actions/providers/jamf/getJamfUserComputerId.d.ts +0 -3
- package/dist/actions/providers/jamf/getJamfUserComputerId.js +0 -45
- package/dist/actions/providers/jamf/lockJamfComputerById.d.ts +0 -3
- package/dist/actions/providers/jamf/lockJamfComputerById.js +0 -39
- package/dist/actions/providers/jira/updateServiceDeskRequest.d.ts +0 -3
- package/dist/actions/providers/jira/updateServiceDeskRequest.js +0 -72
- package/dist/actions/providers/kandji/getFVRecoveryKeyForDevice.d.ts +0 -3
- package/dist/actions/providers/kandji/getFVRecoveryKeyForDevice.js +0 -85
- package/dist/actions/providers/microsoft/sendOutlookEmail.d.ts +0 -3
- package/dist/actions/providers/microsoft/sendOutlookEmail.js +0 -48
- package/dist/actions/providers/okta/addUserToGroup.d.ts +0 -3
- package/dist/actions/providers/okta/addUserToGroup.js +0 -56
- package/dist/actions/providers/okta/getOktaGroup.d.ts +0 -3
- package/dist/actions/providers/okta/getOktaGroup.js +0 -73
- package/dist/actions/providers/okta/getOktaUser.d.ts +0 -3
- package/dist/actions/providers/okta/getOktaUser.js +0 -40
- package/dist/actions/providers/okta/listMFA.d.ts +0 -3
- package/dist/actions/providers/okta/listMFA.js +0 -52
- package/dist/actions/providers/okta/listOktaGroupMembers.d.ts +0 -3
- package/dist/actions/providers/okta/listOktaGroupMembers.js +0 -99
- package/dist/actions/providers/okta/listOktaGroups.d.ts +0 -3
- package/dist/actions/providers/okta/listOktaGroups.js +0 -92
- package/dist/actions/providers/okta/listOktaUserGroups.d.ts +0 -3
- package/dist/actions/providers/okta/listOktaUserGroups.js +0 -83
- package/dist/actions/providers/okta/listOktaUsers.d.ts +0 -3
- package/dist/actions/providers/okta/listOktaUsers.js +0 -100
- package/dist/actions/providers/okta/removeUserFromGroup.d.ts +0 -3
- package/dist/actions/providers/okta/removeUserFromGroup.js +0 -56
- package/dist/actions/providers/okta/resetMFA.d.ts +0 -3
- package/dist/actions/providers/okta/resetMFA.js +0 -62
- package/dist/actions/providers/okta/resetPassword.d.ts +0 -3
- package/dist/actions/providers/okta/resetPassword.js +0 -57
- package/dist/actions/providers/okta/triggerOktaWorkflow.d.ts +0 -3
- package/dist/actions/providers/okta/triggerOktaWorkflow.js +0 -44
- package/dist/actions/providers/salesforce/fetchSalesforceSchema.d.ts +0 -3
- package/dist/actions/providers/salesforce/fetchSalesforceSchema.js +0 -40
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { genericFillTemplateParamsSchema, genericFillTemplateOutputSchema, confluenceOverwritePageParamsSchema, confluenceOverwritePageOutputSchema, googlemapsValidateAddressOutputSchema, googlemapsValidateAddressParamsSchema, googleOauthCreateNewGoogleDocParamsSchema, googleOauthCreateNewGoogleDocOutputSchema, mathAddOutputSchema, mathAddParamsSchema, mongoInsertMongoDocOutputSchema, mongoInsertMongoDocParamsSchema, slackSendMessageOutputSchema, slackSendMessageParamsSchema, slackGetChannelMessagesOutputSchema, slackGetChannelMessagesParamsSchema, slackCreateChannelParamsSchema, slackCreateChannelOutputSchema, snowflakeGetRowByFieldValueOutputSchema, snowflakeGetRowByFieldValueParamsSchema, zendeskCreateZendeskTicketOutputSchema, zendeskCreateZendeskTicketParamsSchema, zendeskGetTicketDetailsOutputSchema, zendeskGetTicketDetailsParamsSchema, zendeskUpdateTicketStatusOutputSchema, zendeskUpdateTicketStatusParamsSchema, zendeskAddCommentToTicketOutputSchema, zendeskAddCommentToTicketParamsSchema, zendeskAssignTicketOutputSchema, zendeskAssignTicketParamsSchema, zendeskListZendeskTicketsOutputSchema, zendeskListZendeskTicketsParamsSchema, zendeskSearchZendeskByQueryOutputSchema, zendeskSearchZendeskByQueryParamsSchema, servicenowGetRecordsByQueryOutputSchema, servicenowGetRecordsByQueryParamsSchema, servicenowGetIncidentsOutputSchema, servicenowGetIncidentsParamsSchema, servicenowGetChangeRequestsOutputSchema, servicenowGetChangeRequestsParamsSchema, servicenowGetSCTasksOutputSchema, servicenowGetSCTasksParamsSchema, servicenowGetVIPTicketsOutputSchema, servicenowGetVIPTicketsParamsSchema, jiraAssignJiraTicketParamsSchema, jiraAssignJiraTicketOutputSchema, jiraCommentJiraTicketParamsSchema, jiraCommentJiraTicketOutputSchema, jiraCommentJiraTicketWithMentionsParamsSchema, jiraCommentJiraTicketWithMentionsOutputSchema, jiraCreateJiraTicketParamsSchema, jiraCreateJiraTicketOutputSchema, jiraGetJiraTicketDetailsParamsSchema, jiraGetJiraTicketDetailsOutputSchema, jiraGetJiraTicketHistoryParamsSchema, jiraGetJiraTicketHistoryOutputSchema, jiraMoveJiraTicketToProjectParamsSchema, jiraMoveJiraTicketToProjectOutputSchema, jiraUpdateJiraTicketDetailsParamsSchema, jiraUpdateJiraTicketDetailsOutputSchema, jiraUpdateJiraTicketStatusParamsSchema, jiraUpdateJiraTicketStatusOutputSchema, jiraCreateServiceDeskRequestParamsSchema, jiraCreateServiceDeskRequestOutputSchema, jiraLinkJiraIssuesParamsSchema, jiraLinkJiraIssuesOutputSchema, jiraLinkAndAssignJiraIssuesParamsSchema, jiraLinkAndAssignJiraIssuesOutputSchema, openstreetmapGetLatitudeLongitudeFromLocationParamsSchema, openstreetmapGetLatitudeLongitudeFromLocationOutputSchema, nwsGetForecastForLocationParamsSchema, nwsGetForecastForLocationOutputSchema, googlemapsNearbysearchRestaurantsOutputSchema, googlemapsNearbysearchRestaurantsParamsSchema, firecrawlScrapeUrlOutputSchema, firecrawlScrapeUrlParamsSchema, resendSendEmailOutputSchema, resendSendEmailHtmlParamsSchema, resendSendEmailHtmlOutputSchema, firecrawlScrapeTweetDataWithNitterParamsSchema, firecrawlScrapeTweetDataWithNitterOutputSchema, resendSendEmailParamsSchema, linkedinCreateShareLinkedinPostUrlParamsSchema, linkedinCreateShareLinkedinPostUrlOutputSchema, xCreateShareXPostUrlParamsSchema, xCreateShareXPostUrlOutputSchema, finnhubSymbolLookupParamsSchema, finnhubSymbolLookupOutputSchema, finnhubGetBasicFinancialsParamsSchema, finnhubGetBasicFinancialsOutputSchema, confluenceFetchPageContentParamsSchema, confluenceFetchPageContentOutputSchema, confluenceDataCenterOverwritePageParamsSchema, confluenceDataCenterOverwritePageOutputSchema, confluenceDataCenterCreatePageParamsSchema, confluenceDataCenterCreatePageOutputSchema, confluenceDataCenterFetchPageContentParamsSchema, confluenceDataCenterFetchPageContentOutputSchema, snowflakeRunSnowflakeQueryParamsSchema, snowflakeRunSnowflakeQueryOutputSchema, lookerEnableUserByEmailParamsSchema, lookerEnableUserByEmailOutputSchema, googleOauthUpdateDocParamsSchema, googleOauthUpdateDocOutputSchema, googleOauthAddTextToTopOfDocParamsSchema, googleOauthAddTextToTopOfDocOutputSchema, googleOauthCreateSpreadsheetParamsSchema, googleOauthCreateSpreadsheetOutputSchema, googleOauthGetSpreadsheetMetadataParamsSchema, googleOauthGetSpreadsheetMetadataOutputSchema, googleOauthUpdateSpreadsheetParamsSchema, googleOauthUpdateSpreadsheetOutputSchema, googleOauthAppendRowsToSpreadsheetParamsSchema, googleOauthAppendRowsToSpreadsheetOutputSchema, googleOauthDeleteRowFromSpreadsheetParamsSchema, googleOauthDeleteRowFromSpreadsheetOutputSchema, googleOauthScheduleCalendarMeetingParamsSchema, googleOauthScheduleCalendarMeetingOutputSchema, googleOauthListCalendarsParamsSchema, googleOauthListCalendarsOutputSchema, googleOauthListCalendarEventsParamsSchema, googleOauthListCalendarEventsOutputSchema, googleOauthUpdateCalendarEventParamsSchema, googleOauthUpdateCalendarEventOutputSchema, googleOauthDeleteCalendarEventParamsSchema, googleOauthDeleteCalendarEventOutputSchema, googleOauthEditAGoogleCalendarEventParamsSchema, googleOauthEditAGoogleCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthGetPresentationParamsSchema, googleOauthGetPresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, microsoftGetSharepointItemParamsSchema, microsoftGetSharepointItemOutputSchema, microsoftListSharepointFolderParamsSchema, microsoftListSharepointFolderOutputSchema, microsoftReadSharepointContentParamsSchema, microsoftReadSharepointContentOutputSchema, microsoftSearchSharepointParamsSchema, microsoftSearchSharepointOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, jiraDataCenterGetJiraIssuesByQueryOutputSchema, jiraDataCenterGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchOrganizationOutputSchema, githubSearchOrganizationParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, googleOauthSearchDriveByQueryOutputSchema, googleOauthSearchDriveByQueryParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentOutputSchema, googleOauthQueryGoogleBigQueryParamsSchema, googleOauthQueryGoogleBigQueryOutputSchema, githubGetFileContentParamsSchema, githubGetFileContentOutputSchema, githubListDirectoryOutputSchema, githubListDirectoryParamsSchema, githubGetBranchParamsSchema, githubGetBranchOutputSchema, githubListCommitsParamsSchema, githubListCommitsOutputSchema, githubGetPullRequestDetailsParamsSchema, githubGetPullRequestDetailsOutputSchema, linearGetIssuesParamsSchema, linearGetIssuesOutputSchema, linearGetIssueDetailsParamsSchema, linearGetIssueDetailsOutputSchema, linearGetProjectDetailsParamsSchema, linearGetProjectDetailsOutputSchema, linearGetTeamDetailsParamsSchema, linearGetTeamDetailsOutputSchema, linearGetProjectsParamsSchema, linearGetProjectsOutputSchema, linearGetTeamsParamsSchema, linearGetTeamsOutputSchema, linearCreateIssueParamsSchema, linearCreateIssueOutputSchema, hubspotGetContactsParamsSchema, hubspotGetContactsOutputSchema, hubspotGetContactDetailsParamsSchema, hubspotGetContactDetailsOutputSchema, hubspotGetCompaniesParamsSchema, hubspotGetCompaniesOutputSchema, hubspotGetCompanyDetailsParamsSchema, hubspotGetCompanyDetailsOutputSchema, hubspotGetDealsParamsSchema, hubspotGetDealsOutputSchema, hubspotGetDealDetailsParamsSchema, hubspotGetDealDetailsOutputSchema, hubspotGetTicketsParamsSchema, hubspotGetTicketsOutputSchema, hubspotGetTicketDetailsParamsSchema, hubspotGetTicketDetailsOutputSchema, gitlabGetFileContentParamsSchema, gitlabGetFileContentOutputSchema, gitlabGetMergeRequestParamsSchema, gitlabGetMergeRequestOutputSchema, jiraPublicCommentOnServiceDeskRequestParamsSchema, jiraPublicCommentOnServiceDeskRequestOutputSchema, googlemailSendGmailParamsSchema, googlemailSendGmailOutputSchema, googlemailReplyToGmailParamsSchema, googlemailReplyToGmailOutputSchema, gitlabListDirectoryParamsSchema, gitlabListDirectoryOutputSchema, firecrawlSearchAndScrapeOutputSchema, firecrawlSearchAndScrapeParamsSchema, firecrawlGetTopNSearchResultUrlsParamsSchema, firecrawlGetTopNSearchResultUrlsOutputSchema, googleOauthSearchDriveByKeywordsAndGetFileContentParamsSchema, googleOauthSearchDriveByKeywordsAndGetFileContentOutputSchema, perplexityPerplexityDeepResearchParamsSchema, perplexityPerplexityDeepResearchOutputSchema, slackUserSearchSlackParamsSchema, slackUserSearchSlackOutputSchema, slackUserSearchSlackRTSParamsSchema, slackUserSearchSlackRTSOutputSchema, oktaOrgGetOktaUserByNameParamsSchema, oktaOrgGetOktaUserByNameOutputSchema, googleSearchCustomSearchParamsSchema, googleSearchCustomSearchOutputSchema, salesforceSearchAllSalesforceRecordsParamsSchema, salesforceSearchAllSalesforceRecordsOutputSchema, salesforceListReportsParamsSchema, salesforceListReportsOutputSchema, salesforceExecuteReportParamsSchema, salesforceExecuteReportOutputSchema, slackSendDmFromBotParamsSchema, slackSendDmFromBotOutputSchema, slackGetChannelMembersParamsSchema, slackGetChannelMembersOutputSchema, salesforceGetReportMetadataParamsSchema, salesforceGetReportMetadataOutputSchema, googleOauthUpdateRowsInSpreadsheetParamsSchema, googleOauthUpdateRowsInSpreadsheetOutputSchema, smartsheetListSheetsParamsSchema, smartsheetListSheetsOutputSchema, smartsheetGetSheetRowsParamsSchema, smartsheetGetSheetRowsOutputSchema, smartsheetAddRowToSheetParamsSchema, smartsheetAddRowToSheetOutputSchema, smartsheetUpdateRowParamsSchema, smartsheetUpdateRowOutputSchema, } from "./autogen/types.js";
|
|
1
|
+
import { genericFillTemplateParamsSchema, genericFillTemplateOutputSchema, confluenceOverwritePageParamsSchema, confluenceOverwritePageOutputSchema, googlemapsValidateAddressOutputSchema, googlemapsValidateAddressParamsSchema, googleOauthCreateNewGoogleDocParamsSchema, googleOauthCreateNewGoogleDocOutputSchema, mathAddOutputSchema, mathAddParamsSchema, mongoInsertMongoDocOutputSchema, mongoInsertMongoDocParamsSchema, slackSendMessageOutputSchema, slackSendMessageParamsSchema, slackGetChannelMessagesOutputSchema, slackGetChannelMessagesParamsSchema, slackCreateChannelParamsSchema, slackCreateChannelOutputSchema, snowflakeGetRowByFieldValueOutputSchema, snowflakeGetRowByFieldValueParamsSchema, zendeskCreateZendeskTicketOutputSchema, zendeskCreateZendeskTicketParamsSchema, zendeskGetTicketDetailsOutputSchema, zendeskGetTicketDetailsParamsSchema, zendeskUpdateTicketStatusOutputSchema, zendeskUpdateTicketStatusParamsSchema, zendeskAddCommentToTicketOutputSchema, zendeskAddCommentToTicketParamsSchema, zendeskAssignTicketOutputSchema, zendeskAssignTicketParamsSchema, zendeskListZendeskTicketsOutputSchema, zendeskListZendeskTicketsParamsSchema, zendeskSearchZendeskByQueryOutputSchema, zendeskSearchZendeskByQueryParamsSchema, zendeskSearchZendeskTicketsByQueryOutputSchema, zendeskSearchZendeskTicketsByQueryParamsSchema, servicenowGetRecordsByQueryOutputSchema, servicenowGetRecordsByQueryParamsSchema, servicenowGetIncidentsOutputSchema, servicenowGetIncidentsParamsSchema, servicenowGetChangeRequestsOutputSchema, servicenowGetChangeRequestsParamsSchema, servicenowGetSCTasksOutputSchema, servicenowGetSCTasksParamsSchema, servicenowGetVIPTicketsOutputSchema, servicenowGetVIPTicketsParamsSchema, jiraAssignJiraTicketParamsSchema, jiraAssignJiraTicketOutputSchema, jiraCommentJiraTicketParamsSchema, jiraCommentJiraTicketOutputSchema, jiraCommentJiraTicketWithMentionsParamsSchema, jiraCommentJiraTicketWithMentionsOutputSchema, jiraCreateJiraTicketParamsSchema, jiraCreateJiraTicketOutputSchema, jiraGetJiraTicketDetailsParamsSchema, jiraGetJiraTicketDetailsOutputSchema, jiraGetJiraTicketHistoryParamsSchema, jiraGetJiraTicketHistoryOutputSchema, jiraMoveJiraTicketToProjectParamsSchema, jiraMoveJiraTicketToProjectOutputSchema, jiraUpdateJiraTicketDetailsParamsSchema, jiraUpdateJiraTicketDetailsOutputSchema, jiraUpdateJiraTicketStatusParamsSchema, jiraUpdateJiraTicketStatusOutputSchema, jiraCreateServiceDeskRequestParamsSchema, jiraCreateServiceDeskRequestOutputSchema, jiraLinkJiraIssuesParamsSchema, jiraLinkJiraIssuesOutputSchema, jiraLinkAndAssignJiraIssuesParamsSchema, jiraLinkAndAssignJiraIssuesOutputSchema, openstreetmapGetLatitudeLongitudeFromLocationParamsSchema, openstreetmapGetLatitudeLongitudeFromLocationOutputSchema, nwsGetForecastForLocationParamsSchema, nwsGetForecastForLocationOutputSchema, googlemapsNearbysearchRestaurantsOutputSchema, googlemapsNearbysearchRestaurantsParamsSchema, firecrawlScrapeUrlOutputSchema, firecrawlScrapeUrlParamsSchema, resendSendEmailOutputSchema, resendSendEmailHtmlParamsSchema, resendSendEmailHtmlOutputSchema, firecrawlScrapeTweetDataWithNitterParamsSchema, firecrawlScrapeTweetDataWithNitterOutputSchema, resendSendEmailParamsSchema, linkedinCreateShareLinkedinPostUrlParamsSchema, linkedinCreateShareLinkedinPostUrlOutputSchema, xCreateShareXPostUrlParamsSchema, xCreateShareXPostUrlOutputSchema, finnhubSymbolLookupParamsSchema, finnhubSymbolLookupOutputSchema, finnhubGetBasicFinancialsParamsSchema, finnhubGetBasicFinancialsOutputSchema, confluenceFetchPageContentParamsSchema, confluenceFetchPageContentOutputSchema, confluenceDataCenterOverwritePageParamsSchema, confluenceDataCenterOverwritePageOutputSchema, confluenceDataCenterCreatePageParamsSchema, confluenceDataCenterCreatePageOutputSchema, confluenceDataCenterFetchPageContentParamsSchema, confluenceDataCenterFetchPageContentOutputSchema, snowflakeRunSnowflakeQueryParamsSchema, snowflakeRunSnowflakeQueryOutputSchema, lookerEnableUserByEmailParamsSchema, lookerEnableUserByEmailOutputSchema, googleOauthUpdateDocParamsSchema, googleOauthUpdateDocOutputSchema, googleOauthAddTextToTopOfDocParamsSchema, googleOauthAddTextToTopOfDocOutputSchema, googleOauthCreateSpreadsheetParamsSchema, googleOauthCreateSpreadsheetOutputSchema, googleOauthGetSpreadsheetMetadataParamsSchema, googleOauthGetSpreadsheetMetadataOutputSchema, googleOauthUpdateSpreadsheetParamsSchema, googleOauthUpdateSpreadsheetOutputSchema, googleOauthAppendRowsToSpreadsheetParamsSchema, googleOauthAppendRowsToSpreadsheetOutputSchema, googleOauthDeleteRowFromSpreadsheetParamsSchema, googleOauthDeleteRowFromSpreadsheetOutputSchema, googleOauthScheduleCalendarMeetingParamsSchema, googleOauthScheduleCalendarMeetingOutputSchema, googleOauthListCalendarsParamsSchema, googleOauthListCalendarsOutputSchema, googleOauthListCalendarEventsParamsSchema, googleOauthListCalendarEventsOutputSchema, googleOauthUpdateCalendarEventParamsSchema, googleOauthUpdateCalendarEventOutputSchema, googleOauthDeleteCalendarEventParamsSchema, googleOauthDeleteCalendarEventOutputSchema, googleOauthEditAGoogleCalendarEventParamsSchema, googleOauthEditAGoogleCalendarEventOutputSchema, googleOauthCreatePresentationParamsSchema, googleOauthCreatePresentationOutputSchema, googleOauthUpdatePresentationParamsSchema, googleOauthUpdatePresentationOutputSchema, googleOauthGetPresentationParamsSchema, googleOauthGetPresentationOutputSchema, googleOauthSearchDriveByKeywordsParamsSchema, googleOauthSearchDriveByKeywordsOutputSchema, googleOauthListGroupsOutputSchema, googleOauthListGroupsParamsSchema, googleOauthGetGroupOutputSchema, googleOauthGetGroupParamsSchema, googleOauthListGroupMembersOutputSchema, googleOauthListGroupMembersParamsSchema, googleOauthHasGroupMemberOutputSchema, googleOauthHasGroupMemberParamsSchema, googleOauthAddGroupMemberOutputSchema, googleOauthAddGroupMemberParamsSchema, googleOauthDeleteGroupMemberOutputSchema, googleOauthDeleteGroupMemberParamsSchema, salesforceUpdateRecordParamsSchema, salesforceUpdateRecordOutputSchema, salesforceCreateCaseParamsSchema, salesforceCreateCaseOutputSchema, salesforceGenerateSalesReportParamsSchema, salesforceGenerateSalesReportOutputSchema, salesforceGetRecordParamsSchema, salesforceGetRecordOutputSchema, microsoftMessageTeamsChatParamsSchema, microsoftMessageTeamsChatOutputSchema, microsoftMessageTeamsChannelParamsSchema, microsoftMessageTeamsChannelOutputSchema, salesforceGetSalesforceRecordsByQueryParamsSchema, salesforceGetSalesforceRecordsByQueryOutputSchema, asanaCommentTaskParamsSchema, asanaCommentTaskOutputSchema, asanaCreateTaskParamsSchema, asanaCreateTaskOutputSchema, asanaUpdateTaskParamsSchema, asanaUpdateTaskOutputSchema, githubCreateOrUpdateFileParamsSchema, githubCreateOrUpdateFileOutputSchema, githubCreateBranchParamsSchema, githubCreateBranchOutputSchema, githubCreatePullRequestParamsSchema, githubCreatePullRequestOutputSchema, microsoftUpdateSpreadsheetParamsSchema, microsoftUpdateSpreadsheetOutputSchema, microsoftUpdateDocumentParamsSchema, microsoftUpdateDocumentOutputSchema, microsoftGetDocumentParamsSchema, microsoftGetDocumentOutputSchema, microsoftGetSharepointItemParamsSchema, microsoftGetSharepointItemOutputSchema, microsoftListSharepointFolderParamsSchema, microsoftListSharepointFolderOutputSchema, microsoftReadSharepointContentParamsSchema, microsoftReadSharepointContentOutputSchema, microsoftSearchSharepointParamsSchema, microsoftSearchSharepointOutputSchema, githubListPullRequestsParamsSchema, githubListPullRequestsOutputSchema, jiraGetJiraIssuesByQueryOutputSchema, jiraGetJiraIssuesByQueryParamsSchema, jiraDataCenterGetJiraIssuesByQueryOutputSchema, jiraDataCenterGetJiraIssuesByQueryParamsSchema, salesforceCreateRecordParamsSchema, salesforceCreateRecordOutputSchema, firecrawlDeepResearchParamsSchema, firecrawlDeepResearchOutputSchema, bingGetTopNSearchResultUrlsParamsSchema, bingGetTopNSearchResultUrlsOutputSchema, microsoftCreateDocumentParamsSchema, microsoftCreateDocumentOutputSchema, asanaListAsanaTasksByProjectParamsSchema, asanaListAsanaTasksByProjectOutputSchema, asanaSearchTasksParamsSchema, asanaSearchTasksOutputSchema, asanaGetTasksDetailsParamsSchema, asanaGetTasksDetailsOutputSchema, notionSearchByTitleParamsSchema, notionSearchByTitleOutputSchema, googlemailSearchGmailMessagesOutputSchema, googlemailSearchGmailMessagesParamsSchema, googlemailListGmailThreadsOutputSchema, googlemailListGmailThreadsParamsSchema, gitlabSearchGroupOutputSchema, gitlabSearchGroupParamsSchema, githubSearchOrganizationOutputSchema, githubSearchOrganizationParamsSchema, salesforceSearchSalesforceRecordsParamsSchema, salesforceSearchSalesforceRecordsOutputSchema, googleOauthGetDriveFileContentByIdOutputSchema, googleOauthGetDriveFileContentByIdParamsSchema, googleOauthSearchDriveByQueryOutputSchema, googleOauthSearchDriveByQueryParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentParamsSchema, googleOauthSearchDriveByQueryAndGetFileContentOutputSchema, googleOauthQueryGoogleBigQueryParamsSchema, googleOauthQueryGoogleBigQueryOutputSchema, githubGetFileContentParamsSchema, githubGetFileContentOutputSchema, githubListDirectoryOutputSchema, githubListDirectoryParamsSchema, githubGetBranchParamsSchema, githubGetBranchOutputSchema, githubListCommitsParamsSchema, githubListCommitsOutputSchema, githubGetPullRequestDetailsParamsSchema, githubGetPullRequestDetailsOutputSchema, linearGetIssuesParamsSchema, linearGetIssuesOutputSchema, linearGetIssueDetailsParamsSchema, linearGetIssueDetailsOutputSchema, linearGetProjectDetailsParamsSchema, linearGetProjectDetailsOutputSchema, linearGetTeamDetailsParamsSchema, linearGetTeamDetailsOutputSchema, linearGetProjectsParamsSchema, linearGetProjectsOutputSchema, linearGetTeamsParamsSchema, linearGetTeamsOutputSchema, linearCreateIssueParamsSchema, linearCreateIssueOutputSchema, hubspotGetContactsParamsSchema, hubspotGetContactsOutputSchema, hubspotGetContactDetailsParamsSchema, hubspotGetContactDetailsOutputSchema, hubspotGetCompaniesParamsSchema, hubspotGetCompaniesOutputSchema, hubspotGetCompanyDetailsParamsSchema, hubspotGetCompanyDetailsOutputSchema, hubspotGetDealsParamsSchema, hubspotGetDealsOutputSchema, hubspotGetDealDetailsParamsSchema, hubspotGetDealDetailsOutputSchema, hubspotGetTicketsParamsSchema, hubspotGetTicketsOutputSchema, hubspotGetTicketDetailsParamsSchema, hubspotGetTicketDetailsOutputSchema, gitlabGetFileContentParamsSchema, gitlabGetFileContentOutputSchema, gitlabGetMergeRequestParamsSchema, gitlabGetMergeRequestOutputSchema, jiraPublicCommentOnServiceDeskRequestParamsSchema, jiraPublicCommentOnServiceDeskRequestOutputSchema, googlemailSendGmailParamsSchema, googlemailSendGmailOutputSchema, googlemailReplyToGmailParamsSchema, googlemailReplyToGmailOutputSchema, gitlabListDirectoryParamsSchema, gitlabListDirectoryOutputSchema, firecrawlSearchAndScrapeOutputSchema, firecrawlSearchAndScrapeParamsSchema, firecrawlGetTopNSearchResultUrlsParamsSchema, firecrawlGetTopNSearchResultUrlsOutputSchema, googleOauthSearchDriveByKeywordsAndGetFileContentParamsSchema, googleOauthSearchDriveByKeywordsAndGetFileContentOutputSchema, perplexityPerplexityDeepResearchParamsSchema, perplexityPerplexityDeepResearchOutputSchema, slackUserSearchSlackParamsSchema, slackUserSearchSlackOutputSchema, slackUserSearchSlackRTSParamsSchema, slackUserSearchSlackRTSOutputSchema, oktaOrgGetOktaUserByNameParamsSchema, oktaOrgGetOktaUserByNameOutputSchema, googleSearchCustomSearchParamsSchema, googleSearchCustomSearchOutputSchema, salesforceSearchAllSalesforceRecordsParamsSchema, salesforceSearchAllSalesforceRecordsOutputSchema, salesforceListReportsParamsSchema, salesforceListReportsOutputSchema, salesforceExecuteReportParamsSchema, salesforceExecuteReportOutputSchema, slackSendDmFromBotParamsSchema, slackSendDmFromBotOutputSchema, slackGetChannelMembersParamsSchema, slackGetChannelMembersOutputSchema, salesforceGetReportMetadataParamsSchema, salesforceGetReportMetadataOutputSchema, googleOauthUpdateRowsInSpreadsheetParamsSchema, googleOauthUpdateRowsInSpreadsheetOutputSchema, smartsheetListSheetsParamsSchema, smartsheetListSheetsOutputSchema, smartsheetGetSheetRowsParamsSchema, smartsheetGetSheetRowsOutputSchema, smartsheetAddRowToSheetParamsSchema, smartsheetAddRowToSheetOutputSchema, smartsheetUpdateRowParamsSchema, smartsheetUpdateRowOutputSchema, } from "./autogen/types.js";
|
|
2
2
|
import validateAddress from "./providers/googlemaps/validateAddress.js";
|
|
3
3
|
import add from "./providers/math/add.js";
|
|
4
4
|
import fillTemplate from "./providers/generic/fillTemplate.js";
|
|
@@ -14,6 +14,7 @@ import addCommentToTicket from "./providers/zendesk/addCommentToTicket.js";
|
|
|
14
14
|
import assignTicket from "./providers/zendesk/assignTicket.js";
|
|
15
15
|
import listZendeskTickets from "./providers/zendesk/listTickets.js";
|
|
16
16
|
import searchZendeskByQuery from "./providers/zendesk/searchZendeskByQuery.js";
|
|
17
|
+
import searchZendeskTicketsByQuery from "./providers/zendesk/searchZendeskTicketsByQuery.js";
|
|
17
18
|
import getServiceNowRecordsByQuery from "./providers/servicenow/getRecordsByQuery.js";
|
|
18
19
|
import getServiceNowIncidents from "./providers/servicenow/getIncidents.js";
|
|
19
20
|
import getServiceNowChangeRequests from "./providers/servicenow/getChangeRequests.js";
|
|
@@ -446,6 +447,12 @@ export const ActionMapper = {
|
|
|
446
447
|
outputSchema: zendeskSearchZendeskByQueryOutputSchema,
|
|
447
448
|
actionType: "read",
|
|
448
449
|
},
|
|
450
|
+
searchZendeskTicketsByQuery: {
|
|
451
|
+
fn: searchZendeskTicketsByQuery,
|
|
452
|
+
paramsSchema: zendeskSearchZendeskTicketsByQueryParamsSchema,
|
|
453
|
+
outputSchema: zendeskSearchZendeskTicketsByQueryOutputSchema,
|
|
454
|
+
actionType: "read",
|
|
455
|
+
},
|
|
449
456
|
},
|
|
450
457
|
servicenow: {
|
|
451
458
|
getRecordsByQuery: {
|
|
@@ -72,6 +72,7 @@ export declare const zendeskUpdateTicketStatusDefinition: ActionTemplate;
|
|
|
72
72
|
export declare const zendeskAddCommentToTicketDefinition: ActionTemplate;
|
|
73
73
|
export declare const zendeskAssignTicketDefinition: ActionTemplate;
|
|
74
74
|
export declare const zendeskSearchZendeskByQueryDefinition: ActionTemplate;
|
|
75
|
+
export declare const zendeskSearchZendeskTicketsByQueryDefinition: ActionTemplate;
|
|
75
76
|
export declare const linkedinCreateShareLinkedinPostUrlDefinition: ActionTemplate;
|
|
76
77
|
export declare const xCreateShareXPostUrlDefinition: ActionTemplate;
|
|
77
78
|
export declare const mongoInsertMongoDocDefinition: ActionTemplate;
|
|
@@ -4665,6 +4665,51 @@ export const zendeskSearchZendeskByQueryDefinition = {
|
|
|
4665
4665
|
name: "searchZendeskByQuery",
|
|
4666
4666
|
provider: "zendesk",
|
|
4667
4667
|
};
|
|
4668
|
+
export const zendeskSearchZendeskTicketsByQueryDefinition = {
|
|
4669
|
+
displayName: "Search Zendesk tickets with a query",
|
|
4670
|
+
description: "Search Zendesk tickets by query with flexible filtering options. Only returns tickets, never any other type of Zendesk resource.",
|
|
4671
|
+
scopes: [],
|
|
4672
|
+
tags: [],
|
|
4673
|
+
parameters: {
|
|
4674
|
+
type: "object",
|
|
4675
|
+
required: ["subdomain", "query"],
|
|
4676
|
+
properties: {
|
|
4677
|
+
subdomain: {
|
|
4678
|
+
type: "string",
|
|
4679
|
+
pattern: "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$",
|
|
4680
|
+
description: "The hostname-label subdomain of the Zendesk account, without a protocol, path, or .zendesk.com suffix",
|
|
4681
|
+
tags: ["recommend-predefined"],
|
|
4682
|
+
},
|
|
4683
|
+
query: {
|
|
4684
|
+
type: "string",
|
|
4685
|
+
description: 'Search query string that can include filters like status, priority, tags, assignee, etc. Examples - status:open, priority:high, tags:bug, assignee:user@example.com, or combination like "status:open priority:high". The search is always restricted to tickets, so any type filter in the query is ignored.',
|
|
4686
|
+
},
|
|
4687
|
+
limit: {
|
|
4688
|
+
type: "number",
|
|
4689
|
+
description: "Maximum number of tickets to return (optional, defaults to 100)",
|
|
4690
|
+
},
|
|
4691
|
+
},
|
|
4692
|
+
},
|
|
4693
|
+
output: {
|
|
4694
|
+
type: "object",
|
|
4695
|
+
required: ["results", "count"],
|
|
4696
|
+
properties: {
|
|
4697
|
+
results: {
|
|
4698
|
+
type: "array",
|
|
4699
|
+
description: "List of tickets matching the query",
|
|
4700
|
+
items: {
|
|
4701
|
+
type: "object",
|
|
4702
|
+
},
|
|
4703
|
+
},
|
|
4704
|
+
count: {
|
|
4705
|
+
type: "number",
|
|
4706
|
+
description: "Number of tickets found",
|
|
4707
|
+
},
|
|
4708
|
+
},
|
|
4709
|
+
},
|
|
4710
|
+
name: "searchZendeskTicketsByQuery",
|
|
4711
|
+
provider: "zendesk",
|
|
4712
|
+
};
|
|
4668
4713
|
export const linkedinCreateShareLinkedinPostUrlDefinition = {
|
|
4669
4714
|
displayName: "Create a share LinkedIn post URL",
|
|
4670
4715
|
description: "Create a share LinkedIn post link",
|
|
@@ -11492,11 +11537,11 @@ export const microsoftCreateDocumentDefinition = {
|
|
|
11492
11537
|
},
|
|
11493
11538
|
name: {
|
|
11494
11539
|
type: "string",
|
|
11495
|
-
description: "The name of the new document (
|
|
11540
|
+
description: "The name of the new document, including the extension. Use .docx for a Word document (the content is converted into a real Word file) or a plain-text extension like .txt or .md. Other Office extensions (.doc, .xlsx, .xls, .pptx, .ppt) are not supported and will be rejected",
|
|
11496
11541
|
},
|
|
11497
11542
|
content: {
|
|
11498
11543
|
type: "string",
|
|
11499
|
-
description: "The content
|
|
11544
|
+
description: "The plain-text content of the document. When the name ends in .docx it is converted into a Word document with one paragraph per line; otherwise it is written as-is",
|
|
11500
11545
|
},
|
|
11501
11546
|
folderId: {
|
|
11502
11547
|
type: "string",
|
|
@@ -11556,7 +11601,7 @@ export const microsoftUpdateDocumentDefinition = {
|
|
|
11556
11601
|
},
|
|
11557
11602
|
content: {
|
|
11558
11603
|
type: "string",
|
|
11559
|
-
description: "The new content
|
|
11604
|
+
description: "The new plain-text content for the document (replaces the existing content entirely). If the target file is a .docx it is converted into a Word document with one paragraph per line; other Office formats (.doc, .xlsx, .xls, .pptx, .ppt) cannot be updated",
|
|
11560
11605
|
},
|
|
11561
11606
|
},
|
|
11562
11607
|
},
|
|
@@ -83,6 +83,7 @@ export declare enum ActionName {
|
|
|
83
83
|
ADDCOMMENTTOTICKET = "addCommentToTicket",
|
|
84
84
|
ASSIGNTICKET = "assignTicket",
|
|
85
85
|
SEARCHZENDESKBYQUERY = "searchZendeskByQuery",
|
|
86
|
+
SEARCHZENDESKTICKETSBYQUERY = "searchZendeskTicketsByQuery",
|
|
86
87
|
CREATESHARELINKEDINPOSTURL = "createShareLinkedinPostUrl",
|
|
87
88
|
CREATESHAREXPOSTURL = "createShareXPostUrl",
|
|
88
89
|
INSERTMONGODOC = "insertMongoDoc",
|
|
@@ -4656,6 +4657,32 @@ export declare const zendeskSearchZendeskByQueryOutputSchema: z.ZodObject<{
|
|
|
4656
4657
|
}>;
|
|
4657
4658
|
export type zendeskSearchZendeskByQueryOutputType = z.infer<typeof zendeskSearchZendeskByQueryOutputSchema>;
|
|
4658
4659
|
export type zendeskSearchZendeskByQueryFunction = ActionFunction<zendeskSearchZendeskByQueryParamsType, AuthParamsType, zendeskSearchZendeskByQueryOutputType>;
|
|
4660
|
+
export declare const zendeskSearchZendeskTicketsByQueryParamsSchema: z.ZodObject<{
|
|
4661
|
+
subdomain: z.ZodString;
|
|
4662
|
+
query: z.ZodString;
|
|
4663
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
4664
|
+
}, "strip", z.ZodTypeAny, {
|
|
4665
|
+
query: string;
|
|
4666
|
+
subdomain: string;
|
|
4667
|
+
limit?: number | undefined;
|
|
4668
|
+
}, {
|
|
4669
|
+
query: string;
|
|
4670
|
+
subdomain: string;
|
|
4671
|
+
limit?: number | undefined;
|
|
4672
|
+
}>;
|
|
4673
|
+
export type zendeskSearchZendeskTicketsByQueryParamsType = z.infer<typeof zendeskSearchZendeskTicketsByQueryParamsSchema>;
|
|
4674
|
+
export declare const zendeskSearchZendeskTicketsByQueryOutputSchema: z.ZodObject<{
|
|
4675
|
+
results: z.ZodArray<z.ZodObject<{}, "strip", z.ZodAny, z.objectOutputType<{}, z.ZodAny, "strip">, z.objectInputType<{}, z.ZodAny, "strip">>, "many">;
|
|
4676
|
+
count: z.ZodNumber;
|
|
4677
|
+
}, "strip", z.ZodTypeAny, {
|
|
4678
|
+
results: z.objectOutputType<{}, z.ZodAny, "strip">[];
|
|
4679
|
+
count: number;
|
|
4680
|
+
}, {
|
|
4681
|
+
results: z.objectInputType<{}, z.ZodAny, "strip">[];
|
|
4682
|
+
count: number;
|
|
4683
|
+
}>;
|
|
4684
|
+
export type zendeskSearchZendeskTicketsByQueryOutputType = z.infer<typeof zendeskSearchZendeskTicketsByQueryOutputSchema>;
|
|
4685
|
+
export type zendeskSearchZendeskTicketsByQueryFunction = ActionFunction<zendeskSearchZendeskTicketsByQueryParamsType, AuthParamsType, zendeskSearchZendeskTicketsByQueryOutputType>;
|
|
4659
4686
|
export declare const linkedinCreateShareLinkedinPostUrlParamsSchema: z.ZodObject<{
|
|
4660
4687
|
text: z.ZodOptional<z.ZodString>;
|
|
4661
4688
|
url: z.ZodOptional<z.ZodString>;
|
|
@@ -85,6 +85,7 @@ export var ActionName;
|
|
|
85
85
|
ActionName["ADDCOMMENTTOTICKET"] = "addCommentToTicket";
|
|
86
86
|
ActionName["ASSIGNTICKET"] = "assignTicket";
|
|
87
87
|
ActionName["SEARCHZENDESKBYQUERY"] = "searchZendeskByQuery";
|
|
88
|
+
ActionName["SEARCHZENDESKTICKETSBYQUERY"] = "searchZendeskTicketsByQuery";
|
|
88
89
|
ActionName["CREATESHARELINKEDINPOSTURL"] = "createShareLinkedinPostUrl";
|
|
89
90
|
ActionName["CREATESHAREXPOSTURL"] = "createShareXPostUrl";
|
|
90
91
|
ActionName["INSERTMONGODOC"] = "insertMongoDoc";
|
|
@@ -1656,6 +1657,20 @@ export const zendeskSearchZendeskByQueryOutputSchema = z.object({
|
|
|
1656
1657
|
results: z.array(z.object({}).catchall(z.any())).describe("List of objects matching the query"),
|
|
1657
1658
|
count: z.coerce.number().describe("Number of objects found"),
|
|
1658
1659
|
});
|
|
1660
|
+
export const zendeskSearchZendeskTicketsByQueryParamsSchema = z.object({
|
|
1661
|
+
subdomain: z
|
|
1662
|
+
.string()
|
|
1663
|
+
.regex(new RegExp("^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$"))
|
|
1664
|
+
.describe("The hostname-label subdomain of the Zendesk account, without a protocol, path, or .zendesk.com suffix"),
|
|
1665
|
+
query: z
|
|
1666
|
+
.string()
|
|
1667
|
+
.describe('Search query string that can include filters like status, priority, tags, assignee, etc. Examples - status:open, priority:high, tags:bug, assignee:user@example.com, or combination like "status:open priority:high". The search is always restricted to tickets, so any type filter in the query is ignored.'),
|
|
1668
|
+
limit: z.coerce.number().describe("Maximum number of tickets to return (optional, defaults to 100)").optional(),
|
|
1669
|
+
});
|
|
1670
|
+
export const zendeskSearchZendeskTicketsByQueryOutputSchema = z.object({
|
|
1671
|
+
results: z.array(z.object({}).catchall(z.any())).describe("List of tickets matching the query"),
|
|
1672
|
+
count: z.coerce.number().describe("Number of tickets found"),
|
|
1673
|
+
});
|
|
1659
1674
|
export const linkedinCreateShareLinkedinPostUrlParamsSchema = z.object({
|
|
1660
1675
|
text: z.string().describe("The text for the linkedin post").optional(),
|
|
1661
1676
|
url: z.string().describe("The url for the linkedin post").optional(),
|
|
@@ -4268,8 +4283,12 @@ export const microsoftCreateDocumentParamsSchema = z.object({
|
|
|
4268
4283
|
.string()
|
|
4269
4284
|
.describe("The ID of the drive (document library) to create the document in. Required to target a non-default document library; takes precedence over siteId. Can be resolved from a SharePoint URL with the getSharepointItem action")
|
|
4270
4285
|
.optional(),
|
|
4271
|
-
name: z
|
|
4272
|
-
|
|
4286
|
+
name: z
|
|
4287
|
+
.string()
|
|
4288
|
+
.describe("The name of the new document, including the extension. Use .docx for a Word document (the content is converted into a real Word file) or a plain-text extension like .txt or .md. Other Office extensions (.doc, .xlsx, .xls, .pptx, .ppt) are not supported and will be rejected"),
|
|
4289
|
+
content: z
|
|
4290
|
+
.string()
|
|
4291
|
+
.describe("The plain-text content of the document. When the name ends in .docx it is converted into a Word document with one paragraph per line; otherwise it is written as-is"),
|
|
4273
4292
|
folderId: z.string().describe("The ID of the folder to create the document in (optional)").optional(),
|
|
4274
4293
|
});
|
|
4275
4294
|
export const microsoftCreateDocumentOutputSchema = z.object({
|
|
@@ -4289,7 +4308,9 @@ export const microsoftUpdateDocumentParamsSchema = z.object({
|
|
|
4289
4308
|
.describe("The ID of the drive (document library) containing the document. Required when the document is in a non-default document library; takes precedence over siteId. Can be resolved from a SharePoint URL with the getSharepointItem action")
|
|
4290
4309
|
.optional(),
|
|
4291
4310
|
documentId: z.string().describe("The ID of the document"),
|
|
4292
|
-
content: z
|
|
4311
|
+
content: z
|
|
4312
|
+
.string()
|
|
4313
|
+
.describe("The new plain-text content for the document (replaces the existing content entirely). If the target file is a .docx it is converted into a Word document with one paragraph per line; other Office formats (.doc, .xlsx, .xls, .pptx, .ppt) cannot be updated"),
|
|
4293
4314
|
});
|
|
4294
4315
|
export const microsoftUpdateDocumentOutputSchema = z.object({
|
|
4295
4316
|
success: z.boolean().describe("Whether the document was updated successfully"),
|
|
@@ -47,7 +47,7 @@ const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ pa
|
|
|
47
47
|
name: item.name,
|
|
48
48
|
path: item.path,
|
|
49
49
|
sha: item.sha.slice(0, 7),
|
|
50
|
-
url: item.
|
|
50
|
+
url: item.html_url,
|
|
51
51
|
score: item.score,
|
|
52
52
|
textMatches: item.text_matches
|
|
53
53
|
? item.text_matches.map(match => {
|
|
@@ -68,7 +68,7 @@ const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ pa
|
|
|
68
68
|
const full = commitDetails.find(c => c.data.sha === item.sha);
|
|
69
69
|
return {
|
|
70
70
|
sha: item.sha,
|
|
71
|
-
url: item.
|
|
71
|
+
url: item.html_url,
|
|
72
72
|
commit: {
|
|
73
73
|
message: item.commit.message,
|
|
74
74
|
author: item.commit.author,
|
|
@@ -76,11 +76,11 @@ const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ pa
|
|
|
76
76
|
score: item.score,
|
|
77
77
|
author: (_a = item.author) !== null && _a !== void 0 ? _a : undefined,
|
|
78
78
|
files: ((_b = full === null || full === void 0 ? void 0 : full.data.files) === null || _b === void 0 ? void 0 : _b.slice(0, MAX_FILES_PER_COMMIT).map(f => {
|
|
79
|
-
var _a;
|
|
79
|
+
var _a, _b, _c;
|
|
80
80
|
return ({
|
|
81
81
|
filename: f.filename,
|
|
82
82
|
status: f.status,
|
|
83
|
-
patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).join("\n"),
|
|
83
|
+
patch: (_c = (_b = (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n")) === null || _b === void 0 ? void 0 : _b.slice(0, MAX_PATCH_LINES)) === null || _c === void 0 ? void 0 : _c.join("\n"),
|
|
84
84
|
});
|
|
85
85
|
})) || [],
|
|
86
86
|
};
|
|
@@ -104,18 +104,18 @@ const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ pa
|
|
|
104
104
|
const prIndex = prNumbers.indexOf(item.number);
|
|
105
105
|
const files = isPR && prIndex !== -1
|
|
106
106
|
? prFiles[prIndex].data.slice(0, MAX_FILES_PER_PR).map(f => {
|
|
107
|
-
var _a;
|
|
107
|
+
var _a, _b, _c;
|
|
108
108
|
return ({
|
|
109
109
|
filename: f.filename,
|
|
110
110
|
status: f.status,
|
|
111
|
-
patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).join("\n"),
|
|
111
|
+
patch: (_c = (_b = (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n")) === null || _b === void 0 ? void 0 : _b.slice(0, MAX_PATCH_LINES)) === null || _c === void 0 ? void 0 : _c.join("\n"),
|
|
112
112
|
});
|
|
113
113
|
})
|
|
114
114
|
: undefined;
|
|
115
115
|
return {
|
|
116
116
|
number: item.number,
|
|
117
117
|
title: item.title,
|
|
118
|
-
|
|
118
|
+
url: item.html_url,
|
|
119
119
|
state: item.state,
|
|
120
120
|
isPullRequest: isPR,
|
|
121
121
|
body: item.body,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { axiosClient } from "../../util/axiosClient.js";
|
|
3
3
|
import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
|
4
4
|
import { getDayOfWeek } from "../../../utils/datetime.js";
|
|
@@ -70,7 +70,7 @@ const scheduleCalendarMeeting = async ({ params, authParams, }) => {
|
|
|
70
70
|
createEventApiUrl += "?conferenceDataVersion=1";
|
|
71
71
|
data.conferenceData = {
|
|
72
72
|
createRequest: {
|
|
73
|
-
requestId:
|
|
73
|
+
requestId: randomUUID(),
|
|
74
74
|
},
|
|
75
75
|
};
|
|
76
76
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getDrivePath, getGraphClient, validateAndSanitizeFileName } from "./utils.js";
|
|
1
|
+
import { fileNameHasDocxExtension, generateDocxFromPlainText, getDrivePath, getGraphClient, getUnsupportedOfficeExtension, validateAndSanitizeFileName, } from "./utils.js";
|
|
2
2
|
const createDocument = async ({ params, authParams, }) => {
|
|
3
3
|
const { folderId, name, content, siteId, driveId } = params;
|
|
4
4
|
let client = undefined;
|
|
@@ -12,10 +12,20 @@ const createDocument = async ({ params, authParams, }) => {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
const sanitizedFileName = validateAndSanitizeFileName(name);
|
|
15
|
+
const unsupportedOfficeExtension = getUnsupportedOfficeExtension(sanitizedFileName);
|
|
16
|
+
if (unsupportedOfficeExtension) {
|
|
17
|
+
return {
|
|
18
|
+
success: false,
|
|
19
|
+
error: `Cannot create "${unsupportedOfficeExtension}" files: this action writes the provided text and can only generate Word documents. Use a .docx extension for a Word document, or a plain-text extension like .txt.`,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
15
22
|
const endpoint = `${getDrivePath({ driveId, siteId })}/items/${folderId || "root"}:/${sanitizedFileName}:/content`;
|
|
16
23
|
try {
|
|
24
|
+
// .docx is a ZIP-of-XML container, so the text must be converted into real OOXML
|
|
25
|
+
// bytes; writing it directly would produce a file Word cannot open.
|
|
26
|
+
const body = fileNameHasDocxExtension(sanitizedFileName) ? await generateDocxFromPlainText(content) : content;
|
|
17
27
|
// Create or update the document
|
|
18
|
-
const response = await client.api(endpoint).put(
|
|
28
|
+
const response = await client.api(endpoint).put(body);
|
|
19
29
|
return {
|
|
20
30
|
success: true,
|
|
21
31
|
documentId: response.id,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getDrivePath, getGraphClient } from "./utils.js";
|
|
1
|
+
import { fileNameHasDocxExtension, generateDocxFromPlainText, getDrivePath, getGraphClient, getUnsupportedOfficeExtension, } from "./utils.js";
|
|
2
2
|
const updateDocument = async ({ params, authParams, }) => {
|
|
3
3
|
const { documentId, content, siteId, driveId } = params;
|
|
4
4
|
let client = undefined;
|
|
@@ -12,8 +12,21 @@ const updateDocument = async ({ params, authParams, }) => {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
try {
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const drivePath = getDrivePath({ driveId, siteId });
|
|
16
|
+
// The target's filename decides how the content must be written: .docx is a
|
|
17
|
+
// ZIP-of-XML container, so overwriting it with raw text would corrupt it.
|
|
18
|
+
const itemMetadata = await client.api(`${drivePath}/items/${documentId}?$select=name`).get();
|
|
19
|
+
const fileName = itemMetadata?.name ?? "";
|
|
20
|
+
const unsupportedOfficeExtension = getUnsupportedOfficeExtension(fileName);
|
|
21
|
+
if (unsupportedOfficeExtension) {
|
|
22
|
+
return {
|
|
23
|
+
success: false,
|
|
24
|
+
error: `Cannot update "${unsupportedOfficeExtension}" files: this action writes the provided text and can only generate Word documents. Only .docx and plain-text files can be updated.`,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const body = fileNameHasDocxExtension(fileName) ? await generateDocxFromPlainText(content) : content;
|
|
28
|
+
const endpoint = `${drivePath}/items/${documentId}/content`;
|
|
29
|
+
const response = await client.api(endpoint).put(body);
|
|
17
30
|
return {
|
|
18
31
|
success: true,
|
|
19
32
|
documentUrl: response.webUrl,
|
|
@@ -16,4 +16,12 @@ export declare function getDrivePath({ driveId, siteId }: {
|
|
|
16
16
|
* @returns A sanitized filename that is safe to use.
|
|
17
17
|
*/
|
|
18
18
|
export declare function validateAndSanitizeFileName(fileName: string): string;
|
|
19
|
+
export declare function fileNameHasDocxExtension(fileName: string): boolean;
|
|
20
|
+
export declare function getUnsupportedOfficeExtension(fileName: string): string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Builds a valid .docx file from plain text, one paragraph per line. A .docx is a ZIP
|
|
23
|
+
* archive of XML parts, so text bytes written directly under a .docx name produce a
|
|
24
|
+
* corrupted document — the bytes must be generated with an OOXML writer.
|
|
25
|
+
*/
|
|
26
|
+
export declare function generateDocxFromPlainText(text: string): Promise<Buffer>;
|
|
19
27
|
export declare const MICROSOFT_GRAPH_API_URL = "https://graph.microsoft.com/v1.0";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Client } from "@microsoft/microsoft-graph-client";
|
|
2
|
+
import { Document, Packer, Paragraph, TextRun } from "docx";
|
|
2
3
|
export async function getGraphClient(authParams) {
|
|
3
4
|
if (!authParams.authToken) {
|
|
4
5
|
throw new Error("Missing required authentication parameters");
|
|
@@ -41,4 +42,24 @@ export function validateAndSanitizeFileName(fileName) {
|
|
|
41
42
|
}
|
|
42
43
|
return sanitizedFileName;
|
|
43
44
|
}
|
|
45
|
+
// Office formats that are binary/ZIP containers. Writing plain text bytes under these
|
|
46
|
+
// extensions produces a file the corresponding Office app cannot open.
|
|
47
|
+
const UNSUPPORTED_OFFICE_EXTENSIONS = [".doc", ".xlsx", ".xls", ".pptx", ".ppt"];
|
|
48
|
+
export function fileNameHasDocxExtension(fileName) {
|
|
49
|
+
return fileName.toLowerCase().endsWith(".docx");
|
|
50
|
+
}
|
|
51
|
+
export function getUnsupportedOfficeExtension(fileName) {
|
|
52
|
+
const lowerCaseFileName = fileName.toLowerCase();
|
|
53
|
+
return UNSUPPORTED_OFFICE_EXTENSIONS.find(extension => lowerCaseFileName.endsWith(extension));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Builds a valid .docx file from plain text, one paragraph per line. A .docx is a ZIP
|
|
57
|
+
* archive of XML parts, so text bytes written directly under a .docx name produce a
|
|
58
|
+
* corrupted document — the bytes must be generated with an OOXML writer.
|
|
59
|
+
*/
|
|
60
|
+
export async function generateDocxFromPlainText(text) {
|
|
61
|
+
const paragraphs = text.split(/\r?\n/).map(line => new Paragraph({ children: [new TextRun({ text: line })] }));
|
|
62
|
+
const document = new Document({ sections: [{ properties: {}, children: paragraphs }] });
|
|
63
|
+
return Packer.toBuffer(document);
|
|
64
|
+
}
|
|
44
65
|
export const MICROSOFT_GRAPH_API_URL = "https://graph.microsoft.com/v1.0";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createAxiosClientWithRetries } from "../../util/axiosClient.js";
|
|
2
|
+
import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
|
3
|
+
const ZENDESK_SUBDOMAIN_PATTERN = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;
|
|
4
|
+
const searchZendeskTicketsByQuery = async ({ params, authParams, }) => {
|
|
5
|
+
const { authToken } = authParams;
|
|
6
|
+
const { subdomain, query, limit = 100 } = params;
|
|
7
|
+
if (!authToken) {
|
|
8
|
+
throw new Error(MISSING_AUTH_TOKEN);
|
|
9
|
+
}
|
|
10
|
+
if (!ZENDESK_SUBDOMAIN_PATTERN.test(subdomain)) {
|
|
11
|
+
throw new Error("Invalid Zendesk subdomain");
|
|
12
|
+
}
|
|
13
|
+
const url = new URL(`https://${subdomain}.zendesk.com/api/v2/search.json`);
|
|
14
|
+
const axiosClient = createAxiosClientWithRetries({ timeout: 10000, retryCount: 4 });
|
|
15
|
+
// Strip any type: filters from the incoming query so it can't target other resource types,
|
|
16
|
+
// then force the search to tickets only
|
|
17
|
+
const sanitizedQuery = query
|
|
18
|
+
.replace(/\btype:\S+/gi, "")
|
|
19
|
+
.replace(/\s+/g, " ")
|
|
20
|
+
.trim();
|
|
21
|
+
url.searchParams.set("query", `type:ticket ${sanitizedQuery}`.trim());
|
|
22
|
+
url.searchParams.set("per_page", limit.toString());
|
|
23
|
+
const response = await axiosClient.get(url.toString(), {
|
|
24
|
+
headers: {
|
|
25
|
+
"Content-Type": "application/json",
|
|
26
|
+
Authorization: `Bearer ${authToken}`,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
// Defense in depth: only return results Zendesk marks as tickets
|
|
30
|
+
const results = Array.isArray(response.data.results)
|
|
31
|
+
? response.data.results.filter((result) => result.result_type === "ticket")
|
|
32
|
+
: [];
|
|
33
|
+
const count = typeof response.data.count === "number" ? response.data.count : results.length;
|
|
34
|
+
return {
|
|
35
|
+
results,
|
|
36
|
+
count,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export default searchZendeskTicketsByQuery;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@credal/actions",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.228",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AI Actions by Credal AI",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -78,10 +78,9 @@
|
|
|
78
78
|
"p-limit": "^7.1.1",
|
|
79
79
|
"papaparse": "^5.5.3",
|
|
80
80
|
"resend": "^4.7.0",
|
|
81
|
-
"snowflake-sdk": "^2.
|
|
81
|
+
"snowflake-sdk": "^2.4.3",
|
|
82
82
|
"ts-node": "^10.9.2",
|
|
83
83
|
"unpdf": "^1.2.2",
|
|
84
|
-
"uuid": "^11.1.1",
|
|
85
84
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
|
|
86
85
|
"zod": "^3.25.0"
|
|
87
86
|
},
|
|
@@ -1,31 +0,0 @@
|
|
|
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 addCandidateToProject = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
13
|
-
const { candidateId, projectId } = params;
|
|
14
|
-
const { authToken } = authParams;
|
|
15
|
-
if (!authToken) {
|
|
16
|
-
throw new Error(MISSING_AUTH_TOKEN);
|
|
17
|
-
}
|
|
18
|
-
const response = yield axiosClient.post(`https://api.ashbyhq.com/candidate.addProject`, {
|
|
19
|
-
candidateId,
|
|
20
|
-
projectId,
|
|
21
|
-
}, {
|
|
22
|
-
auth: {
|
|
23
|
-
username: authToken,
|
|
24
|
-
password: "",
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
if (!response.data.success) {
|
|
28
|
-
throw new Error(response.data.errors.join("; "));
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
export default addCandidateToProject;
|
|
@@ -1,38 +0,0 @@
|
|
|
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 createCandidate = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
13
|
-
const { authToken } = authParams;
|
|
14
|
-
if (!authToken) {
|
|
15
|
-
throw new Error(MISSING_AUTH_TOKEN);
|
|
16
|
-
}
|
|
17
|
-
const response = yield axiosClient.post(`https://api.ashbyhq.com/candidate.create`, {
|
|
18
|
-
name: params.name,
|
|
19
|
-
email: params.email,
|
|
20
|
-
phoneNumber: params.phoneNumber,
|
|
21
|
-
linkedInUrl: params.linkedInUrl,
|
|
22
|
-
githubUrl: params.githubUrl,
|
|
23
|
-
website: params.website,
|
|
24
|
-
alternateEmailAddresses: params.alternateEmailAddresses,
|
|
25
|
-
sourceId: params.sourceId,
|
|
26
|
-
creditedToUserId: params.creditedToUserId,
|
|
27
|
-
location: params.location,
|
|
28
|
-
}, {
|
|
29
|
-
auth: {
|
|
30
|
-
username: authToken,
|
|
31
|
-
password: "",
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
if (!response.data.success) {
|
|
35
|
-
throw new Error(response.data.errors.join("; "));
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
export default createCandidate;
|
|
@@ -1,31 +0,0 @@
|
|
|
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 createNote = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
13
|
-
const { candidateId, note } = params;
|
|
14
|
-
const { authToken } = authParams;
|
|
15
|
-
if (!authToken) {
|
|
16
|
-
throw new Error(MISSING_AUTH_TOKEN);
|
|
17
|
-
}
|
|
18
|
-
const response = yield axiosClient.post(`https://api.ashbyhq.com/candidate.createNote`, {
|
|
19
|
-
candidateId,
|
|
20
|
-
note,
|
|
21
|
-
}, {
|
|
22
|
-
auth: {
|
|
23
|
-
username: authToken,
|
|
24
|
-
password: "",
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
if (!response.data.success) {
|
|
28
|
-
throw new Error(response.data.errors.join("; "));
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
export default createNote;
|