lancer-shared 1.0.147 → 1.0.149
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 +3 -2
- package/dist/constants/routes.js +29 -28
- package/dist/constants/upwork-filters.d.ts +5 -0
- package/dist/constants/upwork-filters.js +75 -0
- package/dist/schemas/account/bidder-account.d.ts +15 -10
- package/dist/schemas/account/bidder-account.js +2 -2
- 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/bid/bid-status.d.ts +30 -0
- package/dist/schemas/bid/bid-status.js +15 -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/job.d.ts +16 -16
- 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/schemas/upwork-account/index.d.ts +1 -1
- package/dist/schemas/upwork-account/index.js +1 -1
- package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +14 -14
- package/dist/schemas/upwork-account/upwork-business-manager-account.js +2 -2
- package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +92 -0
- package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
- package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +23 -23
- package/dist/schemas/upwork-account/upwork-scraping-account.js +4 -3
- 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/bid/bid-status.d.ts +5 -0
- package/dist/types/bid/bid-status.js +2 -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/dist/types/upwork-account/upwork-scraping-account.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LeadStatus, TimeFilter } from
|
|
1
|
+
import { LeadStatus, TimeFilter } from "../types";
|
|
2
2
|
export declare const ROUTES: {
|
|
3
3
|
readonly AUTH: {
|
|
4
4
|
readonly BASE: "auth";
|
|
@@ -21,7 +21,7 @@ export declare const ROUTES: {
|
|
|
21
21
|
readonly INSIGHTS: (campaignId: string) => string;
|
|
22
22
|
readonly CONNECT_SAVED: (campaignId: string) => string;
|
|
23
23
|
readonly ANALYTICS: (campaignId: string, timeFilter: TimeFilter) => string;
|
|
24
|
-
readonly ACTIVITY: (campaignId: string, status: LeadStatus |
|
|
24
|
+
readonly ACTIVITY: (campaignId: string, status: LeadStatus | "all", offset: string, limit: string) => string;
|
|
25
25
|
readonly INTEGRATIONS: {
|
|
26
26
|
readonly BASE: (campaignId: string) => string;
|
|
27
27
|
readonly TEST_SUITABILITY_WEBHOOK: (campaignId: string, integrationId: string) => string;
|
|
@@ -55,6 +55,7 @@ export declare const ROUTES: {
|
|
|
55
55
|
};
|
|
56
56
|
readonly AI_CONFIG: {
|
|
57
57
|
readonly BASE: "ai-config";
|
|
58
|
+
readonly GENERATE_KNOWLEDGE_BASE: "ai-config/generate-knowledge-base";
|
|
58
59
|
};
|
|
59
60
|
readonly COOKIES: {
|
|
60
61
|
readonly BASE: "cookies";
|
package/dist/constants/routes.js
CHANGED
|
@@ -3,15 +3,15 @@ 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
|
EVENTS: {
|
|
10
|
-
BASE:
|
|
10
|
+
BASE: "events",
|
|
11
11
|
BY_ID: (id) => `events/${id}`,
|
|
12
12
|
},
|
|
13
13
|
CAMPAIGNS: {
|
|
14
|
-
BASE:
|
|
14
|
+
BASE: "campaigns",
|
|
15
15
|
BY_ID: (id) => `campaigns/${id}`,
|
|
16
16
|
LEADS: {
|
|
17
17
|
BASE: (campaignId) => `campaigns/${campaignId}/leads`,
|
|
@@ -43,55 +43,56 @@ exports.ROUTES = {
|
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
45
|
JOBS: {
|
|
46
|
-
BASE:
|
|
46
|
+
BASE: "jobs",
|
|
47
47
|
BY_ID: (id) => `jobs/${id}`,
|
|
48
|
-
IMPORT:
|
|
49
|
-
FILTER_OPTIONS:
|
|
50
|
-
TOTAL_JOBS:
|
|
48
|
+
IMPORT: "jobs/import",
|
|
49
|
+
FILTER_OPTIONS: "jobs/filter-options",
|
|
50
|
+
TOTAL_JOBS: "jobs/total-jobs",
|
|
51
51
|
GET_JOB_TITLE: (jobId) => `jobs/get-job-title/${jobId}`,
|
|
52
|
-
SEARCH:
|
|
52
|
+
SEARCH: "jobs/search",
|
|
53
53
|
},
|
|
54
54
|
USERS: {
|
|
55
|
-
BASE:
|
|
55
|
+
BASE: "users",
|
|
56
56
|
BY_ID: (id) => `users/${id}`,
|
|
57
57
|
},
|
|
58
58
|
AI_CONFIG: {
|
|
59
|
-
BASE:
|
|
59
|
+
BASE: "ai-config",
|
|
60
|
+
GENERATE_KNOWLEDGE_BASE: "ai-config/generate-knowledge-base",
|
|
60
61
|
},
|
|
61
62
|
COOKIES: {
|
|
62
|
-
BASE:
|
|
63
|
-
SCRAPE:
|
|
63
|
+
BASE: "cookies",
|
|
64
|
+
SCRAPE: "cookies/scrape-cookies",
|
|
64
65
|
},
|
|
65
66
|
SCRAPING: {
|
|
66
|
-
BASE:
|
|
67
|
-
START_SCRAPING:
|
|
68
|
-
START_WORLDWIDE_SCRAPING:
|
|
69
|
-
START_US_SCRAPING:
|
|
70
|
-
START_UK_SCRAPING:
|
|
71
|
-
UPDATE_ACTIVITY_4H_WORLDWIDE:
|
|
72
|
-
UPDATE_ACTIVITY_4H_UK:
|
|
73
|
-
UPDATE_ACTIVITY_4H_US:
|
|
74
|
-
UPDATE_ACTIVITY_24H_WORLDWIDE:
|
|
75
|
-
UPDATE_ACTIVITY_24H_UK:
|
|
76
|
-
UPDATE_ACTIVITY_24H_US:
|
|
67
|
+
BASE: "scraping",
|
|
68
|
+
START_SCRAPING: "scraping/start",
|
|
69
|
+
START_WORLDWIDE_SCRAPING: "scraping/start-worldwide",
|
|
70
|
+
START_US_SCRAPING: "scraping/start-us",
|
|
71
|
+
START_UK_SCRAPING: "scraping/start-uk",
|
|
72
|
+
UPDATE_ACTIVITY_4H_WORLDWIDE: "scraping/update-activity/4h",
|
|
73
|
+
UPDATE_ACTIVITY_4H_UK: "scraping/update-activity/4h/uk",
|
|
74
|
+
UPDATE_ACTIVITY_4H_US: "scraping/update-activity/4h/us",
|
|
75
|
+
UPDATE_ACTIVITY_24H_WORLDWIDE: "scraping/update-activity/24h",
|
|
76
|
+
UPDATE_ACTIVITY_24H_UK: "scraping/update-activity/24h/uk",
|
|
77
|
+
UPDATE_ACTIVITY_24H_US: "scraping/update-activity/24h/us",
|
|
77
78
|
},
|
|
78
79
|
ADMIN: {
|
|
79
|
-
BASE:
|
|
80
|
+
BASE: "admin",
|
|
80
81
|
BIDDER_ACCOUNTS: {
|
|
81
|
-
BASE:
|
|
82
|
+
BASE: "admin/bidder-accounts",
|
|
82
83
|
BY_ID: (id) => `admin/bidder-accounts/${id}`,
|
|
83
84
|
BY_PROVIDER: (provider) => `admin/bidder-accounts/${provider}`,
|
|
84
85
|
BY_PROVIDER_AND_ID: (provider, id) => `admin/bidder-accounts/${provider}/${id}`,
|
|
85
86
|
},
|
|
86
87
|
SCRAPER_ACCOUNTS: {
|
|
87
|
-
BASE:
|
|
88
|
+
BASE: "admin/scraper-accounts",
|
|
88
89
|
BY_ID: (id) => `admin/scraper-accounts/${id}`,
|
|
89
90
|
BY_PROVIDER: (provider) => `admin/scraper-accounts/${provider}`,
|
|
90
91
|
BY_PROVIDER_AND_ID: (provider, id) => `admin/scraper-accounts/${provider}/${id}`,
|
|
91
92
|
},
|
|
92
93
|
},
|
|
93
94
|
BID: {
|
|
94
|
-
BASE:
|
|
95
|
+
BASE: "bid",
|
|
95
96
|
BID_ON_JOB: (userId, campaignId, leadId) => `bid/${userId}/${campaignId}/${leadId}`,
|
|
96
97
|
},
|
|
97
98
|
};
|
|
@@ -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
|
+
};
|
|
@@ -6,12 +6,13 @@ export declare const bidderAccountSchema: z.ZodObject<{
|
|
|
6
6
|
email: z.ZodString;
|
|
7
7
|
password: z.ZodString;
|
|
8
8
|
cookies: z.ZodNullable<z.ZodArray<z.ZodAny, "many">>;
|
|
9
|
-
proxy: z.ZodString;
|
|
10
9
|
status: z.ZodEnum<["verification_required", "shadow_banned", "healthy", "banned", "suspended"]>;
|
|
11
10
|
verified: z.ZodBoolean;
|
|
12
11
|
isActive: z.ZodBoolean;
|
|
13
12
|
assignedOrganizations: z.ZodArray<z.ZodString, "many">;
|
|
14
13
|
lastUsed: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
multiLoginProfileId: z.ZodNullable<z.ZodString>;
|
|
15
|
+
proxy: z.ZodNullable<z.ZodString>;
|
|
15
16
|
createdAt: z.ZodNumber;
|
|
16
17
|
updatedAt: z.ZodNumber;
|
|
17
18
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -24,10 +25,11 @@ export declare const bidderAccountSchema: z.ZodObject<{
|
|
|
24
25
|
password: string;
|
|
25
26
|
isActive: boolean;
|
|
26
27
|
provider: "user-provided" | "lancer-provided";
|
|
27
|
-
proxy: string;
|
|
28
28
|
verified: boolean;
|
|
29
29
|
assignedOrganizations: string[];
|
|
30
30
|
lastUsed: number | null;
|
|
31
|
+
multiLoginProfileId: string | null;
|
|
32
|
+
proxy: string | null;
|
|
31
33
|
}, {
|
|
32
34
|
id: string;
|
|
33
35
|
email: string;
|
|
@@ -38,10 +40,11 @@ export declare const bidderAccountSchema: z.ZodObject<{
|
|
|
38
40
|
password: string;
|
|
39
41
|
isActive: boolean;
|
|
40
42
|
provider: "user-provided" | "lancer-provided";
|
|
41
|
-
proxy: string;
|
|
42
43
|
verified: boolean;
|
|
43
44
|
assignedOrganizations: string[];
|
|
44
45
|
lastUsed: number | null;
|
|
46
|
+
multiLoginProfileId: string | null;
|
|
47
|
+
proxy: string | null;
|
|
45
48
|
}>;
|
|
46
49
|
export declare const createBidderAccountSchema: z.ZodObject<Pick<{
|
|
47
50
|
id: z.ZodString;
|
|
@@ -49,21 +52,21 @@ export declare const createBidderAccountSchema: z.ZodObject<Pick<{
|
|
|
49
52
|
email: z.ZodString;
|
|
50
53
|
password: z.ZodString;
|
|
51
54
|
cookies: z.ZodNullable<z.ZodArray<z.ZodAny, "many">>;
|
|
52
|
-
proxy: z.ZodString;
|
|
53
55
|
status: z.ZodEnum<["verification_required", "shadow_banned", "healthy", "banned", "suspended"]>;
|
|
54
56
|
verified: z.ZodBoolean;
|
|
55
57
|
isActive: z.ZodBoolean;
|
|
56
58
|
assignedOrganizations: z.ZodArray<z.ZodString, "many">;
|
|
57
59
|
lastUsed: z.ZodNullable<z.ZodNumber>;
|
|
60
|
+
multiLoginProfileId: z.ZodNullable<z.ZodString>;
|
|
61
|
+
proxy: z.ZodNullable<z.ZodString>;
|
|
58
62
|
createdAt: z.ZodNumber;
|
|
59
63
|
updatedAt: z.ZodNumber;
|
|
60
|
-
}, "email" | "status" | "password" | "isActive" | "provider" | "
|
|
64
|
+
}, "email" | "status" | "password" | "isActive" | "provider" | "verified">, "strip", z.ZodTypeAny, {
|
|
61
65
|
email: string;
|
|
62
66
|
status: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned";
|
|
63
67
|
password: string;
|
|
64
68
|
isActive: boolean;
|
|
65
69
|
provider: "user-provided" | "lancer-provided";
|
|
66
|
-
proxy: string;
|
|
67
70
|
verified: boolean;
|
|
68
71
|
}, {
|
|
69
72
|
email: string;
|
|
@@ -71,7 +74,6 @@ export declare const createBidderAccountSchema: z.ZodObject<Pick<{
|
|
|
71
74
|
password: string;
|
|
72
75
|
isActive: boolean;
|
|
73
76
|
provider: "user-provided" | "lancer-provided";
|
|
74
|
-
proxy: string;
|
|
75
77
|
verified: boolean;
|
|
76
78
|
}>;
|
|
77
79
|
export declare const updateBidderAccountSchema: z.ZodObject<{
|
|
@@ -83,10 +85,11 @@ export declare const updateBidderAccountSchema: z.ZodObject<{
|
|
|
83
85
|
password: z.ZodOptional<z.ZodString>;
|
|
84
86
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
85
87
|
provider: z.ZodOptional<z.ZodEnum<["user-provided", "lancer-provided"]>>;
|
|
86
|
-
proxy: z.ZodOptional<z.ZodString>;
|
|
87
88
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
88
89
|
assignedOrganizations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
89
90
|
lastUsed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
91
|
+
multiLoginProfileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
+
proxy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
93
|
}, "strip", z.ZodTypeAny, {
|
|
91
94
|
email?: string | undefined;
|
|
92
95
|
status?: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned" | undefined;
|
|
@@ -96,10 +99,11 @@ export declare const updateBidderAccountSchema: z.ZodObject<{
|
|
|
96
99
|
password?: string | undefined;
|
|
97
100
|
isActive?: boolean | undefined;
|
|
98
101
|
provider?: "user-provided" | "lancer-provided" | undefined;
|
|
99
|
-
proxy?: string | undefined;
|
|
100
102
|
verified?: boolean | undefined;
|
|
101
103
|
assignedOrganizations?: string[] | undefined;
|
|
102
104
|
lastUsed?: number | null | undefined;
|
|
105
|
+
multiLoginProfileId?: string | null | undefined;
|
|
106
|
+
proxy?: string | null | undefined;
|
|
103
107
|
}, {
|
|
104
108
|
email?: string | undefined;
|
|
105
109
|
status?: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned" | undefined;
|
|
@@ -109,8 +113,9 @@ export declare const updateBidderAccountSchema: z.ZodObject<{
|
|
|
109
113
|
password?: string | undefined;
|
|
110
114
|
isActive?: boolean | undefined;
|
|
111
115
|
provider?: "user-provided" | "lancer-provided" | undefined;
|
|
112
|
-
proxy?: string | undefined;
|
|
113
116
|
verified?: boolean | undefined;
|
|
114
117
|
assignedOrganizations?: string[] | undefined;
|
|
115
118
|
lastUsed?: number | null | undefined;
|
|
119
|
+
multiLoginProfileId?: string | null | undefined;
|
|
120
|
+
proxy?: string | null | undefined;
|
|
116
121
|
}>;
|
|
@@ -13,12 +13,13 @@ exports.bidderAccountSchema = zod_1.z.object({
|
|
|
13
13
|
email: zod_1.z.string().email(),
|
|
14
14
|
password: zod_1.z.string(),
|
|
15
15
|
cookies: zod_1.z.array(zod_1.z.any()).nullable(),
|
|
16
|
-
proxy: zod_1.z.string(),
|
|
17
16
|
status: account_status_1.accountStatusSchema,
|
|
18
17
|
verified: zod_1.z.boolean(),
|
|
19
18
|
isActive: zod_1.z.boolean(),
|
|
20
19
|
assignedOrganizations: zod_1.z.array(zod_1.z.string()),
|
|
21
20
|
lastUsed: zod_1.z.number().nullable(),
|
|
21
|
+
multiLoginProfileId: zod_1.z.string().nullable(),
|
|
22
|
+
proxy: zod_1.z.string().nullable(),
|
|
22
23
|
createdAt: zod_1.z.number(),
|
|
23
24
|
updatedAt: zod_1.z.number(),
|
|
24
25
|
});
|
|
@@ -26,7 +27,6 @@ exports.createBidderAccountSchema = exports.bidderAccountSchema.pick({
|
|
|
26
27
|
email: true,
|
|
27
28
|
password: true,
|
|
28
29
|
provider: true,
|
|
29
|
-
proxy: true,
|
|
30
30
|
status: true,
|
|
31
31
|
verified: true,
|
|
32
32
|
isActive: true,
|
|
@@ -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,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const bidSuccessSchema: z.ZodObject<{
|
|
3
|
+
status: z.ZodLiteral<"success">;
|
|
4
|
+
biddingAmount: z.ZodNumber;
|
|
5
|
+
boosted: z.ZodBoolean;
|
|
6
|
+
boostingAmount: z.ZodNumber;
|
|
7
|
+
cookies: z.ZodArray<z.ZodAny, "many">;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
status: "success";
|
|
10
|
+
cookies: any[];
|
|
11
|
+
biddingAmount: number;
|
|
12
|
+
boosted: boolean;
|
|
13
|
+
boostingAmount: number;
|
|
14
|
+
}, {
|
|
15
|
+
status: "success";
|
|
16
|
+
cookies: any[];
|
|
17
|
+
biddingAmount: number;
|
|
18
|
+
boosted: boolean;
|
|
19
|
+
boostingAmount: number;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const bidFailedSchema: z.ZodObject<{
|
|
22
|
+
status: z.ZodLiteral<"failed">;
|
|
23
|
+
errorMessage: z.ZodString;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
status: "failed";
|
|
26
|
+
errorMessage: string;
|
|
27
|
+
}, {
|
|
28
|
+
status: "failed";
|
|
29
|
+
errorMessage: string;
|
|
30
|
+
}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bidFailedSchema = exports.bidSuccessSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.bidSuccessSchema = zod_1.z.object({
|
|
6
|
+
status: zod_1.z.literal('success'),
|
|
7
|
+
biddingAmount: zod_1.z.number(),
|
|
8
|
+
boosted: zod_1.z.boolean(),
|
|
9
|
+
boostingAmount: zod_1.z.number(),
|
|
10
|
+
cookies: zod_1.z.array(zod_1.z.any()),
|
|
11
|
+
});
|
|
12
|
+
exports.bidFailedSchema = zod_1.z.object({
|
|
13
|
+
status: zod_1.z.literal('failed'),
|
|
14
|
+
errorMessage: zod_1.z.string(),
|
|
15
|
+
});
|
|
@@ -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
|
+
});
|