lancer-shared 1.0.103 → 1.0.105

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.
Files changed (54) hide show
  1. package/dist/constants/upwork-filters.d.ts +5 -0
  2. package/dist/constants/upwork-filters.js +75 -0
  3. package/dist/schemas/ai-config/ai-config.d.ts +39 -0
  4. package/dist/schemas/ai-config/ai-config.js +12 -0
  5. package/dist/schemas/ai-config/index.d.ts +1 -0
  6. package/dist/schemas/ai-config/index.js +17 -0
  7. package/dist/schemas/bid/bid-status.d.ts +30 -0
  8. package/dist/schemas/bid/bid-status.js +15 -0
  9. package/dist/schemas/bid/bid.d.ts +107 -66
  10. package/dist/schemas/bid/bid.js +11 -3
  11. package/dist/schemas/bidding/proposal-dto.d.ts +26 -0
  12. package/dist/schemas/bidding/proposal-dto.js +18 -0
  13. package/dist/schemas/job/job-pipeline.d.ts +74 -0
  14. package/dist/schemas/job/job-pipeline.js +29 -0
  15. package/dist/schemas/job/job-suitability.d.ts +12 -0
  16. package/dist/schemas/job/job-suitability.js +13 -0
  17. package/dist/schemas/job/job.d.ts +16 -16
  18. package/dist/schemas/job/pipeline-job.d.ts +9 -3
  19. package/dist/schemas/job/pipeline-job.js +1 -0
  20. package/dist/schemas/knowledge-object/index.d.ts +1 -0
  21. package/dist/schemas/knowledge-object/index.js +17 -0
  22. package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
  23. package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
  24. package/dist/schemas/scraper/scrape-response.d.ts +345 -0
  25. package/dist/schemas/scraper/scrape-response.js +9 -0
  26. package/dist/schemas/upwork-account/index.d.ts +1 -1
  27. package/dist/schemas/upwork-account/index.js +1 -1
  28. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +14 -14
  29. package/dist/schemas/upwork-account/upwork-business-manager-account.js +2 -2
  30. package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +92 -0
  31. package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
  32. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +23 -23
  33. package/dist/schemas/upwork-account/upwork-scraping-account.js +4 -3
  34. package/dist/types/ai-config/ai-config.d.ts +6 -0
  35. package/dist/types/ai-config/ai-config.js +2 -0
  36. package/dist/types/ai-config/index.d.ts +1 -0
  37. package/dist/types/ai-config/index.js +17 -0
  38. package/dist/types/bid/bid-status.d.ts +5 -0
  39. package/dist/types/bid/bid-status.js +2 -0
  40. package/dist/types/bid/bid.d.ts +5 -1
  41. package/dist/types/bidding/proposal-dto.d.ts +3 -0
  42. package/dist/types/bidding/proposal-dto.js +2 -0
  43. package/dist/types/job/job-pipeline.d.ts +4 -0
  44. package/dist/types/job/job-pipeline.js +2 -0
  45. package/dist/types/job/job-suitability.d.ts +3 -0
  46. package/dist/types/job/job-suitability.js +2 -0
  47. package/dist/types/knowledge-object/index.d.ts +1 -0
  48. package/dist/types/knowledge-object/index.js +17 -0
  49. package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
  50. package/dist/types/knowledge-object/knowledge-object.js +2 -0
  51. package/dist/types/scraper/scrape-response.d.ts +4 -0
  52. package/dist/types/scraper/scrape-response.js +2 -0
  53. package/dist/types/upwork-account/upwork-scraping-account.d.ts +2 -2
  54. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ import { KnowledgeObject } from '../types/knowledge-object';
2
+ export declare const CATEGORIES: string[];
3
+ export declare const EXPERIENCE_LEVELS: string[];
4
+ export declare const CLIENT_HISTORY: string[];
5
+ export declare const emptyKnowledgeObject: KnowledgeObject;
@@ -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,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
+ });
@@ -33,6 +33,84 @@ export declare const bidFormDataSchema: z.ZodObject<{
33
33
  maximumBoost: number | null;
34
34
  minimumBoost: number | null;
35
35
  }>;
