@brivioio/api-server-types 4.0.0 → 5.0.0

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,132 @@
1
+ import type { EducationInstituteBrand, EducationInstituteTier } from './enums.types';
2
+ export interface ICoresignalEmployee {
3
+ _id: string;
4
+ employeeId: number;
5
+ shorthandNames: string[];
6
+ document: unknown;
7
+ internalTags: {
8
+ key: string;
9
+ value: string;
10
+ }[];
11
+ isDeleted: boolean;
12
+ createdAt: string;
13
+ updatedAt: string;
14
+ }
15
+ export interface ICodeforcesProfile {
16
+ _id: string;
17
+ handle: string;
18
+ rating?: number;
19
+ maxRating?: number;
20
+ rank?: string;
21
+ problemsSolved?: number;
22
+ lastSubmissionAt?: string;
23
+ internalTags: {
24
+ key: string;
25
+ value: string;
26
+ }[];
27
+ isDeleted: boolean;
28
+ createdAt: string;
29
+ updatedAt: string;
30
+ }
31
+ export interface ICodeChefProfile {
32
+ _id: string;
33
+ handle: string;
34
+ rating?: number;
35
+ problemsSolved?: number;
36
+ lastSubmissionAt?: string;
37
+ internalTags: {
38
+ key: string;
39
+ value: string;
40
+ }[];
41
+ isDeleted: boolean;
42
+ createdAt: string;
43
+ updatedAt: string;
44
+ }
45
+ export interface ILeetCodeProfile {
46
+ _id: string;
47
+ handle: string;
48
+ problemsSolved?: number;
49
+ difficultyBasedProblemsSolvedCount?: {
50
+ easy?: number;
51
+ medium?: number;
52
+ hard?: number;
53
+ };
54
+ languageBasedProblemsSolvedCount?: {
55
+ language?: string;
56
+ count?: number;
57
+ }[];
58
+ tagsBasedProblemsSolvedCount?: {
59
+ tag?: string;
60
+ count?: number;
61
+ }[];
62
+ internalTags: {
63
+ key: string;
64
+ value: string;
65
+ }[];
66
+ isDeleted: boolean;
67
+ createdAt: string;
68
+ updatedAt: string;
69
+ }
70
+ export interface IGitHubProfile {
71
+ _id: string;
72
+ handle: string;
73
+ repositoriesCount?: number;
74
+ repositories?: {
75
+ name?: string;
76
+ description?: string;
77
+ languages?: {
78
+ language?: string;
79
+ linesOfCode?: number;
80
+ linesOfCodePercentage?: number;
81
+ }[];
82
+ }[];
83
+ totalContributions?: number;
84
+ contributionsByYear?: {
85
+ year?: number;
86
+ contributions?: number;
87
+ }[];
88
+ languageStats?: {
89
+ language?: string;
90
+ linesOfCode?: number;
91
+ linesOfCodePercentage?: number;
92
+ }[];
93
+ internalTags: {
94
+ key: string;
95
+ value: string;
96
+ }[];
97
+ isDeleted: boolean;
98
+ createdAt: string;
99
+ updatedAt: string;
100
+ }
101
+ export interface IEducationInstituteProfile {
102
+ _id: string;
103
+ instituteTier?: EducationInstituteTier;
104
+ instituteBrand?: EducationInstituteBrand;
105
+ normalizedInstituteName: string;
106
+ otherAppearances: string[];
107
+ internalTags: {
108
+ key: string;
109
+ value: string;
110
+ }[];
111
+ isDeleted: boolean;
112
+ createdAt: string;
113
+ updatedAt: string;
114
+ }
115
+ export interface IEducationCourseProfile {
116
+ _id: string;
117
+ normalizedCourseName: string;
118
+ isComputerScience?: boolean;
119
+ isComputerScienceRelated?: boolean;
120
+ isComputerScienceExtension?: boolean;
121
+ isElectricalOrElectronics?: boolean;
122
+ isMathematicsRelated?: boolean;
123
+ otherAppearances: string[];
124
+ internalTags: {
125
+ key: string;
126
+ value: string;
127
+ }[];
128
+ isDeleted: boolean;
129
+ createdAt: string;
130
+ updatedAt: string;
131
+ }
132
+ //# sourceMappingURL=others.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"others.types.d.ts","sourceRoot":"","sources":["../../src/candidates/others.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAErF,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,Y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;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACzC,uBAAuB,EAAE,MAAM,CAAC;IAChC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
1
  export * from './admin.types';
