lancer-shared 1.2.113 → 1.2.115
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 +108 -56
- package/dist/constants/organization.d.ts +2 -2
- package/dist/constants/proxies.d.ts +4 -0
- package/dist/constants/routes.js +6 -0
- package/dist/constants/upwork-filters.d.ts +5 -0
- package/dist/constants/upwork-filters.js +75 -0
- package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +5 -0
- package/dist/schemas/ai-config/ai-config.d.ts +39 -0
- package/dist/schemas/ai-config/ai-config.js +12 -0
- package/dist/schemas/ai-config/index.d.ts +1 -0
- package/dist/schemas/ai-config/index.js +17 -0
- package/dist/schemas/bid/bid-status.d.ts +30 -0
- package/dist/schemas/bid/bid-status.js +15 -0
- package/dist/schemas/bid/exceptions/base-exception.d.ts +4 -0
- package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +5 -0
- package/dist/schemas/bidding/proposal-dto.d.ts +26 -0
- package/dist/schemas/bidding/proposal-dto.js +18 -0
- package/dist/schemas/campaign/campaign-integrations.d.ts +0 -5
- package/dist/schemas/job/index.d.ts +6 -6
- package/dist/schemas/job/job-pipeline.d.ts +74 -0
- package/dist/schemas/job/job-pipeline.js +29 -0
- package/dist/schemas/job/job-suitability.d.ts +12 -0
- package/dist/schemas/job/job-suitability.js +13 -0
- package/dist/schemas/job/job.d.ts +16 -16
- package/dist/schemas/job/pipeline-job.d.ts +9 -3
- package/dist/schemas/job/pipeline-job.js +1 -0
- package/dist/schemas/knowledge-object/index.d.ts +1 -0
- package/dist/schemas/knowledge-object/index.js +17 -0
- package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
- package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
- package/dist/schemas/logger/log-event.d.ts +210 -14
- package/dist/schemas/proxy/proxy.js +3 -1
- package/dist/schemas/scraper/scrape-payload.d.ts +5 -0
- package/dist/schemas/scraper/scrape-response.d.ts +345 -0
- package/dist/schemas/scraper/scrape-response.js +9 -0
- package/dist/schemas/upwork-account/index.d.ts +1 -1
- package/dist/schemas/upwork-account/index.js +1 -1
- package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +14 -14
- package/dist/schemas/upwork-account/upwork-business-manager-account.js +2 -2
- package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +92 -0
- package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
- package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +23 -23
- package/dist/schemas/upwork-account/upwork-scraping-account.js +4 -3
- package/dist/types/ai-config/ai-config.d.ts +6 -0
- package/dist/types/ai-config/ai-config.js +2 -0
- package/dist/types/ai-config/index.d.ts +1 -0
- package/dist/types/ai-config/index.js +17 -0
- package/dist/types/bid/bid-status.d.ts +5 -0
- package/dist/types/bid/bid-status.js +2 -0
- package/dist/types/bidding/proposal-dto.d.ts +3 -0
- package/dist/types/bidding/proposal-dto.js +2 -0
- package/dist/types/job/job-pipeline.d.ts +4 -0
- package/dist/types/job/job-pipeline.js +2 -0
- package/dist/types/job/job-suitability.d.ts +3 -0
- package/dist/types/job/job-suitability.js +2 -0
- package/dist/types/knowledge-object/index.d.ts +1 -0
- package/dist/types/knowledge-object/index.js +17 -0
- package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
- package/dist/types/knowledge-object/knowledge-object.js +2 -0
- package/dist/types/scraper/scrape-response.d.ts +4 -0
- package/dist/types/scraper/scrape-response.js +2 -0
- package/dist/types/upwork-account/upwork-scraping-account.d.ts +2 -2
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -11771,7 +11771,7 @@ const jobSkillsSchema = objectType({
|
|
|
11771
11771
|
});
|
|
11772
11772
|
const vendorQualificationSchema = objectType({
|
|
11773
11773
|
location: stringType().nullable(),
|
|
11774
|
-
talentType: z.enum([
|
|
11774
|
+
talentType: z.enum(['Agency', 'Independent', 'unspecified']).nullable(),
|
|
11775
11775
|
englishLevel: stringType().nullable(),
|
|
11776
11776
|
minimumEarnings: numberType().nullable(),
|
|
11777
11777
|
jobSuccessScore: stringType().nullable(),
|
|
@@ -11894,7 +11894,7 @@ const jobActivitySnapshotSchema = objectType({
|
|
|
11894
11894
|
scrapedAt: numberType(),
|
|
11895
11895
|
hoursSincePosted: numberType(),
|
|
11896
11896
|
});
|
|
11897
|
-
const
|
|
11897
|
+
const feedJobSchema = objectType({
|
|
11898
11898
|
uid: stringType().nullable(),
|
|
11899
11899
|
title: stringType().nullable(),
|
|
11900
11900
|
jobUrl: stringType().nullable(),
|
|
@@ -12447,56 +12447,60 @@ const proposalSchema = z.object({
|
|
|
12447
12447
|
|
|
12448
12448
|
const LogEventTypeEnum = z.enum([
|
|
12449
12449
|
// Scraper Events
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
|
|
12455
|
-
|
|
12456
|
-
|
|
12457
|
-
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12450
|
+
'scraperStarted',
|
|
12451
|
+
'scraperCompleted',
|
|
12452
|
+
'scrapeJobStarted',
|
|
12453
|
+
'jobScraped',
|
|
12454
|
+
'jobScrapeFailed',
|
|
12455
|
+
'scrapeJobDetailsStarted',
|
|
12456
|
+
'scrapeJobDetailsCompleted',
|
|
12457
|
+
'scrapeJobDetailsFailed',
|
|
12458
|
+
'jobsIndexed',
|
|
12459
|
+
'jobDuplicateSkipped',
|
|
12460
|
+
'scraperFailed',
|
|
12461
|
+
'jobActivityScraped',
|
|
12462
|
+
'jobActivityScrapeFailed',
|
|
12463
|
+
'leadStatusCheckFailed',
|
|
12464
|
+
'leadStatusUpdated',
|
|
12461
12465
|
// Feed Scraper Events
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
+
'feedScrapeStarted',
|
|
12467
|
+
'feedScrapeCompleted',
|
|
12468
|
+
'feedScrapeFailed',
|
|
12469
|
+
'jobListingScraped',
|
|
12466
12470
|
// Job Sync & Campaign Matching
|
|
12467
|
-
|
|
12468
|
-
|
|
12469
|
-
|
|
12471
|
+
'jobSyncPublished',
|
|
12472
|
+
'jobSyncReceived',
|
|
12473
|
+
'leadsCreatedAndSynced',
|
|
12470
12474
|
// Suitability Events
|
|
12471
|
-
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12475
|
+
'suitabilityPending',
|
|
12476
|
+
'suitabilityProcessing',
|
|
12477
|
+
'suitabilityComplete',
|
|
12478
|
+
'suitabilityFailed',
|
|
12479
|
+
'manualSuitabilityAnalyzed',
|
|
12476
12480
|
// Proposal Events
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
|
|
12480
|
-
|
|
12481
|
+
'proposalProcessing',
|
|
12482
|
+
'proposalComplete',
|
|
12483
|
+
'proposalFailed',
|
|
12484
|
+
'manualProposalGenerated',
|
|
12481
12485
|
// Bidding Events
|
|
12482
|
-
|
|
12483
|
-
|
|
12484
|
-
|
|
12485
|
-
|
|
12486
|
-
|
|
12487
|
-
|
|
12488
|
-
|
|
12489
|
-
|
|
12490
|
-
|
|
12491
|
-
|
|
12492
|
-
|
|
12493
|
-
|
|
12486
|
+
'biddingProcessing',
|
|
12487
|
+
'biddingComplete',
|
|
12488
|
+
'biddingFailed',
|
|
12489
|
+
'biddingSkipped',
|
|
12490
|
+
'biddingPending',
|
|
12491
|
+
'biddingRetry',
|
|
12492
|
+
'biddingInsufficientConnects',
|
|
12493
|
+
'biddingWarningAlert',
|
|
12494
|
+
'biddingRejected',
|
|
12495
|
+
'biddingRejectedWithFeedback',
|
|
12496
|
+
'checkSuitableLeadFeedbackStatus',
|
|
12497
|
+
'biddingApproved',
|
|
12494
12498
|
// System/Generic Events
|
|
12495
|
-
|
|
12496
|
-
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
|
|
12499
|
+
'errorLogged',
|
|
12500
|
+
'cloudTaskRetry',
|
|
12501
|
+
'manualLeadEdited',
|
|
12502
|
+
'leadArchived',
|
|
12503
|
+
'auditTrailLogged',
|
|
12500
12504
|
// Lead Events
|
|
12501
12505
|
]);
|
|
12502
12506
|
const logEventSchema = z.object({
|
|
@@ -12505,7 +12509,7 @@ const logEventSchema = z.object({
|
|
|
12505
12509
|
// The service that triggered the event
|
|
12506
12510
|
source: z.string(), // e.g. "lancer-agents", "lancer-bidding"
|
|
12507
12511
|
// Optional: Allow logging non-lead events in the future
|
|
12508
|
-
resourceType: z.string().default(
|
|
12512
|
+
resourceType: z.string().default('lead'), // e.g. "lead", "campaign", "user"
|
|
12509
12513
|
// ID of the resource (primary entity affected)
|
|
12510
12514
|
resourceId: z.string().nullable(), // fallback if leadId is not applicable
|
|
12511
12515
|
// Lead-level metadata
|
|
@@ -12521,8 +12525,48 @@ const logEventSchema = z.object({
|
|
|
12521
12525
|
timestamp: z.number(),
|
|
12522
12526
|
});
|
|
12523
12527
|
const listingScrapedEventMetadata = objectType({
|
|
12524
|
-
listing:
|
|
12528
|
+
listing: feedJobSchema,
|
|
12529
|
+
region: regionSchema,
|
|
12530
|
+
});
|
|
12531
|
+
const scrapeFeedEventMetadata = objectType({
|
|
12532
|
+
region: regionSchema,
|
|
12533
|
+
error: stringType(),
|
|
12534
|
+
});
|
|
12535
|
+
const scrapeFeedJobsDetailsStartedEventMetadata = objectType({
|
|
12536
|
+
region: regionSchema,
|
|
12537
|
+
accounts: z.array(z.object({
|
|
12538
|
+
id: stringType(),
|
|
12539
|
+
email: stringType(),
|
|
12540
|
+
})),
|
|
12541
|
+
feedJobsCount: numberType(),
|
|
12542
|
+
chunksSize: numberType(),
|
|
12543
|
+
});
|
|
12544
|
+
const scrapeFeedJobsDetailsCompletedEventMetadata = objectType({
|
|
12545
|
+
region: regionSchema,
|
|
12546
|
+
accountId: stringType(),
|
|
12547
|
+
accountEmail: stringType(),
|
|
12548
|
+
feedJobsCount: numberType(),
|
|
12549
|
+
duration: stringType(),
|
|
12550
|
+
});
|
|
12551
|
+
const scrapeFeedJobsDetailsFailedEventMetadata = objectType({
|
|
12552
|
+
region: regionSchema,
|
|
12553
|
+
accountId: stringType(),
|
|
12554
|
+
accountEmail: stringType(),
|
|
12555
|
+
error: stringType(),
|
|
12556
|
+
duration: stringType(),
|
|
12557
|
+
});
|
|
12558
|
+
const scrapeJobStartedEventMetadata = objectType({
|
|
12559
|
+
listing: feedJobSchema,
|
|
12560
|
+
region: regionSchema,
|
|
12561
|
+
accountId: stringType(),
|
|
12562
|
+
accountEmail: stringType(),
|
|
12563
|
+
});
|
|
12564
|
+
const scrapeJobFailedEventMetadata = objectType({
|
|
12565
|
+
listing: feedJobSchema,
|
|
12525
12566
|
region: regionSchema,
|
|
12567
|
+
accountId: stringType(),
|
|
12568
|
+
accountEmail: stringType(),
|
|
12569
|
+
error: stringType(),
|
|
12526
12570
|
});
|
|
12527
12571
|
const jobActivityScrapedEventMetadata = objectType({
|
|
12528
12572
|
activity: jobActivitySchema,
|
|
@@ -12531,7 +12575,7 @@ const jobActivityScrapedEventMetadata = objectType({
|
|
|
12531
12575
|
scrapedAt: numberType(),
|
|
12532
12576
|
});
|
|
12533
12577
|
const jobActivityScrapeFailedEventMetadata = objectType({
|
|
12534
|
-
listing:
|
|
12578
|
+
listing: feedJobSchema,
|
|
12535
12579
|
region: regionSchema,
|
|
12536
12580
|
offsetHour: jobActivityOffsetHourSchema,
|
|
12537
12581
|
});
|
|
@@ -12543,9 +12587,11 @@ const feedScrapeStartedEventMetadata = objectType({
|
|
|
12543
12587
|
const feedScrapeCompletedEventMetadata = objectType({
|
|
12544
12588
|
id: stringType(),
|
|
12545
12589
|
endTime: numberType(),
|
|
12590
|
+
listingCount: numberType(),
|
|
12591
|
+
duration: stringType(),
|
|
12592
|
+
accountEmail: stringType(),
|
|
12546
12593
|
region: regionSchema,
|
|
12547
12594
|
durationMillis: numberType().nullish(),
|
|
12548
|
-
duration: stringType().nullish(),
|
|
12549
12595
|
});
|
|
12550
12596
|
const biddingCompletedEventMetadata = objectType({
|
|
12551
12597
|
biddingAmount: numberType(),
|
|
@@ -12556,7 +12602,7 @@ const biddingFailedEventMetadata = objectType({
|
|
|
12556
12602
|
error: z.any(),
|
|
12557
12603
|
});
|
|
12558
12604
|
const userAccountBiddingExceptionEventMetadata = objectType({
|
|
12559
|
-
errorType: z.enum([
|
|
12605
|
+
errorType: z.enum(['insufficientConnects', 'proposalFormWarningAlert']),
|
|
12560
12606
|
context: z.string().optional(),
|
|
12561
12607
|
});
|
|
12562
12608
|
const lancerBiddingExceptionEventMetadata = objectType({
|
|
@@ -13209,14 +13255,14 @@ const scrapeUserProfileRequestSchema = objectType({
|
|
|
13209
13255
|
profileUrl: stringType(),
|
|
13210
13256
|
});
|
|
13211
13257
|
const scrapeJobPayloadSchema = objectType({
|
|
13212
|
-
listing:
|
|
13258
|
+
listing: feedJobSchema,
|
|
13213
13259
|
});
|
|
13214
13260
|
const processFeedPayloadSchema = objectType({
|
|
13215
13261
|
region: regionSchema,
|
|
13216
|
-
listings: arrayType(
|
|
13262
|
+
listings: arrayType(feedJobSchema),
|
|
13217
13263
|
});
|
|
13218
13264
|
const scrapeJobActivityPayloadSchema = objectType({
|
|
13219
|
-
listing:
|
|
13265
|
+
listing: feedJobSchema,
|
|
13220
13266
|
offsetHour: jobActivityOffsetHourSchema,
|
|
13221
13267
|
});
|
|
13222
13268
|
const checkLeadStatusPayloadSchema = objectType({
|
|
@@ -13235,7 +13281,7 @@ const scrapeResultSchema = objectType({
|
|
|
13235
13281
|
ukAccountCookies: arrayType(anyType()).optional(),
|
|
13236
13282
|
});
|
|
13237
13283
|
const scrapeFeedResultSchema = objectType({
|
|
13238
|
-
listings: arrayType(
|
|
13284
|
+
listings: arrayType(feedJobSchema),
|
|
13239
13285
|
region: regionSchema,
|
|
13240
13286
|
usAccountCookies: arrayType(anyType()).optional(),
|
|
13241
13287
|
ukAccountCookies: arrayType(anyType()).optional(),
|
|
@@ -13918,6 +13964,7 @@ exports.evaluateFunctionException = evaluateFunctionException;
|
|
|
13918
13964
|
exports.eventLoggerPayloadSchema = eventLoggerPayloadSchema;
|
|
13919
13965
|
exports.experienceLevelEnum = experienceLevelEnum;
|
|
13920
13966
|
exports.externalProxySchema = externalProxySchema;
|
|
13967
|
+
exports.feedJobSchema = feedJobSchema;
|
|
13921
13968
|
exports.feedScrapeCompletedEventMetadata = feedScrapeCompletedEventMetadata;
|
|
13922
13969
|
exports.feedScrapeException = feedScrapeException;
|
|
13923
13970
|
exports.feedScrapeStartedEventMetadata = feedScrapeStartedEventMetadata;
|
|
@@ -13962,7 +14009,6 @@ exports.jobActivityScrapedEventMetadata = jobActivityScrapedEventMetadata;
|
|
|
13962
14009
|
exports.jobActivitySnapshotSchema = jobActivitySnapshotSchema;
|
|
13963
14010
|
exports.jobActivityUpdateSchema = jobActivityUpdateSchema;
|
|
13964
14011
|
exports.jobFiltersSchema = jobFiltersSchema;
|
|
13965
|
-
exports.jobListingSchema = jobListingSchema;
|
|
13966
14012
|
exports.jobQualityScoreSchema = jobQualityScoreSchema;
|
|
13967
14013
|
exports.jobSkillsSchema = jobSkillsSchema;
|
|
13968
14014
|
exports.jobStatusOrder = jobStatusOrder;
|
|
@@ -14032,9 +14078,15 @@ exports.registerSchema = registerSchema;
|
|
|
14032
14078
|
exports.requiredEarningsEnum = requiredEarningsEnum;
|
|
14033
14079
|
exports.requiredJSSEnum = requiredJSSEnum;
|
|
14034
14080
|
exports.savedSearchSchema = savedSearchSchema;
|
|
14081
|
+
exports.scrapeFeedEventMetadata = scrapeFeedEventMetadata;
|
|
14082
|
+
exports.scrapeFeedJobsDetailsCompletedEventMetadata = scrapeFeedJobsDetailsCompletedEventMetadata;
|
|
14083
|
+
exports.scrapeFeedJobsDetailsFailedEventMetadata = scrapeFeedJobsDetailsFailedEventMetadata;
|
|
14084
|
+
exports.scrapeFeedJobsDetailsStartedEventMetadata = scrapeFeedJobsDetailsStartedEventMetadata;
|
|
14035
14085
|
exports.scrapeFeedResultSchema = scrapeFeedResultSchema;
|
|
14036
14086
|
exports.scrapeJobActivityPayloadSchema = scrapeJobActivityPayloadSchema;
|
|
14087
|
+
exports.scrapeJobFailedEventMetadata = scrapeJobFailedEventMetadata;
|
|
14037
14088
|
exports.scrapeJobPayloadSchema = scrapeJobPayloadSchema;
|
|
14089
|
+
exports.scrapeJobStartedEventMetadata = scrapeJobStartedEventMetadata;
|
|
14038
14090
|
exports.scrapePayloadSchema = scrapePayloadSchema;
|
|
14039
14091
|
exports.scrapeResultSchema = scrapeResultSchema;
|
|
14040
14092
|
exports.scrapeUserProfileRequestSchema = scrapeUserProfileRequestSchema;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const creditDeductionAmountMap: Record<
|
|
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;
|
package/dist/constants/routes.js
CHANGED
|
@@ -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,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,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
|
+
]);
|
|
@@ -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
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
export declare const jobSkillsSchema: z.ZodObject<{
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -925,7 +925,7 @@ export declare const jobActivitySnapshotSchema: z.ZodObject<{
|
|
|
925
925
|
postedAt: number;
|
|
926
926
|
hoursSincePosted: number;
|
|
927
927
|
}>;
|
|
928
|
-
export declare const
|
|
928
|
+
export declare const feedJobSchema: z.ZodObject<{
|
|
929
929
|
uid: z.ZodNullable<z.ZodString>;
|
|
930
930
|
title: z.ZodNullable<z.ZodString>;
|
|
931
931
|
jobUrl: z.ZodNullable<z.ZodString>;
|
|
@@ -953,7 +953,7 @@ export interface Job extends z.infer<typeof upworkJobSchema> {
|
|
|
953
953
|
skills: JobSkill[] | null;
|
|
954
954
|
vendorQualifications: VendorQualifications | null;
|
|
955
955
|
}
|
|
956
|
-
export type
|
|
956
|
+
export type FeedJob = z.infer<typeof feedJobSchema>;
|
|
957
957
|
export type JobSkill = z.infer<typeof jobSkillsSchema>;
|
|
958
958
|
export type VendorQualifications = z.infer<typeof vendorQualificationSchema>;
|
|
959
959
|
export type ClientInfo = z.infer<typeof clientInfoSchema>;
|
|
@@ -969,6 +969,6 @@ export interface JobActivityDelta extends z.infer<typeof jobActivityDeltaSchema>
|
|
|
969
969
|
}
|
|
970
970
|
export interface JobActivitySnapshot extends z.infer<typeof jobActivitySnapshotSchema> {
|
|
971
971
|
}
|
|
972
|
-
export * from
|
|
973
|
-
export * from
|
|
974
|
-
export * from
|
|
972
|
+
export * from './nuxt';
|
|
973
|
+
export * from './job-filters';
|
|
974
|
+
export * from './job-api';
|