36
+ export declare const freelancerBidFormDataSchema: z.ZodObject<{
37
+ coverLetter: z.ZodString;
38
+ questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
39
+ question: z.ZodString;
40
+ answer: z.ZodString;
41
+ }, "strip", z.ZodTypeAny, {
42
+ answer: string;
43
+ question: string;
44
+ }, {
45
+ answer: string;
46
+ question: string;
47
+ }>, "many">>;
48
+ boostingEnabled: z.ZodBoolean;
49
+ minimumBoost: z.ZodNullable<z.ZodNumber>;
50
+ maximumBoost: z.ZodNullable<z.ZodNumber>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ coverLetter: string;
53
+ questionAnswerPairs: {
54
+ answer: string;
55
+ question: string;
56
+ }[] | null;
57
+ boostingEnabled: boolean;
58
+ maximumBoost: number | null;
59
+ minimumBoost: number | null;
60
+ }, {
61
+ coverLetter: string;
62
+ questionAnswerPairs: {
63
+ answer: string;
64
+ question: string;
65
+ }[] | null;
66
+ boostingEnabled: boolean;
67
+ maximumBoost: number | null;
68
+ minimumBoost: number | null;
69
+ }>;
70
+ export declare const agencyBidFormDataSchema: z.ZodObject<z.objectUtil.extendShape<{
71
+ coverLetter: z.ZodString;
72
+ questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
73
+ question: z.ZodString;
74
+ answer: z.ZodString;
75
+ }, "strip", z.ZodTypeAny, {
76
+ answer: string;
77
+ question: string;
78
+ }, {
79
+ answer: string;
80
+ question: string;
81
+ }>, "many">>;
82
+ boostingEnabled: z.ZodBoolean;
83
+ minimumBoost: z.ZodNullable<z.ZodNumber>;
84
+ maximumBoost: z.ZodNullable<z.ZodNumber>;
85
+ }, {
86
+ agencyName: z.ZodString;
87
+ contractorName: z.ZodString;
88
+ specializedProfile: z.ZodNullable<z.ZodString>;
89
+ }>, "strip", z.ZodTypeAny, {
90
+ coverLetter: string;
91
+ questionAnswerPairs: {
92
+ answer: string;
93
+ question: string;
94
+ }[] | null;
95
+ boostingEnabled: boolean;
96
+ maximumBoost: number | null;
97
+ minimumBoost: number | null;
98
+ agencyName: string;
99
+ contractorName: string;
100
+ specializedProfile: string | null;
101
+ }, {
102
+ coverLetter: string;
103
+ questionAnswerPairs: {
104
+ answer: string;
105
+ question: string;
106
+ }[] | null;
107
+ boostingEnabled: boolean;
108
+ maximumBoost: number | null;
109
+ minimumBoost: number | null;
110
+ agencyName: string;
111
+ contractorName: string;
112
+ specializedProfile: string | null;
113
+ }>;
36
114
  export declare const bidSchema: z.ZodObject<{
37
115
  userId: z.ZodString;
38
116
  jobUrl: z.ZodString;
@@ -41,51 +119,7 @@ export declare const bidSchema: z.ZodObject<{
41
119
  campaignId: z.ZodString;
42
120
  username: z.ZodString;
43
121
  password: z.ZodString;
44
- formData: z.ZodObject<{
45
- coverLetter: z.ZodString;
46
- questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
47
- question: z.ZodString;
48
- answer: z.ZodString;
49
- }, "strip", z.ZodTypeAny, {
50
- answer: string;
51
- question: string;
52
- }, {
53
- answer: string;
54
- question: string;
55
- }>, "many">>;
56
- boostingEnabled: z.ZodBoolean;
57
- minimumBoost: z.ZodNullable<z.ZodNumber>;
58
- maximumBoost: z.ZodNullable<z.ZodNumber>;
59
- }, "strip", z.ZodTypeAny, {
60
- coverLetter: string;
61
- questionAnswerPairs: {
62
- answer: string;
63
- question: string;
64
- }[] | null;
65
- boostingEnabled: boolean;
66
- maximumBoost: number | null;
67
- minimumBoost: number | null;
68
- }, {
69
- coverLetter: string;
70
- questionAnswerPairs: {
71
- answer: string;
72
- question: string;
73
- }[] | null;
74
- boostingEnabled: boolean;
75
- maximumBoost: number | null;
76
- minimumBoost: number | null;
77
- }>;
78
122
  }, "strip", z.ZodTypeAny, {
79
- formData: {
80
- coverLetter: string;
81
- questionAnswerPairs: {
82
- answer: string;
83
- question: string;
84
- }[] | null;
85
- boostingEnabled: boolean;
86
- maximumBoost: number | null;
87
- minimumBoost: number | null;
88
- };
89
123
  username: string;
90
124
  jobId: string;
91
125
  cookies: any[];
@@ -94,16 +128,6 @@ export declare const bidSchema: z.ZodObject<{
94
128
  userId: string;
95
129
  campaignId: string;
96
130
  }, {
97
- formData: {
98
- coverLetter: string;
99
- questionAnswerPairs: {
100
- answer: string;
101
- question: string;
102
- }[] | null;
103
- boostingEnabled: boolean;
104
- maximumBoost: number | null;
105
- minimumBoost: number | null;
106
- };
107
131
  username: string;
108
132
  jobId: string;
109
133
  cookies: any[];
@@ -120,7 +144,11 @@ export declare const agencyBidSchema: z.ZodObject<z.objectUtil.extendShape<{
120
144
  campaignId: z.ZodString;
121
145
  username: z.ZodString;
122
146
  password: z.ZodString;
123
- formData: z.ZodObject<{
147
+ }, {
148
+ agencyName: z.ZodString;
149
+ contractorName: z.ZodString;
150
+ specializedProfile: z.ZodNullable<z.ZodString>;
151
+ formData: z.ZodObject<z.objectUtil.extendShape<{
124
152
  coverLetter: z.ZodString;
125
153
  questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
126
154
  question: z.ZodString;
@@ -135,7 +163,11 @@ export declare const agencyBidSchema: z.ZodObject<z.objectUtil.extendShape<{
135
163
  boostingEnabled: z.ZodBoolean;
136
164
  minimumBoost: z.ZodNullable<z.ZodNumber>;
137
165
  maximumBoost: z.ZodNullable<z.ZodNumber>;
138
- }, "strip", z.ZodTypeAny, {
166
+ }, {
167
+ agencyName: z.ZodString;
168
+ contractorName: z.ZodString;
169
+ specializedProfile: z.ZodNullable<z.ZodString>;
170
+ }>, "strip", z.ZodTypeAny, {
139
171
  coverLetter: string;
140
172
  questionAnswerPairs: {
141
173
  answer: string;
@@ -144,6 +176,9 @@ export declare const agencyBidSchema: z.ZodObject<z.objectUtil.extendShape<{
144
176
  boostingEnabled: boolean;
145
177
  maximumBoost: number | null;
146
178
  minimumBoost: number | null;
179
+ agencyName: string;
180
+ contractorName: string;
181
+ specializedProfile: string | null;
147
182
  }, {
148
183
  coverLetter: string;
149
184
  questionAnswerPairs: {
@@ -153,11 +188,10 @@ export declare const agencyBidSchema: z.ZodObject<z.objectUtil.extendShape<{
153
188
  boostingEnabled: boolean;
154
189
  maximumBoost: number | null;
155
190
  minimumBoost: number | null;
191
+ agencyName: string;
192
+ contractorName: string;
193
+ specializedProfile: string | null;
156
194
  }>;
157
- }, {
158
- agencyName: z.ZodString;
159
- contractorName: z.ZodString;
160
- specializedProfile: z.ZodNullable<z.ZodString>;
161
195
  }>, "strip", z.ZodTypeAny, {
162
196
  formData: {
163
197
  coverLetter: string;
@@ -168,17 +202,20 @@ export declare const agencyBidSchema: z.ZodObject<z.objectUtil.extendShape<{
168
202
  boostingEnabled: boolean;
169
203
  maximumBoost: number | null;
170
204
  minimumBoost: number | null;
205
+ agencyName: string;
206
+ contractorName: string;
207
+ specializedProfile: string | null;
171
208
  };
172
209
  username: string;
173
210
  jobId: string;
174
211
  cookies: any[];
175
212
  password: string;
176
213
  jobUrl: string;
177
- userId: string;
178
- campaignId: string;
179
214
  agencyName: string;
180
215
  contractorName: string;
181
216
  specializedProfile: string | null;
217
+ userId: string;
218
+ campaignId: string;
182
219
  }, {
183
220
  formData: {
184
221
  coverLetter: string;
@@ -189,19 +226,22 @@ export declare const agencyBidSchema: z.ZodObject<z.objectUtil.extendShape<{
189
226
  boostingEnabled: boolean;
190
227
  maximumBoost: number | null;
191
228
  minimumBoost: number | null;
229
+ agencyName: string;
230
+ contractorName: string;
231
+ specializedProfile: string | null;
192
232
  };
193
233
  username: string;
194
234
  jobId: string;
195
235
  cookies: any[];
196
236
  password: string;
197
237
  jobUrl: string;
198
- userId: string;
199
- campaignId: string;
200
238
  agencyName: string;
201
239
  contractorName: string;
202
240
  specializedProfile: string | null;
241
+ userId: string;
242
+ campaignId: string;
203
243
  }>;
204
- export declare const freelancerBidSchema: z.ZodObject<{
244
+ export declare const freelancerBidSchema: z.ZodObject<z.objectUtil.extendShape<{
205
245
  userId: z.ZodString;
206
246
  jobUrl: z.ZodString;
207
247
  cookies: z.ZodArray<z.ZodAny, "many">;
@@ -209,6 +249,7 @@ export declare const freelancerBidSchema: z.ZodObject<{
209
249
  campaignId: z.ZodString;
210
250
  username: z.ZodString;
211
251
  password: z.ZodString;
252
+ }, {
212
253
  formData: z.ZodObject<{
213
254
  coverLetter: z.ZodString;
214
255
  questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -243,7 +284,7 @@ export declare const freelancerBidSchema: z.ZodObject<{
243
284
  maximumBoost: number | null;
244
285
  minimumBoost: number | null;
245
286
  }>;
246
- }, "strip", z.ZodTypeAny, {
287
+ }>, "strip", z.ZodTypeAny, {
247
288
  formData: {
248
289
  coverLetter: string;
249
290
  questionAnswerPairs: {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.freelancerBidSchema = exports.agencyBidSchema = exports.bidSchema = exports.bidFormDataSchema = void 0;
3
+ exports.freelancerBidSchema = exports.agencyBidSchema = exports.bidSchema = exports.agencyBidFormDataSchema = exports.freelancerBidFormDataSchema = exports.bidFormDataSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const ai_1 = require("../ai");
6
6
  exports.bidFormDataSchema = zod_1.z.object({
@@ -10,6 +10,12 @@ exports.bidFormDataSchema = zod_1.z.object({
10
10
  minimumBoost: zod_1.z.number().nullable(),
11
11
  maximumBoost: zod_1.z.number().nullable(),
12
12
  });
13
+ exports.freelancerBidFormDataSchema = exports.bidFormDataSchema;
14
+ exports.agencyBidFormDataSchema = exports.bidFormDataSchema.extend({
15
+ agencyName: zod_1.z.string(),
16
+ contractorName: zod_1.z.string(),
17
+ specializedProfile: zod_1.z.string().nullable(),
18
+ });
13
19
  exports.bidSchema = zod_1.z.object({
14
20
  userId: zod_1.z.string(),
15
21
  jobUrl: zod_1.z.string(),
@@ -18,11 +24,13 @@ exports.bidSchema = zod_1.z.object({
18
24
  campaignId: zod_1.z.string(),
19
25
  username: zod_1.z.string(),
20
26
  password: zod_1.z.string(),
21
- formData: exports.bidFormDataSchema,
22
27
  });
23
28
  exports.agencyBidSchema = exports.bidSchema.extend({
24
29
  agencyName: zod_1.z.string(),
25
30
  contractorName: zod_1.z.string(),
26
31
  specializedProfile: zod_1.z.string().nullable(),
32
+ formData: exports.agencyBidFormDataSchema,
33
+ });
34
+ exports.freelancerBidSchema = exports.bidSchema.extend({
35
+ formData: exports.freelancerBidFormDataSchema,
27
36
  });
28
- exports.freelancerBidSchema = exports.bidSchema;
@@ -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
+ });