lancer-shared 1.2.87 → 1.2.89
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/bundle.cjs.js +261 -181
- package/dist/constants/account-status.d.ts +3 -0
- package/dist/constants/account-status.js +17 -0
- package/dist/constants/collections.d.ts +13 -0
- package/dist/constants/collections.js +16 -0
- package/dist/constants/common-questions.js +60 -0
- package/dist/constants/index.js +40 -0
- package/dist/constants/job-filter-options.js +268 -0
- package/dist/constants/job-status.js +26 -0
- package/dist/constants/mappings/countryMapping.js +122 -0
- package/dist/constants/mappings/regionMapping.js +242 -0
- package/dist/constants/organization.d.ts +2 -0
- package/dist/constants/routes.d.ts +12 -1
- package/dist/constants/routes.js +108 -0
- package/dist/constants/upwork-accounts.js +21 -0
- package/dist/index.js +20 -0
- package/dist/schemas/account/account-status.js +11 -0
- package/dist/schemas/account/bidder-account.js +37 -0
- package/dist/schemas/account/index.js +19 -0
- package/dist/schemas/account/manager-account.d.ts +116 -0
- package/dist/schemas/account/manager-account.js +38 -0
- package/dist/schemas/account/scraper-account.js +37 -0
- package/dist/schemas/agent/index.d.ts +41 -0
- package/dist/schemas/ai/ai-config.d.ts +36 -0
- package/dist/schemas/ai/ai-config.js +12 -0
- package/dist/schemas/ai/index.d.ts +3 -0
- package/dist/schemas/ai/index.js +19 -0
- package/dist/schemas/ai/proposal.d.ts +82 -0
- package/dist/schemas/ai/proposal.js +16 -0
- package/dist/schemas/ai/suitability.d.ts +37 -0
- package/dist/schemas/ai/suitability.js +17 -0
- package/dist/schemas/bid/bid-result.js +15 -0
- package/dist/schemas/bid/bid.js +36 -0
- package/dist/schemas/bid/index.js +18 -0
- package/dist/schemas/bidding/index.d.ts +1 -0
- package/dist/schemas/bidding/index.js +17 -0
- package/dist/schemas/bidding/proposal-bidding-status.d.ts +26 -0
- package/dist/schemas/bidding/proposal-bidding-status.js +18 -0
- package/dist/schemas/campaign/campaign-ai-metrics.js +9 -0
- package/dist/schemas/campaign/campaign-analytics.d.ts +98 -237
- package/dist/schemas/campaign/campaign-analytics.js +41 -0
- package/dist/schemas/campaign/campaign-expenses.js +9 -0
- package/dist/schemas/campaign/campaign-insights.js +31 -0
- package/dist/schemas/campaign/campaign-integrations.d.ts +87 -0
- package/dist/schemas/campaign/campaign-integrations.js +16 -0
- package/dist/schemas/campaign/campaign-job-count.d.ts +2 -0
- package/dist/schemas/campaign/campaign-job-count.js +6 -0
- package/dist/schemas/campaign/campaign-webhooks.d.ts +0 -58
- package/dist/schemas/campaign/campaign.d.ts +13 -133
- package/dist/schemas/campaign/campaign.js +44 -0
- package/dist/schemas/campaign/index.d.ts +1 -1
- package/dist/schemas/campaign/index.js +23 -0
- package/dist/schemas/chat-message/chat-message.d.ts +31 -0
- package/dist/schemas/chat-message/chat-message.js +13 -0
- package/dist/schemas/chat-message/index.d.ts +1 -0
- package/dist/schemas/chat-message/index.js +17 -0
- package/dist/schemas/config/agency-config.d.ts +17 -0
- package/dist/schemas/config/agency-config.js +10 -0
- package/dist/schemas/config/index.d.ts +1 -0
- package/dist/schemas/config/index.js +17 -0
- package/dist/schemas/index.js +32 -0
- package/dist/schemas/job/index.js +19 -0
- package/dist/schemas/job/job-details.d.ts +335 -0
- package/dist/schemas/job/job-details.js +29 -0
- package/dist/schemas/job/job-note.d.ts +83 -0
- package/dist/schemas/job/job-note.js +30 -0
- package/dist/schemas/job/job-status.d.ts +3 -0
- package/dist/schemas/job/job-status.js +27 -0
- package/dist/schemas/job/job.d.ts +1160 -0
- package/dist/schemas/job/job.js +90 -0
- package/dist/schemas/job/pipeline-job.d.ts +602 -0
- package/dist/schemas/job/pipeline-job.js +42 -0
- package/dist/schemas/job/upwork-job.d.ts +334 -0
- package/dist/schemas/job/upwork-job.js +60 -0
- package/dist/schemas/job-filters/index.d.ts +1 -0
- package/dist/schemas/job-filters/index.js +17 -0
- package/dist/schemas/job-filters/job-filters.d.ts +241 -0
- package/dist/schemas/job-filters/job-filters.js +87 -0
- package/dist/schemas/lead/index.d.ts +60 -8
- package/dist/schemas/lead/index.js +19 -0
- package/dist/schemas/lead/lead-note.d.ts +83 -0
- package/dist/schemas/lead/lead-note.js +30 -0
- package/dist/schemas/lead/lead-status.js +26 -0
- package/dist/schemas/lead/lead.d.ts +1897 -0
- package/dist/schemas/lead/lead.js +143 -0
- package/dist/schemas/lead/nuxt.d.ts +1664 -0
- package/dist/schemas/logger/index.js +17 -0
- package/dist/schemas/logger/log-event.d.ts +137 -52
- package/dist/schemas/logger/log-event.js +66 -0
- package/dist/schemas/organization/index.d.ts +11 -7
- package/dist/schemas/organization/index.js +17 -0
- package/dist/schemas/organization/organization.d.ts +70 -0
- package/dist/schemas/organization/organization.js +19 -0
- package/dist/schemas/proxy/index.js +17 -0
- package/dist/schemas/proxy/proxy-available-replacements.d.ts +1 -1
- package/dist/schemas/proxy/proxy.js +21 -0
- package/dist/schemas/saved-search/index.js +12 -0
- package/dist/schemas/scraper/index.js +18 -0
- package/dist/schemas/scraper/scrape-payload.d.ts +36 -64
- package/dist/schemas/scraper/scrape-payload.js +16 -0
- package/dist/schemas/scraper/scrape-result.js +23 -0
- package/dist/schemas/shared.js +16 -0
- package/dist/schemas/time-filter/index.js +9 -0
- package/dist/schemas/upwork-account/index.d.ts +3 -0
- package/dist/schemas/upwork-account/index.js +19 -0
- package/dist/schemas/upwork-account/upwork-account-status.d.ts +2 -0
- package/dist/schemas/upwork-account/upwork-account-status.js +11 -0
- package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +95 -0
- package/dist/schemas/upwork-account/upwork-business-manager-account.js +35 -0
- package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
- package/dist/schemas/upwork-account/upwork-scraping-account.js +29 -0
- package/dist/schemas/user/index.js +55 -0
- package/dist/types/account/account-status.d.ts +3 -0
- package/dist/types/account/account-status.js +2 -0
- package/dist/types/account/bidder-account.d.ts +7 -0
- package/dist/types/account/bidder-account.js +2 -0
- package/dist/types/account/index.d.ts +3 -0
- package/dist/types/account/index.js +19 -0
- package/dist/types/account/manager-account.d.ts +7 -0
- package/dist/types/account/manager-account.js +2 -0
- package/dist/types/account/scraper-account.d.ts +5 -0
- package/dist/types/account/scraper-account.js +2 -0
- package/dist/types/ai/ai-config.d.ts +6 -0
- package/dist/types/ai/ai-config.js +2 -0
- package/dist/types/ai/index.d.ts +3 -0
- package/dist/types/ai/index.js +19 -0
- package/dist/types/ai/proposal.d.ts +10 -0
- package/dist/types/ai/proposal.js +2 -0
- package/dist/types/ai/suitability.d.ts +6 -0
- package/dist/types/ai/suitability.js +2 -0
- package/dist/types/bid/bid-result.d.ts +5 -0
- package/dist/types/bid/bid-result.js +2 -0
- package/dist/types/bid/bid.d.ts +9 -0
- package/dist/types/bid/bid.js +2 -0
- package/dist/types/bid/index.d.ts +2 -0
- package/dist/types/bid/index.js +18 -0
- package/dist/types/bidding/index.d.ts +1 -0
- package/dist/types/bidding/index.js +17 -0
- package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
- package/dist/types/bidding/proposal-bidding-status.js +2 -0
- package/dist/types/campaign/campaign-analytics.d.ts +7 -0
- package/dist/types/campaign/campaign-analytics.js +2 -0
- package/dist/types/campaign/campaign-expenses.d.ts +3 -0
- package/dist/types/campaign/campaign-expenses.js +2 -0
- package/dist/types/campaign/campaign-insights.js +2 -0
- package/dist/types/campaign/campaign-integrations.d.ts +6 -0
- package/dist/types/campaign/campaign-integrations.js +2 -0
- package/dist/types/campaign/campaign-job-count.d.ts +4 -0
- package/dist/types/campaign/campaign-job-count.js +2 -0
- package/dist/types/campaign/campaign.d.ts +0 -2
- package/dist/types/campaign/campaign.js +2 -0
- package/dist/types/campaign/index.js +22 -0
- package/dist/types/chat-message/chat-message.d.ts +4 -0
- package/dist/types/chat-message/chat-message.js +2 -0
- package/dist/types/chat-message/index.d.ts +1 -0
- package/dist/types/chat-message/index.js +17 -0
- package/dist/types/config/agency-config.d.ts +4 -0
- package/dist/types/config/agency-config.js +2 -0
- package/dist/types/config/index.d.ts +1 -0
- package/dist/types/config/index.js +17 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.js +29 -0
- package/dist/types/job/index.d.ts +48 -0
- package/dist/types/job/index.js +19 -0
- package/dist/types/job/job-details.d.ts +36 -0
- package/dist/types/job/job-details.js +2 -0
- package/dist/types/job/job-note.d.ts +10 -0
- package/dist/types/job/job-note.js +2 -0
- package/dist/types/job/job-status.d.ts +5 -0
- package/dist/types/job/job-status.js +12 -0
- package/dist/types/job/job.d.ts +36 -0
- package/dist/types/job/job.js +2 -0
- package/dist/types/job/nuxt.d.ts +4 -0
- package/dist/types/job-filters/index.d.ts +1 -0
- package/dist/types/job-filters/index.js +17 -0
- package/dist/types/job-filters/job-filters.d.ts +4 -0
- package/dist/types/job-filters/job-filters.js +2 -0
- package/dist/types/logger/index.d.ts +1 -0
- package/dist/types/logger/index.js +17 -0
- package/dist/types/logger/log-event.js +2 -0
- package/dist/types/saved-search/index.d.ts +6 -0
- package/dist/types/saved-search/index.js +2 -0
- package/dist/types/scraper/index.d.ts +2 -0
- package/dist/types/scraper/index.js +18 -0
- package/dist/types/scraper/scrape-payload.d.ts +10 -0
- package/dist/types/scraper/scrape-payload.js +2 -0
- package/dist/types/scraper/scrape-result.d.ts +8 -0
- package/dist/types/scraper/scrape-result.js +2 -0
- package/dist/types/shared.d.ts +8 -0
- package/dist/types/time-filter/index.d.ts +3 -0
- package/dist/types/time-filter/index.js +2 -0
- package/dist/types/transaction/index.d.ts +4 -0
- package/dist/types/upwork-account/index.d.ts +3 -0
- package/dist/types/upwork-account/index.js +19 -0
- package/dist/types/upwork-account/upwork-account-status.d.ts +3 -0
- package/dist/types/upwork-account/upwork-account-status.js +2 -0
- package/dist/types/upwork-account/upwork-business-manager-account.d.ts +7 -0
- package/dist/types/upwork-account/upwork-business-manager-account.js +2 -0
- package/dist/types/upwork-account/upwork-scraping-account.d.ts +5 -0
- package/dist/types/upwork-account/upwork-scraping-account.js +2 -0
- package/dist/types/usage/index.d.ts +6 -0
- package/dist/types/user/index.d.ts +15 -0
- package/dist/types/user/index.js +2 -0
- package/dist/utils/index.js +17 -0
- package/dist/utils/try-catch.js +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateScraperAccountSchema = exports.createScraperAccountSchema = exports.scraperAccountSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const account_status_1 = require("./account-status");
|
|
6
|
+
const job_filters_1 = require("../job-filters");
|
|
7
|
+
exports.scraperAccountSchema = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.string(),
|
|
9
|
+
email: zod_1.z.string().email(),
|
|
10
|
+
password: zod_1.z.string(),
|
|
11
|
+
cookies: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
|
12
|
+
proxy_credentials: zod_1.z.string(),
|
|
13
|
+
region: job_filters_1.regionEnum,
|
|
14
|
+
isActive: zod_1.z.boolean(),
|
|
15
|
+
lastUsed: zod_1.z.number(),
|
|
16
|
+
status: account_status_1.accountStatusSchema,
|
|
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
|
+
})),
|
|
24
|
+
});
|
|
25
|
+
exports.createScraperAccountSchema = exports.scraperAccountSchema.pick({
|
|
26
|
+
email: true,
|
|
27
|
+
password: true,
|
|
28
|
+
proxy_credentials: true,
|
|
29
|
+
region: true,
|
|
30
|
+
verified: true,
|
|
31
|
+
isActive: true,
|
|
32
|
+
});
|
|
33
|
+
exports.updateScraperAccountSchema = exports.scraperAccountSchema
|
|
34
|
+
.omit({
|
|
35
|
+
id: true,
|
|
36
|
+
})
|
|
37
|
+
.partial();
|
|
@@ -303,6 +303,8 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
303
303
|
}>>>;
|
|
304
304
|
}, {
|
|
305
305
|
jobId: z.ZodString;
|
|
306
|
+
campaignId: z.ZodString;
|
|
307
|
+
organizationId: z.ZodString;
|
|
306
308
|
scrapedAt: z.ZodNullable<z.ZodNumber>;
|
|
307
309
|
updatedAt: z.ZodNullable<z.ZodNumber>;
|
|
308
310
|
suitabilityRating: z.ZodNullable<z.ZodNumber>;
|
|
@@ -327,7 +329,11 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
327
329
|
biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
|
|
328
330
|
scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
|
|
329
331
|
wonAmount: z.ZodOptional<z.ZodNumber>;
|
|
332
|
+
biddingTaskId: z.ZodNullable<z.ZodString>;
|
|
333
|
+
doNotApplyReason: z.ZodNullable<z.ZodString>;
|
|
330
334
|
}>, "processed">, "strip", z.ZodTypeAny, {
|
|
335
|
+
organizationId: string;
|
|
336
|
+
campaignId: string;
|
|
331
337
|
id: string | null;
|
|
332
338
|
uid: string | null;
|
|
333
339
|
createdAt: number | null;
|
|
@@ -434,6 +440,8 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
434
440
|
boostingAmount: number | null;
|
|
435
441
|
biddingTaskScheduled: boolean | null;
|
|
436
442
|
scheduledBiddingTime: number | null;
|
|
443
|
+
biddingTaskId: string | null;
|
|
444
|
+
doNotApplyReason: string | null;
|
|
437
445
|
activity?: Partial<Record<"4h" | "24h", {
|
|
438
446
|
proposals: {
|
|
439
447
|
min: number | null;
|
|
@@ -457,6 +465,8 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
457
465
|
proposalId?: string | undefined;
|
|
458
466
|
wonAmount?: number | undefined;
|
|
459
467
|
}, {
|
|
468
|
+
organizationId: string;
|
|
469
|
+
campaignId: string;
|
|
460
470
|
id: string | null;
|
|
461
471
|
uid: string | null;
|
|
462
472
|
createdAt: number | null;
|
|
@@ -563,6 +573,8 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
563
573
|
boostingAmount: number | null;
|
|
564
574
|
biddingTaskScheduled: boolean | null;
|
|
565
575
|
scheduledBiddingTime: number | null;
|
|
576
|
+
biddingTaskId: string | null;
|
|
577
|
+
doNotApplyReason: string | null;
|
|
566
578
|
activity?: Partial<Record<"4h" | "24h", {
|
|
567
579
|
proposals: {
|
|
568
580
|
min: number | null;
|
|
@@ -586,11 +598,24 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
586
598
|
proposalId?: string | undefined;
|
|
587
599
|
wonAmount?: number | undefined;
|
|
588
600
|
}>;
|
|
601
|
+
isOverallHighestPriorityCampaign: z.ZodOptional<z.ZodBoolean>;
|
|
602
|
+
applyToLeads: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
603
|
+
leadId: z.ZodString;
|
|
604
|
+
campaignId: z.ZodString;
|
|
605
|
+
}, "strip", z.ZodTypeAny, {
|
|
606
|
+
campaignId: string;
|
|
607
|
+
leadId: string;
|
|
608
|
+
}, {
|
|
609
|
+
campaignId: string;
|
|
610
|
+
leadId: string;
|
|
611
|
+
}>, "many">>;
|
|
589
612
|
}, "strip", z.ZodTypeAny, {
|
|
590
613
|
userId: string | null;
|
|
591
614
|
organizationId: string;
|
|
592
615
|
campaignId: string;
|
|
593
616
|
lead: {
|
|
617
|
+
organizationId: string;
|
|
618
|
+
campaignId: string;
|
|
594
619
|
id: string | null;
|
|
595
620
|
uid: string | null;
|
|
596
621
|
createdAt: number | null;
|
|
@@ -697,6 +722,8 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
697
722
|
boostingAmount: number | null;
|
|
698
723
|
biddingTaskScheduled: boolean | null;
|
|
699
724
|
scheduledBiddingTime: number | null;
|
|
725
|
+
biddingTaskId: string | null;
|
|
726
|
+
doNotApplyReason: string | null;
|
|
700
727
|
activity?: Partial<Record<"4h" | "24h", {
|
|
701
728
|
proposals: {
|
|
702
729
|
min: number | null;
|
|
@@ -720,11 +747,18 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
720
747
|
proposalId?: string | undefined;
|
|
721
748
|
wonAmount?: number | undefined;
|
|
722
749
|
};
|
|
750
|
+
isOverallHighestPriorityCampaign?: boolean | undefined;
|
|
751
|
+
applyToLeads?: {
|
|
752
|
+
campaignId: string;
|
|
753
|
+
leadId: string;
|
|
754
|
+
}[] | undefined;
|
|
723
755
|
}, {
|
|
724
756
|
userId: string | null;
|
|
725
757
|
organizationId: string;
|
|
726
758
|
campaignId: string;
|
|
727
759
|
lead: {
|
|
760
|
+
organizationId: string;
|
|
761
|
+
campaignId: string;
|
|
728
762
|
id: string | null;
|
|
729
763
|
uid: string | null;
|
|
730
764
|
createdAt: number | null;
|
|
@@ -831,6 +865,8 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
831
865
|
boostingAmount: number | null;
|
|
832
866
|
biddingTaskScheduled: boolean | null;
|
|
833
867
|
scheduledBiddingTime: number | null;
|
|
868
|
+
biddingTaskId: string | null;
|
|
869
|
+
doNotApplyReason: string | null;
|
|
834
870
|
activity?: Partial<Record<"4h" | "24h", {
|
|
835
871
|
proposals: {
|
|
836
872
|
min: number | null;
|
|
@@ -854,6 +890,11 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
854
890
|
proposalId?: string | undefined;
|
|
855
891
|
wonAmount?: number | undefined;
|
|
856
892
|
};
|
|
893
|
+
isOverallHighestPriorityCampaign?: boolean | undefined;
|
|
894
|
+
applyToLeads?: {
|
|
895
|
+
campaignId: string;
|
|
896
|
+
leadId: string;
|
|
897
|
+
}[] | undefined;
|
|
857
898
|
}>;
|
|
858
899
|
export type AgentTaskRequest = z.infer<typeof agentTaskRequestSchema>;
|
|
859
900
|
export declare const suitabilityRatingSchema: z.ZodObject<{
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const aiConfigSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
suitabilityPrompt: z.ZodNullable<z.ZodString>;
|
|
5
|
+
proposalPrompt: z.ZodNullable<z.ZodString>;
|
|
6
|
+
questionProposalPrompt: z.ZodNullable<z.ZodString>;
|
|
7
|
+
knowledgeBase: z.ZodNullable<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
id: string;
|
|
10
|
+
suitabilityPrompt: string | null;
|
|
11
|
+
proposalPrompt: string | null;
|
|
12
|
+
questionProposalPrompt: string | null;
|
|
13
|
+
knowledgeBase: string | null;
|
|
14
|
+
}, {
|
|
15
|
+
id: string;
|
|
16
|
+
suitabilityPrompt: string | null;
|
|
17
|
+
proposalPrompt: string | null;
|
|
18
|
+
questionProposalPrompt: string | null;
|
|
19
|
+
knowledgeBase: string | null;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const updateAiConfigSchema: z.ZodObject<{
|
|
22
|
+
suitabilityPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
proposalPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
questionProposalPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
knowledgeBase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
suitabilityPrompt?: string | null | undefined;
|
|
28
|
+
proposalPrompt?: string | null | undefined;
|
|
29
|
+
questionProposalPrompt?: string | null | undefined;
|
|
30
|
+
knowledgeBase?: string | null | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
suitabilityPrompt?: string | null | undefined;
|
|
33
|
+
proposalPrompt?: string | null | undefined;
|
|
34
|
+
questionProposalPrompt?: string | null | undefined;
|
|
35
|
+
knowledgeBase?: string | null | undefined;
|
|
36
|
+
}>;
|
|
@@ -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().nullable(),
|
|
8
|
+
proposalPrompt: zod_1.z.string().nullable(),
|
|
9
|
+
questionProposalPrompt: zod_1.z.string().nullable(),
|
|
10
|
+
knowledgeBase: zod_1.z.string().nullable(),
|
|
11
|
+
});
|
|
12
|
+
exports.updateAiConfigSchema = exports.aiConfigSchema.omit({ id: true }).partial();
|
|
@@ -0,0 +1,19 @@
|
|
|
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);
|
|
18
|
+
__exportStar(require("./proposal"), exports);
|
|
19
|
+
__exportStar(require("./suitability"), exports);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const questionAnswerPairSchema: z.ZodObject<{
|
|
3
|
+
question: z.ZodString;
|
|
4
|
+
answer: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
question: string;
|
|
7
|
+
answer: string;
|
|
8
|
+
}, {
|
|
9
|
+
question: string;
|
|
10
|
+
answer: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const proposalSchema: z.ZodObject<{
|
|
13
|
+
coverLetter: z.ZodString;
|
|
14
|
+
questionAnswerPairs: z.ZodArray<z.ZodObject<{
|
|
15
|
+
question: z.ZodString;
|
|
16
|
+
answer: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
question: string;
|
|
19
|
+
answer: string;
|
|
20
|
+
}, {
|
|
21
|
+
question: string;
|
|
22
|
+
answer: string;
|
|
23
|
+
}>, "many">;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
coverLetter: string;
|
|
26
|
+
questionAnswerPairs: {
|
|
27
|
+
question: string;
|
|
28
|
+
answer: string;
|
|
29
|
+
}[];
|
|
30
|
+
}, {
|
|
31
|
+
coverLetter: string;
|
|
32
|
+
questionAnswerPairs: {
|
|
33
|
+
question: string;
|
|
34
|
+
answer: string;
|
|
35
|
+
}[];
|
|
36
|
+
}>;
|
|
37
|
+
export declare const proposalResponseSchema: z.ZodArray<z.ZodObject<{
|
|
38
|
+
modelName: z.ZodString;
|
|
39
|
+
proposal: z.ZodObject<{
|
|
40
|
+
coverLetter: z.ZodString;
|
|
41
|
+
questionAnswerPairs: z.ZodArray<z.ZodObject<{
|
|
42
|
+
question: z.ZodString;
|
|
43
|
+
answer: z.ZodString;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
question: string;
|
|
46
|
+
answer: string;
|
|
47
|
+
}, {
|
|
48
|
+
question: string;
|
|
49
|
+
answer: string;
|
|
50
|
+
}>, "many">;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
coverLetter: string;
|
|
53
|
+
questionAnswerPairs: {
|
|
54
|
+
question: string;
|
|
55
|
+
answer: string;
|
|
56
|
+
}[];
|
|
57
|
+
}, {
|
|
58
|
+
coverLetter: string;
|
|
59
|
+
questionAnswerPairs: {
|
|
60
|
+
question: string;
|
|
61
|
+
answer: string;
|
|
62
|
+
}[];
|
|
63
|
+
}>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
modelName: string;
|
|
66
|
+
proposal: {
|
|
67
|
+
coverLetter: string;
|
|
68
|
+
questionAnswerPairs: {
|
|
69
|
+
question: string;
|
|
70
|
+
answer: string;
|
|
71
|
+
}[];
|
|
72
|
+
};
|
|
73
|
+
}, {
|
|
74
|
+
modelName: string;
|
|
75
|
+
proposal: {
|
|
76
|
+
coverLetter: string;
|
|
77
|
+
questionAnswerPairs: {
|
|
78
|
+
question: string;
|
|
79
|
+
answer: string;
|
|
80
|
+
}[];
|
|
81
|
+
};
|
|
82
|
+
}>, "many">;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.proposalResponseSchema = exports.proposalSchema = exports.questionAnswerPairSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.questionAnswerPairSchema = zod_1.z.object({
|
|
6
|
+
question: zod_1.z.string(),
|
|
7
|
+
answer: zod_1.z.string(),
|
|
8
|
+
});
|
|
9
|
+
exports.proposalSchema = zod_1.z.object({
|
|
10
|
+
coverLetter: zod_1.z.string(),
|
|
11
|
+
questionAnswerPairs: zod_1.z.array(exports.questionAnswerPairSchema),
|
|
12
|
+
});
|
|
13
|
+
exports.proposalResponseSchema = zod_1.z.array(zod_1.z.object({
|
|
14
|
+
modelName: zod_1.z.string(),
|
|
15
|
+
proposal: exports.proposalSchema,
|
|
16
|
+
}));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const suitabilitySchema: z.ZodObject<{
|
|
3
|
+
rating: z.ZodString;
|
|
4
|
+
reason: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
rating: string;
|
|
7
|
+
reason: string;
|
|
8
|
+
}, {
|
|
9
|
+
rating: string;
|
|
10
|
+
reason: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const suitabilityStatusSchema: z.ZodEnum<["completed", "pending", "failed"]>;
|
|
13
|
+
export declare const suitabilityResponseSchema: z.ZodArray<z.ZodObject<{
|
|
14
|
+
modelName: z.ZodString;
|
|
15
|
+
suitability: z.ZodObject<{
|
|
16
|
+
rating: z.ZodString;
|
|
17
|
+
reason: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
rating: string;
|
|
20
|
+
reason: string;
|
|
21
|
+
}, {
|
|
22
|
+
rating: string;
|
|
23
|
+
reason: string;
|
|
24
|
+
}>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
modelName: string;
|
|
27
|
+
suitability: {
|
|
28
|
+
rating: string;
|
|
29
|
+
reason: string;
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
modelName: string;
|
|
33
|
+
suitability: {
|
|
34
|
+
rating: string;
|
|
35
|
+
reason: string;
|
|
36
|
+
};
|
|
37
|
+
}>, "many">;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.suitabilityResponseSchema = exports.suitabilityStatusSchema = exports.suitabilitySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.suitabilitySchema = zod_1.z.object({
|
|
6
|
+
rating: zod_1.z.string(),
|
|
7
|
+
reason: zod_1.z.string(),
|
|
8
|
+
});
|
|
9
|
+
exports.suitabilityStatusSchema = zod_1.z.enum([
|
|
10
|
+
'completed',
|
|
11
|
+
'pending',
|
|
12
|
+
'failed',
|
|
13
|
+
]);
|
|
14
|
+
exports.suitabilityResponseSchema = zod_1.z.array(zod_1.z.object({
|
|
15
|
+
modelName: zod_1.z.string(),
|
|
16
|
+
suitability: exports.suitabilitySchema,
|
|
17
|
+
}));
|
|
@@ -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,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bidDtoSchema = exports.freelancerBidPayloadSchema = exports.agencyBidPayloadSchema = exports.bidPayloadSchema = exports.agencyBidProposalDataSchema = exports.freelancerBidProposalDataSchema = exports.bidPayloadProposalDataSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const ai_1 = require("../ai");
|
|
6
|
+
exports.bidPayloadProposalDataSchema = zod_1.z.object({
|
|
7
|
+
coverLetter: zod_1.z.string(),
|
|
8
|
+
questionAnswerPairs: zod_1.z.array(ai_1.questionAnswerPairSchema).nullable(),
|
|
9
|
+
boostingEnabled: zod_1.z.boolean(),
|
|
10
|
+
minimumBoost: zod_1.z.number().nullable(),
|
|
11
|
+
maximumBoost: zod_1.z.number().nullable(),
|
|
12
|
+
});
|
|
13
|
+
exports.freelancerBidProposalDataSchema = exports.bidPayloadProposalDataSchema;
|
|
14
|
+
exports.agencyBidProposalDataSchema = exports.bidPayloadProposalDataSchema.extend({
|
|
15
|
+
agencyName: zod_1.z.string(),
|
|
16
|
+
contractorName: zod_1.z.string(),
|
|
17
|
+
specializedProfile: zod_1.z.string().nullable(),
|
|
18
|
+
});
|
|
19
|
+
exports.bidPayloadSchema = zod_1.z.object({
|
|
20
|
+
jobUrl: zod_1.z.string(),
|
|
21
|
+
username: zod_1.z.string(),
|
|
22
|
+
password: zod_1.z.string(),
|
|
23
|
+
cookies: zod_1.z.array(zod_1.z.any()),
|
|
24
|
+
multiLoginProfileId: zod_1.z.string(),
|
|
25
|
+
});
|
|
26
|
+
exports.agencyBidPayloadSchema = exports.bidPayloadSchema.extend({
|
|
27
|
+
proposalData: exports.agencyBidProposalDataSchema,
|
|
28
|
+
});
|
|
29
|
+
exports.freelancerBidPayloadSchema = exports.bidPayloadSchema.extend({
|
|
30
|
+
proposalData: exports.freelancerBidProposalDataSchema,
|
|
31
|
+
});
|
|
32
|
+
exports.bidDtoSchema = zod_1.z.object({
|
|
33
|
+
organizationId: zod_1.z.string(),
|
|
34
|
+
campaignId: zod_1.z.string(),
|
|
35
|
+
leadId: zod_1.z.string(),
|
|
36
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./bid"), exports);
|
|
18
|
+
__exportStar(require("./bid-result"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './proposal-bidding-status';
|
|
@@ -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("./proposal-bidding-status"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const proposalBiddingStatusSchema: 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.proposalBiddingStatusSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.proposalBiddingStatusSchema = 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,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.campaignAIMetricsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.campaignAIMetricsSchema = zod_1.z.object({
|
|
6
|
+
leadsAnalyzed: zod_1.z.number(),
|
|
7
|
+
leadsBidded: zod_1.z.number(),
|
|
8
|
+
connectsSaved: zod_1.z.number(),
|
|
9
|
+
});
|