@credal/actions 0.2.220 → 0.2.222
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 +31 -1
- package/dist/actions/autogen/templates.d.ts +4 -0
- package/dist/actions/autogen/templates.js +274 -0
- package/dist/actions/autogen/types.d.ts +261 -5
- package/dist/actions/autogen/types.js +106 -0
- package/dist/actions/groups.d.ts +6 -0
- package/dist/actions/groups.js +248 -0
- package/dist/actions/providers/ashby/addCandidateToProject.d.ts +3 -0
- package/dist/actions/providers/ashby/addCandidateToProject.js +31 -0
- package/dist/actions/providers/ashby/createCandidate.d.ts +3 -0
- package/dist/actions/providers/ashby/createCandidate.js +38 -0
- package/dist/actions/providers/ashby/createNote.d.ts +3 -0
- package/dist/actions/providers/ashby/createNote.js +31 -0
- package/dist/actions/providers/ashby/getCandidateInfo.d.ts +3 -0
- package/dist/actions/providers/ashby/getCandidateInfo.js +33 -0
- package/dist/actions/providers/ashby/listCandidateNotes.d.ts +3 -0
- package/dist/actions/providers/ashby/listCandidateNotes.js +33 -0
- package/dist/actions/providers/ashby/listCandidates.d.ts +3 -0
- package/dist/actions/providers/ashby/listCandidates.js +30 -0
- package/dist/actions/providers/ashby/searchCandidates.d.ts +3 -0
- package/dist/actions/providers/ashby/searchCandidates.js +34 -0
- package/dist/actions/providers/ashby/updateCandidate.d.ts +3 -0
- package/dist/actions/providers/ashby/updateCandidate.js +56 -0
- package/dist/actions/providers/credal/callCopilot.d.ts +3 -0
- package/dist/actions/providers/credal/callCopilot.js +36 -0
- package/dist/actions/providers/gong/getGongTranscripts.d.ts +3 -0
- package/dist/actions/providers/gong/getGongTranscripts.js +315 -0
- package/dist/actions/providers/google-oauth/editAGoogleCalendarEvent.js +3 -1
- package/dist/actions/providers/google-oauth/scheduleCalendarMeeting.js +16 -5
- package/dist/actions/providers/google-oauth/updateCalendarEvent.js +2 -0
- package/dist/actions/providers/jamf/getJamfComputerInventory.d.ts +3 -0
- package/dist/actions/providers/jamf/getJamfComputerInventory.js +37 -0
- package/dist/actions/providers/jamf/getJamfFileVaultRecoveryKey.d.ts +3 -0
- package/dist/actions/providers/jamf/getJamfFileVaultRecoveryKey.js +39 -0
- package/dist/actions/providers/jamf/getJamfUserComputerId.d.ts +3 -0
- package/dist/actions/providers/jamf/getJamfUserComputerId.js +45 -0
- package/dist/actions/providers/jamf/lockJamfComputerById.d.ts +3 -0
- package/dist/actions/providers/jamf/lockJamfComputerById.js +39 -0
- package/dist/actions/providers/jira/getJiraDCIssuesByQuery.js +3 -1
- package/dist/actions/providers/jira/getJiraIssuesByQuery.js +3 -1
- package/dist/actions/providers/kandji/getFVRecoveryKeyForDevice.d.ts +3 -0
- package/dist/actions/providers/kandji/getFVRecoveryKeyForDevice.js +85 -0
- package/dist/actions/providers/math/index.d.ts +1 -0
- package/dist/actions/providers/math/index.js +37 -0
- package/dist/actions/providers/okta/addUserToGroup.d.ts +3 -0
- package/dist/actions/providers/okta/addUserToGroup.js +56 -0
- package/dist/actions/providers/okta/getOktaGroup.d.ts +3 -0
- package/dist/actions/providers/okta/getOktaGroup.js +73 -0
- package/dist/actions/providers/okta/getOktaUser.d.ts +3 -0
- package/dist/actions/providers/okta/getOktaUser.js +40 -0
- package/dist/actions/providers/okta/listMFA.d.ts +3 -0
- package/dist/actions/providers/okta/listMFA.js +52 -0
- package/dist/actions/providers/okta/listOktaGroupMembers.d.ts +3 -0
- package/dist/actions/providers/okta/listOktaGroupMembers.js +99 -0
- package/dist/actions/providers/okta/listOktaGroups.d.ts +3 -0
- package/dist/actions/providers/okta/listOktaGroups.js +92 -0
- package/dist/actions/providers/okta/listOktaUserGroups.d.ts +3 -0
- package/dist/actions/providers/okta/listOktaUserGroups.js +83 -0
- package/dist/actions/providers/okta/listOktaUsers.d.ts +3 -0
- package/dist/actions/providers/okta/listOktaUsers.js +100 -0
- package/dist/actions/providers/okta/removeUserFromGroup.d.ts +3 -0
- package/dist/actions/providers/okta/removeUserFromGroup.js +56 -0
- package/dist/actions/providers/okta/resetMFA.d.ts +3 -0
- package/dist/actions/providers/okta/resetMFA.js +62 -0
- package/dist/actions/providers/okta/resetPassword.d.ts +3 -0
- package/dist/actions/providers/okta/resetPassword.js +57 -0
- package/dist/actions/providers/okta/triggerOktaWorkflow.d.ts +3 -0
- package/dist/actions/providers/okta/triggerOktaWorkflow.js +44 -0
- package/dist/actions/providers/salesforce/fetchSalesforceSchema.d.ts +3 -0
- package/dist/actions/providers/salesforce/fetchSalesforceSchema.js +40 -0
- package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.d.ts +3 -0
- package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.js +43 -0
- package/dist/actions/providers/slack/archiveChannel.d.ts +3 -0
- package/dist/actions/providers/slack/archiveChannel.js +35 -0
- package/dist/actions/providers/slack/index.d.ts +1 -0
- package/dist/actions/providers/slack/index.js +37 -0
- package/dist/actions/providers/slack/listConversations.d.ts +3 -0
- package/dist/actions/providers/slack/listConversations.js +41 -0
- package/dist/actions/providers/smartsheet/addRowToSheet.d.ts +3 -0
- package/dist/actions/providers/smartsheet/addRowToSheet.js +34 -0
- package/dist/actions/providers/smartsheet/getSheetRows.d.ts +3 -0
- package/dist/actions/providers/smartsheet/getSheetRows.js +48 -0
- package/dist/actions/providers/smartsheet/listSheets.d.ts +3 -0
- package/dist/actions/providers/smartsheet/listSheets.js +26 -0
- package/dist/actions/providers/smartsheet/updateRow.d.ts +3 -0
- package/dist/actions/providers/smartsheet/updateRow.js +34 -0
- package/dist/actions/providers/smartsheet/utils.d.ts +33 -0
- package/dist/actions/providers/smartsheet/utils.js +45 -0
- package/package.json +2 -2
|
@@ -36,6 +36,7 @@ export var ProviderName;
|
|
|
36
36
|
ProviderName["GITLAB"] = "gitlab";
|
|
37
37
|
ProviderName["LINEAR"] = "linear";
|
|
38
38
|
ProviderName["HUBSPOT"] = "hubspot";
|
|
39
|
+
ProviderName["SMARTSHEET"] = "smartsheet";
|
|
39
40
|
ProviderName["BOXUSER"] = "boxUser";
|
|
40
41
|
})(ProviderName || (ProviderName = {}));
|
|
41
42
|
export var ActionName;
|
|
@@ -178,6 +179,10 @@ export var ActionName;
|
|
|
178
179
|
ActionName["GETDEALS"] = "getDeals";
|
|
179
180
|
ActionName["GETDEALDETAILS"] = "getDealDetails";
|
|
180
181
|
ActionName["GETTICKETS"] = "getTickets";
|
|
182
|
+
ActionName["LISTSHEETS"] = "listSheets";
|
|
183
|
+
ActionName["GETSHEETROWS"] = "getSheetRows";
|
|
184
|
+
ActionName["ADDROWTOSHEET"] = "addRowToSheet";
|
|
185
|
+
ActionName["UPDATEROW"] = "updateRow";
|
|
181
186
|
})(ActionName || (ActionName = {}));
|
|
182
187
|
export const AuthParamsSchema = z.object({
|
|
183
188
|
authToken: z.string().optional(),
|
|
@@ -904,6 +909,7 @@ export const jiraGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
904
909
|
updated: z.string().datetime({ offset: true }),
|
|
905
910
|
resolution: z.string().nullable().optional(),
|
|
906
911
|
dueDate: z.string().date().nullable().optional(),
|
|
912
|
+
labels: z.array(z.string()).describe("The labels assigned to the issue (empty array if none)").optional(),
|
|
907
913
|
})
|
|
908
914
|
.describe("The result object containing issues"),
|
|
909
915
|
}))
|
|
@@ -1171,6 +1177,7 @@ export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
1171
1177
|
updated: z.string().datetime({ offset: true }),
|
|
1172
1178
|
resolution: z.string().nullable().optional(),
|
|
1173
1179
|
dueDate: z.string().date().nullable().optional(),
|
|
1180
|
+
labels: z.array(z.string()).describe("The labels assigned to the issue (empty array if none)").optional(),
|
|
1174
1181
|
})
|
|
1175
1182
|
.describe("The result object containing issues"),
|
|
1176
1183
|
}))
|
|
@@ -1426,6 +1433,7 @@ export const jiraDataCenterGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
1426
1433
|
updated: z.string().datetime({ offset: true }),
|
|
1427
1434
|
resolution: z.string().nullable().optional(),
|
|
1428
1435
|
dueDate: z.string().date().nullable().optional(),
|
|
1436
|
+
labels: z.array(z.string()).describe("The labels assigned to the issue (empty array if none)").optional(),
|
|
1429
1437
|
})
|
|
1430
1438
|
.describe("The result object containing issues"),
|
|
1431
1439
|
}))
|
|
@@ -2405,6 +2413,10 @@ export const googleOauthScheduleCalendarMeetingParamsSchema = z.object({
|
|
|
2405
2413
|
.string()
|
|
2406
2414
|
.describe("The time zone for the meeting, IANA Time Zone identifier (e.g., 'America/New_York')")
|
|
2407
2415
|
.optional(),
|
|
2416
|
+
transparency: z
|
|
2417
|
+
.enum(["opaque", "transparent"])
|
|
2418
|
+
.describe('Opaque is the default value, and it blocks time on the calendar. This is equivalent to setting "Show me as" to "Busy" in the UI. Transparent means the event does not block time on the calendar. This is equivalent to setting "Show me as" to "Available" in the UI.')
|
|
2419
|
+
.optional(),
|
|
2408
2420
|
recurrence: z
|
|
2409
2421
|
.object({
|
|
2410
2422
|
frequency: z.enum(["DAILY", "WEEKLY", "MONTHLY", "YEARLY"]).describe("How often the meeting repeats").optional(),
|
|
@@ -2550,6 +2562,10 @@ export const googleOauthUpdateCalendarEventParamsSchema = z.object({
|
|
|
2550
2562
|
.string()
|
|
2551
2563
|
.describe("The time zone for the event, IANA Time Zone identifier (e.g., 'America/New_York')")
|
|
2552
2564
|
.optional(),
|
|
2565
|
+
transparency: z
|
|
2566
|
+
.enum(["opaque", "transparent"])
|
|
2567
|
+
.describe('Opaque is the default value, and it blocks time on the calendar. This is equivalent to setting "Show me as" to "Busy" in the UI. Transparent means the event does not block time on the calendar.')
|
|
2568
|
+
.optional(),
|
|
2553
2569
|
})
|
|
2554
2570
|
.describe("The fields to update on the event")
|
|
2555
2571
|
.optional(),
|
|
@@ -2584,6 +2600,10 @@ export const googleOauthEditAGoogleCalendarEventParamsSchema = z.object({
|
|
|
2584
2600
|
.string()
|
|
2585
2601
|
.describe("The time zone for the event, IANA Time Zone identifier (e.g., 'America/New_York')")
|
|
2586
2602
|
.optional(),
|
|
2603
|
+
transparency: z
|
|
2604
|
+
.enum(["opaque", "transparent"])
|
|
2605
|
+
.describe('Opaque is the default value, and it blocks time on the calendar. This is equivalent to setting "Show me as" to "Busy" in the UI. Transparent means the event does not block time on the calendar.')
|
|
2606
|
+
.optional(),
|
|
2587
2607
|
});
|
|
2588
2608
|
export const googleOauthEditAGoogleCalendarEventOutputSchema = z.object({
|
|
2589
2609
|
success: z.boolean().describe("Whether the event was edited successfully"),
|
|
@@ -5446,3 +5466,89 @@ export const hubspotGetTicketDetailsOutputSchema = z.object({
|
|
|
5446
5466
|
.describe("The ticket details")
|
|
5447
5467
|
.optional(),
|
|
5448
5468
|
});
|
|
5469
|
+
export const smartsheetListSheetsParamsSchema = z.object({});
|
|
5470
|
+
export const smartsheetListSheetsOutputSchema = z.object({
|
|
5471
|
+
success: z.boolean().describe("Whether the sheets were successfully listed"),
|
|
5472
|
+
error: z.string().describe("Error message if the operation failed").optional(),
|
|
5473
|
+
sheets: z
|
|
5474
|
+
.array(z.object({
|
|
5475
|
+
id: z.string().describe("The sheet ID, passed as sheetId to other Smartsheet actions").optional(),
|
|
5476
|
+
name: z.string().describe("The sheet name").optional(),
|
|
5477
|
+
permalink: z.string().describe("URL to open the sheet in Smartsheet").optional(),
|
|
5478
|
+
}))
|
|
5479
|
+
.describe("The sheets the user has access to")
|
|
5480
|
+
.optional(),
|
|
5481
|
+
});
|
|
5482
|
+
export const smartsheetGetSheetRowsParamsSchema = z.object({
|
|
5483
|
+
sheetId: z
|
|
5484
|
+
.string()
|
|
5485
|
+
.describe("The ID of the sheet to read. Obtain this from the listSheets action or from the user; do not guess it."),
|
|
5486
|
+
});
|
|
5487
|
+
export const smartsheetGetSheetRowsOutputSchema = z.object({
|
|
5488
|
+
success: z.boolean().describe("Whether the sheet was successfully retrieved"),
|
|
5489
|
+
error: z.string().describe("Error message if the operation failed").optional(),
|
|
5490
|
+
sheet: z
|
|
5491
|
+
.object({
|
|
5492
|
+
id: z.string().describe("The sheet ID").optional(),
|
|
5493
|
+
name: z.string().describe("The sheet name").optional(),
|
|
5494
|
+
permalink: z.string().describe("URL to open the sheet in Smartsheet").optional(),
|
|
5495
|
+
columns: z
|
|
5496
|
+
.array(z.object({
|
|
5497
|
+
id: z.string().describe("The column ID").optional(),
|
|
5498
|
+
title: z
|
|
5499
|
+
.string()
|
|
5500
|
+
.describe("The column title. Use these exact titles as keys in the cells parameter of addRowToSheet and updateRow.")
|
|
5501
|
+
.optional(),
|
|
5502
|
+
type: z
|
|
5503
|
+
.string()
|
|
5504
|
+
.describe("The column type (e.g. TEXT_NUMBER, PICKLIST, DATE, CHECKBOX, CONTACT_LIST)")
|
|
5505
|
+
.optional(),
|
|
5506
|
+
options: z.array(z.string()).describe("The valid values for PICKLIST columns").optional(),
|
|
5507
|
+
}))
|
|
5508
|
+
.describe("The sheet's columns, in display order")
|
|
5509
|
+
.optional(),
|
|
5510
|
+
rows: z
|
|
5511
|
+
.array(z.object({
|
|
5512
|
+
id: z.string().describe("The row ID, passed as rowId to the updateRow action").optional(),
|
|
5513
|
+
rowNumber: z.coerce.number().describe("The row's position in the sheet, starting at 1").optional(),
|
|
5514
|
+
cells: z.object({}).catchall(z.any()).describe("The row's cell values, keyed by column title").optional(),
|
|
5515
|
+
}))
|
|
5516
|
+
.describe("The sheet's rows")
|
|
5517
|
+
.optional(),
|
|
5518
|
+
})
|
|
5519
|
+
.describe("The sheet's columns and rows")
|
|
5520
|
+
.optional(),
|
|
5521
|
+
});
|
|
5522
|
+
export const smartsheetAddRowToSheetParamsSchema = z.object({
|
|
5523
|
+
sheetId: z
|
|
5524
|
+
.string()
|
|
5525
|
+
.describe("The ID of the sheet to add the row to. Obtain this from the listSheets action or from the user; do not guess it."),
|
|
5526
|
+
cells: z
|
|
5527
|
+
.object({})
|
|
5528
|
+
.catchall(z.any())
|
|
5529
|
+
.describe('The new row\'s cell values, keyed by column title exactly as returned by getSheetRows, e.g. {"Task Name": "Review budget", "Status": "In Progress"}. Values may be strings, numbers, or booleans.'),
|
|
5530
|
+
toTop: z
|
|
5531
|
+
.boolean()
|
|
5532
|
+
.describe("If true, the row is added to the top of the sheet. Defaults to false (added to the bottom).")
|
|
5533
|
+
.optional(),
|
|
5534
|
+
});
|
|
5535
|
+
export const smartsheetAddRowToSheetOutputSchema = z.object({
|
|
5536
|
+
success: z.boolean().describe("Whether the row was successfully added"),
|
|
5537
|
+
error: z.string().describe("Error message if the operation failed").optional(),
|
|
5538
|
+
rowId: z.string().describe("The ID of the newly created row").optional(),
|
|
5539
|
+
});
|
|
5540
|
+
export const smartsheetUpdateRowParamsSchema = z.object({
|
|
5541
|
+
sheetId: z
|
|
5542
|
+
.string()
|
|
5543
|
+
.describe("The ID of the sheet containing the row. Obtain this from the listSheets action or from the user; do not guess it."),
|
|
5544
|
+
rowId: z.string().describe("The ID of the row to update, as returned by the getSheetRows action"),
|
|
5545
|
+
cells: z
|
|
5546
|
+
.object({})
|
|
5547
|
+
.catchall(z.any())
|
|
5548
|
+
.describe('The cell values to change, keyed by column title exactly as returned by getSheetRows, e.g. {"Status": "Complete"}. Columns not included are left unchanged. Values may be strings, numbers, or booleans.'),
|
|
5549
|
+
});
|
|
5550
|
+
export const smartsheetUpdateRowOutputSchema = z.object({
|
|
5551
|
+
success: z.boolean().describe("Whether the row was successfully updated"),
|
|
5552
|
+
error: z.string().describe("Error message if the operation failed").optional(),
|
|
5553
|
+
rowId: z.string().describe("The ID of the updated row").optional(),
|
|
5554
|
+
});
|
|
@@ -0,0 +1,248 @@
|
|
|
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";
|
|
2
|
+
export const ACTION_GROUPS = {
|
|
3
|
+
GENERIC: {
|
|
4
|
+
description: "Generic utility actions",
|
|
5
|
+
actions: [genericFillTemplateDefinition],
|
|
6
|
+
},
|
|
7
|
+
ASANA: {
|
|
8
|
+
description: "Actions for interacting with Asana",
|
|
9
|
+
actions: [
|
|
10
|
+
asanaCommentTaskDefinition,
|
|
11
|
+
asanaCreateTaskDefinition,
|
|
12
|
+
asanaUpdateTaskDefinition,
|
|
13
|
+
asanaSearchTasksDefinition,
|
|
14
|
+
asanaListAsanaTasksByProjectDefinition,
|
|
15
|
+
asanaGetTasksDetailsDefinition,
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
SLACK_LIST_CONVERSATIONS: {
|
|
19
|
+
description: "Actions for interacting with Slack",
|
|
20
|
+
actions: [
|
|
21
|
+
slackSendMessageDefinition,
|
|
22
|
+
slackGetChannelMessagesDefinition,
|
|
23
|
+
slackCreateChannelDefinition,
|
|
24
|
+
slackArchiveChannelDefinition,
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
CONFLUENCE: {
|
|
28
|
+
description: "Action for interacting with Confluence",
|
|
29
|
+
actions: [confluenceOverwritePageDefinition, confluenceFetchPageContentDefinition],
|
|
30
|
+
},
|
|
31
|
+
MATH_ADD: {
|
|
32
|
+
description: "Action for adding two numbers",
|
|
33
|
+
actions: [mathAddDefinition],
|
|
34
|
+
},
|
|
35
|
+
GOOGLE_MAPS: {
|
|
36
|
+
description: "Action for interacting with Google Maps",
|
|
37
|
+
actions: [googlemapsValidateAddressDefinition, googlemapsNearbysearchRestaurantsDefinition],
|
|
38
|
+
},
|
|
39
|
+
GOOGLE_DRIVE: {
|
|
40
|
+
description: "Action for interacting with Google Drive",
|
|
41
|
+
actions: [
|
|
42
|
+
googleOauthCreateNewGoogleDocDefinition,
|
|
43
|
+
googleOauthUpdateDocDefinition,
|
|
44
|
+
googleOauthCreateSpreadsheetDefinition,
|
|
45
|
+
googleOauthUpdateSpreadsheetDefinition,
|
|
46
|
+
googleOauthCreatePresentationDefinition,
|
|
47
|
+
googleOauthUpdatePresentationDefinition,
|
|
48
|
+
googleOauthSearchDriveByKeywordsDefinition,
|
|
49
|
+
googleOauthSearchDriveByQueryDefinition,
|
|
50
|
+
googleOauthGetDriveFileContentByIdDefinition,
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
GOOGLE_CALENDAR: {
|
|
54
|
+
description: "Actions for interacting with Google Calendar",
|
|
55
|
+
actions: [
|
|
56
|
+
googleOauthScheduleCalendarMeetingDefinition,
|
|
57
|
+
googleOauthListCalendarsDefinition,
|
|
58
|
+
googleOauthListCalendarEventsDefinition,
|
|
59
|
+
googleOauthUpdateCalendarEventDefinition,
|
|
60
|
+
googleOauthDeleteCalendarEventDefinition,
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
GMAIL: {
|
|
64
|
+
description: "Actions for interacting with Gmail",
|
|
65
|
+
actions: [googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition],
|
|
66
|
+
},
|
|
67
|
+
LINKEDIN_SHARE_POST: {
|
|
68
|
+
description: "Action for creating a share post url on linkedin",
|
|
69
|
+
actions: [linkedinCreateShareLinkedinPostUrlDefinition],
|
|
70
|
+
},
|
|
71
|
+
ZENDESK_ACTIONS: {
|
|
72
|
+
description: "Actions for interacting with Zendesk",
|
|
73
|
+
actions: [
|
|
74
|
+
zendeskCreateZendeskTicketDefinition,
|
|
75
|
+
zendeskListZendeskTicketsDefinition,
|
|
76
|
+
zendeskGetTicketDetailsDefinition,
|
|
77
|
+
zendeskUpdateTicketStatusDefinition,
|
|
78
|
+
zendeskAddCommentToTicketDefinition,
|
|
79
|
+
zendeskAssignTicketDefinition,
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
BING_SEARCH: {
|
|
83
|
+
description: "Action for searching Bing",
|
|
84
|
+
actions: [bingGetTopNSearchResultUrlsDefinition],
|
|
85
|
+
},
|
|
86
|
+
MONGO_INSERT_DOC: {
|
|
87
|
+
description: "Action for inserting a document into a MongoDB collection",
|
|
88
|
+
actions: [mongoInsertMongoDocDefinition],
|
|
89
|
+
},
|
|
90
|
+
SNOWFLAKE_ACTIONS: {
|
|
91
|
+
description: "Action for getting content from a Snowflake table",
|
|
92
|
+
actions: [snowflakeGetRowByFieldValueDefinition, snowflakeRunSnowflakeQueryDefinition],
|
|
93
|
+
},
|
|
94
|
+
JIRA_ACTIONS: {
|
|
95
|
+
description: "Action for interacting with Jira tickets",
|
|
96
|
+
actions: [
|
|
97
|
+
jiraAssignJiraTicketDefinition,
|
|
98
|
+
jiraCreateJiraTicketDefinition,
|
|
99
|
+
jiraCommentJiraTicketDefinition,
|
|
100
|
+
jiraGetJiraTicketDetailsDefinition,
|
|
101
|
+
jiraGetJiraTicketHistoryDefinition,
|
|
102
|
+
jiraUpdateJiraTicketDetailsDefinition,
|
|
103
|
+
jiraUpdateJiraTicketStatusDefinition,
|
|
104
|
+
jiraGetJiraIssuesByQueryDefinition,
|
|
105
|
+
jiraGetServiceDesksDefinition,
|
|
106
|
+
jiraCreateServiceDeskRequestDefinition,
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
JIRA_ORG_ACTIONS: {
|
|
110
|
+
description: "Action for interacting with Jira tickets",
|
|
111
|
+
actions: [
|
|
112
|
+
jiraOrgAssignJiraTicketDefinition,
|
|
113
|
+
jiraOrgCreateJiraTicketDefinition,
|
|
114
|
+
jiraOrgCommentJiraTicketDefinition,
|
|
115
|
+
jiraOrgGetJiraTicketDetailsDefinition,
|
|
116
|
+
jiraOrgGetJiraTicketHistoryDefinition,
|
|
117
|
+
jiraOrgUpdateJiraTicketDetailsDefinition,
|
|
118
|
+
jiraOrgUpdateJiraTicketStatusDefinition,
|
|
119
|
+
jiraOrgGetJiraIssuesByQueryDefinition,
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
OPENSTREETMAP_GET_LATITUDE_LONGITUDE_FROM_LOCATION: {
|
|
123
|
+
description: "Action for getting the latitude and longitude of a location",
|
|
124
|
+
actions: [openstreetmapGetLatitudeLongitudeFromLocationDefinition],
|
|
125
|
+
},
|
|
126
|
+
NWS_GET_FORECAST_FOR_LOCATION: {
|
|
127
|
+
description: "Action for getting the weather forecast for a location",
|
|
128
|
+
actions: [nwsGetForecastForLocationDefinition],
|
|
129
|
+
},
|
|
130
|
+
FIRECRAWL: {
|
|
131
|
+
description: "Actions for interacting with Firecrawl",
|
|
132
|
+
actions: [
|
|
133
|
+
firecrawlScrapeUrlDefinition,
|
|
134
|
+
firecrawlScrapeTweetDataWithNitterDefinition,
|
|
135
|
+
firecrawlDeepResearchDefinition,
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
RESEND: {
|
|
139
|
+
description: "Action for sending an email",
|
|
140
|
+
actions: [resendSendEmailDefinition],
|
|
141
|
+
},
|
|
142
|
+
X: {
|
|
143
|
+
description: "Actions for interacting with X(formerly twitter)",
|
|
144
|
+
actions: [xCreateShareXPostUrlDefinition],
|
|
145
|
+
},
|
|
146
|
+
GONG: {
|
|
147
|
+
description: "Actions for interacting with Gong",
|
|
148
|
+
actions: [gongGetGongTranscriptsDefinition],
|
|
149
|
+
},
|
|
150
|
+
FINNHUB: {
|
|
151
|
+
description: "Action for interacting with Finnhub for stock market data",
|
|
152
|
+
actions: [finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition],
|
|
153
|
+
},
|
|
154
|
+
JAMF: {
|
|
155
|
+
description: "Actions for interacting with Jamf",
|
|
156
|
+
actions: [
|
|
157
|
+
jamfGetJamfComputerInventoryDefinition,
|
|
158
|
+
jamfGetJamfFileVaultRecoveryKeyDefinition,
|
|
159
|
+
jamfGetJamfUserComputerIdDefinition,
|
|
160
|
+
jamfLockJamfComputerByIdDefinition,
|
|
161
|
+
],
|
|
162
|
+
},
|
|
163
|
+
LOOKER: {
|
|
164
|
+
description: "Actions for interacting with Looker",
|
|
165
|
+
actions: [lookerEnableUserByEmailDefinition],
|
|
166
|
+
},
|
|
167
|
+
SALESFORCE: {
|
|
168
|
+
description: "Actions for interacting with Salesforce",
|
|
169
|
+
actions: [
|
|
170
|
+
salesforceUpdateRecordDefinition,
|
|
171
|
+
salesforceCreateRecordDefinition,
|
|
172
|
+
salesforceCreateCaseDefinition,
|
|
173
|
+
salesforceGenerateSalesReportDefinition,
|
|
174
|
+
salesforceGetRecordDefinition,
|
|
175
|
+
salesforceGetSalesforceRecordsByQueryDefinition,
|
|
176
|
+
salesforceFetchSalesforceSchemaByObjectDefinition,
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
MICROSOFT: {
|
|
180
|
+
description: "Actions for interacting with Microsoft 365",
|
|
181
|
+
actions: [
|
|
182
|
+
microsoftMessageTeamsChatDefinition,
|
|
183
|
+
microsoftMessageTeamsChannelDefinition,
|
|
184
|
+
microsoftUpdateSpreadsheetDefinition,
|
|
185
|
+
microsoftUpdateDocumentDefinition,
|
|
186
|
+
microsoftCreateDocumentDefinition,
|
|
187
|
+
microsoftGetDocumentDefinition,
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
KANDJI: {
|
|
191
|
+
description: "Actions for interacting with Kandji",
|
|
192
|
+
actions: [kandjiGetFVRecoveryKeyForDeviceDefinition],
|
|
193
|
+
},
|
|
194
|
+
GITHUB: {
|
|
195
|
+
description: "Actions for interacting with GitHub",
|
|
196
|
+
actions: [
|
|
197
|
+
githubCreateOrUpdateFileDefinition,
|
|
198
|
+
githubCreateBranchDefinition,
|
|
199
|
+
githubCreatePullRequestDefinition,
|
|
200
|
+
githubListPullRequestsDefinition,
|
|
201
|
+
],
|
|
202
|
+
},
|
|
203
|
+
ASHBY: {
|
|
204
|
+
description: "Actions for interacting with Ashby",
|
|
205
|
+
actions: [
|
|
206
|
+
ashbyCreateNoteDefinition,
|
|
207
|
+
ashbyGetCandidateInfoDefinition,
|
|
208
|
+
ashbyListCandidatesDefinition,
|
|
209
|
+
ashbyListCandidateNotesDefinition,
|
|
210
|
+
ashbySearchCandidatesDefinition,
|
|
211
|
+
ashbyCreateCandidateDefinition,
|
|
212
|
+
ashbyUpdateCandidateDefinition,
|
|
213
|
+
ashbyAddCandidateToProjectDefinition,
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
NOTION: {
|
|
217
|
+
description: "Actions for interacting with Notion",
|
|
218
|
+
actions: [notionSearchByTitleDefinition],
|
|
219
|
+
},
|
|
220
|
+
GOOGLE_GROUPS: {
|
|
221
|
+
description: "Google Workspace Groups management actions",
|
|
222
|
+
actions: [
|
|
223
|
+
googleOauthListGroupsDefinition,
|
|
224
|
+
googleOauthGetGroupDefinition,
|
|
225
|
+
googleOauthListGroupMembersDefinition,
|
|
226
|
+
googleOauthHasGroupMemberDefinition,
|
|
227
|
+
googleOauthAddGroupMemberDefinition,
|
|
228
|
+
googleOauthDeleteGroupMemberDefinition,
|
|
229
|
+
],
|
|
230
|
+
},
|
|
231
|
+
OKTA: {
|
|
232
|
+
description: "Actions for interacting with Okta",
|
|
233
|
+
actions: [
|
|
234
|
+
oktaListOktaUsersDefinition,
|
|
235
|
+
oktaGetOktaUserDefinition,
|
|
236
|
+
oktaListOktaUserGroupsDefinition,
|
|
237
|
+
oktaListOktaGroupsDefinition,
|
|
238
|
+
oktaGetOktaGroupDefinition,
|
|
239
|
+
oktaListOktaGroupMembersDefinition,
|
|
240
|
+
oktaRemoveUserFromGroupDefinition,
|
|
241
|
+
oktaAddUserToGroupDefinition,
|
|
242
|
+
oktaResetPasswordDefinition,
|
|
243
|
+
oktaResetMFADefinition,
|
|
244
|
+
oktaListMFADefinition,
|
|
245
|
+
oktaTriggerOktaWorkflowDefinition,
|
|
246
|
+
],
|
|
247
|
+
},
|
|
248
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
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;
|
|
@@ -0,0 +1,38 @@
|
|
|
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;
|
|
@@ -0,0 +1,31 @@
|
|
|
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;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 getCandidateInfo = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
13
|
+
const { candidateId } = 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.info`, {
|
|
19
|
+
id: candidateId,
|
|
20
|
+
}, {
|
|
21
|
+
auth: {
|
|
22
|
+
username: authToken,
|
|
23
|
+
password: "",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
if (!response.data.success) {
|
|
27
|
+
throw new Error(response.data.errors.join("; "));
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
candidate: response.data,
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
export default getCandidateInfo;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 listCandidateNotes = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
13
|
+
const { candidateId } = 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.listNotes`, {
|
|
19
|
+
candidateId,
|
|
20
|
+
}, {
|
|
21
|
+
auth: {
|
|
22
|
+
username: authToken,
|
|
23
|
+
password: "",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
if (!response.data.success) {
|
|
27
|
+
throw new Error(response.data.errors.join("; "));
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
notes: response.data.results,
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
export default listCandidateNotes;
|
|
@@ -0,0 +1,30 @@
|
|
|
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 listCandidates = (_a) => __awaiter(void 0, [_a], void 0, function* ({ 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.list`, null, {
|
|
18
|
+
auth: {
|
|
19
|
+
username: authToken,
|
|
20
|
+
password: "",
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
if (!response.data.success) {
|
|
24
|
+
throw new Error(response.data.errors.join("; "));
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
candidates: response.data.results,
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
export default listCandidates;
|