lancer-shared 1.2.346 → 1.2.348
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 +1810 -1775
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +1799 -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 +651 -21
- 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,834 @@ 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
|
+
'meeting_arranged',
|
|
5824
|
+
'proposal_sent',
|
|
5825
|
+
'won',
|
|
5826
|
+
'lost',
|
|
5827
|
+
'archived',
|
|
5828
|
+
]);
|
|
5829
|
+
const roomCrmArchivedReasonEnum = z.enum([
|
|
5830
|
+
'completed',
|
|
5831
|
+
'not_fit',
|
|
5832
|
+
'lost',
|
|
5833
|
+
'no_response',
|
|
5834
|
+
'other',
|
|
5835
|
+
]);
|
|
5836
|
+
const pipelineColumnSchema = z.object({
|
|
5837
|
+
id: z.string(),
|
|
5838
|
+
label: z.string(),
|
|
5839
|
+
color: z.string(),
|
|
5840
|
+
position: z.number(),
|
|
5841
|
+
});
|
|
5842
|
+
const roomJobClientHistorySchema = z.object({
|
|
5843
|
+
jobUrl: z.string().nullable(),
|
|
5844
|
+
title: z.string().nullable(),
|
|
5845
|
+
campaignId: z.string().nullable().optional(),
|
|
5846
|
+
clientInfo: clientInfoSchema.nullable(),
|
|
5847
|
+
});
|
|
5848
|
+
const roomSchema = z.object({
|
|
5849
|
+
id: z.string(),
|
|
5850
|
+
roomId: z.string(),
|
|
5851
|
+
roomName: z.string(),
|
|
5852
|
+
topic: z.string(),
|
|
5853
|
+
organizationUid: z.string(),
|
|
5854
|
+
organizationType: z.string(),
|
|
5855
|
+
recentTimestamp: z.number(),
|
|
5856
|
+
organizationName: z.string(),
|
|
5857
|
+
context: z.object({
|
|
5858
|
+
freelancerId: z.string(),
|
|
5859
|
+
freelancerOrgId: z.string(),
|
|
5860
|
+
freelancerName: z.string().optional(),
|
|
5861
|
+
clientId: z.string().optional(),
|
|
5862
|
+
clientName: z.string().optional(),
|
|
5863
|
+
jobTitle: z.string().optional(),
|
|
5864
|
+
currentStatus: z.string().optional(),
|
|
5865
|
+
associatedAgencyOrgId: z.string().optional(),
|
|
5866
|
+
}),
|
|
5867
|
+
numUnread: z.number(),
|
|
5868
|
+
latestStory: z
|
|
5869
|
+
.object({
|
|
5870
|
+
message: z.string(),
|
|
5871
|
+
created: z.number(),
|
|
5872
|
+
messageId: z.string().optional(),
|
|
5873
|
+
senderName: z.string().optional(),
|
|
5874
|
+
})
|
|
5875
|
+
.optional(),
|
|
5876
|
+
lastChecked: z.number().optional(),
|
|
5877
|
+
hasNewMessages: z.boolean().optional(),
|
|
5878
|
+
updatedAt: z.number().optional(),
|
|
5879
|
+
lastFetchedAt: z.number().optional(),
|
|
5880
|
+
roomTypeExtended: z.string().optional(),
|
|
5881
|
+
roomNote: roomNoteSchema.optional(),
|
|
5882
|
+
crmStatus: z.string().optional(),
|
|
5883
|
+
crmStatusUpdatedAt: z.number().optional(),
|
|
5884
|
+
crmArchivedReason: roomCrmArchivedReasonEnum.optional().nullable(),
|
|
5885
|
+
dealValue: z.number().nullable().optional(),
|
|
5886
|
+
jobClientHistory: roomJobClientHistorySchema.optional(),
|
|
5887
|
+
});
|
|
5888
|
+
const roomsMetadataSchema = z.object({
|
|
5889
|
+
accountId: z.string(),
|
|
5890
|
+
lastUpdated: z.number(),
|
|
5891
|
+
totalRooms: z.number(),
|
|
5892
|
+
});
|
|
5893
|
+
const roomMessageSchema = z
|
|
5894
|
+
.object({
|
|
5895
|
+
messageId: z.string(),
|
|
5896
|
+
userId: z.string(),
|
|
5897
|
+
message: z.string(),
|
|
5898
|
+
created: z.number(),
|
|
5899
|
+
userName: z.string().optional(),
|
|
5900
|
+
orgId: z.string().optional(),
|
|
5901
|
+
senderName: z.string().optional(),
|
|
5902
|
+
attachmentUrl: z.string().optional(),
|
|
5903
|
+
startedPreparingDownloadAt: z.number().optional(),
|
|
5904
|
+
})
|
|
5905
|
+
.passthrough();
|
|
5906
|
+
const getRoomsResponseSchema = z.object({
|
|
5907
|
+
data: z.array(roomSchema),
|
|
5908
|
+
pagination: z.object({
|
|
5909
|
+
hasMore: z.boolean(),
|
|
5910
|
+
nextCursor: z.string().nullable(),
|
|
5911
|
+
limit: z.number(),
|
|
5912
|
+
total: z.number(),
|
|
5913
|
+
}),
|
|
5914
|
+
});
|
|
5915
|
+
const getPipelineListRoomsResponseSchema = z.object({
|
|
5916
|
+
data: z.array(roomSchema.extend({ bidderAccountId: z.string() })),
|
|
5917
|
+
pagination: z.object({
|
|
5918
|
+
hasMore: z.boolean(),
|
|
5919
|
+
nextCursor: z.string().nullable(),
|
|
5920
|
+
limit: z.number(),
|
|
5921
|
+
total: z.number(),
|
|
5922
|
+
}),
|
|
5923
|
+
});
|
|
5924
|
+
const roomTagSchema = z.object({
|
|
5925
|
+
id: z.string(),
|
|
5926
|
+
name: z.string(),
|
|
5927
|
+
color: z.string().optional(),
|
|
5928
|
+
createdAt: z.number(),
|
|
5929
|
+
updatedAt: z.number().optional(),
|
|
5930
|
+
});
|
|
5931
|
+
const createRoomTagRequestBodySchema = z.object({
|
|
5932
|
+
name: z.string(),
|
|
5933
|
+
color: z.string().optional(),
|
|
5934
|
+
});
|
|
5935
|
+
const assignRoomTagsRequestBodySchema = z.object({
|
|
5936
|
+
tagIds: z.array(z.string()),
|
|
5937
|
+
});
|
|
5938
|
+
const updateRoomNotesRequestBodySchema = z.object({
|
|
5939
|
+
note: z.string(),
|
|
5940
|
+
});
|
|
5941
|
+
const updateRoomCrmStatusRequestBodySchema = z.object({
|
|
5942
|
+
status: z.string(),
|
|
5943
|
+
archivedReason: roomCrmArchivedReasonEnum.optional(),
|
|
5944
|
+
});
|
|
5945
|
+
const updateRoomDealValueRequestBodySchema = z.object({
|
|
5946
|
+
dealValue: z.number().nullable(),
|
|
6330
5947
|
});
|
|
6331
|
-
const
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
5948
|
+
const roomTaskSchema = z.object({
|
|
5949
|
+
id: z.string(),
|
|
5950
|
+
roomId: z.string(),
|
|
5951
|
+
title: z.string(),
|
|
5952
|
+
completed: z.boolean(),
|
|
5953
|
+
dueDate: z.number().nullable().optional(),
|
|
5954
|
+
createdAt: z.number(),
|
|
5955
|
+
updatedAt: z.number().optional(),
|
|
5956
|
+
completedAt: z.number().nullable().optional(),
|
|
5957
|
+
organizationId: z.string(),
|
|
5958
|
+
bidderAccountId: z.string(),
|
|
6337
5959
|
});
|
|
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(),
|
|
5960
|
+
const createRoomTaskRequestBodySchema = z.object({
|
|
5961
|
+
title: z.string(),
|
|
5962
|
+
dueDate: z.number().nullable().optional(),
|
|
6350
5963
|
});
|
|
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(),
|
|
5964
|
+
const updateRoomTaskRequestBodySchema = z.object({
|
|
5965
|
+
title: z.string().optional(),
|
|
5966
|
+
completed: z.boolean().optional(),
|
|
5967
|
+
dueDate: z.number().nullable().optional(),
|
|
6383
5968
|
});
|
|
6384
|
-
const
|
|
6385
|
-
|
|
6386
|
-
jobUrl: stringType(),
|
|
6387
|
-
data: jobActivitySchema,
|
|
6388
|
-
offsetHour: jobActivityOffsetHourSchema,
|
|
6389
|
-
scrapedAt: numberType(),
|
|
5969
|
+
const updatePipelineColumnsRequestBodySchema = z.object({
|
|
5970
|
+
columns: z.array(pipelineColumnSchema),
|
|
6390
5971
|
});
|
|
6391
|
-
const
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
postedAt: numberType(),
|
|
6395
|
-
scrapedAt: numberType(),
|
|
6396
|
-
hoursSincePosted: numberType(),
|
|
5972
|
+
const sendMessageRequestSchema = z.object({
|
|
5973
|
+
message: z.string(),
|
|
5974
|
+
file: z.instanceof(File).optional(),
|
|
6397
5975
|
});
|
|
6398
|
-
const
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
jobUrl: stringType().nullable(),
|
|
6402
|
-
datetime: stringType().nullable(),
|
|
6403
|
-
isFeatured: booleanType().nullable(),
|
|
6404
|
-
region: regionSchema.nullable(),
|
|
5976
|
+
const freeSlotsRequestBodySchema = z.object({
|
|
5977
|
+
userId: z.string(),
|
|
5978
|
+
durationMinutes: z.number(),
|
|
6405
5979
|
});
|
|
5980
|
+
const bookSlotRequestBodySchema = z.object({
|
|
5981
|
+
ownerUid: z.string(),
|
|
5982
|
+
duration: z.number(),
|
|
5983
|
+
platform: z.string(),
|
|
5984
|
+
startTime: z.number(),
|
|
5985
|
+
endTime: z.number(),
|
|
5986
|
+
});
|
|
5987
|
+
|
|
5988
|
+
const ROOM_EXTENDED_TYPE_MAP = {
|
|
5989
|
+
proposal: ['fl-proposal'],
|
|
5990
|
+
dm: ['direct_message'],
|
|
5991
|
+
invite: ['client-invitation', 'direct_hire_FL_profile'],
|
|
5992
|
+
};
|
|
5993
|
+
const ROOM_TYPES_MATCHING_EMPTY_EXTENDED_TYPE = new Set([
|
|
5994
|
+
'proposal',
|
|
5995
|
+
]);
|
|
5996
|
+
// Pipeline column colors available for user selection
|
|
5997
|
+
const PIPELINE_COLUMN_COLORS = [
|
|
5998
|
+
'blue',
|
|
5999
|
+
'emerald',
|
|
6000
|
+
'amber',
|
|
6001
|
+
'violet',
|
|
6002
|
+
'slate',
|
|
6003
|
+
'rose',
|
|
6004
|
+
'cyan',
|
|
6005
|
+
'orange',
|
|
6006
|
+
'indigo',
|
|
6007
|
+
'pink',
|
|
6008
|
+
];
|
|
6009
|
+
const DEFAULT_PIPELINE_COLUMNS = [
|
|
6010
|
+
{ id: 'new', label: 'New Leads', color: 'blue', position: 0 },
|
|
6011
|
+
{ id: 'qualified', label: 'Qualified Leads', color: 'emerald', position: 1 },
|
|
6012
|
+
{ id: 'meeting_arranged', label: 'Meeting Arranged', color: 'amber', position: 2 },
|
|
6013
|
+
{ id: 'proposal_sent', label: 'Proposal Sent', color: 'cyan', position: 3 },
|
|
6014
|
+
{ id: 'won', label: 'Won', color: 'violet', position: 4 },
|
|
6015
|
+
{ id: 'lost', label: 'Lost', color: 'rose', position: 5 },
|
|
6016
|
+
];
|
|
6017
|
+
const DEFAULT_PIPELINE_COLUMN_ID = 'new';
|
|
6018
|
+
const DEFAULT_ROOM_CRM_STATUS = DEFAULT_PIPELINE_COLUMN_ID;
|
|
6019
|
+
// Statuses whose deal value is excluded from pipeline totals
|
|
6020
|
+
const PIPELINE_DEAL_VALUE_EXCLUDED_COLUMN_IDS = ['new'];
|
|
6021
|
+
const ROOM_CRM_ARCHIVED_REASON_ORDER = roomCrmArchivedReasonEnum.options;
|
|
6022
|
+
const VALID_CRM_STATUSES = new Set([
|
|
6023
|
+
...roomCrmStatusEnum.options,
|
|
6024
|
+
'completed',
|
|
6025
|
+
'in_conversation',
|
|
6026
|
+
'active_contract',
|
|
6027
|
+
]);
|
|
6028
|
+
function normalizeRoomCrmStatus(status) {
|
|
6029
|
+
if (status && VALID_CRM_STATUSES.has(status)) {
|
|
6030
|
+
return status;
|
|
6031
|
+
}
|
|
6032
|
+
return 'new';
|
|
6033
|
+
}
|
|
6034
|
+
const PIPELINE_LIST_SORT_FIELDS = [
|
|
6035
|
+
'recentTimestamp',
|
|
6036
|
+
'dealValue',
|
|
6037
|
+
'totalSpent',
|
|
6038
|
+
'memberSince',
|
|
6039
|
+
'hireRate',
|
|
6040
|
+
'rating',
|
|
6041
|
+
'avgRate',
|
|
6042
|
+
];
|
|
6043
|
+
function normalizeRoomCrmStatuses(statuses) {
|
|
6044
|
+
if (!statuses || !statuses.length) {
|
|
6045
|
+
return [];
|
|
6046
|
+
}
|
|
6047
|
+
return Array.from(new Set(statuses
|
|
6048
|
+
.map((s) => s.trim().toLowerCase())
|
|
6049
|
+
.filter((s) => VALID_CRM_STATUSES.has(s))));
|
|
6050
|
+
}
|
|
6051
|
+
|
|
6052
|
+
const defaultQuestions = [
|
|
6053
|
+
{
|
|
6054
|
+
question: 'What is your company website URL?',
|
|
6055
|
+
answer: '',
|
|
6056
|
+
exampleAnswer: 'Website: www.yourwebsite.com',
|
|
6057
|
+
},
|
|
6058
|
+
{
|
|
6059
|
+
question: 'Please list any certifications that you have',
|
|
6060
|
+
answer: '',
|
|
6061
|
+
exampleAnswer: 'AWS Certified Solutions Architect\nGoogle Cloud Certified Professional Developer\nMicrosoft Certified: Azure Developer Associate\nCertified Scrum Master (CSM)',
|
|
6062
|
+
},
|
|
6063
|
+
{
|
|
6064
|
+
question: 'What past project or job have you had that is most like this one and why?',
|
|
6065
|
+
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.",
|
|
6066
|
+
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.",
|
|
6067
|
+
},
|
|
6068
|
+
{
|
|
6069
|
+
question: 'What tools/frameworks/methods have you worked with?',
|
|
6070
|
+
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.',
|
|
6071
|
+
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.',
|
|
6072
|
+
},
|
|
6073
|
+
{
|
|
6074
|
+
question: 'Do you have suggestions to make this project run successfully?',
|
|
6075
|
+
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.",
|
|
6076
|
+
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.",
|
|
6077
|
+
},
|
|
6078
|
+
{
|
|
6079
|
+
question: 'Why do you think you are a good fit for this particular project?',
|
|
6080
|
+
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.",
|
|
6081
|
+
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.",
|
|
6082
|
+
},
|
|
6083
|
+
{
|
|
6084
|
+
question: 'Do you have any questions about the job description?',
|
|
6085
|
+
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.",
|
|
6086
|
+
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.",
|
|
6087
|
+
},
|
|
6088
|
+
{
|
|
6089
|
+
question: 'How would you approach this type of project?',
|
|
6090
|
+
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.",
|
|
6091
|
+
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.",
|
|
6092
|
+
},
|
|
6093
|
+
];
|
|
6094
|
+
|
|
6095
|
+
const GOAT_COUNTRIES = [
|
|
6096
|
+
'USA',
|
|
6097
|
+
'United States',
|
|
6098
|
+
'United Kingdom',
|
|
6099
|
+
'CAN',
|
|
6100
|
+
'Canada',
|
|
6101
|
+
'AUS',
|
|
6102
|
+
'Australia',
|
|
6103
|
+
'ISR',
|
|
6104
|
+
'Israel',
|
|
6105
|
+
'United Arab Emirates',
|
|
6106
|
+
'Singapore',
|
|
6107
|
+
'Switzerland',
|
|
6108
|
+
'Saudi Arabia',
|
|
6109
|
+
'CHN',
|
|
6110
|
+
'China',
|
|
6111
|
+
'Austria',
|
|
6112
|
+
'BEL',
|
|
6113
|
+
'Belgium',
|
|
6114
|
+
'Bulgaria',
|
|
6115
|
+
'Croatia',
|
|
6116
|
+
'CYP',
|
|
6117
|
+
'Cyprus',
|
|
6118
|
+
'CZH',
|
|
6119
|
+
'Czech Republic',
|
|
6120
|
+
'Denmark',
|
|
6121
|
+
'Estonia',
|
|
6122
|
+
'FIN',
|
|
6123
|
+
'Finland',
|
|
6124
|
+
'FRA',
|
|
6125
|
+
'France',
|
|
6126
|
+
'DEU',
|
|
6127
|
+
'Germany',
|
|
6128
|
+
'Greece',
|
|
6129
|
+
'HUN',
|
|
6130
|
+
'Hungry',
|
|
6131
|
+
'Ireland',
|
|
6132
|
+
'Italy',
|
|
6133
|
+
'Latvia',
|
|
6134
|
+
'Lithuania',
|
|
6135
|
+
'LUX',
|
|
6136
|
+
'Luxhembourg',
|
|
6137
|
+
'Malta',
|
|
6138
|
+
'Netherlands',
|
|
6139
|
+
'POL',
|
|
6140
|
+
'Poland',
|
|
6141
|
+
'Portugal',
|
|
6142
|
+
'Romania',
|
|
6143
|
+
'Slovakia',
|
|
6144
|
+
'Slovenia',
|
|
6145
|
+
'Spain',
|
|
6146
|
+
'SWE',
|
|
6147
|
+
'Sweden',
|
|
6148
|
+
'Norway',
|
|
6149
|
+
'New Zealand',
|
|
6150
|
+
'GBR',
|
|
6151
|
+
'NLD',
|
|
6152
|
+
'Qatar',
|
|
6153
|
+
'SGP',
|
|
6154
|
+
'ESP',
|
|
6155
|
+
'ITA',
|
|
6156
|
+
'Puerto Rico',
|
|
6157
|
+
'Costa Rica',
|
|
6158
|
+
'Iceland',
|
|
6159
|
+
'QAT',
|
|
6160
|
+
'Monaco',
|
|
6161
|
+
];
|
|
6162
|
+
|
|
6163
|
+
const invoiceStatusNames = {
|
|
6164
|
+
open: "Open",
|
|
6165
|
+
paid: "Paid",
|
|
6166
|
+
past_due: "Past Due",
|
|
6167
|
+
payment_failed: "Payment Failed",
|
|
6168
|
+
};
|
|
6169
|
+
|
|
6170
|
+
const jobStatusOrder = [
|
|
6171
|
+
"leads",
|
|
6172
|
+
"contacted",
|
|
6173
|
+
"viewed",
|
|
6174
|
+
"replied",
|
|
6175
|
+
"won",
|
|
6176
|
+
];
|
|
6177
|
+
const getPreviousStatus = (status) => {
|
|
6178
|
+
if (status === "won")
|
|
6179
|
+
return "replied";
|
|
6180
|
+
const index = jobStatusOrder.indexOf(status);
|
|
6181
|
+
return index > 0 ? jobStatusOrder[index - 1] : null;
|
|
6182
|
+
};
|
|
6183
|
+
const getNextStatus = (status) => {
|
|
6184
|
+
const index = jobStatusOrder.indexOf(status);
|
|
6185
|
+
return index < jobStatusOrder.length - 1 ? jobStatusOrder[index + 1] : null;
|
|
6186
|
+
};
|
|
6187
|
+
|
|
6188
|
+
const countryMapping = {
|
|
6189
|
+
USA: "United States",
|
|
6190
|
+
GBR: "United Kingdom",
|
|
6191
|
+
AUS: "Australia",
|
|
6192
|
+
CAN: "Canada",
|
|
6193
|
+
IND: "India",
|
|
6194
|
+
NLD: "Netherlands",
|
|
6195
|
+
ARE: "United Arab Emirates",
|
|
6196
|
+
DEU: "Germany",
|
|
6197
|
+
SAU: "Saudi Arabia",
|
|
6198
|
+
FRA: "France",
|
|
6199
|
+
TUR: "Turkey",
|
|
6200
|
+
CHE: "Switzerland",
|
|
6201
|
+
ISR: "Israel",
|
|
6202
|
+
ITA: "Italy",
|
|
6203
|
+
ESP: "Spain",
|
|
6204
|
+
PAK: "Pakistan",
|
|
6205
|
+
SGP: "Singapore",
|
|
6206
|
+
KAZ: "Kazakhstan",
|
|
6207
|
+
UKR: "Ukraine",
|
|
6208
|
+
IRL: "Ireland",
|
|
6209
|
+
SWE: "Sweden",
|
|
6210
|
+
ZAF: "South Africa",
|
|
6211
|
+
CHN: "China",
|
|
6212
|
+
NOR: "Norway",
|
|
6213
|
+
POL: "Poland",
|
|
6214
|
+
COL: "Colombia",
|
|
6215
|
+
NZL: "New Zealand",
|
|
6216
|
+
ROU: "Romania",
|
|
6217
|
+
BRA: "Brazil",
|
|
6218
|
+
GRC: "Greece",
|
|
6219
|
+
BGR: "Bulgaria",
|
|
6220
|
+
DNK: "Denmark",
|
|
6221
|
+
PHL: "Philippines",
|
|
6222
|
+
BEL: "Belgium",
|
|
6223
|
+
AUT: "Austria",
|
|
6224
|
+
HKG: "Hong Kong",
|
|
6225
|
+
QAT: "Qatar",
|
|
6226
|
+
BGD: "Bangladesh",
|
|
6227
|
+
PRT: "Portugal",
|
|
6228
|
+
CYP: "Cyprus",
|
|
6229
|
+
LKA: "Sri Lanka",
|
|
6230
|
+
NGA: "Nigeria",
|
|
6231
|
+
VNM: "Vietnam",
|
|
6232
|
+
JPN: "Japan",
|
|
6233
|
+
LVA: "Latvia",
|
|
6234
|
+
THA: "Thailand",
|
|
6235
|
+
CZE: "Czech Republic",
|
|
6236
|
+
MEX: "Mexico",
|
|
6237
|
+
EGY: "Egypt",
|
|
6238
|
+
KEN: "Kenya",
|
|
6239
|
+
KWT: "Kuwait",
|
|
6240
|
+
CHL: "Chile",
|
|
6241
|
+
EST: "Estonia",
|
|
6242
|
+
UZB: "Uzbekistan",
|
|
6243
|
+
FIN: "Finland",
|
|
6244
|
+
HRV: "Croatia",
|
|
6245
|
+
HUN: "Hungary",
|
|
6246
|
+
KOR: "South Korea",
|
|
6247
|
+
LTU: "Lithuania",
|
|
6248
|
+
PRI: "Puerto Rico",
|
|
6249
|
+
ALB: "Albania",
|
|
6250
|
+
BHR: "Bahrain",
|
|
6251
|
+
GEO: "Georgia",
|
|
6252
|
+
GTM: "Guatemala",
|
|
6253
|
+
IDN: "Indonesia",
|
|
6254
|
+
LBN: "Lebanon",
|
|
6255
|
+
UGA: "Uganda",
|
|
6256
|
+
ARG: "Argentina",
|
|
6257
|
+
ARM: "Armenia",
|
|
6258
|
+
BMU: "Bermuda",
|
|
6259
|
+
CRI: "Costa Rica",
|
|
6260
|
+
CYM: "Cayman Islands",
|
|
6261
|
+
GHA: "Ghana",
|
|
6262
|
+
ISL: "Iceland",
|
|
6263
|
+
JOR: "Jordan",
|
|
6264
|
+
LUX: "Luxembourg",
|
|
6265
|
+
MAR: "Morocco",
|
|
6266
|
+
MKD: "Macedonia",
|
|
6267
|
+
MLT: "Malta",
|
|
6268
|
+
MYS: "Malaysia",
|
|
6269
|
+
OMN: "Oman",
|
|
6270
|
+
SRB: "Serbia",
|
|
6271
|
+
TWN: "Taiwan",
|
|
6272
|
+
BHS: "Bahamas",
|
|
6273
|
+
DZA: "Algeria",
|
|
6274
|
+
ETH: "Ethiopia",
|
|
6275
|
+
GUY: "Guyana",
|
|
6276
|
+
PAN: "Panama",
|
|
6277
|
+
PER: "Peru",
|
|
6278
|
+
SVK: "Slovakia",
|
|
6279
|
+
SVN: "Slovenia",
|
|
6280
|
+
TTO: "Trinidad and Tobago",
|
|
6281
|
+
URY: "Uruguay",
|
|
6282
|
+
VEN: "Venezuela",
|
|
6283
|
+
VIR: "Virgin Islands",
|
|
6284
|
+
ABW: "Aruba",
|
|
6285
|
+
CMR: "Cameroon",
|
|
6286
|
+
CUW: "Curaçao",
|
|
6287
|
+
GIB: "Gibraltar",
|
|
6288
|
+
HND: "Honduras",
|
|
6289
|
+
JAM: "Jamaica",
|
|
6290
|
+
JEY: "Jersey",
|
|
6291
|
+
MDV: "Maldives",
|
|
6292
|
+
MUS: "Mauritius",
|
|
6293
|
+
TUN: "Tunisia",
|
|
6294
|
+
RUS: "Russia",
|
|
6295
|
+
IRN: "Iran",
|
|
6296
|
+
IRQ: "Iraq",
|
|
6297
|
+
AZE: "Azerbaijan",
|
|
6298
|
+
CIV: "Cote d'Ivoire",
|
|
6299
|
+
PSE: "Palestine",
|
|
6300
|
+
MNE: "Montenegro",
|
|
6301
|
+
BIH: "Bosnia and Herzegovina",
|
|
6302
|
+
IMN: "Isle of Man",
|
|
6303
|
+
PNG: "Papua New Guinea",
|
|
6304
|
+
VCT: "Saint Vincent and the Grenadines",
|
|
6305
|
+
VGB: "British Virgin Islands",
|
|
6306
|
+
};
|
|
6307
|
+
|
|
6308
|
+
const regionMapping = {
|
|
6309
|
+
Africa: [
|
|
6310
|
+
"Algeria",
|
|
6311
|
+
"Angola",
|
|
6312
|
+
"Benin",
|
|
6313
|
+
"Botswana",
|
|
6314
|
+
"Burkina Faso",
|
|
6315
|
+
"Burundi",
|
|
6316
|
+
"Cabo Verde",
|
|
6317
|
+
"Cameroon",
|
|
6318
|
+
"Central African Republic",
|
|
6319
|
+
"Chad",
|
|
6320
|
+
"Comoros",
|
|
6321
|
+
"Congo",
|
|
6322
|
+
"Congo, the Democratic Republic of the",
|
|
6323
|
+
"Cote d'Ivoire",
|
|
6324
|
+
"Djibouti",
|
|
6325
|
+
"Egypt",
|
|
6326
|
+
"Equatorial Guinea",
|
|
6327
|
+
"Eritrea",
|
|
6328
|
+
"Eswatini",
|
|
6329
|
+
"Ethiopia",
|
|
6330
|
+
"Gabon",
|
|
6331
|
+
"Gambia",
|
|
6332
|
+
"Ghana",
|
|
6333
|
+
"Guinea",
|
|
6334
|
+
"Guinea-Bissau",
|
|
6335
|
+
"Kenya",
|
|
6336
|
+
"Lesotho",
|
|
6337
|
+
"Liberia",
|
|
6338
|
+
"Libya",
|
|
6339
|
+
"Madagascar",
|
|
6340
|
+
"Malawi",
|
|
6341
|
+
"Mali",
|
|
6342
|
+
"Mauritania",
|
|
6343
|
+
"Mauritius",
|
|
6344
|
+
"Morocco",
|
|
6345
|
+
"Mozambique",
|
|
6346
|
+
"Namibia",
|
|
6347
|
+
"Niger",
|
|
6348
|
+
"Nigeria",
|
|
6349
|
+
"Rwanda",
|
|
6350
|
+
"Sao Tome and Principe",
|
|
6351
|
+
"Senegal",
|
|
6352
|
+
"Seychelles",
|
|
6353
|
+
"Sierra Leone",
|
|
6354
|
+
"Somalia",
|
|
6355
|
+
"South Africa",
|
|
6356
|
+
"South Sudan",
|
|
6357
|
+
"Sudan",
|
|
6358
|
+
"Tanzania",
|
|
6359
|
+
"Togo",
|
|
6360
|
+
"Tunisia",
|
|
6361
|
+
"Uganda",
|
|
6362
|
+
"Zambia",
|
|
6363
|
+
"Zimbabwe",
|
|
6364
|
+
],
|
|
6365
|
+
Americas: [
|
|
6366
|
+
"Anguilla",
|
|
6367
|
+
"Antigua and Barbuda",
|
|
6368
|
+
"Argentina",
|
|
6369
|
+
"Aruba",
|
|
6370
|
+
"Bahamas",
|
|
6371
|
+
"Barbados",
|
|
6372
|
+
"Belize",
|
|
6373
|
+
"Bermuda",
|
|
6374
|
+
"Bolivia",
|
|
6375
|
+
"Brazil",
|
|
6376
|
+
"British Virgin Islands",
|
|
6377
|
+
"Canada",
|
|
6378
|
+
"Cayman Islands",
|
|
6379
|
+
"Chile",
|
|
6380
|
+
"Colombia",
|
|
6381
|
+
"Costa Rica",
|
|
6382
|
+
"Cuba",
|
|
6383
|
+
"Curacao",
|
|
6384
|
+
"Dominica",
|
|
6385
|
+
"Dominican Republic",
|
|
6386
|
+
"Ecuador",
|
|
6387
|
+
"El Salvador",
|
|
6388
|
+
"Falkland Islands",
|
|
6389
|
+
"French Guiana",
|
|
6390
|
+
"Grenada",
|
|
6391
|
+
"Guadeloupe",
|
|
6392
|
+
"Guatemala",
|
|
6393
|
+
"Guyana",
|
|
6394
|
+
"Haiti",
|
|
6395
|
+
"Honduras",
|
|
6396
|
+
"Jamaica",
|
|
6397
|
+
"Martinique",
|
|
6398
|
+
"Mexico",
|
|
6399
|
+
"Montserrat",
|
|
6400
|
+
"Nicaragua",
|
|
6401
|
+
"Panama",
|
|
6402
|
+
"Paraguay",
|
|
6403
|
+
"Peru",
|
|
6404
|
+
"Puerto Rico",
|
|
6405
|
+
"Saint Kitts and Nevis",
|
|
6406
|
+
"Saint Lucia",
|
|
6407
|
+
"Saint Vincent and the Grenadines",
|
|
6408
|
+
"Suriname",
|
|
6409
|
+
"Trinidad and Tobago",
|
|
6410
|
+
"Turks and Caicos Islands",
|
|
6411
|
+
"United States",
|
|
6412
|
+
"United States Virgin Islands",
|
|
6413
|
+
"Uruguay",
|
|
6414
|
+
"Venezuela",
|
|
6415
|
+
],
|
|
6416
|
+
Antarctica: ["French Southern And Antarctic Lands"],
|
|
6417
|
+
Asia: [
|
|
6418
|
+
"Afghanistan",
|
|
6419
|
+
"Armenia",
|
|
6420
|
+
"Azerbaijan",
|
|
6421
|
+
"Bahrain",
|
|
6422
|
+
"Bangladesh",
|
|
6423
|
+
"Bhutan",
|
|
6424
|
+
"Brunei Darussalam",
|
|
6425
|
+
"Cambodia",
|
|
6426
|
+
"China",
|
|
6427
|
+
"East Timor",
|
|
6428
|
+
"Georgia",
|
|
6429
|
+
"Hong Kong",
|
|
6430
|
+
"India",
|
|
6431
|
+
"Indonesia",
|
|
6432
|
+
"Iran",
|
|
6433
|
+
"Iraq",
|
|
6434
|
+
"Israel",
|
|
6435
|
+
"Japan",
|
|
6436
|
+
"Jordan",
|
|
6437
|
+
"Kazakhstan",
|
|
6438
|
+
"Kuwait",
|
|
6439
|
+
"Kyrgyzstan",
|
|
6440
|
+
"Laos",
|
|
6441
|
+
"Lebanon",
|
|
6442
|
+
"Macao",
|
|
6443
|
+
"Malaysia",
|
|
6444
|
+
"Maldives",
|
|
6445
|
+
"Mongolia",
|
|
6446
|
+
"Myanmar",
|
|
6447
|
+
"Nepal",
|
|
6448
|
+
"Palestine",
|
|
6449
|
+
"Oman",
|
|
6450
|
+
"Pakistan",
|
|
6451
|
+
"Palestinian Territories",
|
|
6452
|
+
"Philippines",
|
|
6453
|
+
"Qatar",
|
|
6454
|
+
"Russia",
|
|
6455
|
+
"Saudi Arabia",
|
|
6456
|
+
"Singapore",
|
|
6457
|
+
"South Korea",
|
|
6458
|
+
"Sri Lanka",
|
|
6459
|
+
"Syria",
|
|
6460
|
+
"Taiwan",
|
|
6461
|
+
"Tajikistan",
|
|
6462
|
+
"Turkey",
|
|
6463
|
+
"Thailand",
|
|
6464
|
+
"Turkmenistan",
|
|
6465
|
+
"United Arab Emirates",
|
|
6466
|
+
"Uzbekistan",
|
|
6467
|
+
"Vietnam",
|
|
6468
|
+
"Yemen",
|
|
6469
|
+
],
|
|
6470
|
+
Europe: [
|
|
6471
|
+
"Albania",
|
|
6472
|
+
"Andorra",
|
|
6473
|
+
"Austria",
|
|
6474
|
+
"Belarus",
|
|
6475
|
+
"Belgium",
|
|
6476
|
+
"Bosnia and Herzegovina",
|
|
6477
|
+
"Bulgaria",
|
|
6478
|
+
"Croatia",
|
|
6479
|
+
"Cyprus",
|
|
6480
|
+
"Czech Republic",
|
|
6481
|
+
"Denmark",
|
|
6482
|
+
"Estonia",
|
|
6483
|
+
"Faroe Islands",
|
|
6484
|
+
"Finland",
|
|
6485
|
+
"France",
|
|
6486
|
+
"Germany",
|
|
6487
|
+
"Gibraltar",
|
|
6488
|
+
"Greece",
|
|
6489
|
+
"Guernsey",
|
|
6490
|
+
"Hungary",
|
|
6491
|
+
"Iceland",
|
|
6492
|
+
"Ireland",
|
|
6493
|
+
"Isle of Man",
|
|
6494
|
+
"Italy",
|
|
6495
|
+
"Jersey",
|
|
6496
|
+
"Latvia",
|
|
6497
|
+
"Liechtenstein",
|
|
6498
|
+
"Lithuania",
|
|
6499
|
+
"Luxembourg",
|
|
6500
|
+
"Malta",
|
|
6501
|
+
"Moldova",
|
|
6502
|
+
"Monaco",
|
|
6503
|
+
"Montenegro",
|
|
6504
|
+
"Netherlands",
|
|
6505
|
+
"Macedonia",
|
|
6506
|
+
"Norway",
|
|
6507
|
+
"Poland",
|
|
6508
|
+
"Portugal",
|
|
6509
|
+
"Romania",
|
|
6510
|
+
"San Marino",
|
|
6511
|
+
"Serbia",
|
|
6512
|
+
"Slovakia",
|
|
6513
|
+
"Slovenia",
|
|
6514
|
+
"Spain",
|
|
6515
|
+
"Sweden",
|
|
6516
|
+
"Switzerland",
|
|
6517
|
+
"Ukraine",
|
|
6518
|
+
"United Kingdom",
|
|
6519
|
+
"Vatican City",
|
|
6520
|
+
],
|
|
6521
|
+
Oceania: [
|
|
6522
|
+
"American Samoa",
|
|
6523
|
+
"Australia",
|
|
6524
|
+
"Cook Islands",
|
|
6525
|
+
"Fiji",
|
|
6526
|
+
"French Polynesia",
|
|
6527
|
+
"Guam",
|
|
6528
|
+
"Kiribati",
|
|
6529
|
+
"Marshall Islands",
|
|
6530
|
+
"Micronesia",
|
|
6531
|
+
"Nauru",
|
|
6532
|
+
"New Caledonia",
|
|
6533
|
+
"New Zealand",
|
|
6534
|
+
"Niue",
|
|
6535
|
+
"Northern Mariana Islands",
|
|
6536
|
+
"Palau",
|
|
6537
|
+
"Papua New Guinea",
|
|
6538
|
+
"Samoa",
|
|
6539
|
+
"Solomon Islands",
|
|
6540
|
+
"Tokelau",
|
|
6541
|
+
"Tonga",
|
|
6542
|
+
"Tuvalu",
|
|
6543
|
+
"Vanuatu",
|
|
6544
|
+
"Wallis and Futuna",
|
|
6545
|
+
],
|
|
6546
|
+
};
|
|
6547
|
+
|
|
6548
|
+
const accountStatusSchema = z.enum([
|
|
6549
|
+
'pending_credentials_verification',
|
|
6550
|
+
'valid_credentials',
|
|
6551
|
+
'invalid_credentials',
|
|
6552
|
+
]);
|
|
6406
6553
|
|
|
6407
6554
|
const proxyCountryEnum = z.enum([
|
|
6408
6555
|
'US',
|
|
@@ -8945,133 +9092,6 @@ const syncProposalsStatusRequestPayloadSchema = z.object({
|
|
|
8945
9092
|
bidderAccountId: z.string(),
|
|
8946
9093
|
});
|
|
8947
9094
|
|
|
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
9095
|
const campaignStatsSchema = z.object({
|
|
9076
9096
|
contacted: z.number(),
|
|
9077
9097
|
viewed: z.number(),
|
|
@@ -15840,6 +15860,7 @@ const ROUTES = {
|
|
|
15840
15860
|
JOBS: {
|
|
15841
15861
|
BASE: 'jobs',
|
|
15842
15862
|
BY_ID: (id) => `jobs/${id}`,
|
|
15863
|
+
BY_UID: (uid) => `jobs/by-uid/${uid}`,
|
|
15843
15864
|
UPDATE_ACTIVITY: `jobs/update-activity`,
|
|
15844
15865
|
IMPORT: 'jobs/import',
|
|
15845
15866
|
FILTER_OPTIONS: 'jobs/filter-options',
|
|
@@ -15933,7 +15954,18 @@ const ROUTES = {
|
|
|
15933
15954
|
TEST_SUITABILITY: 'admin/agent/test-suitability',
|
|
15934
15955
|
TEST_PROPOSAL: 'admin/agent/test-proposal',
|
|
15935
15956
|
},
|
|
15957
|
+
UPWORK_INVITATIONS_CONFIG: {
|
|
15958
|
+
BASE: 'admin/upwork-invitation-bucket-account',
|
|
15959
|
+
},
|
|
15960
|
+
BIDDER_INSTANCES: {
|
|
15961
|
+
BASE: 'admin/bidder-instances',
|
|
15962
|
+
BY_ID: (id) => `admin/bidder-instances/${id}`,
|
|
15963
|
+
ASSIGN_ACCOUNTS: (id) => `admin/bidder-instances/${id}/assign-accounts`,
|
|
15964
|
+
UNASSIGN_ACCOUNTS: (id) => `admin/bidder-instances/${id}/unassign-accounts`,
|
|
15965
|
+
SET_DEFAULT: (id) => `admin/bidder-instances/${id}/set-default`,
|
|
15966
|
+
},
|
|
15936
15967
|
BILLING: {
|
|
15968
|
+
BASE: 'admin/billing',
|
|
15937
15969
|
PLANS: {
|
|
15938
15970
|
BASE: 'admin/billing/plans',
|
|
15939
15971
|
BY_ID: (id) => `admin/billing/plans/${id}`,
|
|
@@ -15947,16 +15979,6 @@ const ROUTES = {
|
|
|
15947
15979
|
BY_ID: (id) => `admin/billing/features/${id}`,
|
|
15948
15980
|
},
|
|
15949
15981
|
},
|
|
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
15982
|
},
|
|
15961
15983
|
BID: {
|
|
15962
15984
|
BASE: 'bid',
|
|
@@ -16020,9 +16042,13 @@ const ROUTES = {
|
|
|
16020
16042
|
ROOM_TAG: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/tags`,
|
|
16021
16043
|
ROOM_NOTES: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/notes`,
|
|
16022
16044
|
ROOM_CRM_STATUS: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/crm-status`,
|
|
16045
|
+
ROOM_DEAL_VALUE: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/deal-value`,
|
|
16046
|
+
ROOM_TASKS: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/tasks`,
|
|
16047
|
+
ROOM_TASK_BY_ID: (organizationId, bidderAccountId, roomId, taskId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/tasks/${taskId}`,
|
|
16023
16048
|
CONNECT_ACCOUNT: (organizationId, bidderAccountId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/chat/connect-account`,
|
|
16024
16049
|
ROOMS: (id, bidderAccountId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms`,
|
|
16025
16050
|
ROOM: (id, bidderAccountId, roomId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms/${roomId}`,
|
|
16051
|
+
ROOM_METADATA: (id, bidderAccountId, roomId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/metadata`,
|
|
16026
16052
|
REFRESH_ROOM: (id, bidderAccountId, roomId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/refresh`,
|
|
16027
16053
|
SEND_MESSAGE: (id, bidderAccountId, roomId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/send-message`,
|
|
16028
16054
|
REFRESH_ROOMS: (organizationId, bidderAccountId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/chat/refresh-rooms`,
|
|
@@ -16034,6 +16060,7 @@ const ROUTES = {
|
|
|
16034
16060
|
GET_FREE_SLOTS: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/free-slots`,
|
|
16035
16061
|
BOOK_SLOT: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/book-slot`,
|
|
16036
16062
|
ATTACHMENT_REDIRECT: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/attachment-redirect`,
|
|
16063
|
+
PIPELINE_LIST_ROOMS: (organizationId) => `organizations/${organizationId}/chat/pipeline-list-rooms`,
|
|
16037
16064
|
},
|
|
16038
16065
|
},
|
|
16039
16066
|
LEADS_BY_JOB_ID: (organizationId, jobId) => `organizations/${organizationId}/leads/${jobId}`,
|
|
@@ -16115,6 +16142,9 @@ const ROUTES = {
|
|
|
16115
16142
|
BASE: (id) => `organizations/${id}/users`,
|
|
16116
16143
|
BY_ID: (organizationId, userId) => `organizations/${organizationId}/users/${userId}`,
|
|
16117
16144
|
},
|
|
16145
|
+
ALL_TASKS: (organizationId) => `organizations/${organizationId}/tasks`,
|
|
16146
|
+
PIPELINE_TOTALS: (organizationId) => `organizations/${organizationId}/pipeline/totals`,
|
|
16147
|
+
PIPELINE_COLUMNS: (organizationId) => `organizations/${organizationId}/pipeline/columns`,
|
|
16118
16148
|
INVOICE_PREVIEW: (id) => `organizations/${id}/invoice-preview`,
|
|
16119
16149
|
},
|
|
16120
16150
|
TRANSACTIONS: {
|
|
@@ -24817,6 +24847,8 @@ exports.CAMPAIGN_NOTIFICATION_SETTINGS = CAMPAIGN_NOTIFICATION_SETTINGS;
|
|
|
24817
24847
|
exports.CAMPAIGN_NOTIFICATION_TYPES = CAMPAIGN_NOTIFICATION_TYPES;
|
|
24818
24848
|
exports.CLIENT_SIZE_TO_NUMBER = CLIENT_SIZE_TO_NUMBER;
|
|
24819
24849
|
exports.CloudflareChallengeFailedException = CloudflareChallengeFailedException;
|
|
24850
|
+
exports.DEFAULT_PIPELINE_COLUMNS = DEFAULT_PIPELINE_COLUMNS;
|
|
24851
|
+
exports.DEFAULT_PIPELINE_COLUMN_ID = DEFAULT_PIPELINE_COLUMN_ID;
|
|
24820
24852
|
exports.DEFAULT_ROOM_CRM_STATUS = DEFAULT_ROOM_CRM_STATUS;
|
|
24821
24853
|
exports.DeleteMultiloginProfileException = DeleteMultiloginProfileException;
|
|
24822
24854
|
exports.DropdownOptionNotPresentException = DropdownOptionNotPresentException;
|
|
@@ -24855,6 +24887,9 @@ exports.NoBidderAccountsAvailableException = NoBidderAccountsAvailableException;
|
|
|
24855
24887
|
exports.NoGoogleOAuthTokensFoundException = NoGoogleOAuthTokensFoundException;
|
|
24856
24888
|
exports.NoScraperAccountAvailableException = NoScraperAccountAvailableException;
|
|
24857
24889
|
exports.OpenPageException = OpenPageException;
|
|
24890
|
+
exports.PIPELINE_COLUMN_COLORS = PIPELINE_COLUMN_COLORS;
|
|
24891
|
+
exports.PIPELINE_DEAL_VALUE_EXCLUDED_COLUMN_IDS = PIPELINE_DEAL_VALUE_EXCLUDED_COLUMN_IDS;
|
|
24892
|
+
exports.PIPELINE_LIST_SORT_FIELDS = PIPELINE_LIST_SORT_FIELDS;
|
|
24858
24893
|
exports.PageClosedException = PageClosedException;
|
|
24859
24894
|
exports.PageContentException = PageContentException;
|
|
24860
24895
|
exports.ParseConnectsException = ParseConnectsException;
|
|
@@ -24867,13 +24902,7 @@ exports.ProposalSubmitFailedException = ProposalSubmitFailedException;
|
|
|
24867
24902
|
exports.ProxyNotReachableException = ProxyNotReachableException;
|
|
24868
24903
|
exports.PuppeteerConnectionErrorException = PuppeteerConnectionErrorException;
|
|
24869
24904
|
exports.QuestionPairNotMatchingException = QuestionPairNotMatchingException;
|
|
24870
|
-
exports.ROOM_CRM_ARCHIVED_REASON_LABELS = ROOM_CRM_ARCHIVED_REASON_LABELS;
|
|
24871
24905
|
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
24906
|
exports.ROOM_EXTENDED_TYPE_MAP = ROOM_EXTENDED_TYPE_MAP;
|
|
24878
24907
|
exports.ROOM_TYPES_MATCHING_EMPTY_EXTENDED_TYPE = ROOM_TYPES_MATCHING_EMPTY_EXTENDED_TYPE;
|
|
24879
24908
|
exports.ROUTES = ROUTES;
|
|
@@ -24989,6 +25018,7 @@ exports.createHourlyRateFormSchema = createHourlyRateFormSchema;
|
|
|
24989
25018
|
exports.createOrganizationProfileSchema = createOrganizationProfileSchema;
|
|
24990
25019
|
exports.createOrganizationSchema = createOrganizationSchema;
|
|
24991
25020
|
exports.createRoomTagRequestBodySchema = createRoomTagRequestBodySchema;
|
|
25021
|
+
exports.createRoomTaskRequestBodySchema = createRoomTaskRequestBodySchema;
|
|
24992
25022
|
exports.createSampleSchema = createSampleSchema;
|
|
24993
25023
|
exports.createScraperAccountSchema = createScraperAccountSchema;
|
|
24994
25024
|
exports.createSuitabilityFormSchema = createSuitabilityFormSchema;
|
|
@@ -25057,6 +25087,7 @@ exports.getMultiloginBrowserException = getMultiloginBrowserException;
|
|
|
25057
25087
|
exports.getNextStatus = getNextStatus;
|
|
25058
25088
|
exports.getOrganizationLeadsRequestQuerySchema = getOrganizationLeadsRequestQuerySchema;
|
|
25059
25089
|
exports.getOrganizationLeadsStatusEnum = getOrganizationLeadsStatusEnum;
|
|
25090
|
+
exports.getPipelineListRoomsResponseSchema = getPipelineListRoomsResponseSchema;
|
|
25060
25091
|
exports.getPreviousStatus = getPreviousStatus;
|
|
25061
25092
|
exports.getRoomsResponseSchema = getRoomsResponseSchema;
|
|
25062
25093
|
exports.getRouteWithoutAdminPrefix = getRouteWithoutAdminPrefix;
|
|
@@ -25092,7 +25123,6 @@ exports.invoiceStripeMetadataSchema = invoiceStripeMetadataSchema;
|
|
|
25092
25123
|
exports.isNumeric = isNumeric;
|
|
25093
25124
|
exports.isPaymentVerifiedEnum = isPaymentVerifiedEnum;
|
|
25094
25125
|
exports.isPhoneVerifiedEnum = isPhoneVerifiedEnum;
|
|
25095
|
-
exports.isRoomCrmStatus = isRoomCrmStatus;
|
|
25096
25126
|
exports.isTrackedBidFailureMonitoringCode = isTrackedBidFailureMonitoringCode;
|
|
25097
25127
|
exports.isUserFacingCredentialErrorCode = isUserFacingCredentialErrorCode;
|
|
25098
25128
|
exports.isWorkTime = isWorkTime;
|
|
@@ -25168,6 +25198,7 @@ exports.periodTypeSchema = periodTypeSchema;
|
|
|
25168
25198
|
exports.periodUsageSchema = periodUsageSchema;
|
|
25169
25199
|
exports.pickProfileRequestSchema = pickProfileRequestSchema;
|
|
25170
25200
|
exports.pickProfileResponseSchema = pickProfileResponseSchema;
|
|
25201
|
+
exports.pipelineColumnSchema = pipelineColumnSchema;
|
|
25171
25202
|
exports.planFeatureSchema = planFeatureSchema;
|
|
25172
25203
|
exports.planPricingIntervalSchema = planPricingIntervalSchema;
|
|
25173
25204
|
exports.planPricingSchema = planPricingSchema;
|
|
@@ -25218,6 +25249,7 @@ exports.roomMessageSchema = roomMessageSchema;
|
|
|
25218
25249
|
exports.roomNoteSchema = roomNoteSchema;
|
|
25219
25250
|
exports.roomSchema = roomSchema;
|
|
25220
25251
|
exports.roomTagSchema = roomTagSchema;
|
|
25252
|
+
exports.roomTaskSchema = roomTaskSchema;
|
|
25221
25253
|
exports.roomsMetadataSchema = roomsMetadataSchema;
|
|
25222
25254
|
exports.sampleSchema = sampleSchema;
|
|
25223
25255
|
exports.savedSearchSchema = savedSearchSchema;
|
|
@@ -25281,8 +25313,11 @@ exports.updateChatbotSchema = updateChatbotSchema;
|
|
|
25281
25313
|
exports.updateLeadStatusSchema = updateLeadStatusSchema;
|
|
25282
25314
|
exports.updateOrganizationLeadsStatusPayloadSchema = updateOrganizationLeadsStatusPayloadSchema;
|
|
25283
25315
|
exports.updateOrganizationProfileSchema = updateOrganizationProfileSchema;
|
|
25316
|
+
exports.updatePipelineColumnsRequestBodySchema = updatePipelineColumnsRequestBodySchema;
|
|
25284
25317
|
exports.updateRoomCrmStatusRequestBodySchema = updateRoomCrmStatusRequestBodySchema;
|
|
25318
|
+
exports.updateRoomDealValueRequestBodySchema = updateRoomDealValueRequestBodySchema;
|
|
25285
25319
|
exports.updateRoomNotesRequestBodySchema = updateRoomNotesRequestBodySchema;
|
|
25320
|
+
exports.updateRoomTaskRequestBodySchema = updateRoomTaskRequestBodySchema;
|
|
25286
25321
|
exports.updateSampleSchema = updateSampleSchema;
|
|
25287
25322
|
exports.updateScraperAccountSchema = updateScraperAccountSchema;
|
|
25288
25323
|
exports.updateSuitableLeadNotificationBodySchema = updateSuitableLeadNotificationBodySchema;
|