lancer-shared 1.0.81 → 1.0.83

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 (52) 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/account/scraper-account.d.ts +72 -0
  4. package/dist/schemas/account/scraper-account.js +6 -0
  5. package/dist/schemas/ai-config/ai-config.d.ts +39 -0
  6. package/dist/schemas/ai-config/ai-config.js +12 -0
  7. package/dist/schemas/ai-config/index.d.ts +1 -0
  8. package/dist/schemas/ai-config/index.js +17 -0
  9. package/dist/schemas/bidding/proposal-dto.d.ts +26 -0
  10. package/dist/schemas/bidding/proposal-dto.js +18 -0
  11. package/dist/schemas/campaign/campaign.d.ts +10 -9
  12. package/dist/schemas/campaign/campaign.js +8 -7
  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/bidding/proposal-dto.d.ts +3 -0
  39. package/dist/types/bidding/proposal-dto.js +2 -0
  40. package/dist/types/campaign/campaign.d.ts +6 -5
  41. package/dist/types/job/job-pipeline.d.ts +4 -0
  42. package/dist/types/job/job-pipeline.js +2 -0
  43. package/dist/types/job/job-suitability.d.ts +3 -0
  44. package/dist/types/job/job-suitability.js +2 -0
  45. package/dist/types/knowledge-object/index.d.ts +1 -0
  46. package/dist/types/knowledge-object/index.js +17 -0
  47. package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
  48. package/dist/types/knowledge-object/knowledge-object.js +2 -0
  49. package/dist/types/scraper/scrape-response.d.ts +4 -0
  50. package/dist/types/scraper/scrape-response.js +2 -0
  51. package/dist/types/upwork-account/upwork-scraping-account.d.ts +2 -2
  52. 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
