lancer-shared 1.0.0 → 1.0.1
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/constants/routes.d.ts +13 -13
- package/dist/constants/routes.js +27 -27
- package/dist/constants/upwork-filters.d.ts +5 -0
- package/dist/constants/upwork-filters.js +75 -0
- package/dist/schemas/ai-config/ai-config.d.ts +39 -0
- package/dist/schemas/ai-config/ai-config.js +12 -0
- package/dist/schemas/ai-config/index.d.ts +1 -0
- package/dist/schemas/ai-config/index.js +17 -0
- package/dist/schemas/bidding/proposal-dto.d.ts +26 -0
- package/dist/schemas/bidding/proposal-dto.js +18 -0
- package/dist/schemas/job/job-pipeline.d.ts +74 -0
- package/dist/schemas/job/job-pipeline.js +29 -0
- package/dist/schemas/job/job-suitability.d.ts +12 -0
- package/dist/schemas/job/job-suitability.js +13 -0
- package/dist/schemas/job/pipeline-job.d.ts +9 -3
- package/dist/schemas/job/pipeline-job.js +1 -0
- package/dist/schemas/knowledge-object/index.d.ts +1 -0
- package/dist/schemas/knowledge-object/index.js +17 -0
- package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
- package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
- package/dist/schemas/scraper/scrape-response.d.ts +345 -0
- package/dist/schemas/scraper/scrape-response.js +9 -0
- package/dist/types/ai-config/ai-config.d.ts +6 -0
- package/dist/types/ai-config/ai-config.js +2 -0
- package/dist/types/ai-config/index.d.ts +1 -0
- package/dist/types/ai-config/index.js +17 -0
- package/dist/types/bidding/proposal-dto.d.ts +3 -0
- package/dist/types/bidding/proposal-dto.js +2 -0
- package/dist/types/job/job-pipeline.d.ts +4 -0
- package/dist/types/job/job-pipeline.js +2 -0
- package/dist/types/job/job-suitability.d.ts +3 -0
- package/dist/types/job/job-suitability.js +2 -0
- package/dist/types/knowledge-object/index.d.ts +1 -0
- package/dist/types/knowledge-object/index.js +17 -0
- package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
- package/dist/types/knowledge-object/knowledge-object.js +2 -0
- package/dist/types/scraper/scrape-response.d.ts +4 -0
- package/dist/types/scraper/scrape-response.js +2 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const ROUTES: {
|
|
2
2
|
readonly AUTH: {
|
|
3
|
-
readonly BASE: "
|
|
4
|
-
readonly REGISTER: "
|
|
3
|
+
readonly BASE: "auth";
|
|
4
|
+
readonly REGISTER: "auth/register";
|
|
5
5
|
};
|
|
6
6
|
readonly CAMPAIGNS: {
|
|
7
|
-
readonly BASE: "
|
|
7
|
+
readonly BASE: "campaigns";
|
|
8
8
|
readonly BY_ID: (id: string) => string;
|
|
9
9
|
readonly JOBS: {
|
|
10
10
|
readonly BASE: (campaignId: string) => string;
|
|
@@ -28,25 +28,25 @@ export declare const ROUTES: {
|
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
readonly JOBS: {
|
|
31
|
-
readonly BASE: "
|
|
32
|
-
readonly IMPORT: "
|
|
33
|
-
readonly FILTER_OPTIONS: "
|
|
34
|
-
readonly TOTAL_JOBS: "
|
|
31
|
+
readonly BASE: "jobs";
|
|
32
|
+
readonly IMPORT: "jobs/import";
|
|
33
|
+
readonly FILTER_OPTIONS: "jobs/filter-options";
|
|
34
|
+
readonly TOTAL_JOBS: "jobs/total-jobs";
|
|
35
35
|
};
|
|
36
36
|
readonly USERS: {
|
|
37
|
-
readonly BASE: "
|
|
37
|
+
readonly BASE: "users";
|
|
38
38
|
readonly BY_ID: (id: string) => string;
|
|
39
39
|
};
|
|
40
40
|
readonly AI_CONFIG: {
|
|
41
|
-
readonly BASE: "
|
|
41
|
+
readonly BASE: "ai-config";
|
|
42
42
|
};
|
|
43
43
|
readonly COOKIES: {
|
|
44
|
-
readonly BASE: "
|
|
45
|
-
readonly SCRAPE: "
|
|
44
|
+
readonly BASE: "cookies";
|
|
45
|
+
readonly SCRAPE: "cookies/scrape-cookies";
|
|
46
46
|
};
|
|
47
47
|
readonly SCRAPING: {
|
|
48
|
-
readonly BASE: "
|
|
49
|
-
readonly UPWORK: "
|
|
48
|
+
readonly BASE: "scraping";
|
|
49
|
+
readonly UPWORK: "scraping/upwork";
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
export type RouteParams = {
|
package/dist/constants/routes.js
CHANGED
|
@@ -3,53 +3,53 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.buildRoute = exports.ROUTES = void 0;
|
|
4
4
|
exports.ROUTES = {
|
|
5
5
|
AUTH: {
|
|
6
|
-
BASE:
|
|
7
|
-
REGISTER:
|
|
6
|
+
BASE: 'auth',
|
|
7
|
+
REGISTER: 'auth/register',
|
|
8
8
|
},
|
|
9
9
|
CAMPAIGNS: {
|
|
10
|
-
BASE:
|
|
11
|
-
BY_ID: (id) =>
|
|
10
|
+
BASE: 'campaigns',
|
|
11
|
+
BY_ID: (id) => `campaigns/${id}`,
|
|
12
12
|
JOBS: {
|
|
13
|
-
BASE: (campaignId) =>
|
|
14
|
-
BY_ID: (campaignId, jobId) =>
|
|
15
|
-
SUITABILITY_SCORES: (campaignId) =>
|
|
16
|
-
SYNC: (campaignId) =>
|
|
13
|
+
BASE: (campaignId) => `campaigns/${campaignId}/jobs`,
|
|
14
|
+
BY_ID: (campaignId, jobId) => `campaigns/${campaignId}/jobs/${jobId}`,
|
|
15
|
+
SUITABILITY_SCORES: (campaignId) => `campaigns/${campaignId}/jobs/suitability-scores`,
|
|
16
|
+
SYNC: (campaignId) => `campaigns/${campaignId}/jobs/sync`,
|
|
17
17
|
},
|
|
18
|
-
INSIGHTS: (campaignId) =>
|
|
18
|
+
INSIGHTS: (campaignId) => `campaigns/${campaignId}/insights`,
|
|
19
19
|
INTEGRATIONS: {
|
|
20
|
-
BASE: (campaignId) =>
|
|
20
|
+
BASE: (campaignId) => `campaigns/${campaignId}/integrations`,
|
|
21
21
|
SLACK: {
|
|
22
|
-
BASE: (campaignId) =>
|
|
23
|
-
TEST_SUITABILITY_WEBHOOK: (campaignId) =>
|
|
24
|
-
TEST_PROPOSAL_WEBHOOK: (campaignId) =>
|
|
22
|
+
BASE: (campaignId) => `campaigns/${campaignId}/integrations/slack`,
|
|
23
|
+
TEST_SUITABILITY_WEBHOOK: (campaignId) => `campaigns/${campaignId}/integrations/slack/suitability/test-webhook`,
|
|
24
|
+
TEST_PROPOSAL_WEBHOOK: (campaignId) => `campaigns/${campaignId}/integrations/slack/proposal/test-webhook`,
|
|
25
25
|
},
|
|
26
26
|
DISCORD: {
|
|
27
|
-
BASE: (campaignId) =>
|
|
28
|
-
TEST_SUITABILITY_WEBHOOK: (campaignId) =>
|
|
29
|
-
TEST_PROPOSAL_WEBHOOK: (campaignId) =>
|
|
27
|
+
BASE: (campaignId) => `campaigns/${campaignId}/integrations/discord`,
|
|
28
|
+
TEST_SUITABILITY_WEBHOOK: (campaignId) => `campaigns/${campaignId}/integrations/discord/suitability/test-webhook`,
|
|
29
|
+
TEST_PROPOSAL_WEBHOOK: (campaignId) => `campaigns/${campaignId}/integrations/discord/proposal/test-webhook`,
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
33
|
JOBS: {
|
|
34
|
-
BASE:
|
|
35
|
-
IMPORT:
|
|
36
|
-
FILTER_OPTIONS:
|
|
37
|
-
TOTAL_JOBS:
|
|
34
|
+
BASE: 'jobs',
|
|
35
|
+
IMPORT: 'jobs/import',
|
|
36
|
+
FILTER_OPTIONS: 'jobs/filter-options',
|
|
37
|
+
TOTAL_JOBS: 'jobs/total-jobs',
|
|
38
38
|
},
|
|
39
39
|
USERS: {
|
|
40
|
-
BASE:
|
|
41
|
-
BY_ID: (id) =>
|
|
40
|
+
BASE: 'users',
|
|
41
|
+
BY_ID: (id) => `users/${id}`,
|
|
42
42
|
},
|
|
43
43
|
AI_CONFIG: {
|
|
44
|
-
BASE:
|
|
44
|
+
BASE: 'ai-config',
|
|
45
45
|
},
|
|
46
46
|
COOKIES: {
|
|
47
|
-
BASE:
|
|
48
|
-
SCRAPE:
|
|
47
|
+
BASE: 'cookies',
|
|
48
|
+
SCRAPE: 'cookies/scrape-cookies',
|
|
49
49
|
},
|
|
50
50
|
SCRAPING: {
|
|
51
|
-
BASE:
|
|
52
|
-
UPWORK:
|
|
51
|
+
BASE: 'scraping',
|
|
52
|
+
UPWORK: 'scraping/upwork',
|
|
53
53
|
},
|
|
54
54
|
};
|
|
55
55
|
// Helper function to build route with parameters
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyKnowledgeObject = exports.CLIENT_HISTORY = exports.EXPERIENCE_LEVELS = exports.CATEGORIES = void 0;
|
|
4
|
+
exports.CATEGORIES = [
|
|
5
|
+
'Accounting',
|
|
6
|
+
'Business Analysis & Strategy',
|
|
7
|
+
'Financial Analysis & Modeling',
|
|
8
|
+
'HR Administration',
|
|
9
|
+
'Management Consulting',
|
|
10
|
+
'Tax Preparation',
|
|
11
|
+
'Data Entry',
|
|
12
|
+
'Personal/Virtual Assistance',
|
|
13
|
+
'Project Management',
|
|
14
|
+
'Research',
|
|
15
|
+
'Customer Service',
|
|
16
|
+
'Technical Support',
|
|
17
|
+
'Data Analytics',
|
|
18
|
+
'Data Processing',
|
|
19
|
+
'Data Engineering',
|
|
20
|
+
'Machine Learning',
|
|
21
|
+
'AI Development',
|
|
22
|
+
'Art & Illustration',
|
|
23
|
+
'Audio Production',
|
|
24
|
+
'Brand Design',
|
|
25
|
+
'Logo Design',
|
|
26
|
+
'Graphics Design',
|
|
27
|
+
'Video Production',
|
|
28
|
+
'Voice Acting',
|
|
29
|
+
'Architecture',
|
|
30
|
+
'Chemical Engineering',
|
|
31
|
+
'Civil Engineering',
|
|
32
|
+
'Electrical Engineering',
|
|
33
|
+
'Interior Design',
|
|
34
|
+
'Mechanical Engineering',
|
|
35
|
+
'Database Administration',
|
|
36
|
+
'Information Security',
|
|
37
|
+
'Network Administration',
|
|
38
|
+
'Systems Administration',
|
|
39
|
+
'DevOps Engineering',
|
|
40
|
+
'Business Law',
|
|
41
|
+
'Immigration Law',
|
|
42
|
+
'Tax Law',
|
|
43
|
+
'Regulatory Law',
|
|
44
|
+
'Paralegal Services',
|
|
45
|
+
'Digital Marketing',
|
|
46
|
+
'Lead Generation',
|
|
47
|
+
'Marketing Strategy',
|
|
48
|
+
'Social Media Marketing',
|
|
49
|
+
'SEO',
|
|
50
|
+
'Language Translation',
|
|
51
|
+
'Legal Translation',
|
|
52
|
+
'Technical Translation',
|
|
53
|
+
'Medical Translation',
|
|
54
|
+
'Desktop Development',
|
|
55
|
+
'Mobile Development',
|
|
56
|
+
'Web Development',
|
|
57
|
+
'Game Development',
|
|
58
|
+
'QA & Testing',
|
|
59
|
+
'Content Writing',
|
|
60
|
+
'Copywriting',
|
|
61
|
+
'Technical Writing',
|
|
62
|
+
'Creative Writing',
|
|
63
|
+
'Editing',
|
|
64
|
+
];
|
|
65
|
+
exports.EXPERIENCE_LEVELS = ['Entry Level', 'Mid Level', 'Senior Level'];
|
|
66
|
+
exports.CLIENT_HISTORY = ['No hires', '1-9 hires', '10+ hires'];
|
|
67
|
+
// Default knowledge object with all null values
|
|
68
|
+
exports.emptyKnowledgeObject = {
|
|
69
|
+
categories: exports.CATEGORIES.reduce((acc, category) => (Object.assign(Object.assign({}, acc), { [category]: null })), {}),
|
|
70
|
+
experienceLevels: exports.EXPERIENCE_LEVELS.reduce((acc, level) => (Object.assign(Object.assign({}, acc), { [level]: null })), {}),
|
|
71
|
+
minHourlyRate: null,
|
|
72
|
+
fixedPriceMin: null,
|
|
73
|
+
clientHistory: exports.CLIENT_HISTORY.reduce((acc, history) => (Object.assign(Object.assign({}, acc), { [history]: null })), {}),
|
|
74
|
+
keywords: [],
|
|
75
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const aiConfigSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
suitabilityPrompt: z.ZodOptional<z.ZodString>;
|
|
5
|
+
proposalPrompt: z.ZodOptional<z.ZodString>;
|
|
6
|
+
questionProposalPrompt: z.ZodOptional<z.ZodString>;
|
|
7
|
+
knowledgeBase: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
id: string;
|
|
10
|
+
suitabilityPrompt?: string | undefined;
|
|
11
|
+
proposalPrompt?: string | undefined;
|
|
12
|
+
questionProposalPrompt?: string | undefined;
|
|
13
|
+
knowledgeBase?: string | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
id: string;
|
|
16
|
+
suitabilityPrompt?: string | undefined;
|
|
17
|
+
proposalPrompt?: string | undefined;
|
|
18
|
+
questionProposalPrompt?: string | undefined;
|
|
19
|
+
knowledgeBase?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const updateAiConfigSchema: z.ZodObject<{
|
|
22
|
+
id: z.ZodOptional<z.ZodString>;
|
|
23
|
+
suitabilityPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
24
|
+
proposalPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
25
|
+
questionProposalPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
26
|
+
knowledgeBase: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
id?: string | undefined;
|
|
29
|
+
suitabilityPrompt?: string | undefined;
|
|
30
|
+
proposalPrompt?: string | undefined;
|
|
31
|
+
questionProposalPrompt?: string | undefined;
|
|
32
|
+
knowledgeBase?: string | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
id?: string | undefined;
|
|
35
|
+
suitabilityPrompt?: string | undefined;
|
|
36
|
+
proposalPrompt?: string | undefined;
|
|
37
|
+
questionProposalPrompt?: string | undefined;
|
|
38
|
+
knowledgeBase?: string | undefined;
|
|
39
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateAiConfigSchema = exports.aiConfigSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.aiConfigSchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string(),
|
|
7
|
+
suitabilityPrompt: zod_1.z.string().optional(),
|
|
8
|
+
proposalPrompt: zod_1.z.string().optional(),
|
|
9
|
+
questionProposalPrompt: zod_1.z.string().optional(),
|
|
10
|
+
knowledgeBase: zod_1.z.string().optional(),
|
|
11
|
+
});
|
|
12
|
+
exports.updateAiConfigSchema = exports.aiConfigSchema.partial();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ai-config';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ai-config"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const proposalDtoSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
3
|
+
status: z.ZodLiteral<"success">;
|
|
4
|
+
biddingAmount: z.ZodNumber;
|
|
5
|
+
boosted: z.ZodBoolean;
|
|
6
|
+
boostingAmount: z.ZodNumber;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
status: "success";
|
|
9
|
+
biddingAmount: number;
|
|
10
|
+
boosted: boolean;
|
|
11
|
+
boostingAmount: number;
|
|
12
|
+
}, {
|
|
13
|
+
status: "success";
|
|
14
|
+
biddingAmount: number;
|
|
15
|
+
boosted: boolean;
|
|
16
|
+
boostingAmount: number;
|
|
17
|
+
}>, z.ZodObject<{
|
|
18
|
+
status: z.ZodLiteral<"failed">;
|
|
19
|
+
errorMessage: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
status: "failed";
|
|
22
|
+
errorMessage: string;
|
|
23
|
+
}, {
|
|
24
|
+
status: "failed";
|
|
25
|
+
errorMessage: string;
|
|
26
|
+
}>]>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.proposalDtoSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.proposalDtoSchema = zod_1.z.discriminatedUnion('status', [
|
|
6
|
+
// Success case
|
|
7
|
+
zod_1.z.object({
|
|
8
|
+
status: zod_1.z.literal('success'),
|
|
9
|
+
biddingAmount: zod_1.z.number(),
|
|
10
|
+
boosted: zod_1.z.boolean(),
|
|
11
|
+
boostingAmount: zod_1.z.number(),
|
|
12
|
+
}),
|
|
13
|
+
// Failed case
|
|
14
|
+
zod_1.z.object({
|
|
15
|
+
status: zod_1.z.literal('failed'),
|
|
16
|
+
errorMessage: zod_1.z.string(),
|
|
17
|
+
}),
|
|
18
|
+
]);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const jobPipelineSchema: z.ZodObject<{
|
|
3
|
+
jobId: z.ZodString;
|
|
4
|
+
addedAt: z.ZodString;
|
|
5
|
+
country: z.ZodOptional<z.ZodString>;
|
|
6
|
+
description: z.ZodString;
|
|
7
|
+
fixedPrice: z.ZodOptional<z.ZodString>;
|
|
8
|
+
hourlyRate: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
min: z.ZodOptional<z.ZodString>;
|
|
10
|
+
max: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
max?: string | undefined;
|
|
13
|
+
min?: string | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
max?: string | undefined;
|
|
16
|
+
min?: string | undefined;
|
|
17
|
+
}>>;
|
|
18
|
+
status: z.ZodString;
|
|
19
|
+
suitabilityRating: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
suitabilityReason: z.ZodOptional<z.ZodString>;
|
|
21
|
+
suitabilityStatus: z.ZodOptional<z.ZodString>;
|
|
22
|
+
title: z.ZodString;
|
|
23
|
+
suitabilityProposal: z.ZodOptional<z.ZodString>;
|
|
24
|
+
suitabilityQuestionAnswerPairs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
25
|
+
question: z.ZodString;
|
|
26
|
+
answer: z.ZodString;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
answer: string;
|
|
29
|
+
question: string;
|
|
30
|
+
}, {
|
|
31
|
+
answer: string;
|
|
32
|
+
question: string;
|
|
33
|
+
}>, "many">>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
title: string;
|
|
36
|
+
description: string;
|
|
37
|
+
status: string;
|
|
38
|
+
jobId: string;
|
|
39
|
+
addedAt: string;
|
|
40
|
+
country?: string | undefined;
|
|
41
|
+
fixedPrice?: string | undefined;
|
|
42
|
+
hourlyRate?: {
|
|
43
|
+
max?: string | undefined;
|
|
44
|
+
min?: string | undefined;
|
|
45
|
+
} | undefined;
|
|
46
|
+
suitabilityRating?: number | undefined;
|
|
47
|
+
suitabilityReason?: string | undefined;
|
|
48
|
+
suitabilityStatus?: string | undefined;
|
|
49
|
+
suitabilityProposal?: string | undefined;
|
|
50
|
+
suitabilityQuestionAnswerPairs?: {
|
|
51
|
+
answer: string;
|
|
52
|
+
question: string;
|
|
53
|
+
}[] | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
title: string;
|
|
56
|
+
description: string;
|
|
57
|
+
status: string;
|
|
58
|
+
jobId: string;
|
|
59
|
+
addedAt: string;
|
|
60
|
+
country?: string | undefined;
|
|
61
|
+
fixedPrice?: string | undefined;
|
|
62
|
+
hourlyRate?: {
|
|
63
|
+
max?: string | undefined;
|
|
64
|
+
min?: string | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
suitabilityRating?: number | undefined;
|
|
67
|
+
suitabilityReason?: string | undefined;
|
|
68
|
+
suitabilityStatus?: string | undefined;
|
|
69
|
+
suitabilityProposal?: string | undefined;
|
|
70
|
+
suitabilityQuestionAnswerPairs?: {
|
|
71
|
+
answer: string;
|
|
72
|
+
question: string;
|
|
73
|
+
}[] | undefined;
|
|
74
|
+
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.jobPipelineSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.jobPipelineSchema = zod_1.z.object({
|
|
6
|
+
jobId: zod_1.z.string(),
|
|
7
|
+
addedAt: zod_1.z.string(),
|
|
8
|
+
country: zod_1.z.string().optional(),
|
|
9
|
+
description: zod_1.z.string(),
|
|
10
|
+
fixedPrice: zod_1.z.string().optional(),
|
|
11
|
+
hourlyRate: zod_1.z
|
|
12
|
+
.object({
|
|
13
|
+
min: zod_1.z.string().optional(),
|
|
14
|
+
max: zod_1.z.string().optional(),
|
|
15
|
+
})
|
|
16
|
+
.optional(),
|
|
17
|
+
status: zod_1.z.string(),
|
|
18
|
+
suitabilityRating: zod_1.z.number().optional(),
|
|
19
|
+
suitabilityReason: zod_1.z.string().optional(),
|
|
20
|
+
suitabilityStatus: zod_1.z.string().optional(),
|
|
21
|
+
title: zod_1.z.string(),
|
|
22
|
+
suitabilityProposal: zod_1.z.string().optional(),
|
|
23
|
+
suitabilityQuestionAnswerPairs: zod_1.z
|
|
24
|
+
.array(zod_1.z.object({
|
|
25
|
+
question: zod_1.z.string(),
|
|
26
|
+
answer: zod_1.z.string(),
|
|
27
|
+
}))
|
|
28
|
+
.optional(),
|
|
29
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const jobSuitabilityStatusSchema: z.ZodEnum<["completed", "pending", "failed"]>;
|
|
3
|
+
export declare const questionAnswerPairSchema: z.ZodObject<{
|
|
4
|
+
question: z.ZodString;
|
|
5
|
+
answer: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
answer: string;
|
|
8
|
+
question: string;
|
|
9
|
+
}, {
|
|
10
|
+
answer: string;
|
|
11
|
+
question: string;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.questionAnswerPairSchema = exports.jobSuitabilityStatusSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.jobSuitabilityStatusSchema = zod_1.z.enum([
|
|
6
|
+
'completed',
|
|
7
|
+
'pending',
|
|
8
|
+
'failed',
|
|
9
|
+
]);
|
|
10
|
+
exports.questionAnswerPairSchema = zod_1.z.object({
|
|
11
|
+
question: zod_1.z.string(),
|
|
12
|
+
answer: zod_1.z.string(),
|
|
13
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
export declare const jobPipelineDetailsSchema: z.ZodObject<Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
3
3
|
id: z.ZodNullable<z.ZodString>;
|
|
4
4
|
createdAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -222,7 +222,7 @@ export declare const jobPipelineDetailsSchema: z.ZodObject<Pick<z.objectUtil.ext
|
|
|
222
222
|
biddingAmount: z.ZodOptional<z.ZodNumber>;
|
|
223
223
|
boosted: z.ZodOptional<z.ZodBoolean>;
|
|
224
224
|
boostingAmount: z.ZodOptional<z.ZodNumber>;
|
|
225
|
-
}>, "title" | "metadata" | "description" | "status" | "jobId" | "updatedAt" | "clientInfo" | "addedAt" | "suitabilityRating" | "suitabilityReason" | "suitabilityStatus" | "biddingAmount" | "boosted" | "boostingAmount">, "strip", z.ZodTypeAny, {
|
|
225
|
+
}>, "title" | "metadata" | "description" | "status" | "jobId" | "updatedAt" | "questions" | "clientInfo" | "addedAt" | "suitabilityRating" | "suitabilityReason" | "suitabilityStatus" | "biddingAmount" | "boosted" | "boostingAmount">, "strip", z.ZodTypeAny, {
|
|
226
226
|
title: string | null;
|
|
227
227
|
metadata: {
|
|
228
228
|
hourlyRate: {
|
|
@@ -233,6 +233,7 @@ export declare const jobPipelineDetailsSchema: z.ZodObject<Pick<z.objectUtil.ext
|
|
|
233
233
|
};
|
|
234
234
|
description: string | null;
|
|
235
235
|
jobId: string;
|
|
236
|
+
questions: string[] | null;
|
|
236
237
|
clientInfo: {
|
|
237
238
|
country: string | null;
|
|
238
239
|
};
|
|
@@ -256,6 +257,7 @@ export declare const jobPipelineDetailsSchema: z.ZodObject<Pick<z.objectUtil.ext
|
|
|
256
257
|
};
|
|
257
258
|
description: string | null;
|
|
258
259
|
jobId: string;
|
|
260
|
+
questions: string[] | null;
|
|
259
261
|
clientInfo: {
|
|
260
262
|
country: string | null;
|
|
261
263
|
};
|
|
@@ -493,7 +495,7 @@ export declare const jobPipelineResponseSchema: z.ZodObject<{
|
|
|
493
495
|
biddingAmount: z.ZodOptional<z.ZodNumber>;
|
|
494
496
|
boosted: z.ZodOptional<z.ZodBoolean>;
|
|
495
497
|
boostingAmount: z.ZodOptional<z.ZodNumber>;
|
|
496
|
-
}>, "title" | "metadata" | "description" | "status" | "jobId" | "updatedAt" | "clientInfo" | "addedAt" | "suitabilityRating" | "suitabilityReason" | "suitabilityStatus" | "biddingAmount" | "boosted" | "boostingAmount">, "strip", z.ZodTypeAny, {
|
|
498
|
+
}>, "title" | "metadata" | "description" | "status" | "jobId" | "updatedAt" | "questions" | "clientInfo" | "addedAt" | "suitabilityRating" | "suitabilityReason" | "suitabilityStatus" | "biddingAmount" | "boosted" | "boostingAmount">, "strip", z.ZodTypeAny, {
|
|
497
499
|
title: string | null;
|
|
498
500
|
metadata: {
|
|
499
501
|
hourlyRate: {
|
|
@@ -504,6 +506,7 @@ export declare const jobPipelineResponseSchema: z.ZodObject<{
|
|
|
504
506
|
};
|
|
505
507
|
description: string | null;
|
|
506
508
|
jobId: string;
|
|
509
|
+
questions: string[] | null;
|
|
507
510
|
clientInfo: {
|
|
508
511
|
country: string | null;
|
|
509
512
|
};
|
|
@@ -527,6 +530,7 @@ export declare const jobPipelineResponseSchema: z.ZodObject<{
|
|
|
527
530
|
};
|
|
528
531
|
description: string | null;
|
|
529
532
|
jobId: string;
|
|
533
|
+
questions: string[] | null;
|
|
530
534
|
clientInfo: {
|
|
531
535
|
country: string | null;
|
|
532
536
|
};
|
|
@@ -555,6 +559,7 @@ export declare const jobPipelineResponseSchema: z.ZodObject<{
|
|
|
555
559
|
};
|
|
556
560
|
description: string | null;
|
|
557
561
|
jobId: string;
|
|
562
|
+
questions: string[] | null;
|
|
558
563
|
clientInfo: {
|
|
559
564
|
country: string | null;
|
|
560
565
|
};
|
|
@@ -583,6 +588,7 @@ export declare const jobPipelineResponseSchema: z.ZodObject<{
|
|
|
583
588
|
};
|
|
584
589
|
description: string | null;
|
|
585
590
|
jobId: string;
|
|
591
|
+
questions: string[] | null;
|
|
586
592
|
clientInfo: {
|
|
587
593
|
country: string | null;
|
|
588
594
|
};
|
|
@@ -33,6 +33,7 @@ exports.jobPipelineDetailsSchema = job_details_1.jobDetailsSchema
|
|
|
33
33
|
biddingAmount: true,
|
|
34
34
|
boostingAmount: true,
|
|
35
35
|
boosted: true,
|
|
36
|
+
questions: true,
|
|
36
37
|
});
|
|
37
38
|
exports.jobPipelineResponseSchema = zod_1.z.object({
|
|
38
39
|
jobs: zod_1.z.array(exports.jobPipelineDetailsSchema),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './knowledge-object';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./knowledge-object"), exports);
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const KnowledgeObjectSchema: z.ZodObject<{
|
|
3
|
+
categories: z.ZodObject<any, "strip", z.ZodTypeAny, {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
}, {
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
}>;
|
|
8
|
+
experienceLevels: z.ZodObject<any, "strip", z.ZodTypeAny, {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
}, {
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
}>;
|
|
13
|
+
minHourlyRate: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
fixedPriceMin: z.ZodNullable<z.ZodNumber>;
|
|
15
|
+
clientHistory: z.ZodObject<any, "strip", z.ZodTypeAny, {
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
}, {
|
|
18
|
+
[x: string]: any;
|
|
19
|
+
}>;
|
|
20
|
+
keywords: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
categories: {
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
};
|
|
25
|
+
experienceLevels: {
|
|
26
|
+
[x: string]: any;
|
|
27
|
+
};
|
|
28
|
+
minHourlyRate: number | null;
|
|
29
|
+
fixedPriceMin: number | null;
|
|
30
|
+
clientHistory: {
|
|
31
|
+
[x: string]: any;
|
|
32
|
+
};
|
|
33
|
+
keywords: string[] | null;
|
|
34
|
+
}, {
|
|
35
|
+
categories: {
|
|
36
|
+
[x: string]: any;
|
|
37
|
+
};
|
|
38
|
+
experienceLevels: {
|
|
39
|
+
[x: string]: any;
|
|
40
|
+
};
|
|
41
|
+
minHourlyRate: number | null;
|
|
42
|
+
fixedPriceMin: number | null;
|
|
43
|
+
clientHistory: {
|
|
44
|
+
[x: string]: any;
|
|
45
|
+
};
|
|
46
|
+
keywords: string[] | null;
|
|
47
|
+
}>;
|
|
48
|
+
export declare const chatResponseSchema: z.ZodObject<{
|
|
49
|
+
followUpQuestion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
+
knowledgeObject: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
categories: z.ZodObject<any, "strip", z.ZodTypeAny, {
|
|
52
|
+
[x: string]: any;
|
|
53
|
+
}, {
|
|
54
|
+
[x: string]: any;
|
|
55
|
+
}>;
|
|
56
|
+
experienceLevels: z.ZodObject<any, "strip", z.ZodTypeAny, {
|
|
57
|
+
[x: string]: any;
|
|
58
|
+
}, {
|
|
59
|
+
[x: string]: any;
|
|
60
|
+
}>;
|
|
61
|
+
minHourlyRate: z.ZodNullable<z.ZodNumber>;
|
|
62
|
+
fixedPriceMin: z.ZodNullable<z.ZodNumber>;
|
|
63
|
+
clientHistory: z.ZodObject<any, "strip", z.ZodTypeAny, {
|
|
64
|
+
[x: string]: any;
|
|
65
|
+
}, {
|
|
66
|
+
[x: string]: any;
|
|
67
|
+
}>;
|
|
68
|
+
keywords: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
categories: {
|
|
71
|
+
[x: string]: any;
|
|
72
|
+
};
|
|
73
|
+
experienceLevels: {
|
|
74
|
+
[x: string]: any;
|
|
75
|
+
};
|
|
76
|
+
minHourlyRate: number | null;
|
|
77
|
+
fixedPriceMin: number | null;
|
|
78
|
+
clientHistory: {
|
|
79
|
+
[x: string]: any;
|
|
80
|
+
};
|
|
81
|
+
keywords: string[] | null;
|
|
82
|
+
}, {
|
|
83
|
+
categories: {
|
|
84
|
+
[x: string]: any;
|
|
85
|
+
};
|
|
86
|
+
experienceLevels: {
|
|
87
|
+
[x: string]: any;
|
|
88
|
+
};
|
|
89
|
+
minHourlyRate: number | null;
|
|
90
|
+
fixedPriceMin: number | null;
|
|
91
|
+
clientHistory: {
|
|
92
|
+
[x: string]: any;
|
|
93
|
+
};
|
|
94
|
+
keywords: string[] | null;
|
|
95
|
+
}>>;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
followUpQuestion?: string | null | undefined;
|
|
98
|
+
knowledgeObject?: {
|
|
99
|
+
categories: {
|
|
100
|
+
[x: string]: any;
|
|
101
|
+
};
|
|
102
|
+
experienceLevels: {
|
|
103
|
+
[x: string]: any;
|
|
104
|
+
};
|
|
105
|
+
minHourlyRate: number | null;
|
|
106
|
+
fixedPriceMin: number | null;
|
|
107
|
+
clientHistory: {
|
|
108
|
+
[x: string]: any;
|
|
109
|
+
};
|
|
110
|
+
keywords: string[] | null;
|
|
111
|
+
} | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
followUpQuestion?: string | null | undefined;
|
|
114
|
+
knowledgeObject?: {
|
|
115
|
+
categories: {
|
|
116
|
+
[x: string]: any;
|
|
117
|
+
};
|
|
118
|
+
experienceLevels: {
|
|
119
|
+
[x: string]: any;
|
|
120
|
+
};
|
|
121
|
+
minHourlyRate: number | null;
|
|
122
|
+
fixedPriceMin: number | null;
|
|
123
|
+
clientHistory: {
|
|
124
|
+
[x: string]: any;
|
|
125
|
+
};
|
|
126
|
+
keywords: string[] | null;
|
|
127
|
+
} | undefined;
|
|
128
|
+
}>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.chatResponseSchema = exports.KnowledgeObjectSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const job_filter_options_1 = require("../../constants/job-filter-options");
|
|
6
|
+
exports.KnowledgeObjectSchema = zod_1.z.object({
|
|
7
|
+
categories: zod_1.z
|
|
8
|
+
.object(job_filter_options_1.CATEGORIES.reduce((acc, category) => (Object.assign(Object.assign({}, acc), { [category]: zod_1.z
|
|
9
|
+
.boolean()
|
|
10
|
+
.nullable()
|
|
11
|
+
.describe(`Indicates if ${category} category is suitable based on skills and services`) })), {}))
|
|
12
|
+
.describe('Job categories for the agency'),
|
|
13
|
+
experienceLevels: zod_1.z
|
|
14
|
+
.object(job_filter_options_1.EXPERIENCE_LEVELS.reduce((acc, level) => (Object.assign(Object.assign({}, acc), { [level]: zod_1.z
|
|
15
|
+
.boolean()
|
|
16
|
+
.nullable()
|
|
17
|
+
.describe(`Has ${level} experience level`) })), {}))
|
|
18
|
+
.describe('Experience level of the agency in the services they offer'),
|
|
19
|
+
minHourlyRate: zod_1.z
|
|
20
|
+
.number()
|
|
21
|
+
.min(0)
|
|
22
|
+
.nullable()
|
|
23
|
+
.describe('Minimum hourly rate in USD that the agency is willing to accept for providing their services'),
|
|
24
|
+
fixedPriceMin: zod_1.z
|
|
25
|
+
.number()
|
|
26
|
+
.min(0)
|
|
27
|
+
.nullable()
|
|
28
|
+
.describe('Minimum budget of the project in USD that the agency is willing to accept for providing their services'),
|
|
29
|
+
clientHistory: zod_1.z
|
|
30
|
+
.object(job_filter_options_1.CLIENT_HISTORY.reduce((acc, history) => (Object.assign(Object.assign({}, acc), { [history]: zod_1.z
|
|
31
|
+
.boolean()
|
|
32
|
+
.nullable()
|
|
33
|
+
.describe(`Whether the job poster (client) has made ${history} hires on Upwork. This refers to the client's hiring history, not the agency's experience.`) })), {}))
|
|
34
|
+
.describe("Filters for the job poster's (client's) hiring history on Upwork - indicates how many previous hires the client should have made to be considered suitable"),
|
|
35
|
+
keywords: zod_1.z
|
|
36
|
+
.array(zod_1.z.string())
|
|
37
|
+
.nullable()
|
|
38
|
+
.describe('List of search keywords that best match the agency\'s expertise and services. These keywords will be used when searching for job posts on Upwork to find the most relevant opportunities. Examples might include specific technologies, skills, or service areas like "React.js", "mobile development", or "UI/UX design".'),
|
|
39
|
+
});
|
|
40
|
+
exports.chatResponseSchema = zod_1.z.object({
|
|
41
|
+
followUpQuestion: zod_1.z
|
|
42
|
+
.string()
|
|
43
|
+
.nullable()
|
|
44
|
+
.optional()
|
|
45
|
+
.describe('This is a question that you should ask a user for a field that you left null. This is important. Always ask this if there is a null field.'),
|
|
46
|
+
knowledgeObject: exports.KnowledgeObjectSchema.optional(),
|
|
47
|
+
});
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const scrapeResponseSchema: z.ZodObject<{
|
|
3
|
+
jobs: z.ZodArray<z.ZodObject<{
|
|
4
|
+
id: z.ZodNullable<z.ZodString>;
|
|
5
|
+
createdAt: z.ZodNullable<z.ZodNumber>;
|
|
6
|
+
title: z.ZodNullable<z.ZodString>;
|
|
7
|
+
category: z.ZodNullable<z.ZodString>;
|
|
8
|
+
skills: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name: string;
|
|
12
|
+
}, {
|
|
13
|
+
name: string;
|
|
14
|
+
}>, "many">>;
|
|
15
|
+
datetime: z.ZodNullable<z.ZodNumber>;
|
|
16
|
+
description: z.ZodNullable<z.ZodString>;
|
|
17
|
+
descriptionLength: z.ZodNullable<z.ZodNumber>;
|
|
18
|
+
connectsRequired: z.ZodNullable<z.ZodNumber>;
|
|
19
|
+
projectType: z.ZodNullable<z.ZodString>;
|
|
20
|
+
projectDuration: z.ZodNullable<z.ZodString>;
|
|
21
|
+
questions: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
22
|
+
jobUrl: z.ZodNullable<z.ZodString>;
|
|
23
|
+
metadata: z.ZodNullable<z.ZodObject<{
|
|
24
|
+
hours: z.ZodNullable<z.ZodString>;
|
|
25
|
+
duration: z.ZodNullable<z.ZodString>;
|
|
26
|
+
experienceLevel: z.ZodNullable<z.ZodString>;
|
|
27
|
+
hourlyRate: z.ZodNullable<z.ZodObject<{
|
|
28
|
+
min: z.ZodNullable<z.ZodNumber>;
|
|
29
|
+
max: z.ZodNullable<z.ZodNumber>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
max: number | null;
|
|
32
|
+
min: number | null;
|
|
33
|
+
}, {
|
|
34
|
+
max: number | null;
|
|
35
|
+
min: number | null;
|
|
36
|
+
}>>;
|
|
37
|
+
paymentType: z.ZodNullable<z.ZodString>;
|
|
38
|
+
fixedPrice: z.ZodNullable<z.ZodNumber>;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
hours: string | null;
|
|
41
|
+
duration: string | null;
|
|
42
|
+
experienceLevel: string | null;
|
|
43
|
+
hourlyRate: {
|
|
44
|
+
max: number | null;
|
|
45
|
+
min: number | null;
|
|
46
|
+
} | null;
|
|
47
|
+
paymentType: string | null;
|
|
48
|
+
fixedPrice: number | null;
|
|
49
|
+
}, {
|
|
50
|
+
hours: string | null;
|
|
51
|
+
duration: string | null;
|
|
52
|
+
experienceLevel: string | null;
|
|
53
|
+
hourlyRate: {
|
|
54
|
+
max: number | null;
|
|
55
|
+
min: number | null;
|
|
56
|
+
} | null;
|
|
57
|
+
paymentType: string | null;
|
|
58
|
+
fixedPrice: number | null;
|
|
59
|
+
}>>;
|
|
60
|
+
clientInfo: z.ZodNullable<z.ZodObject<{
|
|
61
|
+
isPaymentVerified: z.ZodNullable<z.ZodBoolean>;
|
|
62
|
+
numberOfReviews: z.ZodNullable<z.ZodNumber>;
|
|
63
|
+
rating: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
country: z.ZodNullable<z.ZodString>;
|
|
65
|
+
region: z.ZodNullable<z.ZodString>;
|
|
66
|
+
jobsPosted: z.ZodNullable<z.ZodNumber>;
|
|
67
|
+
totalSpent: z.ZodNullable<z.ZodNumber>;
|
|
68
|
+
numberOfHires: z.ZodNullable<z.ZodNumber>;
|
|
69
|
+
activeEngagements: z.ZodNullable<z.ZodNumber>;
|
|
70
|
+
openJobs: z.ZodNullable<z.ZodNumber>;
|
|
71
|
+
hireRate: z.ZodNullable<z.ZodNumber>;
|
|
72
|
+
memberSince: z.ZodNullable<z.ZodString>;
|
|
73
|
+
companyIndustry: z.ZodNullable<z.ZodString>;
|
|
74
|
+
companySize: z.ZodNullable<z.ZodString>;
|
|
75
|
+
enterpriseClient: z.ZodNullable<z.ZodBoolean>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
country: string | null;
|
|
78
|
+
region: string | null;
|
|
79
|
+
rating: number | null;
|
|
80
|
+
isPaymentVerified: boolean | null;
|
|
81
|
+
numberOfReviews: number | null;
|
|
82
|
+
jobsPosted: number | null;
|
|
83
|
+
totalSpent: number | null;
|
|
84
|
+
numberOfHires: number | null;
|
|
85
|
+
activeEngagements: number | null;
|
|
86
|
+
openJobs: number | null;
|
|
87
|
+
hireRate: number | null;
|
|
88
|
+
memberSince: string | null;
|
|
89
|
+
companyIndustry: string | null;
|
|
90
|
+
companySize: string | null;
|
|
91
|
+
enterpriseClient: boolean | null;
|
|
92
|
+
}, {
|
|
93
|
+
country: string | null;
|
|
94
|
+
region: string | null;
|
|
95
|
+
rating: number | null;
|
|
96
|
+
isPaymentVerified: boolean | null;
|
|
97
|
+
numberOfReviews: number | null;
|
|
98
|
+
jobsPosted: number | null;
|
|
99
|
+
totalSpent: number | null;
|
|
100
|
+
numberOfHires: number | null;
|
|
101
|
+
activeEngagements: number | null;
|
|
102
|
+
openJobs: number | null;
|
|
103
|
+
hireRate: number | null;
|
|
104
|
+
memberSince: string | null;
|
|
105
|
+
companyIndustry: string | null;
|
|
106
|
+
companySize: string | null;
|
|
107
|
+
enterpriseClient: boolean | null;
|
|
108
|
+
}>>;
|
|
109
|
+
vendorQualifications: z.ZodNullable<z.ZodObject<{
|
|
110
|
+
location: z.ZodNullable<z.ZodString>;
|
|
111
|
+
talentType: z.ZodNullable<z.ZodEnum<["Agency", "Independent", "unspecified"]>>;
|
|
112
|
+
englishLevel: z.ZodNullable<z.ZodString>;
|
|
113
|
+
minimumEarnings: z.ZodNullable<z.ZodNumber>;
|
|
114
|
+
jobSuccessScore: z.ZodNullable<z.ZodString>;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
location: string | null;
|
|
117
|
+
talentType: "unspecified" | "Agency" | "Independent" | null;
|
|
118
|
+
englishLevel: string | null;
|
|
119
|
+
minimumEarnings: number | null;
|
|
120
|
+
jobSuccessScore: string | null;
|
|
121
|
+
}, {
|
|
122
|
+
location: string | null;
|
|
123
|
+
talentType: "unspecified" | "Agency" | "Independent" | null;
|
|
124
|
+
englishLevel: string | null;
|
|
125
|
+
minimumEarnings: number | null;
|
|
126
|
+
jobSuccessScore: string | null;
|
|
127
|
+
}>>;
|
|
128
|
+
processed: z.ZodNullable<z.ZodBoolean>;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
id: string | null;
|
|
131
|
+
title: string | null;
|
|
132
|
+
metadata: {
|
|
133
|
+
hours: string | null;
|
|
134
|
+
duration: string | null;
|
|
135
|
+
experienceLevel: string | null;
|
|
136
|
+
hourlyRate: {
|
|
137
|
+
max: number | null;
|
|
138
|
+
min: number | null;
|
|
139
|
+
} | null;
|
|
140
|
+
paymentType: string | null;
|
|
141
|
+
fixedPrice: number | null;
|
|
142
|
+
} | null;
|
|
143
|
+
description: string | null;
|
|
144
|
+
datetime: number | null;
|
|
145
|
+
createdAt: number | null;
|
|
146
|
+
category: string | null;
|
|
147
|
+
skills: {
|
|
148
|
+
name: string;
|
|
149
|
+
}[] | null;
|
|
150
|
+
descriptionLength: number | null;
|
|
151
|
+
connectsRequired: number | null;
|
|
152
|
+
projectType: string | null;
|
|
153
|
+
projectDuration: string | null;
|
|
154
|
+
questions: string[] | null;
|
|
155
|
+
jobUrl: string | null;
|
|
156
|
+
clientInfo: {
|
|
157
|
+
country: string | null;
|
|
158
|
+
region: string | null;
|
|
159
|
+
rating: number | null;
|
|
160
|
+
isPaymentVerified: boolean | null;
|
|
161
|
+
numberOfReviews: number | null;
|
|
162
|
+
jobsPosted: number | null;
|
|
163
|
+
totalSpent: number | null;
|
|
164
|
+
numberOfHires: number | null;
|
|
165
|
+
activeEngagements: number | null;
|
|
166
|
+
openJobs: number | null;
|
|
167
|
+
hireRate: number | null;
|
|
168
|
+
memberSince: string | null;
|
|
169
|
+
companyIndustry: string | null;
|
|
170
|
+
companySize: string | null;
|
|
171
|
+
enterpriseClient: boolean | null;
|
|
172
|
+
} | null;
|
|
173
|
+
vendorQualifications: {
|
|
174
|
+
location: string | null;
|
|
175
|
+
talentType: "unspecified" | "Agency" | "Independent" | null;
|
|
176
|
+
englishLevel: string | null;
|
|
177
|
+
minimumEarnings: number | null;
|
|
178
|
+
jobSuccessScore: string | null;
|
|
179
|
+
} | null;
|
|
180
|
+
processed: boolean | null;
|
|
181
|
+
}, {
|
|
182
|
+
id: string | null;
|
|
183
|
+
title: string | null;
|
|
184
|
+
metadata: {
|
|
185
|
+
hours: string | null;
|
|
186
|
+
duration: string | null;
|
|
187
|
+
experienceLevel: string | null;
|
|
188
|
+
hourlyRate: {
|
|
189
|
+
max: number | null;
|
|
190
|
+
min: number | null;
|
|
191
|
+
} | null;
|
|
192
|
+
paymentType: string | null;
|
|
193
|
+
fixedPrice: number | null;
|
|
194
|
+
} | null;
|
|
195
|
+
description: string | null;
|
|
196
|
+
datetime: number | null;
|
|
197
|
+
createdAt: number | null;
|
|
198
|
+
category: string | null;
|
|
199
|
+
skills: {
|
|
200
|
+
name: string;
|
|
201
|
+
}[] | null;
|
|
202
|
+
descriptionLength: number | null;
|
|
203
|
+
connectsRequired: number | null;
|
|
204
|
+
projectType: string | null;
|
|
205
|
+
projectDuration: string | null;
|
|
206
|
+
questions: string[] | null;
|
|
207
|
+
jobUrl: string | null;
|
|
208
|
+
clientInfo: {
|
|
209
|
+
country: string | null;
|
|
210
|
+
region: string | null;
|
|
211
|
+
rating: number | null;
|
|
212
|
+
isPaymentVerified: boolean | null;
|
|
213
|
+
numberOfReviews: number | null;
|
|
214
|
+
jobsPosted: number | null;
|
|
215
|
+
totalSpent: number | null;
|
|
216
|
+
numberOfHires: number | null;
|
|
217
|
+
activeEngagements: number | null;
|
|
218
|
+
openJobs: number | null;
|
|
219
|
+
hireRate: number | null;
|
|
220
|
+
memberSince: string | null;
|
|
221
|
+
companyIndustry: string | null;
|
|
222
|
+
companySize: string | null;
|
|
223
|
+
enterpriseClient: boolean | null;
|
|
224
|
+
} | null;
|
|
225
|
+
vendorQualifications: {
|
|
226
|
+
location: string | null;
|
|
227
|
+
talentType: "unspecified" | "Agency" | "Independent" | null;
|
|
228
|
+
englishLevel: string | null;
|
|
229
|
+
minimumEarnings: number | null;
|
|
230
|
+
jobSuccessScore: string | null;
|
|
231
|
+
} | null;
|
|
232
|
+
processed: boolean | null;
|
|
233
|
+
}>, "many">;
|
|
234
|
+
cookies: z.ZodArray<z.ZodAny, "many">;
|
|
235
|
+
}, "strip", z.ZodTypeAny, {
|
|
236
|
+
jobs: {
|
|
237
|
+
id: string | null;
|
|
238
|
+
title: string | null;
|
|
239
|
+
metadata: {
|
|
240
|
+
hours: string | null;
|
|
241
|
+
duration: string | null;
|
|
242
|
+
experienceLevel: string | null;
|
|
243
|
+
hourlyRate: {
|
|
244
|
+
max: number | null;
|
|
245
|
+
min: number | null;
|
|
246
|
+
} | null;
|
|
247
|
+
paymentType: string | null;
|
|
248
|
+
fixedPrice: number | null;
|
|
249
|
+
} | null;
|
|
250
|
+
description: string | null;
|
|
251
|
+
datetime: number | null;
|
|
252
|
+
createdAt: number | null;
|
|
253
|
+
category: string | null;
|
|
254
|
+
skills: {
|
|
255
|
+
name: string;
|
|
256
|
+
}[] | null;
|
|
257
|
+
descriptionLength: number | null;
|
|
258
|
+
connectsRequired: number | null;
|
|
259
|
+
projectType: string | null;
|
|
260
|
+
projectDuration: string | null;
|
|
261
|
+
questions: string[] | null;
|
|
262
|
+
jobUrl: string | null;
|
|
263
|
+
clientInfo: {
|
|
264
|
+
country: string | null;
|
|
265
|
+
region: string | null;
|
|
266
|
+
rating: number | null;
|
|
267
|
+
isPaymentVerified: boolean | null;
|
|
268
|
+
numberOfReviews: number | null;
|
|
269
|
+
jobsPosted: number | null;
|
|
270
|
+
totalSpent: number | null;
|
|
271
|
+
numberOfHires: number | null;
|
|
272
|
+
activeEngagements: number | null;
|
|
273
|
+
openJobs: number | null;
|
|
274
|
+
hireRate: number | null;
|
|
275
|
+
memberSince: string | null;
|
|
276
|
+
companyIndustry: string | null;
|
|
277
|
+
companySize: string | null;
|
|
278
|
+
enterpriseClient: boolean | null;
|
|
279
|
+
} | null;
|
|
280
|
+
vendorQualifications: {
|
|
281
|
+
location: string | null;
|
|
282
|
+
talentType: "unspecified" | "Agency" | "Independent" | null;
|
|
283
|
+
englishLevel: string | null;
|
|
284
|
+
minimumEarnings: number | null;
|
|
285
|
+
jobSuccessScore: string | null;
|
|
286
|
+
} | null;
|
|
287
|
+
processed: boolean | null;
|
|
288
|
+
}[];
|
|
289
|
+
cookies: any[];
|
|
290
|
+
}, {
|
|
291
|
+
jobs: {
|
|
292
|
+
id: string | null;
|
|
293
|
+
title: string | null;
|
|
294
|
+
metadata: {
|
|
295
|
+
hours: string | null;
|
|
296
|
+
duration: string | null;
|
|
297
|
+
experienceLevel: string | null;
|
|
298
|
+
hourlyRate: {
|
|
299
|
+
max: number | null;
|
|
300
|
+
min: number | null;
|
|
301
|
+
} | null;
|
|
302
|
+
paymentType: string | null;
|
|
303
|
+
fixedPrice: number | null;
|
|
304
|
+
} | null;
|
|
305
|
+
description: string | null;
|
|
306
|
+
datetime: number | null;
|
|
307
|
+
createdAt: number | null;
|
|
308
|
+
category: string | null;
|
|
309
|
+
skills: {
|
|
310
|
+
name: string;
|
|
311
|
+
}[] | null;
|
|
312
|
+
descriptionLength: number | null;
|
|
313
|
+
connectsRequired: number | null;
|
|
314
|
+
projectType: string | null;
|
|
315
|
+
projectDuration: string | null;
|
|
316
|
+
questions: string[] | null;
|
|
317
|
+
jobUrl: string | null;
|
|
318
|
+
clientInfo: {
|
|
319
|
+
country: string | null;
|
|
320
|
+
region: string | null;
|
|
321
|
+
rating: number | null;
|
|
322
|
+
isPaymentVerified: boolean | null;
|
|
323
|
+
numberOfReviews: number | null;
|
|
324
|
+
jobsPosted: number | null;
|
|
325
|
+
totalSpent: number | null;
|
|
326
|
+
numberOfHires: number | null;
|
|
327
|
+
activeEngagements: number | null;
|
|
328
|
+
openJobs: number | null;
|
|
329
|
+
hireRate: number | null;
|
|
330
|
+
memberSince: string | null;
|
|
331
|
+
companyIndustry: string | null;
|
|
332
|
+
companySize: string | null;
|
|
333
|
+
enterpriseClient: boolean | null;
|
|
334
|
+
} | null;
|
|
335
|
+
vendorQualifications: {
|
|
336
|
+
location: string | null;
|
|
337
|
+
talentType: "unspecified" | "Agency" | "Independent" | null;
|
|
338
|
+
englishLevel: string | null;
|
|
339
|
+
minimumEarnings: number | null;
|
|
340
|
+
jobSuccessScore: string | null;
|
|
341
|
+
} | null;
|
|
342
|
+
processed: boolean | null;
|
|
343
|
+
}[];
|
|
344
|
+
cookies: any[];
|
|
345
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.scrapeResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const job_1 = require("../job");
|
|
6
|
+
exports.scrapeResponseSchema = zod_1.z.object({
|
|
7
|
+
jobs: zod_1.z.array(job_1.upworkJobSchema),
|
|
8
|
+
cookies: zod_1.z.array(zod_1.z.any()),
|
|
9
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ai-config';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ai-config"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './knowledge-object';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./knowledge-object"), exports);
|