lancer-shared 1.2.99 → 1.2.101

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 (64) hide show
  1. package/dist/bundle.cjs.js +69 -68
  2. package/dist/constants/organization.d.ts +2 -2
  3. package/dist/constants/proxies.d.ts +4 -0
  4. package/dist/constants/routes.js +6 -0
  5. package/dist/constants/upwork-filters.d.ts +5 -0
  6. package/dist/constants/upwork-filters.js +75 -0
  7. package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +5 -0
  8. package/dist/schemas/ai-config/ai-config.d.ts +39 -0
  9. package/dist/schemas/ai-config/ai-config.js +12 -0
  10. package/dist/schemas/ai-config/index.d.ts +1 -0
  11. package/dist/schemas/ai-config/index.js +17 -0
  12. package/dist/schemas/bid/bid-status.d.ts +30 -0
  13. package/dist/schemas/bid/bid-status.js +15 -0
  14. package/dist/schemas/bid/exceptions/base-exception.d.ts +4 -0
  15. package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +5 -0
  16. package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +5 -0
  17. package/dist/schemas/bidding/proposal-dto.d.ts +26 -0
  18. package/dist/schemas/bidding/proposal-dto.js +18 -0
  19. package/dist/schemas/campaign/campaign-analytics.d.ts +27 -18
  20. package/dist/schemas/campaign/campaign-integrations.d.ts +0 -5
  21. package/dist/schemas/campaign/campaign.d.ts +99 -2
  22. package/dist/schemas/job/job-pipeline.d.ts +74 -0
  23. package/dist/schemas/job/job-pipeline.js +29 -0
  24. package/dist/schemas/job/job-suitability.d.ts +12 -0
  25. package/dist/schemas/job/job-suitability.js +13 -0
  26. package/dist/schemas/job/job.d.ts +16 -16
  27. package/dist/schemas/job/pipeline-job.d.ts +9 -3
  28. package/dist/schemas/job/pipeline-job.js +1 -0
  29. package/dist/schemas/knowledge-object/index.d.ts +1 -0
  30. package/dist/schemas/knowledge-object/index.js +17 -0
  31. package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
  32. package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
  33. package/dist/schemas/proxy/proxy.js +3 -1
  34. package/dist/schemas/scraper/scrape-payload.d.ts +85 -26
  35. package/dist/schemas/scraper/scrape-response.d.ts +345 -0
  36. package/dist/schemas/scraper/scrape-response.js +9 -0
  37. package/dist/schemas/upwork-account/index.d.ts +1 -1
  38. package/dist/schemas/upwork-account/index.js +1 -1
  39. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +14 -14
  40. package/dist/schemas/upwork-account/upwork-business-manager-account.js +2 -2
  41. package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +92 -0
  42. package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
  43. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +23 -23
  44. package/dist/schemas/upwork-account/upwork-scraping-account.js +4 -3
  45. package/dist/types/ai-config/ai-config.d.ts +6 -0
  46. package/dist/types/ai-config/ai-config.js +2 -0
  47. package/dist/types/ai-config/index.d.ts +1 -0
  48. package/dist/types/ai-config/index.js +17 -0
  49. package/dist/types/bid/bid-status.d.ts +5 -0
  50. package/dist/types/bid/bid-status.js +2 -0
  51. package/dist/types/bidding/proposal-dto.d.ts +3 -0
  52. package/dist/types/bidding/proposal-dto.js +2 -0
  53. package/dist/types/job/job-pipeline.d.ts +4 -0
  54. package/dist/types/job/job-pipeline.js +2 -0
  55. package/dist/types/job/job-suitability.d.ts +3 -0
  56. package/dist/types/job/job-suitability.js +2 -0
  57. package/dist/types/knowledge-object/index.d.ts +1 -0
  58. package/dist/types/knowledge-object/index.js +17 -0
  59. package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
  60. package/dist/types/knowledge-object/knowledge-object.js +2 -0
  61. package/dist/types/scraper/scrape-response.d.ts +4 -0
  62. package/dist/types/scraper/scrape-response.js +2 -0
  63. package/dist/types/upwork-account/upwork-scraping-account.d.ts +2 -2
  64. package/package.json +1 -1
@@ -12431,74 +12431,6 @@ class WaitForFunctionTimeoutError extends Error {
12431
12431
  }
12432
12432
  const waitForFunctionTimeoutError = (fn, timeout) => new WaitForFunctionTimeoutError(fn, timeout);