+ };
@@ -10,6 +10,22 @@ export declare const scraperAccountSchema: z.ZodObject<{
10
10
  lastUsed: z.ZodNumber;
11
11
  status: z.ZodEnum<["verification_required", "shadow_banned", "healthy", "banned", "suspended"]>;
12
12
  verified: z.ZodBoolean;
13
+ errors: z.ZodArray<z.ZodObject<{
14
+ errorMessage: z.ZodString;
15
+ timestamp: z.ZodNumber;
16
+ screenshotUrl: z.ZodString;
17
+ htmlUrl: z.ZodString;
18
+ }, "strip", z.ZodTypeAny, {
19
+ timestamp: number;
20
+ errorMessage: string;
21
+ screenshotUrl: string;
22
+ htmlUrl: string;
23
+ }, {
24
+ timestamp: number;
25
+ errorMessage: string;
26
+ screenshotUrl: string;
27
+ htmlUrl: string;
28
+ }>, "many">;
13
29
  }, "strip", z.ZodTypeAny, {
14
30
  id: string;
15
31
  email: string;
@@ -21,6 +37,12 @@ export declare const scraperAccountSchema: z.ZodObject<{
21
37
  verified: boolean;
22
38
  lastUsed: number;
23
39
  proxy_credentials: string;
40
+ errors: {
41
+ timestamp: number;
42
+ errorMessage: string;
43
+ screenshotUrl: string;
44
+ htmlUrl: string;
45
+ }[];
24
46
  }, {
25
47
  id: string;
26
48
  email: string;
@@ -32,6 +54,12 @@ export declare const scraperAccountSchema: z.ZodObject<{
32
54
  verified: boolean;
33
55
  lastUsed: number;
34
56
  proxy_credentials: string;
57
+ errors: {
58
+ timestamp: number;
59
+ errorMessage: string;
60
+ screenshotUrl: string;
61
+ htmlUrl: string;
62
+ }[];
35
63
  }>;
36
64
  export declare const createScraperAccountSchema: z.ZodObject<Pick<{
37
65
  id: z.ZodString;
@@ -44,6 +72,22 @@ export declare const createScraperAccountSchema: z.ZodObject<Pick<{
44
72
  lastUsed: z.ZodNumber;
45
73
  status: z.ZodEnum<["verification_required", "shadow_banned", "healthy", "banned", "suspended"]>;
46
74
  verified: z.ZodBoolean;
75
+ errors: z.ZodArray<z.ZodObject<{
76
+ errorMessage: z.ZodString;
77
+ timestamp: z.ZodNumber;
78
+ screenshotUrl: z.ZodString;
79
+ htmlUrl: z.ZodString;
80
+ }, "strip", z.ZodTypeAny, {
81
+ timestamp: number;
82
+ errorMessage: string;
83
+ screenshotUrl: string;
84
+ htmlUrl: string;
85
+ }, {
86
+ timestamp: number;
87
+ errorMessage: string;
88
+ screenshotUrl: string;
89
+ htmlUrl: string;
90
+ }>, "many">;
47
91
  }, "email" | "region" | "password" | "isActive" | "verified" | "proxy_credentials">, "strip", z.ZodTypeAny, {
48
92
  email: string;
49
93
  region: "all" | "USOnly" | "UKOnly" | "Worldwide";
@@ -69,6 +113,22 @@ export declare const updateScraperAccountSchema: z.ZodObject<{
69
113
  verified: z.ZodOptional<z.ZodBoolean>;
70
114
  lastUsed: z.ZodOptional<z.ZodNumber>;
71
115
  proxy_credentials: z.ZodOptional<z.ZodString>;
116
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
117
+ errorMessage: z.ZodString;
118
+ timestamp: z.ZodNumber;
119
+ screenshotUrl: z.ZodString;
120
+ htmlUrl: z.ZodString;
121
+ }, "strip", z.ZodTypeAny, {
122
+ timestamp: number;
123
+ errorMessage: string;
124
+ screenshotUrl: string;
125
+ htmlUrl: string;
126
+ }, {
127
+ timestamp: number;
128
+ errorMessage: string;
129
+ screenshotUrl: string;
130
+ htmlUrl: string;
131
+ }>, "many">>;
72
132
  }, "strip", z.ZodTypeAny, {
73
133
  email?: string | undefined;
74
134
  status?: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned" | undefined;
@@ -79,6 +139,12 @@ export declare const updateScraperAccountSchema: z.ZodObject<{
79
139
  verified?: boolean | undefined;
80
140
  lastUsed?: number | undefined;
81
141
  proxy_credentials?: string | undefined;
142
+ errors?: {
143
+ timestamp: number;
144
+ errorMessage: string;
145
+ screenshotUrl: string;
146
+ htmlUrl: string;
147
+ }[] | undefined;
82
148
  }, {
83
149
  email?: string | undefined;
84
150
  status?: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned" | undefined;
@@ -89,4 +155,10 @@ export declare const updateScraperAccountSchema: z.ZodObject<{
89
155
  verified?: boolean | undefined;
90
156
  lastUsed?: number | undefined;
91
157
  proxy_credentials?: string | undefined;
158
+ errors?: {
159
+ timestamp: number;
160
+ errorMessage: string;
161
+ screenshotUrl: string;
162
+ htmlUrl: string;
163
+ }[] | undefined;
92
164
  }>;
@@ -15,6 +15,12 @@ exports.scraperAccountSchema = zod_1.z.object({
15
15
  lastUsed: zod_1.z.number(),
16
16
  status: account_status_1.accountStatusSchema,
17
17
  verified: zod_1.z.boolean(),
18
+ errors: zod_1.z.array(zod_1.z.object({
19
+ errorMessage: zod_1.z.string(),
20
+ timestamp: zod_1.z.number(),
21
+ screenshotUrl: zod_1.z.string(),
22
+ htmlUrl: zod_1.z.string(),
23
+ })),
18
24
  });
19
25
  exports.createScraperAccountSchema = exports.scraperAccountSchema.pick({
20
26
  email: 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,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
+ ]);
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ export declare const campaignStatusSchema: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>;
2
3
  export declare const campaignSchema: z.ZodObject<{
3
4
  id: z.ZodString;
4
5
  name: z.ZodString;
@@ -254,11 +255,10 @@ export declare const campaignSchema: z.ZodObject<{
254
255
  slack: string | null;
255
256
  };
256
257
  }>;
257
- status: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>;
258
+ status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>>;
258
259
  }, "strip", z.ZodTypeAny, {
259
260
  id: string;
260
261
  name: string;
261
- status: "error" | "active" | "paused" | "draft";
262
262
  createdAt: number;
263
263
  updatedAt: number;
264
264
  leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "negotiations" | "won" | "lost", number>> | null;
@@ -329,10 +329,10 @@ export declare const campaignSchema: z.ZodObject<{
329
329
  slack: string | null;
330
330
  };
331
331
  };
332
+ status?: "error" | "active" | "paused" | "draft" | undefined;
332
333
  }, {
333
334
  id: string;
334
335
  name: string;
335
- status: "error" | "active" | "paused" | "draft";
336
336
  createdAt: number;
337
337
  updatedAt: number;
338
338
  leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "negotiations" | "won" | "lost", number>> | null;
@@ -398,6 +398,7 @@ export declare const campaignSchema: z.ZodObject<{
398
398
  slack: string | null;
399
399
  };
400
400
  };
401
+ status?: "error" | "active" | "paused" | "draft" | undefined;
401
402
  boostingEnabled?: boolean | null | undefined;
402
403
  maximumBoost?: number | null | undefined;
403
404
  minimumBoost?: number | null | undefined;
@@ -659,10 +660,9 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
659
660
  slack: string | null;
660
661
  };
661
662
  }>;
662
- status: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>;
663
+ status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>>;
663
664
  }, "id" | "createdAt" | "updatedAt">, "strip", z.ZodTypeAny, {
664
665
  name: string;
665
- status: "error" | "active" | "paused" | "draft";
666
666
  leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "negotiations" | "won" | "lost", number>> | null;
667
667
  filters: {
668
668
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -731,9 +731,9 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
731
731
  slack: string | null;
732
732
  };
733
733
  };
