@credal/actions 0.2.199 → 0.2.200

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/package.json +1 -1
  2. package/dist/actions/groups.d.ts +0 -6
  3. package/dist/actions/groups.js +0 -251
  4. package/dist/actions/providers/ashby/addCandidateToProject.d.ts +0 -3
  5. package/dist/actions/providers/ashby/addCandidateToProject.js +0 -31
  6. package/dist/actions/providers/ashby/createCandidate.d.ts +0 -3
  7. package/dist/actions/providers/ashby/createCandidate.js +0 -38
  8. package/dist/actions/providers/ashby/createNote.d.ts +0 -3
  9. package/dist/actions/providers/ashby/createNote.js +0 -31
  10. package/dist/actions/providers/ashby/getCandidateInfo.d.ts +0 -3
  11. package/dist/actions/providers/ashby/getCandidateInfo.js +0 -33
  12. package/dist/actions/providers/ashby/listCandidateNotes.d.ts +0 -3
  13. package/dist/actions/providers/ashby/listCandidateNotes.js +0 -33
  14. package/dist/actions/providers/ashby/listCandidates.d.ts +0 -3
  15. package/dist/actions/providers/ashby/listCandidates.js +0 -30
  16. package/dist/actions/providers/ashby/searchCandidates.d.ts +0 -3
  17. package/dist/actions/providers/ashby/searchCandidates.js +0 -34
  18. package/dist/actions/providers/ashby/updateCandidate.d.ts +0 -3
  19. package/dist/actions/providers/ashby/updateCandidate.js +0 -56
  20. package/dist/actions/providers/github/fetchFile.d.ts +0 -3
  21. package/dist/actions/providers/github/fetchFile.js +0 -131
  22. package/dist/actions/providers/github/getContents.d.ts +0 -3
  23. package/dist/actions/providers/github/getContents.js +0 -41
  24. package/dist/actions/providers/gong/getGongTranscripts.d.ts +0 -3
  25. package/dist/actions/providers/gong/getGongTranscripts.js +0 -315
  26. package/dist/actions/providers/jamf/getJamfComputerInventory.d.ts +0 -3
  27. package/dist/actions/providers/jamf/getJamfComputerInventory.js +0 -37
  28. package/dist/actions/providers/jamf/getJamfFileVaultRecoveryKey.d.ts +0 -3
  29. package/dist/actions/providers/jamf/getJamfFileVaultRecoveryKey.js +0 -39
  30. package/dist/actions/providers/jamf/getJamfUserComputerId.d.ts +0 -3
  31. package/dist/actions/providers/jamf/getJamfUserComputerId.js +0 -45
  32. package/dist/actions/providers/jamf/lockJamfComputerById.d.ts +0 -3
  33. package/dist/actions/providers/jamf/lockJamfComputerById.js +0 -39
  34. package/dist/actions/providers/kandji/getFVRecoveryKeyForDevice.d.ts +0 -3
  35. package/dist/actions/providers/kandji/getFVRecoveryKeyForDevice.js +0 -85
  36. package/dist/actions/providers/okta/addUserToGroup.d.ts +0 -3
  37. package/dist/actions/providers/okta/addUserToGroup.js +0 -56
  38. package/dist/actions/providers/okta/getOktaGroup.d.ts +0 -3
  39. package/dist/actions/providers/okta/getOktaGroup.js +0 -73
  40. package/dist/actions/providers/okta/getOktaUser.d.ts +0 -3
  41. package/dist/actions/providers/okta/getOktaUser.js +0 -40
  42. package/dist/actions/providers/okta/listMFA.d.ts +0 -3
  43. package/dist/actions/providers/okta/listMFA.js +0 -52
  44. package/dist/actions/providers/okta/listOktaGroupMembers.d.ts +0 -3
  45. package/dist/actions/providers/okta/listOktaGroupMembers.js +0 -99
  46. package/dist/actions/providers/okta/listOktaGroups.d.ts +0 -3
  47. package/dist/actions/providers/okta/listOktaGroups.js +0 -92
  48. package/dist/actions/providers/okta/listOktaUserGroups.d.ts +0 -3
  49. package/dist/actions/providers/okta/listOktaUserGroups.js +0 -83
  50. package/dist/actions/providers/okta/listOktaUsers.d.ts +0 -3
  51. package/dist/actions/providers/okta/listOktaUsers.js +0 -100
  52. package/dist/actions/providers/okta/removeUserFromGroup.d.ts +0 -3
  53. package/dist/actions/providers/okta/removeUserFromGroup.js +0 -56
  54. package/dist/actions/providers/okta/resetMFA.d.ts +0 -3
  55. package/dist/actions/providers/okta/resetMFA.js +0 -62
  56. package/dist/actions/providers/okta/resetPassword.d.ts +0 -3
  57. package/dist/actions/providers/okta/resetPassword.js +0 -57
  58. package/dist/actions/providers/okta/triggerOktaWorkflow.d.ts +0 -3
  59. package/dist/actions/providers/okta/triggerOktaWorkflow.js +0 -44
  60. package/dist/actions/providers/salesforce/fetchSalesforceSchema.d.ts +0 -3
  61. package/dist/actions/providers/salesforce/fetchSalesforceSchema.js +0 -40
  62. package/dist/actions/providers/slack/archiveChannel.d.ts +0 -3
  63. package/dist/actions/providers/slack/archiveChannel.js +0 -42
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.2.199",
3
+ "version": "0.2.200",
4
4
  "type": "module",
