@abcagency/hire-control-sdk 1.1.26 → 1.1.28
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/controllers/formSubmissionsController.ts +18 -1
- package/controllers/formsController.ts +42 -11
- package/controllers/integrationConfigController.ts +47 -0
- package/controllers/jobListingsController.ts +15 -0
- package/controllers/recruitersController.ts +5 -2
- package/dist/controllers/formSubmissionsController.d.ts +3 -1
- package/dist/controllers/formsController.d.ts +3 -1
- package/dist/controllers/integrationConfigController.d.ts +5 -0
- package/dist/controllers/jobListingsController.d.ts +5 -1
- package/dist/controllers/recruitersController.d.ts +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +27 -9
- package/dist/types/JobListing.d.ts +17 -0
- package/dist/types/form.d.ts +93 -0
- package/dist/types/formSubmission.d.ts +24 -1
- package/dist/types/integrationConfig.d.ts +19 -0
- package/dist/types/user.d.ts +1 -0
- package/index.ts +53 -5
- package/package.json +1 -1
- package/types/JobListing.ts +19 -0
- package/types/form.ts +112 -0
- package/types/formSubmission.ts +25 -0
- package/types/integrationConfig.ts +21 -0
- package/types/user.ts +1 -0
- package/controllers/jobDataAlertsController.ts +0 -94
- package/types/jobDataAlert.ts +0 -72
package/dist/index.d.ts
CHANGED
|
@@ -12,11 +12,11 @@ import Event, { EventDates, EventDateType, EventInstance, EventType, CallToActio
|
|
|
12
12
|
import { Listing } from "./types/listing";
|
|
13
13
|
import Filters from "./types/filters/filters";
|
|
14
14
|
import AppendListing from "./types/appendListing";
|
|
15
|
-
import Form, { FormFieldMigrationRequest, FormUpdateOptions } from "./types/form";
|
|
16
|
-
import FormSubmission, { FormSubmissionStatus } from "./types/formSubmission";
|
|
15
|
+
import Form, { FormExperienceType, EasyApplyForm, FormFieldMigrationRequest, FormUpdateOptions, GuidedActionExecutionRequest, GuidedActionExecutionResult, GuidedBranchAction, GuidedBranchDestination, GuidedBranchTrigger, GuidedFormSettings, JobTargetedFormSelection, JobTargetingSettings, SubmissionAutomationRule, SubmissionAutomationSettings, SubmissionConditionOperator } from "./types/form";
|
|
16
|
+
import FormSubmission, { FormSubmissionStatus, SubmissionApproval, SubmissionApprovalReviewRequest } from "./types/formSubmission";
|
|
17
17
|
import FormSettings, { FormSettingsSaveRequest } from "./types/formSettings";
|
|
18
18
|
import ResultsWrapper from "./types/resultsWrapper";
|
|
19
|
-
import { JobListing, JobListingSaveResult, JobStatus } from "./types/JobListing";
|
|
19
|
+
import { JobListing, JobListingSaveResult, JobStatus, MapJobListingPreview, MapJobListingsPreviewRequest } from "./types/JobListing";
|
|
20
20
|
import FieldTypeDefinition from "./types/content/fieldDefinition";
|
|
21
21
|
import ValidatorDefinition from "./types/content/validatorDefinition";
|
|
22
22
|
import ContentModel, { ModuleConfig, ModuleFieldMapping, ModuleIdentityMapping, WebPageTemplate, WebPageTemplateSection, WebPageTemplateBlock, ContentModuleSyncPreview, ContentModuleSyncExecuteRequest, ContentModuleSyncExecuteResult } from "./types/content/model";
|
|
@@ -33,7 +33,9 @@ import RecruiterDto from "./types/recruiter";
|
|
|
33
33
|
import FocalPoint from "./types/focalPoint";
|
|
34
34
|
import ListingEntityMedia from "./types/listingEntityMedia";
|
|
35
35
|
import CompletionRequest, { CompletionResponse } from "./types/completionRequest";
|
|
36
|
-
import SearchReadConfig from "./types/searchReadConfig";
|
|
36
|
+
import type SearchReadConfig from "./types/searchReadConfig";
|
|
37
|
+
import type IntegrationConfig from "./types/integrationConfig";
|
|
38
|
+
import { IntegrationType } from "./types/integrationConfig";
|
|
37
39
|
import { BLOCK_KEYS, BLOCK_KEY_ALIASES, FIELD_TYPES, type BlockKey, type FieldType } from "./constants/cms";
|
|
38
40
|
export declare const auth: {
|
|
39
41
|
login: (clientLogInRequest: import("./types/clientLoginRequest").default) => Promise<any>;
|
|
@@ -84,6 +86,10 @@ export declare const clientAuthConfig: {
|
|
|
84
86
|
delete: (id: string, authToken?: string | null) => Promise<void>;
|
|
85
87
|
};
|
|
86
88
|
export declare const integrationConfig: {
|
|
89
|
+
getAll: (authToken?: string | null) => Promise<IntegrationConfig[]>;
|
|
90
|
+
create: (config: IntegrationConfig, authToken?: string | null) => Promise<IntegrationConfig>;
|
|
91
|
+
update: (id: string, config: IntegrationConfig, authToken?: string | null) => Promise<IntegrationConfig>;
|
|
92
|
+
delete: (id: string, authToken?: string | null) => Promise<void>;
|
|
87
93
|
getSearchRead: (authToken?: string | null) => Promise<SearchReadConfig | null>;
|
|
88
94
|
};
|
|
89
95
|
export declare const media: {
|
|
@@ -165,7 +171,7 @@ export declare const listingEntities: {
|
|
|
165
171
|
export declare const recruiters: {
|
|
166
172
|
get: (recruiterIds?: number[] | null, authToken?: string | null) => Promise<Record<string, RecruiterDto>>;
|
|
167
173
|
getAll: (authToken?: string | null) => Promise<RecruiterDto>;
|
|
168
|
-
sync: (authToken?: string | null) => Promise<void>;
|
|
174
|
+
sync: (authToken?: string | null, updateExisting?: boolean) => Promise<void>;
|
|
169
175
|
};
|
|
170
176
|
export declare const permissions: {
|
|
171
177
|
get: (authToken?: string | null) => Promise<string[]>;
|
|
@@ -182,6 +188,7 @@ export declare const companies: {
|
|
|
182
188
|
export declare const jobListings: {
|
|
183
189
|
getAll: (authToken?: string | null) => Promise<JobListing[]>;
|
|
184
190
|
getMapListings: (authToken?: string | null, filterId?: string | null, status?: JobStatus | null) => Promise<any[]>;
|
|
191
|
+
previewMapListings: (request: MapJobListingsPreviewRequest, authToken?: string | null) => Promise<MapJobListingPreview[]>;
|
|
185
192
|
getMapListing: (id: string, authToken?: string | null, status?: JobStatus | null) => Promise<any>;
|
|
186
193
|
getById: (id: string, authToken?: string | null) => Promise<JobListing>;
|
|
187
194
|
updateFieldVersionApproval: (id: string, payload: {
|
|
@@ -248,6 +255,8 @@ export declare const forms: {
|
|
|
248
255
|
migrateSubmissionFields(id: string, migrationRequest: FormFieldMigrationRequest, authToken?: string | null): Promise<number>;
|
|
249
256
|
deleteForm(id: string, authToken?: string | null): Promise<void>;
|
|
250
257
|
processFormRequest(formRequest: string, authToken?: string | null): Promise<string>;
|
|
258
|
+
getEasyApplySelection(jobId: string, fallbackFormId?: string, authToken?: string | null): Promise<JobTargetedFormSelection>;
|
|
259
|
+
executeGuidedAction(formId: string, request: GuidedActionExecutionRequest, authToken?: string | null): Promise<GuidedActionExecutionResult>;
|
|
251
260
|
};
|
|
252
261
|
export declare const formSettings: {
|
|
253
262
|
get: (authToken?: string | null) => Promise<FormSettings>;
|
|
@@ -260,11 +269,12 @@ export declare const formSubmissions: {
|
|
|
260
269
|
exportFormSubmissionsCsv: (pageSize?: number, pageNumber?: number, type?: string | null, status?: FormSubmissionStatus | null, from?: Date | null, to?: Date | null, columns?: string[] | null, authToken?: string | null) => Promise<void>;
|
|
261
270
|
getFormSubmissionTypes: (authToken?: string | null) => Promise<string[]>;
|
|
262
271
|
deleteFormSubmission: (id: string, authToken?: string | null) => Promise<void>;
|
|
272
|
+
reviewSubmissionApproval: (id: string, request: SubmissionApprovalReviewRequest, authToken?: string | null) => Promise<FormSubmission>;
|
|
263
273
|
};
|
|
264
274
|
export { BLOCK_KEYS, BLOCK_KEY_ALIASES, FIELD_TYPES };
|
|
265
|
-
export type { Register, User, Role, HireControlConfig, JobListingEditorConfig, ThemeSystemConfig, ThemeSemanticToken, ThemeScaleToken, ClientAuthConfig, Event, Listing, EventDates, EventDateType, EventInstance, MediaType, Filters, AppendListing, Form, FormFieldMigrationRequest, FormUpdateOptions, FormSubmission, FormSettings, FormSettingsSaveRequest, ResultsWrapper, Company, JobListing, JobListingSaveResult, FieldTypeDefinition, ValidatorDefinition, ContentModel, ModuleConfig, ModuleFieldMapping, ModuleIdentityMapping, WebPageTemplate, WebPageTemplateSection, WebPageTemplateBlock, ContentModuleSyncPreview, ContentModuleSyncExecuteRequest, ContentModuleSyncExecuteResult, ContentBlock, BlockUpdateImpact, BlockFieldChange, BlockFieldMigration, ContentEntry, Blog, CategoryListDto, AddValueRequest, CategoryListValueDto, JobFeed, JobFeedFieldMapping, MultipleFieldConfig, ConditionalConfig, ConditionalRule, JobListingSettings, JobListingSettingsSaveRequest, ListingEntityDto, RecruiterDto, FocalPoint, ListingEntityMedia, CompletionRequest, CompletionResponse,
|
|
266
|
-
export type { BlockKey, FieldType };
|
|
267
|
-
export { EventType, CallToActionType, FormSubmissionStatus, FeedHandlingOption, JobStatus, };
|
|
275
|
+
export type { Register, User, Role, HireControlConfig, JobListingEditorConfig, ThemeSystemConfig, ThemeSemanticToken, ThemeScaleToken, ClientAuthConfig, Event, Listing, EventDates, EventDateType, EventInstance, MediaType, Filters, AppendListing, Form, EasyApplyForm, FormExperienceType, FormFieldMigrationRequest, FormUpdateOptions, GuidedActionExecutionRequest, GuidedActionExecutionResult, GuidedBranchAction, GuidedBranchDestination, GuidedBranchTrigger, GuidedFormSettings, JobTargetedFormSelection, JobTargetingSettings, SubmissionAutomationRule, SubmissionAutomationSettings, SubmissionConditionOperator, FormSubmission, SubmissionApproval, SubmissionApprovalReviewRequest, FormSettings, FormSettingsSaveRequest, ResultsWrapper, Company, JobListing, JobListingSaveResult, MapJobListingPreview, MapJobListingsPreviewRequest, FieldTypeDefinition, ValidatorDefinition, ContentModel, ModuleConfig, ModuleFieldMapping, ModuleIdentityMapping, WebPageTemplate, WebPageTemplateSection, WebPageTemplateBlock, ContentModuleSyncPreview, ContentModuleSyncExecuteRequest, ContentModuleSyncExecuteResult, ContentBlock, BlockUpdateImpact, BlockFieldChange, BlockFieldMigration, ContentEntry, Blog, CategoryListDto, AddValueRequest, CategoryListValueDto, JobFeed, JobFeedFieldMapping, MultipleFieldConfig, ConditionalConfig, ConditionalRule, JobListingSettings, JobListingSettingsSaveRequest, ListingEntityDto, RecruiterDto, FocalPoint, ListingEntityMedia, CompletionRequest, CompletionResponse, };
|
|
276
|
+
export type { BlockKey, FieldType, SearchReadConfig, IntegrationConfig };
|
|
277
|
+
export { EventType, CallToActionType, FormSubmissionStatus, FeedHandlingOption, JobStatus, IntegrationType, };
|
|
268
278
|
declare const hcApi: {
|
|
269
279
|
auth: {
|
|
270
280
|
login: (clientLogInRequest: import("./types/clientLoginRequest").default) => Promise<any>;
|
|
@@ -317,6 +327,10 @@ declare const hcApi: {
|
|
|
317
327
|
delete: (id: string, authToken?: string | null) => Promise<void>;
|
|
318
328
|
};
|
|
319
329
|
integrationConfig: {
|
|
330
|
+
getAll: (authToken?: string | null) => Promise<IntegrationConfig[]>;
|
|
331
|
+
create: (config: IntegrationConfig, authToken?: string | null) => Promise<IntegrationConfig>;
|
|
332
|
+
update: (id: string, config: IntegrationConfig, authToken?: string | null) => Promise<IntegrationConfig>;
|
|
333
|
+
delete: (id: string, authToken?: string | null) => Promise<void>;
|
|
320
334
|
getSearchRead: (authToken?: string | null) => Promise<SearchReadConfig | null>;
|
|
321
335
|
};
|
|
322
336
|
filters: {
|
|
@@ -399,7 +413,7 @@ declare const hcApi: {
|
|
|
399
413
|
recruiters: {
|
|
400
414
|
get: (recruiterIds?: number[] | null, authToken?: string | null) => Promise<Record<string, RecruiterDto>>;
|
|
401
415
|
getAll: (authToken?: string | null) => Promise<RecruiterDto>;
|
|
402
|
-
sync: (authToken?: string | null) => Promise<void>;
|
|
416
|
+
sync: (authToken?: string | null, updateExisting?: boolean) => Promise<void>;
|
|
403
417
|
};
|
|
404
418
|
forms: {
|
|
405
419
|
getForms(authToken?: string | null): Promise<Form[]>;
|
|
@@ -412,6 +426,8 @@ declare const hcApi: {
|
|
|
412
426
|
migrateSubmissionFields(id: string, migrationRequest: FormFieldMigrationRequest, authToken?: string | null): Promise<number>;
|
|
413
427
|
deleteForm(id: string, authToken?: string | null): Promise<void>;
|
|
414
428
|
processFormRequest(formRequest: string, authToken?: string | null): Promise<string>;
|
|
429
|
+
getEasyApplySelection(jobId: string, fallbackFormId?: string, authToken?: string | null): Promise<JobTargetedFormSelection>;
|
|
430
|
+
executeGuidedAction(formId: string, request: GuidedActionExecutionRequest, authToken?: string | null): Promise<GuidedActionExecutionResult>;
|
|
415
431
|
};
|
|
416
432
|
formSettings: {
|
|
417
433
|
get: (authToken?: string | null) => Promise<FormSettings>;
|
|
@@ -424,6 +440,7 @@ declare const hcApi: {
|
|
|
424
440
|
exportFormSubmissionsCsv: (pageSize?: number, pageNumber?: number, type?: string | null, status?: FormSubmissionStatus | null, from?: Date | null, to?: Date | null, columns?: string[] | null, authToken?: string | null) => Promise<void>;
|
|
425
441
|
getFormSubmissionTypes: (authToken?: string | null) => Promise<string[]>;
|
|
426
442
|
deleteFormSubmission: (id: string, authToken?: string | null) => Promise<void>;
|
|
443
|
+
reviewSubmissionApproval: (id: string, request: SubmissionApprovalReviewRequest, authToken?: string | null) => Promise<FormSubmission>;
|
|
427
444
|
};
|
|
428
445
|
openAI: {
|
|
429
446
|
getCompletion: (request: CompletionRequest, authToken?: string | null) => Promise<CompletionResponse>;
|
|
@@ -440,6 +457,7 @@ declare const hcApi: {
|
|
|
440
457
|
jobListings: {
|
|
441
458
|
getAll: (authToken?: string | null) => Promise<JobListing[]>;
|
|
442
459
|
getMapListings: (authToken?: string | null, filterId?: string | null, status?: JobStatus | null) => Promise<any[]>;
|
|
460
|
+
previewMapListings: (request: MapJobListingsPreviewRequest, authToken?: string | null) => Promise<MapJobListingPreview[]>;
|
|
443
461
|
getMapListing: (id: string, authToken?: string | null, status?: JobStatus | null) => Promise<any>;
|
|
444
462
|
getById: (id: string, authToken?: string | null) => Promise<JobListing>;
|
|
445
463
|
updateFieldVersionApproval: (id: string, payload: {
|
|
@@ -17,6 +17,23 @@ export type JobListingSaveResult = {
|
|
|
17
17
|
message?: string;
|
|
18
18
|
warningMessage?: string | null;
|
|
19
19
|
};
|
|
20
|
+
export type MapJobListingsPreviewRequest = {
|
|
21
|
+
filters: string;
|
|
22
|
+
includeLegacyListings?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type MapJobListingPreview = {
|
|
25
|
+
id: string;
|
|
26
|
+
companyId?: string;
|
|
27
|
+
uniqueId?: string | null;
|
|
28
|
+
referenceNumber?: number | null;
|
|
29
|
+
slug?: string | null;
|
|
30
|
+
status: JobStatus;
|
|
31
|
+
fields: ({
|
|
32
|
+
title?: string | null;
|
|
33
|
+
displayOnSite?: boolean;
|
|
34
|
+
entityKey?: string | null;
|
|
35
|
+
} & Record<string, unknown>) | null;
|
|
36
|
+
};
|
|
20
37
|
export type JobFields = {
|
|
21
38
|
position: string | null;
|
|
22
39
|
category: string | null;
|
package/dist/types/form.d.ts
CHANGED
|
@@ -4,7 +4,65 @@ interface IntegrationSettings {
|
|
|
4
4
|
webhooks?: FormWebhook[];
|
|
5
5
|
}
|
|
6
6
|
interface FormWebhook {
|
|
7
|
+
id?: string;
|
|
8
|
+
name?: string;
|
|
7
9
|
url: string;
|
|
10
|
+
isApproved?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type FormExperienceType = "guided-v1";
|
|
13
|
+
export interface GuidedBranchTrigger {
|
|
14
|
+
type: "page-transition" | "answer-condition";
|
|
15
|
+
fromPageName?: string;
|
|
16
|
+
toPageName?: string;
|
|
17
|
+
fieldName?: string;
|
|
18
|
+
operator?: "equals" | "not-equals";
|
|
19
|
+
value?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface GuidedBranchDestination {
|
|
22
|
+
type: "notification" | "webhook";
|
|
23
|
+
recipientIds?: string[];
|
|
24
|
+
webhookId?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface GuidedBranchAction {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
trigger: GuidedBranchTrigger;
|
|
31
|
+
destination: GuidedBranchDestination;
|
|
32
|
+
subject?: string;
|
|
33
|
+
message?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface GuidedFormSettings {
|
|
36
|
+
version: 1;
|
|
37
|
+
branchActions: GuidedBranchAction[];
|
|
38
|
+
}
|
|
39
|
+
export interface JobTargetingSettings {
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
priority: number;
|
|
42
|
+
jobFilterIds: string[];
|
|
43
|
+
}
|
|
44
|
+
export type SubmissionConditionOperator = "equals" | "not-equals" | "in" | "not-in";
|
|
45
|
+
export interface SubmissionAutomationRule {
|
|
46
|
+
id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
trigger: {
|
|
50
|
+
type: "submit-condition";
|
|
51
|
+
fieldName: string;
|
|
52
|
+
operator: SubmissionConditionOperator;
|
|
53
|
+
value?: string;
|
|
54
|
+
values: string[];
|
|
55
|
+
};
|
|
56
|
+
action: {
|
|
57
|
+
type: "require-approval";
|
|
58
|
+
approverUserIds: string[];
|
|
59
|
+
notificationSubject?: string;
|
|
60
|
+
notificationMessage?: string;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export interface SubmissionAutomationSettings {
|
|
64
|
+
version: 1;
|
|
65
|
+
rules: SubmissionAutomationRule[];
|
|
8
66
|
}
|
|
9
67
|
interface FormSettings {
|
|
10
68
|
useRecruiterFromJob: boolean;
|
|
@@ -18,6 +76,9 @@ interface FormSettings {
|
|
|
18
76
|
confirmationEmailSubject?: string;
|
|
19
77
|
confirmationEmailPreviewText?: string;
|
|
20
78
|
confirmationEmailBody?: string;
|
|
79
|
+
guided?: GuidedFormSettings;
|
|
80
|
+
jobTargeting?: JobTargetingSettings;
|
|
81
|
+
submissionAutomations?: SubmissionAutomationSettings;
|
|
21
82
|
}
|
|
22
83
|
interface Form {
|
|
23
84
|
id: string;
|
|
@@ -38,9 +99,41 @@ interface Form {
|
|
|
38
99
|
};
|
|
39
100
|
jsonSchema?: string;
|
|
40
101
|
type: string;
|
|
102
|
+
experienceType?: FormExperienceType;
|
|
41
103
|
formUsage: FormUsage[];
|
|
42
104
|
settings?: FormSettings;
|
|
43
105
|
}
|
|
106
|
+
export interface GuidedActionExecutionRequest {
|
|
107
|
+
sessionId: string;
|
|
108
|
+
actionId: string;
|
|
109
|
+
fromPageName?: string;
|
|
110
|
+
toPageName?: string;
|
|
111
|
+
answers: Record<string, unknown>;
|
|
112
|
+
}
|
|
113
|
+
export interface GuidedActionExecutionResult {
|
|
114
|
+
executed: boolean;
|
|
115
|
+
duplicate: boolean;
|
|
116
|
+
status: string;
|
|
117
|
+
}
|
|
118
|
+
export interface JobTargetedFormSelection {
|
|
119
|
+
form?: EasyApplyForm;
|
|
120
|
+
source: "targeted" | "default" | "existing-default";
|
|
121
|
+
priority?: number;
|
|
122
|
+
matchedFilterId?: string;
|
|
123
|
+
}
|
|
124
|
+
export interface EasyApplyForm {
|
|
125
|
+
id: string;
|
|
126
|
+
name?: string;
|
|
127
|
+
jsonSchema?: string;
|
|
128
|
+
type?: string;
|
|
129
|
+
experienceType?: FormExperienceType;
|
|
130
|
+
successTitle?: string;
|
|
131
|
+
successMessage?: string;
|
|
132
|
+
guided?: {
|
|
133
|
+
version: 1;
|
|
134
|
+
branchActions: Array<Pick<GuidedBranchAction, "id" | "name" | "enabled" | "trigger">>;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
44
137
|
interface FormUpdateOptions {
|
|
45
138
|
fieldRenames?: Record<string, string>;
|
|
46
139
|
applyFieldRenamesToSubmissions?: boolean;
|
|
@@ -11,6 +11,28 @@ type FormSubmission = {
|
|
|
11
11
|
deletedAt?: string;
|
|
12
12
|
formFields?: Record<string, string>;
|
|
13
13
|
snapshotJobData?: Record<string, any>;
|
|
14
|
+
approval?: SubmissionApproval;
|
|
15
|
+
};
|
|
16
|
+
export type SubmissionApproval = {
|
|
17
|
+
ruleId: string;
|
|
18
|
+
ruleName: string;
|
|
19
|
+
approverUserIds: string[];
|
|
20
|
+
notificationSubject?: string;
|
|
21
|
+
notificationMessage?: string;
|
|
22
|
+
requestedAt: string;
|
|
23
|
+
notificationStatus: "pending" | "processing" | "sent" | "failed";
|
|
24
|
+
notificationAttempts: number;
|
|
25
|
+
notificationSentAt?: string;
|
|
26
|
+
notificationLastError?: string;
|
|
27
|
+
decision?: "approve" | "deny";
|
|
28
|
+
reviewedByUserId?: string;
|
|
29
|
+
reviewedByName?: string;
|
|
30
|
+
reviewedAt?: string;
|
|
31
|
+
reviewNote?: string;
|
|
32
|
+
};
|
|
33
|
+
export type SubmissionApprovalReviewRequest = {
|
|
34
|
+
decision: "approve" | "deny";
|
|
35
|
+
note?: string;
|
|
14
36
|
};
|
|
15
37
|
export declare enum FormSubmissionStatus {
|
|
16
38
|
Submitted = 1,
|
|
@@ -18,6 +40,7 @@ export declare enum FormSubmissionStatus {
|
|
|
18
40
|
Rejected = 3,
|
|
19
41
|
Sent = 4,
|
|
20
42
|
Failed = 5,
|
|
21
|
-
Blacklisted = 6
|
|
43
|
+
Blacklisted = 6,
|
|
44
|
+
PendingApproval = 7
|
|
22
45
|
}
|
|
23
46
|
export default FormSubmission;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum IntegrationType {
|
|
2
|
+
Custom = 0,
|
|
3
|
+
SearchWrite = 1,
|
|
4
|
+
SearchRead = 2,
|
|
5
|
+
ExternalSync = 3
|
|
6
|
+
}
|
|
7
|
+
type IntegrationConfig = {
|
|
8
|
+
id?: string;
|
|
9
|
+
companyId?: string;
|
|
10
|
+
type: IntegrationType | keyof typeof IntegrationType | string;
|
|
11
|
+
provider: string;
|
|
12
|
+
title: string;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
createdAt?: string;
|
|
15
|
+
updatedAt?: string;
|
|
16
|
+
settings: Record<string, string>;
|
|
17
|
+
secrets: Record<string, string>;
|
|
18
|
+
};
|
|
19
|
+
export default IntegrationConfig;
|
package/dist/types/user.d.ts
CHANGED
package/index.ts
CHANGED
|
@@ -58,13 +58,36 @@ import { Listing } from "./types/listing";
|
|
|
58
58
|
import Filters from "./types/filters/filters";
|
|
59
59
|
import AppendListing from "./types/appendListing";
|
|
60
60
|
import Form, {
|
|
61
|
+
FormExperienceType,
|
|
62
|
+
EasyApplyForm,
|
|
61
63
|
FormFieldMigrationRequest,
|
|
62
64
|
FormUpdateOptions,
|
|
65
|
+
GuidedActionExecutionRequest,
|
|
66
|
+
GuidedActionExecutionResult,
|
|
67
|
+
GuidedBranchAction,
|
|
68
|
+
GuidedBranchDestination,
|
|
69
|
+
GuidedBranchTrigger,
|
|
70
|
+
GuidedFormSettings,
|
|
71
|
+
JobTargetedFormSelection,
|
|
72
|
+
JobTargetingSettings,
|
|
73
|
+
SubmissionAutomationRule,
|
|
74
|
+
SubmissionAutomationSettings,
|
|
75
|
+
SubmissionConditionOperator,
|
|
63
76
|
} from "./types/form";
|
|
64
|
-
import FormSubmission, {
|
|
77
|
+
import FormSubmission, {
|
|
78
|
+
FormSubmissionStatus,
|
|
79
|
+
SubmissionApproval,
|
|
80
|
+
SubmissionApprovalReviewRequest,
|
|
81
|
+
} from "./types/formSubmission";
|
|
65
82
|
import FormSettings, { FormSettingsSaveRequest } from "./types/formSettings";
|
|
66
83
|
import ResultsWrapper from "./types/resultsWrapper";
|
|
67
|
-
import {
|
|
84
|
+
import {
|
|
85
|
+
JobListing,
|
|
86
|
+
JobListingSaveResult,
|
|
87
|
+
JobStatus,
|
|
88
|
+
MapJobListingPreview,
|
|
89
|
+
MapJobListingsPreviewRequest,
|
|
90
|
+
} from "./types/JobListing";
|
|
68
91
|
import FieldTypeDefinition from "./types/content/fieldDefinition";
|
|
69
92
|
import ValidatorDefinition from "./types/content/validatorDefinition";
|
|
70
93
|
import ContentModel, {
|
|
@@ -107,7 +130,9 @@ import ListingEntityMedia from "./types/listingEntityMedia";
|
|
|
107
130
|
import CompletionRequest, {
|
|
108
131
|
CompletionResponse,
|
|
109
132
|
} from "./types/completionRequest";
|
|
110
|
-
import SearchReadConfig from "./types/searchReadConfig";
|
|
133
|
+
import type SearchReadConfig from "./types/searchReadConfig";
|
|
134
|
+
import type IntegrationConfig from "./types/integrationConfig";
|
|
135
|
+
import { IntegrationType } from "./types/integrationConfig";
|
|
111
136
|
import {
|
|
112
137
|
BLOCK_KEYS,
|
|
113
138
|
BLOCK_KEY_ALIASES,
|
|
@@ -172,6 +197,10 @@ export const clientAuthConfig = {
|
|
|
172
197
|
};
|
|
173
198
|
|
|
174
199
|
export const integrationConfig = {
|
|
200
|
+
getAll: integrationConfigController.getAll,
|
|
201
|
+
create: integrationConfigController.create,
|
|
202
|
+
update: integrationConfigController.update,
|
|
203
|
+
delete: integrationConfigController.delete,
|
|
175
204
|
getSearchRead: integrationConfigController.getSearchReadConfig,
|
|
176
205
|
};
|
|
177
206
|
|
|
@@ -284,6 +313,7 @@ export const companies = {
|
|
|
284
313
|
export const jobListings = {
|
|
285
314
|
getAll: JobListingsController.getJobListingsByCompany,
|
|
286
315
|
getMapListings: JobListingsController.getMapJobListingsByCompany,
|
|
316
|
+
previewMapListings: JobListingsController.previewMapJobListingsByCompany,
|
|
287
317
|
getMapListing: JobListingsController.getMapListingById,
|
|
288
318
|
getById: JobListingsController.getJobListingById,
|
|
289
319
|
updateFieldVersionApproval: JobListingsController.updateFieldVersionApproval,
|
|
@@ -349,6 +379,7 @@ export const formSubmissions = {
|
|
|
349
379
|
exportFormSubmissionsCsv: formSubmissionController.exportFormSubmissionsCsv,
|
|
350
380
|
getFormSubmissionTypes: formSubmissionController.getFormSubmissionTypes,
|
|
351
381
|
deleteFormSubmission: formSubmissionController.deleteFormSubmission,
|
|
382
|
+
reviewSubmissionApproval: formSubmissionController.reviewSubmissionApproval,
|
|
352
383
|
};
|
|
353
384
|
export { BLOCK_KEYS, BLOCK_KEY_ALIASES, FIELD_TYPES };
|
|
354
385
|
//types
|
|
@@ -371,15 +402,32 @@ export type {
|
|
|
371
402
|
Filters,
|
|
372
403
|
AppendListing,
|
|
373
404
|
Form,
|
|
405
|
+
EasyApplyForm,
|
|
406
|
+
FormExperienceType,
|
|
374
407
|
FormFieldMigrationRequest,
|
|
375
408
|
FormUpdateOptions,
|
|
409
|
+
GuidedActionExecutionRequest,
|
|
410
|
+
GuidedActionExecutionResult,
|
|
411
|
+
GuidedBranchAction,
|
|
412
|
+
GuidedBranchDestination,
|
|
413
|
+
GuidedBranchTrigger,
|
|
414
|
+
GuidedFormSettings,
|
|
415
|
+
JobTargetedFormSelection,
|
|
416
|
+
JobTargetingSettings,
|
|
417
|
+
SubmissionAutomationRule,
|
|
418
|
+
SubmissionAutomationSettings,
|
|
419
|
+
SubmissionConditionOperator,
|
|
376
420
|
FormSubmission,
|
|
421
|
+
SubmissionApproval,
|
|
422
|
+
SubmissionApprovalReviewRequest,
|
|
377
423
|
FormSettings,
|
|
378
424
|
FormSettingsSaveRequest,
|
|
379
425
|
ResultsWrapper,
|
|
380
426
|
Company,
|
|
381
427
|
JobListing,
|
|
382
428
|
JobListingSaveResult,
|
|
429
|
+
MapJobListingPreview,
|
|
430
|
+
MapJobListingsPreviewRequest,
|
|
383
431
|
FieldTypeDefinition,
|
|
384
432
|
ValidatorDefinition,
|
|
385
433
|
ContentModel,
|
|
@@ -414,9 +462,8 @@ export type {
|
|
|
414
462
|
ListingEntityMedia,
|
|
415
463
|
CompletionRequest,
|
|
416
464
|
CompletionResponse,
|
|
417
|
-
SearchReadConfig,
|
|
418
465
|
};
|
|
419
|
-
export type { BlockKey, FieldType };
|
|
466
|
+
export type { BlockKey, FieldType, SearchReadConfig, IntegrationConfig };
|
|
420
467
|
|
|
421
468
|
export {
|
|
422
469
|
EventType,
|
|
@@ -424,6 +471,7 @@ export {
|
|
|
424
471
|
FormSubmissionStatus,
|
|
425
472
|
FeedHandlingOption,
|
|
426
473
|
JobStatus,
|
|
474
|
+
IntegrationType,
|
|
427
475
|
};
|
|
428
476
|
|
|
429
477
|
const hcApi = {
|
package/package.json
CHANGED
package/types/JobListing.ts
CHANGED
|
@@ -19,6 +19,25 @@ export type JobListingSaveResult = {
|
|
|
19
19
|
warningMessage?: string | null;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
+
export type MapJobListingsPreviewRequest = {
|
|
23
|
+
filters: string;
|
|
24
|
+
includeLegacyListings?: boolean;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type MapJobListingPreview = {
|
|
28
|
+
id: string;
|
|
29
|
+
companyId?: string;
|
|
30
|
+
uniqueId?: string | null;
|
|
31
|
+
referenceNumber?: number | null;
|
|
32
|
+
slug?: string | null;
|
|
33
|
+
status: JobStatus;
|
|
34
|
+
fields: ({
|
|
35
|
+
title?: string | null;
|
|
36
|
+
displayOnSite?: boolean;
|
|
37
|
+
entityKey?: string | null;
|
|
38
|
+
} & Record<string, unknown>) | null;
|
|
39
|
+
};
|
|
40
|
+
|
|
22
41
|
export type JobFields = {
|
|
23
42
|
position: string | null;
|
|
24
43
|
category: string | null;
|
package/types/form.ts
CHANGED
|
@@ -9,7 +9,78 @@ interface IntegrationSettings {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
interface FormWebhook {
|
|
12
|
+
id?: string;
|
|
13
|
+
name?: string;
|
|
12
14
|
url: string;
|
|
15
|
+
isApproved?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type FormExperienceType = "guided-v1";
|
|
19
|
+
|
|
20
|
+
export interface GuidedBranchTrigger {
|
|
21
|
+
type: "page-transition" | "answer-condition";
|
|
22
|
+
fromPageName?: string;
|
|
23
|
+
toPageName?: string;
|
|
24
|
+
fieldName?: string;
|
|
25
|
+
operator?: "equals" | "not-equals";
|
|
26
|
+
value?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface GuidedBranchDestination {
|
|
30
|
+
type: "notification" | "webhook";
|
|
31
|
+
recipientIds?: string[];
|
|
32
|
+
webhookId?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface GuidedBranchAction {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
trigger: GuidedBranchTrigger;
|
|
40
|
+
destination: GuidedBranchDestination;
|
|
41
|
+
subject?: string;
|
|
42
|
+
message?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface GuidedFormSettings {
|
|
46
|
+
version: 1;
|
|
47
|
+
branchActions: GuidedBranchAction[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface JobTargetingSettings {
|
|
51
|
+
enabled: boolean;
|
|
52
|
+
priority: number;
|
|
53
|
+
jobFilterIds: string[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type SubmissionConditionOperator =
|
|
57
|
+
| "equals"
|
|
58
|
+
| "not-equals"
|
|
59
|
+
| "in"
|
|
60
|
+
| "not-in";
|
|
61
|
+
|
|
62
|
+
export interface SubmissionAutomationRule {
|
|
63
|
+
id: string;
|
|
64
|
+
name: string;
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
trigger: {
|
|
67
|
+
type: "submit-condition";
|
|
68
|
+
fieldName: string;
|
|
69
|
+
operator: SubmissionConditionOperator;
|
|
70
|
+
value?: string;
|
|
71
|
+
values: string[];
|
|
72
|
+
};
|
|
73
|
+
action: {
|
|
74
|
+
type: "require-approval";
|
|
75
|
+
approverUserIds: string[];
|
|
76
|
+
notificationSubject?: string;
|
|
77
|
+
notificationMessage?: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface SubmissionAutomationSettings {
|
|
82
|
+
version: 1;
|
|
83
|
+
rules: SubmissionAutomationRule[];
|
|
13
84
|
}
|
|
14
85
|
|
|
15
86
|
interface FormSettings {
|
|
@@ -24,6 +95,9 @@ interface FormSettings {
|
|
|
24
95
|
confirmationEmailSubject?: string;
|
|
25
96
|
confirmationEmailPreviewText?: string;
|
|
26
97
|
confirmationEmailBody?: string;
|
|
98
|
+
guided?: GuidedFormSettings;
|
|
99
|
+
jobTargeting?: JobTargetingSettings;
|
|
100
|
+
submissionAutomations?: SubmissionAutomationSettings;
|
|
27
101
|
}
|
|
28
102
|
|
|
29
103
|
interface Form {
|
|
@@ -45,10 +119,48 @@ interface Form {
|
|
|
45
119
|
};
|
|
46
120
|
jsonSchema?: string;
|
|
47
121
|
type: string;
|
|
122
|
+
experienceType?: FormExperienceType;
|
|
48
123
|
formUsage: FormUsage[];
|
|
49
124
|
settings?: FormSettings;
|
|
50
125
|
}
|
|
51
126
|
|
|
127
|
+
export interface GuidedActionExecutionRequest {
|
|
128
|
+
sessionId: string;
|
|
129
|
+
actionId: string;
|
|
130
|
+
fromPageName?: string;
|
|
131
|
+
toPageName?: string;
|
|
132
|
+
answers: Record<string, unknown>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface GuidedActionExecutionResult {
|
|
136
|
+
executed: boolean;
|
|
137
|
+
duplicate: boolean;
|
|
138
|
+
status: string;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface JobTargetedFormSelection {
|
|
142
|
+
form?: EasyApplyForm;
|
|
143
|
+
source: "targeted" | "default" | "existing-default";
|
|
144
|
+
priority?: number;
|
|
145
|
+
matchedFilterId?: string;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface EasyApplyForm {
|
|
149
|
+
id: string;
|
|
150
|
+
name?: string;
|
|
151
|
+
jsonSchema?: string;
|
|
152
|
+
type?: string;
|
|
153
|
+
experienceType?: FormExperienceType;
|
|
154
|
+
successTitle?: string;
|
|
155
|
+
successMessage?: string;
|
|
156
|
+
guided?: {
|
|
157
|
+
version: 1;
|
|
158
|
+
branchActions: Array<
|
|
159
|
+
Pick<GuidedBranchAction, "id" | "name" | "enabled" | "trigger">
|
|
160
|
+
>;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
52
164
|
interface FormUpdateOptions {
|
|
53
165
|
fieldRenames?: Record<string, string>;
|
|
54
166
|
applyFieldRenamesToSubmissions?: boolean;
|
package/types/formSubmission.ts
CHANGED
|
@@ -11,6 +11,30 @@ type FormSubmission = {
|
|
|
11
11
|
deletedAt?: string;
|
|
12
12
|
formFields?: Record<string, string>;
|
|
13
13
|
snapshotJobData?: Record<string, any>;
|
|
14
|
+
approval?: SubmissionApproval;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type SubmissionApproval = {
|
|
18
|
+
ruleId: string;
|
|
19
|
+
ruleName: string;
|
|
20
|
+
approverUserIds: string[];
|
|
21
|
+
notificationSubject?: string;
|
|
22
|
+
notificationMessage?: string;
|
|
23
|
+
requestedAt: string;
|
|
24
|
+
notificationStatus: "pending" | "processing" | "sent" | "failed";
|
|
25
|
+
notificationAttempts: number;
|
|
26
|
+
notificationSentAt?: string;
|
|
27
|
+
notificationLastError?: string;
|
|
28
|
+
decision?: "approve" | "deny";
|
|
29
|
+
reviewedByUserId?: string;
|
|
30
|
+
reviewedByName?: string;
|
|
31
|
+
reviewedAt?: string;
|
|
32
|
+
reviewNote?: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type SubmissionApprovalReviewRequest = {
|
|
36
|
+
decision: "approve" | "deny";
|
|
37
|
+
note?: string;
|
|
14
38
|
};
|
|
15
39
|
|
|
16
40
|
export enum FormSubmissionStatus {
|
|
@@ -20,6 +44,7 @@ export enum FormSubmissionStatus {
|
|
|
20
44
|
Sent = 4,
|
|
21
45
|
Failed = 5,
|
|
22
46
|
Blacklisted = 6,
|
|
47
|
+
PendingApproval = 7,
|
|
23
48
|
}
|
|
24
49
|
|
|
25
50
|
export default FormSubmission;
|