734
+ status?: "error" | "active" | "paused" | "draft" | undefined;
734
735
  }, {
735
736
  name: string;
736
- status: "error" | "active" | "paused" | "draft";
737
737
  leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "negotiations" | "won" | "lost", number>> | null;
738
738
  filters: {
739
739
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -797,6 +797,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
797
797
  slack: string | null;
798
798
  };
799
799
  };
800
+ status?: "error" | "active" | "paused" | "draft" | undefined;
800
801
  boostingEnabled?: boolean | null | undefined;
801
802
  maximumBoost?: number | null | undefined;
802
803
  minimumBoost?: number | null | undefined;
@@ -1058,11 +1059,10 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
1058
1059
  slack: string | null;
1059
1060
  };
1060
1061
  }>;
1061
- status: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>;
1062
+ status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>>;
1062
1063
  }, "createdAt" | "updatedAt">, "strip", z.ZodTypeAny, {
1063
1064
  id: string;
1064
1065
  name: string;
1065
- status: "error" | "active" | "paused" | "draft";
1066
1066
  leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "negotiations" | "won" | "lost", number>> | null;
1067
1067
  filters: {
1068
1068
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -1131,10 +1131,10 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
1131
1131
  slack: string | null;
1132
1132
  };
1133
1133
  };
1134
+ status?: "error" | "active" | "paused" | "draft" | undefined;
1134
1135
  }, {
1135
1136
  id: string;
1136
1137
  name: string;
1137
- status: "error" | "active" | "paused" | "draft";
1138
1138
  leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "negotiations" | "won" | "lost", number>> | null;
1139
1139
  filters: {
1140
1140
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -1198,6 +1198,7 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
1198
1198
  slack: string | null;
1199
1199
  };
1200
1200
  };
1201
+ status?: "error" | "active" | "paused" | "draft" | undefined;
1201
1202
  boostingEnabled?: boolean | null | undefined;
1202
1203
  maximumBoost?: number | null | undefined;
1203
1204
  minimumBoost?: number | null | undefined;
@@ -1,11 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateCampaignSchema = exports.createCampaignSchema = exports.campaignSchema = void 0;
3
+ exports.updateCampaignSchema = exports.createCampaignSchema = exports.campaignSchema = exports.campaignStatusSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const job_filters_1 = require("../job-filters");
6
6
  const lead_1 = require("../lead");
7
7
  const campaign_expenses_1 = require("./campaign-expenses");
8
8
  const campaign_integrations_1 = require("./campaign-integrations");
9
+ exports.campaignStatusSchema = zod_1.z.union([
10
+ zod_1.z.literal("active"),
11
+ zod_1.z.literal("draft"),
12
+ zod_1.z.literal("paused"),
13
+ zod_1.z.literal("error"),
14
+ ]);
9
15
  exports.campaignSchema = zod_1.z.object({
10
16
  id: zod_1.z.string(),
11
17
  name: zod_1.z.string(),
@@ -24,12 +30,7 @@ exports.campaignSchema = zod_1.z.object({
24
30
  leadCounts: zod_1.z.record(lead_1.leadStatusSchema, zod_1.z.number()).nullable(),
25
31
  expenses: campaign_expenses_1.campaignExpensesSchema,
26
32
  integrations: campaign_integrations_1.campaignIntegrationsSchema,
27
- status: zod_1.z.union([
28
- zod_1.z.literal("active"),
29
- zod_1.z.literal("draft"),
30
- zod_1.z.literal("paused"),
31
- zod_1.z.literal("error"),
32
- ]),
33
+ status: exports.campaignStatusSchema.optional(),
33
34
  });
34
35
  exports.createCampaignSchema = exports.campaignSchema.omit({
35
36
  id: true,
@@ -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
+ });