@abcagency/hire-control-sdk 1.1.26 → 1.1.27
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/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/recruitersController.d.ts +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +24 -8
- 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 +48 -5
- package/package.json +1 -1
- 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/.gitattributes +0 -1
- package/controllers/jobDataAlertsController.ts +0 -94
- package/dist/controllers/jobDataAlertsController.d.ts +0 -13
- package/dist/types/jobDataAlert.d.ts +0 -59
- package/types/jobDataAlert.ts +0 -72
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,34 @@ 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
|
+
} from "./types/JobListing";
|
|
68
89
|
import FieldTypeDefinition from "./types/content/fieldDefinition";
|
|
69
90
|
import ValidatorDefinition from "./types/content/validatorDefinition";
|
|
70
91
|
import ContentModel, {
|
|
@@ -107,7 +128,9 @@ import ListingEntityMedia from "./types/listingEntityMedia";
|
|
|
107
128
|
import CompletionRequest, {
|
|
108
129
|
CompletionResponse,
|
|
109
130
|
} from "./types/completionRequest";
|
|
110
|
-
import SearchReadConfig from "./types/searchReadConfig";
|
|
131
|
+
import type SearchReadConfig from "./types/searchReadConfig";
|
|
132
|
+
import type IntegrationConfig from "./types/integrationConfig";
|
|
133
|
+
import { IntegrationType } from "./types/integrationConfig";
|
|
111
134
|
import {
|
|
112
135
|
BLOCK_KEYS,
|
|
113
136
|
BLOCK_KEY_ALIASES,
|
|
@@ -172,6 +195,10 @@ export const clientAuthConfig = {
|
|
|
172
195
|
};
|
|
173
196
|
|
|
174
197
|
export const integrationConfig = {
|
|
198
|
+
getAll: integrationConfigController.getAll,
|
|
199
|
+
create: integrationConfigController.create,
|
|
200
|
+
update: integrationConfigController.update,
|
|
201
|
+
delete: integrationConfigController.delete,
|
|
175
202
|
getSearchRead: integrationConfigController.getSearchReadConfig,
|
|
176
203
|
};
|
|
177
204
|
|
|
@@ -349,6 +376,7 @@ export const formSubmissions = {
|
|
|
349
376
|
exportFormSubmissionsCsv: formSubmissionController.exportFormSubmissionsCsv,
|
|
350
377
|
getFormSubmissionTypes: formSubmissionController.getFormSubmissionTypes,
|
|
351
378
|
deleteFormSubmission: formSubmissionController.deleteFormSubmission,
|
|
379
|
+
reviewSubmissionApproval: formSubmissionController.reviewSubmissionApproval,
|
|
352
380
|
};
|
|
353
381
|
export { BLOCK_KEYS, BLOCK_KEY_ALIASES, FIELD_TYPES };
|
|
354
382
|
//types
|
|
@@ -371,9 +399,24 @@ export type {
|
|
|
371
399
|
Filters,
|
|
372
400
|
AppendListing,
|
|
373
401
|
Form,
|
|
402
|
+
EasyApplyForm,
|
|
403
|
+
FormExperienceType,
|
|
374
404
|
FormFieldMigrationRequest,
|
|
375
405
|
FormUpdateOptions,
|
|
406
|
+
GuidedActionExecutionRequest,
|
|
407
|
+
GuidedActionExecutionResult,
|
|
408
|
+
GuidedBranchAction,
|
|
409
|
+
GuidedBranchDestination,
|
|
410
|
+
GuidedBranchTrigger,
|
|
411
|
+
GuidedFormSettings,
|
|
412
|
+
JobTargetedFormSelection,
|
|
413
|
+
JobTargetingSettings,
|
|
414
|
+
SubmissionAutomationRule,
|
|
415
|
+
SubmissionAutomationSettings,
|
|
416
|
+
SubmissionConditionOperator,
|
|
376
417
|
FormSubmission,
|
|
418
|
+
SubmissionApproval,
|
|
419
|
+
SubmissionApprovalReviewRequest,
|
|
377
420
|
FormSettings,
|
|
378
421
|
FormSettingsSaveRequest,
|
|
379
422
|
ResultsWrapper,
|
|
@@ -414,9 +457,8 @@ export type {
|
|
|
414
457
|
ListingEntityMedia,
|
|
415
458
|
CompletionRequest,
|
|
416
459
|
CompletionResponse,
|
|
417
|
-
SearchReadConfig,
|
|
418
460
|
};
|
|
419
|
-
export type { BlockKey, FieldType };
|
|
461
|
+
export type { BlockKey, FieldType, SearchReadConfig, IntegrationConfig };
|
|
420
462
|
|
|
421
463
|
export {
|
|
422
464
|
EventType,
|
|
@@ -424,6 +466,7 @@ export {
|
|
|
424
466
|
FormSubmissionStatus,
|
|
425
467
|
FeedHandlingOption,
|
|
426
468
|
JobStatus,
|
|
469
|
+
IntegrationType,
|
|
427
470
|
};
|
|
428
471
|
|
|
429
472
|
const hcApi = {
|
package/package.json
CHANGED
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;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export enum IntegrationType {
|
|
2
|
+
Custom = 0,
|
|
3
|
+
SearchWrite = 1,
|
|
4
|
+
SearchRead = 2,
|
|
5
|
+
ExternalSync = 3,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type IntegrationConfig = {
|
|
9
|
+
id?: string;
|
|
10
|
+
companyId?: string;
|
|
11
|
+
type: IntegrationType | keyof typeof IntegrationType | string;
|
|
12
|
+
provider: string;
|
|
13
|
+
title: string;
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
createdAt?: string;
|
|
16
|
+
updatedAt?: string;
|
|
17
|
+
settings: Record<string, string>;
|
|
18
|
+
secrets: Record<string, string>;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default IntegrationConfig;
|
package/types/user.ts
CHANGED
package/.gitattributes
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* text=auto eol=lf
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import FetchHandler from "../handlers/fetchHandler";
|
|
2
|
-
import { API_URL } from "../constants/config";
|
|
3
|
-
import {
|
|
4
|
-
JobDataAlert,
|
|
5
|
-
JobDataAlertCounts,
|
|
6
|
-
JobDataAlertQuery,
|
|
7
|
-
} from "../types/jobDataAlert";
|
|
8
|
-
|
|
9
|
-
const fetchHandler = new FetchHandler(API_URL);
|
|
10
|
-
|
|
11
|
-
class JobDataAlertsController {
|
|
12
|
-
async getAll(
|
|
13
|
-
query: JobDataAlertQuery = {},
|
|
14
|
-
authToken: string | null = null
|
|
15
|
-
): Promise<JobDataAlert[]> {
|
|
16
|
-
const params = new URLSearchParams();
|
|
17
|
-
if (query.feedId) params.set("feedId", query.feedId);
|
|
18
|
-
if (query.status) params.set("status", query.status);
|
|
19
|
-
if (query.alertType) params.set("alertType", query.alertType);
|
|
20
|
-
if (query.severity) params.set("severity", query.severity);
|
|
21
|
-
if (query.search) params.set("search", query.search);
|
|
22
|
-
if (query.pageSize) params.set("pageSize", query.pageSize.toString());
|
|
23
|
-
if (query.pageNumber) params.set("pageNumber", query.pageNumber.toString());
|
|
24
|
-
|
|
25
|
-
const qs = params.toString();
|
|
26
|
-
return fetchHandler.get<JobDataAlert[]>(
|
|
27
|
-
`/jobdataalerts${qs ? `?${qs}` : ""}`,
|
|
28
|
-
true,
|
|
29
|
-
authToken
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
async counts(authToken: string | null = null): Promise<JobDataAlertCounts> {
|
|
34
|
-
return fetchHandler.get<JobDataAlertCounts>(
|
|
35
|
-
"/jobdataalerts/counts",
|
|
36
|
-
true,
|
|
37
|
-
authToken
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
async acknowledge(
|
|
42
|
-
id: string,
|
|
43
|
-
authToken: string | null = null
|
|
44
|
-
): Promise<JobDataAlert> {
|
|
45
|
-
return fetchHandler.post<Record<string, never>, JobDataAlert>(
|
|
46
|
-
`/jobdataalerts/${id}/acknowledge`,
|
|
47
|
-
{},
|
|
48
|
-
true,
|
|
49
|
-
authToken
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
async mute(
|
|
54
|
-
id: string,
|
|
55
|
-
muted: boolean,
|
|
56
|
-
authToken: string | null = null
|
|
57
|
-
): Promise<JobDataAlert> {
|
|
58
|
-
return fetchHandler.post<{ muted: boolean }, JobDataAlert>(
|
|
59
|
-
`/jobdataalerts/${id}/mute`,
|
|
60
|
-
{ muted },
|
|
61
|
-
true,
|
|
62
|
-
authToken
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
async resolve(
|
|
67
|
-
id: string,
|
|
68
|
-
authToken: string | null = null
|
|
69
|
-
): Promise<JobDataAlert> {
|
|
70
|
-
return fetchHandler.post<Record<string, never>, JobDataAlert>(
|
|
71
|
-
`/jobdataalerts/${id}/resolve`,
|
|
72
|
-
{},
|
|
73
|
-
true,
|
|
74
|
-
authToken
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
async sendPendingEmail(
|
|
79
|
-
feedId: string | null = null,
|
|
80
|
-
authToken: string | null = null
|
|
81
|
-
): Promise<{ sentCount: number }> {
|
|
82
|
-
const params = new URLSearchParams();
|
|
83
|
-
if (feedId) params.set("feedId", feedId);
|
|
84
|
-
const qs = params.toString();
|
|
85
|
-
return fetchHandler.post<Record<string, never>, { sentCount: number }>(
|
|
86
|
-
`/jobdataalerts/send-pending-email${qs ? `?${qs}` : ""}`,
|
|
87
|
-
{},
|
|
88
|
-
true,
|
|
89
|
-
authToken
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export default new JobDataAlertsController();
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { JobDataAlert, JobDataAlertCounts, JobDataAlertQuery } from "../types/jobDataAlert";
|
|
2
|
-
declare class JobDataAlertsController {
|
|
3
|
-
getAll(query?: JobDataAlertQuery, authToken?: string | null): Promise<JobDataAlert[]>;
|
|
4
|
-
counts(authToken?: string | null): Promise<JobDataAlertCounts>;
|
|
5
|
-
acknowledge(id: string, authToken?: string | null): Promise<JobDataAlert>;
|
|
6
|
-
mute(id: string, muted: boolean, authToken?: string | null): Promise<JobDataAlert>;
|
|
7
|
-
resolve(id: string, authToken?: string | null): Promise<JobDataAlert>;
|
|
8
|
-
sendPendingEmail(feedId?: string | null, authToken?: string | null): Promise<{
|
|
9
|
-
sentCount: number;
|
|
10
|
-
}>;
|
|
11
|
-
}
|
|
12
|
-
declare const _default: JobDataAlertsController;
|
|
13
|
-
export default _default;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { AuditTrailEntry } from "./jobFeed";
|
|
2
|
-
export type JobDataAlertSeverity = "info" | "warning" | "error";
|
|
3
|
-
export type JobDataAlertType = "importIssue" | "missingUniqueId" | "missingRequiredField" | "unmatchedValue" | "autoAddedCategoryValue" | "approvalRequired" | "syncFailure";
|
|
4
|
-
export type JobDataAlert = {
|
|
5
|
-
id: string;
|
|
6
|
-
companyId: string;
|
|
7
|
-
feedId?: string | null;
|
|
8
|
-
feedName?: string | null;
|
|
9
|
-
jobListingId?: string | null;
|
|
10
|
-
jobUniqueId?: string | null;
|
|
11
|
-
jobReferenceNumber?: number | null;
|
|
12
|
-
jobTitle?: string | null;
|
|
13
|
-
sourceItemKey?: string | null;
|
|
14
|
-
fieldPath?: string | null;
|
|
15
|
-
alertType: JobDataAlertType | string;
|
|
16
|
-
severity: JobDataAlertSeverity | string;
|
|
17
|
-
value?: string | null;
|
|
18
|
-
valueFingerprint: string;
|
|
19
|
-
identityHash: string;
|
|
20
|
-
message: string;
|
|
21
|
-
open: boolean;
|
|
22
|
-
acknowledged: boolean;
|
|
23
|
-
muted: boolean;
|
|
24
|
-
resolved: boolean;
|
|
25
|
-
pendingNotification: boolean;
|
|
26
|
-
firstSeenAt: string;
|
|
27
|
-
lastSeenAt: string;
|
|
28
|
-
lastChangedAt?: string | null;
|
|
29
|
-
resolvedAt?: string | null;
|
|
30
|
-
lastNotifiedAt?: string | null;
|
|
31
|
-
acknowledgedAt?: string | null;
|
|
32
|
-
acknowledgedBy?: string | null;
|
|
33
|
-
mutedAt?: string | null;
|
|
34
|
-
mutedBy?: string | null;
|
|
35
|
-
resolvedBy?: string | null;
|
|
36
|
-
occurrenceCount: number;
|
|
37
|
-
context?: Record<string, string> | null;
|
|
38
|
-
auditTrail?: AuditTrailEntry[];
|
|
39
|
-
};
|
|
40
|
-
export type JobDataAlertQuery = {
|
|
41
|
-
feedId?: string | null;
|
|
42
|
-
status?: "open" | "acknowledged" | "muted" | "resolved" | "pendingNotification" | string;
|
|
43
|
-
alertType?: string | null;
|
|
44
|
-
severity?: string | null;
|
|
45
|
-
search?: string | null;
|
|
46
|
-
pageSize?: number | null;
|
|
47
|
-
pageNumber?: number | null;
|
|
48
|
-
};
|
|
49
|
-
export type JobDataAlertCounts = {
|
|
50
|
-
open: number;
|
|
51
|
-
acknowledged: number;
|
|
52
|
-
muted: number;
|
|
53
|
-
resolved: number;
|
|
54
|
-
pendingNotification: number;
|
|
55
|
-
};
|
|
56
|
-
export type JobDataAlertSettings = {
|
|
57
|
-
enabled: boolean;
|
|
58
|
-
requiredFields: string[];
|
|
59
|
-
};
|