lancer-shared 1.2.148 → 1.2.150
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 +151 -81
- 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.d.ts +38 -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/open-new-url.exception.d.ts +10 -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.d.ts +8 -0
- 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 +9 -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.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.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/feed/feed-chunk-enrich.d.ts +93 -0
- package/dist/schemas/logger/feed/feed-enrich.d.ts +87 -0
- package/dist/schemas/logger/feed/feed-job-enrich.d.ts +1624 -0
- package/dist/schemas/logger/feed/feed-scrape.d.ts +72 -0
- package/dist/schemas/logger/feed/index.d.ts +4 -0
- package/dist/schemas/logger/index.d.ts +1 -0
- package/dist/schemas/logger/index.js +17 -1
- package/dist/schemas/logger/log-event.d.ts +10 -10
- package/dist/schemas/logger/log-event.js +49 -100
- package/dist/schemas/logger/scraper-events.d.ts +13 -1553
- 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/index.js +18 -2
- package/dist/schemas/scraper/scrape-payload.d.ts +5 -0
- 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.d.ts +2 -2
- package/dist/schemas/scraper/scrape-result.js +21 -21
- package/dist/schemas/shared.js +9 -12
- 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
|
@@ -12982,6 +12982,7 @@ const campaignSchema = z.object({
|
|
|
12982
12982
|
biddingDelayInMinutes: z.number().default(5),
|
|
12983
12983
|
biddingHourlyRateStrategy: biddingHourlyRateStrategyEnum,
|
|
12984
12984
|
biddingFixedHourlyRate: z.number().nullable(),
|
|
12985
|
+
biddingHourlyRatePercentage: z.number().min(0).max(100).nullable(),
|
|
12985
12986
|
bidWithWarning: bidWithWarningEnum,
|
|
12986
12987
|
leadCounts: z.record(leadStatusSchema, z.number()).nullable(),
|
|
12987
12988
|
expenses: campaignExpensesSchema,
|
|
@@ -13257,8 +13258,10 @@ const bidPayloadProposalDataSchema = z.object({
|
|
|
13257
13258
|
boostingEnabled: z.boolean(),
|
|
13258
13259
|
maximumBoost: z.number().nullable(),
|
|
13259
13260
|
biddingHourlyRateStrategy: biddingHourlyRateStrategyEnum,
|
|
13261
|
+
biddingHourlyRatePercentage: z.number().min(0).max(100).nullable(),
|
|
13260
13262
|
biddingFixedHourlyRate: z.number().nullable(),
|
|
13261
13263
|
isHourlyRate: z.boolean(),
|
|
13264
|
+
jobMinHourlyRate: z.number().nullable(),
|
|
13262
13265
|
jobMaxHourlyRate: z.number().nullable(),
|
|
13263
13266
|
bidWithWarning: bidWithWarningEnum,
|
|
13264
13267
|
});
|
|
@@ -13454,6 +13457,20 @@ class GoToUrlException extends Error {
|
|
|
13454
13457
|
}
|
|
13455
13458
|
}
|
|
13456
13459
|
const goToUrlException = (url, message) => new GoToUrlException(url, message);
|
|
13460
|
+
class PageClosedException extends Error {
|
|
13461
|
+
code = 'PAGE_CLOSED_EXCEPTION';
|
|
13462
|
+
constructor() {
|
|
13463
|
+
super(`Page closed.`);
|
|
13464
|
+
}
|
|
13465
|
+
}
|
|
13466
|
+
const pageClosedException = () => new PageClosedException();
|
|
13467
|
+
class PageContentException extends Error {
|
|
13468
|
+
code = 'PAGE_CONTENT_EXCEPTION';
|
|
13469
|
+
constructor(url, message) {
|
|
13470
|
+
super(`Failed to get page content for: [${url}]. \n\n Reason: ${message}`);
|
|
13471
|
+
}
|
|
13472
|
+
}
|
|
13473
|
+
const pageContentException = (url, message) => new PageContentException(url, message);
|
|
13457
13474
|
|
|
13458
13475
|
class ParseConnectsException extends Error {
|
|
13459
13476
|
code = 'PARSE_CONNECTS_EXCEPTION';
|
|
@@ -13673,6 +13690,112 @@ const agentTaskResponseSchema = z.object({
|
|
|
13673
13690
|
completionTokens: z.number(),
|
|
13674
13691
|
});
|
|
13675
13692
|
|
|
13693
|
+
const feedEnrichStartedEventMetadata = objectType({
|
|
13694
|
+
id: stringType(),
|
|
13695
|
+
feedScrapeId: stringType(),
|
|
13696
|
+
region: regionSchema,
|
|
13697
|
+
accountIds: arrayType(stringType()),
|
|
13698
|
+
accountEmails: arrayType(stringType()),
|
|
13699
|
+
jobCount: numberType(),
|
|
13700
|
+
});
|
|
13701
|
+
const feedEnrichCompletedEventMetadata = feedEnrichStartedEventMetadata.extend({
|
|
13702
|
+
duration: stringType(),
|
|
13703
|
+
});
|
|
13704
|
+
const feedEnrichFailedEventMetadata = feedEnrichStartedEventMetadata.extend({
|
|
13705
|
+
errorMessage: stringType(),
|
|
13706
|
+
errorCode: stringType(),
|
|
13707
|
+
errorStack: stringType(),
|
|
13708
|
+
});
|
|
13709
|
+
|
|
13710
|
+
const feedChunkEnrichStartedEventMetadata = objectType({
|
|
13711
|
+
region: regionSchema,
|
|
13712
|
+
accountId: stringType(),
|
|
13713
|
+
accountEmail: stringType(),
|
|
13714
|
+
chunkSize: numberType(),
|
|
13715
|
+
feedEnrichId: stringType(),
|
|
13716
|
+
feedScrapeId: stringType(),
|
|
13717
|
+
});
|
|
13718
|
+
const feedChunkEnrichCompletedEventMetadata = feedChunkEnrichStartedEventMetadata
|
|
13719
|
+
.pick({
|
|
13720
|
+
region: true,
|
|
13721
|
+
accountId: true,
|
|
13722
|
+
accountEmail: true,
|
|
13723
|
+
chunkSize: true,
|
|
13724
|
+
feedEnrichId: true,
|
|
13725
|
+
feedScrapeId: true,
|
|
13726
|
+
})
|
|
13727
|
+
.extend({
|
|
13728
|
+
duration: stringType(),
|
|
13729
|
+
successfulEnrichJobCount: numberType(),
|
|
13730
|
+
failedEnrichJobCount: numberType(),
|
|
13731
|
+
});
|
|
13732
|
+
const feedChunkEnrichFailedEventMetadata = feedChunkEnrichStartedEventMetadata
|
|
13733
|
+
.pick({
|
|
13734
|
+
region: true,
|
|
13735
|
+
accountId: true,
|
|
13736
|
+
accountEmail: true,
|
|
13737
|
+
chunkSize: true,
|
|
13738
|
+
feedEnrichId: true,
|
|
13739
|
+
feedScrapeId: true,
|
|
13740
|
+
})
|
|
13741
|
+
.extend({
|
|
13742
|
+
errorMessage: stringType(),
|
|
13743
|
+
errorCode: stringType(),
|
|
13744
|
+
errorStack: stringType(),
|
|
13745
|
+
});
|
|
13746
|
+
|
|
13747
|
+
const feedJobEnrichStartedEventMetadata = objectType({
|
|
13748
|
+
listing: jobListingSchema,
|
|
13749
|
+
region: regionSchema,
|
|
13750
|
+
accountId: stringType(),
|
|
13751
|
+
accountEmail: stringType(),
|
|
13752
|
+
});
|
|
13753
|
+
const feedJobEnrichCompletedEventMetadata = feedJobEnrichStartedEventMetadata
|
|
13754
|
+
.pick({
|
|
13755
|
+
region: true,
|
|
13756
|
+
accountId: true,
|
|
13757
|
+
accountEmail: true,
|
|
13758
|
+
})
|
|
13759
|
+
.extend({
|
|
13760
|
+
job: upworkJobSchema,
|
|
13761
|
+
duration: stringType(),
|
|
13762
|
+
});
|
|
13763
|
+
const feedJobEnrichFailedEventMetadata = feedJobEnrichStartedEventMetadata.extend({
|
|
13764
|
+
errorMessage: stringType(),
|
|
13765
|
+
errorCode: stringType(),
|
|
13766
|
+
errorStack: stringType(),
|
|
13767
|
+
});
|
|
13768
|
+
|
|
13769
|
+
const feedScrapeStartedEventMetadata = objectType({
|
|
13770
|
+
id: stringType(),
|
|
13771
|
+
region: regionSchema,
|
|
13772
|
+
accountId: stringType(),
|
|
13773
|
+
accountEmail: stringType(),
|
|
13774
|
+
});
|
|
13775
|
+
const feedScrapeCompletedEventMetadata = feedScrapeStartedEventMetadata
|
|
13776
|
+
.pick({
|
|
13777
|
+
id: true,
|
|
13778
|
+
region: true,
|
|
13779
|
+
accountId: true,
|
|
13780
|
+
accountEmail: true,
|
|
13781
|
+
})
|
|
13782
|
+
.extend({
|
|
13783
|
+
feedJobCount: numberType(),
|
|
13784
|
+
duration: stringType(),
|
|
13785
|
+
});
|
|
13786
|
+
const feedScrapeFailedEventMetadata = feedScrapeStartedEventMetadata
|
|
13787
|
+
.pick({
|
|
13788
|
+
id: true,
|
|
13789
|
+
region: true,
|
|
13790
|
+
accountId: true,
|
|
13791
|
+
accountEmail: true,
|
|
13792
|
+
})
|
|
13793
|
+
.extend({
|
|
13794
|
+
errorMessage: stringType(),
|
|
13795
|
+
errorCode: stringType(),
|
|
13796
|
+
errorStack: stringType(),
|
|
13797
|
+
});
|
|
13798
|
+
|
|
13676
13799
|
const LogEventTypeEnum = z.enum([
|
|
13677
13800
|
// Lead Status Events
|
|
13678
13801
|
'leadStatusCheckFailed',
|
|
@@ -13715,15 +13838,18 @@ const LogEventTypeEnum = z.enum([
|
|
|
13715
13838
|
'leadArchived',
|
|
13716
13839
|
'auditTrailLogged',
|
|
13717
13840
|
// Scraper Events
|
|
13718
|
-
'
|
|
13719
|
-
'
|
|
13720
|
-
'
|
|
13841
|
+
'feedScrapeStarted',
|
|
13842
|
+
'feedScrapeCompleted',
|
|
13843
|
+
'feedScrapeFailed',
|
|
13844
|
+
'feedEnrichStarted',
|
|
13845
|
+
'feedEnrichCompleted',
|
|
13846
|
+
'feedEnrichFailed',
|
|
13721
13847
|
'feedJobEnrichStarted',
|
|
13722
|
-
'
|
|
13848
|
+
'feedJobEnrichCompleted',
|
|
13723
13849
|
'feedJobEnrichFailed',
|
|
13724
|
-
'
|
|
13725
|
-
'
|
|
13726
|
-
'
|
|
13850
|
+
'feedChunkEnrichStarted',
|
|
13851
|
+
'feedChunkEnrichCompleted',
|
|
13852
|
+
'feedChunkEnrichFailed',
|
|
13727
13853
|
'scrapeJobsCompleted',
|
|
13728
13854
|
'scraperAccountError',
|
|
13729
13855
|
]);
|
|
@@ -13830,77 +13956,14 @@ const eventLoggerPayloadSchema = unionType([
|
|
|
13830
13956
|
arrayType(logEventSchema),
|
|
13831
13957
|
]);
|
|
13832
13958
|
|
|
13833
|
-
const scrapeFeedStartedEventMetadata = objectType({
|
|
13834
|
-
region: regionSchema,
|
|
13835
|
-
accountId: stringType(),
|
|
13836
|
-
accountEmail: stringType(),
|
|
13837
|
-
});
|
|
13838
|
-
const scrapeFeedCompletedEventMetadata = objectType({
|
|
13839
|
-
region: regionSchema,
|
|
13840
|
-
accountId: stringType(),
|
|
13841
|
-
accountEmail: stringType(),
|
|
13842
|
-
listingsCount: numberType(),
|
|
13843
|
-
duration: stringType(),
|
|
13844
|
-
});
|
|
13845
|
-
const scrapeFeedFailedEventMetadata = objectType({
|
|
13846
|
-
region: regionSchema,
|
|
13847
|
-
accountId: stringType(),
|
|
13848
|
-
accountEmail: stringType(),
|
|
13849
|
-
errorMessage: stringType(),
|
|
13850
|
-
errorCode: stringType(),
|
|
13851
|
-
errorStack: stringType(),
|
|
13852
|
-
});
|
|
13853
|
-
const feedJobEnrichStartedEventMetadata = objectType({
|
|
13854
|
-
listing: jobListingSchema,
|
|
13855
|
-
region: regionSchema,
|
|
13856
|
-
accountId: stringType(),
|
|
13857
|
-
accountEmail: stringType(),
|
|
13858
|
-
});
|
|
13859
|
-
const jobScrapedEventMetadata = objectType({
|
|
13860
|
-
job: upworkJobSchema,
|
|
13861
|
-
region: regionSchema,
|
|
13862
|
-
duration: stringType(),
|
|
13863
|
-
});
|
|
13864
|
-
const feedJobEnrichFailedEventMetadata = objectType({
|
|
13865
|
-
listing: jobListingSchema,
|
|
13866
|
-
region: regionSchema,
|
|
13867
|
-
accountId: stringType(),
|
|
13868
|
-
accountEmail: stringType(),
|
|
13869
|
-
errorMessage: stringType(),
|
|
13870
|
-
errorCode: stringType(),
|
|
13871
|
-
errorStack: stringType(),
|
|
13872
|
-
});
|
|
13873
|
-
const feedJobChunkEnrichStartedEventMetadata = objectType({
|
|
13874
|
-
region: regionSchema,
|
|
13875
|
-
accountIds: arrayType(stringType()),
|
|
13876
|
-
accountEmails: arrayType(stringType()),
|
|
13877
|
-
jobListingsCount: numberType(),
|
|
13878
|
-
});
|
|
13879
|
-
const feedJobChunkEnrichCompletedEventMetadata = objectType({
|
|
13880
|
-
region: regionSchema,
|
|
13881
|
-
feedScraperAccountId: stringType(),
|
|
13882
|
-
feedScraperAccountEmail: stringType(),
|
|
13883
|
-
uniqueJobsFound: numberType(),
|
|
13884
|
-
duration: stringType(),
|
|
13885
|
-
enrichFeedJobSuccessCount: numberType(),
|
|
13886
|
-
enrichFeedJobFailCount: numberType(),
|
|
13887
|
-
});
|
|
13888
|
-
const feedJobChunkEnrichFailedEventMetadata = objectType({
|
|
13889
|
-
region: regionSchema,
|
|
13890
|
-
accountId: stringType(),
|
|
13891
|
-
accountEmail: stringType(),
|
|
13892
|
-
errorMessage: stringType(),
|
|
13893
|
-
errorCode: stringType(),
|
|
13894
|
-
errorStack: stringType(),
|
|
13895
|
-
});
|
|
13896
13959
|
const scrapeJobsCompletedEventMetadata = objectType({
|
|
13897
13960
|
region: regionSchema,
|
|
13898
13961
|
feedScraperAccountId: stringType(),
|
|
13899
13962
|
feedScraperAccountEmail: stringType(),
|
|
13900
13963
|
uniqueJobsFound: numberType(),
|
|
13901
13964
|
duration: stringType(),
|
|
13902
|
-
|
|
13903
|
-
|
|
13965
|
+
successfulEnrichJobCount: numberType(),
|
|
13966
|
+
failedEnrichJobCount: numberType(),
|
|
13904
13967
|
});
|
|
13905
13968
|
const jobActivityScrapedEventMetadata = objectType({
|
|
13906
13969
|
activity: jobActivitySchema,
|
|
@@ -13989,7 +14052,7 @@ const scrapeResultSchema = objectType({
|
|
|
13989
14052
|
usAccountCookies: arrayType(anyType()).optional(),
|
|
13990
14053
|
ukAccountCookies: arrayType(anyType()).optional(),
|
|
13991
14054
|
});
|
|
13992
|
-
const
|
|
14055
|
+
const feedScrapeResultSchema = objectType({
|
|
13993
14056
|
listings: arrayType(feedJobSchema),
|
|
13994
14057
|
region: regionSchema,
|
|
13995
14058
|
usAccountCookies: arrayType(anyType()).optional(),
|
|
@@ -14644,6 +14707,8 @@ exports.NoBidderAccountsAvailableException = NoBidderAccountsAvailableException;
|
|
|
14644
14707
|
exports.NoGoogleOAuthTokensFoundException = NoGoogleOAuthTokensFoundException;
|
|
14645
14708
|
exports.NoScraperAccountAvailableException = NoScraperAccountAvailableException;
|
|
14646
14709
|
exports.OpenPageException = OpenPageException;
|
|
14710
|
+
exports.PageClosedException = PageClosedException;
|
|
14711
|
+
exports.PageContentException = PageContentException;
|
|
14647
14712
|
exports.ParseConnectsException = ParseConnectsException;
|
|
14648
14713
|
exports.ParseJobListingsException = ParseJobListingsException;
|
|
14649
14714
|
exports.ProposalErrorAlertException = ProposalErrorAlertException;
|
|
@@ -14743,14 +14808,22 @@ exports.eventLoggerPayloadSchema = eventLoggerPayloadSchema;
|
|
|
14743
14808
|
exports.experienceLevelEnum = experienceLevelEnum;
|
|
14744
14809
|
exports.externalProxySchema = externalProxySchema;
|
|
14745
14810
|
exports.failedToParseNuxtJobException = failedToParseNuxtJobException;
|
|
14746
|
-
exports.
|
|
14747
|
-
exports.
|
|
14748
|
-
exports.
|
|
14811
|
+
exports.feedChunkEnrichCompletedEventMetadata = feedChunkEnrichCompletedEventMetadata;
|
|
14812
|
+
exports.feedChunkEnrichFailedEventMetadata = feedChunkEnrichFailedEventMetadata;
|
|
14813
|
+
exports.feedChunkEnrichStartedEventMetadata = feedChunkEnrichStartedEventMetadata;
|
|
14814
|
+
exports.feedEnrichCompletedEventMetadata = feedEnrichCompletedEventMetadata;
|
|
14815
|
+
exports.feedEnrichFailedEventMetadata = feedEnrichFailedEventMetadata;
|
|
14816
|
+
exports.feedEnrichStartedEventMetadata = feedEnrichStartedEventMetadata;
|
|
14817
|
+
exports.feedJobEnrichCompletedEventMetadata = feedJobEnrichCompletedEventMetadata;
|
|
14749
14818
|
exports.feedJobEnrichFailedEventMetadata = feedJobEnrichFailedEventMetadata;
|
|
14750
14819
|
exports.feedJobEnrichFailedException = feedJobEnrichFailedException;
|
|
14751
14820
|
exports.feedJobEnrichStartedEventMetadata = feedJobEnrichStartedEventMetadata;
|
|
14752
14821
|
exports.feedJobSchema = feedJobSchema;
|
|
14822
|
+
exports.feedScrapeCompletedEventMetadata = feedScrapeCompletedEventMetadata;
|
|
14753
14823
|
exports.feedScrapeException = feedScrapeException;
|
|
14824
|
+
exports.feedScrapeFailedEventMetadata = feedScrapeFailedEventMetadata;
|
|
14825
|
+
exports.feedScrapeResultSchema = feedScrapeResultSchema;
|
|
14826
|
+
exports.feedScrapeStartedEventMetadata = feedScrapeStartedEventMetadata;
|
|
14754
14827
|
exports.filterOptionItemSchema = filterOptionItemSchema;
|
|
14755
14828
|
exports.filterOptionsResponseSchema = filterOptionsResponseSchema;
|
|
14756
14829
|
exports.findLeadsRequestSchema = findLeadsRequestSchema;
|
|
@@ -14799,7 +14872,6 @@ exports.jobFiltersSchema = jobFiltersSchema;
|
|
|
14799
14872
|
exports.jobIsPrivateException = jobIsPrivateException;
|
|
14800
14873
|
exports.jobListingSchema = jobListingSchema;
|
|
14801
14874
|
exports.jobQualityScoreSchema = jobQualityScoreSchema;
|
|
14802
|
-
exports.jobScrapedEventMetadata = jobScrapedEventMetadata;
|
|
14803
14875
|
exports.jobSkillsSchema = jobSkillsSchema;
|
|
14804
14876
|
exports.jobStatusOrder = jobStatusOrder;
|
|
14805
14877
|
exports.lancerBiddingExceptionEventMetadata = lancerBiddingExceptionEventMetadata;
|
|
@@ -14834,6 +14906,8 @@ exports.organizationSchema = organizationSchema;
|
|
|
14834
14906
|
exports.organizationSettingsSchema = organizationSettingsSchema;
|
|
14835
14907
|
exports.organizationTierEnum = organizationTierEnum;
|
|
14836
14908
|
exports.organizationTypeSchema = organizationTypeSchema;
|
|
14909
|
+
exports.pageClosedException = pageClosedException;
|
|
14910
|
+
exports.pageContentException = pageContentException;
|
|
14837
14911
|
exports.parseConnectsException = parseConnectsException;
|
|
14838
14912
|
exports.parseJobListingsException = parseJobListingsException;
|
|
14839
14913
|
exports.passwordSchema = passwordSchema;
|
|
@@ -14874,10 +14948,6 @@ exports.registerSchema = registerSchema;
|
|
|
14874
14948
|
exports.requiredEarningsEnum = requiredEarningsEnum;
|
|
14875
14949
|
exports.requiredJSSEnum = requiredJSSEnum;
|
|
14876
14950
|
exports.savedSearchSchema = savedSearchSchema;
|
|
14877
|
-
exports.scrapeFeedCompletedEventMetadata = scrapeFeedCompletedEventMetadata;
|
|
14878
|
-
exports.scrapeFeedFailedEventMetadata = scrapeFeedFailedEventMetadata;
|
|
14879
|
-
exports.scrapeFeedResultSchema = scrapeFeedResultSchema;
|
|
14880
|
-
exports.scrapeFeedStartedEventMetadata = scrapeFeedStartedEventMetadata;
|
|
14881
14951
|
exports.scrapeJobActivityPayloadSchema = scrapeJobActivityPayloadSchema;
|
|
14882
14952
|
exports.scrapeJobPayloadSchema = scrapeJobPayloadSchema;
|
|
14883
14953
|
exports.scrapeJobsCompletedEventMetadata = scrapeJobsCompletedEventMetadata;
|
|
@@ -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;
|
package/dist/constants/routes.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildRoute = exports.ROUTES = void 0;
|
|
4
|
+
exports.ROUTES = {
|
|
2
5
|
AUTH: {
|
|
3
|
-
BASE:
|
|
4
|
-
REGISTER:
|
|
6
|
+
BASE: 'auth',
|
|
7
|
+
REGISTER: 'auth/register',
|
|
5
8
|
},
|
|
6
9
|
EVENTS: {
|
|
7
|
-
BASE:
|
|
10
|
+
BASE: 'events',
|
|
8
11
|
BY_ID: (id) => `events/${id}`,
|
|
9
12
|
},
|
|
10
13
|
CAMPAIGNS: {
|
|
11
|
-
BASE:
|
|
14
|
+
BASE: 'campaigns',
|
|
12
15
|
BY_ID: (id) => `campaigns/${id}`,
|
|
13
16
|
LEADS: {
|
|
14
17
|
BASE: (campaignId) => `campaigns/${campaignId}/leads`,
|
|
@@ -41,76 +44,71 @@ export const ROUTES = {
|
|
|
41
44
|
},
|
|
42
45
|
},
|
|
43
46
|
JOBS: {
|
|
44
|
-
BASE:
|
|
47
|
+
BASE: 'jobs',
|
|
45
48
|
BY_ID: (id) => `jobs/${id}`,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
TOTAL_JOBS: "jobs/total-jobs",
|
|
49
|
+
IMPORT: 'jobs/import',
|
|
50
|
+
FILTER_OPTIONS: 'jobs/filter-options',
|
|
51
|
+
TOTAL_JOBS: 'jobs/total-jobs',
|
|
50
52
|
GET_JOB_TITLE: (jobId) => `jobs/get-job-title/${jobId}`,
|
|
51
|
-
SEARCH:
|
|
53
|
+
SEARCH: 'jobs/search',
|
|
52
54
|
},
|
|
53
55
|
USERS: {
|
|
54
|
-
BASE:
|
|
56
|
+
BASE: 'users',
|
|
55
57
|
BY_ID: (id) => `users/${id}`,
|
|
56
58
|
},
|
|
57
59
|
AI_CONFIG: {
|
|
58
|
-
BASE:
|
|
59
|
-
GENERATE_KNOWLEDGE_BASE:
|
|
60
|
+
BASE: 'ai-config',
|
|
61
|
+
GENERATE_KNOWLEDGE_BASE: 'ai-config/generate-knowledge-base',
|
|
60
62
|
},
|
|
61
63
|
COOKIES: {
|
|
62
|
-
BASE:
|
|
63
|
-
SCRAPE:
|
|
64
|
+
BASE: 'cookies',
|
|
65
|
+
SCRAPE: 'cookies/scrape-cookies',
|
|
64
66
|
},
|
|
65
67
|
SCRAPING: {
|
|
66
|
-
BASE:
|
|
67
|
-
START_SCRAPING:
|
|
68
|
-
START_WORLDWIDE_SCRAPING:
|
|
69
|
-
START_US_SCRAPING:
|
|
70
|
-
START_UK_SCRAPING:
|
|
71
|
-
UPDATE_ACTIVITY_4H_WORLDWIDE:
|
|
72
|
-
UPDATE_ACTIVITY_4H_UK:
|
|
73
|
-
UPDATE_ACTIVITY_4H_US:
|
|
74
|
-
UPDATE_ACTIVITY_24H_WORLDWIDE:
|
|
75
|
-
UPDATE_ACTIVITY_24H_UK:
|
|
76
|
-
UPDATE_ACTIVITY_24H_US:
|
|
77
|
-
SCRAPE_FEED_WORLDWIDE: "scraping/feed-worldwide",
|
|
78
|
-
SCRAPE_FEED_UK: "scraping/feed-uk",
|
|
79
|
-
SCRAPE_FEED_US: "scraping/feed-us",
|
|
80
|
-
SCRAPE_JOB: "scraping/job",
|
|
81
|
-
SCRAPE_JOB_ACTIVITY: "scraping/job-activity",
|
|
68
|
+
BASE: 'scraping',
|
|
69
|
+
START_SCRAPING: 'scraping/start',
|
|
70
|
+
START_WORLDWIDE_SCRAPING: 'scraping/start-worldwide',
|
|
71
|
+
START_US_SCRAPING: 'scraping/start-us',
|
|
72
|
+
START_UK_SCRAPING: 'scraping/start-uk',
|
|
73
|
+
UPDATE_ACTIVITY_4H_WORLDWIDE: 'scraping/update-activity/4h',
|
|
74
|
+
UPDATE_ACTIVITY_4H_UK: 'scraping/update-activity/4h/uk',
|
|
75
|
+
UPDATE_ACTIVITY_4H_US: 'scraping/update-activity/4h/us',
|
|
76
|
+
UPDATE_ACTIVITY_24H_WORLDWIDE: 'scraping/update-activity/24h',
|
|
77
|
+
UPDATE_ACTIVITY_24H_UK: 'scraping/update-activity/24h/uk',
|
|
78
|
+
UPDATE_ACTIVITY_24H_US: 'scraping/update-activity/24h/us',
|
|
82
79
|
},
|
|
83
80
|
ADMIN: {
|
|
84
|
-
BASE:
|
|
81
|
+
BASE: 'admin',
|
|
85
82
|
BIDDER_ACCOUNTS: {
|
|
86
|
-
BASE:
|
|
83
|
+
BASE: 'admin/bidder-accounts',
|
|
87
84
|
BY_ID: (id) => `admin/bidder-accounts/${id}`,
|
|
88
85
|
BY_PROVIDER: (provider) => `admin/bidder-accounts/${provider}`,
|
|
89
86
|
BY_PROVIDER_AND_ID: (provider, id) => `admin/bidder-accounts/${provider}/${id}`,
|
|
90
87
|
},
|
|
91
88
|
SCRAPER_ACCOUNTS: {
|
|
92
|
-
BASE:
|
|
89
|
+
BASE: 'admin/scraper-accounts',
|
|
93
90
|
BY_ID: (id) => `admin/scraper-accounts/${id}`,
|
|
94
91
|
BY_PROVIDER: (provider) => `admin/scraper-accounts/${provider}`,
|
|
95
92
|
BY_PROVIDER_AND_ID: (provider, id) => `admin/scraper-accounts/${provider}/${id}`,
|
|
96
93
|
},
|
|
97
94
|
PROXIES: {
|
|
98
|
-
BASE:
|
|
95
|
+
BASE: 'admin/proxies',
|
|
99
96
|
BY_ID: (id) => `admin/proxies/${id}`,
|
|
100
97
|
REPLACE_PROXY: (id) => `admin/proxies/${id}/replace`,
|
|
101
|
-
SYNC:
|
|
98
|
+
SYNC: 'admin/proxies/sync',
|
|
102
99
|
},
|
|
103
100
|
},
|
|
104
101
|
BID: {
|
|
105
|
-
BASE:
|
|
102
|
+
BASE: 'bid',
|
|
106
103
|
BID_ON_JOB: (userId, campaignId, leadId) => `bid/${userId}/${campaignId}/${leadId}`,
|
|
107
104
|
},
|
|
108
105
|
};
|
|
109
106
|
// Helper function to build route with parameters
|
|
110
|
-
|
|
107
|
+
const buildRoute = (route, params = {}) => {
|
|
111
108
|
let builtRoute = route;
|
|
112
109
|
Object.entries(params).forEach(([key, value]) => {
|
|
113
110
|
builtRoute = builtRoute.replace(`:${key}`, value);
|
|
114
111
|
});
|
|
115
112
|
return builtRoute;
|
|
116
113
|
};
|
|
114
|
+
exports.buildRoute = buildRoute;
|