lancer-shared 1.2.141 → 1.2.143
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 +33 -154
- package/dist/constants/account-status.d.ts +3 -0
- package/dist/constants/account-status.js +17 -0
- package/dist/constants/collections.js +13 -11
- package/dist/constants/common-questions.js +4 -1
- package/dist/constants/index.js +32 -10
- package/dist/constants/job-filter-options.js +4 -1
- package/dist/constants/job-status.js +12 -7
- package/dist/constants/mappings/countryMapping.js +3 -1
- package/dist/constants/mappings/regionMapping.js +3 -1
- package/dist/constants/organization.d.ts +2 -2
- package/dist/constants/proxies.d.ts +4 -0
- package/dist/constants/routes.js +37 -39
- package/dist/constants/upwork-accounts.js +6 -3
- package/dist/constants/upwork-filters.d.ts +5 -0
- package/dist/constants/upwork-filters.js +75 -0
- package/dist/index.js +20 -4
- package/dist/schemas/account/account-status.js +5 -2
- package/dist/schemas/account/bidder-account.js +24 -22
- package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +5 -0
- package/dist/schemas/account/index.js +19 -3
- 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 +24 -21
- package/dist/schemas/ai/ai-config.js +11 -8
- package/dist/schemas/ai/index.js +19 -3
- package/dist/schemas/ai/proposal.js +13 -10
- package/dist/schemas/ai/suitability.js +11 -8
- 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-result.js +13 -9
- package/dist/schemas/bid/bid-status.d.ts +30 -0
- package/dist/schemas/bid/bid-status.js +15 -0
- package/dist/schemas/bid/bid.js +30 -29
- 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/bid/index.js +18 -2
- 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/bidding/proposal-dto.d.ts +26 -0
- package/dist/schemas/bidding/proposal-dto.js +18 -0
- package/dist/schemas/campaign/campaign-ai-metrics.js +8 -5
- package/dist/schemas/campaign/campaign-analytics.js +31 -32
- package/dist/schemas/campaign/campaign-expenses.js +8 -5
- package/dist/schemas/campaign/campaign-insights.js +30 -30
- package/dist/schemas/campaign/campaign-integrations.d.ts +0 -5
- package/dist/schemas/campaign/campaign-integrations.js +13 -10
- package/dist/schemas/campaign/campaign-job-count.js +6 -3
- package/dist/schemas/campaign/campaign.d.ts +10 -0
- package/dist/schemas/campaign/campaign.js +35 -32
- package/dist/schemas/campaign/index.js +23 -7
- package/dist/schemas/chat-message/chat-message.js +10 -7
- package/dist/schemas/chat-message/index.js +17 -1
- package/dist/schemas/config/agency-config.js +9 -6
- package/dist/schemas/config/index.js +17 -1
- package/dist/schemas/index.d.ts +0 -1
- package/dist/schemas/index.js +32 -17
- package/dist/schemas/job/feed-job.d.ts +866 -0
- package/dist/schemas/job/index.js +19 -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-pipeline.d.ts +74 -0
- package/dist/schemas/job/job-pipeline.js +29 -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-suitability.d.ts +12 -0
- package/dist/schemas/job/job-suitability.js +13 -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 +608 -0
- package/dist/schemas/job/pipeline-job.js +43 -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.js +17 -1
- package/dist/schemas/job-filters/job-filters.js +65 -62
- 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/lead/index.d.ts +895 -0
- package/dist/schemas/lead/index.js +19 -173
- package/dist/schemas/lead/lead-note.js +16 -13
- package/dist/schemas/lead/lead-status.js +6 -3
- package/dist/schemas/lead/lead.d.ts +1897 -0
- package/dist/schemas/lead/lead.js +143 -0
- package/dist/schemas/logger/index.js +17 -1
- package/dist/schemas/logger/log-event.js +49 -100
- package/dist/schemas/organization/index.d.ts +22 -16
- package/dist/schemas/organization/index.js +17 -70
- package/dist/schemas/organization/organization.d.ts +7 -177
- package/dist/schemas/organization/organization.js +17 -14
- package/dist/schemas/proxy/index.js +17 -3
- package/dist/schemas/proxy/proxy.js +19 -25
- package/dist/schemas/saved-search/index.js +11 -8
- package/dist/schemas/scraper/exceptions.d.ts +1 -6
- package/dist/schemas/scraper/index.js +18 -2
- package/dist/schemas/scraper/scrape-payload.js +14 -19
- package/dist/schemas/scraper/scrape-response.d.ts +345 -0
- package/dist/schemas/scraper/scrape-response.js +9 -0
- package/dist/schemas/scraper/scrape-result.js +21 -21
- package/dist/schemas/shared.js +9 -12
- package/dist/schemas/system/index.d.ts +1 -17
- package/dist/schemas/time-filter/index.js +8 -5
- 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-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 +90 -0
- package/dist/schemas/upwork-account/upwork-scraping-account.js +30 -0
- package/dist/schemas/user/index.js +41 -38
- package/dist/types/account/account-status.js +2 -1
- package/dist/types/account/bidder-account.js +2 -1
- package/dist/types/account/index.js +19 -3
- 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.js +2 -1
- package/dist/types/ai/ai-config.js +2 -1
- package/dist/types/ai/index.js +19 -3
- package/dist/types/ai/proposal.js +2 -1
- package/dist/types/ai/suitability.js +2 -1
- 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-result.js +2 -1
- package/dist/types/bid/bid-status.d.ts +5 -0
- package/dist/types/bid/bid-status.js +2 -0
- package/dist/types/bid/bid.js +2 -1
- package/dist/types/bid/index.js +18 -2
- 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/bidding/proposal-dto.d.ts +3 -0
- package/dist/types/bidding/proposal-dto.js +2 -0
- package/dist/types/campaign/campaign-analytics.js +2 -1
- package/dist/types/campaign/campaign-expenses.js +2 -1
- package/dist/types/campaign/campaign-insights.js +2 -1
- package/dist/types/campaign/campaign-integrations.js +2 -1
- package/dist/types/campaign/campaign-job-count.js +2 -1
- package/dist/types/campaign/campaign.js +2 -1
- package/dist/types/campaign/index.js +22 -6
- package/dist/types/chat-message/chat-message.js +2 -1
- package/dist/types/chat-message/index.js +17 -1
- package/dist/types/config/agency-config.js +2 -1
- package/dist/types/config/index.js +17 -1
- package/dist/types/index.js +29 -15
- package/dist/types/job/index.js +19 -3
- 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.js +2 -1
- package/dist/types/job/job-pipeline.d.ts +4 -0
- package/dist/types/job/job-pipeline.js +2 -0
- package/dist/types/job/job-status.js +4 -1
- package/dist/types/job/job-suitability.d.ts +3 -0
- package/dist/types/job/job-suitability.js +2 -0
- package/dist/types/job/job.d.ts +36 -0
- package/dist/types/job/job.js +2 -0
- package/dist/types/job-filters/index.js +17 -1
- package/dist/types/job-filters/job-filters.js +2 -1
- 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/logger/index.js +17 -1
- package/dist/types/logger/log-event.js +2 -1
- package/dist/types/saved-search/index.js +2 -1
- package/dist/types/scraper/index.js +18 -2
- package/dist/types/scraper/scrape-payload.js +2 -1
- package/dist/types/scraper/scrape-response.d.ts +4 -0
- package/dist/types/scraper/scrape-response.js +2 -0
- package/dist/types/scraper/scrape-result.js +2 -1
- package/dist/types/time-filter/index.js +2 -1
- 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/user/index.js +2 -1
- package/dist/utils/index.js +17 -1
- package/dist/utils/try-catch.js +23 -8
- package/package.json +1 -1
- package/dist/schemas/event/index.d.ts +0 -58
- package/dist/schemas/job/haha.json +0 -581
- package/dist/schemas/lead/nuxt.js +0 -287
- package/dist/schemas/meter-event/index.d.ts +0 -12
- package/dist/schemas/organization/member.js +0 -7
- package/dist/schemas/organization/subscription.js +0 -17
- package/dist/schemas/profile/index.d.ts +0 -2551
- package/dist/schemas/proxy/proxy-available-replacements.js +0 -3
- package/dist/schemas/proxy/proxy-country.js +0 -249
- package/dist/schemas/talent/index.d.ts +0 -1314
- package/dist/schemas/tier/index.d.ts +0 -119
- package/dist/schemas/transaction/index.js +0 -17
- package/dist/schemas/usage/index.js +0 -18
- package/dist/types/job/nuxt.js +0 -1
- package/dist/types/shared.js +0 -1
- package/dist/types/transaction/index.js +0 -1
- package/dist/types/usage/index.js +0 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -6532,7 +6532,7 @@ const ROUTES = {
|
|
|
6532
6532
|
BASE: (id) => `organizations/${id}/onboarding`,
|
|
6533
6533
|
PROGRESS: (id) => `organizations/${id}/onboarding/progress`,
|
|
6534
6534
|
},
|
|
6535
|
-
AI_CONFIG: (id) => `organizations/${id}/settings/ai-config`,
|
|
6535
|
+
AI_CONFIG: (id) => `organizations/${id}/settings/ai-config-v2`,
|
|
6536
6536
|
COVER_LETTER: {
|
|
6537
6537
|
BASE: (id) => `organizations/${id}/cover-letter`,
|
|
6538
6538
|
BY_ID: (id, coverLetterId) => `organizations/${id}/cover-letter/${coverLetterId}`,
|
|
@@ -12742,6 +12742,14 @@ const getCampaignLeadsRequestQuerySchema = z.object({
|
|
|
12742
12742
|
.enum(['all', 'suitable', 'contacted', 'viewed', 'replied'])
|
|
12743
12743
|
.optional(),
|
|
12744
12744
|
});
|
|
12745
|
+
const getCampaignLeadsResponseSchema = z.object({
|
|
12746
|
+
data: z.array(leadSchema),
|
|
12747
|
+
pagination: z.object({
|
|
12748
|
+
hasMore: booleanType(),
|
|
12749
|
+
nextCursor: z.string().nullable(),
|
|
12750
|
+
limit: z.number(),
|
|
12751
|
+
}),
|
|
12752
|
+
});
|
|
12745
12753
|
const generateLeadCountsRequestSchema = z.object({
|
|
12746
12754
|
filters: z.custom().optional(),
|
|
12747
12755
|
campaignId: z.string().optional(),
|
|
@@ -12836,8 +12844,8 @@ const onboardingProgressSchema = z.object({
|
|
|
12836
12844
|
startCampaign: z.boolean(),
|
|
12837
12845
|
});
|
|
12838
12846
|
|
|
12839
|
-
const organizationTypeSchema = z.enum([
|
|
12840
|
-
const organizationTierEnum = z.enum([
|
|
12847
|
+
const organizationTypeSchema = z.enum(['agency', 'freelancer']);
|
|
12848
|
+
const organizationTierEnum = z.enum(['free', 'premium']);
|
|
12841
12849
|
const limitsSchema = objectType({
|
|
12842
12850
|
monthlyCredits: numberType(),
|
|
12843
12851
|
usedCredits: numberType(),
|
|
@@ -12871,14 +12879,13 @@ const organizationSchema = objectType({
|
|
|
12871
12879
|
appTrialEndsAt: numberType().nullable(),
|
|
12872
12880
|
oneTimePayments: oneTimePaymentsSchema.optional(),
|
|
12873
12881
|
});
|
|
12874
|
-
const organizationUpdateSchema = objectType({ planId: stringType() });
|
|
12875
12882
|
const caseStudySchema = objectType({
|
|
12876
12883
|
id: stringType(),
|
|
12877
12884
|
title: stringType(),
|
|
12878
12885
|
description: stringType(),
|
|
12879
12886
|
});
|
|
12880
12887
|
z.object({
|
|
12881
|
-
type: z.enum([
|
|
12888
|
+
type: z.enum(['freelancer', 'agency']),
|
|
12882
12889
|
name: z.string(),
|
|
12883
12890
|
summary: z.string(),
|
|
12884
12891
|
coreServices: z.string(),
|
|
@@ -12899,9 +12906,9 @@ const createOrganizationSchema = organizationSchema.pick({
|
|
|
12899
12906
|
type: true,
|
|
12900
12907
|
});
|
|
12901
12908
|
const trackUsageEventTypeEnum = z.enum([
|
|
12902
|
-
|
|
12903
|
-
|
|
12904
|
-
|
|
12909
|
+
'suitabilityComplete',
|
|
12910
|
+
'proposalComplete',
|
|
12911
|
+
'biddingComplete',
|
|
12905
12912
|
]);
|
|
12906
12913
|
const trackUsagePayloadSchema = objectType({
|
|
12907
12914
|
event: usageEventTypeEnum,
|
|
@@ -12911,6 +12918,7 @@ const questionRulesSchema = objectType({
|
|
|
12911
12918
|
question: stringType(),
|
|
12912
12919
|
answer: stringType(),
|
|
12913
12920
|
category: stringType(),
|
|
12921
|
+
type: stringType(),
|
|
12914
12922
|
});
|
|
12915
12923
|
const aiConfigSchema = objectType({
|
|
12916
12924
|
questionHandling: z.string().nullable(),
|
|
@@ -12927,8 +12935,8 @@ const organizationSettingsSchema = objectType({
|
|
|
12927
12935
|
aiConfig: aiConfigSchema,
|
|
12928
12936
|
});
|
|
12929
12937
|
const subscribePayloadSchema = objectType({
|
|
12930
|
-
planId: stringType().min(1,
|
|
12931
|
-
paymentMethodId: stringType().min(1,
|
|
12938
|
+
planId: stringType().min(1, 'Plan id is required.'),
|
|
12939
|
+
paymentMethodId: stringType().min(1, 'Payment method is required.'),
|
|
12932
12940
|
toltReferral: stringType().optional(),
|
|
12933
12941
|
couponCode: stringType().nullish(),
|
|
12934
12942
|
});
|
|
@@ -12956,6 +12964,7 @@ const biddingHourlyRateStrategy = z.enum([
|
|
|
12956
12964
|
'match_profile_rate',
|
|
12957
12965
|
'fixed_rate',
|
|
12958
12966
|
]);
|
|
12967
|
+
const bidWithWarningEnum = z.enum(['bid', 'skip']);
|
|
12959
12968
|
const campaignSchema = z.object({
|
|
12960
12969
|
id: z.string(),
|
|
12961
12970
|
name: z.string(),
|
|
@@ -12973,6 +12982,7 @@ const campaignSchema = z.object({
|
|
|
12973
12982
|
biddingDelayInMinutes: z.number().default(5),
|
|
12974
12983
|
biddingHourlyRateStrategy: biddingHourlyRateStrategy,
|
|
12975
12984
|
biddingFixedHourlyRate: z.number().nullable(),
|
|
12985
|
+
bidWithWarning: bidWithWarningEnum,
|
|
12976
12986
|
leadCounts: z.record(leadStatusSchema, z.number()).nullable(),
|
|
12977
12987
|
expenses: campaignExpensesSchema,
|
|
12978
12988
|
notificationsEnabled: z.boolean().nullable(),
|
|
@@ -14003,8 +14013,8 @@ const upworkProfileSchema = objectType({
|
|
|
14003
14013
|
});
|
|
14004
14014
|
|
|
14005
14015
|
class NoScraperAccountAvailableException extends Error {
|
|
14006
|
-
code =
|
|
14007
|
-
constructor(message =
|
|
14016
|
+
code = 'NO_SCRAPER_ACCOUNT_AVAILABLE';
|
|
14017
|
+
constructor(message = 'No scraper account available.') {
|
|
14008
14018
|
super(message);
|
|
14009
14019
|
}
|
|
14010
14020
|
}
|
|
@@ -14012,8 +14022,8 @@ const noScraperAccountAvailableException = (message) => {
|
|
|
14012
14022
|
return new NoScraperAccountAvailableException(message);
|
|
14013
14023
|
};
|
|
14014
14024
|
class OpenPageException extends Error {
|
|
14015
|
-
code =
|
|
14016
|
-
constructor(message =
|
|
14025
|
+
code = 'OPEN_PAGE_FAILED';
|
|
14026
|
+
constructor(message = 'Failed to open page.') {
|
|
14017
14027
|
super(message);
|
|
14018
14028
|
}
|
|
14019
14029
|
}
|
|
@@ -14021,8 +14031,8 @@ const openPageException = (message) => {
|
|
|
14021
14031
|
return new OpenPageException(message);
|
|
14022
14032
|
};
|
|
14023
14033
|
class FeedScrapeException extends Error {
|
|
14024
|
-
code =
|
|
14025
|
-
constructor(message =
|
|
14034
|
+
code = 'FEED_SCRAPE_FAILED';
|
|
14035
|
+
constructor(message = 'Feed scrape failed.') {
|
|
14026
14036
|
super(message);
|
|
14027
14037
|
}
|
|
14028
14038
|
}
|
|
@@ -14030,8 +14040,8 @@ const feedScrapeException = (message) => {
|
|
|
14030
14040
|
return new FeedScrapeException(message);
|
|
14031
14041
|
};
|
|
14032
14042
|
class ParseJobListingsException extends Error {
|
|
14033
|
-
code =
|
|
14034
|
-
constructor(message =
|
|
14043
|
+
code = 'PARSE_JOB_LISTINGS_FAILED';
|
|
14044
|
+
constructor(message = 'Failed to parse job listings.') {
|
|
14035
14045
|
super(message);
|
|
14036
14046
|
}
|
|
14037
14047
|
}
|
|
@@ -14039,7 +14049,7 @@ const parseJobListingsException = (message) => {
|
|
|
14039
14049
|
return new ParseJobListingsException(message);
|
|
14040
14050
|
};
|
|
14041
14051
|
class ScrapeJobDetailsException extends Error {
|
|
14042
|
-
code =
|
|
14052
|
+
code = 'SCRAPE_JOB_DETAILS_FAILED';
|
|
14043
14053
|
constructor(jobListing) {
|
|
14044
14054
|
super(`Failed to scrape job details for ${JSON.stringify(jobListing)}.`);
|
|
14045
14055
|
}
|
|
@@ -14047,15 +14057,6 @@ class ScrapeJobDetailsException extends Error {
|
|
|
14047
14057
|
const scrapeJobDetailsException = (jobListing) => {
|
|
14048
14058
|
return new ScrapeJobDetailsException(jobListing);
|
|
14049
14059
|
};
|
|
14050
|
-
class ParseUpworkProfilesException extends Error {
|
|
14051
|
-
code = "PARSE_JOB_PROFILES_FAILED";
|
|
14052
|
-
constructor(message = "Failed to parse profiles.") {
|
|
14053
|
-
super(message);
|
|
14054
|
-
}
|
|
14055
|
-
}
|
|
14056
|
-
const parseUpworkProfilesException = (message) => {
|
|
14057
|
-
return new ParseUpworkProfilesException(message);
|
|
14058
|
-
};
|
|
14059
14060
|
class ScraperAccountProxyNotFoundException extends Error {
|
|
14060
14061
|
scraperAccountId;
|
|
14061
14062
|
proxyId;
|
|
@@ -14072,10 +14073,10 @@ const scraperAccountProxyNotFoundException = (scraperAccountId, proxyId, message
|
|
|
14072
14073
|
|
|
14073
14074
|
const systemPromptSchema = objectType({
|
|
14074
14075
|
suitability: stringType(),
|
|
14075
|
-
proposal:
|
|
14076
|
+
// proposal: string(),
|
|
14076
14077
|
proposalQuestions: stringType(),
|
|
14077
14078
|
proposalNoQuestions: stringType(),
|
|
14078
|
-
questionHandlingGuidelines:
|
|
14079
|
+
// questionHandlingGuidelines: string(),
|
|
14079
14080
|
});
|
|
14080
14081
|
const systemSchema = objectType({
|
|
14081
14082
|
prompts: systemPromptSchema,
|
|
@@ -14233,125 +14234,6 @@ const bidderInstanceSchema = objectType({
|
|
|
14233
14234
|
updatedAt: numberType(),
|
|
14234
14235
|
});
|
|
14235
14236
|
|
|
14236
|
-
const skillSchema = objectType({
|
|
14237
|
-
skill: objectType({
|
|
14238
|
-
prettyName: stringType(),
|
|
14239
|
-
uid: stringType(),
|
|
14240
|
-
}),
|
|
14241
|
-
uid: stringType(),
|
|
14242
|
-
});
|
|
14243
|
-
const portfolioItemSchema = objectType({
|
|
14244
|
-
description: stringType().nullable(),
|
|
14245
|
-
title: stringType(),
|
|
14246
|
-
videoUrl: stringType().nullable(),
|
|
14247
|
-
uid: stringType(),
|
|
14248
|
-
thumbnailUrl: stringType().nullable(),
|
|
14249
|
-
publicPortfolioItem: booleanType(),
|
|
14250
|
-
category: objectType({
|
|
14251
|
-
id: stringType().nullable(),
|
|
14252
|
-
level1: stringType().nullable(),
|
|
14253
|
-
level2: stringType().nullable(),
|
|
14254
|
-
}),
|
|
14255
|
-
});
|
|
14256
|
-
const profileSchema = objectType({
|
|
14257
|
-
title: stringType(),
|
|
14258
|
-
firstName: stringType(),
|
|
14259
|
-
lastName: stringType(),
|
|
14260
|
-
description: stringType(),
|
|
14261
|
-
location: objectType({
|
|
14262
|
-
country: stringType(),
|
|
14263
|
-
state: stringType().nullable(),
|
|
14264
|
-
city: stringType().nullable(),
|
|
14265
|
-
region: stringType(),
|
|
14266
|
-
subregion: stringType(),
|
|
14267
|
-
timezone: stringType(),
|
|
14268
|
-
zip: stringType().nullable(),
|
|
14269
|
-
}),
|
|
14270
|
-
chargeRate: objectType({
|
|
14271
|
-
rawValue: stringType(),
|
|
14272
|
-
currency: stringType(),
|
|
14273
|
-
}),
|
|
14274
|
-
portrait: objectType({
|
|
14275
|
-
portrait: stringType(),
|
|
14276
|
-
}),
|
|
14277
|
-
profileUrl: stringType(),
|
|
14278
|
-
offerConsultations: booleanType(),
|
|
14279
|
-
jobSummariesAssignmentRids: anyType().nullable(),
|
|
14280
|
-
shortName: stringType(),
|
|
14281
|
-
skills: arrayType(skillSchema),
|
|
14282
|
-
stats: objectType({
|
|
14283
|
-
hideJss: booleanType(),
|
|
14284
|
-
hideEarnings: booleanType(),
|
|
14285
|
-
topRatedStatus: stringType(),
|
|
14286
|
-
topRatedStatusEx: stringType(),
|
|
14287
|
-
rate: numberType(),
|
|
14288
|
-
earned: numberType(),
|
|
14289
|
-
jobSuccessScore: numberType(),
|
|
14290
|
-
rankInfo: anyType().nullable(),
|
|
14291
|
-
totalHours: numberType(),
|
|
14292
|
-
totalHourlyJobs: numberType(),
|
|
14293
|
-
totalFpJobs: numberType(),
|
|
14294
|
-
totalCompletedJobs: numberType(),
|
|
14295
|
-
}),
|
|
14296
|
-
portfolioItems: arrayType(portfolioItemSchema),
|
|
14297
|
-
totalPortfolioItems: numberType(),
|
|
14298
|
-
specializedProfiles: arrayType(anyType()),
|
|
14299
|
-
isDiversityCertified: booleanType(),
|
|
14300
|
-
isBoosted: booleanType(),
|
|
14301
|
-
boosted: booleanType(),
|
|
14302
|
-
boostedWouldHaveBeen: booleanType(),
|
|
14303
|
-
});
|
|
14304
|
-
const nuxtStateProfileSchema = objectType({
|
|
14305
|
-
identity: objectType({
|
|
14306
|
-
id: stringType(),
|
|
14307
|
-
ciphertext: stringType(),
|
|
14308
|
-
uid: stringType(),
|
|
14309
|
-
}),
|
|
14310
|
-
isPIBAvailable: booleanType(),
|
|
14311
|
-
profile: profileSchema,
|
|
14312
|
-
agency: objectType({
|
|
14313
|
-
orgId: stringType(),
|
|
14314
|
-
ciphertext: stringType(),
|
|
14315
|
-
name: stringType(),
|
|
14316
|
-
classifications: arrayType(anyType()),
|
|
14317
|
-
logo: stringType().nullable(),
|
|
14318
|
-
hideEarnings: booleanType(),
|
|
14319
|
-
totalEarnings: numberType(),
|
|
14320
|
-
isAgencyDiversityCertified: arrayType(anyType()),
|
|
14321
|
-
}),
|
|
14322
|
-
options: objectType({
|
|
14323
|
-
position: numberType(),
|
|
14324
|
-
}),
|
|
14325
|
-
});
|
|
14326
|
-
const nuxtStateProfilesSearchSchema = objectType({
|
|
14327
|
-
status: objectType({
|
|
14328
|
-
loading: booleanType(),
|
|
14329
|
-
loaded: booleanType(),
|
|
14330
|
-
failed: booleanType(),
|
|
14331
|
-
}),
|
|
14332
|
-
profiles: arrayType(nuxtStateProfileSchema),
|
|
14333
|
-
currentPage: numberType(),
|
|
14334
|
-
paging: objectType({
|
|
14335
|
-
total: numberType(),
|
|
14336
|
-
offset: numberType(),
|
|
14337
|
-
count: numberType(),
|
|
14338
|
-
originTotal: numberType(),
|
|
14339
|
-
pagesTotal: numberType(),
|
|
14340
|
-
page: numberType(),
|
|
14341
|
-
perPage: numberType(),
|
|
14342
|
-
}),
|
|
14343
|
-
flags: objectType({
|
|
14344
|
-
portfolioSearch: booleanType(),
|
|
14345
|
-
}),
|
|
14346
|
-
searchQueryCache: recordType(stringType()),
|
|
14347
|
-
"handle-response-data": recordType(anyType()),
|
|
14348
|
-
});
|
|
14349
|
-
const profileSearchNuxtStateSchema = objectType({
|
|
14350
|
-
state: objectType({
|
|
14351
|
-
profilesSearch: nuxtStateProfilesSearchSchema,
|
|
14352
|
-
}),
|
|
14353
|
-
});
|
|
14354
|
-
|
|
14355
14237
|
// Main wrapper function
|
|
14356
14238
|
async function tryCatch(promise) {
|
|
14357
14239
|
try {
|
|
@@ -14758,7 +14640,6 @@ exports.NoScraperAccountAvailableException = NoScraperAccountAvailableException;
|
|
|
14758
14640
|
exports.OpenPageException = OpenPageException;
|
|
14759
14641
|
exports.ParseConnectsException = ParseConnectsException;
|
|
14760
14642
|
exports.ParseJobListingsException = ParseJobListingsException;
|
|
14761
|
-
exports.ParseUpworkProfilesException = ParseUpworkProfilesException;
|
|
14762
14643
|
exports.ProposalErrorAlertException = ProposalErrorAlertException;
|
|
14763
14644
|
exports.ProposalFormWarningAlertException = ProposalFormWarningAlertException;
|
|
14764
14645
|
exports.ProposalGenerationFailedException = ProposalGenerationFailedException;
|
|
@@ -14794,6 +14675,7 @@ exports.bidPayloadProposalDataSchema = bidPayloadProposalDataSchema;
|
|
|
14794
14675
|
exports.bidPayloadSchema = bidPayloadSchema;
|
|
14795
14676
|
exports.bidRangeSchema = bidRangeSchema;
|
|
14796
14677
|
exports.bidSuccessSchema = bidSuccessSchema;
|
|
14678
|
+
exports.bidWithWarningEnum = bidWithWarningEnum;
|
|
14797
14679
|
exports.bidderAccountAgencySchema = bidderAccountAgencySchema;
|
|
14798
14680
|
exports.bidderAccountAlreadyConnectedException = bidderAccountAlreadyConnectedException;
|
|
14799
14681
|
exports.bidderAccountProvider = bidderAccountProvider;
|
|
@@ -14870,6 +14752,7 @@ exports.freelancerBidProposalDataSchema = freelancerBidProposalDataSchema;
|
|
|
14870
14752
|
exports.generateLeadCountsRequestSchema = generateLeadCountsRequestSchema;
|
|
14871
14753
|
exports.generateSlug = generateSlug;
|
|
14872
14754
|
exports.getCampaignLeadsRequestQuerySchema = getCampaignLeadsRequestQuerySchema;
|
|
14755
|
+
exports.getCampaignLeadsResponseSchema = getCampaignLeadsResponseSchema;
|
|
14873
14756
|
exports.getMultiloginBrowserException = getMultiloginBrowserException;
|
|
14874
14757
|
exports.getNextStatus = getNextStatus;
|
|
14875
14758
|
exports.getPreviousStatus = getPreviousStatus;
|
|
@@ -14931,7 +14814,6 @@ exports.notificationConfigSchema = notificationConfigSchema;
|
|
|
14931
14814
|
exports.nuxtStateJobDetailsSchema = nuxtStateJobDetailsSchema;
|
|
14932
14815
|
exports.nuxtStateJobSchema = nuxtStateJobSchema;
|
|
14933
14816
|
exports.nuxtStateJobsSearchSchema = nuxtStateJobsSearchSchema;
|
|
14934
|
-
exports.nuxtStateProfilesSearchSchema = nuxtStateProfilesSearchSchema;
|
|
14935
14817
|
exports.onboardingProgressSchema = onboardingProgressSchema;
|
|
14936
14818
|
exports.openPageException = openPageException;
|
|
14937
14819
|
exports.organizationCampaignStatsSchema = organizationCampaignStatsSchema;
|
|
@@ -14941,10 +14823,8 @@ exports.organizationSchema = organizationSchema;
|
|
|
14941
14823
|
exports.organizationSettingsSchema = organizationSettingsSchema;
|
|
14942
14824
|
exports.organizationTierEnum = organizationTierEnum;
|
|
14943
14825
|
exports.organizationTypeSchema = organizationTypeSchema;
|
|
14944
|
-
exports.organizationUpdateSchema = organizationUpdateSchema;
|
|
14945
14826
|
exports.parseConnectsException = parseConnectsException;
|
|
14946
14827
|
exports.parseJobListingsException = parseJobListingsException;
|
|
14947
|
-
exports.parseUpworkProfilesException = parseUpworkProfilesException;
|
|
14948
14828
|
exports.passwordSchema = passwordSchema;
|
|
14949
14829
|
exports.paymentTypeEnum = paymentTypeEnum;
|
|
14950
14830
|
exports.periodTypeSchema = periodTypeSchema;
|
|
@@ -14956,7 +14836,6 @@ exports.planStripeMetadataSchema = planStripeMetadataSchema;
|
|
|
14956
14836
|
exports.pluralize = pluralize;
|
|
14957
14837
|
exports.portfolioSchema = portfolioSchema;
|
|
14958
14838
|
exports.processFeedPayloadSchema = processFeedPayloadSchema;
|
|
14959
|
-
exports.profileSearchNuxtStateSchema = profileSearchNuxtStateSchema;
|
|
14960
14839
|
exports.projectDurationEnum = projectDurationEnum;
|
|
14961
14840
|
exports.proposalCompleteEventMetadataSchema = proposalCompleteEventMetadataSchema;
|
|
14962
14841
|
exports.proposalErrorAlertException = proposalErrorAlertException;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.accountStatusDisplayMap = exports.accountStatusOrder = void 0;
|
|
4
|
+
exports.accountStatusOrder = [
|
|
5
|
+
'verification_required',
|
|
6
|
+
'shadow_banned',
|
|
7
|
+
'healthy',
|
|
8
|
+
'banned',
|
|
9
|
+
'suspended',
|
|
10
|
+
];
|
|
11
|
+
exports.accountStatusDisplayMap = {
|
|
12
|
+
verification_required: 'Verification Required',
|
|
13
|
+
shadow_banned: 'Shadow Banned',
|
|
14
|
+
healthy: 'Healthy',
|
|
15
|
+
banned: 'Banned',
|
|
16
|
+
suspended: 'Suspended',
|
|
17
|
+
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COLLECTIONS = void 0;
|
|
1
4
|
// Base collection names
|
|
2
|
-
|
|
3
|
-
USERS:
|
|
4
|
-
SETTINGS:
|
|
5
|
-
CAMPAIGNS:
|
|
6
|
-
LEADS:
|
|
7
|
-
EVENTS:
|
|
8
|
-
SCRAPER_ACCOUNTS:
|
|
9
|
-
BIDDER_ACCOUNTS:
|
|
5
|
+
exports.COLLECTIONS = {
|
|
6
|
+
USERS: 'users',
|
|
7
|
+
SETTINGS: 'settings',
|
|
8
|
+
CAMPAIGNS: 'campaigns',
|
|
9
|
+
LEADS: 'leads',
|
|
10
|
+
EVENTS: 'events',
|
|
11
|
+
SCRAPER_ACCOUNTS: 'scrapers',
|
|
12
|
+
BIDDER_ACCOUNTS: 'bidders',
|
|
10
13
|
CAMPAIGN_ACTIVITIES: (userId, campaignId) => `users/${userId}/campaigns/${campaignId}/activities`,
|
|
11
|
-
ORGANIZATIONS:
|
|
12
|
-
PROXIES:
|
|
13
|
-
TRANSACTIONS: "transactions",
|
|
14
|
+
ORGANIZATIONS: 'organizations',
|
|
15
|
+
PROXIES: 'proxies',
|
|
14
16
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commonQuestions = void 0;
|
|
4
|
+
exports.commonQuestions = [
|
|
2
5
|
{
|
|
3
6
|
id: 'similar_experience',
|
|
4
7
|
question: 'Describe your recent experience with similar projects',
|
package/dist/constants/index.js
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.regionMapping = exports.countryMapping = exports.paths = void 0;
|
|
21
|
+
exports.paths = {
|
|
2
22
|
auth: {
|
|
3
23
|
register: `auth/register`,
|
|
4
24
|
},
|
|
@@ -7,12 +27,14 @@ export const paths = {
|
|
|
7
27
|
details: (id) => `users/${id}`,
|
|
8
28
|
},
|
|
9
29
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
__exportStar(require("./job-filter-options"), exports);
|
|
31
|
+
var countryMapping_1 = require("./mappings/countryMapping");
|
|
32
|
+
Object.defineProperty(exports, "countryMapping", { enumerable: true, get: function () { return __importDefault(countryMapping_1).default; } });
|
|
33
|
+
var regionMapping_1 = require("./mappings/regionMapping");
|
|
34
|
+
Object.defineProperty(exports, "regionMapping", { enumerable: true, get: function () { return __importDefault(regionMapping_1).default; } });
|
|
35
|
+
__exportStar(require("./job-filter-options"), exports);
|
|
36
|
+
__exportStar(require("./common-questions"), exports);
|
|
37
|
+
__exportStar(require("./job-status"), exports);
|
|
38
|
+
__exportStar(require("./routes"), exports);
|
|
39
|
+
__exportStar(require("./collections"), exports);
|
|
40
|
+
__exportStar(require("./upwork-accounts"), exports);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JOB_FILTER_OPTIONS = void 0;
|
|
4
|
+
exports.JOB_FILTER_OPTIONS = {
|
|
2
5
|
REGIONS: ["Worldwide", "UKOnly", "USOnly"],
|
|
3
6
|
PROJECT_DURATION: [
|
|
4
7
|
"Less than 1 month",
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNextStatus = exports.getPreviousStatus = exports.jobStatusOrder = void 0;
|
|
4
|
+
exports.jobStatusOrder = [
|
|
2
5
|
"leads",
|
|
3
6
|
"contacted",
|
|
4
7
|
"viewed",
|
|
@@ -7,15 +10,17 @@ export const jobStatusOrder = [
|
|
|
7
10
|
"won",
|
|
8
11
|
"lost",
|
|
9
12
|
];
|
|
10
|
-
|
|
13
|
+
const getPreviousStatus = (status) => {
|
|
11
14
|
if (status === "won")
|
|
12
15
|
return "negotiations";
|
|
13
16
|
if (status === "lost")
|
|
14
17
|
return "negotiations";
|
|
15
|
-
const index = jobStatusOrder.indexOf(status);
|
|
16
|
-
return index > 0 ? jobStatusOrder[index - 1] : null;
|
|
18
|
+
const index = exports.jobStatusOrder.indexOf(status);
|
|
19
|
+
return index > 0 ? exports.jobStatusOrder[index - 1] : null;
|
|
17
20
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
exports.getPreviousStatus = getPreviousStatus;
|
|
22
|
+
const getNextStatus = (status) => {
|
|
23
|
+
const index = exports.jobStatusOrder.indexOf(status);
|
|
24
|
+
return index < exports.jobStatusOrder.length - 1 ? exports.jobStatusOrder[index + 1] : null;
|
|
21
25
|
};
|
|
26
|
+
exports.getNextStatus = getNextStatus;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
3
|
const countryMapping = {
|
|
2
4
|
USA: "United States",
|
|
3
5
|
GBR: "United Kingdom",
|
|
@@ -117,4 +119,4 @@ const countryMapping = {
|
|
|
117
119
|
VCT: "Saint Vincent and the Grenadines",
|
|
118
120
|
VGB: "British Virgin Islands",
|
|
119
121
|
};
|
|
120
|
-
|
|
122
|
+
exports.default = countryMapping;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
3
|
const regionMapping = {
|
|
2
4
|
Africa: [
|
|
3
5
|
"Algeria",
|
|
@@ -237,4 +239,4 @@ const regionMapping = {
|
|
|
237
239
|
"Wallis and Futuna",
|
|
238
240
|
],
|
|
239
241
|
};
|
|
240
|
-
|
|
242
|
+
exports.default = regionMapping;
|
|
@@ -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;
|