2
+ export * from './applications.types';
3
+ export * from './candidates';
2
4
  export * from './organizations.types';
5
+ export * from './positions';
3
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,5 @@
1
1
  export * from './admin.types';
2
+ export * from './applications.types';
3
+ export * from './candidates';
2
4
  export * from './organizations.types';
5
+ export * from './positions';
@@ -0,0 +1,31 @@
1
+ export declare enum LocationMode {
2
+ ONSITE = "onsite",
3
+ REMOTE = "remote",
4
+ HYBRID = "hybrid"
5
+ }
6
+ export declare enum EmploymentType {
7
+ FULLTIME = "fulltime",
8
+ INTERNSHIP = "internship",
9
+ CONTRACT = "contract",
10
+ FREELANCE = "freelance",
11
+ OTHER = "other"
12
+ }
13
+ export declare enum PositionQuestionType {
14
+ TEXT = "text",
15
+ MCQ = "mcq",
16
+ NUMBER = "number"
17
+ }
18
+ export declare enum TextQuestionType {
19
+ SHORT_ANSWER = "shortAnswer",
20
+ LONG_ANSWER = "longAnswer"
21
+ }
22
+ export declare enum McqQuestionType {
23
+ SINGLE_SELECT = "singleSelect",
24
+ MULTI_SELECT = "multiSelect"
25
+ }
26
+ export declare enum PositionListType {
27
+ NEW = "new",
28
+ USER_CREATED = "userCreated",
29
+ AI_CREATED = "aiCreated"
30
+ }
31
+ //# sourceMappingURL=enums.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.types.d.ts","sourceRoot":"","sources":["../../src/positions/enums.types.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,KAAK,UAAU;CAChB;AAED,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,oBAAY,gBAAgB;IAC1B,YAAY,gBAAgB;IAC5B,WAAW,eAAe;CAC3B;AAED,oBAAY,eAAe;IACzB,aAAa,iBAAiB;IAC9B,YAAY,gBAAgB;CAC7B;AAED,oBAAY,gBAAgB;IAC1B,GAAG,QAAQ;IACX,YAAY,gBAAgB;IAC5B,UAAU,cAAc;CACzB"}
@@ -0,0 +1,36 @@
1
+ export var LocationMode;
2
+ (function (LocationMode) {
3
+ LocationMode["ONSITE"] = "onsite";
4
+ LocationMode["REMOTE"] = "remote";
5
+ LocationMode["HYBRID"] = "hybrid";
6
+ })(LocationMode || (LocationMode = {}));
7
+ export var EmploymentType;
8
+ (function (EmploymentType) {
9
+ EmploymentType["FULLTIME"] = "fulltime";
10
+ EmploymentType["INTERNSHIP"] = "internship";
11
+ EmploymentType["CONTRACT"] = "contract";
12
+ EmploymentType["FREELANCE"] = "freelance";
13
+ EmploymentType["OTHER"] = "other";
14
+ })(EmploymentType || (EmploymentType = {}));
15
+ export var PositionQuestionType;
16
+ (function (PositionQuestionType) {
17
+ PositionQuestionType["TEXT"] = "text";
18
+ PositionQuestionType["MCQ"] = "mcq";
19
+ PositionQuestionType["NUMBER"] = "number";
20
+ })(PositionQuestionType || (PositionQuestionType = {}));
21
+ export var TextQuestionType;
22
+ (function (TextQuestionType) {
23
+ TextQuestionType["SHORT_ANSWER"] = "shortAnswer";
24
+ TextQuestionType["LONG_ANSWER"] = "longAnswer";
25
+ })(TextQuestionType || (TextQuestionType = {}));
26
+ export var McqQuestionType;
27
+ (function (McqQuestionType) {
28
+ McqQuestionType["SINGLE_SELECT"] = "singleSelect";
29
+ McqQuestionType["MULTI_SELECT"] = "multiSelect";
30
+ })(McqQuestionType || (McqQuestionType = {}));
31
+ export var PositionListType;
32
+ (function (PositionListType) {
33
+ PositionListType["NEW"] = "new";
34
+ PositionListType["USER_CREATED"] = "userCreated";
35
+ PositionListType["AI_CREATED"] = "aiCreated";
36
+ })(PositionListType || (PositionListType = {}));
@@ -0,0 +1,4 @@
1
+ export * from './listViewConfig.types';
2
+ export * from './positions.types';
3
+ export * from './enums.types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/positions/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './listViewConfig.types';
2
+ export * from './positions.types';
3
+ export * from './enums.types';
@@ -0,0 +1,294 @@
1
+ /**
2
+ * Filter and View Configuration Types for Position Lists
3
+ *
4
+ * This type system supports comprehensive filtering, sorting, searching, and column visibility
5
+ * management for candidate lists within positions.
6
+ *
7
+ * Key Features:
8
+ * 1. Type-safe filters for different data types (string, number, boolean, array, date)
9
+ * 2. Single-field sorting (one column at a time)
10
+ * 3. Column visibility management
11
+ * 4. Support for dynamic position question fields
12
+ *
13
+ * Design Decisions:
14
+ * - Each filter type has a 'none' operation to represent "no filter applied"
15
+ * - Each filter type has a 'blank' operation to filter for empty/null values
16
+ * - deepProfileStatus is treated as a string filter (for enum values like 'queued', 'processing', etc.)
17
+ * - Array sorting uses array length (useful for skills - more skills = higher in desc order)
18
+ * - Position questions use discriminated unions to ensure type safety based on question type
19
+ * - FieldFilterConfig uses discriminated unions to ensure correct filter type for each field
20
+ * - Only one column can be sorted at a time (single-field sorting)
21
+ */
22
+ export type SortDirection = 'asc' | 'desc';
23
+ export type StringFilterOperation = {
24
+ type: 'substring';
25
+ value: string;
26
+ } | {
27
+ type: 'in';
28
+ values: string[];
29
+ } | {
30
+ type: 'blank';
31
+ } | {
32
+ type: 'none';
33
+ };
34
+ export type StringFilter = {
35
+ operation: StringFilterOperation;
36
+ };
37
+ export type NumberFilterOperation = {
38
+ type: 'equals';
39
+ value: number;
40
+ } | {
41
+ type: 'notEquals';
42
+ value: number;
43
+ } | {
44
+ type: 'greaterThan';
45
+ value: number;
46
+ } | {
47
+ type: 'lessThan';
48
+ value: number;
49
+ } | {
50
+ type: 'greaterThanOrEqual';
51
+ value: number;
52
+ } | {
53
+ type: 'lessThanOrEqual';
54
+ value: number;
55
+ } | {
56
+ type: 'between';
57
+ min: number;
58
+ max: number;
59
+ } | {
60
+ type: 'in';
61
+ values: number[];
62
+ } | {
63
+ type: 'blank';
64
+ } | {
65
+ type: 'none';
66
+ };
67
+ export type NumberFilter = {
68
+ operation: NumberFilterOperation;
69
+ };
70
+ export type BooleanFilterOperation = {
71
+ type: 'true';
72
+ } | {
73
+ type: 'false';
74
+ } | {
75
+ type: 'none';
76
+ } | {
77
+ type: 'blank';
78
+ };
79
+ export type BooleanFilter = {
80
+ operation: BooleanFilterOperation;
81
+ };
82
+ export type ArrayFilterOperation = {
83
+ type: 'containsAll';
84
+ values: string[];
85
+ } | {
86
+ type: 'containsAny';
87
+ values: string[];
88
+ } | {
89
+ type: 'blank';
90
+ } | {
91
+ type: 'none';
92
+ };
93
+ export type ArrayFilter = {
94
+ operation: ArrayFilterOperation;
95
+ };
96
+ export type DateFilterOperation = {
97
+ type: 'range';
98
+ start?: number;
99
+ end?: number;
100
+ } | {
101
+ type: 'in';
102
+ values: number[];
103
+ } | {
104
+ type: 'blank';
105
+ } | {
106
+ type: 'none';
107
+ };
108
+ export type DateFilter = {
109
+ operation: DateFilterOperation;
110
+ };
111
+ export type PositionQuestionFilter = {
112
+ questionType: 'text';
113
+ filter: StringFilter;
114
+ } | {
115
+ questionType: 'number';
116
+ filter: NumberFilter;
117
+ } | {
118
+ questionType: 'mcq';
119
+ filter: ArrayFilter;
120
+ };
121
+ export type CandidateFieldId = 'applicationId' | 'applicationSubmittedAt' | 'candidateId' | 'baseProfileUpdatedAt' | 'cvUpdatedAt' | 'lastDeepProfileRequestedAt' | 'lastSuccessfulDeepProfileAt' | 'deepProfileStatus' | 'scrapedProfilesLastRequestedAt' | 'scrapedProfilesLastSuccessfulRunAt' | 'scrapedProfilesStatus' | 'candidateEmail' | 'countryCode' | 'phoneNumber' | 'linkedinUrl' | 'githubUrl' | 'codeforcesUrl' | 'codechefUrl' | 'leetcodeUrl' | 'fullTimeExperienceInYears' | 'coreSkills' | 'noticePeriod' | 'currentSalary' | 'expectedSalary' | 'currentCity' | 'currentState' | 'preferredCity' | 'preferredState' | 'computedFullName' | 'computedWhatsAppUrl' | 'computedAllSkills' | 'computedFullTimeExperienceInYears' | 'computedIsCurrentlyEmployedFullTime' | 'computedNumberOfFullTimeJobSwitches' | 'computedLatestFullTimeEmployer' | 'computedMonthsSpentInLatestFullTimeRole' | 'computedMonthsSinceUnemployedFromLastFullTimeRole' | 'computedLatestFullTimeRoleTitle';
122
+ export type FieldFilterConfig = {
123
+ fieldId: 'applicationSubmittedAt';
124
+ filter: DateFilter;
125
+ } | {
126
+ fieldId: 'cvUpdatedAt';
127
+ filter: DateFilter;
128
+ } | {
129
+ fieldId: 'baseProfileUpdatedAt';
130
+ filter: DateFilter;
131
+ } | {
132
+ fieldId: 'lastDeepProfileRequestedAt';
133
+ filter: DateFilter;
134
+ } | {
135
+ fieldId: 'lastSuccessfulDeepProfileAt';
136
+ filter: DateFilter;
137
+ } | {
138
+ fieldId: 'deepProfileStatus';
139
+ filter: StringFilter;
140
+ } | {
141
+ fieldId: 'scrapedProfilesLastRequestedAt';
142
+ filter: DateFilter;
143
+ } | {
144
+ fieldId: 'scrapedProfilesLastSuccessfulRunAt';
145
+ filter: DateFilter;
146
+ } | {
147
+ fieldId: 'scrapedProfilesStatus';
148
+ filter: StringFilter;
149
+ } | {
150
+ fieldId: 'candidateEmail';
151
+ filter: StringFilter;
152
+ } | {
153
+ fieldId: 'candidateId';
154
+ filter: StringFilter;
155
+ } | {
156
+ fieldId: 'applicationId';
157
+ filter: StringFilter;
158
+ } | {
159
+ fieldId: 'noticePeriod';
160
+ filter: NumberFilter;
161
+ } | {
162
+ fieldId: 'currentSalary';
163
+ filter: NumberFilter;
164
+ } | {
165
+ fieldId: 'expectedSalary';
166
+ filter: NumberFilter;
167
+ } | {
168
+ fieldId: 'currentCity';
169
+ filter: StringFilter;
170
+ } | {
171
+ fieldId: 'currentState';
172
+ filter: StringFilter;
173
+ } | {
174
+ fieldId: 'preferredCity';
175
+ filter: StringFilter;
176
+ } | {
177
+ fieldId: 'preferredState';
178
+ filter: StringFilter;
179
+ } | {
180
+ fieldId: 'fullTimeExperienceInYears';
181
+ filter: NumberFilter;
182
+ } | {
183
+ fieldId: 'countryCode';
184
+ filter: NumberFilter;
185
+ } | {
186
+ fieldId: 'phoneNumber';
187
+ filter: NumberFilter;
188
+ } | {
189
+ fieldId: 'linkedinUrl';
190
+ filter: StringFilter;
191
+ } | {
192
+ fieldId: 'githubUrl';
193
+ filter: StringFilter;
194
+ } | {
195
+ fieldId: 'codeforcesUrl';
196
+ filter: StringFilter;
197
+ } | {
198
+ fieldId: 'codechefUrl';
199
+ filter: StringFilter;
200
+ } | {
201
+ fieldId: 'leetcodeUrl';
202
+ filter: StringFilter;
203
+ } | {
204
+ fieldId: 'coreSkills';
205
+ filter: ArrayFilter;
206
+ } | {
207
+ fieldId: 'computedFullName';
208
+ filter: StringFilter;
209
+ } | {
210
+ fieldId: 'computedWhatsAppUrl';
211
+ filter: StringFilter;
212
+ } | {
213
+ fieldId: 'computedAllSkills';
214
+ filter: ArrayFilter;
215
+ } | {
216
+ fieldId: 'computedFullTimeExperienceInYears';
217
+ filter: NumberFilter;
218
+ } | {
219
+ fieldId: 'computedIsCurrentlyEmployedFullTime';
220
+ filter: BooleanFilter;
221
+ } | {
222
+ fieldId: 'computedNumberOfFullTimeJobSwitches';
223
+ filter: NumberFilter;
224
+ } | {
225
+ fieldId: 'computedLatestFullTimeEmployer';
226
+ filter: StringFilter;
227
+ } | {
228
+ fieldId: 'computedMonthsSpentInLatestFullTimeRole';
229
+ filter: NumberFilter;
230
+ } | {
231
+ fieldId: 'computedMonthsSinceUnemployedFromLastFullTimeRole';
232
+ filter: NumberFilter;
233
+ } | {
234
+ fieldId: 'computedLatestFullTimeRoleTitle';
235
+ filter: StringFilter;
236
+ } | {
237
+ fieldId: string;
238
+ filter: PositionQuestionFilter;
239
+ };
240
+ export type FieldSortConfig = {
241
+ fieldId: CandidateFieldId | string;
242
+ direction: SortDirection;
243
+ } | null;
244
+ export type ListViewConfig = {
245
+ filters: FieldFilterConfig[];
246
+ sort: FieldSortConfig;
247
+ hiddenColumns: (CandidateFieldId | string)[];
248
+ };
249
+ /**
250
+ * Example Usage:
251
+ *
252
+ * 1. Filter candidates with 3+ years experience, currently employed, and know BOTH React and TypeScript:
253
+ * {
254
+ * filters: [
255
+ * { fieldId: 'fullTimeExperienceInYears', filter: { operation: { type: 'greaterThanOrEqual', value: 3 } } },
256
+ * { fieldId: 'isCurrentlyEmployed', filter: { operation: { type: 'true' } } },
257
+ * { fieldId: 'coreSkills', filter: { operation: { type: 'containsAll', values: ['React', 'TypeScript'] } } }
258
+ * ],
259
+ * sort: { fieldId: 'fullTimeExperienceInYears', direction: 'desc' },
260
+ * hiddenColumns: ['phoneNumber', 'linkedinUrl']
261
+ * }
262
+ *
263
+ * 2. Filter candidates who know EITHER React OR Vue OR Angular:
264
+ * {
265
+ * filters: [
266
+ * { fieldId: 'coreSkills', filter: { operation: { type: 'containsAny', values: ['React', 'Vue', 'Angular'] } } }
267
+ * ],
268
+ * sort: { fieldId: 'fullTimeExperienceInYears', direction: 'desc' },
269
+ * hiddenColumns: []
270
+ * }
271
+ *
272
+ * 3. Filter by position question (custom field with containsAll):
273
+ * {
274
+ * filters: [
275
+ * {
276
+ * fieldId: 'question-id-123',
277
+ * filter: { questionType: 'mcq', filter: { operation: { type: 'containsAll', values: ['Option A', 'Option B'] } } }
278
+ * }
279
+ * ],
280
+ * sort: null,
281
+ * hiddenColumns: []
282
+ * }
283
+ *
284
+ * 4. Filter for candidates with blank/missing fields:
285
+ * {
286
+ * filters: [
287
+ * { fieldId: 'linkedinUrl', filter: { operation: { type: 'blank' } } },
288
+ * { fieldId: 'currentSalary', filter: { operation: { type: 'blank' } } }
289
+ * ],
290
+ * sort: null,
291
+ * hiddenColumns: []
292
+ * }
293
+ */
294
+ //# sourceMappingURL=listViewConfig.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listViewConfig.types.d.ts","sourceRoot":"","sources":["../../src/positions/listViewConfig.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,CAAC;AAG3C,MAAM,MAAM,qBAAqB,GAC7B;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAErB,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,qBAAqB,CAAC;CAClC,CAAC;AAGF,MAAM,MAAM,qBAAqB,GAC7B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC7C;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,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GACtF;IAAE,OAAO,EAAE,iCAAiC,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GACpE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,sBAAsB,CAAA;CAAE,CAAC;AAGxD,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAAC;IACnC,SAAS,EAAE,aAAa,CAAC;CAC1B,GAAG,IAAI,CAAC;AAQT,MAAM,MAAM,cAAc,GAAG;IAE3B,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAE7B,IAAI,EAAE,eAAe,CAAC;IAEtB,aAAa,EAAE,CAAC,gBAAgB,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Filter and View Configuration Types for Position Lists
3
+ *
4
+ * This type system supports comprehensive filtering, sorting, searching, and column visibility
5
+ * management for candidate lists within positions.
6
+ *
7
+ * Key Features:
8
+ * 1. Type-safe filters for different data types (string, number, boolean, array, date)
9
+ * 2. Single-field sorting (one column at a time)
10
+ * 3. Column visibility management
11
+ * 4. Support for dynamic position question fields
12
+ *
13
+ * Design Decisions:
14
+ * - Each filter type has a 'none' operation to represent "no filter applied"
15
+ * - Each filter type has a 'blank' operation to filter for empty/null values
16
+ * - deepProfileStatus is treated as a string filter (for enum values like 'queued', 'processing', etc.)
17
+ * - Array sorting uses array length (useful for skills - more skills = higher in desc order)
18
+ * - Position questions use discriminated unions to ensure type safety based on question type
19
+ * - FieldFilterConfig uses discriminated unions to ensure correct filter type for each field
20
+ * - Only one column can be sorted at a time (single-field sorting)
21
+ */
22
+ export {};
23
+ /**
24
+ * Example Usage:
25
+ *
26
+ * 1. Filter candidates with 3+ years experience, currently employed, and know BOTH React and TypeScript:
27
+ * {
28
+ * filters: [
29
+ * { fieldId: 'fullTimeExperienceInYears', filter: { operation: { type: 'greaterThanOrEqual', value: 3 } } },
30
+ * { fieldId: 'isCurrentlyEmployed', filter: { operation: { type: 'true' } } },
31
+ * { fieldId: 'coreSkills', filter: { operation: { type: 'containsAll', values: ['React', 'TypeScript'] } } }
32
+ * ],
33
+ * sort: { fieldId: 'fullTimeExperienceInYears', direction: 'desc' },
34
+ * hiddenColumns: ['phoneNumber', 'linkedinUrl']
35
+ * }
36
+ *
37
+ * 2. Filter candidates who know EITHER React OR Vue OR Angular:
38
+ * {
39
+ * filters: [
40
+ * { fieldId: 'coreSkills', filter: { operation: { type: 'containsAny', values: ['React', 'Vue', 'Angular'] } } }
41
+ * ],
42
+ * sort: { fieldId: 'fullTimeExperienceInYears', direction: 'desc' },
43
+ * hiddenColumns: []
44
+ * }
45
+ *
46
+ * 3. Filter by position question (custom field with containsAll):
47
+ * {
48
+ * filters: [
49
+ * {
50
+ * fieldId: 'question-id-123',
51
+ * filter: { questionType: 'mcq', filter: { operation: { type: 'containsAll', values: ['Option A', 'Option B'] } } }
52
+ * }
53
+ * ],
54
+ * sort: null,
55
+ * hiddenColumns: []
56
+ * }
57
+ *
58
+ * 4. Filter for candidates with blank/missing fields:
59
+ * {
60
+ * filters: [
61
+ * { fieldId: 'linkedinUrl', filter: { operation: { type: 'blank' } } },
62
+ * { fieldId: 'currentSalary', filter: { operation: { type: 'blank' } } }
63
+ * ],
64
+ * sort: null,
65
+ * hiddenColumns: []
66
+ * }
67
+ */