lancer-shared 1.2.106 → 1.2.107
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 +99 -74
- package/dist/constants/collections.js +11 -13
- package/dist/constants/common-questions.js +1 -4
- package/dist/constants/index.js +10 -32
- package/dist/constants/job-filter-options.js +1 -4
- package/dist/constants/job-status.js +7 -12
- package/dist/constants/mappings/countryMapping.js +1 -3
- package/dist/constants/mappings/regionMapping.js +1 -3
- package/dist/constants/organization.d.ts +2 -2
- package/dist/constants/routes.d.ts +6 -2
- package/dist/constants/routes.js +39 -37
- package/dist/constants/upwork-accounts.js +3 -6
- package/dist/index.js +4 -20
- package/dist/schemas/account/account-status.js +2 -5
- package/dist/schemas/account/bidder-account.d.ts +9 -2
- package/dist/schemas/account/bidder-account.js +22 -24
- package/dist/schemas/account/index.js +3 -19
- package/dist/schemas/account/scraper-account.js +21 -24
- package/dist/schemas/ai/ai-config.js +8 -11
- package/dist/schemas/ai/index.js +3 -19
- package/dist/schemas/ai/proposal.js +10 -13
- package/dist/schemas/ai/suitability.js +8 -11
- package/dist/schemas/bid/bid-result.js +9 -13
- package/dist/schemas/bid/bid.js +29 -30
- package/dist/schemas/bid/index.js +2 -18
- package/dist/schemas/campaign/campaign-ai-metrics.js +5 -8
- package/dist/schemas/campaign/campaign-analytics.js +32 -31
- package/dist/schemas/campaign/campaign-expenses.js +5 -8
- package/dist/schemas/campaign/campaign-insights.js +30 -30
- package/dist/schemas/campaign/campaign-integrations.d.ts +5 -0
- package/dist/schemas/campaign/campaign-integrations.js +10 -13
- package/dist/schemas/campaign/campaign-job-count.js +3 -6
- package/dist/schemas/campaign/campaign.js +32 -35
- package/dist/schemas/campaign/index.js +7 -23
- package/dist/schemas/chat-message/chat-message.js +7 -10
- package/dist/schemas/chat-message/index.js +1 -17
- package/dist/schemas/config/agency-config.js +6 -9
- package/dist/schemas/config/index.js +1 -17
- package/dist/schemas/event/index.d.ts +58 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +17 -32
- package/dist/schemas/infrastructure/index.d.ts +57 -0
- package/dist/schemas/job/haha.json +581 -0
- package/dist/schemas/job-filters/index.js +1 -17
- package/dist/schemas/job-filters/job-filters.js +62 -65
- package/dist/schemas/lead/index.js +173 -19
- package/dist/schemas/lead/lead-note.js +13 -16
- package/dist/schemas/lead/lead-status.js +3 -6
- package/dist/schemas/lead/nuxt.js +287 -0
- package/dist/schemas/logger/index.js +1 -17
- package/dist/schemas/logger/log-event.js +100 -49
- package/dist/schemas/meter-event/index.d.ts +12 -0
- package/dist/schemas/organization/index.js +70 -17
- package/dist/schemas/organization/member.js +7 -0
- package/dist/schemas/organization/organization.d.ts +177 -7
- package/dist/schemas/organization/organization.js +14 -17
- package/dist/schemas/organization/subscription.js +17 -0
- package/dist/schemas/proxy/index.js +3 -17
- package/dist/schemas/proxy/proxy-available-replacements.js +3 -0
- package/dist/schemas/proxy/proxy-country.js +249 -0
- package/dist/schemas/proxy/proxy.js +25 -19
- package/dist/schemas/saved-search/index.js +8 -11
- package/dist/schemas/scraper/index.js +2 -18
- package/dist/schemas/scraper/scrape-payload.d.ts +5 -0
- package/dist/schemas/scraper/scrape-payload.js +19 -14
- package/dist/schemas/scraper/scrape-result.js +21 -21
- package/dist/schemas/shared.js +12 -9
- package/dist/schemas/tier/index.d.ts +119 -0
- package/dist/schemas/time-filter/index.js +5 -8
- package/dist/schemas/transaction/index.js +17 -0
- package/dist/schemas/usage/index.js +18 -0
- package/dist/schemas/user/index.js +38 -41
- package/dist/types/account/account-status.js +1 -2
- package/dist/types/account/bidder-account.js +1 -2
- package/dist/types/account/index.js +3 -19
- package/dist/types/account/scraper-account.js +1 -2
- package/dist/types/ai/ai-config.js +1 -2
- package/dist/types/ai/index.js +3 -19
- package/dist/types/ai/proposal.js +1 -2
- package/dist/types/ai/suitability.js +1 -2
- package/dist/types/bid/bid-result.js +1 -2
- package/dist/types/bid/bid.js +1 -2
- package/dist/types/bid/index.js +2 -18
- package/dist/types/campaign/campaign-analytics.js +1 -2
- package/dist/types/campaign/campaign-expenses.js +1 -2
- package/dist/types/campaign/campaign-insights.js +1 -2
- package/dist/types/campaign/campaign-integrations.js +1 -2
- package/dist/types/campaign/campaign-job-count.js +1 -2
- package/dist/types/campaign/campaign.js +1 -2
- package/dist/types/campaign/index.js +6 -22
- package/dist/types/chat-message/chat-message.js +1 -2
- package/dist/types/chat-message/index.js +1 -17
- package/dist/types/config/agency-config.js +1 -2
- package/dist/types/config/index.js +1 -17
- package/dist/types/index.js +15 -29
- package/dist/types/job/index.js +3 -19
- package/dist/types/job/job-note.js +1 -2
- package/dist/types/job/job-status.js +1 -4
- package/dist/types/job/nuxt.js +1 -0
- package/dist/types/job-filters/index.js +1 -17
- package/dist/types/job-filters/job-filters.js +1 -2
- package/dist/types/logger/index.js +1 -17
- package/dist/types/logger/log-event.js +1 -2
- package/dist/types/saved-search/index.js +1 -2
- package/dist/types/scraper/index.js +2 -18
- package/dist/types/scraper/scrape-payload.js +1 -2
- package/dist/types/scraper/scrape-result.js +1 -2
- package/dist/types/shared.js +1 -0
- package/dist/types/time-filter/index.js +1 -2
- package/dist/types/transaction/index.js +1 -0
- package/dist/types/usage/index.js +1 -0
- package/dist/types/user/index.js +1 -2
- package/dist/utils/index.js +1 -17
- package/dist/utils/try-catch.js +8 -23
- package/package.json +1 -1
- package/dist/constants/account-status.d.ts +0 -3
- package/dist/constants/account-status.js +0 -17
- package/dist/constants/proxies.d.ts +0 -4
- package/dist/constants/upwork-filters.d.ts +0 -5
- package/dist/constants/upwork-filters.js +0 -75
- package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +0 -5
- package/dist/schemas/account/manager-account.d.ts +0 -116
- package/dist/schemas/account/manager-account.js +0 -38
- package/dist/schemas/ai-config/ai-config.d.ts +0 -39
- package/dist/schemas/ai-config/ai-config.js +0 -12
- package/dist/schemas/ai-config/index.d.ts +0 -1
- package/dist/schemas/ai-config/index.js +0 -17
- package/dist/schemas/bid/bid-status.d.ts +0 -30
- package/dist/schemas/bid/bid-status.js +0 -15
- package/dist/schemas/bid/exceptions/base-exception.d.ts +0 -4
- package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +0 -5
- package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +0 -5
- package/dist/schemas/bidding/index.d.ts +0 -1
- package/dist/schemas/bidding/index.js +0 -17
- package/dist/schemas/bidding/proposal-bidding-status.d.ts +0 -26
- package/dist/schemas/bidding/proposal-bidding-status.js +0 -18
- package/dist/schemas/bidding/proposal-dto.d.ts +0 -26
- package/dist/schemas/bidding/proposal-dto.js +0 -18
- package/dist/schemas/job/index.js +0 -19
- package/dist/schemas/job/job-details.d.ts +0 -335
- package/dist/schemas/job/job-details.js +0 -29
- package/dist/schemas/job/job-note.d.ts +0 -83
- package/dist/schemas/job/job-note.js +0 -30
- package/dist/schemas/job/job-pipeline.d.ts +0 -74
- package/dist/schemas/job/job-pipeline.js +0 -29
- package/dist/schemas/job/job-status.d.ts +0 -3
- package/dist/schemas/job/job-status.js +0 -27
- package/dist/schemas/job/job-suitability.d.ts +0 -12
- package/dist/schemas/job/job-suitability.js +0 -13
- package/dist/schemas/job/job.d.ts +0 -1160
- package/dist/schemas/job/job.js +0 -90
- package/dist/schemas/job/pipeline-job.d.ts +0 -608
- package/dist/schemas/job/pipeline-job.js +0 -43
- package/dist/schemas/job/upwork-job.d.ts +0 -334
- package/dist/schemas/job/upwork-job.js +0 -60
- package/dist/schemas/knowledge-object/index.d.ts +0 -1
- package/dist/schemas/knowledge-object/index.js +0 -17
- package/dist/schemas/knowledge-object/knowledge-object.d.ts +0 -128
- package/dist/schemas/knowledge-object/knowledge-object.js +0 -47
- package/dist/schemas/lead/lead.d.ts +0 -1897
- package/dist/schemas/lead/lead.js +0 -143
- package/dist/schemas/scraper/scrape-response.d.ts +0 -345
- package/dist/schemas/scraper/scrape-response.js +0 -9
- package/dist/schemas/upwork-account/index.d.ts +0 -3
- package/dist/schemas/upwork-account/index.js +0 -19
- package/dist/schemas/upwork-account/upwork-account-status.d.ts +0 -2
- package/dist/schemas/upwork-account/upwork-account-status.js +0 -11
- package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +0 -95
- package/dist/schemas/upwork-account/upwork-business-manager-account.js +0 -35
- package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +0 -92
- package/dist/schemas/upwork-account/upwork-scraper-account.js +0 -31
- package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +0 -90
- package/dist/schemas/upwork-account/upwork-scraping-account.js +0 -30
- package/dist/types/account/manager-account.d.ts +0 -7
- package/dist/types/account/manager-account.js +0 -2
- package/dist/types/ai-config/ai-config.d.ts +0 -6
- package/dist/types/ai-config/ai-config.js +0 -2
- package/dist/types/ai-config/index.d.ts +0 -1
- package/dist/types/ai-config/index.js +0 -17
- package/dist/types/bid/bid-status.d.ts +0 -5
- package/dist/types/bid/bid-status.js +0 -2
- package/dist/types/bidding/index.d.ts +0 -1
- package/dist/types/bidding/index.js +0 -17
- package/dist/types/bidding/proposal-bidding-status.d.ts +0 -3
- package/dist/types/bidding/proposal-bidding-status.js +0 -2
- package/dist/types/bidding/proposal-dto.d.ts +0 -3
- package/dist/types/bidding/proposal-dto.js +0 -2
- package/dist/types/job/job-details.d.ts +0 -36
- package/dist/types/job/job-details.js +0 -2
- package/dist/types/job/job-pipeline.d.ts +0 -4
- package/dist/types/job/job-pipeline.js +0 -2
- package/dist/types/job/job-suitability.d.ts +0 -3
- package/dist/types/job/job-suitability.js +0 -2
- package/dist/types/job/job.d.ts +0 -36
- package/dist/types/job/job.js +0 -2
- package/dist/types/knowledge-object/index.d.ts +0 -1
- package/dist/types/knowledge-object/index.js +0 -17
- package/dist/types/knowledge-object/knowledge-object.d.ts +0 -4
- package/dist/types/knowledge-object/knowledge-object.js +0 -2
- package/dist/types/scraper/scrape-response.d.ts +0 -4
- package/dist/types/scraper/scrape-response.js +0 -2
- package/dist/types/upwork-account/index.d.ts +0 -3
- package/dist/types/upwork-account/index.js +0 -19
- package/dist/types/upwork-account/upwork-account-status.d.ts +0 -3
- package/dist/types/upwork-account/upwork-account-status.js +0 -2
- package/dist/types/upwork-account/upwork-business-manager-account.d.ts +0 -7
- package/dist/types/upwork-account/upwork-business-manager-account.js +0 -2
- package/dist/types/upwork-account/upwork-scraping-account.d.ts +0 -5
- package/dist/types/upwork-account/upwork-scraping-account.js +0 -2
package/dist/bundle.cjs.js
CHANGED
|
@@ -6419,105 +6419,105 @@ var moment = /*@__PURE__*/getDefaultExportFromCjs(momentExports);
|
|
|
6419
6419
|
|
|
6420
6420
|
const ROUTES = {
|
|
6421
6421
|
AUTH: {
|
|
6422
|
-
BASE:
|
|
6423
|
-
REGISTER:
|
|
6422
|
+
BASE: "auth",
|
|
6423
|
+
REGISTER: "auth/register",
|
|
6424
6424
|
},
|
|
6425
6425
|
SYSTEM: {
|
|
6426
|
-
BASE:
|
|
6426
|
+
BASE: "system",
|
|
6427
6427
|
PROMPTS: {
|
|
6428
|
-
BASE:
|
|
6428
|
+
BASE: "system/prompts",
|
|
6429
6429
|
},
|
|
6430
6430
|
},
|
|
6431
6431
|
EVENTS: {
|
|
6432
|
-
BASE:
|
|
6432
|
+
BASE: "events",
|
|
6433
6433
|
BY_ID: (id) => `events/${id}`,
|
|
6434
6434
|
},
|
|
6435
6435
|
JOBS: {
|
|
6436
|
-
BASE:
|
|
6436
|
+
BASE: "jobs",
|
|
6437
6437
|
BY_ID: (id) => `jobs/${id}`,
|
|
6438
6438
|
UPDATE_ACTIVITY: `jobs/update-activity`,
|
|
6439
|
-
IMPORT:
|
|
6440
|
-
FILTER_OPTIONS:
|
|
6441
|
-
TOTAL_JOBS:
|
|
6439
|
+
IMPORT: "jobs/import",
|
|
6440
|
+
FILTER_OPTIONS: "jobs/filter-options",
|
|
6441
|
+
TOTAL_JOBS: "jobs/total-jobs",
|
|
6442
6442
|
GET_JOB_TITLE: (jobId) => `jobs/get-job-title/${jobId}`,
|
|
6443
|
-
GET_JOBS_COUNT:
|
|
6443
|
+
GET_JOBS_COUNT: "jobs/get-jobs-count",
|
|
6444
6444
|
},
|
|
6445
6445
|
USERS: {
|
|
6446
|
-
BASE:
|
|
6446
|
+
BASE: "users",
|
|
6447
6447
|
BY_ID: (id) => `users/${id}`,
|
|
6448
6448
|
ORGANIZATIONS: (id) => `users/${id}/organizations`,
|
|
6449
6449
|
},
|
|
6450
6450
|
COOKIES: {
|
|
6451
|
-
BASE:
|
|
6452
|
-
SCRAPE:
|
|
6451
|
+
BASE: "cookies",
|
|
6452
|
+
SCRAPE: "cookies/scrape-cookies",
|
|
6453
6453
|
},
|
|
6454
6454
|
SCRAPING: {
|
|
6455
|
-
BASE:
|
|
6456
|
-
START_SCRAPING:
|
|
6457
|
-
START_WORLDWIDE_SCRAPING:
|
|
6458
|
-
START_US_SCRAPING:
|
|
6459
|
-
START_UK_SCRAPING:
|
|
6460
|
-
UPDATE_ACTIVITY_4H_WORLDWIDE:
|
|
6461
|
-
UPDATE_ACTIVITY_4H_UK:
|
|
6462
|
-
UPDATE_ACTIVITY_4H_US:
|
|
6463
|
-
UPDATE_ACTIVITY_24H_WORLDWIDE:
|
|
6464
|
-
UPDATE_ACTIVITY_24H_UK:
|
|
6465
|
-
UPDATE_ACTIVITY_24H_US:
|
|
6466
|
-
SCRAPE_FEED_WORLDWIDE:
|
|
6467
|
-
SCRAPE_FEED_UK:
|
|
6468
|
-
SCRAPE_FEED_US:
|
|
6469
|
-
SCRAPE_JOB:
|
|
6470
|
-
PROCESS_FEED:
|
|
6471
|
-
SCRAPE_JOB_ACTIVITY:
|
|
6472
|
-
USER_PROFILE:
|
|
6473
|
-
CHECK_LEAD_STATUS:
|
|
6455
|
+
BASE: "scraping",
|
|
6456
|
+
START_SCRAPING: "scraping/start",
|
|
6457
|
+
START_WORLDWIDE_SCRAPING: "scraping/start-worldwide",
|
|
6458
|
+
START_US_SCRAPING: "scraping/start-us",
|
|
6459
|
+
START_UK_SCRAPING: "scraping/start-uk",
|
|
6460
|
+
UPDATE_ACTIVITY_4H_WORLDWIDE: "scraping/update-activity/4h",
|
|
6461
|
+
UPDATE_ACTIVITY_4H_UK: "scraping/update-activity/4h/uk",
|
|
6462
|
+
UPDATE_ACTIVITY_4H_US: "scraping/update-activity/4h/us",
|
|
6463
|
+
UPDATE_ACTIVITY_24H_WORLDWIDE: "scraping/update-activity/24h",
|
|
6464
|
+
UPDATE_ACTIVITY_24H_UK: "scraping/update-activity/24h/uk",
|
|
6465
|
+
UPDATE_ACTIVITY_24H_US: "scraping/update-activity/24h/us",
|
|
6466
|
+
SCRAPE_FEED_WORLDWIDE: "scraping/feed-worldwide",
|
|
6467
|
+
SCRAPE_FEED_UK: "scraping/feed-uk",
|
|
6468
|
+
SCRAPE_FEED_US: "scraping/feed-us",
|
|
6469
|
+
SCRAPE_JOB: "scraping/job",
|
|
6470
|
+
PROCESS_FEED: "scraping/process-feed",
|
|
6471
|
+
SCRAPE_JOB_ACTIVITY: "scraping/job-activity",
|
|
6472
|
+
USER_PROFILE: "scraping/user-profile",
|
|
6473
|
+
CHECK_LEAD_STATUS: "scraping/check-lead-status",
|
|
6474
6474
|
},
|
|
6475
6475
|
ADMIN: {
|
|
6476
|
-
BASE:
|
|
6476
|
+
BASE: "admin",
|
|
6477
6477
|
BIDDER_ACCOUNTS: {
|
|
6478
|
-
BASE:
|
|
6478
|
+
BASE: "admin/bidder-accounts",
|
|
6479
6479
|
BY_ID: (id) => `admin/bidder-accounts/${id}`,
|
|
6480
6480
|
BY_PROVIDER: (provider) => `admin/bidder-accounts/${provider}`,
|
|
6481
6481
|
BY_PROVIDER_AND_ID: (provider, id) => `admin/bidder-accounts/${provider}/${id}`,
|
|
6482
6482
|
},
|
|
6483
6483
|
SCRAPER_ACCOUNTS: {
|
|
6484
|
-
BASE:
|
|
6484
|
+
BASE: "admin/scraper-accounts",
|
|
6485
6485
|
BY_ID: (id) => `admin/scraper-accounts/${id}`,
|
|
6486
6486
|
BY_PROVIDER: (provider) => `admin/scraper-accounts/${provider}`,
|
|
6487
6487
|
BY_PROVIDER_AND_ID: (provider, id) => `admin/scraper-accounts/${provider}/${id}`,
|
|
6488
6488
|
},
|
|
6489
6489
|
PROXIES: {
|
|
6490
|
-
BASE:
|
|
6490
|
+
BASE: "admin/proxies",
|
|
6491
6491
|
BY_ID: (id) => `admin/proxies/${id}`,
|
|
6492
6492
|
REPLACE_PROXY: (id) => `admin/proxies/${id}/replace`,
|
|
6493
|
-
SYNC:
|
|
6494
|
-
AVAILABLE_REPLACEMENTS:
|
|
6495
|
-
AVAILABLE_COUNTRIES:
|
|
6493
|
+
SYNC: "admin/proxies/sync",
|
|
6494
|
+
AVAILABLE_REPLACEMENTS: "admin/proxies/available-replacements",
|
|
6495
|
+
AVAILABLE_COUNTRIES: "admin/proxies/available-countries",
|
|
6496
6496
|
},
|
|
6497
6497
|
DASHBOARD: {
|
|
6498
|
-
CAMPAIGN_STATS:
|
|
6498
|
+
CAMPAIGN_STATS: "admin/dashboard/campaign-stats",
|
|
6499
6499
|
},
|
|
6500
6500
|
ALERTS: {
|
|
6501
|
-
BASE:
|
|
6502
|
-
SEND_ALERT:
|
|
6501
|
+
BASE: "admin/alerts",
|
|
6502
|
+
SEND_ALERT: "admin/alerts/send",
|
|
6503
6503
|
},
|
|
6504
6504
|
AGENT: {
|
|
6505
|
-
BASE:
|
|
6506
|
-
TEST_JOB_QUALITY:
|
|
6507
|
-
TEST_SUITABILITY:
|
|
6508
|
-
TEST_PROPOSAL:
|
|
6505
|
+
BASE: "admin/agent",
|
|
6506
|
+
TEST_JOB_QUALITY: "admin/agent/test-job-quality",
|
|
6507
|
+
TEST_SUITABILITY: "admin/agent/test-suitability",
|
|
6508
|
+
TEST_PROPOSAL: "admin/agent/test-proposal",
|
|
6509
6509
|
},
|
|
6510
6510
|
},
|
|
6511
6511
|
BID: {
|
|
6512
|
-
BASE:
|
|
6512
|
+
BASE: "bid",
|
|
6513
6513
|
BID_ON_JOB: (userId, campaignId, leadId) => `bid/${userId}/${campaignId}/${leadId}`,
|
|
6514
6514
|
},
|
|
6515
6515
|
BIDDER_ACCOUNTS: {
|
|
6516
|
-
BASE:
|
|
6516
|
+
BASE: "bidder-accounts",
|
|
6517
6517
|
BY_ID: (id) => `bidder-accounts/${id}`,
|
|
6518
6518
|
},
|
|
6519
6519
|
ORGANIZATIONS: {
|
|
6520
|
-
BASE:
|
|
6520
|
+
BASE: "organizations",
|
|
6521
6521
|
BY_ID: (id) => `organizations/${id}`,
|
|
6522
6522
|
ONBOARDING: {
|
|
6523
6523
|
BASE: (id) => `organizations/${id}/onboarding`,
|
|
@@ -6570,8 +6570,8 @@ const ROUTES = {
|
|
|
6570
6570
|
BY_PLATFORM: (organizationId, campaignId, platform) => `organizations/${organizationId}/campaigns/${campaignId}/chat-bots/${platform}`,
|
|
6571
6571
|
OAUTH_URL: (organizationId, campaignId, platform) => `organizations/${organizationId}/campaigns/${campaignId}/chat-bots/${platform}/oauth-url`,
|
|
6572
6572
|
CALLBACK: (platform) => `chat-bots/${platform}/callback`,
|
|
6573
|
-
SEND_NOTIFICATION: () =>
|
|
6574
|
-
REMOVE_SUITABLE_LEAD_MESSAGE_BUTTONS: () =>
|
|
6573
|
+
SEND_NOTIFICATION: () => "chat-bots/send-notification",
|
|
6574
|
+
REMOVE_SUITABLE_LEAD_MESSAGE_BUTTONS: () => "chat-bots/remove-suitable-lead-message-buttons",
|
|
6575
6575
|
},
|
|
6576
6576
|
ACTIVITIES: {
|
|
6577
6577
|
BASE: (organizationId, campaignId) => `organizations/${organizationId}/campaigns/${campaignId}/activities`,
|
|
@@ -6582,26 +6582,26 @@ const ROUTES = {
|
|
|
6582
6582
|
USAGE_SUMMARIES: {
|
|
6583
6583
|
DAILY: {
|
|
6584
6584
|
BASE: (organizationId) => `usage-summaries/${organizationId}/daily`,
|
|
6585
|
-
BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/daily/${moment(date).format(
|
|
6585
|
+
BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/daily/${moment(date).format("YYYY-MM-DD")}`,
|
|
6586
6586
|
},
|
|
6587
6587
|
WEEKLY: {
|
|
6588
6588
|
BASE: (organizationId) => `usage-summaries/${organizationId}/weekly`,
|
|
6589
|
-
BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/weekly/${moment(date).format(
|
|
6589
|
+
BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/weekly/${moment(date).format("YYYY-WW")}`,
|
|
6590
6590
|
},
|
|
6591
6591
|
MONTHLY: {
|
|
6592
6592
|
BASE: (organizationId) => `usage-summaries/${organizationId}/monthly`,
|
|
6593
|
-
BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/monthly/${moment(date).format(
|
|
6593
|
+
BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/monthly/${moment(date).format("YYYY-MM")}`,
|
|
6594
6594
|
},
|
|
6595
6595
|
QUARTERLY: {
|
|
6596
6596
|
BASE: (organizationId) => `usage-summaries/${organizationId}/quarterly`,
|
|
6597
6597
|
BY_DATE: (organizationId, date) => {
|
|
6598
6598
|
const parsed = moment(date);
|
|
6599
|
-
return `usage-summaries/${organizationId}/quarterly/${parsed.format(
|
|
6599
|
+
return `usage-summaries/${organizationId}/quarterly/${parsed.format("YYYY")}-Q${parsed.quarter()}`;
|
|
6600
6600
|
},
|
|
6601
6601
|
},
|
|
6602
6602
|
YEARLY: {
|
|
6603
6603
|
BASE: (organizationId) => `usage-summaries/${organizationId}/yearly`,
|
|
6604
|
-
BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/yearly/${moment(date).format(
|
|
6604
|
+
BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/yearly/${moment(date).format("YYYY")}`,
|
|
6605
6605
|
},
|
|
6606
6606
|
},
|
|
6607
6607
|
INVOICES: {
|
|
@@ -6615,33 +6615,37 @@ const ROUTES = {
|
|
|
6615
6615
|
INVOICE_PREVIEW: (id) => `organizations/${id}/invoice-preview`,
|
|
6616
6616
|
},
|
|
6617
6617
|
TRANSACTIONS: {
|
|
6618
|
-
BASE:
|
|
6618
|
+
BASE: "transactions",
|
|
6619
6619
|
BY_ID: (id) => `transactions/${id}`,
|
|
6620
6620
|
},
|
|
6621
6621
|
AGENT: {
|
|
6622
|
-
BASE:
|
|
6623
|
-
SCRAPE_UPWORK_PROFILE:
|
|
6624
|
-
GENERATE_DEFAULT_AI_CONFIG:
|
|
6625
|
-
TEST_JOB_QUALITY:
|
|
6626
|
-
TEST_SUITABILITY:
|
|
6627
|
-
TEST_PROPOSAL:
|
|
6628
|
-
TEST_SYSTEM_PROMPTS:
|
|
6629
|
-
ANALYZE_LEAD:
|
|
6630
|
-
GENERATE_PROPOSAL:
|
|
6631
|
-
BID:
|
|
6622
|
+
BASE: "agent",
|
|
6623
|
+
SCRAPE_UPWORK_PROFILE: "agent/scrape-upwork-profile",
|
|
6624
|
+
GENERATE_DEFAULT_AI_CONFIG: "agent/generate-ai-config",
|
|
6625
|
+
TEST_JOB_QUALITY: "agent/test-job-quality",
|
|
6626
|
+
TEST_SUITABILITY: "agent/test-suitability",
|
|
6627
|
+
TEST_PROPOSAL: "agent/test-proposal",
|
|
6628
|
+
TEST_SYSTEM_PROMPTS: "agent/test-system-prompts",
|
|
6629
|
+
ANALYZE_LEAD: "agent/analyze-lead",
|
|
6630
|
+
GENERATE_PROPOSAL: "agent/generate-proposal",
|
|
6631
|
+
BID: "agent/bid",
|
|
6632
6632
|
},
|
|
6633
6633
|
PLANS: {
|
|
6634
|
-
BASE:
|
|
6634
|
+
BASE: "plans",
|
|
6635
6635
|
BY_ID: (id) => `plans/${id}`,
|
|
6636
6636
|
},
|
|
6637
6637
|
NOTIFICATIONS: {
|
|
6638
|
-
BASE:
|
|
6639
|
-
SEND_NOTIFICATION:
|
|
6638
|
+
BASE: "notifications",
|
|
6639
|
+
SEND_NOTIFICATION: "notifications/send",
|
|
6640
6640
|
},
|
|
6641
6641
|
USAGE_EVENTS: {
|
|
6642
|
-
BASE:
|
|
6642
|
+
BASE: "usage-events",
|
|
6643
6643
|
BY_ID: (id) => `usage-events/${id}`,
|
|
6644
6644
|
},
|
|
6645
|
+
BIDDER_INSTANCES: {
|
|
6646
|
+
BASE: "bidder-instances",
|
|
6647
|
+
BY_ID: (id) => `bidder-instances/${id}`,
|
|
6648
|
+
},
|
|
6645
6649
|
};
|
|
6646
6650
|
// Helper function to build route with parameters
|
|
6647
6651
|
const buildRoute = (route, params = {}) => {
|
|
@@ -6653,7 +6657,7 @@ const buildRoute = (route, params = {}) => {
|
|
|
6653
6657
|
};
|
|
6654
6658
|
// Helper function to get route without admin prefix
|
|
6655
6659
|
const getRouteWithoutAdminPrefix = (route) => {
|
|
6656
|
-
return route.replace(
|
|
6660
|
+
return route.replace("admin/", "");
|
|
6657
6661
|
};
|
|
6658
6662
|
|
|
6659
6663
|
const accountStatusOrder = [
|
|
@@ -11358,8 +11362,8 @@ const externalProxySchema = proxySchema.omit({
|
|
|
11358
11362
|
const proxyAvailableReplacementsSchema = z.record(proxyProviderSchema, z.number());
|
|
11359
11363
|
|
|
11360
11364
|
const bidderAccountProvider = z.enum([
|
|
11361
|
-
|
|
11362
|
-
|
|
11365
|
+
"user-provided",
|
|
11366
|
+
"lancer-provided",
|
|
11363
11367
|
]);
|
|
11364
11368
|
const bidderAccountAgencySchema = z.object({
|
|
11365
11369
|
name: z.string(),
|
|
@@ -11381,6 +11385,7 @@ const bidderAccountSchema = z.object({
|
|
|
11381
11385
|
profilePhotoUrl: z.string().nullable(),
|
|
11382
11386
|
name: z.string().nullable(),
|
|
11383
11387
|
agencies: z.array(bidderAccountAgencySchema).nullable(),
|
|
11388
|
+
instanceId: stringType().nullable(),
|
|
11384
11389
|
createdAt: z.number(),
|
|
11385
11390
|
updatedAt: z.number(),
|
|
11386
11391
|
});
|
|
@@ -13414,6 +13419,24 @@ const sendAlertPayloadSchema = z.object({
|
|
|
13414
13419
|
errorMessage: z.string(),
|
|
13415
13420
|
});
|
|
13416
13421
|
|
|
13422
|
+
const bidderInstanceGCPMetadata = objectType({
|
|
13423
|
+
instanceName: stringType(),
|
|
13424
|
+
machineType: stringType(),
|
|
13425
|
+
zone: stringType(),
|
|
13426
|
+
region: stringType(),
|
|
13427
|
+
});
|
|
13428
|
+
const bidderInstanceStatusEnum = z.enum(["available", "unavailable"]);
|
|
13429
|
+
const bidderInstanceSchema = objectType({
|
|
13430
|
+
id: stringType(),
|
|
13431
|
+
ipAddress: stringType(),
|
|
13432
|
+
domain: stringType().nullable(),
|
|
13433
|
+
bidderAccounts: arrayType(stringType()),
|
|
13434
|
+
gcp: bidderInstanceGCPMetadata,
|
|
13435
|
+
status: bidderInstanceStatusEnum,
|
|
13436
|
+
createdAt: numberType(),
|
|
13437
|
+
updatedAt: numberType(),
|
|
13438
|
+
});
|
|
13439
|
+
|
|
13417
13440
|
// Main wrapper function
|
|
13418
13441
|
async function tryCatch(promise) {
|
|
13419
13442
|
try {
|
|
@@ -13833,6 +13856,8 @@ exports.bidderAccountAlreadyConnectedException = bidderAccountAlreadyConnectedEx
|
|
|
13833
13856
|
exports.bidderAccountProvider = bidderAccountProvider;
|
|
13834
13857
|
exports.bidderAccountProviderDisplayMap = bidderAccountProviderDisplayMap;
|
|
13835
13858
|
exports.bidderAccountSchema = bidderAccountSchema;
|
|
13859
|
+
exports.bidderInstanceSchema = bidderInstanceSchema;
|
|
13860
|
+
exports.bidderInstanceStatusEnum = bidderInstanceStatusEnum;
|
|
13836
13861
|
exports.biddingCompletedEventMetadata = biddingCompletedEventMetadata;
|
|
13837
13862
|
exports.biddingFailedEventMetadata = biddingFailedEventMetadata;
|
|
13838
13863
|
exports.biddingRejectedWithFeedbackEventMetadata = biddingRejectedWithFeedbackEventMetadata;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.COLLECTIONS = void 0;
|
|
4
1
|
// Base collection names
|
|
5
|
-
|
|
6
|
-
USERS:
|
|
7
|
-
SETTINGS:
|
|
8
|
-
CAMPAIGNS:
|
|
9
|
-
LEADS:
|
|
10
|
-
EVENTS:
|
|
11
|
-
SCRAPER_ACCOUNTS:
|
|
12
|
-
BIDDER_ACCOUNTS:
|
|
2
|
+
export const COLLECTIONS = {
|
|
3
|
+
USERS: "users",
|
|
4
|
+
SETTINGS: "settings",
|
|
5
|
+
CAMPAIGNS: "campaigns",
|
|
6
|
+
LEADS: "leads",
|
|
7
|
+
EVENTS: "events",
|
|
8
|
+
SCRAPER_ACCOUNTS: "scrapers",
|
|
9
|
+
BIDDER_ACCOUNTS: "bidders",
|
|
13
10
|
CAMPAIGN_ACTIVITIES: (userId, campaignId) => `users/${userId}/campaigns/${campaignId}/activities`,
|
|
14
|
-
ORGANIZATIONS:
|
|
15
|
-
PROXIES:
|
|
11
|
+
ORGANIZATIONS: "organizations",
|
|
12
|
+
PROXIES: "proxies",
|
|
13
|
+
TRANSACTIONS: "transactions",
|
|
16
14
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.commonQuestions = void 0;
|
|
4
|
-
exports.commonQuestions = [
|
|
1
|
+
export const commonQuestions = [
|
|
5
2
|
{
|
|
6
3
|
id: 'similar_experience',
|
|
7
4
|
question: 'Describe your recent experience with similar projects',
|
package/dist/constants/index.js
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
|
|
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 = {
|
|
1
|
+
export const paths = {
|
|
22
2
|
auth: {
|
|
23
3
|
register: `auth/register`,
|
|
24
4
|
},
|
|
@@ -27,14 +7,12 @@ exports.paths = {
|
|
|
27
7
|
details: (id) => `users/${id}`,
|
|
28
8
|
},
|
|
29
9
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
__exportStar(require("./collections"), exports);
|
|
40
|
-
__exportStar(require("./upwork-accounts"), exports);
|
|
10
|
+
export * from './job-filter-options';
|
|
11
|
+
export { default as countryMapping } from './mappings/countryMapping';
|
|
12
|
+
export { default as regionMapping } from './mappings/regionMapping';
|
|
13
|
+
export * from './job-filter-options';
|
|
14
|
+
export * from './common-questions';
|
|
15
|
+
export * from './job-status';
|
|
16
|
+
export * from './routes';
|
|
17
|
+
export * from './collections';
|
|
18
|
+
export * from './upwork-accounts';
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JOB_FILTER_OPTIONS = void 0;
|
|
4
|
-
exports.JOB_FILTER_OPTIONS = {
|
|
1
|
+
export const JOB_FILTER_OPTIONS = {
|
|
5
2
|
REGIONS: ["Worldwide", "UKOnly", "USOnly"],
|
|
6
3
|
PROJECT_DURATION: [
|
|
7
4
|
"Less than 1 month",
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNextStatus = exports.getPreviousStatus = exports.jobStatusOrder = void 0;
|
|
4
|
-
exports.jobStatusOrder = [
|
|
1
|
+
export const jobStatusOrder = [
|
|
5
2
|
"leads",
|
|
6
3
|
"contacted",
|
|
7
4
|
"viewed",
|
|
@@ -10,17 +7,15 @@ exports.jobStatusOrder = [
|
|
|
10
7
|
"won",
|
|
11
8
|
"lost",
|
|
12
9
|
];
|
|
13
|
-
const getPreviousStatus = (status) => {
|
|
10
|
+
export const getPreviousStatus = (status) => {
|
|
14
11
|
if (status === "won")
|
|
15
12
|
return "negotiations";
|
|
16
13
|
if (status === "lost")
|
|
17
14
|
return "negotiations";
|
|
18
|
-
const index =
|
|
19
|
-
return index > 0 ?
|
|
15
|
+
const index = jobStatusOrder.indexOf(status);
|
|
16
|
+
return index > 0 ? jobStatusOrder[index - 1] : null;
|
|
20
17
|
};
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
return index < exports.jobStatusOrder.length - 1 ? exports.jobStatusOrder[index + 1] : null;
|
|
18
|
+
export const getNextStatus = (status) => {
|
|
19
|
+
const index = jobStatusOrder.indexOf(status);
|
|
20
|
+
return index < jobStatusOrder.length - 1 ? jobStatusOrder[index + 1] : null;
|
|
25
21
|
};
|
|
26
|
-
exports.getNextStatus = getNextStatus;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
const countryMapping = {
|
|
4
2
|
USA: "United States",
|
|
5
3
|
GBR: "United Kingdom",
|
|
@@ -119,4 +117,4 @@ const countryMapping = {
|
|
|
119
117
|
VCT: "Saint Vincent and the Grenadines",
|
|
120
118
|
VGB: "British Virgin Islands",
|
|
121
119
|
};
|
|
122
|
-
|
|
120
|
+
export default countryMapping;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
const regionMapping = {
|
|
4
2
|
Africa: [
|
|
5
3
|
"Algeria",
|
|
@@ -239,4 +237,4 @@ const regionMapping = {
|
|
|
239
237
|
"Wallis and Futuna",
|
|
240
238
|
],
|
|
241
239
|
};
|
|
242
|
-
|
|
240
|
+
export default regionMapping;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const creditDeductionAmountMap: Record<
|
|
1
|
+
import { TrackUsageEventType } from "../schemas";
|
|
2
|
+
export declare const creditDeductionAmountMap: Record<TrackUsageEventType, number>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Moment } from
|
|
2
|
-
import { ChatbotPlatform } from
|
|
1
|
+
import { Moment } from "moment";
|
|
2
|
+
import { ChatbotPlatform } from "../schemas/campaign/campaign-chat-bot";
|
|
3
3
|
export declare const ROUTES: {
|
|
4
4
|
readonly AUTH: {
|
|
5
5
|
readonly BASE: "auth";
|
|
@@ -222,6 +222,10 @@ export declare const ROUTES: {
|
|
|
222
222
|
readonly BASE: "usage-events";
|
|
223
223
|
readonly BY_ID: (id: string) => string;
|
|
224
224
|
};
|
|
225
|
+
readonly BIDDER_INSTANCES: {
|
|
226
|
+
readonly BASE: "bidder-instances";
|
|
227
|
+
readonly BY_ID: (id: string) => string;
|
|
228
|
+
};
|
|
225
229
|
};
|
|
226
230
|
export type RouteParams = {
|
|
227
231
|
id?: string;
|
package/dist/constants/routes.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildRoute = exports.ROUTES = void 0;
|
|
4
|
-
exports.ROUTES = {
|
|
1
|
+
export const ROUTES = {
|
|
5
2
|
AUTH: {
|
|
6
|
-
BASE:
|
|
7
|
-
REGISTER:
|
|
3
|
+
BASE: "auth",
|
|
4
|
+
REGISTER: "auth/register",
|
|
8
5
|
},
|
|
9
6
|
EVENTS: {
|
|
10
|
-
BASE:
|
|
7
|
+
BASE: "events",
|
|
11
8
|
BY_ID: (id) => `events/${id}`,
|
|
12
9
|
},
|
|
13
10
|
CAMPAIGNS: {
|
|
14
|
-
BASE:
|
|
11
|
+
BASE: "campaigns",
|
|
15
12
|
BY_ID: (id) => `campaigns/${id}`,
|
|
16
13
|
LEADS: {
|
|
17
14
|
BASE: (campaignId) => `campaigns/${campaignId}/leads`,
|
|
@@ -44,71 +41,76 @@ exports.ROUTES = {
|
|
|
44
41
|
},
|
|
45
42
|
},
|
|
46
43
|
JOBS: {
|
|
47
|
-
BASE:
|
|
44
|
+
BASE: "jobs",
|
|
48
45
|
BY_ID: (id) => `jobs/${id}`,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
BY_URL: (url) => `jobs/${encodeURIComponent(url)}`,
|
|
47
|
+
IMPORT: "jobs/import",
|
|
48
|
+
FILTER_OPTIONS: "jobs/filter-options",
|
|
49
|
+
TOTAL_JOBS: "jobs/total-jobs",
|
|
52
50
|
GET_JOB_TITLE: (jobId) => `jobs/get-job-title/${jobId}`,
|
|
53
|
-
SEARCH:
|
|
51
|
+
SEARCH: "jobs/search",
|
|
54
52
|
},
|
|
55
53
|
USERS: {
|
|
56
|
-
BASE:
|
|
54
|
+
BASE: "users",
|
|
57
55
|
BY_ID: (id) => `users/${id}`,
|
|
58
56
|
},
|
|
59
57
|
AI_CONFIG: {
|
|
60
|
-
BASE:
|
|
61
|
-
GENERATE_KNOWLEDGE_BASE:
|
|
58
|
+
BASE: "ai-config",
|
|
59
|
+
GENERATE_KNOWLEDGE_BASE: "ai-config/generate-knowledge-base",
|
|
62
60
|
},
|
|
63
61
|
COOKIES: {
|
|
64
|
-
BASE:
|
|
65
|
-
SCRAPE:
|
|
62
|
+
BASE: "cookies",
|
|
63
|
+
SCRAPE: "cookies/scrape-cookies",
|
|
66
64
|
},
|
|
67
65
|
SCRAPING: {
|
|
68
|
-
BASE:
|
|
69
|
-
START_SCRAPING:
|
|
70
|
-
START_WORLDWIDE_SCRAPING:
|
|
71
|
-
START_US_SCRAPING:
|
|
72
|
-
START_UK_SCRAPING:
|
|
73
|
-
UPDATE_ACTIVITY_4H_WORLDWIDE:
|
|
74
|
-
UPDATE_ACTIVITY_4H_UK:
|
|
75
|
-
UPDATE_ACTIVITY_4H_US:
|
|
76
|
-
UPDATE_ACTIVITY_24H_WORLDWIDE:
|
|
77
|
-
UPDATE_ACTIVITY_24H_UK:
|
|
78
|
-
UPDATE_ACTIVITY_24H_US:
|
|
66
|
+
BASE: "scraping",
|
|
67
|
+
START_SCRAPING: "scraping/start",
|
|
68
|
+
START_WORLDWIDE_SCRAPING: "scraping/start-worldwide",
|
|
69
|
+
START_US_SCRAPING: "scraping/start-us",
|
|
70
|
+
START_UK_SCRAPING: "scraping/start-uk",
|
|
71
|
+
UPDATE_ACTIVITY_4H_WORLDWIDE: "scraping/update-activity/4h",
|
|
72
|
+
UPDATE_ACTIVITY_4H_UK: "scraping/update-activity/4h/uk",
|
|
73
|
+
UPDATE_ACTIVITY_4H_US: "scraping/update-activity/4h/us",
|
|
74
|
+
UPDATE_ACTIVITY_24H_WORLDWIDE: "scraping/update-activity/24h",
|
|
75
|
+
UPDATE_ACTIVITY_24H_UK: "scraping/update-activity/24h/uk",
|
|
76
|
+
UPDATE_ACTIVITY_24H_US: "scraping/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",
|
|
79
82
|
},
|
|
80
83
|
ADMIN: {
|
|
81
|
-
BASE:
|
|
84
|
+
BASE: "admin",
|
|
82
85
|
BIDDER_ACCOUNTS: {
|
|
83
|
-
BASE:
|
|
86
|
+
BASE: "admin/bidder-accounts",
|
|
84
87
|
BY_ID: (id) => `admin/bidder-accounts/${id}`,
|
|
85
88
|
BY_PROVIDER: (provider) => `admin/bidder-accounts/${provider}`,
|
|
86
89
|
BY_PROVIDER_AND_ID: (provider, id) => `admin/bidder-accounts/${provider}/${id}`,
|
|
87
90
|
},
|
|
88
91
|
SCRAPER_ACCOUNTS: {
|
|
89
|
-
BASE:
|
|
92
|
+
BASE: "admin/scraper-accounts",
|
|
90
93
|
BY_ID: (id) => `admin/scraper-accounts/${id}`,
|
|
91
94
|
BY_PROVIDER: (provider) => `admin/scraper-accounts/${provider}`,
|
|
92
95
|
BY_PROVIDER_AND_ID: (provider, id) => `admin/scraper-accounts/${provider}/${id}`,
|
|
93
96
|
},
|
|
94
97
|
PROXIES: {
|
|
95
|
-
BASE:
|
|
98
|
+
BASE: "admin/proxies",
|
|
96
99
|
BY_ID: (id) => `admin/proxies/${id}`,
|
|
97
100
|
REPLACE_PROXY: (id) => `admin/proxies/${id}/replace`,
|
|
98
|
-
SYNC:
|
|
101
|
+
SYNC: "admin/proxies/sync",
|
|
99
102
|
},
|
|
100
103
|
},
|
|
101
104
|
BID: {
|
|
102
|
-
BASE:
|
|
105
|
+
BASE: "bid",
|
|
103
106
|
BID_ON_JOB: (userId, campaignId, leadId) => `bid/${userId}/${campaignId}/${leadId}`,
|
|
104
107
|
},
|
|
105
108
|
};
|
|
106
109
|
// Helper function to build route with parameters
|
|
107
|
-
const buildRoute = (route, params = {}) => {
|
|
110
|
+
export const buildRoute = (route, params = {}) => {
|
|
108
111
|
let builtRoute = route;
|
|
109
112
|
Object.entries(params).forEach(([key, value]) => {
|
|
110
113
|
builtRoute = builtRoute.replace(`:${key}`, value);
|
|
111
114
|
});
|
|
112
115
|
return builtRoute;
|
|
113
116
|
};
|
|
114
|
-
exports.buildRoute = buildRoute;
|