@credal/actions 0.2.205 → 0.2.206
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/autogen/templates.d.ts +1 -0
- package/dist/actions/autogen/templates.js +52 -2
- package/dist/actions/autogen/types.d.ts +61 -0
- package/dist/actions/autogen/types.js +29 -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/github/searchRepository.js +7 -7
- package/dist/actions/providers/gong/getGongTranscripts.d.ts +3 -0
- package/dist/actions/providers/gong/getGongTranscripts.js +315 -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/updateServiceDeskRequest.d.ts +3 -0
- package/dist/actions/providers/jira/updateServiceDeskRequest.js +72 -0
- package/dist/actions/providers/kandji/getFVRecoveryKeyForDevice.d.ts +3 -0
- package/dist/actions/providers/kandji/getFVRecoveryKeyForDevice.js +85 -0
- package/dist/actions/providers/microsoft/sendOutlookEmail.d.ts +3 -0
- package/dist/actions/providers/microsoft/sendOutlookEmail.js +48 -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/executeReport.js +2 -1
- package/dist/actions/providers/salesforce/fetchSalesforceSchema.d.ts +3 -0
- package/dist/actions/providers/salesforce/fetchSalesforceSchema.js +40 -0
- package/package.json +3 -3
|
@@ -48,6 +48,7 @@ export declare const jiraOrgLinkAndAssignJiraIssuesDefinition: ActionTemplate;
|
|
|
48
48
|
export declare const jiraDataCenterAssignJiraTicketDefinition: ActionTemplate;
|
|
49
49
|
export declare const jiraDataCenterPublicCommentOnServiceDeskRequestDefinition: ActionTemplate;
|
|
50
50
|
export declare const jiraDataCenterCommentJiraTicketDefinition: ActionTemplate;
|
|
51
|
+
export declare const jiraDataCenterCommentJiraTicketWithMentionsDefinition: ActionTemplate;
|
|
51
52
|
export declare const jiraDataCenterCreateJiraTicketDefinition: ActionTemplate;
|
|
52
53
|
export declare const jiraDataCenterCreateServiceDeskRequestDefinition: ActionTemplate;
|
|
53
54
|
export declare const jiraDataCenterGetJiraTicketDetailsDefinition: ActionTemplate;
|
|
@@ -1465,7 +1465,7 @@ export const jiraCommentJiraTicketDefinition = {
|
|
|
1465
1465
|
provider: "jira",
|
|
1466
1466
|
};
|
|
1467
1467
|
export const jiraCommentJiraTicketWithMentionsDefinition = {
|
|
1468
|
-
displayName: "Comment on a Jira ticket with @
|
|
1468
|
+
displayName: "Comment on a Jira ticket with @mention support",
|
|
1469
1469
|
description: "Comments on a Jira ticket, converting [~accountid:ID] patterns into clickable @mentions (Jira Cloud only).",
|
|
1470
1470
|
scopes: ["write:comment:jira"],
|
|
1471
1471
|
tags: [],
|
|
@@ -2321,7 +2321,7 @@ export const jiraOrgCommentJiraTicketDefinition = {
|
|
|
2321
2321
|
provider: "jiraOrg",
|
|
2322
2322
|
};
|
|
2323
2323
|
export const jiraOrgCommentJiraTicketWithMentionsDefinition = {
|
|
2324
|
-
displayName: "Comment on a Jira ticket with @
|
|
2324
|
+
displayName: "Comment on a Jira ticket with @mention support",
|
|
2325
2325
|
description: "Comments on a Jira ticket, converting [~accountid:ID] patterns into clickable @mentions (Jira Cloud only).",
|
|
2326
2326
|
scopes: ["write:comment:jira"],
|
|
2327
2327
|
tags: [],
|
|
@@ -3176,6 +3176,51 @@ export const jiraDataCenterCommentJiraTicketDefinition = {
|
|
|
3176
3176
|
name: "commentJiraTicket",
|
|
3177
3177
|
provider: "jiraDataCenter",
|
|
3178
3178
|
};
|
|
3179
|
+
export const jiraDataCenterCommentJiraTicketWithMentionsDefinition = {
|
|
3180
|
+
displayName: "Comment on a Jira ticket with @mention support",
|
|
3181
|
+
description: "Comments on a Jira ticket, converting [~accountid:ID] patterns into clickable @mentions (Jira Cloud only).",
|
|
3182
|
+
scopes: ["write:comment:jira"],
|
|
3183
|
+
tags: [],
|
|
3184
|
+
parameters: {
|
|
3185
|
+
type: "object",
|
|
3186
|
+
required: ["projectKey", "issueId", "comment"],
|
|
3187
|
+
properties: {
|
|
3188
|
+
projectKey: {
|
|
3189
|
+
type: "string",
|
|
3190
|
+
description: "The key for the project to which the ticket you want to comment on belongs.",
|
|
3191
|
+
tags: ["recommend-predefined"],
|
|
3192
|
+
},
|
|
3193
|
+
issueId: {
|
|
3194
|
+
type: "string",
|
|
3195
|
+
description: "The issue ID associated with the ticket to be commented on.",
|
|
3196
|
+
},
|
|
3197
|
+
comment: {
|
|
3198
|
+
type: "string",
|
|
3199
|
+
description: "The text to be commented on the ticket. Use [~accountid:ATLASSIAN_ACCOUNT_ID] to @mention users (Jira Cloud only).",
|
|
3200
|
+
},
|
|
3201
|
+
},
|
|
3202
|
+
},
|
|
3203
|
+
output: {
|
|
3204
|
+
type: "object",
|
|
3205
|
+
required: ["success"],
|
|
3206
|
+
properties: {
|
|
3207
|
+
success: {
|
|
3208
|
+
type: "boolean",
|
|
3209
|
+
description: "Whether the comment was sent successfully",
|
|
3210
|
+
},
|
|
3211
|
+
error: {
|
|
3212
|
+
type: "string",
|
|
3213
|
+
description: "The error that occurred if the comment was not sent successfully",
|
|
3214
|
+
},
|
|
3215
|
+
commentUrl: {
|
|
3216
|
+
type: "string",
|
|
3217
|
+
description: "The url to the created Jira comment",
|
|
3218
|
+
},
|
|
3219
|
+
},
|
|
3220
|
+
},
|
|
3221
|
+
name: "commentJiraTicketWithMentions",
|
|
3222
|
+
provider: "jiraDataCenter",
|
|
3223
|
+
};
|
|
3179
3224
|
export const jiraDataCenterCreateJiraTicketDefinition = {
|
|
3180
3225
|
displayName: "Create a Jira ticket",
|
|
3181
3226
|
description: "Create a jira ticket with new content specified",
|
|
@@ -10838,6 +10883,11 @@ export const salesforceExecuteReportDefinition = {
|
|
|
10838
10883
|
type: "boolean",
|
|
10839
10884
|
description: "Whether the report was successfully executed",
|
|
10840
10885
|
},
|
|
10886
|
+
reportData: {
|
|
10887
|
+
type: "object",
|
|
10888
|
+
description: "The report data returned by Salesforce, including factMap with aggregates and row-level details",
|
|
10889
|
+
additionalProperties: true,
|
|
10890
|
+
},
|
|
10841
10891
|
error: {
|
|
10842
10892
|
type: "string",
|
|
10843
10893
|
description: "The error that occurred if the report was not successfully executed",
|
|
@@ -2450,6 +2450,35 @@ export declare const jiraOrgCommentJiraTicketOutputSchema: z.ZodObject<{
|
|
|
2450
2450
|
}>;
|
|
2451
2451
|
export type jiraOrgCommentJiraTicketOutputType = z.infer<typeof jiraOrgCommentJiraTicketOutputSchema>;
|
|
2452
2452
|
export type jiraOrgCommentJiraTicketFunction = ActionFunction<jiraOrgCommentJiraTicketParamsType, AuthParamsType, jiraOrgCommentJiraTicketOutputType>;
|
|
2453
|
+
export declare const jiraOrgCommentJiraTicketWithMentionsParamsSchema: z.ZodObject<{
|
|
2454
|
+
projectKey: z.ZodString;
|
|
2455
|
+
issueId: z.ZodString;
|
|
2456
|
+
comment: z.ZodString;
|
|
2457
|
+
}, "strip", z.ZodTypeAny, {
|
|
2458
|
+
projectKey: string;
|
|
2459
|
+
issueId: string;
|
|
2460
|
+
comment: string;
|
|
2461
|
+
}, {
|
|
2462
|
+
projectKey: string;
|
|
2463
|
+
issueId: string;
|
|
2464
|
+
comment: string;
|
|
2465
|
+
}>;
|
|
2466
|
+
export type jiraOrgCommentJiraTicketWithMentionsParamsType = z.infer<typeof jiraOrgCommentJiraTicketWithMentionsParamsSchema>;
|
|
2467
|
+
export declare const jiraOrgCommentJiraTicketWithMentionsOutputSchema: z.ZodObject<{
|
|
2468
|
+
success: z.ZodBoolean;
|
|
2469
|
+
error: z.ZodOptional<z.ZodString>;
|
|
2470
|
+
commentUrl: z.ZodOptional<z.ZodString>;
|
|
2471
|
+
}, "strip", z.ZodTypeAny, {
|
|
2472
|
+
success: boolean;
|
|
2473
|
+
error?: string | undefined;
|
|
2474
|
+
commentUrl?: string | undefined;
|
|
2475
|
+
}, {
|
|
2476
|
+
success: boolean;
|
|
2477
|
+
error?: string | undefined;
|
|
2478
|
+
commentUrl?: string | undefined;
|
|
2479
|
+
}>;
|
|
2480
|
+
export type jiraOrgCommentJiraTicketWithMentionsOutputType = z.infer<typeof jiraOrgCommentJiraTicketWithMentionsOutputSchema>;
|
|
2481
|
+
export type jiraOrgCommentJiraTicketWithMentionsFunction = ActionFunction<jiraOrgCommentJiraTicketWithMentionsParamsType, AuthParamsType, jiraOrgCommentJiraTicketWithMentionsOutputType>;
|
|
2453
2482
|
export declare const jiraOrgCreateJiraTicketParamsSchema: z.ZodObject<{
|
|
2454
2483
|
projectKey: z.ZodString;
|
|
2455
2484
|
summary: z.ZodString;
|
|
@@ -3230,6 +3259,35 @@ export declare const jiraDataCenterCommentJiraTicketOutputSchema: z.ZodObject<{
|
|
|
3230
3259
|
}>;
|
|
3231
3260
|
export type jiraDataCenterCommentJiraTicketOutputType = z.infer<typeof jiraDataCenterCommentJiraTicketOutputSchema>;
|
|
3232
3261
|
export type jiraDataCenterCommentJiraTicketFunction = ActionFunction<jiraDataCenterCommentJiraTicketParamsType, AuthParamsType, jiraDataCenterCommentJiraTicketOutputType>;
|
|
3262
|
+
export declare const jiraDataCenterCommentJiraTicketWithMentionsParamsSchema: z.ZodObject<{
|
|
3263
|
+
projectKey: z.ZodString;
|
|
3264
|
+
issueId: z.ZodString;
|
|
3265
|
+
comment: z.ZodString;
|
|
3266
|
+
}, "strip", z.ZodTypeAny, {
|
|
3267
|
+
projectKey: string;
|
|
3268
|
+
issueId: string;
|
|
3269
|
+
comment: string;
|
|
3270
|
+
}, {
|
|
3271
|
+
projectKey: string;
|
|
3272
|
+
issueId: string;
|
|
3273
|
+
comment: string;
|
|
3274
|
+
}>;
|
|
3275
|
+
export type jiraDataCenterCommentJiraTicketWithMentionsParamsType = z.infer<typeof jiraDataCenterCommentJiraTicketWithMentionsParamsSchema>;
|
|
3276
|
+
export declare const jiraDataCenterCommentJiraTicketWithMentionsOutputSchema: z.ZodObject<{
|
|
3277
|
+
success: z.ZodBoolean;
|
|
3278
|
+
error: z.ZodOptional<z.ZodString>;
|
|
3279
|
+
commentUrl: z.ZodOptional<z.ZodString>;
|
|
3280
|
+
}, "strip", z.ZodTypeAny, {
|
|
3281
|
+
success: boolean;
|
|
3282
|
+
error?: string | undefined;
|
|
3283
|
+
commentUrl?: string | undefined;
|
|
3284
|
+
}, {
|
|
3285
|
+
success: boolean;
|
|
3286
|
+
error?: string | undefined;
|
|
3287
|
+
commentUrl?: string | undefined;
|
|
3288
|
+
}>;
|
|
3289
|
+
export type jiraDataCenterCommentJiraTicketWithMentionsOutputType = z.infer<typeof jiraDataCenterCommentJiraTicketWithMentionsOutputSchema>;
|
|
3290
|
+
export type jiraDataCenterCommentJiraTicketWithMentionsFunction = ActionFunction<jiraDataCenterCommentJiraTicketWithMentionsParamsType, AuthParamsType, jiraDataCenterCommentJiraTicketWithMentionsOutputType>;
|
|
3233
3291
|
export declare const jiraDataCenterCreateJiraTicketParamsSchema: z.ZodObject<{
|
|
3234
3292
|
projectKey: z.ZodString;
|
|
3235
3293
|
summary: z.ZodString;
|
|
@@ -7637,13 +7695,16 @@ export declare const salesforceExecuteReportParamsSchema: z.ZodObject<{
|
|
|
7637
7695
|
export type salesforceExecuteReportParamsType = z.infer<typeof salesforceExecuteReportParamsSchema>;
|
|
7638
7696
|
export declare const salesforceExecuteReportOutputSchema: z.ZodObject<{
|
|
7639
7697
|
success: z.ZodBoolean;
|
|
7698
|
+
reportData: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodAny, z.objectOutputType<{}, z.ZodAny, "strip">, z.objectInputType<{}, z.ZodAny, "strip">>>;
|
|
7640
7699
|
error: z.ZodOptional<z.ZodString>;
|
|
7641
7700
|
}, "strip", z.ZodTypeAny, {
|
|
7642
7701
|
success: boolean;
|
|
7643
7702
|
error?: string | undefined;
|
|
7703
|
+
reportData?: z.objectOutputType<{}, z.ZodAny, "strip"> | undefined;
|
|
7644
7704
|
}, {
|
|
7645
7705
|
success: boolean;
|
|
7646
7706
|
error?: string | undefined;
|
|
7707
|
+
reportData?: z.objectInputType<{}, z.ZodAny, "strip"> | undefined;
|
|
7647
7708
|
}>;
|
|
7648
7709
|
export type salesforceExecuteReportOutputType = z.infer<typeof salesforceExecuteReportOutputSchema>;
|
|
7649
7710
|
export type salesforceExecuteReportFunction = ActionFunction<salesforceExecuteReportParamsType, AuthParamsType, salesforceExecuteReportOutputType>;
|
|
@@ -907,6 +907,18 @@ export const jiraOrgCommentJiraTicketOutputSchema = z.object({
|
|
|
907
907
|
error: z.string().describe("The error that occurred if the comment was not sent successfully").optional(),
|
|
908
908
|
commentUrl: z.string().describe("The url to the created Jira comment").optional(),
|
|
909
909
|
});
|
|
910
|
+
export const jiraOrgCommentJiraTicketWithMentionsParamsSchema = z.object({
|
|
911
|
+
projectKey: z.string().describe("The key for the project to which the ticket you want to comment on belongs."),
|
|
912
|
+
issueId: z.string().describe("The issue ID associated with the ticket to be commented on."),
|
|
913
|
+
comment: z
|
|
914
|
+
.string()
|
|
915
|
+
.describe("The text to be commented on the ticket. Use [~accountid:ATLASSIAN_ACCOUNT_ID] to @mention users (Jira Cloud only)."),
|
|
916
|
+
});
|
|
917
|
+
export const jiraOrgCommentJiraTicketWithMentionsOutputSchema = z.object({
|
|
918
|
+
success: z.boolean().describe("Whether the comment was sent successfully"),
|
|
919
|
+
error: z.string().describe("The error that occurred if the comment was not sent successfully").optional(),
|
|
920
|
+
commentUrl: z.string().describe("The url to the created Jira comment").optional(),
|
|
921
|
+
});
|
|
910
922
|
export const jiraOrgCreateJiraTicketParamsSchema = z.object({
|
|
911
923
|
projectKey: z.string().describe("The key for the project you want to add the ticket to."),
|
|
912
924
|
summary: z.string().describe("The summary of the new ticket"),
|
|
@@ -1147,6 +1159,18 @@ export const jiraDataCenterCommentJiraTicketOutputSchema = z.object({
|
|
|
1147
1159
|
error: z.string().describe("The error that occurred if the comment was not sent successfully").optional(),
|
|
1148
1160
|
commentUrl: z.string().describe("The url to the created Jira comment").optional(),
|
|
1149
1161
|
});
|
|
1162
|
+
export const jiraDataCenterCommentJiraTicketWithMentionsParamsSchema = z.object({
|
|
1163
|
+
projectKey: z.string().describe("The key for the project to which the ticket you want to comment on belongs."),
|
|
1164
|
+
issueId: z.string().describe("The issue ID associated with the ticket to be commented on."),
|
|
1165
|
+
comment: z
|
|
1166
|
+
.string()
|
|
1167
|
+
.describe("The text to be commented on the ticket. Use [~accountid:ATLASSIAN_ACCOUNT_ID] to @mention users (Jira Cloud only)."),
|
|
1168
|
+
});
|
|
1169
|
+
export const jiraDataCenterCommentJiraTicketWithMentionsOutputSchema = z.object({
|
|
1170
|
+
success: z.boolean().describe("Whether the comment was sent successfully"),
|
|
1171
|
+
error: z.string().describe("The error that occurred if the comment was not sent successfully").optional(),
|
|
1172
|
+
commentUrl: z.string().describe("The url to the created Jira comment").optional(),
|
|
1173
|
+
});
|
|
1150
1174
|
export const jiraDataCenterCreateJiraTicketParamsSchema = z.object({
|
|
1151
1175
|
projectKey: z.string().describe("The key for the project you want to add the ticket to."),
|
|
1152
1176
|
summary: z.string().describe("The summary of the new ticket"),
|
|
@@ -3975,6 +3999,11 @@ export const salesforceExecuteReportParamsSchema = z.object({
|
|
|
3975
3999
|
});
|
|
3976
4000
|
export const salesforceExecuteReportOutputSchema = z.object({
|
|
3977
4001
|
success: z.boolean().describe("Whether the report was successfully executed"),
|
|
4002
|
+
reportData: z
|
|
4003
|
+
.object({})
|
|
4004
|
+
.catchall(z.any())
|
|
4005
|
+
.describe("The report data returned by Salesforce, including factMap with aggregates and row-level details")
|
|
4006
|
+
.optional(),
|
|
3978
4007
|
error: z.string().describe("The error that occurred if the report was not successfully executed").optional(),
|
|
3979
4008
|
});
|
|
3980
4009
|
export const salesforceSearchSalesforceRecordsParamsSchema = z.object({
|
|
@@ -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;
|
|
@@ -0,0 +1,34 @@
|
|
|
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;
|
|
@@ -0,0 +1,56 @@
|
|
|
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;
|
|
@@ -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.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.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;
|
|
80
80
|
return ({
|
|
81
81
|
filename: f.filename,
|
|
82
82
|
status: f.status,
|
|
83
|
-
patch: (
|
|
83
|
+
patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).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;
|
|
108
108
|
return ({
|
|
109
109
|
filename: f.filename,
|
|
110
110
|
status: f.status,
|
|
111
|
-
patch: (
|
|
111
|
+
patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).join("\n"),
|
|
112
112
|
});
|
|
113
113
|
})
|
|
114
114
|
: undefined;
|
|
115
115
|
return {
|
|
116
116
|
number: item.number,
|
|
117
117
|
title: item.title,
|
|
118
|
-
|
|
118
|
+
html_url: item.html_url,
|
|
119
119
|
state: item.state,
|
|
120
120
|
isPullRequest: isPR,
|
|
121
121
|
body: item.body,
|