5
5
  "description": "AI Actions by Credal AI",
6
6
  "sideEffects": false,
@@ -1,6 +0,0 @@
1
- import type { ActionTemplate } from "./parse.js";
2
- export type ActionGroups = Record<string, {
3
- description: string;
4
- actions: ActionTemplate[];
5
- }>;
6
- export declare const ACTION_GROUPS: ActionGroups;
@@ -1,251 +0,0 @@
1
- import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, jiraGetServiceDesksDefinition, jiraCreateServiceDeskRequestDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, jiraOrgAssignJiraTicketDefinition, jiraOrgCreateJiraTicketDefinition, jiraOrgCommentJiraTicketDefinition, jiraOrgGetJiraTicketDetailsDefinition, jiraOrgGetJiraTicketHistoryDefinition, jiraOrgUpdateJiraTicketDetailsDefinition, jiraOrgUpdateJiraTicketStatusDefinition, jiraOrgGetJiraIssuesByQueryDefinition, googleOauthGetDriveFileContentByIdDefinition, googleOauthSearchDriveByQueryDefinition, googleOauthSearchDriveByQueryAndGetFileContentDefinition, githubGetFileContentDefinition, githubListDirectoryDefinition, } from "./autogen/templates.js";
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
- googleOauthSearchDriveByQueryAndGetFileContentDefinition,
51
- googleOauthGetDriveFileContentByIdDefinition,
52
- ],
53
- },
54
- GOOGLE_CALENDAR: {
55
- description: "Actions for interacting with Google Calendar",
56
- actions: [
57
- googleOauthScheduleCalendarMeetingDefinition,
58
- googleOauthListCalendarsDefinition,
59
- googleOauthListCalendarEventsDefinition,
60
- googleOauthUpdateCalendarEventDefinition,
61
- googleOauthDeleteCalendarEventDefinition,
62
- ],
63
- },
64
- GMAIL: {
65
- description: "Actions for interacting with Gmail",
66
- actions: [googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition],
67
- },
68
- LINKEDIN_SHARE_POST: {
69
- description: "Action for creating a share post url on linkedin",
70
- actions: [linkedinCreateShareLinkedinPostUrlDefinition],
71
- },
72
- ZENDESK_ACTIONS: {
73
- description: "Actions for interacting with Zendesk",
74
- actions: [
75
- zendeskCreateZendeskTicketDefinition,
76
- zendeskListZendeskTicketsDefinition,
77
- zendeskGetTicketDetailsDefinition,
78
- zendeskUpdateTicketStatusDefinition,
79
- zendeskAddCommentToTicketDefinition,
80
- zendeskAssignTicketDefinition,
81
- ],
82
- },
83
- BING_SEARCH: {
84
- description: "Action for searching Bing",
85
- actions: [bingGetTopNSearchResultUrlsDefinition],
86
- },
87
- MONGO_INSERT_DOC: {
88
- description: "Action for inserting a document into a MongoDB collection",
89
- actions: [mongoInsertMongoDocDefinition],
90
- },
91
- SNOWFLAKE_ACTIONS: {
92
- description: "Action for getting content from a Snowflake table",
93
- actions: [snowflakeGetRowByFieldValueDefinition, snowflakeRunSnowflakeQueryDefinition],
94
- },
95
- JIRA_ACTIONS: {
96
- description: "Action for interacting with Jira tickets",
97
- actions: [
98
- jiraAssignJiraTicketDefinition,
99
- jiraCreateJiraTicketDefinition,
100
- jiraCommentJiraTicketDefinition,
101
- jiraGetJiraTicketDetailsDefinition,
102
- jiraGetJiraTicketHistoryDefinition,
103
- jiraUpdateJiraTicketDetailsDefinition,
104
- jiraUpdateJiraTicketStatusDefinition,
105
- jiraGetJiraIssuesByQueryDefinition,
106
- jiraGetServiceDesksDefinition,
107
- jiraCreateServiceDeskRequestDefinition,
108
- ],
109
- },
110
- JIRA_ORG_ACTIONS: {
111
- description: "Action for interacting with Jira tickets",
112
- actions: [
113
- jiraOrgAssignJiraTicketDefinition,
114
- jiraOrgCreateJiraTicketDefinition,
115
- jiraOrgCommentJiraTicketDefinition,
116
- jiraOrgGetJiraTicketDetailsDefinition,
117
- jiraOrgGetJiraTicketHistoryDefinition,
118
- jiraOrgUpdateJiraTicketDetailsDefinition,
119
- jiraOrgUpdateJiraTicketStatusDefinition,
120
- jiraOrgGetJiraIssuesByQueryDefinition,
121
- ],
122
- },
123
- OPENSTREETMAP_GET_LATITUDE_LONGITUDE_FROM_LOCATION: {
124
- description: "Action for getting the latitude and longitude of a location",
125
- actions: [openstreetmapGetLatitudeLongitudeFromLocationDefinition],
126
- },
127
- NWS_GET_FORECAST_FOR_LOCATION: {
128
- description: "Action for getting the weather forecast for a location",
129
- actions: [nwsGetForecastForLocationDefinition],
130
- },
131
- FIRECRAWL: {
132
- description: "Actions for interacting with Firecrawl",
133
- actions: [
134
- firecrawlScrapeUrlDefinition,
135
- firecrawlScrapeTweetDataWithNitterDefinition,
136
- firecrawlDeepResearchDefinition,
137
- ],
138
- },
139
- RESEND: {
140
- description: "Action for sending an email",
141
- actions: [resendSendEmailDefinition],
142
- },
143
- X: {
144
- description: "Actions for interacting with X(formerly twitter)",
145
- actions: [xCreateShareXPostUrlDefinition],
146
- },
147
- GONG: {
148
- description: "Actions for interacting with Gong",
149
- actions: [gongGetGongTranscriptsDefinition],
150
- },
151
- FINNHUB: {
152
- description: "Action for interacting with Finnhub for stock market data",
153
- actions: [finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition],
154
- },
155
- JAMF: {
156
- description: "Actions for interacting with Jamf",
157
- actions: [
158
- jamfGetJamfComputerInventoryDefinition,
159
- jamfGetJamfFileVaultRecoveryKeyDefinition,
160
- jamfGetJamfUserComputerIdDefinition,
161
- jamfLockJamfComputerByIdDefinition,
162
- ],
163
- },
164
- LOOKER: {
165
- description: "Actions for interacting with Looker",
166
- actions: [lookerEnableUserByEmailDefinition],
167
- },
168
- SALESFORCE: {
169
- description: "Actions for interacting with Salesforce",
170
- actions: [
171
- salesforceUpdateRecordDefinition,
172
- salesforceCreateRecordDefinition,
173
- salesforceCreateCaseDefinition,
174
- salesforceGenerateSalesReportDefinition,
175
- salesforceGetRecordDefinition,
176
- salesforceGetSalesforceRecordsByQueryDefinition,
177
- salesforceFetchSalesforceSchemaByObjectDefinition,
178
- ],
179
- },
180
- MICROSOFT: {
181
- description: "Actions for interacting with Microsoft 365",
182
- actions: [
183
- microsoftMessageTeamsChatDefinition,
184
- microsoftMessageTeamsChannelDefinition,
185
- microsoftUpdateSpreadsheetDefinition,
186
- microsoftUpdateDocumentDefinition,
187
- microsoftCreateDocumentDefinition,
188
- microsoftGetDocumentDefinition,
189
- ],
190
- },
191
- KANDJI: {
192
- description: "Actions for interacting with Kandji",
193
- actions: [kandjiGetFVRecoveryKeyForDeviceDefinition],
194
- },
195
- GITHUB: {
196
- description: "Actions for interacting with GitHub",
197
- actions: [
198
- githubCreateOrUpdateFileDefinition,
199
- githubCreateBranchDefinition,
200
- githubCreatePullRequestDefinition,
201
- githubListPullRequestsDefinition,
202
- githubGetFileContentDefinition,
203
- githubListDirectoryDefinition,
204
- ],
205
- },
206
- ASHBY: {
207
- description: "Actions for interacting with Ashby",
208
- actions: [
209
- ashbyCreateNoteDefinition,
210
- ashbyGetCandidateInfoDefinition,
211
- ashbyListCandidatesDefinition,
212
- ashbyListCandidateNotesDefinition,
213
- ashbySearchCandidatesDefinition,
214
- ashbyCreateCandidateDefinition,
215
- ashbyUpdateCandidateDefinition,
216
- ashbyAddCandidateToProjectDefinition,
217
- ],
218
- },
219
- NOTION: {
220
- description: "Actions for interacting with Notion",
221
- actions: [notionSearchByTitleDefinition],
222
- },
223
- GOOGLE_GROUPS: {
224
- description: "Google Workspace Groups management actions",
225
- actions: [
226
- googleOauthListGroupsDefinition,
227
- googleOauthGetGroupDefinition,
228
- googleOauthListGroupMembersDefinition,
229
- googleOauthHasGroupMemberDefinition,
230
- googleOauthAddGroupMemberDefinition,
231
- googleOauthDeleteGroupMemberDefinition,
232
- ],
233
- },
234
- OKTA: {
235
- description: "Actions for interacting with Okta",
236
- actions: [
237
- oktaListOktaUsersDefinition,
238
- oktaGetOktaUserDefinition,
239
- oktaListOktaUserGroupsDefinition,
240
- oktaListOktaGroupsDefinition,
241
- oktaGetOktaGroupDefinition,
242
- oktaListOktaGroupMembersDefinition,
243
- oktaRemoveUserFromGroupDefinition,
244
- oktaAddUserToGroupDefinition,
245
- oktaResetPasswordDefinition,
246
- oktaResetMFADefinition,
247
- oktaListMFADefinition,
248
- oktaTriggerOktaWorkflowDefinition,
249
- ],
250
- },
251
- };
@@ -1,3 +0,0 @@
1
- import type { ashbyAddCandidateToProjectFunction } from "../../autogen/types.js";
2
- declare const addCandidateToProject: ashbyAddCandidateToProjectFunction;
3
- export default addCandidateToProject;
@@ -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,3 +0,0 @@
1
- import type { ashbyCreateCandidateFunction } from "../../autogen/types.js";
2
- declare const createCandidate: ashbyCreateCandidateFunction;
3
- export default createCandidate;
@@ -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,3 +0,0 @@
1
- import type { ashbyCreateNoteFunction } from "../../autogen/types.js";
2
- declare const createNote: ashbyCreateNoteFunction;
3
- export default createNote;
@@ -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;
@@ -1,3 +0,0 @@
1
- import type { ashbyGetCandidateInfoFunction } from "../../autogen/types.js";
2
- declare const getCandidateInfo: ashbyGetCandidateInfoFunction;
3
- export default getCandidateInfo;
@@ -1,33 +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 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;
@@ -1,3 +0,0 @@
1
- import type { ashbyListCandidateNotesFunction } from "../../autogen/types.js";
2
- declare const listCandidateNotes: ashbyListCandidateNotesFunction;
3
- export default listCandidateNotes;
@@ -1,33 +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 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;
@@ -1,3 +0,0 @@
1
- import type { ashbyListCandidatesFunction } from "../../autogen/types.js";
2
- declare const listCandidates: ashbyListCandidatesFunction;
3
- export default listCandidates;
@@ -1,30 +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 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;
@@ -1,3 +0,0 @@
1
- import type { ashbySearchCandidatesFunction } from "../../autogen/types.js";
2
- declare const searchCandidates: ashbySearchCandidatesFunction;
3
- export default searchCandidates;
@@ -1,34 +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 searchCandidates = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
13
- const { email, name } = 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.search`, {
19
- email,
20
- name,
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
- return {
31
- candidates: response.data.results,
32
- };
33
- });
34
- export default searchCandidates;
@@ -1,3 +0,0 @@
1
- import type { ashbyUpdateCandidateFunction } from "../../autogen/types.js";
2
- declare const updateCandidate: ashbyUpdateCandidateFunction;
3
- export default updateCandidate;
@@ -1,56 +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 updateCandidate = (_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 body = {
18
- candidateId: params.candidateId,
19
- };
20
- if (params.name !== undefined)
21
- body.name = params.name;
22
- if (params.email !== undefined)
23
- body.email = params.email;
24
- if (params.phoneNumber !== undefined)
25
- body.phoneNumber = params.phoneNumber;
26
- if (params.linkedInUrl !== undefined)
27
- body.linkedInUrl = params.linkedInUrl;
28
- if (params.githubUrl !== undefined)
29
- body.githubUrl = params.githubUrl;
30
- if (params.websiteUrl !== undefined)
31
- body.websiteUrl = params.websiteUrl;
32
- if (params.alternateEmail !== undefined)
33
- body.alternateEmail = params.alternateEmail;
34
- if (params.socialLinks !== undefined)
35
- body.socialLinks = params.socialLinks;
36
- if (params.sourceId !== undefined)
37
- body.sourceId = params.sourceId;
38
- if (params.creditedToUserId !== undefined)
39
- body.creditedToUserId = params.creditedToUserId;
40
- if (params.location !== undefined)
41
- body.location = params.location;
42
- if (params.createdAt !== undefined)
43
- body.createdAt = params.createdAt;
44
- if (params.sendNotifications !== undefined)
45
- body.sendNotifications = params.sendNotifications;
46
- const response = yield axiosClient.post(`https://api.ashbyhq.com/candidate.update`, body, {
47
- auth: {
48
- username: authToken,
49
- password: "",
50
- },
51
- });
52
- if (!response.data.success) {
53
- throw new Error(response.data.errors.join("; "));
54
- }
55
- });
56
- export default updateCandidate;
@@ -1,3 +0,0 @@
1
- import type { githubSearchRepositoryFunction } from "../../autogen/types.js";
2
- declare const searchRepository: githubSearchRepositoryFunction;
3
- export default searchRepository;