lancer-shared 1.2.346 → 1.2.347
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/bundle.cjs.js +1806 -1775
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +1795 -1769
- package/dist/bundle.esm.js.map +1 -1
- package/dist/constants/chat.d.ts +12 -18
- package/dist/constants/routes.d.ts +20 -10
- package/dist/schemas/chat/index.d.ts +642 -12
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -1,1467 +1,594 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
var util;
|
|
4
|
+
(function (util) {
|
|
5
|
+
util.assertEqual = (val) => val;
|
|
6
|
+
function assertIs(_arg) { }
|
|
7
|
+
util.assertIs = assertIs;
|
|
8
|
+
function assertNever(_x) {
|
|
9
|
+
throw new Error();
|
|
10
|
+
}
|
|
11
|
+
util.assertNever = assertNever;
|
|
12
|
+
util.arrayToEnum = (items) => {
|
|
13
|
+
const obj = {};
|
|
14
|
+
for (const item of items) {
|
|
15
|
+
obj[item] = item;
|
|
16
|
+
}
|
|
17
|
+
return obj;
|
|
18
|
+
};
|
|
19
|
+
util.getValidEnumValues = (obj) => {
|
|
20
|
+
const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
|
|
21
|
+
const filtered = {};
|
|
22
|
+
for (const k of validKeys) {
|
|
23
|
+
filtered[k] = obj[k];
|
|
24
|
+
}
|
|
25
|
+
return util.objectValues(filtered);
|
|
26
|
+
};
|
|
27
|
+
util.objectValues = (obj) => {
|
|
28
|
+
return util.objectKeys(obj).map(function (e) {
|
|
29
|
+
return obj[e];
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
util.objectKeys = typeof Object.keys === "function" // eslint-disable-line ban/ban
|
|
33
|
+
? (obj) => Object.keys(obj) // eslint-disable-line ban/ban
|
|
34
|
+
: (object) => {
|
|
35
|
+
const keys = [];
|
|
36
|
+
for (const key in object) {
|
|
37
|
+
if (Object.prototype.hasOwnProperty.call(object, key)) {
|
|
38
|
+
keys.push(key);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return keys;
|
|
42
|
+
};
|
|
43
|
+
util.find = (arr, checker) => {
|
|
44
|
+
for (const item of arr) {
|
|
45
|
+
if (checker(item))
|
|
46
|
+
return item;
|
|
47
|
+
}
|
|
48
|
+
return undefined;
|
|
49
|
+
};
|
|
50
|
+
util.isInteger = typeof Number.isInteger === "function"
|
|
51
|
+
? (val) => Number.isInteger(val) // eslint-disable-line ban/ban
|
|
52
|
+
: (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
|
|
53
|
+
function joinValues(array, separator = " | ") {
|
|
54
|
+
return array
|
|
55
|
+
.map((val) => (typeof val === "string" ? `'${val}'` : val))
|
|
56
|
+
.join(separator);
|
|
57
|
+
}
|
|
58
|
+
util.joinValues = joinValues;
|
|
59
|
+
util.jsonStringifyReplacer = (_, value) => {
|
|
60
|
+
if (typeof value === "bigint") {
|
|
61
|
+
return value.toString();
|
|
62
|
+
}
|
|
63
|
+
return value;
|
|
64
|
+
};
|
|
65
|
+
})(util || (util = {}));
|
|
66
|
+
var objectUtil;
|
|
67
|
+
(function (objectUtil) {
|
|
68
|
+
objectUtil.mergeShapes = (first, second) => {
|
|
69
|
+
return {
|
|
70
|
+
...first,
|
|
71
|
+
...second, // second overwrites first
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
})(objectUtil || (objectUtil = {}));
|
|
75
|
+
const ZodParsedType = util.arrayToEnum([
|
|
76
|
+
"string",
|
|
77
|
+
"nan",
|
|
78
|
+
"number",
|
|
79
|
+
"integer",
|
|
80
|
+
"float",
|
|
81
|
+
"boolean",
|
|
82
|
+
"date",
|
|
83
|
+
"bigint",
|
|
84
|
+
"symbol",
|
|
85
|
+
"function",
|
|
86
|
+
"undefined",
|
|
87
|
+
"null",
|
|
88
|
+
"array",
|
|
89
|
+
"object",
|
|
90
|
+
"unknown",
|
|
91
|
+
"promise",
|
|
92
|
+
"void",
|
|
93
|
+
"never",
|
|
94
|
+
"map",
|
|
95
|
+
"set",
|
|
10
96
|
]);
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
97
|
+
const getParsedType = (data) => {
|
|
98
|
+
const t = typeof data;
|
|
99
|
+
switch (t) {
|
|
100
|
+
case "undefined":
|
|
101
|
+
return ZodParsedType.undefined;
|
|
102
|
+
case "string":
|
|
103
|
+
return ZodParsedType.string;
|
|
104
|
+
case "number":
|
|
105
|
+
return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
|
|
106
|
+
case "boolean":
|
|
107
|
+
return ZodParsedType.boolean;
|
|
108
|
+
case "function":
|
|
109
|
+
return ZodParsedType.function;
|
|
110
|
+
case "bigint":
|
|
111
|
+
return ZodParsedType.bigint;
|
|
112
|
+
case "symbol":
|
|
113
|
+
return ZodParsedType.symbol;
|
|
114
|
+
case "object":
|
|
115
|
+
if (Array.isArray(data)) {
|
|
116
|
+
return ZodParsedType.array;
|
|
117
|
+
}
|
|
118
|
+
if (data === null) {
|
|
119
|
+
return ZodParsedType.null;
|
|
120
|
+
}
|
|
121
|
+
if (data.then &&
|
|
122
|
+
typeof data.then === "function" &&
|
|
123
|
+
data.catch &&
|
|
124
|
+
typeof data.catch === "function") {
|
|
125
|
+
return ZodParsedType.promise;
|
|
126
|
+
}
|
|
127
|
+
if (typeof Map !== "undefined" && data instanceof Map) {
|
|
128
|
+
return ZodParsedType.map;
|
|
129
|
+
}
|
|
130
|
+
if (typeof Set !== "undefined" && data instanceof Set) {
|
|
131
|
+
return ZodParsedType.set;
|
|
132
|
+
}
|
|
133
|
+
if (typeof Date !== "undefined" && data instanceof Date) {
|
|
134
|
+
return ZodParsedType.date;
|
|
135
|
+
}
|
|
136
|
+
return ZodParsedType.object;
|
|
137
|
+
default:
|
|
138
|
+
return ZodParsedType.unknown;
|
|
139
|
+
}
|
|
39
140
|
};
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
141
|
+
|
|
142
|
+
const ZodIssueCode = util.arrayToEnum([
|
|
143
|
+
"invalid_type",
|
|
144
|
+
"invalid_literal",
|
|
145
|
+
"custom",
|
|
146
|
+
"invalid_union",
|
|
147
|
+
"invalid_union_discriminator",
|
|
148
|
+
"invalid_enum_value",
|
|
149
|
+
"unrecognized_keys",
|
|
150
|
+
"invalid_arguments",
|
|
151
|
+
"invalid_return_type",
|
|
152
|
+
"invalid_date",
|
|
153
|
+
"invalid_string",
|
|
154
|
+
"too_small",
|
|
155
|
+
"too_big",
|
|
156
|
+
"invalid_intersection_types",
|
|
157
|
+
"not_multiple_of",
|
|
158
|
+
"not_finite",
|
|
159
|
+
]);
|
|
160
|
+
const quotelessJson = (obj) => {
|
|
161
|
+
const json = JSON.stringify(obj, null, 2);
|
|
162
|
+
return json.replace(/"([^"]+)":/g, "$1:");
|
|
50
163
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return
|
|
164
|
+
class ZodError extends Error {
|
|
165
|
+
get errors() {
|
|
166
|
+
return this.issues;
|
|
54
167
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
168
|
+
constructor(issues) {
|
|
169
|
+
super();
|
|
170
|
+
this.issues = [];
|
|
171
|
+
this.addIssue = (sub) => {
|
|
172
|
+
this.issues = [...this.issues, sub];
|
|
173
|
+
};
|
|
174
|
+
this.addIssues = (subs = []) => {
|
|
175
|
+
this.issues = [...this.issues, ...subs];
|
|
176
|
+
};
|
|
177
|
+
const actualProto = new.target.prototype;
|
|
178
|
+
if (Object.setPrototypeOf) {
|
|
179
|
+
// eslint-disable-next-line ban/ban
|
|
180
|
+
Object.setPrototypeOf(this, actualProto);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
this.__proto__ = actualProto;
|
|
184
|
+
}
|
|
185
|
+
this.name = "ZodError";
|
|
186
|
+
this.issues = issues;
|
|
58
187
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
188
|
+
format(_mapper) {
|
|
189
|
+
const mapper = _mapper ||
|
|
190
|
+
function (issue) {
|
|
191
|
+
return issue.message;
|
|
192
|
+
};
|
|
193
|
+
const fieldErrors = { _errors: [] };
|
|
194
|
+
const processError = (error) => {
|
|
195
|
+
for (const issue of error.issues) {
|
|
196
|
+
if (issue.code === "invalid_union") {
|
|
197
|
+
issue.unionErrors.map(processError);
|
|
198
|
+
}
|
|
199
|
+
else if (issue.code === "invalid_return_type") {
|
|
200
|
+
processError(issue.returnTypeError);
|
|
201
|
+
}
|
|
202
|
+
else if (issue.code === "invalid_arguments") {
|
|
203
|
+
processError(issue.argumentsError);
|
|
204
|
+
}
|
|
205
|
+
else if (issue.path.length === 0) {
|
|
206
|
+
fieldErrors._errors.push(mapper(issue));
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
let curr = fieldErrors;
|
|
210
|
+
let i = 0;
|
|
211
|
+
while (i < issue.path.length) {
|
|
212
|
+
const el = issue.path[i];
|
|
213
|
+
const terminal = i === issue.path.length - 1;
|
|
214
|
+
if (!terminal) {
|
|
215
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
216
|
+
// if (typeof el === "string") {
|
|
217
|
+
// curr[el] = curr[el] || { _errors: [] };
|
|
218
|
+
// } else if (typeof el === "number") {
|
|
219
|
+
// const errorArray: any = [];
|
|
220
|
+
// errorArray._errors = [];
|
|
221
|
+
// curr[el] = curr[el] || errorArray;
|
|
222
|
+
// }
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
226
|
+
curr[el]._errors.push(mapper(issue));
|
|
227
|
+
}
|
|
228
|
+
curr = curr[el];
|
|
229
|
+
i++;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
processError(this);
|
|
235
|
+
return fieldErrors;
|
|
64
236
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
if (isRoomCrmStatus(normalizedStatus)) {
|
|
71
|
-
return normalizedStatus;
|
|
237
|
+
static assert(value) {
|
|
238
|
+
if (!(value instanceof ZodError)) {
|
|
239
|
+
throw new Error(`Not a ZodError: ${value}`);
|
|
72
240
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
241
|
+
}
|
|
242
|
+
toString() {
|
|
243
|
+
return this.message;
|
|
244
|
+
}
|
|
245
|
+
get message() {
|
|
246
|
+
return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);
|
|
247
|
+
}
|
|
248
|
+
get isEmpty() {
|
|
249
|
+
return this.issues.length === 0;
|
|
250
|
+
}
|
|
251
|
+
flatten(mapper = (issue) => issue.message) {
|
|
252
|
+
const fieldErrors = {};
|
|
253
|
+
const formErrors = [];
|
|
254
|
+
for (const sub of this.issues) {
|
|
255
|
+
if (sub.path.length > 0) {
|
|
256
|
+
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
257
|
+
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
formErrors.push(mapper(sub));
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return { formErrors, fieldErrors };
|
|
264
|
+
}
|
|
265
|
+
get formErrors() {
|
|
266
|
+
return this.flatten();
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
ZodError.create = (issues) => {
|
|
270
|
+
const error = new ZodError(issues);
|
|
271
|
+
return error;
|
|
78
272
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
273
|
+
|
|
274
|
+
const errorMap = (issue, _ctx) => {
|
|
275
|
+
let message;
|
|
276
|
+
switch (issue.code) {
|
|
277
|
+
case ZodIssueCode.invalid_type:
|
|
278
|
+
if (issue.received === ZodParsedType.undefined) {
|
|
279
|
+
message = "Required";
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
message = `Expected ${issue.expected}, received ${issue.received}`;
|
|
283
|
+
}
|
|
284
|
+
break;
|
|
285
|
+
case ZodIssueCode.invalid_literal:
|
|
286
|
+
message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;
|
|
287
|
+
break;
|
|
288
|
+
case ZodIssueCode.unrecognized_keys:
|
|
289
|
+
message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`;
|
|
290
|
+
break;
|
|
291
|
+
case ZodIssueCode.invalid_union:
|
|
292
|
+
message = `Invalid input`;
|
|
293
|
+
break;
|
|
294
|
+
case ZodIssueCode.invalid_union_discriminator:
|
|
295
|
+
message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;
|
|
296
|
+
break;
|
|
297
|
+
case ZodIssueCode.invalid_enum_value:
|
|
298
|
+
message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;
|
|
299
|
+
break;
|
|
300
|
+
case ZodIssueCode.invalid_arguments:
|
|
301
|
+
message = `Invalid function arguments`;
|
|
302
|
+
break;
|
|
303
|
+
case ZodIssueCode.invalid_return_type:
|
|
304
|
+
message = `Invalid function return type`;
|
|
305
|
+
break;
|
|
306
|
+
case ZodIssueCode.invalid_date:
|
|
307
|
+
message = `Invalid date`;
|
|
308
|
+
break;
|
|
309
|
+
case ZodIssueCode.invalid_string:
|
|
310
|
+
if (typeof issue.validation === "object") {
|
|
311
|
+
if ("includes" in issue.validation) {
|
|
312
|
+
message = `Invalid input: must include "${issue.validation.includes}"`;
|
|
313
|
+
if (typeof issue.validation.position === "number") {
|
|
314
|
+
message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
else if ("startsWith" in issue.validation) {
|
|
318
|
+
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
|
|
319
|
+
}
|
|
320
|
+
else if ("endsWith" in issue.validation) {
|
|
321
|
+
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
util.assertNever(issue.validation);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
else if (issue.validation !== "regex") {
|
|
328
|
+
message = `Invalid ${issue.validation}`;
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
message = "Invalid";
|
|
332
|
+
}
|
|
333
|
+
break;
|
|
334
|
+
case ZodIssueCode.too_small:
|
|
335
|
+
if (issue.type === "array")
|
|
336
|
+
message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
|
|
337
|
+
else if (issue.type === "string")
|
|
338
|
+
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
339
|
+
else if (issue.type === "number")
|
|
340
|
+
message = `Number must be ${issue.exact
|
|
341
|
+
? `exactly equal to `
|
|
342
|
+
: issue.inclusive
|
|
343
|
+
? `greater than or equal to `
|
|
344
|
+
: `greater than `}${issue.minimum}`;
|
|
345
|
+
else if (issue.type === "date")
|
|
346
|
+
message = `Date must be ${issue.exact
|
|
347
|
+
? `exactly equal to `
|
|
348
|
+
: issue.inclusive
|
|
349
|
+
? `greater than or equal to `
|
|
350
|
+
: `greater than `}${new Date(Number(issue.minimum))}`;
|
|
351
|
+
else
|
|
352
|
+
message = "Invalid input";
|
|
353
|
+
break;
|
|
354
|
+
case ZodIssueCode.too_big:
|
|
355
|
+
if (issue.type === "array")
|
|
356
|
+
message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
|
|
357
|
+
else if (issue.type === "string")
|
|
358
|
+
message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
|
|
359
|
+
else if (issue.type === "number")
|
|
360
|
+
message = `Number must be ${issue.exact
|
|
361
|
+
? `exactly`
|
|
362
|
+
: issue.inclusive
|
|
363
|
+
? `less than or equal to`
|
|
364
|
+
: `less than`} ${issue.maximum}`;
|
|
365
|
+
else if (issue.type === "bigint")
|
|
366
|
+
message = `BigInt must be ${issue.exact
|
|
367
|
+
? `exactly`
|
|
368
|
+
: issue.inclusive
|
|
369
|
+
? `less than or equal to`
|
|
370
|
+
: `less than`} ${issue.maximum}`;
|
|
371
|
+
else if (issue.type === "date")
|
|
372
|
+
message = `Date must be ${issue.exact
|
|
373
|
+
? `exactly`
|
|
374
|
+
: issue.inclusive
|
|
375
|
+
? `smaller than or equal to`
|
|
376
|
+
: `smaller than`} ${new Date(Number(issue.maximum))}`;
|
|
377
|
+
else
|
|
378
|
+
message = "Invalid input";
|
|
379
|
+
break;
|
|
380
|
+
case ZodIssueCode.custom:
|
|
381
|
+
message = `Invalid input`;
|
|
382
|
+
break;
|
|
383
|
+
case ZodIssueCode.invalid_intersection_types:
|
|
384
|
+
message = `Intersection results could not be merged`;
|
|
385
|
+
break;
|
|
386
|
+
case ZodIssueCode.not_multiple_of:
|
|
387
|
+
message = `Number must be a multiple of ${issue.multipleOf}`;
|
|
388
|
+
break;
|
|
389
|
+
case ZodIssueCode.not_finite:
|
|
390
|
+
message = "Number must be finite";
|
|
391
|
+
break;
|
|
392
|
+
default:
|
|
393
|
+
message = _ctx.defaultError;
|
|
394
|
+
util.assertNever(issue);
|
|
395
|
+
}
|
|
396
|
+
return { message };
|
|
92
397
|
};
|
|
93
398
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
question: 'Please list any certifications that you have',
|
|
102
|
-
answer: '',
|
|
103
|
-
exampleAnswer: 'AWS Certified Solutions Architect\nGoogle Cloud Certified Professional Developer\nMicrosoft Certified: Azure Developer Associate\nCertified Scrum Master (CSM)',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
question: 'What past project or job have you had that is most like this one and why?',
|
|
107
|
-
answer: "{{PROJECT}} is definitely the closest match - we {{ACTION}} their {{TYPE}} from scratch {{DETAIL}}. The {{CHALLENGE}} was particularly challenging since we needed {{REQUIREMENT}}. Very similar {{ASPECT}} to what you're looking for.",
|
|
108
|
-
exampleAnswer: "{{PROJECT}} is definitely the closest match - we {{ACTION}} their {{TYPE}} from scratch {{DETAIL}}. The {{CHALLENGE}} was particularly challenging since we needed {{REQUIREMENT}}. Very similar {{ASPECT}} to what you're looking for.",
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
question: 'What tools/frameworks/methods have you worked with?',
|
|
112
|
-
answer: 'For {{AREA}}, we primarily use {{TOOL}} and {{METHOD}}. For {{AREA}}, we use {{TOOL}}. For the {{PROJECT}} project I mentioned, we used this exact approach and it worked really well for {{OUTCOME}}. We typically {{METHOD}} depending on client needs.',
|
|
113
|
-
exampleAnswer: 'For {{AREA}}, we primarily use {{TOOL}} and {{METHOD}}. For {{AREA}}, we use {{TOOL}}. For the {{PROJECT}} project I mentioned, we used this exact approach and it worked really well for {{OUTCOME}}. We typically {{METHOD}} depending on client needs.',
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
question: 'Do you have suggestions to make this project run successfully?',
|
|
117
|
-
answer: "Based on our experience with {{PROJECT}}, I'd suggest starting with {{APPROACH}} to {{BENEFIT}}. {{INSIGHT}}, and we've found that {{LESSON}} saves {{BENEFIT}} later. Our team's experience in {{DOMAIN}} makes us a good fit here.",
|
|
118
|
-
exampleAnswer: "Based on our experience with {{PROJECT}}, I'd suggest starting with {{APPROACH}} to {{BENEFIT}}. {{INSIGHT}}, and we've found that {{LESSON}} saves {{BENEFIT}} later. Our team's experience in {{DOMAIN}} makes us a good fit here.",
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
question: 'Why do you think you are a good fit for this particular project?',
|
|
122
|
-
answer: "Based on our experience with {{PROJECT}}, I'd suggest starting with {{APPROACH}} to {{BENEFIT}}. {{INSIGHT}}, and we've found that {{LESSON}} saves {{BENEFIT}} later. Our team's experience in {{DOMAIN}} makes us a good fit here.",
|
|
123
|
-
exampleAnswer: "Based on our experience with {{PROJECT}}, I'd suggest starting with {{APPROACH}} to {{BENEFIT}}. {{INSIGHT}}, and we've found that {{LESSON}} saves {{BENEFIT}} later. Our team's experience in {{DOMAIN}} makes us a good fit here.",
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
question: 'Do you have any questions about the job description?',
|
|
127
|
-
answer: "I'm curious about {{QUESTION}}? Also, are you looking to {{REQUIREMENT}} that we should have experience with? This would help us better understand the scope.",
|
|
128
|
-
exampleAnswer: "I'm curious about {{QUESTION}}? Also, are you looking to {{REQUIREMENT}} that we should have experience with? This would help us better understand the scope.",
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
question: 'How would you approach this type of project?',
|
|
132
|
-
answer: "For projects like this, we start by {{STEP}}, focusing on {{FACTOR}}. From {{PROJECT}}, we learned that {{INSIGHT}} can drive {{TYPE}}, such as {{RESULT}}. We'd adapt this approach based on your specific goals and requirements.",
|
|
133
|
-
exampleAnswer: "For projects like this, we start by {{STEP}}, focusing on {{FACTOR}}. From {{PROJECT}}, we learned that {{INSIGHT}} can drive {{TYPE}}, such as {{RESULT}}. We'd adapt this approach based on your specific goals and requirements.",
|
|
134
|
-
},
|
|
135
|
-
];
|
|
399
|
+
let overrideErrorMap = errorMap;
|
|
400
|
+
function setErrorMap(map) {
|
|
401
|
+
overrideErrorMap = map;
|
|
402
|
+
}
|
|
403
|
+
function getErrorMap() {
|
|
404
|
+
return overrideErrorMap;
|
|
405
|
+
}
|
|
136
406
|
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
407
|
+
const makeIssue = (params) => {
|
|
408
|
+
const { data, path, errorMaps, issueData } = params;
|
|
409
|
+
const fullPath = [...path, ...(issueData.path || [])];
|
|
410
|
+
const fullIssue = {
|
|
411
|
+
...issueData,
|
|
412
|
+
path: fullPath,
|
|
413
|
+
};
|
|
414
|
+
if (issueData.message !== undefined) {
|
|
415
|
+
return {
|
|
416
|
+
...issueData,
|
|
417
|
+
path: fullPath,
|
|
418
|
+
message: issueData.message,
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
let errorMessage = "";
|
|
422
|
+
const maps = errorMaps
|
|
423
|
+
.filter((m) => !!m)
|
|
424
|
+
.slice()
|
|
425
|
+
.reverse();
|
|
426
|
+
for (const map of maps) {
|
|
427
|
+
errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
|
|
428
|
+
}
|
|
429
|
+
return {
|
|
430
|
+
...issueData,
|
|
431
|
+
path: fullPath,
|
|
432
|
+
message: errorMessage,
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
const EMPTY_PATH = [];
|
|
436
|
+
function addIssueToContext(ctx, issueData) {
|
|
437
|
+
const overrideMap = getErrorMap();
|
|
438
|
+
const issue = makeIssue({
|
|
439
|
+
issueData: issueData,
|
|
440
|
+
data: ctx.data,
|
|
441
|
+
path: ctx.path,
|
|
442
|
+
errorMaps: [
|
|
443
|
+
ctx.common.contextualErrorMap, // contextual error map is first priority
|
|
444
|
+
ctx.schemaErrorMap, // then schema-bound map if available
|
|
445
|
+
overrideMap, // then global override map
|
|
446
|
+
overrideMap === errorMap ? undefined : errorMap, // then global default map
|
|
447
|
+
].filter((x) => !!x),
|
|
448
|
+
});
|
|
449
|
+
ctx.common.issues.push(issue);
|
|
450
|
+
}
|
|
451
|
+
class ParseStatus {
|
|
452
|
+
constructor() {
|
|
453
|
+
this.value = "valid";
|
|
454
|
+
}
|
|
455
|
+
dirty() {
|
|
456
|
+
if (this.value === "valid")
|
|
457
|
+
this.value = "dirty";
|
|
458
|
+
}
|
|
459
|
+
abort() {
|
|
460
|
+
if (this.value !== "aborted")
|
|
461
|
+
this.value = "aborted";
|
|
462
|
+
}
|
|
463
|
+
static mergeArray(status, results) {
|
|
464
|
+
const arrayValue = [];
|
|
465
|
+
for (const s of results) {
|
|
466
|
+
if (s.status === "aborted")
|
|
467
|
+
return INVALID$3;
|
|
468
|
+
if (s.status === "dirty")
|
|
469
|
+
status.dirty();
|
|
470
|
+
arrayValue.push(s.value);
|
|
471
|
+
}
|
|
472
|
+
return { status: status.value, value: arrayValue };
|
|
473
|
+
}
|
|
474
|
+
static async mergeObjectAsync(status, pairs) {
|
|
475
|
+
const syncPairs = [];
|
|
476
|
+
for (const pair of pairs) {
|
|
477
|
+
const key = await pair.key;
|
|
478
|
+
const value = await pair.value;
|
|
479
|
+
syncPairs.push({
|
|
480
|
+
key,
|
|
481
|
+
value,
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
return ParseStatus.mergeObjectSync(status, syncPairs);
|
|
485
|
+
}
|
|
486
|
+
static mergeObjectSync(status, pairs) {
|
|
487
|
+
const finalObject = {};
|
|
488
|
+
for (const pair of pairs) {
|
|
489
|
+
const { key, value } = pair;
|
|
490
|
+
if (key.status === "aborted")
|
|
491
|
+
return INVALID$3;
|
|
492
|
+
if (value.status === "aborted")
|
|
493
|
+
return INVALID$3;
|
|
494
|
+
if (key.status === "dirty")
|
|
495
|
+
status.dirty();
|
|
496
|
+
if (value.status === "dirty")
|
|
497
|
+
status.dirty();
|
|
498
|
+
if (key.value !== "__proto__" &&
|
|
499
|
+
(typeof value.value !== "undefined" || pair.alwaysSet)) {
|
|
500
|
+
finalObject[key.value] = value.value;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
return { status: status.value, value: finalObject };
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
const INVALID$3 = Object.freeze({
|
|
507
|
+
status: "aborted",
|
|
508
|
+
});
|
|
509
|
+
const DIRTY = (value) => ({ status: "dirty", value });
|
|
510
|
+
const OK = (value) => ({ status: "valid", value });
|
|
511
|
+
const isAborted = (x) => x.status === "aborted";
|
|
512
|
+
const isDirty = (x) => x.status === "dirty";
|
|
513
|
+
const isValid = (x) => x.status === "valid";
|
|
514
|
+
const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
204
515
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
516
|
+
/******************************************************************************
|
|
517
|
+
Copyright (c) Microsoft Corporation.
|
|
518
|
+
|
|
519
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
520
|
+
purpose with or without fee is hereby granted.
|
|
521
|
+
|
|
522
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
523
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
524
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
525
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
526
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
527
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
528
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
529
|
+
***************************************************************************** */
|
|
530
|
+
|
|
531
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
532
|
+
if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
533
|
+
return state.get(receiver);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
537
|
+
if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
538
|
+
return (state.set(receiver, value)), value;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
542
|
+
var e = new Error(message);
|
|
543
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
210
544
|
};
|
|
211
545
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
'3 to 6 months',
|
|
218
|
-
'More than 6 months',
|
|
219
|
-
'Unspecified',
|
|
220
|
-
],
|
|
221
|
-
ENGAGEMENT_TYPE: [
|
|
222
|
-
'Less than 30 hrs/week',
|
|
223
|
-
'More than 30 hrs/week',
|
|
224
|
-
'Unspecified',
|
|
225
|
-
],
|
|
226
|
-
VENDOR_TYPE: ['Independent', 'Agency', 'Unspecified'],
|
|
227
|
-
PAYMENT_TYPE: ['Unspecified', 'Hourly', 'Fixed-price'],
|
|
228
|
-
TALENT_TYPE: ['Agency', 'Independent', 'Unspecified'],
|
|
229
|
-
ENGLISH_LEVELS: [
|
|
230
|
-
'Fluent',
|
|
231
|
-
'Conversational',
|
|
232
|
-
'Native or Bilingual',
|
|
233
|
-
'Unspecified',
|
|
234
|
-
],
|
|
235
|
-
EXPERIENCE_LEVELS: ['Entry level', 'Intermediate', 'Expert'],
|
|
236
|
-
REQUIRED_EARNINGS: [100, 1000, 10000],
|
|
237
|
-
REQUIRED_JSS: ['>80%', '>90%', '100%', 'RT'],
|
|
238
|
-
HIERARCHICAL_CATEGORIES: [
|
|
239
|
-
{
|
|
240
|
-
label: 'Accounting & Consulting',
|
|
241
|
-
value: 'accounting-consulting',
|
|
242
|
-
children: [
|
|
243
|
-
'Accounting & Bookkeeping',
|
|
244
|
-
'Financial Planning',
|
|
245
|
-
'Management Consulting & Analysis',
|
|
246
|
-
'Other - Accounting & Consulting',
|
|
247
|
-
'Personal & Professional Coaching',
|
|
248
|
-
'Recruiting & Human Resources',
|
|
249
|
-
],
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
label: 'Admin Support',
|
|
253
|
-
value: 'admin-support',
|
|
254
|
-
children: [
|
|
255
|
-
'Data Entry & Transcription Services',
|
|
256
|
-
'Market Research & Product Reviews',
|
|
257
|
-
'Project Management',
|
|
258
|
-
'Virtual Assistance',
|
|
259
|
-
],
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
label: 'Customer Service',
|
|
263
|
-
value: 'customer-service',
|
|
264
|
-
children: [
|
|
265
|
-
'Community Management & Tagging',
|
|
266
|
-
'Customer Service & Tech Support',
|
|
267
|
-
],
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
label: 'Data Science & Analytics',
|
|
271
|
-
value: 'data-science-analytics',
|
|
272
|
-
children: [
|
|
273
|
-
'AI & Machine Learning',
|
|
274
|
-
'Data Analysis & Testing',
|
|
275
|
-
'Data Extraction/ETL',
|
|
276
|
-
'Data Mining & Management',
|
|
277
|
-
],
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
label: 'Design & Creative',
|
|
281
|
-
value: 'design-creative',
|
|
282
|
-
children: [
|
|
283
|
-
'Art & Illustration',
|
|
284
|
-
'Audio & Music Production',
|
|
285
|
-
'Branding & Logo Design',
|
|
286
|
-
'Graphic, Editorial & Presentation Design',
|
|
287
|
-
'NFT, AR/VR & Game Art',
|
|
288
|
-
'Performing Arts',
|
|
289
|
-
'Photography',
|
|
290
|
-
'Product Design',
|
|
291
|
-
'Video & Animation',
|
|
292
|
-
],
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
label: 'Engineering & Architecture',
|
|
296
|
-
value: 'engineering-architecture',
|
|
297
|
-
children: [
|
|
298
|
-
'3D Modeling & CAD',
|
|
299
|
-
'Building & Landscape Architecture',
|
|
300
|
-
'Chemical Engineering',
|
|
301
|
-
'Civil & Structural Engineering',
|
|
302
|
-
'Contract Manufacturing',
|
|
303
|
-
'Electrical & Electronic Engineering',
|
|
304
|
-
'Energy & Mechanical Engineering',
|
|
305
|
-
],
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
label: 'IT & Networking',
|
|
309
|
-
value: 'it-networking',
|
|
310
|
-
children: [
|
|
311
|
-
'Database Management & Administration',
|
|
312
|
-
'DevOps & Solution Architecture',
|
|
313
|
-
'ERP/CRM Software',
|
|
314
|
-
'Information Security & Compliance',
|
|
315
|
-
'Network & System Administration',
|
|
316
|
-
],
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
label: 'Legal',
|
|
320
|
-
value: 'legal',
|
|
321
|
-
children: [
|
|
322
|
-
'Corporate & Contract Law',
|
|
323
|
-
'Finance & Tax Law',
|
|
324
|
-
'International & Immigration Law',
|
|
325
|
-
'Public Law',
|
|
326
|
-
],
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
label: 'Sales & Marketing',
|
|
330
|
-
value: 'sales-marketing',
|
|
331
|
-
children: [
|
|
332
|
-
'Digital Marketing',
|
|
333
|
-
'Lead Generation & Telemarketing',
|
|
334
|
-
'Marketing, PR & Brand Strategy',
|
|
335
|
-
],
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
label: 'Translation',
|
|
339
|
-
value: 'translation',
|
|
340
|
-
children: [
|
|
341
|
-
'Language Tutoring & Interpretation',
|
|
342
|
-
'Translation & Localization Services',
|
|
343
|
-
],
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
label: 'Software Development',
|
|
347
|
-
value: 'software-development',
|
|
348
|
-
children: [
|
|
349
|
-
'AI Apps & Integration',
|
|
350
|
-
'Blockchain, NFT & Cryptocurrency',
|
|
351
|
-
'Desktop Application Development',
|
|
352
|
-
'Ecommerce Development',
|
|
353
|
-
'Game Design & Development',
|
|
354
|
-
'Mobile Development',
|
|
355
|
-
'Other - Software Development',
|
|
356
|
-
'Product Management & Scrum',
|
|
357
|
-
'QA Testing',
|
|
358
|
-
'Scripts & Utilities',
|
|
359
|
-
'Web & Mobile Design',
|
|
360
|
-
'Web Development',
|
|
361
|
-
],
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
label: 'Writing',
|
|
365
|
-
value: 'writing',
|
|
366
|
-
children: [
|
|
367
|
-
'Content Writing',
|
|
368
|
-
'Editing & Proofreading Services',
|
|
369
|
-
'Professional & Business Writing',
|
|
370
|
-
'Sales & Marketing Copywriting',
|
|
371
|
-
],
|
|
372
|
-
},
|
|
373
|
-
],
|
|
374
|
-
CATEGORIES: [
|
|
375
|
-
'Interior & Trade Show Design',
|
|
376
|
-
'Physical Sciences',
|
|
377
|
-
'Personal & Professional Coaching',
|
|
378
|
-
'Accounting & Bookkeeping',
|
|
379
|
-
'Financial Planning',
|
|
380
|
-
'Recruiting & Human Resources',
|
|
381
|
-
'Management Consulting & Analysis',
|
|
382
|
-
'Other - Accounting & Consulting',
|
|
383
|
-
'Data Entry & Transcription Services',
|
|
384
|
-
'Virtual Assistance',
|
|
385
|
-
'Project Management',
|
|
386
|
-
'Market Research & Product Reviews',
|
|
387
|
-
'Community Management & Tagging',
|
|
388
|
-
'Customer Service & Tech Support',
|
|
389
|
-
'Data Analysis & Testing',
|
|
390
|
-
'Data Extraction/ETL',
|
|
391
|
-
'Data Mining & Management',
|
|
392
|
-
'AI & Machine Learning',
|
|
393
|
-
'Art & Illustration',
|
|
394
|
-
'Audio & Music Production',
|
|
395
|
-
'Branding & Logo Design',
|
|
396
|
-
'NFT, AR/VR & Game Art',
|
|
397
|
-
'Graphic, Editorial & Presentation Design',
|
|
398
|
-
'Performing Arts',
|
|
399
|
-
'Photography',
|
|
400
|
-
'Product Design',
|
|
401
|
-
'Video & Animation',
|
|
402
|
-
'Building & Landscape Architecture',
|
|
403
|
-
'Chemical Engineering',
|
|
404
|
-
'Civil & Structural Engineering',
|
|
405
|
-
'Contract Manufacturing',
|
|
406
|
-
'Electrical & Electronic Engineering',
|
|
407
|
-
'Energy & Mechanical Engineering',
|
|
408
|
-
'3D Modeling & CAD',
|
|
409
|
-
'Database Management & Administration',
|
|
410
|
-
'ERP/CRM Software',
|
|
411
|
-
'Information Security & Compliance',
|
|
412
|
-
'Network & System Administration',
|
|
413
|
-
'DevOps & Solution Architecture',
|
|
414
|
-
'Corporate & Contract Law',
|
|
415
|
-
'International & Immigration Law',
|
|
416
|
-
'Finance & Tax Law',
|
|
417
|
-
'Public Law',
|
|
418
|
-
'Digital Marketing',
|
|
419
|
-
'Lead Generation & Telemarketing',
|
|
420
|
-
'Marketing, PR & Brand Strategy',
|
|
421
|
-
'Language Tutoring & Interpretation',
|
|
422
|
-
'Translation & Localization Services',
|
|
423
|
-
'Blockchain, NFT & Cryptocurrency',
|
|
424
|
-
'AI Apps & Integration',
|
|
425
|
-
'Desktop Application Development',
|
|
426
|
-
'Ecommerce Development',
|
|
427
|
-
'Game Design & Development',
|
|
428
|
-
'Mobile Development',
|
|
429
|
-
'Other - Software Development',
|
|
430
|
-
'Product Management & Scrum',
|
|
431
|
-
'QA Testing',
|
|
432
|
-
'Scripts & Utilities',
|
|
433
|
-
'Web & Mobile Design',
|
|
434
|
-
'Web Development',
|
|
435
|
-
'Sales & Marketing Copywriting',
|
|
436
|
-
'Content Writing',
|
|
437
|
-
'Editing & Proofreading Services',
|
|
438
|
-
'Professional & Business Writing',
|
|
439
|
-
],
|
|
440
|
-
CLIENT_INDUSTRY: [
|
|
441
|
-
'Aerospace',
|
|
442
|
-
'Agriculture & Forestry',
|
|
443
|
-
'Art & Design',
|
|
444
|
-
'Automotive',
|
|
445
|
-
'Aviation',
|
|
446
|
-
'Education',
|
|
447
|
-
'Energy & Utilities',
|
|
448
|
-
'Engineering & Architecture',
|
|
449
|
-
'Fashion & Beauty',
|
|
450
|
-
'Finance & Accounting',
|
|
451
|
-
'Food & Beverage',
|
|
452
|
-
'Government & Public Sector',
|
|
453
|
-
'Health & Fitness',
|
|
454
|
-
'HR & Business Services',
|
|
455
|
-
'Legal',
|
|
456
|
-
'Manufacturing & Construction',
|
|
457
|
-
'Media & Entertainment',
|
|
458
|
-
'Military & Defense',
|
|
459
|
-
'Mining',
|
|
460
|
-
'Real Estate',
|
|
461
|
-
'Retail & Consumer Goods',
|
|
462
|
-
'Sales & Marketing',
|
|
463
|
-
'Science & Medicine',
|
|
464
|
-
'Sports & Recreation',
|
|
465
|
-
'Supply Chain & Logistics',
|
|
466
|
-
'Tech & IT',
|
|
467
|
-
'Transportation & Warehousing',
|
|
468
|
-
'Travel & Hospitality',
|
|
469
|
-
],
|
|
470
|
-
CLIENT_SIZE: [
|
|
471
|
-
'Individual client',
|
|
472
|
-
'Small company (2-9 people)',
|
|
473
|
-
'Mid-sized company (10-99 people)',
|
|
474
|
-
'Large company (100-1,000 people)',
|
|
475
|
-
'Large company (1,000+ people)',
|
|
476
|
-
'Unspecified',
|
|
477
|
-
],
|
|
478
|
-
};
|
|
479
|
-
const HIERARCHICAL_CATEGORIES_TO_CHILDREN = JOB_FILTER_OPTIONS.HIERARCHICAL_CATEGORIES.reduce((acc, category) => {
|
|
480
|
-
acc[category.label] = category.children;
|
|
481
|
-
return acc;
|
|
482
|
-
}, {});
|
|
483
|
-
const regionNames = {
|
|
484
|
-
Worldwide: 'Worldwide',
|
|
485
|
-
USOnly: 'US Only',
|
|
486
|
-
UKOnly: 'UK Only',
|
|
487
|
-
All: 'All',
|
|
488
|
-
};
|
|
489
|
-
const CLIENT_SIZE_TO_NUMBER = {
|
|
490
|
-
'Individual client': 1,
|
|
491
|
-
'Small company (2-9 people)': 2,
|
|
492
|
-
'Mid-sized company (10-99 people)': 10,
|
|
493
|
-
'Large company (100-1,000 people)': 100,
|
|
494
|
-
'Large company (1,000+ people)': 1000,
|
|
495
|
-
Unspecified: null,
|
|
496
|
-
};
|
|
546
|
+
var errorUtil;
|
|
547
|
+
(function (errorUtil) {
|
|
548
|
+
errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
549
|
+
errorUtil.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
|
|
550
|
+
})(errorUtil || (errorUtil = {}));
|
|
497
551
|
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
ZAF: "South Africa",
|
|
539
|
-
CHN: "China",
|
|
540
|
-
NOR: "Norway",
|
|
541
|
-
POL: "Poland",
|
|
542
|
-
COL: "Colombia",
|
|
543
|
-
NZL: "New Zealand",
|
|
544
|
-
ROU: "Romania",
|
|
545
|
-
BRA: "Brazil",
|
|
546
|
-
GRC: "Greece",
|
|
547
|
-
BGR: "Bulgaria",
|
|
548
|
-
DNK: "Denmark",
|
|
549
|
-
PHL: "Philippines",
|
|
550
|
-
BEL: "Belgium",
|
|
551
|
-
AUT: "Austria",
|
|
552
|
-
HKG: "Hong Kong",
|
|
553
|
-
QAT: "Qatar",
|
|
554
|
-
BGD: "Bangladesh",
|
|
555
|
-
PRT: "Portugal",
|
|
556
|
-
CYP: "Cyprus",
|
|
557
|
-
LKA: "Sri Lanka",
|
|
558
|
-
NGA: "Nigeria",
|
|
559
|
-
VNM: "Vietnam",
|
|
560
|
-
JPN: "Japan",
|
|
561
|
-
LVA: "Latvia",
|
|
562
|
-
THA: "Thailand",
|
|
563
|
-
CZE: "Czech Republic",
|
|
564
|
-
MEX: "Mexico",
|
|
565
|
-
EGY: "Egypt",
|
|
566
|
-
KEN: "Kenya",
|
|
567
|
-
KWT: "Kuwait",
|
|
568
|
-
CHL: "Chile",
|
|
569
|
-
EST: "Estonia",
|
|
570
|
-
UZB: "Uzbekistan",
|
|
571
|
-
FIN: "Finland",
|
|
572
|
-
HRV: "Croatia",
|
|
573
|
-
HUN: "Hungary",
|
|
574
|
-
KOR: "South Korea",
|
|
575
|
-
LTU: "Lithuania",
|
|
576
|
-
PRI: "Puerto Rico",
|
|
577
|
-
ALB: "Albania",
|
|
578
|
-
BHR: "Bahrain",
|
|
579
|
-
GEO: "Georgia",
|
|
580
|
-
GTM: "Guatemala",
|
|
581
|
-
IDN: "Indonesia",
|
|
582
|
-
LBN: "Lebanon",
|
|
583
|
-
UGA: "Uganda",
|
|
584
|
-
ARG: "Argentina",
|
|
585
|
-
ARM: "Armenia",
|
|
586
|
-
BMU: "Bermuda",
|
|
587
|
-
CRI: "Costa Rica",
|
|
588
|
-
CYM: "Cayman Islands",
|
|
589
|
-
GHA: "Ghana",
|
|
590
|
-
ISL: "Iceland",
|
|
591
|
-
JOR: "Jordan",
|
|
592
|
-
LUX: "Luxembourg",
|
|
593
|
-
MAR: "Morocco",
|
|
594
|
-
MKD: "Macedonia",
|
|
595
|
-
MLT: "Malta",
|
|
596
|
-
MYS: "Malaysia",
|
|
597
|
-
OMN: "Oman",
|
|
598
|
-
SRB: "Serbia",
|
|
599
|
-
TWN: "Taiwan",
|
|
600
|
-
BHS: "Bahamas",
|
|
601
|
-
DZA: "Algeria",
|
|
602
|
-
ETH: "Ethiopia",
|
|
603
|
-
GUY: "Guyana",
|
|
604
|
-
PAN: "Panama",
|
|
605
|
-
PER: "Peru",
|
|
606
|
-
SVK: "Slovakia",
|
|
607
|
-
SVN: "Slovenia",
|
|
608
|
-
TTO: "Trinidad and Tobago",
|
|
609
|
-
URY: "Uruguay",
|
|
610
|
-
VEN: "Venezuela",
|
|
611
|
-
VIR: "Virgin Islands",
|
|
612
|
-
ABW: "Aruba",
|
|
613
|
-
CMR: "Cameroon",
|
|
614
|
-
CUW: "Curaçao",
|
|
615
|
-
GIB: "Gibraltar",
|
|
616
|
-
HND: "Honduras",
|
|
617
|
-
JAM: "Jamaica",
|
|
618
|
-
JEY: "Jersey",
|
|
619
|
-
MDV: "Maldives",
|
|
620
|
-
MUS: "Mauritius",
|
|
621
|
-
TUN: "Tunisia",
|
|
622
|
-
RUS: "Russia",
|
|
623
|
-
IRN: "Iran",
|
|
624
|
-
IRQ: "Iraq",
|
|
625
|
-
AZE: "Azerbaijan",
|
|
626
|
-
CIV: "Cote d'Ivoire",
|
|
627
|
-
PSE: "Palestine",
|
|
628
|
-
MNE: "Montenegro",
|
|
629
|
-
BIH: "Bosnia and Herzegovina",
|
|
630
|
-
IMN: "Isle of Man",
|
|
631
|
-
PNG: "Papua New Guinea",
|
|
632
|
-
VCT: "Saint Vincent and the Grenadines",
|
|
633
|
-
VGB: "British Virgin Islands",
|
|
634
|
-
};
|
|
635
|
-
|
|
636
|
-
const regionMapping = {
|
|
637
|
-
Africa: [
|
|
638
|
-
"Algeria",
|
|
639
|
-
"Angola",
|
|
640
|
-
"Benin",
|
|
641
|
-
"Botswana",
|
|
642
|
-
"Burkina Faso",
|
|
643
|
-
"Burundi",
|
|
644
|
-
"Cabo Verde",
|
|
645
|
-
"Cameroon",
|
|
646
|
-
"Central African Republic",
|
|
647
|
-
"Chad",
|
|
648
|
-
"Comoros",
|
|
649
|
-
"Congo",
|
|
650
|
-
"Congo, the Democratic Republic of the",
|
|
651
|
-
"Cote d'Ivoire",
|
|
652
|
-
"Djibouti",
|
|
653
|
-
"Egypt",
|
|
654
|
-
"Equatorial Guinea",
|
|
655
|
-
"Eritrea",
|
|
656
|
-
"Eswatini",
|
|
657
|
-
"Ethiopia",
|
|
658
|
-
"Gabon",
|
|
659
|
-
"Gambia",
|
|
660
|
-
"Ghana",
|
|
661
|
-
"Guinea",
|
|
662
|
-
"Guinea-Bissau",
|
|
663
|
-
"Kenya",
|
|
664
|
-
"Lesotho",
|
|
665
|
-
"Liberia",
|
|
666
|
-
"Libya",
|
|
667
|
-
"Madagascar",
|
|
668
|
-
"Malawi",
|
|
669
|
-
"Mali",
|
|
670
|
-
"Mauritania",
|
|
671
|
-
"Mauritius",
|
|
672
|
-
"Morocco",
|
|
673
|
-
"Mozambique",
|
|
674
|
-
"Namibia",
|
|
675
|
-
"Niger",
|
|
676
|
-
"Nigeria",
|
|
677
|
-
"Rwanda",
|
|
678
|
-
"Sao Tome and Principe",
|
|
679
|
-
"Senegal",
|
|
680
|
-
"Seychelles",
|
|
681
|
-
"Sierra Leone",
|
|
682
|
-
"Somalia",
|
|
683
|
-
"South Africa",
|
|
684
|
-
"South Sudan",
|
|
685
|
-
"Sudan",
|
|
686
|
-
"Tanzania",
|
|
687
|
-
"Togo",
|
|
688
|
-
"Tunisia",
|
|
689
|
-
"Uganda",
|
|
690
|
-
"Zambia",
|
|
691
|
-
"Zimbabwe",
|
|
692
|
-
],
|
|
693
|
-
Americas: [
|
|
694
|
-
"Anguilla",
|
|
695
|
-
"Antigua and Barbuda",
|
|
696
|
-
"Argentina",
|
|
697
|
-
"Aruba",
|
|
698
|
-
"Bahamas",
|
|
699
|
-
"Barbados",
|
|
700
|
-
"Belize",
|
|
701
|
-
"Bermuda",
|
|
702
|
-
"Bolivia",
|
|
703
|
-
"Brazil",
|
|
704
|
-
"British Virgin Islands",
|
|
705
|
-
"Canada",
|
|
706
|
-
"Cayman Islands",
|
|
707
|
-
"Chile",
|
|
708
|
-
"Colombia",
|
|
709
|
-
"Costa Rica",
|
|
710
|
-
"Cuba",
|
|
711
|
-
"Curacao",
|
|
712
|
-
"Dominica",
|
|
713
|
-
"Dominican Republic",
|
|
714
|
-
"Ecuador",
|
|
715
|
-
"El Salvador",
|
|
716
|
-
"Falkland Islands",
|
|
717
|
-
"French Guiana",
|
|
718
|
-
"Grenada",
|
|
719
|
-
"Guadeloupe",
|
|
720
|
-
"Guatemala",
|
|
721
|
-
"Guyana",
|
|
722
|
-
"Haiti",
|
|
723
|
-
"Honduras",
|
|
724
|
-
"Jamaica",
|
|
725
|
-
"Martinique",
|
|
726
|
-
"Mexico",
|
|
727
|
-
"Montserrat",
|
|
728
|
-
"Nicaragua",
|
|
729
|
-
"Panama",
|
|
730
|
-
"Paraguay",
|
|
731
|
-
"Peru",
|
|
732
|
-
"Puerto Rico",
|
|
733
|
-
"Saint Kitts and Nevis",
|
|
734
|
-
"Saint Lucia",
|
|
735
|
-
"Saint Vincent and the Grenadines",
|
|
736
|
-
"Suriname",
|
|
737
|
-
"Trinidad and Tobago",
|
|
738
|
-
"Turks and Caicos Islands",
|
|
739
|
-
"United States",
|
|
740
|
-
"United States Virgin Islands",
|
|
741
|
-
"Uruguay",
|
|
742
|
-
"Venezuela",
|
|
743
|
-
],
|
|
744
|
-
Antarctica: ["French Southern And Antarctic Lands"],
|
|
745
|
-
Asia: [
|
|
746
|
-
"Afghanistan",
|
|
747
|
-
"Armenia",
|
|
748
|
-
"Azerbaijan",
|
|
749
|
-
"Bahrain",
|
|
750
|
-
"Bangladesh",
|
|
751
|
-
"Bhutan",
|
|
752
|
-
"Brunei Darussalam",
|
|
753
|
-
"Cambodia",
|
|
754
|
-
"China",
|
|
755
|
-
"East Timor",
|
|
756
|
-
"Georgia",
|
|
757
|
-
"Hong Kong",
|
|
758
|
-
"India",
|
|
759
|
-
"Indonesia",
|
|
760
|
-
"Iran",
|
|
761
|
-
"Iraq",
|
|
762
|
-
"Israel",
|
|
763
|
-
"Japan",
|
|
764
|
-
"Jordan",
|
|
765
|
-
"Kazakhstan",
|
|
766
|
-
"Kuwait",
|
|
767
|
-
"Kyrgyzstan",
|
|
768
|
-
"Laos",
|
|
769
|
-
"Lebanon",
|
|
770
|
-
"Macao",
|
|
771
|
-
"Malaysia",
|
|
772
|
-
"Maldives",
|
|
773
|
-
"Mongolia",
|
|
774
|
-
"Myanmar",
|
|
775
|
-
"Nepal",
|
|
776
|
-
"Palestine",
|
|
777
|
-
"Oman",
|
|
778
|
-
"Pakistan",
|
|
779
|
-
"Palestinian Territories",
|
|
780
|
-
"Philippines",
|
|
781
|
-
"Qatar",
|
|
782
|
-
"Russia",
|
|
783
|
-
"Saudi Arabia",
|
|
784
|
-
"Singapore",
|
|
785
|
-
"South Korea",
|
|
786
|
-
"Sri Lanka",
|
|
787
|
-
"Syria",
|
|
788
|
-
"Taiwan",
|
|
789
|
-
"Tajikistan",
|
|
790
|
-
"Turkey",
|
|
791
|
-
"Thailand",
|
|
792
|
-
"Turkmenistan",
|
|
793
|
-
"United Arab Emirates",
|
|
794
|
-
"Uzbekistan",
|
|
795
|
-
"Vietnam",
|
|
796
|
-
"Yemen",
|
|
797
|
-
],
|
|
798
|
-
Europe: [
|
|
799
|
-
"Albania",
|
|
800
|
-
"Andorra",
|
|
801
|
-
"Austria",
|
|
802
|
-
"Belarus",
|
|
803
|
-
"Belgium",
|
|
804
|
-
"Bosnia and Herzegovina",
|
|
805
|
-
"Bulgaria",
|
|
806
|
-
"Croatia",
|
|
807
|
-
"Cyprus",
|
|
808
|
-
"Czech Republic",
|
|
809
|
-
"Denmark",
|
|
810
|
-
"Estonia",
|
|
811
|
-
"Faroe Islands",
|
|
812
|
-
"Finland",
|
|
813
|
-
"France",
|
|
814
|
-
"Germany",
|
|
815
|
-
"Gibraltar",
|
|
816
|
-
"Greece",
|
|
817
|
-
"Guernsey",
|
|
818
|
-
"Hungary",
|
|
819
|
-
"Iceland",
|
|
820
|
-
"Ireland",
|
|
821
|
-
"Isle of Man",
|
|
822
|
-
"Italy",
|
|
823
|
-
"Jersey",
|
|
824
|
-
"Latvia",
|
|
825
|
-
"Liechtenstein",
|
|
826
|
-
"Lithuania",
|
|
827
|
-
"Luxembourg",
|
|
828
|
-
"Malta",
|
|
829
|
-
"Moldova",
|
|
830
|
-
"Monaco",
|
|
831
|
-
"Montenegro",
|
|
832
|
-
"Netherlands",
|
|
833
|
-
"Macedonia",
|
|
834
|
-
"Norway",
|
|
835
|
-
"Poland",
|
|
836
|
-
"Portugal",
|
|
837
|
-
"Romania",
|
|
838
|
-
"San Marino",
|
|
839
|
-
"Serbia",
|
|
840
|
-
"Slovakia",
|
|
841
|
-
"Slovenia",
|
|
842
|
-
"Spain",
|
|
843
|
-
"Sweden",
|
|
844
|
-
"Switzerland",
|
|
845
|
-
"Ukraine",
|
|
846
|
-
"United Kingdom",
|
|
847
|
-
"Vatican City",
|
|
848
|
-
],
|
|
849
|
-
Oceania: [
|
|
850
|
-
"American Samoa",
|
|
851
|
-
"Australia",
|
|
852
|
-
"Cook Islands",
|
|
853
|
-
"Fiji",
|
|
854
|
-
"French Polynesia",
|
|
855
|
-
"Guam",
|
|
856
|
-
"Kiribati",
|
|
857
|
-
"Marshall Islands",
|
|
858
|
-
"Micronesia",
|
|
859
|
-
"Nauru",
|
|
860
|
-
"New Caledonia",
|
|
861
|
-
"New Zealand",
|
|
862
|
-
"Niue",
|
|
863
|
-
"Northern Mariana Islands",
|
|
864
|
-
"Palau",
|
|
865
|
-
"Papua New Guinea",
|
|
866
|
-
"Samoa",
|
|
867
|
-
"Solomon Islands",
|
|
868
|
-
"Tokelau",
|
|
869
|
-
"Tonga",
|
|
870
|
-
"Tuvalu",
|
|
871
|
-
"Vanuatu",
|
|
872
|
-
"Wallis and Futuna",
|
|
873
|
-
],
|
|
874
|
-
};
|
|
875
|
-
|
|
876
|
-
var util;
|
|
877
|
-
(function (util) {
|
|
878
|
-
util.assertEqual = (val) => val;
|
|
879
|
-
function assertIs(_arg) { }
|
|
880
|
-
util.assertIs = assertIs;
|
|
881
|
-
function assertNever(_x) {
|
|
882
|
-
throw new Error();
|
|
883
|
-
}
|
|
884
|
-
util.assertNever = assertNever;
|
|
885
|
-
util.arrayToEnum = (items) => {
|
|
886
|
-
const obj = {};
|
|
887
|
-
for (const item of items) {
|
|
888
|
-
obj[item] = item;
|
|
889
|
-
}
|
|
890
|
-
return obj;
|
|
891
|
-
};
|
|
892
|
-
util.getValidEnumValues = (obj) => {
|
|
893
|
-
const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
|
|
894
|
-
const filtered = {};
|
|
895
|
-
for (const k of validKeys) {
|
|
896
|
-
filtered[k] = obj[k];
|
|
897
|
-
}
|
|
898
|
-
return util.objectValues(filtered);
|
|
899
|
-
};
|
|
900
|
-
util.objectValues = (obj) => {
|
|
901
|
-
return util.objectKeys(obj).map(function (e) {
|
|
902
|
-
return obj[e];
|
|
903
|
-
});
|
|
904
|
-
};
|
|
905
|
-
util.objectKeys = typeof Object.keys === "function" // eslint-disable-line ban/ban
|
|
906
|
-
? (obj) => Object.keys(obj) // eslint-disable-line ban/ban
|
|
907
|
-
: (object) => {
|
|
908
|
-
const keys = [];
|
|
909
|
-
for (const key in object) {
|
|
910
|
-
if (Object.prototype.hasOwnProperty.call(object, key)) {
|
|
911
|
-
keys.push(key);
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
return keys;
|
|
915
|
-
};
|
|
916
|
-
util.find = (arr, checker) => {
|
|
917
|
-
for (const item of arr) {
|
|
918
|
-
if (checker(item))
|
|
919
|
-
return item;
|
|
920
|
-
}
|
|
921
|
-
return undefined;
|
|
922
|
-
};
|
|
923
|
-
util.isInteger = typeof Number.isInteger === "function"
|
|
924
|
-
? (val) => Number.isInteger(val) // eslint-disable-line ban/ban
|
|
925
|
-
: (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
|
|
926
|
-
function joinValues(array, separator = " | ") {
|
|
927
|
-
return array
|
|
928
|
-
.map((val) => (typeof val === "string" ? `'${val}'` : val))
|
|
929
|
-
.join(separator);
|
|
930
|
-
}
|
|
931
|
-
util.joinValues = joinValues;
|
|
932
|
-
util.jsonStringifyReplacer = (_, value) => {
|
|
933
|
-
if (typeof value === "bigint") {
|
|
934
|
-
return value.toString();
|
|
935
|
-
}
|
|
936
|
-
return value;
|
|
937
|
-
};
|
|
938
|
-
})(util || (util = {}));
|
|
939
|
-
var objectUtil;
|
|
940
|
-
(function (objectUtil) {
|
|
941
|
-
objectUtil.mergeShapes = (first, second) => {
|
|
942
|
-
return {
|
|
943
|
-
...first,
|
|
944
|
-
...second, // second overwrites first
|
|
945
|
-
};
|
|
946
|
-
};
|
|
947
|
-
})(objectUtil || (objectUtil = {}));
|
|
948
|
-
const ZodParsedType = util.arrayToEnum([
|
|
949
|
-
"string",
|
|
950
|
-
"nan",
|
|
951
|
-
"number",
|
|
952
|
-
"integer",
|
|
953
|
-
"float",
|
|
954
|
-
"boolean",
|
|
955
|
-
"date",
|
|
956
|
-
"bigint",
|
|
957
|
-
"symbol",
|
|
958
|
-
"function",
|
|
959
|
-
"undefined",
|
|
960
|
-
"null",
|
|
961
|
-
"array",
|
|
962
|
-
"object",
|
|
963
|
-
"unknown",
|
|
964
|
-
"promise",
|
|
965
|
-
"void",
|
|
966
|
-
"never",
|
|
967
|
-
"map",
|
|
968
|
-
"set",
|
|
969
|
-
]);
|
|
970
|
-
const getParsedType = (data) => {
|
|
971
|
-
const t = typeof data;
|
|
972
|
-
switch (t) {
|
|
973
|
-
case "undefined":
|
|
974
|
-
return ZodParsedType.undefined;
|
|
975
|
-
case "string":
|
|
976
|
-
return ZodParsedType.string;
|
|
977
|
-
case "number":
|
|
978
|
-
return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
|
|
979
|
-
case "boolean":
|
|
980
|
-
return ZodParsedType.boolean;
|
|
981
|
-
case "function":
|
|
982
|
-
return ZodParsedType.function;
|
|
983
|
-
case "bigint":
|
|
984
|
-
return ZodParsedType.bigint;
|
|
985
|
-
case "symbol":
|
|
986
|
-
return ZodParsedType.symbol;
|
|
987
|
-
case "object":
|
|
988
|
-
if (Array.isArray(data)) {
|
|
989
|
-
return ZodParsedType.array;
|
|
990
|
-
}
|
|
991
|
-
if (data === null) {
|
|
992
|
-
return ZodParsedType.null;
|
|
993
|
-
}
|
|
994
|
-
if (data.then &&
|
|
995
|
-
typeof data.then === "function" &&
|
|
996
|
-
data.catch &&
|
|
997
|
-
typeof data.catch === "function") {
|
|
998
|
-
return ZodParsedType.promise;
|
|
999
|
-
}
|
|
1000
|
-
if (typeof Map !== "undefined" && data instanceof Map) {
|
|
1001
|
-
return ZodParsedType.map;
|
|
1002
|
-
}
|
|
1003
|
-
if (typeof Set !== "undefined" && data instanceof Set) {
|
|
1004
|
-
return ZodParsedType.set;
|
|
1005
|
-
}
|
|
1006
|
-
if (typeof Date !== "undefined" && data instanceof Date) {
|
|
1007
|
-
return ZodParsedType.date;
|
|
1008
|
-
}
|
|
1009
|
-
return ZodParsedType.object;
|
|
1010
|
-
default:
|
|
1011
|
-
return ZodParsedType.unknown;
|
|
1012
|
-
}
|
|
1013
|
-
};
|
|
1014
|
-
|
|
1015
|
-
const ZodIssueCode = util.arrayToEnum([
|
|
1016
|
-
"invalid_type",
|
|
1017
|
-
"invalid_literal",
|
|
1018
|
-
"custom",
|
|
1019
|
-
"invalid_union",
|
|
1020
|
-
"invalid_union_discriminator",
|
|
1021
|
-
"invalid_enum_value",
|
|
1022
|
-
"unrecognized_keys",
|
|
1023
|
-
"invalid_arguments",
|
|
1024
|
-
"invalid_return_type",
|
|
1025
|
-
"invalid_date",
|
|
1026
|
-
"invalid_string",
|
|
1027
|
-
"too_small",
|
|
1028
|
-
"too_big",
|
|
1029
|
-
"invalid_intersection_types",
|
|
1030
|
-
"not_multiple_of",
|
|
1031
|
-
"not_finite",
|
|
1032
|
-
]);
|
|
1033
|
-
const quotelessJson = (obj) => {
|
|
1034
|
-
const json = JSON.stringify(obj, null, 2);
|
|
1035
|
-
return json.replace(/"([^"]+)":/g, "$1:");
|
|
1036
|
-
};
|
|
1037
|
-
class ZodError extends Error {
|
|
1038
|
-
get errors() {
|
|
1039
|
-
return this.issues;
|
|
1040
|
-
}
|
|
1041
|
-
constructor(issues) {
|
|
1042
|
-
super();
|
|
1043
|
-
this.issues = [];
|
|
1044
|
-
this.addIssue = (sub) => {
|
|
1045
|
-
this.issues = [...this.issues, sub];
|
|
1046
|
-
};
|
|
1047
|
-
this.addIssues = (subs = []) => {
|
|
1048
|
-
this.issues = [...this.issues, ...subs];
|
|
1049
|
-
};
|
|
1050
|
-
const actualProto = new.target.prototype;
|
|
1051
|
-
if (Object.setPrototypeOf) {
|
|
1052
|
-
// eslint-disable-next-line ban/ban
|
|
1053
|
-
Object.setPrototypeOf(this, actualProto);
|
|
1054
|
-
}
|
|
1055
|
-
else {
|
|
1056
|
-
this.__proto__ = actualProto;
|
|
1057
|
-
}
|
|
1058
|
-
this.name = "ZodError";
|
|
1059
|
-
this.issues = issues;
|
|
1060
|
-
}
|
|
1061
|
-
format(_mapper) {
|
|
1062
|
-
const mapper = _mapper ||
|
|
1063
|
-
function (issue) {
|
|
1064
|
-
return issue.message;
|
|
1065
|
-
};
|
|
1066
|
-
const fieldErrors = { _errors: [] };
|
|
1067
|
-
const processError = (error) => {
|
|
1068
|
-
for (const issue of error.issues) {
|
|
1069
|
-
if (issue.code === "invalid_union") {
|
|
1070
|
-
issue.unionErrors.map(processError);
|
|
1071
|
-
}
|
|
1072
|
-
else if (issue.code === "invalid_return_type") {
|
|
1073
|
-
processError(issue.returnTypeError);
|
|
1074
|
-
}
|
|
1075
|
-
else if (issue.code === "invalid_arguments") {
|
|
1076
|
-
processError(issue.argumentsError);
|
|
1077
|
-
}
|
|
1078
|
-
else if (issue.path.length === 0) {
|
|
1079
|
-
fieldErrors._errors.push(mapper(issue));
|
|
1080
|
-
}
|
|
1081
|
-
else {
|
|
1082
|
-
let curr = fieldErrors;
|
|
1083
|
-
let i = 0;
|
|
1084
|
-
while (i < issue.path.length) {
|
|
1085
|
-
const el = issue.path[i];
|
|
1086
|
-
const terminal = i === issue.path.length - 1;
|
|
1087
|
-
if (!terminal) {
|
|
1088
|
-
curr[el] = curr[el] || { _errors: [] };
|
|
1089
|
-
// if (typeof el === "string") {
|
|
1090
|
-
// curr[el] = curr[el] || { _errors: [] };
|
|
1091
|
-
// } else if (typeof el === "number") {
|
|
1092
|
-
// const errorArray: any = [];
|
|
1093
|
-
// errorArray._errors = [];
|
|
1094
|
-
// curr[el] = curr[el] || errorArray;
|
|
1095
|
-
// }
|
|
1096
|
-
}
|
|
1097
|
-
else {
|
|
1098
|
-
curr[el] = curr[el] || { _errors: [] };
|
|
1099
|
-
curr[el]._errors.push(mapper(issue));
|
|
1100
|
-
}
|
|
1101
|
-
curr = curr[el];
|
|
1102
|
-
i++;
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
};
|
|
1107
|
-
processError(this);
|
|
1108
|
-
return fieldErrors;
|
|
1109
|
-
}
|
|
1110
|
-
static assert(value) {
|
|
1111
|
-
if (!(value instanceof ZodError)) {
|
|
1112
|
-
throw new Error(`Not a ZodError: ${value}`);
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
toString() {
|
|
1116
|
-
return this.message;
|
|
1117
|
-
}
|
|
1118
|
-
get message() {
|
|
1119
|
-
return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);
|
|
1120
|
-
}
|
|
1121
|
-
get isEmpty() {
|
|
1122
|
-
return this.issues.length === 0;
|
|
1123
|
-
}
|
|
1124
|
-
flatten(mapper = (issue) => issue.message) {
|
|
1125
|
-
const fieldErrors = {};
|
|
1126
|
-
const formErrors = [];
|
|
1127
|
-
for (const sub of this.issues) {
|
|
1128
|
-
if (sub.path.length > 0) {
|
|
1129
|
-
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
1130
|
-
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
1131
|
-
}
|
|
1132
|
-
else {
|
|
1133
|
-
formErrors.push(mapper(sub));
|
|
1134
|
-
}
|
|
1135
|
-
}
|
|
1136
|
-
return { formErrors, fieldErrors };
|
|
1137
|
-
}
|
|
1138
|
-
get formErrors() {
|
|
1139
|
-
return this.flatten();
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
ZodError.create = (issues) => {
|
|
1143
|
-
const error = new ZodError(issues);
|
|
1144
|
-
return error;
|
|
1145
|
-
};
|
|
1146
|
-
|
|
1147
|
-
const errorMap = (issue, _ctx) => {
|
|
1148
|
-
let message;
|
|
1149
|
-
switch (issue.code) {
|
|
1150
|
-
case ZodIssueCode.invalid_type:
|
|
1151
|
-
if (issue.received === ZodParsedType.undefined) {
|
|
1152
|
-
message = "Required";
|
|
1153
|
-
}
|
|
1154
|
-
else {
|
|
1155
|
-
message = `Expected ${issue.expected}, received ${issue.received}`;
|
|
1156
|
-
}
|
|
1157
|
-
break;
|
|
1158
|
-
case ZodIssueCode.invalid_literal:
|
|
1159
|
-
message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;
|
|
1160
|
-
break;
|
|
1161
|
-
case ZodIssueCode.unrecognized_keys:
|
|
1162
|
-
message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`;
|
|
1163
|
-
break;
|
|
1164
|
-
case ZodIssueCode.invalid_union:
|
|
1165
|
-
message = `Invalid input`;
|
|
1166
|
-
break;
|
|
1167
|
-
case ZodIssueCode.invalid_union_discriminator:
|
|
1168
|
-
message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;
|
|
1169
|
-
break;
|
|
1170
|
-
case ZodIssueCode.invalid_enum_value:
|
|
1171
|
-
message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;
|
|
1172
|
-
break;
|
|
1173
|
-
case ZodIssueCode.invalid_arguments:
|
|
1174
|
-
message = `Invalid function arguments`;
|
|
1175
|
-
break;
|
|
1176
|
-
case ZodIssueCode.invalid_return_type:
|
|
1177
|
-
message = `Invalid function return type`;
|
|
1178
|
-
break;
|
|
1179
|
-
case ZodIssueCode.invalid_date:
|
|
1180
|
-
message = `Invalid date`;
|
|
1181
|
-
break;
|
|
1182
|
-
case ZodIssueCode.invalid_string:
|
|
1183
|
-
if (typeof issue.validation === "object") {
|
|
1184
|
-
if ("includes" in issue.validation) {
|
|
1185
|
-
message = `Invalid input: must include "${issue.validation.includes}"`;
|
|
1186
|
-
if (typeof issue.validation.position === "number") {
|
|
1187
|
-
message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
else if ("startsWith" in issue.validation) {
|
|
1191
|
-
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
|
|
1192
|
-
}
|
|
1193
|
-
else if ("endsWith" in issue.validation) {
|
|
1194
|
-
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
|
|
1195
|
-
}
|
|
1196
|
-
else {
|
|
1197
|
-
util.assertNever(issue.validation);
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
else if (issue.validation !== "regex") {
|
|
1201
|
-
message = `Invalid ${issue.validation}`;
|
|
1202
|
-
}
|
|
1203
|
-
else {
|
|
1204
|
-
message = "Invalid";
|
|
1205
|
-
}
|
|
1206
|
-
break;
|
|
1207
|
-
case ZodIssueCode.too_small:
|
|
1208
|
-
if (issue.type === "array")
|
|
1209
|
-
message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
|
|
1210
|
-
else if (issue.type === "string")
|
|
1211
|
-
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
1212
|
-
else if (issue.type === "number")
|
|
1213
|
-
message = `Number must be ${issue.exact
|
|
1214
|
-
? `exactly equal to `
|
|
1215
|
-
: issue.inclusive
|
|
1216
|
-
? `greater than or equal to `
|
|
1217
|
-
: `greater than `}${issue.minimum}`;
|
|
1218
|
-
else if (issue.type === "date")
|
|
1219
|
-
message = `Date must be ${issue.exact
|
|
1220
|
-
? `exactly equal to `
|
|
1221
|
-
: issue.inclusive
|
|
1222
|
-
? `greater than or equal to `
|
|
1223
|
-
: `greater than `}${new Date(Number(issue.minimum))}`;
|
|
1224
|
-
else
|
|
1225
|
-
message = "Invalid input";
|
|
1226
|
-
break;
|
|
1227
|
-
case ZodIssueCode.too_big:
|
|
1228
|
-
if (issue.type === "array")
|
|
1229
|
-
message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
|
|
1230
|
-
else if (issue.type === "string")
|
|
1231
|
-
message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
|
|
1232
|
-
else if (issue.type === "number")
|
|
1233
|
-
message = `Number must be ${issue.exact
|
|
1234
|
-
? `exactly`
|
|
1235
|
-
: issue.inclusive
|
|
1236
|
-
? `less than or equal to`
|
|
1237
|
-
: `less than`} ${issue.maximum}`;
|
|
1238
|
-
else if (issue.type === "bigint")
|
|
1239
|
-
message = `BigInt must be ${issue.exact
|
|
1240
|
-
? `exactly`
|
|
1241
|
-
: issue.inclusive
|
|
1242
|
-
? `less than or equal to`
|
|
1243
|
-
: `less than`} ${issue.maximum}`;
|
|
1244
|
-
else if (issue.type === "date")
|
|
1245
|
-
message = `Date must be ${issue.exact
|
|
1246
|
-
? `exactly`
|
|
1247
|
-
: issue.inclusive
|
|
1248
|
-
? `smaller than or equal to`
|
|
1249
|
-
: `smaller than`} ${new Date(Number(issue.maximum))}`;
|
|
1250
|
-
else
|
|
1251
|
-
message = "Invalid input";
|
|
1252
|
-
break;
|
|
1253
|
-
case ZodIssueCode.custom:
|
|
1254
|
-
message = `Invalid input`;
|
|
1255
|
-
break;
|
|
1256
|
-
case ZodIssueCode.invalid_intersection_types:
|
|
1257
|
-
message = `Intersection results could not be merged`;
|
|
1258
|
-
break;
|
|
1259
|
-
case ZodIssueCode.not_multiple_of:
|
|
1260
|
-
message = `Number must be a multiple of ${issue.multipleOf}`;
|
|
1261
|
-
break;
|
|
1262
|
-
case ZodIssueCode.not_finite:
|
|
1263
|
-
message = "Number must be finite";
|
|
1264
|
-
break;
|
|
1265
|
-
default:
|
|
1266
|
-
message = _ctx.defaultError;
|
|
1267
|
-
util.assertNever(issue);
|
|
1268
|
-
}
|
|
1269
|
-
return { message };
|
|
1270
|
-
};
|
|
1271
|
-
|
|
1272
|
-
let overrideErrorMap = errorMap;
|
|
1273
|
-
function setErrorMap(map) {
|
|
1274
|
-
overrideErrorMap = map;
|
|
1275
|
-
}
|
|
1276
|
-
function getErrorMap() {
|
|
1277
|
-
return overrideErrorMap;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
const makeIssue = (params) => {
|
|
1281
|
-
const { data, path, errorMaps, issueData } = params;
|
|
1282
|
-
const fullPath = [...path, ...(issueData.path || [])];
|
|
1283
|
-
const fullIssue = {
|
|
1284
|
-
...issueData,
|
|
1285
|
-
path: fullPath,
|
|
1286
|
-
};
|
|
1287
|
-
if (issueData.message !== undefined) {
|
|
1288
|
-
return {
|
|
1289
|
-
...issueData,
|
|
1290
|
-
path: fullPath,
|
|
1291
|
-
message: issueData.message,
|
|
1292
|
-
};
|
|
1293
|
-
}
|
|
1294
|
-
let errorMessage = "";
|
|
1295
|
-
const maps = errorMaps
|
|
1296
|
-
.filter((m) => !!m)
|
|
1297
|
-
.slice()
|
|
1298
|
-
.reverse();
|
|
1299
|
-
for (const map of maps) {
|
|
1300
|
-
errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
|
|
1301
|
-
}
|
|
1302
|
-
return {
|
|
1303
|
-
...issueData,
|
|
1304
|
-
path: fullPath,
|
|
1305
|
-
message: errorMessage,
|
|
1306
|
-
};
|
|
1307
|
-
};
|
|
1308
|
-
const EMPTY_PATH = [];
|
|
1309
|
-
function addIssueToContext(ctx, issueData) {
|
|
1310
|
-
const overrideMap = getErrorMap();
|
|
1311
|
-
const issue = makeIssue({
|
|
1312
|
-
issueData: issueData,
|
|
1313
|
-
data: ctx.data,
|
|
1314
|
-
path: ctx.path,
|
|
1315
|
-
errorMaps: [
|
|
1316
|
-
ctx.common.contextualErrorMap, // contextual error map is first priority
|
|
1317
|
-
ctx.schemaErrorMap, // then schema-bound map if available
|
|
1318
|
-
overrideMap, // then global override map
|
|
1319
|
-
overrideMap === errorMap ? undefined : errorMap, // then global default map
|
|
1320
|
-
].filter((x) => !!x),
|
|
1321
|
-
});
|
|
1322
|
-
ctx.common.issues.push(issue);
|
|
1323
|
-
}
|
|
1324
|
-
class ParseStatus {
|
|
1325
|
-
constructor() {
|
|
1326
|
-
this.value = "valid";
|
|
1327
|
-
}
|
|
1328
|
-
dirty() {
|
|
1329
|
-
if (this.value === "valid")
|
|
1330
|
-
this.value = "dirty";
|
|
1331
|
-
}
|
|
1332
|
-
abort() {
|
|
1333
|
-
if (this.value !== "aborted")
|
|
1334
|
-
this.value = "aborted";
|
|
1335
|
-
}
|
|
1336
|
-
static mergeArray(status, results) {
|
|
1337
|
-
const arrayValue = [];
|
|
1338
|
-
for (const s of results) {
|
|
1339
|
-
if (s.status === "aborted")
|
|
1340
|
-
return INVALID$3;
|
|
1341
|
-
if (s.status === "dirty")
|
|
1342
|
-
status.dirty();
|
|
1343
|
-
arrayValue.push(s.value);
|
|
1344
|
-
}
|
|
1345
|
-
return { status: status.value, value: arrayValue };
|
|
1346
|
-
}
|
|
1347
|
-
static async mergeObjectAsync(status, pairs) {
|
|
1348
|
-
const syncPairs = [];
|
|
1349
|
-
for (const pair of pairs) {
|
|
1350
|
-
const key = await pair.key;
|
|
1351
|
-
const value = await pair.value;
|
|
1352
|
-
syncPairs.push({
|
|
1353
|
-
key,
|
|
1354
|
-
value,
|
|
1355
|
-
});
|
|
1356
|
-
}
|
|
1357
|
-
return ParseStatus.mergeObjectSync(status, syncPairs);
|
|
1358
|
-
}
|
|
1359
|
-
static mergeObjectSync(status, pairs) {
|
|
1360
|
-
const finalObject = {};
|
|
1361
|
-
for (const pair of pairs) {
|
|
1362
|
-
const { key, value } = pair;
|
|
1363
|
-
if (key.status === "aborted")
|
|
1364
|
-
return INVALID$3;
|
|
1365
|
-
if (value.status === "aborted")
|
|
1366
|
-
return INVALID$3;
|
|
1367
|
-
if (key.status === "dirty")
|
|
1368
|
-
status.dirty();
|
|
1369
|
-
if (value.status === "dirty")
|
|
1370
|
-
status.dirty();
|
|
1371
|
-
if (key.value !== "__proto__" &&
|
|
1372
|
-
(typeof value.value !== "undefined" || pair.alwaysSet)) {
|
|
1373
|
-
finalObject[key.value] = value.value;
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
return { status: status.value, value: finalObject };
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
const INVALID$3 = Object.freeze({
|
|
1380
|
-
status: "aborted",
|
|
1381
|
-
});
|
|
1382
|
-
const DIRTY = (value) => ({ status: "dirty", value });
|
|
1383
|
-
const OK = (value) => ({ status: "valid", value });
|
|
1384
|
-
const isAborted = (x) => x.status === "aborted";
|
|
1385
|
-
const isDirty = (x) => x.status === "dirty";
|
|
1386
|
-
const isValid = (x) => x.status === "valid";
|
|
1387
|
-
const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
1388
|
-
|
|
1389
|
-
/******************************************************************************
|
|
1390
|
-
Copyright (c) Microsoft Corporation.
|
|
1391
|
-
|
|
1392
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1393
|
-
purpose with or without fee is hereby granted.
|
|
1394
|
-
|
|
1395
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1396
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1397
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1398
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1399
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1400
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1401
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1402
|
-
***************************************************************************** */
|
|
1403
|
-
|
|
1404
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
1405
|
-
if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1406
|
-
return state.get(receiver);
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
1410
|
-
if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
1411
|
-
return (state.set(receiver, value)), value;
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1415
|
-
var e = new Error(message);
|
|
1416
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1417
|
-
};
|
|
1418
|
-
|
|
1419
|
-
var errorUtil;
|
|
1420
|
-
(function (errorUtil) {
|
|
1421
|
-
errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
1422
|
-
errorUtil.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
|
|
1423
|
-
})(errorUtil || (errorUtil = {}));
|
|
1424
|
-
|
|
1425
|
-
var _ZodEnum_cache, _ZodNativeEnum_cache;
|
|
1426
|
-
class ParseInputLazyPath {
|
|
1427
|
-
constructor(parent, value, path, key) {
|
|
1428
|
-
this._cachedPath = [];
|
|
1429
|
-
this.parent = parent;
|
|
1430
|
-
this.data = value;
|
|
1431
|
-
this._path = path;
|
|
1432
|
-
this._key = key;
|
|
1433
|
-
}
|
|
1434
|
-
get path() {
|
|
1435
|
-
if (!this._cachedPath.length) {
|
|
1436
|
-
if (this._key instanceof Array) {
|
|
1437
|
-
this._cachedPath.push(...this._path, ...this._key);
|
|
1438
|
-
}
|
|
1439
|
-
else {
|
|
1440
|
-
this._cachedPath.push(...this._path, this._key);
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
return this._cachedPath;
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
const handleResult = (ctx, result) => {
|
|
1447
|
-
if (isValid(result)) {
|
|
1448
|
-
return { success: true, data: result.value };
|
|
1449
|
-
}
|
|
1450
|
-
else {
|
|
1451
|
-
if (!ctx.common.issues.length) {
|
|
1452
|
-
throw new Error("Validation failed but no issues detected.");
|
|
1453
|
-
}
|
|
1454
|
-
return {
|
|
1455
|
-
success: false,
|
|
1456
|
-
get error() {
|
|
1457
|
-
if (this._error)
|
|
1458
|
-
return this._error;
|
|
1459
|
-
const error = new ZodError(ctx.common.issues);
|
|
1460
|
-
this._error = error;
|
|
1461
|
-
return this._error;
|
|
1462
|
-
},
|
|
1463
|
-
};
|
|
1464
|
-
}
|
|
552
|
+
var _ZodEnum_cache, _ZodNativeEnum_cache;
|
|
553
|
+
class ParseInputLazyPath {
|
|
554
|
+
constructor(parent, value, path, key) {
|
|
555
|
+
this._cachedPath = [];
|
|
556
|
+
this.parent = parent;
|
|
557
|
+
this.data = value;
|
|
558
|
+
this._path = path;
|
|
559
|
+
this._key = key;
|
|
560
|
+
}
|
|
561
|
+
get path() {
|
|
562
|
+
if (!this._cachedPath.length) {
|
|
563
|
+
if (this._key instanceof Array) {
|
|
564
|
+
this._cachedPath.push(...this._path, ...this._key);
|
|
565
|
+
}
|
|
566
|
+
else {
|
|
567
|
+
this._cachedPath.push(...this._path, this._key);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
return this._cachedPath;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
const handleResult = (ctx, result) => {
|
|
574
|
+
if (isValid(result)) {
|
|
575
|
+
return { success: true, data: result.value };
|
|
576
|
+
}
|
|
577
|
+
else {
|
|
578
|
+
if (!ctx.common.issues.length) {
|
|
579
|
+
throw new Error("Validation failed but no issues detected.");
|
|
580
|
+
}
|
|
581
|
+
return {
|
|
582
|
+
success: false,
|
|
583
|
+
get error() {
|
|
584
|
+
if (this._error)
|
|
585
|
+
return this._error;
|
|
586
|
+
const error = new ZodError(ctx.common.issues);
|
|
587
|
+
this._error = error;
|
|
588
|
+
return this._error;
|
|
589
|
+
},
|
|
590
|
+
};
|
|
591
|
+
}
|
|
1465
592
|
};
|
|
1466
593
|
function processCreateParams(params) {
|
|
1467
594
|
if (!params)
|
|
@@ -5274,109 +4401,6 @@ var z = /*#__PURE__*/Object.freeze({
|
|
|
5274
4401
|
ZodError: ZodError
|
|
5275
4402
|
});
|
|
5276
4403
|
|
|
5277
|
-
const accountStatusSchema = z.enum([
|
|
5278
|
-
'pending_credentials_verification',
|
|
5279
|
-
'valid_credentials',
|
|
5280
|
-
'invalid_credentials',
|
|
5281
|
-
]);
|
|
5282
|
-
|
|
5283
|
-
// Enum definitions for fixed options
|
|
5284
|
-
const projectDurationEnum = z.enum(JOB_FILTER_OPTIONS.PROJECT_DURATION);
|
|
5285
|
-
const engagementTypeEnum = z.enum(JOB_FILTER_OPTIONS.ENGAGEMENT_TYPE);
|
|
5286
|
-
const vendorTypeEnum = z.enum(JOB_FILTER_OPTIONS.VENDOR_TYPE);
|
|
5287
|
-
const paymentTypeEnum = z.enum(JOB_FILTER_OPTIONS.PAYMENT_TYPE);
|
|
5288
|
-
const categoryEnum = z.enum(JOB_FILTER_OPTIONS.CATEGORIES);
|
|
5289
|
-
const clientIndustryEnum = z.enum(JOB_FILTER_OPTIONS.CLIENT_INDUSTRY);
|
|
5290
|
-
const clientSizeEnum = z.enum(JOB_FILTER_OPTIONS.CLIENT_SIZE);
|
|
5291
|
-
const talentTypeEnum = z.enum(JOB_FILTER_OPTIONS.TALENT_TYPE);
|
|
5292
|
-
const englishLevelEnum = z.enum(JOB_FILTER_OPTIONS.ENGLISH_LEVELS);
|
|
5293
|
-
const experienceLevelEnum = z.enum(JOB_FILTER_OPTIONS.EXPERIENCE_LEVELS);
|
|
5294
|
-
const regionEnum = z.enum(JOB_FILTER_OPTIONS.REGIONS);
|
|
5295
|
-
const requiredEarningsEnum = z.union([
|
|
5296
|
-
z.literal(100),
|
|
5297
|
-
z.literal(1000),
|
|
5298
|
-
z.literal(10000),
|
|
5299
|
-
]);
|
|
5300
|
-
const requiredJSSEnum = z.enum(JOB_FILTER_OPTIONS.REQUIRED_JSS);
|
|
5301
|
-
const isPaymentVerifiedEnum = z.enum(['all', 'true', 'false']);
|
|
5302
|
-
const isPhoneVerifiedEnum = z.enum(['all', 'true', 'false']);
|
|
5303
|
-
const hasQuestionsEnum = z.enum(['all', 'yes', 'no']);
|
|
5304
|
-
const searchQueryModeEnum = z.enum(['builder', 'custom']);
|
|
5305
|
-
// Main job filters schema
|
|
5306
|
-
const jobFiltersSchema = z.object({
|
|
5307
|
-
keywords: z
|
|
5308
|
-
.object({
|
|
5309
|
-
includes: z.string().nullable(),
|
|
5310
|
-
excludes: z.string().nullable(),
|
|
5311
|
-
})
|
|
5312
|
-
.nullable(),
|
|
5313
|
-
searchQuery: z.string().nullable(),
|
|
5314
|
-
searchQueryMode: searchQueryModeEnum.nullable().optional(),
|
|
5315
|
-
isFeatured: z.enum(['all', 'true', 'false']).nullable(),
|
|
5316
|
-
regions: z.array(regionEnum).nullable(),
|
|
5317
|
-
categories: z
|
|
5318
|
-
.object({
|
|
5319
|
-
includes: z.array(categoryEnum).nullable(),
|
|
5320
|
-
excludes: z.array(categoryEnum).nullable(),
|
|
5321
|
-
})
|
|
5322
|
-
.nullable(),
|
|
5323
|
-
payment: z
|
|
5324
|
-
.object({
|
|
5325
|
-
paymentType: z.array(paymentTypeEnum).nullable(),
|
|
5326
|
-
minFixedPrice: z.number().nullable(),
|
|
5327
|
-
maxFixedPrice: z.number().nullable(),
|
|
5328
|
-
minHourlyRate: z.number().nullable(),
|
|
5329
|
-
maxHourlyRate: z.number().nullable(),
|
|
5330
|
-
})
|
|
5331
|
-
.nullable(),
|
|
5332
|
-
projectDuration: z.array(projectDurationEnum).nullable(),
|
|
5333
|
-
experienceLevel: z.array(experienceLevelEnum).nullable(),
|
|
5334
|
-
questions: z
|
|
5335
|
-
.object({
|
|
5336
|
-
hasQuestions: z.array(hasQuestionsEnum),
|
|
5337
|
-
})
|
|
5338
|
-
.nullable(),
|
|
5339
|
-
engagementType: z.array(engagementTypeEnum).nullable(),
|
|
5340
|
-
clientInfo: z
|
|
5341
|
-
.object({
|
|
5342
|
-
isPaymentVerified: isPaymentVerifiedEnum.default('all'),
|
|
5343
|
-
isPhoneVerified: isPhoneVerifiedEnum.default('all'),
|
|
5344
|
-
enterpriseClient: z.enum(['all', 'true', 'false']).default('all'),
|
|
5345
|
-
clientLocationIncludes: z.array(z.string()).nullable(),
|
|
5346
|
-
clientLocationExcludes: z.array(z.string()).nullable(),
|
|
5347
|
-
minReviewScore: z.number().min(0).max(5).nullable(),
|
|
5348
|
-
maxReviewScore: z.number().min(0).max(5).nullable(),
|
|
5349
|
-
minTotalSpent: z.number().min(0).nullable(),
|
|
5350
|
-
maxTotalSpent: z.number().min(0).nullable(),
|
|
5351
|
-
minHireRate: z.number().min(0).max(100).nullable(),
|
|
5352
|
-
maxHireRate: z.number().min(0).max(100).nullable(),
|
|
5353
|
-
clientIndustry: z.array(clientIndustryEnum).nullable(),
|
|
5354
|
-
companySize: z.array(clientSizeEnum).nullable(),
|
|
5355
|
-
minJobsPosted: z.number().nullable(),
|
|
5356
|
-
minAvgHourlyRate: z.number().nullable(),
|
|
5357
|
-
maxAvgHourlyRate: z.number().nullable(),
|
|
5358
|
-
minNumReviews: z.number().nullable(),
|
|
5359
|
-
memberSinceFrom: z.string().date().nullable(),
|
|
5360
|
-
memberSinceTo: z.string().date().nullable(),
|
|
5361
|
-
})
|
|
5362
|
-
.nullable(),
|
|
5363
|
-
includeClientsWithZeroReviews: z.boolean().nullable(),
|
|
5364
|
-
includeClientsWithLessThanXPostedJobs: z.number().nullable(),
|
|
5365
|
-
totalSpentIncludeClientsWithLessThanXPostedJobs: z.number().nullable(),
|
|
5366
|
-
averageHourlyRateIncludeClientsWithLessThanXPostedJobs: z.number().nullable(),
|
|
5367
|
-
vendorQualifications: z
|
|
5368
|
-
.object({
|
|
5369
|
-
locationIncludes: z.array(z.string()).nullable(),
|
|
5370
|
-
locationExcludes: z.array(z.string()).nullable(),
|
|
5371
|
-
talentTypes: z.array(talentTypeEnum).nullable(),
|
|
5372
|
-
englishLevels: z.array(englishLevelEnum).nullable(),
|
|
5373
|
-
includeRisingTalent: z.string().nullable(),
|
|
5374
|
-
requiredEarnings: requiredEarningsEnum.nullable(),
|
|
5375
|
-
requiredJSS: z.array(requiredJSSEnum).nullable(),
|
|
5376
|
-
})
|
|
5377
|
-
.nullable(),
|
|
5378
|
-
});
|
|
5379
|
-
|
|
5380
4404
|
const booleanSchema = z
|
|
5381
4405
|
.union([z.boolean(), z.literal('true'), z.literal('false')])
|
|
5382
4406
|
.transform((value) => value === true || value === 'true');
|
|
@@ -5684,6 +4708,389 @@ const nuxtStateJobSchema = objectType({
|
|
|
5684
4708
|
talentFeePromotion: booleanType().nullish(),
|
|
5685
4709
|
});
|
|
5686
4710
|
|
|
4711
|
+
const JOB_FILTER_OPTIONS = {
|
|
4712
|
+
REGIONS: ['Worldwide', 'USOnly', 'UKOnly', 'All'],
|
|
4713
|
+
PROJECT_DURATION: [
|
|
4714
|
+
'Less than 1 month',
|
|
4715
|
+
'1 to 3 months',
|
|
4716
|
+
'3 to 6 months',
|
|
4717
|
+
'More than 6 months',
|
|
4718
|
+
'Unspecified',
|
|
4719
|
+
],
|
|
4720
|
+
ENGAGEMENT_TYPE: [
|
|
4721
|
+
'Less than 30 hrs/week',
|
|
4722
|
+
'More than 30 hrs/week',
|
|
4723
|
+
'Unspecified',
|
|
4724
|
+
],
|
|
4725
|
+
VENDOR_TYPE: ['Independent', 'Agency', 'Unspecified'],
|
|
4726
|
+
PAYMENT_TYPE: ['Unspecified', 'Hourly', 'Fixed-price'],
|
|
4727
|
+
TALENT_TYPE: ['Agency', 'Independent', 'Unspecified'],
|
|
4728
|
+
ENGLISH_LEVELS: [
|
|
4729
|
+
'Fluent',
|
|
4730
|
+
'Conversational',
|
|
4731
|
+
'Native or Bilingual',
|
|
4732
|
+
'Unspecified',
|
|
4733
|
+
],
|
|
4734
|
+
EXPERIENCE_LEVELS: ['Entry level', 'Intermediate', 'Expert'],
|
|
4735
|
+
REQUIRED_EARNINGS: [100, 1000, 10000],
|
|
4736
|
+
REQUIRED_JSS: ['>80%', '>90%', '100%', 'RT'],
|
|
4737
|
+
HIERARCHICAL_CATEGORIES: [
|
|
4738
|
+
{
|
|
4739
|
+
label: 'Accounting & Consulting',
|
|
4740
|
+
value: 'accounting-consulting',
|
|
4741
|
+
children: [
|
|
4742
|
+
'Accounting & Bookkeeping',
|
|
4743
|
+
'Financial Planning',
|
|
4744
|
+
'Management Consulting & Analysis',
|
|
4745
|
+
'Other - Accounting & Consulting',
|
|
4746
|
+
'Personal & Professional Coaching',
|
|
4747
|
+
'Recruiting & Human Resources',
|
|
4748
|
+
],
|
|
4749
|
+
},
|
|
4750
|
+
{
|
|
4751
|
+
label: 'Admin Support',
|
|
4752
|
+
value: 'admin-support',
|
|
4753
|
+
children: [
|
|
4754
|
+
'Data Entry & Transcription Services',
|
|
4755
|
+
'Market Research & Product Reviews',
|
|
4756
|
+
'Project Management',
|
|
4757
|
+
'Virtual Assistance',
|
|
4758
|
+
],
|
|
4759
|
+
},
|
|
4760
|
+
{
|
|
4761
|
+
label: 'Customer Service',
|
|
4762
|
+
value: 'customer-service',
|
|
4763
|
+
children: [
|
|
4764
|
+
'Community Management & Tagging',
|
|
4765
|
+
'Customer Service & Tech Support',
|
|
4766
|
+
],
|
|
4767
|
+
},
|
|
4768
|
+
{
|
|
4769
|
+
label: 'Data Science & Analytics',
|
|
4770
|
+
value: 'data-science-analytics',
|
|
4771
|
+
children: [
|
|
4772
|
+
'AI & Machine Learning',
|
|
4773
|
+
'Data Analysis & Testing',
|
|
4774
|
+
'Data Extraction/ETL',
|
|
4775
|
+
'Data Mining & Management',
|
|
4776
|
+
],
|
|
4777
|
+
},
|
|
4778
|
+
{
|
|
4779
|
+
label: 'Design & Creative',
|
|
4780
|
+
value: 'design-creative',
|
|
4781
|
+
children: [
|
|
4782
|
+
'Art & Illustration',
|
|
4783
|
+
'Audio & Music Production',
|
|
4784
|
+
'Branding & Logo Design',
|
|
4785
|
+
'Graphic, Editorial & Presentation Design',
|
|
4786
|
+
'NFT, AR/VR & Game Art',
|
|
4787
|
+
'Performing Arts',
|
|
4788
|
+
'Photography',
|
|
4789
|
+
'Product Design',
|
|
4790
|
+
'Video & Animation',
|
|
4791
|
+
],
|
|
4792
|
+
},
|
|
4793
|
+
{
|
|
4794
|
+
label: 'Engineering & Architecture',
|
|
4795
|
+
value: 'engineering-architecture',
|
|
4796
|
+
children: [
|
|
4797
|
+
'3D Modeling & CAD',
|
|
4798
|
+
'Building & Landscape Architecture',
|
|
4799
|
+
'Chemical Engineering',
|
|
4800
|
+
'Civil & Structural Engineering',
|
|
4801
|
+
'Contract Manufacturing',
|
|
4802
|
+
'Electrical & Electronic Engineering',
|
|
4803
|
+
'Energy & Mechanical Engineering',
|
|
4804
|
+
],
|
|
4805
|
+
},
|
|
4806
|
+
{
|
|
4807
|
+
label: 'IT & Networking',
|
|
4808
|
+
value: 'it-networking',
|
|
4809
|
+
children: [
|
|
4810
|
+
'Database Management & Administration',
|
|
4811
|
+
'DevOps & Solution Architecture',
|
|
4812
|
+
'ERP/CRM Software',
|
|
4813
|
+
'Information Security & Compliance',
|
|
4814
|
+
'Network & System Administration',
|
|
4815
|
+
],
|
|
4816
|
+
},
|
|
4817
|
+
{
|
|
4818
|
+
label: 'Legal',
|
|
4819
|
+
value: 'legal',
|
|
4820
|
+
children: [
|
|
4821
|
+
'Corporate & Contract Law',
|
|
4822
|
+
'Finance & Tax Law',
|
|
4823
|
+
'International & Immigration Law',
|
|
4824
|
+
'Public Law',
|
|
4825
|
+
],
|
|
4826
|
+
},
|
|
4827
|
+
{
|
|
4828
|
+
label: 'Sales & Marketing',
|
|
4829
|
+
value: 'sales-marketing',
|
|
4830
|
+
children: [
|
|
4831
|
+
'Digital Marketing',
|
|
4832
|
+
'Lead Generation & Telemarketing',
|
|
4833
|
+
'Marketing, PR & Brand Strategy',
|
|
4834
|
+
],
|
|
4835
|
+
},
|
|
4836
|
+
{
|
|
4837
|
+
label: 'Translation',
|
|
4838
|
+
value: 'translation',
|
|
4839
|
+
children: [
|
|
4840
|
+
'Language Tutoring & Interpretation',
|
|
4841
|
+
'Translation & Localization Services',
|
|
4842
|
+
],
|
|
4843
|
+
},
|
|
4844
|
+
{
|
|
4845
|
+
label: 'Software Development',
|
|
4846
|
+
value: 'software-development',
|
|
4847
|
+
children: [
|
|
4848
|
+
'AI Apps & Integration',
|
|
4849
|
+
'Blockchain, NFT & Cryptocurrency',
|
|
4850
|
+
'Desktop Application Development',
|
|
4851
|
+
'Ecommerce Development',
|
|
4852
|
+
'Game Design & Development',
|
|
4853
|
+
'Mobile Development',
|
|
4854
|
+
'Other - Software Development',
|
|
4855
|
+
'Product Management & Scrum',
|
|
4856
|
+
'QA Testing',
|
|
4857
|
+
'Scripts & Utilities',
|
|
4858
|
+
'Web & Mobile Design',
|
|
4859
|
+
'Web Development',
|
|
4860
|
+
],
|
|
4861
|
+
},
|
|
4862
|
+
{
|
|
4863
|
+
label: 'Writing',
|
|
4864
|
+
value: 'writing',
|
|
4865
|
+
children: [
|
|
4866
|
+
'Content Writing',
|
|
4867
|
+
'Editing & Proofreading Services',
|
|
4868
|
+
'Professional & Business Writing',
|
|
4869
|
+
'Sales & Marketing Copywriting',
|
|
4870
|
+
],
|
|
4871
|
+
},
|
|
4872
|
+
],
|
|
4873
|
+
CATEGORIES: [
|
|
4874
|
+
'Interior & Trade Show Design',
|
|
4875
|
+
'Physical Sciences',
|
|
4876
|
+
'Personal & Professional Coaching',
|
|
4877
|
+
'Accounting & Bookkeeping',
|
|
4878
|
+
'Financial Planning',
|
|
4879
|
+
'Recruiting & Human Resources',
|
|
4880
|
+
'Management Consulting & Analysis',
|
|
4881
|
+
'Other - Accounting & Consulting',
|
|
4882
|
+
'Data Entry & Transcription Services',
|
|
4883
|
+
'Virtual Assistance',
|
|
4884
|
+
'Project Management',
|
|
4885
|
+
'Market Research & Product Reviews',
|
|
4886
|
+
'Community Management & Tagging',
|
|
4887
|
+
'Customer Service & Tech Support',
|
|
4888
|
+
'Data Analysis & Testing',
|
|
4889
|
+
'Data Extraction/ETL',
|
|
4890
|
+
'Data Mining & Management',
|
|
4891
|
+
'AI & Machine Learning',
|
|
4892
|
+
'Art & Illustration',
|
|
4893
|
+
'Audio & Music Production',
|
|
4894
|
+
'Branding & Logo Design',
|
|
4895
|
+
'NFT, AR/VR & Game Art',
|
|
4896
|
+
'Graphic, Editorial & Presentation Design',
|
|
4897
|
+
'Performing Arts',
|
|
4898
|
+
'Photography',
|
|
4899
|
+
'Product Design',
|
|
4900
|
+
'Video & Animation',
|
|
4901
|
+
'Building & Landscape Architecture',
|
|
4902
|
+
'Chemical Engineering',
|
|
4903
|
+
'Civil & Structural Engineering',
|
|
4904
|
+
'Contract Manufacturing',
|
|
4905
|
+
'Electrical & Electronic Engineering',
|
|
4906
|
+
'Energy & Mechanical Engineering',
|
|
4907
|
+
'3D Modeling & CAD',
|
|
4908
|
+
'Database Management & Administration',
|
|
4909
|
+
'ERP/CRM Software',
|
|
4910
|
+
'Information Security & Compliance',
|
|
4911
|
+
'Network & System Administration',
|
|
4912
|
+
'DevOps & Solution Architecture',
|
|
4913
|
+
'Corporate & Contract Law',
|
|
4914
|
+
'International & Immigration Law',
|
|
4915
|
+
'Finance & Tax Law',
|
|
4916
|
+
'Public Law',
|
|
4917
|
+
'Digital Marketing',
|
|
4918
|
+
'Lead Generation & Telemarketing',
|
|
4919
|
+
'Marketing, PR & Brand Strategy',
|
|
4920
|
+
'Language Tutoring & Interpretation',
|
|
4921
|
+
'Translation & Localization Services',
|
|
4922
|
+
'Blockchain, NFT & Cryptocurrency',
|
|
4923
|
+
'AI Apps & Integration',
|
|
4924
|
+
'Desktop Application Development',
|
|
4925
|
+
'Ecommerce Development',
|
|
4926
|
+
'Game Design & Development',
|
|
4927
|
+
'Mobile Development',
|
|
4928
|
+
'Other - Software Development',
|
|
4929
|
+
'Product Management & Scrum',
|
|
4930
|
+
'QA Testing',
|
|
4931
|
+
'Scripts & Utilities',
|
|
4932
|
+
'Web & Mobile Design',
|
|
4933
|
+
'Web Development',
|
|
4934
|
+
'Sales & Marketing Copywriting',
|
|
4935
|
+
'Content Writing',
|
|
4936
|
+
'Editing & Proofreading Services',
|
|
4937
|
+
'Professional & Business Writing',
|
|
4938
|
+
],
|
|
4939
|
+
CLIENT_INDUSTRY: [
|
|
4940
|
+
'Aerospace',
|
|
4941
|
+
'Agriculture & Forestry',
|
|
4942
|
+
'Art & Design',
|
|
4943
|
+
'Automotive',
|
|
4944
|
+
'Aviation',
|
|
4945
|
+
'Education',
|
|
4946
|
+
'Energy & Utilities',
|
|
4947
|
+
'Engineering & Architecture',
|
|
4948
|
+
'Fashion & Beauty',
|
|
4949
|
+
'Finance & Accounting',
|
|
4950
|
+
'Food & Beverage',
|
|
4951
|
+
'Government & Public Sector',
|
|
4952
|
+
'Health & Fitness',
|
|
4953
|
+
'HR & Business Services',
|
|
4954
|
+
'Legal',
|
|
4955
|
+
'Manufacturing & Construction',
|
|
4956
|
+
'Media & Entertainment',
|
|
4957
|
+
'Military & Defense',
|
|
4958
|
+
'Mining',
|
|
4959
|
+
'Real Estate',
|
|
4960
|
+
'Retail & Consumer Goods',
|
|
4961
|
+
'Sales & Marketing',
|
|
4962
|
+
'Science & Medicine',
|
|
4963
|
+
'Sports & Recreation',
|
|
4964
|
+
'Supply Chain & Logistics',
|
|
4965
|
+
'Tech & IT',
|
|
4966
|
+
'Transportation & Warehousing',
|
|
4967
|
+
'Travel & Hospitality',
|
|
4968
|
+
],
|
|
4969
|
+
CLIENT_SIZE: [
|
|
4970
|
+
'Individual client',
|
|
4971
|
+
'Small company (2-9 people)',
|
|
4972
|
+
'Mid-sized company (10-99 people)',
|
|
4973
|
+
'Large company (100-1,000 people)',
|
|
4974
|
+
'Large company (1,000+ people)',
|
|
4975
|
+
'Unspecified',
|
|
4976
|
+
],
|
|
4977
|
+
};
|
|
4978
|
+
const HIERARCHICAL_CATEGORIES_TO_CHILDREN = JOB_FILTER_OPTIONS.HIERARCHICAL_CATEGORIES.reduce((acc, category) => {
|
|
4979
|
+
acc[category.label] = category.children;
|
|
4980
|
+
return acc;
|
|
4981
|
+
}, {});
|
|
4982
|
+
const regionNames = {
|
|
4983
|
+
Worldwide: 'Worldwide',
|
|
4984
|
+
USOnly: 'US Only',
|
|
4985
|
+
UKOnly: 'UK Only',
|
|
4986
|
+
All: 'All',
|
|
4987
|
+
};
|
|
4988
|
+
const CLIENT_SIZE_TO_NUMBER = {
|
|
4989
|
+
'Individual client': 1,
|
|
4990
|
+
'Small company (2-9 people)': 2,
|
|
4991
|
+
'Mid-sized company (10-99 people)': 10,
|
|
4992
|
+
'Large company (100-1,000 people)': 100,
|
|
4993
|
+
'Large company (1,000+ people)': 1000,
|
|
4994
|
+
Unspecified: null,
|
|
4995
|
+
};
|
|
4996
|
+
|
|
4997
|
+
// Enum definitions for fixed options
|
|
4998
|
+
const projectDurationEnum = z.enum(JOB_FILTER_OPTIONS.PROJECT_DURATION);
|
|
4999
|
+
const engagementTypeEnum = z.enum(JOB_FILTER_OPTIONS.ENGAGEMENT_TYPE);
|
|
5000
|
+
const vendorTypeEnum = z.enum(JOB_FILTER_OPTIONS.VENDOR_TYPE);
|
|
5001
|
+
const paymentTypeEnum = z.enum(JOB_FILTER_OPTIONS.PAYMENT_TYPE);
|
|
5002
|
+
const categoryEnum = z.enum(JOB_FILTER_OPTIONS.CATEGORIES);
|
|
5003
|
+
const clientIndustryEnum = z.enum(JOB_FILTER_OPTIONS.CLIENT_INDUSTRY);
|
|
5004
|
+
const clientSizeEnum = z.enum(JOB_FILTER_OPTIONS.CLIENT_SIZE);
|
|
5005
|
+
const talentTypeEnum = z.enum(JOB_FILTER_OPTIONS.TALENT_TYPE);
|
|
5006
|
+
const englishLevelEnum = z.enum(JOB_FILTER_OPTIONS.ENGLISH_LEVELS);
|
|
5007
|
+
const experienceLevelEnum = z.enum(JOB_FILTER_OPTIONS.EXPERIENCE_LEVELS);
|
|
5008
|
+
const regionEnum = z.enum(JOB_FILTER_OPTIONS.REGIONS);
|
|
5009
|
+
const requiredEarningsEnum = z.union([
|
|
5010
|
+
z.literal(100),
|
|
5011
|
+
z.literal(1000),
|
|
5012
|
+
z.literal(10000),
|
|
5013
|
+
]);
|
|
5014
|
+
const requiredJSSEnum = z.enum(JOB_FILTER_OPTIONS.REQUIRED_JSS);
|
|
5015
|
+
const isPaymentVerifiedEnum = z.enum(['all', 'true', 'false']);
|
|
5016
|
+
const isPhoneVerifiedEnum = z.enum(['all', 'true', 'false']);
|
|
5017
|
+
const hasQuestionsEnum = z.enum(['all', 'yes', 'no']);
|
|
5018
|
+
const searchQueryModeEnum = z.enum(['builder', 'custom']);
|
|
5019
|
+
// Main job filters schema
|
|
5020
|
+
const jobFiltersSchema = z.object({
|
|
5021
|
+
keywords: z
|
|
5022
|
+
.object({
|
|
5023
|
+
includes: z.string().nullable(),
|
|
5024
|
+
excludes: z.string().nullable(),
|
|
5025
|
+
})
|
|
5026
|
+
.nullable(),
|
|
5027
|
+
searchQuery: z.string().nullable(),
|
|
5028
|
+
searchQueryMode: searchQueryModeEnum.nullable().optional(),
|
|
5029
|
+
isFeatured: z.enum(['all', 'true', 'false']).nullable(),
|
|
5030
|
+
regions: z.array(regionEnum).nullable(),
|
|
5031
|
+
categories: z
|
|
5032
|
+
.object({
|
|
5033
|
+
includes: z.array(categoryEnum).nullable(),
|
|
5034
|
+
excludes: z.array(categoryEnum).nullable(),
|
|
5035
|
+
})
|
|
5036
|
+
.nullable(),
|
|
5037
|
+
payment: z
|
|
5038
|
+
.object({
|
|
5039
|
+
paymentType: z.array(paymentTypeEnum).nullable(),
|
|
5040
|
+
minFixedPrice: z.number().nullable(),
|
|
5041
|
+
maxFixedPrice: z.number().nullable(),
|
|
5042
|
+
minHourlyRate: z.number().nullable(),
|
|
5043
|
+
maxHourlyRate: z.number().nullable(),
|
|
5044
|
+
})
|
|
5045
|
+
.nullable(),
|
|
5046
|
+
projectDuration: z.array(projectDurationEnum).nullable(),
|
|
5047
|
+
experienceLevel: z.array(experienceLevelEnum).nullable(),
|
|
5048
|
+
questions: z
|
|
5049
|
+
.object({
|
|
5050
|
+
hasQuestions: z.array(hasQuestionsEnum),
|
|
5051
|
+
})
|
|
5052
|
+
.nullable(),
|
|
5053
|
+
engagementType: z.array(engagementTypeEnum).nullable(),
|
|
5054
|
+
clientInfo: z
|
|
5055
|
+
.object({
|
|
5056
|
+
isPaymentVerified: isPaymentVerifiedEnum.default('all'),
|
|
5057
|
+
isPhoneVerified: isPhoneVerifiedEnum.default('all'),
|
|
5058
|
+
enterpriseClient: z.enum(['all', 'true', 'false']).default('all'),
|
|
5059
|
+
clientLocationIncludes: z.array(z.string()).nullable(),
|
|
5060
|
+
clientLocationExcludes: z.array(z.string()).nullable(),
|
|
5061
|
+
minReviewScore: z.number().min(0).max(5).nullable(),
|
|
5062
|
+
maxReviewScore: z.number().min(0).max(5).nullable(),
|
|
5063
|
+
minTotalSpent: z.number().min(0).nullable(),
|
|
5064
|
+
maxTotalSpent: z.number().min(0).nullable(),
|
|
5065
|
+
minHireRate: z.number().min(0).max(100).nullable(),
|
|
5066
|
+
maxHireRate: z.number().min(0).max(100).nullable(),
|
|
5067
|
+
clientIndustry: z.array(clientIndustryEnum).nullable(),
|
|
5068
|
+
companySize: z.array(clientSizeEnum).nullable(),
|
|
5069
|
+
minJobsPosted: z.number().nullable(),
|
|
5070
|
+
minAvgHourlyRate: z.number().nullable(),
|
|
5071
|
+
maxAvgHourlyRate: z.number().nullable(),
|
|
5072
|
+
minNumReviews: z.number().nullable(),
|
|
5073
|
+
memberSinceFrom: z.string().date().nullable(),
|
|
5074
|
+
memberSinceTo: z.string().date().nullable(),
|
|
5075
|
+
})
|
|
5076
|
+
.nullable(),
|
|
5077
|
+
includeClientsWithZeroReviews: z.boolean().nullable(),
|
|
5078
|
+
includeClientsWithLessThanXPostedJobs: z.number().nullable(),
|
|
5079
|
+
totalSpentIncludeClientsWithLessThanXPostedJobs: z.number().nullable(),
|
|
5080
|
+
averageHourlyRateIncludeClientsWithLessThanXPostedJobs: z.number().nullable(),
|
|
5081
|
+
vendorQualifications: z
|
|
5082
|
+
.object({
|
|
5083
|
+
locationIncludes: z.array(z.string()).nullable(),
|
|
5084
|
+
locationExcludes: z.array(z.string()).nullable(),
|
|
5085
|
+
talentTypes: z.array(talentTypeEnum).nullable(),
|
|
5086
|
+
englishLevels: z.array(englishLevelEnum).nullable(),
|
|
5087
|
+
includeRisingTalent: z.string().nullable(),
|
|
5088
|
+
requiredEarnings: requiredEarningsEnum.nullable(),
|
|
5089
|
+
requiredJSS: z.array(requiredJSSEnum).nullable(),
|
|
5090
|
+
})
|
|
5091
|
+
.nullable(),
|
|
5092
|
+
});
|
|
5093
|
+
|
|
5687
5094
|
// Filter Option Schema
|
|
5688
5095
|
const filterOptionItemSchema = z.object({
|
|
5689
5096
|
key: z.string(),
|
|
@@ -6315,94 +5722,830 @@ const bidRangeSchema = objectType({
|
|
|
6315
5722
|
avg: numberType().nullable(),
|
|
6316
5723
|
low: numberType().nullable(),
|
|
6317
5724
|
});
|
|
6318
|
-
const jobActivitySchema = objectType({
|
|
6319
|
-
proposals: objectType({
|
|
6320
|
-
min: numberType().nullable(),
|
|
6321
|
-
max: numberType().nullable(),
|
|
6322
|
-
}),
|
|
6323
|
-
lastViewedByClient: stringType().nullable(),
|
|
6324
|
-
lastViewedByClientTimestamp: numberType().nullable(),
|
|
6325
|
-
hires: numberType().nullable(),
|
|
6326
|
-
interviewing: numberType().nullable(),
|
|
6327
|
-
invitesSent: numberType().nullable(),
|
|
6328
|
-
unansweredInvites: numberType().nullable(),
|
|
6329
|
-
updatedAt: numberType().nullable(),
|
|
5725
|
+
const jobActivitySchema = objectType({
|
|
5726
|
+
proposals: objectType({
|
|
5727
|
+
min: numberType().nullable(),
|
|
5728
|
+
max: numberType().nullable(),
|
|
5729
|
+
}),
|
|
5730
|
+
lastViewedByClient: stringType().nullable(),
|
|
5731
|
+
lastViewedByClientTimestamp: numberType().nullable(),
|
|
5732
|
+
hires: numberType().nullable(),
|
|
5733
|
+
interviewing: numberType().nullable(),
|
|
5734
|
+
invitesSent: numberType().nullable(),
|
|
5735
|
+
unansweredInvites: numberType().nullable(),
|
|
5736
|
+
updatedAt: numberType().nullable(),
|
|
5737
|
+
});
|
|
5738
|
+
const jobActivityDeltaSchema = objectType({
|
|
5739
|
+
proposals: numberType(),
|
|
5740
|
+
interviewing: numberType(),
|
|
5741
|
+
hires: numberType(),
|
|
5742
|
+
invitesSent: numberType(),
|
|
5743
|
+
unansweredInvites: numberType(),
|
|
5744
|
+
});
|
|
5745
|
+
const metadataSchema = objectType({
|
|
5746
|
+
hours: stringType().nullable(),
|
|
5747
|
+
duration: stringType().nullable(),
|
|
5748
|
+
experienceLevel: stringType().nullable(),
|
|
5749
|
+
hourlyRate: z
|
|
5750
|
+
.object({
|
|
5751
|
+
min: numberType().nullable(),
|
|
5752
|
+
max: numberType().nullable(),
|
|
5753
|
+
})
|
|
5754
|
+
.nullable(),
|
|
5755
|
+
paymentType: stringType().nullable(),
|
|
5756
|
+
fixedPrice: numberType().nullable(),
|
|
5757
|
+
});
|
|
5758
|
+
const jobActivityOffsetHours = [4, 24];
|
|
5759
|
+
const jobActivityOffsetEnum = z.enum(jobActivityOffsetHours.map((h) => `${h}h`));
|
|
5760
|
+
const upworkJobSchema = objectType({
|
|
5761
|
+
id: stringType().nullable(),
|
|
5762
|
+
uid: stringType().nullable(),
|
|
5763
|
+
createdAt: numberType().nullable(),
|
|
5764
|
+
title: stringType().nullable(),
|
|
5765
|
+
category: stringType().nullable(),
|
|
5766
|
+
skills: arrayType(jobSkillsSchema).nullable(),
|
|
5767
|
+
datetime: numberType().nullable(),
|
|
5768
|
+
description: stringType().nullable(),
|
|
5769
|
+
descriptionLength: numberType().nullable(),
|
|
5770
|
+
connectsRequired: numberType().nullable(),
|
|
5771
|
+
projectType: stringType().nullable(),
|
|
5772
|
+
projectDuration: stringType().nullable(),
|
|
5773
|
+
questions: arrayType(stringType()).nullable(),
|
|
5774
|
+
jobUrl: stringType().nullable(),
|
|
5775
|
+
metadata: metadataSchema.nullable(),
|
|
5776
|
+
clientInfo: clientInfoSchema.nullable(),
|
|
5777
|
+
vendorQualifications: vendorQualificationSchema.nullable(),
|
|
5778
|
+
processed: booleanType().nullable(),
|
|
5779
|
+
isFeatured: booleanType().nullable(),
|
|
5780
|
+
clientReviews: arrayType(clientReviewSchema).nullable(),
|
|
5781
|
+
region: regionSchema.nullable(),
|
|
5782
|
+
bidRange: bidRangeSchema.nullable(),
|
|
5783
|
+
jobActivity: jobActivitySchema.nullable(),
|
|
5784
|
+
occupation: stringType().nullable(),
|
|
5785
|
+
activityUpdates: z
|
|
5786
|
+
.union([z.literal(1), z.literal(2), z.literal(3)])
|
|
5787
|
+
.nullable(),
|
|
5788
|
+
activity: recordType(jobActivityOffsetEnum, jobActivitySchema).nullish(),
|
|
5789
|
+
activityDelta: jobActivityDeltaSchema.nullish(),
|
|
5790
|
+
});
|
|
5791
|
+
const jobActivityOffsetHourSchema = custom((val) => jobActivityOffsetHours.includes(val));
|
|
5792
|
+
const jobActivityUpdateSchema = objectType({
|
|
5793
|
+
jobUrl: stringType(),
|
|
5794
|
+
data: jobActivitySchema,
|
|
5795
|
+
offsetHour: jobActivityOffsetHourSchema,
|
|
5796
|
+
scrapedAt: numberType(),
|
|
5797
|
+
});
|
|
5798
|
+
const jobActivitySnapshotSchema = objectType({
|
|
5799
|
+
jobUrl: stringType(),
|
|
5800
|
+
activity: jobActivitySchema,
|
|
5801
|
+
postedAt: numberType(),
|
|
5802
|
+
scrapedAt: numberType(),
|
|
5803
|
+
hoursSincePosted: numberType(),
|
|
5804
|
+
});
|
|
5805
|
+
const feedJobSchema = objectType({
|
|
5806
|
+
uid: stringType().nullable(),
|
|
5807
|
+
title: stringType().nullable(),
|
|
5808
|
+
jobUrl: stringType().nullable(),
|
|
5809
|
+
datetime: stringType().nullable(),
|
|
5810
|
+
isFeatured: booleanType().nullable(),
|
|
5811
|
+
region: regionSchema.nullable(),
|
|
5812
|
+
});
|
|
5813
|
+
|
|
5814
|
+
const roomNoteSchema = z.object({
|
|
5815
|
+
note: z.string().nullable(),
|
|
5816
|
+
createdAt: z.number(),
|
|
5817
|
+
updatedAt: z.number(),
|
|
5818
|
+
});
|
|
5819
|
+
const roomCrmStatusEnum = z.enum([
|
|
5820
|
+
'new',
|
|
5821
|
+
'follow_up',
|
|
5822
|
+
'qualified',
|
|
5823
|
+
'won',
|
|
5824
|
+
'archived',
|
|
5825
|
+
]);
|
|
5826
|
+
const roomCrmArchivedReasonEnum = z.enum([
|
|
5827
|
+
'completed',
|
|
5828
|
+
'not_fit',
|
|
5829
|
+
'lost',
|
|
5830
|
+
'no_response',
|
|
5831
|
+
'other',
|
|
5832
|
+
]);
|
|
5833
|
+
const pipelineColumnSchema = z.object({
|
|
5834
|
+
id: z.string(),
|
|
5835
|
+
label: z.string(),
|
|
5836
|
+
color: z.string(),
|
|
5837
|
+
position: z.number(),
|
|
5838
|
+
});
|
|
5839
|
+
const roomJobClientHistorySchema = z.object({
|
|
5840
|
+
jobUrl: z.string().nullable(),
|
|
5841
|
+
title: z.string().nullable(),
|
|
5842
|
+
campaignId: z.string().nullable().optional(),
|
|
5843
|
+
clientInfo: clientInfoSchema.nullable(),
|
|
5844
|
+
});
|
|
5845
|
+
const roomSchema = z.object({
|
|
5846
|
+
id: z.string(),
|
|
5847
|
+
roomId: z.string(),
|
|
5848
|
+
roomName: z.string(),
|
|
5849
|
+
topic: z.string(),
|
|
5850
|
+
organizationUid: z.string(),
|
|
5851
|
+
organizationType: z.string(),
|
|
5852
|
+
recentTimestamp: z.number(),
|
|
5853
|
+
organizationName: z.string(),
|
|
5854
|
+
context: z.object({
|
|
5855
|
+
freelancerId: z.string(),
|
|
5856
|
+
freelancerOrgId: z.string(),
|
|
5857
|
+
freelancerName: z.string().optional(),
|
|
5858
|
+
clientId: z.string().optional(),
|
|
5859
|
+
clientName: z.string().optional(),
|
|
5860
|
+
jobTitle: z.string().optional(),
|
|
5861
|
+
currentStatus: z.string().optional(),
|
|
5862
|
+
associatedAgencyOrgId: z.string().optional(),
|
|
5863
|
+
}),
|
|
5864
|
+
numUnread: z.number(),
|
|
5865
|
+
latestStory: z
|
|
5866
|
+
.object({
|
|
5867
|
+
message: z.string(),
|
|
5868
|
+
created: z.number(),
|
|
5869
|
+
messageId: z.string().optional(),
|
|
5870
|
+
senderName: z.string().optional(),
|
|
5871
|
+
})
|
|
5872
|
+
.optional(),
|
|
5873
|
+
lastChecked: z.number().optional(),
|
|
5874
|
+
hasNewMessages: z.boolean().optional(),
|
|
5875
|
+
updatedAt: z.number().optional(),
|
|
5876
|
+
lastFetchedAt: z.number().optional(),
|
|
5877
|
+
roomTypeExtended: z.string().optional(),
|
|
5878
|
+
roomNote: roomNoteSchema.optional(),
|
|
5879
|
+
crmStatus: z.string().optional(),
|
|
5880
|
+
crmStatusUpdatedAt: z.number().optional(),
|
|
5881
|
+
crmArchivedReason: roomCrmArchivedReasonEnum.optional().nullable(),
|
|
5882
|
+
dealValue: z.number().nullable().optional(),
|
|
5883
|
+
jobClientHistory: roomJobClientHistorySchema.optional(),
|
|
5884
|
+
});
|
|
5885
|
+
const roomsMetadataSchema = z.object({
|
|
5886
|
+
accountId: z.string(),
|
|
5887
|
+
lastUpdated: z.number(),
|
|
5888
|
+
totalRooms: z.number(),
|
|
5889
|
+
});
|
|
5890
|
+
const roomMessageSchema = z
|
|
5891
|
+
.object({
|
|
5892
|
+
messageId: z.string(),
|
|
5893
|
+
userId: z.string(),
|
|
5894
|
+
message: z.string(),
|
|
5895
|
+
created: z.number(),
|
|
5896
|
+
userName: z.string().optional(),
|
|
5897
|
+
orgId: z.string().optional(),
|
|
5898
|
+
senderName: z.string().optional(),
|
|
5899
|
+
attachmentUrl: z.string().optional(),
|
|
5900
|
+
startedPreparingDownloadAt: z.number().optional(),
|
|
5901
|
+
})
|
|
5902
|
+
.passthrough();
|
|
5903
|
+
const getRoomsResponseSchema = z.object({
|
|
5904
|
+
data: z.array(roomSchema),
|
|
5905
|
+
pagination: z.object({
|
|
5906
|
+
hasMore: z.boolean(),
|
|
5907
|
+
nextCursor: z.string().nullable(),
|
|
5908
|
+
limit: z.number(),
|
|
5909
|
+
total: z.number(),
|
|
5910
|
+
}),
|
|
5911
|
+
});
|
|
5912
|
+
const getPipelineListRoomsResponseSchema = z.object({
|
|
5913
|
+
data: z.array(roomSchema.extend({ bidderAccountId: z.string() })),
|
|
5914
|
+
pagination: z.object({
|
|
5915
|
+
hasMore: z.boolean(),
|
|
5916
|
+
nextCursor: z.string().nullable(),
|
|
5917
|
+
limit: z.number(),
|
|
5918
|
+
total: z.number(),
|
|
5919
|
+
}),
|
|
5920
|
+
});
|
|
5921
|
+
const roomTagSchema = z.object({
|
|
5922
|
+
id: z.string(),
|
|
5923
|
+
name: z.string(),
|
|
5924
|
+
color: z.string().optional(),
|
|
5925
|
+
createdAt: z.number(),
|
|
5926
|
+
updatedAt: z.number().optional(),
|
|
5927
|
+
});
|
|
5928
|
+
const createRoomTagRequestBodySchema = z.object({
|
|
5929
|
+
name: z.string(),
|
|
5930
|
+
color: z.string().optional(),
|
|
5931
|
+
});
|
|
5932
|
+
const assignRoomTagsRequestBodySchema = z.object({
|
|
5933
|
+
tagIds: z.array(z.string()),
|
|
5934
|
+
});
|
|
5935
|
+
const updateRoomNotesRequestBodySchema = z.object({
|
|
5936
|
+
note: z.string(),
|
|
5937
|
+
});
|
|
5938
|
+
const updateRoomCrmStatusRequestBodySchema = z.object({
|
|
5939
|
+
status: z.string(),
|
|
5940
|
+
archivedReason: roomCrmArchivedReasonEnum.optional(),
|
|
5941
|
+
});
|
|
5942
|
+
const updateRoomDealValueRequestBodySchema = z.object({
|
|
5943
|
+
dealValue: z.number().nullable(),
|
|
6330
5944
|
});
|
|
6331
|
-
const
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
5945
|
+
const roomTaskSchema = z.object({
|
|
5946
|
+
id: z.string(),
|
|
5947
|
+
roomId: z.string(),
|
|
5948
|
+
title: z.string(),
|
|
5949
|
+
completed: z.boolean(),
|
|
5950
|
+
dueDate: z.number().nullable().optional(),
|
|
5951
|
+
createdAt: z.number(),
|
|
5952
|
+
updatedAt: z.number().optional(),
|
|
5953
|
+
completedAt: z.number().nullable().optional(),
|
|
5954
|
+
organizationId: z.string(),
|
|
5955
|
+
bidderAccountId: z.string(),
|
|
6337
5956
|
});
|
|
6338
|
-
const
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
experienceLevel: stringType().nullable(),
|
|
6342
|
-
hourlyRate: z
|
|
6343
|
-
.object({
|
|
6344
|
-
min: numberType().nullable(),
|
|
6345
|
-
max: numberType().nullable(),
|
|
6346
|
-
})
|
|
6347
|
-
.nullable(),
|
|
6348
|
-
paymentType: stringType().nullable(),
|
|
6349
|
-
fixedPrice: numberType().nullable(),
|
|
5957
|
+
const createRoomTaskRequestBodySchema = z.object({
|
|
5958
|
+
title: z.string(),
|
|
5959
|
+
dueDate: z.number().nullable().optional(),
|
|
6350
5960
|
});
|
|
6351
|
-
const
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
uid: stringType().nullable(),
|
|
6356
|
-
createdAt: numberType().nullable(),
|
|
6357
|
-
title: stringType().nullable(),
|
|
6358
|
-
category: stringType().nullable(),
|
|
6359
|
-
skills: arrayType(jobSkillsSchema).nullable(),
|
|
6360
|
-
datetime: numberType().nullable(),
|
|
6361
|
-
description: stringType().nullable(),
|
|
6362
|
-
descriptionLength: numberType().nullable(),
|
|
6363
|
-
connectsRequired: numberType().nullable(),
|
|
6364
|
-
projectType: stringType().nullable(),
|
|
6365
|
-
projectDuration: stringType().nullable(),
|
|
6366
|
-
questions: arrayType(stringType()).nullable(),
|
|
6367
|
-
jobUrl: stringType().nullable(),
|
|
6368
|
-
metadata: metadataSchema.nullable(),
|
|
6369
|
-
clientInfo: clientInfoSchema.nullable(),
|
|
6370
|
-
vendorQualifications: vendorQualificationSchema.nullable(),
|
|
6371
|
-
processed: booleanType().nullable(),
|
|
6372
|
-
isFeatured: booleanType().nullable(),
|
|
6373
|
-
clientReviews: arrayType(clientReviewSchema).nullable(),
|
|
6374
|
-
region: regionSchema.nullable(),
|
|
6375
|
-
bidRange: bidRangeSchema.nullable(),
|
|
6376
|
-
jobActivity: jobActivitySchema.nullable(),
|
|
6377
|
-
occupation: stringType().nullable(),
|
|
6378
|
-
activityUpdates: z
|
|
6379
|
-
.union([z.literal(1), z.literal(2), z.literal(3)])
|
|
6380
|
-
.nullable(),
|
|
6381
|
-
activity: recordType(jobActivityOffsetEnum, jobActivitySchema).nullish(),
|
|
6382
|
-
activityDelta: jobActivityDeltaSchema.nullish(),
|
|
5961
|
+
const updateRoomTaskRequestBodySchema = z.object({
|
|
5962
|
+
title: z.string().optional(),
|
|
5963
|
+
completed: z.boolean().optional(),
|
|
5964
|
+
dueDate: z.number().nullable().optional(),
|
|
6383
5965
|
});
|
|
6384
|
-
const
|
|
6385
|
-
|
|
6386
|
-
jobUrl: stringType(),
|
|
6387
|
-
data: jobActivitySchema,
|
|
6388
|
-
offsetHour: jobActivityOffsetHourSchema,
|
|
6389
|
-
scrapedAt: numberType(),
|
|
5966
|
+
const updatePipelineColumnsRequestBodySchema = z.object({
|
|
5967
|
+
columns: z.array(pipelineColumnSchema),
|
|
6390
5968
|
});
|
|
6391
|
-
const
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
postedAt: numberType(),
|
|
6395
|
-
scrapedAt: numberType(),
|
|
6396
|
-
hoursSincePosted: numberType(),
|
|
5969
|
+
const sendMessageRequestSchema = z.object({
|
|
5970
|
+
message: z.string(),
|
|
5971
|
+
file: z.instanceof(File).optional(),
|
|
6397
5972
|
});
|
|
6398
|
-
const
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
jobUrl: stringType().nullable(),
|
|
6402
|
-
datetime: stringType().nullable(),
|
|
6403
|
-
isFeatured: booleanType().nullable(),
|
|
6404
|
-
region: regionSchema.nullable(),
|
|
5973
|
+
const freeSlotsRequestBodySchema = z.object({
|
|
5974
|
+
userId: z.string(),
|
|
5975
|
+
durationMinutes: z.number(),
|
|
6405
5976
|
});
|
|
5977
|
+
const bookSlotRequestBodySchema = z.object({
|
|
5978
|
+
ownerUid: z.string(),
|
|
5979
|
+
duration: z.number(),
|
|
5980
|
+
platform: z.string(),
|
|
5981
|
+
startTime: z.number(),
|
|
5982
|
+
endTime: z.number(),
|
|
5983
|
+
});
|
|
5984
|
+
|
|
5985
|
+
const ROOM_EXTENDED_TYPE_MAP = {
|
|
5986
|
+
proposal: ['fl-proposal'],
|
|
5987
|
+
dm: ['direct_message'],
|
|
5988
|
+
invite: ['client-invitation', 'direct_hire_FL_profile'],
|
|
5989
|
+
};
|
|
5990
|
+
const ROOM_TYPES_MATCHING_EMPTY_EXTENDED_TYPE = new Set([
|
|
5991
|
+
'proposal',
|
|
5992
|
+
]);
|
|
5993
|
+
// Pipeline column colors available for user selection
|
|
5994
|
+
const PIPELINE_COLUMN_COLORS = [
|
|
5995
|
+
'blue',
|
|
5996
|
+
'emerald',
|
|
5997
|
+
'amber',
|
|
5998
|
+
'violet',
|
|
5999
|
+
'slate',
|
|
6000
|
+
'rose',
|
|
6001
|
+
'cyan',
|
|
6002
|
+
'orange',
|
|
6003
|
+
'indigo',
|
|
6004
|
+
'pink',
|
|
6005
|
+
];
|
|
6006
|
+
const DEFAULT_PIPELINE_COLUMNS = [
|
|
6007
|
+
{ id: 'new', label: 'New', color: 'blue', position: 0 },
|
|
6008
|
+
{ id: 'qualified', label: 'Qualified', color: 'emerald', position: 1 },
|
|
6009
|
+
{ id: 'follow_up', label: 'Follow Up', color: 'amber', position: 2 },
|
|
6010
|
+
{ id: 'won', label: 'Active Contract', color: 'violet', position: 3 },
|
|
6011
|
+
{ id: 'completed', label: 'Completed', color: 'slate', position: 4 },
|
|
6012
|
+
];
|
|
6013
|
+
const DEFAULT_PIPELINE_COLUMN_ID = 'new';
|
|
6014
|
+
const DEFAULT_ROOM_CRM_STATUS = DEFAULT_PIPELINE_COLUMN_ID;
|
|
6015
|
+
// Statuses whose deal value is excluded from pipeline totals
|
|
6016
|
+
const PIPELINE_DEAL_VALUE_EXCLUDED_COLUMN_IDS = ['new'];
|
|
6017
|
+
const ROOM_CRM_ARCHIVED_REASON_ORDER = roomCrmArchivedReasonEnum.options;
|
|
6018
|
+
const VALID_CRM_STATUSES = new Set([
|
|
6019
|
+
...roomCrmStatusEnum.options,
|
|
6020
|
+
'completed',
|
|
6021
|
+
'in_conversation',
|
|
6022
|
+
'active_contract',
|
|
6023
|
+
]);
|
|
6024
|
+
function normalizeRoomCrmStatus(status) {
|
|
6025
|
+
if (status && VALID_CRM_STATUSES.has(status)) {
|
|
6026
|
+
return status;
|
|
6027
|
+
}
|
|
6028
|
+
return 'new';
|
|
6029
|
+
}
|
|
6030
|
+
const PIPELINE_LIST_SORT_FIELDS = [
|
|
6031
|
+
'recentTimestamp',
|
|
6032
|
+
'dealValue',
|
|
6033
|
+
'totalSpent',
|
|
6034
|
+
'memberSince',
|
|
6035
|
+
'hireRate',
|
|
6036
|
+
'rating',
|
|
6037
|
+
'avgRate',
|
|
6038
|
+
];
|
|
6039
|
+
function normalizeRoomCrmStatuses(statuses) {
|
|
6040
|
+
if (!statuses || !statuses.length) {
|
|
6041
|
+
return [];
|
|
6042
|
+
}
|
|
6043
|
+
return Array.from(new Set(statuses
|
|
6044
|
+
.map((s) => s.trim().toLowerCase())
|
|
6045
|
+
.filter((s) => VALID_CRM_STATUSES.has(s))));
|
|
6046
|
+
}
|
|
6047
|
+
|
|
6048
|
+
const defaultQuestions = [
|
|
6049
|
+
{
|
|
6050
|
+
question: 'What is your company website URL?',
|
|
6051
|
+
answer: '',
|
|
6052
|
+
exampleAnswer: 'Website: www.yourwebsite.com',
|
|
6053
|
+
},
|
|
6054
|
+
{
|
|
6055
|
+
question: 'Please list any certifications that you have',
|
|
6056
|
+
answer: '',
|
|
6057
|
+
exampleAnswer: 'AWS Certified Solutions Architect\nGoogle Cloud Certified Professional Developer\nMicrosoft Certified: Azure Developer Associate\nCertified Scrum Master (CSM)',
|
|
6058
|
+
},
|
|
6059
|
+
{
|
|
6060
|
+
question: 'What past project or job have you had that is most like this one and why?',
|
|
6061
|
+
answer: "{{PROJECT}} is definitely the closest match - we {{ACTION}} their {{TYPE}} from scratch {{DETAIL}}. The {{CHALLENGE}} was particularly challenging since we needed {{REQUIREMENT}}. Very similar {{ASPECT}} to what you're looking for.",
|
|
6062
|
+
exampleAnswer: "{{PROJECT}} is definitely the closest match - we {{ACTION}} their {{TYPE}} from scratch {{DETAIL}}. The {{CHALLENGE}} was particularly challenging since we needed {{REQUIREMENT}}. Very similar {{ASPECT}} to what you're looking for.",
|
|
6063
|
+
},
|
|
6064
|
+
{
|
|
6065
|
+
question: 'What tools/frameworks/methods have you worked with?',
|
|
6066
|
+
answer: 'For {{AREA}}, we primarily use {{TOOL}} and {{METHOD}}. For {{AREA}}, we use {{TOOL}}. For the {{PROJECT}} project I mentioned, we used this exact approach and it worked really well for {{OUTCOME}}. We typically {{METHOD}} depending on client needs.',
|
|
6067
|
+
exampleAnswer: 'For {{AREA}}, we primarily use {{TOOL}} and {{METHOD}}. For {{AREA}}, we use {{TOOL}}. For the {{PROJECT}} project I mentioned, we used this exact approach and it worked really well for {{OUTCOME}}. We typically {{METHOD}} depending on client needs.',
|
|
6068
|
+
},
|
|
6069
|
+
{
|
|
6070
|
+
question: 'Do you have suggestions to make this project run successfully?',
|
|
6071
|
+
answer: "Based on our experience with {{PROJECT}}, I'd suggest starting with {{APPROACH}} to {{BENEFIT}}. {{INSIGHT}}, and we've found that {{LESSON}} saves {{BENEFIT}} later. Our team's experience in {{DOMAIN}} makes us a good fit here.",
|
|
6072
|
+
exampleAnswer: "Based on our experience with {{PROJECT}}, I'd suggest starting with {{APPROACH}} to {{BENEFIT}}. {{INSIGHT}}, and we've found that {{LESSON}} saves {{BENEFIT}} later. Our team's experience in {{DOMAIN}} makes us a good fit here.",
|
|
6073
|
+
},
|
|
6074
|
+
{
|
|
6075
|
+
question: 'Why do you think you are a good fit for this particular project?',
|
|
6076
|
+
answer: "Based on our experience with {{PROJECT}}, I'd suggest starting with {{APPROACH}} to {{BENEFIT}}. {{INSIGHT}}, and we've found that {{LESSON}} saves {{BENEFIT}} later. Our team's experience in {{DOMAIN}} makes us a good fit here.",
|
|
6077
|
+
exampleAnswer: "Based on our experience with {{PROJECT}}, I'd suggest starting with {{APPROACH}} to {{BENEFIT}}. {{INSIGHT}}, and we've found that {{LESSON}} saves {{BENEFIT}} later. Our team's experience in {{DOMAIN}} makes us a good fit here.",
|
|
6078
|
+
},
|
|
6079
|
+
{
|
|
6080
|
+
question: 'Do you have any questions about the job description?',
|
|
6081
|
+
answer: "I'm curious about {{QUESTION}}? Also, are you looking to {{REQUIREMENT}} that we should have experience with? This would help us better understand the scope.",
|
|
6082
|
+
exampleAnswer: "I'm curious about {{QUESTION}}? Also, are you looking to {{REQUIREMENT}} that we should have experience with? This would help us better understand the scope.",
|
|
6083
|
+
},
|
|
6084
|
+
{
|
|
6085
|
+
question: 'How would you approach this type of project?',
|
|
6086
|
+
answer: "For projects like this, we start by {{STEP}}, focusing on {{FACTOR}}. From {{PROJECT}}, we learned that {{INSIGHT}} can drive {{TYPE}}, such as {{RESULT}}. We'd adapt this approach based on your specific goals and requirements.",
|
|
6087
|
+
exampleAnswer: "For projects like this, we start by {{STEP}}, focusing on {{FACTOR}}. From {{PROJECT}}, we learned that {{INSIGHT}} can drive {{TYPE}}, such as {{RESULT}}. We'd adapt this approach based on your specific goals and requirements.",
|
|
6088
|
+
},
|
|
6089
|
+
];
|
|
6090
|
+
|
|
6091
|
+
const GOAT_COUNTRIES = [
|
|
6092
|
+
'USA',
|
|
6093
|
+
'United States',
|
|
6094
|
+
'United Kingdom',
|
|
6095
|
+
'CAN',
|
|
6096
|
+
'Canada',
|
|
6097
|
+
'AUS',
|
|
6098
|
+
'Australia',
|
|
6099
|
+
'ISR',
|
|
6100
|
+
'Israel',
|
|
6101
|
+
'United Arab Emirates',
|
|
6102
|
+
'Singapore',
|
|
6103
|
+
'Switzerland',
|
|
6104
|
+
'Saudi Arabia',
|
|
6105
|
+
'CHN',
|
|
6106
|
+
'China',
|
|
6107
|
+
'Austria',
|
|
6108
|
+
'BEL',
|
|
6109
|
+
'Belgium',
|
|
6110
|
+
'Bulgaria',
|
|
6111
|
+
'Croatia',
|
|
6112
|
+
'CYP',
|
|
6113
|
+
'Cyprus',
|
|
6114
|
+
'CZH',
|
|
6115
|
+
'Czech Republic',
|
|
6116
|
+
'Denmark',
|
|
6117
|
+
'Estonia',
|
|
6118
|
+
'FIN',
|
|
6119
|
+
'Finland',
|
|
6120
|
+
'FRA',
|
|
6121
|
+
'France',
|
|
6122
|
+
'DEU',
|
|
6123
|
+
'Germany',
|
|
6124
|
+
'Greece',
|
|
6125
|
+
'HUN',
|
|
6126
|
+
'Hungry',
|
|
6127
|
+
'Ireland',
|
|
6128
|
+
'Italy',
|
|
6129
|
+
'Latvia',
|
|
6130
|
+
'Lithuania',
|
|
6131
|
+
'LUX',
|
|
6132
|
+
'Luxhembourg',
|
|
6133
|
+
'Malta',
|
|
6134
|
+
'Netherlands',
|
|
6135
|
+
'POL',
|
|
6136
|
+
'Poland',
|
|
6137
|
+
'Portugal',
|
|
6138
|
+
'Romania',
|
|
6139
|
+
'Slovakia',
|
|
6140
|
+
'Slovenia',
|
|
6141
|
+
'Spain',
|
|
6142
|
+
'SWE',
|
|
6143
|
+
'Sweden',
|
|
6144
|
+
'Norway',
|
|
6145
|
+
'New Zealand',
|
|
6146
|
+
'GBR',
|
|
6147
|
+
'NLD',
|
|
6148
|
+
'Qatar',
|
|
6149
|
+
'SGP',
|
|
6150
|
+
'ESP',
|
|
6151
|
+
'ITA',
|
|
6152
|
+
'Puerto Rico',
|
|
6153
|
+
'Costa Rica',
|
|
6154
|
+
'Iceland',
|
|
6155
|
+
'QAT',
|
|
6156
|
+
'Monaco',
|
|
6157
|
+
];
|
|
6158
|
+
|
|
6159
|
+
const invoiceStatusNames = {
|
|
6160
|
+
open: "Open",
|
|
6161
|
+
paid: "Paid",
|
|
6162
|
+
past_due: "Past Due",
|
|
6163
|
+
payment_failed: "Payment Failed",
|
|
6164
|
+
};
|
|
6165
|
+
|
|
6166
|
+
const jobStatusOrder = [
|
|
6167
|
+
"leads",
|
|
6168
|
+
"contacted",
|
|
6169
|
+
"viewed",
|
|
6170
|
+
"replied",
|
|
6171
|
+
"won",
|
|
6172
|
+
];
|
|
6173
|
+
const getPreviousStatus = (status) => {
|
|
6174
|
+
if (status === "won")
|
|
6175
|
+
return "replied";
|
|
6176
|
+
const index = jobStatusOrder.indexOf(status);
|
|
6177
|
+
return index > 0 ? jobStatusOrder[index - 1] : null;
|
|
6178
|
+
};
|
|
6179
|
+
const getNextStatus = (status) => {
|
|
6180
|
+
const index = jobStatusOrder.indexOf(status);
|
|
6181
|
+
return index < jobStatusOrder.length - 1 ? jobStatusOrder[index + 1] : null;
|
|
6182
|
+
};
|
|
6183
|
+
|
|
6184
|
+
const countryMapping = {
|
|
6185
|
+
USA: "United States",
|
|
6186
|
+
GBR: "United Kingdom",
|
|
6187
|
+
AUS: "Australia",
|
|
6188
|
+
CAN: "Canada",
|
|
6189
|
+
IND: "India",
|
|
6190
|
+
NLD: "Netherlands",
|
|
6191
|
+
ARE: "United Arab Emirates",
|
|
6192
|
+
DEU: "Germany",
|
|
6193
|
+
SAU: "Saudi Arabia",
|
|
6194
|
+
FRA: "France",
|
|
6195
|
+
TUR: "Turkey",
|
|
6196
|
+
CHE: "Switzerland",
|
|
6197
|
+
ISR: "Israel",
|
|
6198
|
+
ITA: "Italy",
|
|
6199
|
+
ESP: "Spain",
|
|
6200
|
+
PAK: "Pakistan",
|
|
6201
|
+
SGP: "Singapore",
|
|
6202
|
+
KAZ: "Kazakhstan",
|
|
6203
|
+
UKR: "Ukraine",
|
|
6204
|
+
IRL: "Ireland",
|
|
6205
|
+
SWE: "Sweden",
|
|
6206
|
+
ZAF: "South Africa",
|
|
6207
|
+
CHN: "China",
|
|
6208
|
+
NOR: "Norway",
|
|
6209
|
+
POL: "Poland",
|
|
6210
|
+
COL: "Colombia",
|
|
6211
|
+
NZL: "New Zealand",
|
|
6212
|
+
ROU: "Romania",
|
|
6213
|
+
BRA: "Brazil",
|
|
6214
|
+
GRC: "Greece",
|
|
6215
|
+
BGR: "Bulgaria",
|
|
6216
|
+
DNK: "Denmark",
|
|
6217
|
+
PHL: "Philippines",
|
|
6218
|
+
BEL: "Belgium",
|
|
6219
|
+
AUT: "Austria",
|
|
6220
|
+
HKG: "Hong Kong",
|
|
6221
|
+
QAT: "Qatar",
|
|
6222
|
+
BGD: "Bangladesh",
|
|
6223
|
+
PRT: "Portugal",
|
|
6224
|
+
CYP: "Cyprus",
|
|
6225
|
+
LKA: "Sri Lanka",
|
|
6226
|
+
NGA: "Nigeria",
|
|
6227
|
+
VNM: "Vietnam",
|
|
6228
|
+
JPN: "Japan",
|
|
6229
|
+
LVA: "Latvia",
|
|
6230
|
+
THA: "Thailand",
|
|
6231
|
+
CZE: "Czech Republic",
|
|
6232
|
+
MEX: "Mexico",
|
|
6233
|
+
EGY: "Egypt",
|
|
6234
|
+
KEN: "Kenya",
|
|
6235
|
+
KWT: "Kuwait",
|
|
6236
|
+
CHL: "Chile",
|
|
6237
|
+
EST: "Estonia",
|
|
6238
|
+
UZB: "Uzbekistan",
|
|
6239
|
+
FIN: "Finland",
|
|
6240
|
+
HRV: "Croatia",
|
|
6241
|
+
HUN: "Hungary",
|
|
6242
|
+
KOR: "South Korea",
|
|
6243
|
+
LTU: "Lithuania",
|
|
6244
|
+
PRI: "Puerto Rico",
|
|
6245
|
+
ALB: "Albania",
|
|
6246
|
+
BHR: "Bahrain",
|
|
6247
|
+
GEO: "Georgia",
|
|
6248
|
+
GTM: "Guatemala",
|
|
6249
|
+
IDN: "Indonesia",
|
|
6250
|
+
LBN: "Lebanon",
|
|
6251
|
+
UGA: "Uganda",
|
|
6252
|
+
ARG: "Argentina",
|
|
6253
|
+
ARM: "Armenia",
|
|
6254
|
+
BMU: "Bermuda",
|
|
6255
|
+
CRI: "Costa Rica",
|
|
6256
|
+
CYM: "Cayman Islands",
|
|
6257
|
+
GHA: "Ghana",
|
|
6258
|
+
ISL: "Iceland",
|
|
6259
|
+
JOR: "Jordan",
|
|
6260
|
+
LUX: "Luxembourg",
|
|
6261
|
+
MAR: "Morocco",
|
|
6262
|
+
MKD: "Macedonia",
|
|
6263
|
+
MLT: "Malta",
|
|
6264
|
+
MYS: "Malaysia",
|
|
6265
|
+
OMN: "Oman",
|
|
6266
|
+
SRB: "Serbia",
|
|
6267
|
+
TWN: "Taiwan",
|
|
6268
|
+
BHS: "Bahamas",
|
|
6269
|
+
DZA: "Algeria",
|
|
6270
|
+
ETH: "Ethiopia",
|
|
6271
|
+
GUY: "Guyana",
|
|
6272
|
+
PAN: "Panama",
|
|
6273
|
+
PER: "Peru",
|
|
6274
|
+
SVK: "Slovakia",
|
|
6275
|
+
SVN: "Slovenia",
|
|
6276
|
+
TTO: "Trinidad and Tobago",
|
|
6277
|
+
URY: "Uruguay",
|
|
6278
|
+
VEN: "Venezuela",
|
|
6279
|
+
VIR: "Virgin Islands",
|
|
6280
|
+
ABW: "Aruba",
|
|
6281
|
+
CMR: "Cameroon",
|
|
6282
|
+
CUW: "Curaçao",
|
|
6283
|
+
GIB: "Gibraltar",
|
|
6284
|
+
HND: "Honduras",
|
|
6285
|
+
JAM: "Jamaica",
|
|
6286
|
+
JEY: "Jersey",
|
|
6287
|
+
MDV: "Maldives",
|
|
6288
|
+
MUS: "Mauritius",
|
|
6289
|
+
TUN: "Tunisia",
|
|
6290
|
+
RUS: "Russia",
|
|
6291
|
+
IRN: "Iran",
|
|
6292
|
+
IRQ: "Iraq",
|
|
6293
|
+
AZE: "Azerbaijan",
|
|
6294
|
+
CIV: "Cote d'Ivoire",
|
|
6295
|
+
PSE: "Palestine",
|
|
6296
|
+
MNE: "Montenegro",
|
|
6297
|
+
BIH: "Bosnia and Herzegovina",
|
|
6298
|
+
IMN: "Isle of Man",
|
|
6299
|
+
PNG: "Papua New Guinea",
|
|
6300
|
+
VCT: "Saint Vincent and the Grenadines",
|
|
6301
|
+
VGB: "British Virgin Islands",
|
|
6302
|
+
};
|
|
6303
|
+
|
|
6304
|
+
const regionMapping = {
|
|
6305
|
+
Africa: [
|
|
6306
|
+
"Algeria",
|
|
6307
|
+
"Angola",
|
|
6308
|
+
"Benin",
|
|
6309
|
+
"Botswana",
|
|
6310
|
+
"Burkina Faso",
|
|
6311
|
+
"Burundi",
|
|
6312
|
+
"Cabo Verde",
|
|
6313
|
+
"Cameroon",
|
|
6314
|
+
"Central African Republic",
|
|
6315
|
+
"Chad",
|
|
6316
|
+
"Comoros",
|
|
6317
|
+
"Congo",
|
|
6318
|
+
"Congo, the Democratic Republic of the",
|
|
6319
|
+
"Cote d'Ivoire",
|
|
6320
|
+
"Djibouti",
|
|
6321
|
+
"Egypt",
|
|
6322
|
+
"Equatorial Guinea",
|
|
6323
|
+
"Eritrea",
|
|
6324
|
+
"Eswatini",
|
|
6325
|
+
"Ethiopia",
|
|
6326
|
+
"Gabon",
|
|
6327
|
+
"Gambia",
|
|
6328
|
+
"Ghana",
|
|
6329
|
+
"Guinea",
|
|
6330
|
+
"Guinea-Bissau",
|
|
6331
|
+
"Kenya",
|
|
6332
|
+
"Lesotho",
|
|
6333
|
+
"Liberia",
|
|
6334
|
+
"Libya",
|
|
6335
|
+
"Madagascar",
|
|
6336
|
+
"Malawi",
|
|
6337
|
+
"Mali",
|
|
6338
|
+
"Mauritania",
|
|
6339
|
+
"Mauritius",
|
|
6340
|
+
"Morocco",
|
|
6341
|
+
"Mozambique",
|
|
6342
|
+
"Namibia",
|
|
6343
|
+
"Niger",
|
|
6344
|
+
"Nigeria",
|
|
6345
|
+
"Rwanda",
|
|
6346
|
+
"Sao Tome and Principe",
|
|
6347
|
+
"Senegal",
|
|
6348
|
+
"Seychelles",
|
|
6349
|
+
"Sierra Leone",
|
|
6350
|
+
"Somalia",
|
|
6351
|
+
"South Africa",
|
|
6352
|
+
"South Sudan",
|
|
6353
|
+
"Sudan",
|
|
6354
|
+
"Tanzania",
|
|
6355
|
+
"Togo",
|
|
6356
|
+
"Tunisia",
|
|
6357
|
+
"Uganda",
|
|
6358
|
+
"Zambia",
|
|
6359
|
+
"Zimbabwe",
|
|
6360
|
+
],
|
|
6361
|
+
Americas: [
|
|
6362
|
+
"Anguilla",
|
|
6363
|
+
"Antigua and Barbuda",
|
|
6364
|
+
"Argentina",
|
|
6365
|
+
"Aruba",
|
|
6366
|
+
"Bahamas",
|
|
6367
|
+
"Barbados",
|
|
6368
|
+
"Belize",
|
|
6369
|
+
"Bermuda",
|
|
6370
|
+
"Bolivia",
|
|
6371
|
+
"Brazil",
|
|
6372
|
+
"British Virgin Islands",
|
|
6373
|
+
"Canada",
|
|
6374
|
+
"Cayman Islands",
|
|
6375
|
+
"Chile",
|
|
6376
|
+
"Colombia",
|
|
6377
|
+
"Costa Rica",
|
|
6378
|
+
"Cuba",
|
|
6379
|
+
"Curacao",
|
|
6380
|
+
"Dominica",
|
|
6381
|
+
"Dominican Republic",
|
|
6382
|
+
"Ecuador",
|
|
6383
|
+
"El Salvador",
|
|
6384
|
+
"Falkland Islands",
|
|
6385
|
+
"French Guiana",
|
|
6386
|
+
"Grenada",
|
|
6387
|
+
"Guadeloupe",
|
|
6388
|
+
"Guatemala",
|
|
6389
|
+
"Guyana",
|
|
6390
|
+
"Haiti",
|
|
6391
|
+
"Honduras",
|
|
6392
|
+
"Jamaica",
|
|
6393
|
+
"Martinique",
|
|
6394
|
+
"Mexico",
|
|
6395
|
+
"Montserrat",
|
|
6396
|
+
"Nicaragua",
|
|
6397
|
+
"Panama",
|
|
6398
|
+
"Paraguay",
|
|
6399
|
+
"Peru",
|
|
6400
|
+
"Puerto Rico",
|
|
6401
|
+
"Saint Kitts and Nevis",
|
|
6402
|
+
"Saint Lucia",
|
|
6403
|
+
"Saint Vincent and the Grenadines",
|
|
6404
|
+
"Suriname",
|
|
6405
|
+
"Trinidad and Tobago",
|
|
6406
|
+
"Turks and Caicos Islands",
|
|
6407
|
+
"United States",
|
|
6408
|
+
"United States Virgin Islands",
|
|
6409
|
+
"Uruguay",
|
|
6410
|
+
"Venezuela",
|
|
6411
|
+
],
|
|
6412
|
+
Antarctica: ["French Southern And Antarctic Lands"],
|
|
6413
|
+
Asia: [
|
|
6414
|
+
"Afghanistan",
|
|
6415
|
+
"Armenia",
|
|
6416
|
+
"Azerbaijan",
|
|
6417
|
+
"Bahrain",
|
|
6418
|
+
"Bangladesh",
|
|
6419
|
+
"Bhutan",
|
|
6420
|
+
"Brunei Darussalam",
|
|
6421
|
+
"Cambodia",
|
|
6422
|
+
"China",
|
|
6423
|
+
"East Timor",
|
|
6424
|
+
"Georgia",
|
|
6425
|
+
"Hong Kong",
|
|
6426
|
+
"India",
|
|
6427
|
+
"Indonesia",
|
|
6428
|
+
"Iran",
|
|
6429
|
+
"Iraq",
|
|
6430
|
+
"Israel",
|
|
6431
|
+
"Japan",
|
|
6432
|
+
"Jordan",
|
|
6433
|
+
"Kazakhstan",
|
|
6434
|
+
"Kuwait",
|
|
6435
|
+
"Kyrgyzstan",
|
|
6436
|
+
"Laos",
|
|
6437
|
+
"Lebanon",
|
|
6438
|
+
"Macao",
|
|
6439
|
+
"Malaysia",
|
|
6440
|
+
"Maldives",
|
|
6441
|
+
"Mongolia",
|
|
6442
|
+
"Myanmar",
|
|
6443
|
+
"Nepal",
|
|
6444
|
+
"Palestine",
|
|
6445
|
+
"Oman",
|
|
6446
|
+
"Pakistan",
|
|
6447
|
+
"Palestinian Territories",
|
|
6448
|
+
"Philippines",
|
|
6449
|
+
"Qatar",
|
|
6450
|
+
"Russia",
|
|
6451
|
+
"Saudi Arabia",
|
|
6452
|
+
"Singapore",
|
|
6453
|
+
"South Korea",
|
|
6454
|
+
"Sri Lanka",
|
|
6455
|
+
"Syria",
|
|
6456
|
+
"Taiwan",
|
|
6457
|
+
"Tajikistan",
|
|
6458
|
+
"Turkey",
|
|
6459
|
+
"Thailand",
|
|
6460
|
+
"Turkmenistan",
|
|
6461
|
+
"United Arab Emirates",
|
|
6462
|
+
"Uzbekistan",
|
|
6463
|
+
"Vietnam",
|
|
6464
|
+
"Yemen",
|
|
6465
|
+
],
|
|
6466
|
+
Europe: [
|
|
6467
|
+
"Albania",
|
|
6468
|
+
"Andorra",
|
|
6469
|
+
"Austria",
|
|
6470
|
+
"Belarus",
|
|
6471
|
+
"Belgium",
|
|
6472
|
+
"Bosnia and Herzegovina",
|
|
6473
|
+
"Bulgaria",
|
|
6474
|
+
"Croatia",
|
|
6475
|
+
"Cyprus",
|
|
6476
|
+
"Czech Republic",
|
|
6477
|
+
"Denmark",
|
|
6478
|
+
"Estonia",
|
|
6479
|
+
"Faroe Islands",
|
|
6480
|
+
"Finland",
|
|
6481
|
+
"France",
|
|
6482
|
+
"Germany",
|
|
6483
|
+
"Gibraltar",
|
|
6484
|
+
"Greece",
|
|
6485
|
+
"Guernsey",
|
|
6486
|
+
"Hungary",
|
|
6487
|
+
"Iceland",
|
|
6488
|
+
"Ireland",
|
|
6489
|
+
"Isle of Man",
|
|
6490
|
+
"Italy",
|
|
6491
|
+
"Jersey",
|
|
6492
|
+
"Latvia",
|
|
6493
|
+
"Liechtenstein",
|
|
6494
|
+
"Lithuania",
|
|
6495
|
+
"Luxembourg",
|
|
6496
|
+
"Malta",
|
|
6497
|
+
"Moldova",
|
|
6498
|
+
"Monaco",
|
|
6499
|
+
"Montenegro",
|
|
6500
|
+
"Netherlands",
|
|
6501
|
+
"Macedonia",
|
|
6502
|
+
"Norway",
|
|
6503
|
+
"Poland",
|
|
6504
|
+
"Portugal",
|
|
6505
|
+
"Romania",
|
|
6506
|
+
"San Marino",
|
|
6507
|
+
"Serbia",
|
|
6508
|
+
"Slovakia",
|
|
6509
|
+
"Slovenia",
|
|
6510
|
+
"Spain",
|
|
6511
|
+
"Sweden",
|
|
6512
|
+
"Switzerland",
|
|
6513
|
+
"Ukraine",
|
|
6514
|
+
"United Kingdom",
|
|
6515
|
+
"Vatican City",
|
|
6516
|
+
],
|
|
6517
|
+
Oceania: [
|
|
6518
|
+
"American Samoa",
|
|
6519
|
+
"Australia",
|
|
6520
|
+
"Cook Islands",
|
|
6521
|
+
"Fiji",
|
|
6522
|
+
"French Polynesia",
|
|
6523
|
+
"Guam",
|
|
6524
|
+
"Kiribati",
|
|
6525
|
+
"Marshall Islands",
|
|
6526
|
+
"Micronesia",
|
|
6527
|
+
"Nauru",
|
|
6528
|
+
"New Caledonia",
|
|
6529
|
+
"New Zealand",
|
|
6530
|
+
"Niue",
|
|
6531
|
+
"Northern Mariana Islands",
|
|
6532
|
+
"Palau",
|
|
6533
|
+
"Papua New Guinea",
|
|
6534
|
+
"Samoa",
|
|
6535
|
+
"Solomon Islands",
|
|
6536
|
+
"Tokelau",
|
|
6537
|
+
"Tonga",
|
|
6538
|
+
"Tuvalu",
|
|
6539
|
+
"Vanuatu",
|
|
6540
|
+
"Wallis and Futuna",
|
|
6541
|
+
],
|
|
6542
|
+
};
|
|
6543
|
+
|
|
6544
|
+
const accountStatusSchema = z.enum([
|
|
6545
|
+
'pending_credentials_verification',
|
|
6546
|
+
'valid_credentials',
|
|
6547
|
+
'invalid_credentials',
|
|
6548
|
+
]);
|
|
6406
6549
|
|
|
6407
6550
|
const proxyCountryEnum = z.enum([
|
|
6408
6551
|
'US',
|
|
@@ -8945,133 +9088,6 @@ const syncProposalsStatusRequestPayloadSchema = z.object({
|
|
|
8945
9088
|
bidderAccountId: z.string(),
|
|
8946
9089
|
});
|
|
8947
9090
|
|
|
8948
|
-
const roomNoteSchema = z.object({
|
|
8949
|
-
note: z.string().nullable(),
|
|
8950
|
-
createdAt: z.number(),
|
|
8951
|
-
updatedAt: z.number(),
|
|
8952
|
-
});
|
|
8953
|
-
const roomCrmStatusEnum = z.enum([
|
|
8954
|
-
'new',
|
|
8955
|
-
'follow_up',
|
|
8956
|
-
'qualified',
|
|
8957
|
-
'won',
|
|
8958
|
-
'archived',
|
|
8959
|
-
]);
|
|
8960
|
-
const roomCrmArchivedReasonEnum = z.enum([
|
|
8961
|
-
'completed',
|
|
8962
|
-
'not_fit',
|
|
8963
|
-
'lost',
|
|
8964
|
-
'no_response',
|
|
8965
|
-
'other',
|
|
8966
|
-
]);
|
|
8967
|
-
const roomJobClientHistorySchema = z.object({
|
|
8968
|
-
jobUrl: z.string().nullable(),
|
|
8969
|
-
title: z.string().nullable(),
|
|
8970
|
-
clientInfo: clientInfoSchema.nullable(),
|
|
8971
|
-
});
|
|
8972
|
-
const roomSchema = z.object({
|
|
8973
|
-
id: z.string(),
|
|
8974
|
-
roomId: z.string(),
|
|
8975
|
-
roomName: z.string(),
|
|
8976
|
-
topic: z.string(),
|
|
8977
|
-
organizationUid: z.string(),
|
|
8978
|
-
organizationType: z.string(),
|
|
8979
|
-
recentTimestamp: z.number(),
|
|
8980
|
-
organizationName: z.string(),
|
|
8981
|
-
context: z.object({
|
|
8982
|
-
freelancerId: z.string(),
|
|
8983
|
-
freelancerOrgId: z.string(),
|
|
8984
|
-
freelancerName: z.string().optional(),
|
|
8985
|
-
clientId: z.string().optional(),
|
|
8986
|
-
clientName: z.string().optional(),
|
|
8987
|
-
jobTitle: z.string().optional(),
|
|
8988
|
-
currentStatus: z.string().optional(),
|
|
8989
|
-
associatedAgencyOrgId: z.string().optional(),
|
|
8990
|
-
}),
|
|
8991
|
-
numUnread: z.number(),
|
|
8992
|
-
latestStory: z
|
|
8993
|
-
.object({
|
|
8994
|
-
message: z.string(),
|
|
8995
|
-
created: z.number(),
|
|
8996
|
-
messageId: z.string().optional(),
|
|
8997
|
-
senderName: z.string().optional(),
|
|
8998
|
-
})
|
|
8999
|
-
.optional(),
|
|
9000
|
-
lastChecked: z.number().optional(),
|
|
9001
|
-
hasNewMessages: z.boolean().optional(),
|
|
9002
|
-
updatedAt: z.number().optional(),
|
|
9003
|
-
lastFetchedAt: z.number().optional(),
|
|
9004
|
-
roomTypeExtended: z.string().optional(),
|
|
9005
|
-
roomNote: roomNoteSchema.optional(),
|
|
9006
|
-
crmStatus: roomCrmStatusEnum.optional(),
|
|
9007
|
-
crmStatusUpdatedAt: z.number().optional(),
|
|
9008
|
-
crmArchivedReason: roomCrmArchivedReasonEnum.optional().nullable(),
|
|
9009
|
-
jobClientHistory: roomJobClientHistorySchema.optional(),
|
|
9010
|
-
});
|
|
9011
|
-
const roomsMetadataSchema = z.object({
|
|
9012
|
-
accountId: z.string(),
|
|
9013
|
-
lastUpdated: z.number(),
|
|
9014
|
-
totalRooms: z.number(),
|
|
9015
|
-
});
|
|
9016
|
-
const roomMessageSchema = z
|
|
9017
|
-
.object({
|
|
9018
|
-
messageId: z.string(),
|
|
9019
|
-
userId: z.string(),
|
|
9020
|
-
message: z.string(),
|
|
9021
|
-
created: z.number(),
|
|
9022
|
-
userName: z.string().optional(),
|
|
9023
|
-
orgId: z.string().optional(),
|
|
9024
|
-
senderName: z.string().optional(),
|
|
9025
|
-
attachmentUrl: z.string().optional(),
|
|
9026
|
-
startedPreparingDownloadAt: z.number().optional(),
|
|
9027
|
-
})
|
|
9028
|
-
.passthrough();
|
|
9029
|
-
const getRoomsResponseSchema = z.object({
|
|
9030
|
-
data: z.array(roomSchema),
|
|
9031
|
-
pagination: z.object({
|
|
9032
|
-
hasMore: z.boolean(),
|
|
9033
|
-
nextCursor: z.string().nullable(),
|
|
9034
|
-
limit: z.number(),
|
|
9035
|
-
total: z.number(),
|
|
9036
|
-
}),
|
|
9037
|
-
});
|
|
9038
|
-
const roomTagSchema = z.object({
|
|
9039
|
-
id: z.string(),
|
|
9040
|
-
name: z.string(),
|
|
9041
|
-
color: z.string().optional(),
|
|
9042
|
-
createdAt: z.number(),
|
|
9043
|
-
updatedAt: z.number().optional(),
|
|
9044
|
-
});
|
|
9045
|
-
const createRoomTagRequestBodySchema = z.object({
|
|
9046
|
-
name: z.string(),
|
|
9047
|
-
color: z.string().optional(),
|
|
9048
|
-
});
|
|
9049
|
-
const assignRoomTagsRequestBodySchema = z.object({
|
|
9050
|
-
tagIds: z.array(z.string()),
|
|
9051
|
-
});
|
|
9052
|
-
const updateRoomNotesRequestBodySchema = z.object({
|
|
9053
|
-
note: z.string(),
|
|
9054
|
-
});
|
|
9055
|
-
const updateRoomCrmStatusRequestBodySchema = z.object({
|
|
9056
|
-
status: roomCrmStatusEnum,
|
|
9057
|
-
archivedReason: roomCrmArchivedReasonEnum.optional(),
|
|
9058
|
-
});
|
|
9059
|
-
const sendMessageRequestSchema = z.object({
|
|
9060
|
-
message: z.string(),
|
|
9061
|
-
file: z.instanceof(File).optional(),
|
|
9062
|
-
});
|
|
9063
|
-
const freeSlotsRequestBodySchema = z.object({
|
|
9064
|
-
userId: z.string(),
|
|
9065
|
-
durationMinutes: z.number(),
|
|
9066
|
-
});
|
|
9067
|
-
const bookSlotRequestBodySchema = z.object({
|
|
9068
|
-
ownerUid: z.string(),
|
|
9069
|
-
duration: z.number(),
|
|
9070
|
-
platform: z.string(),
|
|
9071
|
-
startTime: z.number(),
|
|
9072
|
-
endTime: z.number(),
|
|
9073
|
-
});
|
|
9074
|
-
|
|
9075
9091
|
const campaignStatsSchema = z.object({
|
|
9076
9092
|
contacted: z.number(),
|
|
9077
9093
|
viewed: z.number(),
|
|
@@ -15840,6 +15856,7 @@ const ROUTES = {
|
|
|
15840
15856
|
JOBS: {
|
|
15841
15857
|
BASE: 'jobs',
|
|
15842
15858
|
BY_ID: (id) => `jobs/${id}`,
|
|
15859
|
+
BY_UID: (uid) => `jobs/by-uid/${uid}`,
|
|
15843
15860
|
UPDATE_ACTIVITY: `jobs/update-activity`,
|
|
15844
15861
|
IMPORT: 'jobs/import',
|
|
15845
15862
|
FILTER_OPTIONS: 'jobs/filter-options',
|
|
@@ -15933,7 +15950,18 @@ const ROUTES = {
|
|
|
15933
15950
|
TEST_SUITABILITY: 'admin/agent/test-suitability',
|
|
15934
15951
|
TEST_PROPOSAL: 'admin/agent/test-proposal',
|
|
15935
15952
|
},
|
|
15953
|
+
UPWORK_INVITATIONS_CONFIG: {
|
|
15954
|
+
BASE: 'admin/upwork-invitation-bucket-account',
|
|
15955
|
+
},
|
|
15956
|
+
BIDDER_INSTANCES: {
|
|
15957
|
+
BASE: 'admin/bidder-instances',
|
|
15958
|
+
BY_ID: (id) => `admin/bidder-instances/${id}`,
|
|
15959
|
+
ASSIGN_ACCOUNTS: (id) => `admin/bidder-instances/${id}/assign-accounts`,
|
|
15960
|
+
UNASSIGN_ACCOUNTS: (id) => `admin/bidder-instances/${id}/unassign-accounts`,
|
|
15961
|
+
SET_DEFAULT: (id) => `admin/bidder-instances/${id}/set-default`,
|
|
15962
|
+
},
|
|
15936
15963
|
BILLING: {
|
|
15964
|
+
BASE: 'admin/billing',
|
|
15937
15965
|
PLANS: {
|
|
15938
15966
|
BASE: 'admin/billing/plans',
|
|
15939
15967
|
BY_ID: (id) => `admin/billing/plans/${id}`,
|
|
@@ -15947,16 +15975,6 @@ const ROUTES = {
|
|
|
15947
15975
|
BY_ID: (id) => `admin/billing/features/${id}`,
|
|
15948
15976
|
},
|
|
15949
15977
|
},
|
|
15950
|
-
UPWORK_INVITATIONS_CONFIG: {
|
|
15951
|
-
BASE: 'admin/upwork-invitation-bucket-account',
|
|
15952
|
-
},
|
|
15953
|
-
BIDDER_INSTANCES: {
|
|
15954
|
-
BASE: 'admin/bidder-instances',
|
|
15955
|
-
BY_ID: (id) => `admin/bidder-instances/${id}`,
|
|
15956
|
-
ASSIGN_ACCOUNTS: (id) => `admin/bidder-instances/${id}/assign-accounts`,
|
|
15957
|
-
UNASSIGN_ACCOUNTS: (id) => `admin/bidder-instances/${id}/unassign-accounts`,
|
|
15958
|
-
SET_DEFAULT: (id) => `admin/bidder-instances/${id}/set-default`,
|
|
15959
|
-
},
|
|
15960
15978
|
},
|
|
15961
15979
|
BID: {
|
|
15962
15980
|
BASE: 'bid',
|
|
@@ -16020,9 +16038,13 @@ const ROUTES = {
|
|
|
16020
16038
|
ROOM_TAG: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/tags`,
|
|
16021
16039
|
ROOM_NOTES: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/notes`,
|
|
16022
16040
|
ROOM_CRM_STATUS: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/crm-status`,
|
|
16041
|
+
ROOM_DEAL_VALUE: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/deal-value`,
|
|
16042
|
+
ROOM_TASKS: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/tasks`,
|
|
16043
|
+
ROOM_TASK_BY_ID: (organizationId, bidderAccountId, roomId, taskId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/tasks/${taskId}`,
|
|
16023
16044
|
CONNECT_ACCOUNT: (organizationId, bidderAccountId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/chat/connect-account`,
|
|
16024
16045
|
ROOMS: (id, bidderAccountId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms`,
|
|
16025
16046
|
ROOM: (id, bidderAccountId, roomId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms/${roomId}`,
|
|
16047
|
+
ROOM_METADATA: (id, bidderAccountId, roomId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/metadata`,
|
|
16026
16048
|
REFRESH_ROOM: (id, bidderAccountId, roomId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/refresh`,
|
|
16027
16049
|
SEND_MESSAGE: (id, bidderAccountId, roomId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/send-message`,
|
|
16028
16050
|
REFRESH_ROOMS: (organizationId, bidderAccountId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/chat/refresh-rooms`,
|
|
@@ -16034,6 +16056,7 @@ const ROUTES = {
|
|
|
16034
16056
|
GET_FREE_SLOTS: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/free-slots`,
|
|
16035
16057
|
BOOK_SLOT: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/book-slot`,
|
|
16036
16058
|
ATTACHMENT_REDIRECT: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/attachment-redirect`,
|
|
16059
|
+
PIPELINE_LIST_ROOMS: (organizationId) => `organizations/${organizationId}/chat/pipeline-list-rooms`,
|
|
16037
16060
|
},
|
|
16038
16061
|
},
|
|
16039
16062
|
LEADS_BY_JOB_ID: (organizationId, jobId) => `organizations/${organizationId}/leads/${jobId}`,
|
|
@@ -16115,6 +16138,9 @@ const ROUTES = {
|
|
|
16115
16138
|
BASE: (id) => `organizations/${id}/users`,
|
|
16116
16139
|
BY_ID: (organizationId, userId) => `organizations/${organizationId}/users/${userId}`,
|
|
16117
16140
|
},
|
|
16141
|
+
ALL_TASKS: (organizationId) => `organizations/${organizationId}/tasks`,
|
|
16142
|
+
PIPELINE_TOTALS: (organizationId) => `organizations/${organizationId}/pipeline/totals`,
|
|
16143
|
+
PIPELINE_COLUMNS: (organizationId) => `organizations/${organizationId}/pipeline/columns`,
|
|
16118
16144
|
INVOICE_PREVIEW: (id) => `organizations/${id}/invoice-preview`,
|
|
16119
16145
|
},
|
|
16120
16146
|
TRANSACTIONS: {
|
|
@@ -24817,6 +24843,8 @@ exports.CAMPAIGN_NOTIFICATION_SETTINGS = CAMPAIGN_NOTIFICATION_SETTINGS;
|
|
|
24817
24843
|
exports.CAMPAIGN_NOTIFICATION_TYPES = CAMPAIGN_NOTIFICATION_TYPES;
|
|
24818
24844
|
exports.CLIENT_SIZE_TO_NUMBER = CLIENT_SIZE_TO_NUMBER;
|
|
24819
24845
|
exports.CloudflareChallengeFailedException = CloudflareChallengeFailedException;
|
|
24846
|
+
exports.DEFAULT_PIPELINE_COLUMNS = DEFAULT_PIPELINE_COLUMNS;
|
|
24847
|
+
exports.DEFAULT_PIPELINE_COLUMN_ID = DEFAULT_PIPELINE_COLUMN_ID;
|
|
24820
24848
|
exports.DEFAULT_ROOM_CRM_STATUS = DEFAULT_ROOM_CRM_STATUS;
|
|
24821
24849
|
exports.DeleteMultiloginProfileException = DeleteMultiloginProfileException;
|
|
24822
24850
|
exports.DropdownOptionNotPresentException = DropdownOptionNotPresentException;
|
|
@@ -24855,6 +24883,9 @@ exports.NoBidderAccountsAvailableException = NoBidderAccountsAvailableException;
|
|
|
24855
24883
|
exports.NoGoogleOAuthTokensFoundException = NoGoogleOAuthTokensFoundException;
|
|
24856
24884
|
exports.NoScraperAccountAvailableException = NoScraperAccountAvailableException;
|
|
24857
24885
|
exports.OpenPageException = OpenPageException;
|
|
24886
|
+
exports.PIPELINE_COLUMN_COLORS = PIPELINE_COLUMN_COLORS;
|
|
24887
|
+
exports.PIPELINE_DEAL_VALUE_EXCLUDED_COLUMN_IDS = PIPELINE_DEAL_VALUE_EXCLUDED_COLUMN_IDS;
|
|
24888
|
+
exports.PIPELINE_LIST_SORT_FIELDS = PIPELINE_LIST_SORT_FIELDS;
|
|
24858
24889
|
exports.PageClosedException = PageClosedException;
|
|
24859
24890
|
exports.PageContentException = PageContentException;
|
|
24860
24891
|
exports.ParseConnectsException = ParseConnectsException;
|
|
@@ -24867,13 +24898,7 @@ exports.ProposalSubmitFailedException = ProposalSubmitFailedException;
|
|
|
24867
24898
|
exports.ProxyNotReachableException = ProxyNotReachableException;
|
|
24868
24899
|
exports.PuppeteerConnectionErrorException = PuppeteerConnectionErrorException;
|
|
24869
24900
|
exports.QuestionPairNotMatchingException = QuestionPairNotMatchingException;
|
|
24870
|
-
exports.ROOM_CRM_ARCHIVED_REASON_LABELS = ROOM_CRM_ARCHIVED_REASON_LABELS;
|
|
24871
24901
|
exports.ROOM_CRM_ARCHIVED_REASON_ORDER = ROOM_CRM_ARCHIVED_REASON_ORDER;
|
|
24872
|
-
exports.ROOM_CRM_KANBAN_STATUS_ORDER = ROOM_CRM_KANBAN_STATUS_ORDER;
|
|
24873
|
-
exports.ROOM_CRM_STATUS_BY_ID = ROOM_CRM_STATUS_BY_ID;
|
|
24874
|
-
exports.ROOM_CRM_STATUS_IDS = ROOM_CRM_STATUS_IDS;
|
|
24875
|
-
exports.ROOM_CRM_STATUS_LABELS = ROOM_CRM_STATUS_LABELS;
|
|
24876
|
-
exports.ROOM_CRM_STATUS_ORDER = ROOM_CRM_STATUS_ORDER;
|
|
24877
24902
|
exports.ROOM_EXTENDED_TYPE_MAP = ROOM_EXTENDED_TYPE_MAP;
|
|
24878
24903
|
exports.ROOM_TYPES_MATCHING_EMPTY_EXTENDED_TYPE = ROOM_TYPES_MATCHING_EMPTY_EXTENDED_TYPE;
|
|
24879
24904
|
exports.ROUTES = ROUTES;
|
|
@@ -24989,6 +25014,7 @@ exports.createHourlyRateFormSchema = createHourlyRateFormSchema;
|
|
|
24989
25014
|
exports.createOrganizationProfileSchema = createOrganizationProfileSchema;
|
|
24990
25015
|
exports.createOrganizationSchema = createOrganizationSchema;
|
|
24991
25016
|
exports.createRoomTagRequestBodySchema = createRoomTagRequestBodySchema;
|
|
25017
|
+
exports.createRoomTaskRequestBodySchema = createRoomTaskRequestBodySchema;
|
|
24992
25018
|
exports.createSampleSchema = createSampleSchema;
|
|
24993
25019
|
exports.createScraperAccountSchema = createScraperAccountSchema;
|
|
24994
25020
|
exports.createSuitabilityFormSchema = createSuitabilityFormSchema;
|
|
@@ -25057,6 +25083,7 @@ exports.getMultiloginBrowserException = getMultiloginBrowserException;
|
|
|
25057
25083
|
exports.getNextStatus = getNextStatus;
|
|
25058
25084
|
exports.getOrganizationLeadsRequestQuerySchema = getOrganizationLeadsRequestQuerySchema;
|
|
25059
25085
|
exports.getOrganizationLeadsStatusEnum = getOrganizationLeadsStatusEnum;
|
|
25086
|
+
exports.getPipelineListRoomsResponseSchema = getPipelineListRoomsResponseSchema;
|
|
25060
25087
|
exports.getPreviousStatus = getPreviousStatus;
|
|
25061
25088
|
exports.getRoomsResponseSchema = getRoomsResponseSchema;
|
|
25062
25089
|
exports.getRouteWithoutAdminPrefix = getRouteWithoutAdminPrefix;
|
|
@@ -25092,7 +25119,6 @@ exports.invoiceStripeMetadataSchema = invoiceStripeMetadataSchema;
|
|
|
25092
25119
|
exports.isNumeric = isNumeric;
|
|
25093
25120
|
exports.isPaymentVerifiedEnum = isPaymentVerifiedEnum;
|
|
25094
25121
|
exports.isPhoneVerifiedEnum = isPhoneVerifiedEnum;
|
|
25095
|
-
exports.isRoomCrmStatus = isRoomCrmStatus;
|
|
25096
25122
|
exports.isTrackedBidFailureMonitoringCode = isTrackedBidFailureMonitoringCode;
|
|
25097
25123
|
exports.isUserFacingCredentialErrorCode = isUserFacingCredentialErrorCode;
|
|
25098
25124
|
exports.isWorkTime = isWorkTime;
|
|
@@ -25168,6 +25194,7 @@ exports.periodTypeSchema = periodTypeSchema;
|
|
|
25168
25194
|
exports.periodUsageSchema = periodUsageSchema;
|
|
25169
25195
|
exports.pickProfileRequestSchema = pickProfileRequestSchema;
|
|
25170
25196
|
exports.pickProfileResponseSchema = pickProfileResponseSchema;
|
|
25197
|
+
exports.pipelineColumnSchema = pipelineColumnSchema;
|
|
25171
25198
|
exports.planFeatureSchema = planFeatureSchema;
|
|
25172
25199
|
exports.planPricingIntervalSchema = planPricingIntervalSchema;
|
|
25173
25200
|
exports.planPricingSchema = planPricingSchema;
|
|
@@ -25218,6 +25245,7 @@ exports.roomMessageSchema = roomMessageSchema;
|
|
|
25218
25245
|
exports.roomNoteSchema = roomNoteSchema;
|
|
25219
25246
|
exports.roomSchema = roomSchema;
|
|
25220
25247
|
exports.roomTagSchema = roomTagSchema;
|
|
25248
|
+
exports.roomTaskSchema = roomTaskSchema;
|
|
25221
25249
|
exports.roomsMetadataSchema = roomsMetadataSchema;
|
|
25222
25250
|
exports.sampleSchema = sampleSchema;
|
|
25223
25251
|
exports.savedSearchSchema = savedSearchSchema;
|
|
@@ -25281,8 +25309,11 @@ exports.updateChatbotSchema = updateChatbotSchema;
|
|
|
25281
25309
|
exports.updateLeadStatusSchema = updateLeadStatusSchema;
|
|
25282
25310
|
exports.updateOrganizationLeadsStatusPayloadSchema = updateOrganizationLeadsStatusPayloadSchema;
|
|
25283
25311
|
exports.updateOrganizationProfileSchema = updateOrganizationProfileSchema;
|
|
25312
|
+
exports.updatePipelineColumnsRequestBodySchema = updatePipelineColumnsRequestBodySchema;
|
|
25284
25313
|
exports.updateRoomCrmStatusRequestBodySchema = updateRoomCrmStatusRequestBodySchema;
|
|
25314
|
+
exports.updateRoomDealValueRequestBodySchema = updateRoomDealValueRequestBodySchema;
|
|
25285
25315
|
exports.updateRoomNotesRequestBodySchema = updateRoomNotesRequestBodySchema;
|
|
25316
|
+
exports.updateRoomTaskRequestBodySchema = updateRoomTaskRequestBodySchema;
|
|
25286
25317
|
exports.updateSampleSchema = updateSampleSchema;
|
|
25287
25318
|
exports.updateScraperAccountSchema = updateScraperAccountSchema;
|
|
25288
25319
|
exports.updateSuitableLeadNotificationBodySchema = updateSuitableLeadNotificationBodySchema;
|