@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.
@@ -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
@@ -1,4 +1,5 @@
1
1
  type User = {
2
+ userId?: string;
2
3
  firstName: string;
3
4
  lastName: string;
4
5
  email: string;
@@ -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,72 +0,0 @@
1
- import { AuditTrailEntry } from "./jobFeed";
2
-
3
- export type JobDataAlertSeverity = "info" | "warning" | "error";
4
-
5
- export type JobDataAlertType =
6
- | "importIssue"
7
- | "missingUniqueId"
8
- | "missingRequiredField"
9
- | "unmatchedValue"
10
- | "autoAddedCategoryValue"
11
- | "approvalRequired"
12
- | "syncFailure";
13
-
14
- export type JobDataAlert = {
15
- id: string;
16
- companyId: string;
17
- feedId?: string | null;
18
- feedName?: string | null;
19
- jobListingId?: string | null;
20
- jobUniqueId?: string | null;
21
- jobReferenceNumber?: number | null;
22
- jobTitle?: string | null;
23
- sourceItemKey?: string | null;
24
- fieldPath?: string | null;
25
- alertType: JobDataAlertType | string;
26
- severity: JobDataAlertSeverity | string;
27
- value?: string | null;
28
- valueFingerprint: string;
29
- identityHash: string;
30
- message: string;
31
- open: boolean;
32
- acknowledged: boolean;
33
- muted: boolean;
34
- resolved: boolean;
35
- pendingNotification: boolean;
36
- firstSeenAt: string;
37
- lastSeenAt: string;
38
- lastChangedAt?: string | null;
39
- resolvedAt?: string | null;
40
- lastNotifiedAt?: string | null;
41
- acknowledgedAt?: string | null;
42
- acknowledgedBy?: string | null;
43
- mutedAt?: string | null;
44
- mutedBy?: string | null;
45
- resolvedBy?: string | null;
46
- occurrenceCount: number;
47
- context?: Record<string, string> | null;
48
- auditTrail?: AuditTrailEntry[];
49
- };
50
-
51
- export type JobDataAlertQuery = {
52
- feedId?: string | null;
53
- status?: "open" | "acknowledged" | "muted" | "resolved" | "pendingNotification" | string;
54
- alertType?: string | null;
55
- severity?: string | null;
56
- search?: string | null;
57
- pageSize?: number | null;
58
- pageNumber?: number | null;
59
- };
60
-
61
- export type JobDataAlertCounts = {
62
- open: number;
63
- acknowledged: number;
64
- muted: number;
65
- resolved: number;
66
- pendingNotification: number;
67
- };
68
-
69
- export type JobDataAlertSettings = {
70
- enabled: boolean;
71
- requiredFields: string[];
72
- };