12433
12433
 
12434
- const campaignExpensesSchema = z.object({
12435
- biddingAmount: z.number().default(0),
12436
- boostingAmount: z.number().default(0),
12437
- boosted: z.number().default(0),
12438
- });
12439
-
12440
- const bidConfigSchema = z.object({
12441
- agencyName: z.string().nullable(),
12442
- bidderId: z.string().nullable(),
12443
- contractorName: z.string().nullable(),
12444
- specialisedProfile: z.string().nullable(),
12445
- });
12446
- const campaignStatusSchema = z.union([
12447
- z.literal("active"),
12448
- z.literal("draft"),
12449
- z.literal("paused"),
12450
- z.literal("error"),
12451
- ]);
12452
- const campaignSchema = z.object({
12453
- id: z.string(),
12454
- name: z.string(),
12455
- filters: jobFiltersSchema,
12456
- createdAt: numberType(),
12457
- updatedAt: numberType(),
12458
- confirmedBillingAt: numberType().nullable(),
12459
- // automatedSuitability: z.boolean().nullable(),
12460
- boostingEnabled: z.boolean().nullable().default(false),
12461
- maximumBoost: z.number().nullable().default(30),
12462
- // minimumBoost: z.number().nullable().default(0),
12463
- monthlyBudget: z.number().nullable(),
12464
- // suitabilityThreshold: z.number().min(0).max(100).nullable().default(0),
12465
- boostingThreshold: z.number().min(0).max(100).nullable().default(0),
12466
- leadCounts: z.record(leadStatusSchema, z.number()).nullable(),
12467
- expenses: campaignExpensesSchema,
12468
- notificationsEnabled: z.boolean().nullable(),
12469
- status: campaignStatusSchema.optional(),
12470
- bidConfig: bidConfigSchema.nullable(),
12471
- coverLetterTemplateId: z.string().nullable(),
12472
- priority: z.number().nullable(),
12473
- });
12474
- const upworkAccountConnectStatusSchema = z.union([
12475
- z.literal("processing"),
12476
- z.literal("connected"),
12477
- z.literal("failed"),
12478
- ]);
12479
- const upworkAccountConnectSchema = z.object({
12480
- status: upworkAccountConnectStatusSchema.nullable(),
12481
- error: z.string().nullable(),
12482
- });
12483
- const createCampaignSchema = campaignSchema.omit({
12484
- id: true,
12485
- createdAt: true,
12486
- updatedAt: true,
12487
- bidConfig: true,
12488
- });
12489
- const updateCampaignSchema = campaignSchema
12490
- .omit({
12491
- createdAt: true,
12492
- updatedAt: true,
12493
- })
12494
- .partial();
12495
-
12496
- const campaignAIMetricsSchema = z.object({
12497
- leadsAnalyzed: z.number(),
12498
- leadsBidded: z.number(),
12499
- connectsSaved: z.number(),
12500
- });
12501
-
12502
12434
  const proposalSchema = z.object({
12503
12435
  coverLetter: z.string(),
12504
12436
  questionAnswerPairs: questionAnswerPairSchema.array(),
@@ -12865,6 +12797,75 @@ const subscribePayloadSchema = objectType({
12865
12797
  couponCode: stringType().nullish(),
12866
12798
  });
12867
12799
 
12800
+ const campaignExpensesSchema = z.object({
12801
+ biddingAmount: z.number().default(0),
12802
+ boostingAmount: z.number().default(0),
12803
+ boosted: z.number().default(0),
12804
+ });
12805
+
12806
+ const bidConfigSchema = z.object({
12807
+ agencyName: z.string().nullable(),
12808
+ bidderId: z.string().nullable(),
12809
+ contractorName: z.string().nullable(),
12810
+ specialisedProfile: z.string().nullable(),
12811
+ });
12812
+ const campaignStatusSchema = z.union([
12813
+ z.literal("active"),
12814
+ z.literal("draft"),
12815
+ z.literal("paused"),
12816
+ z.literal("error"),
12817
+ ]);
12818
+ const campaignSchema = z.object({
12819
+ id: z.string(),
12820
+ name: z.string(),
12821
+ filters: jobFiltersSchema,
12822
+ createdAt: numberType(),
12823
+ updatedAt: numberType(),
12824
+ confirmedBillingAt: numberType().nullable(),
12825
+ // automatedSuitability: z.boolean().nullable(),
12826
+ boostingEnabled: z.boolean().nullable().default(false),
12827
+ maximumBoost: z.number().nullable().default(30),
12828
+ // minimumBoost: z.number().nullable().default(0),
12829
+ monthlyBudget: z.number().nullable(),
12830
+ // suitabilityThreshold: z.number().min(0).max(100).nullable().default(0),
12831
+ boostingThreshold: z.number().min(0).max(100).nullable().default(0),
12832
+ leadCounts: z.record(leadStatusSchema, z.number()).nullable(),
12833
+ expenses: campaignExpensesSchema,
12834
+ notificationsEnabled: z.boolean().nullable(),
12835
+ status: campaignStatusSchema.optional(),
12836
+ bidConfig: bidConfigSchema.nullable(),
12837
+ coverLetterTemplateId: z.string().nullable(),
12838
+ priority: z.number().nullable(),
12839
+ coverLetterTemplate: coverLetterTemplateSchema.nullable(),
12840
+ });
12841
+ const upworkAccountConnectStatusSchema = z.union([
12842
+ z.literal("processing"),
12843
+ z.literal("connected"),
12844
+ z.literal("failed"),
12845
+ ]);
12846
+ const upworkAccountConnectSchema = z.object({
12847
+ status: upworkAccountConnectStatusSchema.nullable(),
12848
+ error: z.string().nullable(),
12849
+ });
12850
+ const createCampaignSchema = campaignSchema.omit({
12851
+ id: true,
12852
+ createdAt: true,
12853
+ updatedAt: true,
12854
+ bidConfig: true,
12855
+ });
12856
+ const updateCampaignSchema = campaignSchema
12857
+ .omit({
12858
+ createdAt: true,
12859
+ updatedAt: true,
12860
+ })
12861
+ .partial();
12862
+
12863
+ const campaignAIMetricsSchema = z.object({
12864
+ leadsAnalyzed: z.number(),
12865
+ leadsBidded: z.number(),
12866
+ connectsSaved: z.number(),
12867
+ });
12868
+
12868
12869
  const campaignAnalyticsSchema = z.object({
12869
12870
  contacted: z.number().optional(),
12870
12871
  viewed: z.number().optional(),
@@ -1,2 +1,2 @@
1
- import { TrackUsageEventType } from "../schemas";
2
- export declare const creditDeductionAmountMap: Record<TrackUsageEventType, number>;
1
+ import { CreditDeductionEventType } from "../schemas";
2
+ export declare const creditDeductionAmountMap: Record<CreditDeductionEventType, number>;
@@ -0,0 +1,4 @@
1
+ import { ProxyCountry } from '../schemas';
2
+ export declare const countryToWebshareCountryCode: (country: ProxyCountry) => string;
3
+ export declare const webshareCountryCodeToCountry: (countryCode: string) => ProxyCountry;
4
+ export declare const IPQualityScoreCountryCodeToCountry: (countryCode: string) => ProxyCountry;
@@ -91,6 +91,12 @@ exports.ROUTES = {
91
91
  BY_PROVIDER: (provider) => `admin/scraper-accounts/${provider}`,
92
92
  BY_PROVIDER_AND_ID: (provider, id) => `admin/scraper-accounts/${provider}/${id}`,
93
93
  },
94
+ PROXIES: {
95
+ BASE: 'admin/proxies',
96
+ BY_ID: (id) => `admin/proxies/${id}`,
97
+ REPLACE_PROXY: (id) => `admin/proxies/${id}/replace`,
98
+ SYNC: 'admin/proxies/sync',
99
+ },
94
100
  },
95
101
  BID: {
96
102
  BASE: 'bid',
@@ -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,5 @@
1
+ export declare class NoBidderAccountsAvailableException extends Error {
2
+ readonly code = "NO_BIDDER_ACCOUNTS_AVAILABLE";
3
+ constructor(message: string);
4
+ }
5
+ export declare const noBidderAccountsAvailableException: (message: string) => NoBidderAccountsAvailableException;
@@ -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,4 @@
1
+ export declare abstract class BaseException extends Error {
2
+ abstract readonly code: string;
3
+ constructor(message: string);
4
+ }
@@ -0,0 +1,5 @@
1
+ export declare class EvaluateElementException extends Error {
2
+ readonly code = "EVALUATE_ELEMENT_EXCEPTION";
3
+ constructor(element: any, message: string);
4
+ }
5
+ export declare function evaluateElementException(element: any, message: string): EvaluateElementException;
@@ -0,0 +1,5 @@
1
+ export declare class WaitForFunctionTimeoutError extends Error {
2
+ readonly code = "WAIT_FOR_FUNCTION_TIMEOUT_ERROR";
3
+ constructor(fn: Function, timeout: number);
4
+ }
5
+ export declare const waitForFunctionTimeoutError: (fn: Function, timeout: number) => WaitForFunctionTimeoutError;
@@ -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
+ ]);
@@ -1419,8 +1419,9 @@ export declare const leadAnalysisActivitySchema: z.ZodObject<z.objectUtil.extend
1419
1419
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
1420
1420
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
1421
1421
  wonAmount: z.ZodOptional<z.ZodNumber>;
1422
- biddingTaskId: z.ZodNullable<z.ZodString>;
1423
- doNotApplyReason: z.ZodNullable<z.ZodString>;
1422
+ feedbackCheckTaskId: z.ZodNullable<z.ZodString>;
1423
+ bidDecision: z.ZodNullable<z.ZodEnum<["proceeded", "rejected"]>>;
1424
+ rejectedFeedback: z.ZodNullable<z.ZodString>;
1424
1425
  }>, "processed">, "id" | "title" | "datetime" | "jobUrl">, "strip", z.ZodTypeAny, {
1425
1426
  id: string | null;
1426
1427
  title: string | null;
@@ -2255,8 +2256,9 @@ export declare const leadStatusActivitySchema: z.ZodObject<z.objectUtil.extendSh
2255
2256
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
2256
2257
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
2257
2258
  wonAmount: z.ZodOptional<z.ZodNumber>;
2258
- biddingTaskId: z.ZodNullable<z.ZodString>;
2259
- doNotApplyReason: z.ZodNullable<z.ZodString>;
2259
+ feedbackCheckTaskId: z.ZodNullable<z.ZodString>;
2260
+ bidDecision: z.ZodNullable<z.ZodEnum<["proceeded", "rejected"]>>;
2261
+ rejectedFeedback: z.ZodNullable<z.ZodString>;
2260
2262
  }>, "processed">, "id" | "title" | "datetime" | "jobUrl">, "strip", z.ZodTypeAny, {
2261
2263
  id: string | null;
2262
2264
  title: string | null;
@@ -3089,8 +3091,9 @@ export declare const proposalSentActivitySchema: z.ZodObject<z.objectUtil.extend
3089
3091
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
3090
3092
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
3091
3093
  wonAmount: z.ZodOptional<z.ZodNumber>;
3092
- biddingTaskId: z.ZodNullable<z.ZodString>;
3093
- doNotApplyReason: z.ZodNullable<z.ZodString>;
3094
+ feedbackCheckTaskId: z.ZodNullable<z.ZodString>;
3095
+ bidDecision: z.ZodNullable<z.ZodEnum<["proceeded", "rejected"]>>;
3096
+ rejectedFeedback: z.ZodNullable<z.ZodString>;
3094
3097
  }>, "processed">, "id" | "title" | "datetime" | "jobUrl">, "strip", z.ZodTypeAny, {
3095
3098
  id: string | null;
3096
3099
  title: string | null;
@@ -4405,8 +4408,9 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
4405
4408
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
4406
4409
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
4407
4410
  wonAmount: z.ZodOptional<z.ZodNumber>;
4408
- biddingTaskId: z.ZodNullable<z.ZodString>;
4409
- doNotApplyReason: z.ZodNullable<z.ZodString>;
4411
+ feedbackCheckTaskId: z.ZodNullable<z.ZodString>;
4412
+ bidDecision: z.ZodNullable<z.ZodEnum<["proceeded", "rejected"]>>;
4413
+ rejectedFeedback: z.ZodNullable<z.ZodString>;
4410
4414
  }>, "processed">, "id" | "title" | "datetime" | "jobUrl">, "strip", z.ZodTypeAny, {
4411
4415
  id: string | null;
4412
4416
  title: string | null;
@@ -5240,8 +5244,9 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
5240
5244
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
5241
5245
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
5242
5246
  wonAmount: z.ZodOptional<z.ZodNumber>;
5243
- biddingTaskId: z.ZodNullable<z.ZodString>;
5244
- doNotApplyReason: z.ZodNullable<z.ZodString>;
5247
+ feedbackCheckTaskId: z.ZodNullable<z.ZodString>;
5248
+ bidDecision: z.ZodNullable<z.ZodEnum<["proceeded", "rejected"]>>;
5249
+ rejectedFeedback: z.ZodNullable<z.ZodString>;
5245
5250
  }>, "processed">, "id" | "title" | "datetime" | "jobUrl">, "strip", z.ZodTypeAny, {
5246
5251
  id: string | null;
5247
5252
  title: string | null;
@@ -6073,8 +6078,9 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
6073
6078
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
6074
6079
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
6075
6080
  wonAmount: z.ZodOptional<z.ZodNumber>;
6076
- biddingTaskId: z.ZodNullable<z.ZodString>;
6077
- doNotApplyReason: z.ZodNullable<z.ZodString>;
6081
+ feedbackCheckTaskId: z.ZodNullable<z.ZodString>;
6082
+ bidDecision: z.ZodNullable<z.ZodEnum<["proceeded", "rejected"]>>;
6083
+ rejectedFeedback: z.ZodNullable<z.ZodString>;
6078
6084
  }>, "processed">, "id" | "title" | "datetime" | "jobUrl">, "strip", z.ZodTypeAny, {
6079
6085
  id: string | null;
6080
6086
  title: string | null;
@@ -6463,8 +6469,9 @@ export declare const campaignActivityCreateSchema: z.ZodDiscriminatedUnion<"type
6463
6469
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
6464
6470
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
6465
6471
  wonAmount: z.ZodOptional<z.ZodNumber>;
6466
- biddingTaskId: z.ZodNullable<z.ZodString>;
6467
- doNotApplyReason: z.ZodNullable<z.ZodString>;
6472
+ feedbackCheckTaskId: z.ZodNullable<z.ZodString>;
6473
+ bidDecision: z.ZodNullable<z.ZodEnum<["proceeded", "rejected"]>>;
6474
+ rejectedFeedback: z.ZodNullable<z.ZodString>;
6468
6475
  }>, "processed">, "id" | "title" | "datetime" | "jobUrl">, "strip", z.ZodTypeAny, {
6469
6476
  id: string | null;
6470
6477
  title: string | null;
@@ -6826,8 +6833,9 @@ export declare const campaignActivityCreateSchema: z.ZodDiscriminatedUnion<"type
6826
6833
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
6827
6834
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
6828
6835
  wonAmount: z.ZodOptional<z.ZodNumber>;
6829
- biddingTaskId: z.ZodNullable<z.ZodString>;
6830
- doNotApplyReason: z.ZodNullable<z.ZodString>;
6836
+ feedbackCheckTaskId: z.ZodNullable<z.ZodString>;
6837
+ bidDecision: z.ZodNullable<z.ZodEnum<["proceeded", "rejected"]>>;
6838
+ rejectedFeedback: z.ZodNullable<z.ZodString>;
6831
6839
  }>, "processed">, "id" | "title" | "datetime" | "jobUrl">, "strip", z.ZodTypeAny, {
6832
6840
  id: string | null;
6833
6841
  title: string | null;
@@ -7187,8 +7195,9 @@ export declare const campaignActivityCreateSchema: z.ZodDiscriminatedUnion<"type
7187
7195
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
7188
7196
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
7189
7197
  wonAmount: z.ZodOptional<z.ZodNumber>;
7190
- biddingTaskId: z.ZodNullable<z.ZodString>;
7191
- doNotApplyReason: z.ZodNullable<z.ZodString>;
7198
+ feedbackCheckTaskId: z.ZodNullable<z.ZodString>;
7199
+ bidDecision: z.ZodNullable<z.ZodEnum<["proceeded", "rejected"]>>;
7200
+ rejectedFeedback: z.ZodNullable<z.ZodString>;
7192
7201
  }>, "processed">, "id" | "title" | "datetime" | "jobUrl">, "strip", z.ZodTypeAny, {
7193
7202
  id: string | null;
7194
7203
  title: string | null;
@@ -80,8 +80,3 @@ export declare const updateCampaignIntegrationsSchema: z.ZodObject<{
80
80
  slack: string | null;
81
81
  } | undefined;
82
82
  }>;
83
- export type CampaignIntegration = z.infer<typeof campaignIntegrations>;
84
- export interface CampaignIntegrations extends z.infer<typeof campaignIntegrationsSchema> {
85
- }
86
- export interface UpdateCampaignIntegrations extends z.infer<typeof updateCampaignIntegrationsSchema> {
87
- }