lancer-shared 1.2.106 → 1.2.108
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 +100 -75
- package/dist/constants/organization.d.ts +2 -2
- package/dist/constants/routes.d.ts +6 -2
- package/dist/constants/routes.js +0 -6
- package/dist/schemas/account/bidder-account.d.ts +9 -2
- package/dist/schemas/campaign/campaign-integrations.d.ts +5 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/infrastructure/index.d.ts +57 -0
- package/dist/schemas/job/job.d.ts +16 -16
- package/dist/schemas/job/pipeline-job.d.ts +3 -9
- package/dist/schemas/job/pipeline-job.js +0 -1
- package/dist/schemas/organization/index.d.ts +0 -3
- package/dist/schemas/proxy/proxy.js +1 -3
- package/dist/schemas/scraper/scrape-payload.d.ts +5 -0
- package/dist/schemas/upwork-account/index.d.ts +1 -1
- package/dist/schemas/upwork-account/index.js +1 -1
- package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +14 -14
- package/dist/schemas/upwork-account/upwork-business-manager-account.js +2 -2
- package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +23 -23
- package/dist/schemas/upwork-account/upwork-scraping-account.js +3 -4
- package/dist/types/upwork-account/upwork-scraping-account.d.ts +2 -2
- package/package.json +1 -1
- 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/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/proposal-dto.d.ts +0 -26
- package/dist/schemas/bidding/proposal-dto.js +0 -18
- package/dist/schemas/job/job-pipeline.d.ts +0 -74
- package/dist/schemas/job/job-pipeline.js +0 -29
- package/dist/schemas/job/job-suitability.d.ts +0 -12
- package/dist/schemas/job/job-suitability.js +0 -13
- 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/scraper/scrape-response.d.ts +0 -345
- package/dist/schemas/scraper/scrape-response.js +0 -9
- 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/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/proposal-dto.d.ts +0 -3
- package/dist/types/bidding/proposal-dto.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/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/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
|
});
|
|
@@ -12740,7 +12745,7 @@ z.object({
|
|
|
12740
12745
|
summary: z.string(),
|
|
12741
12746
|
coreServices: z.string(),
|
|
12742
12747
|
toolsSkillsTechnologies: z.string(),
|
|
12743
|
-
approach: z.string(),
|
|
12748
|
+
// approach: z.string(),
|
|
12744
12749
|
icp: z.string(),
|
|
12745
12750
|
projectsTheyAvoid: z.string(),
|
|
12746
12751
|
spokenLanguages: z.string(),
|
|
@@ -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,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
|
@@ -91,12 +91,6 @@ exports.ROUTES = {
|
|
|
91
91
|
BY_PROVIDER: (provider) => `admin/scraper-accounts/${provider}`,
|
|
92
92
|
BY_PROVIDER_AND_ID: (provider, id) => `admin/scraper-accounts/${provider}/${id}`,
|
|
93
93
|
},
|
|
94
|
-
PROXIES: {
|
|
95
|
-
BASE: 'admin/proxies',
|
|
96
|
-
BY_ID: (id) => `admin/proxies/${id}`,
|
|
97
|
-
REPLACE_PROXY: (id) => `admin/proxies/${id}/replace`,
|
|
98
|
-
SYNC: 'admin/proxies/sync',
|
|
99
|
-
},
|
|
100
94
|
},
|
|
101
95
|
BID: {
|
|
102
96
|
BASE: 'bid',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { Proxy } from
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Proxy } from "../proxy";
|
|
3
3
|
export declare const bidderAccountProvider: z.ZodEnum<["user-provided", "lancer-provided"]>;
|
|
4
4
|
export declare const bidderAccountAgencySchema: z.ZodObject<{
|
|
5
5
|
name: z.ZodString;
|
|
@@ -46,6 +46,7 @@ export declare const bidderAccountSchema: z.ZodObject<{
|
|
|
46
46
|
contractors: string[];
|
|
47
47
|
organizationId: string;
|
|
48
48
|
}>, "many">>;
|
|
49
|
+
instanceId: z.ZodNullable<z.ZodString>;
|
|
49
50
|
createdAt: z.ZodNumber;
|
|
50
51
|
updatedAt: z.ZodNumber;
|
|
51
52
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -66,6 +67,7 @@ export declare const bidderAccountSchema: z.ZodObject<{
|
|
|
66
67
|
contractors: string[];
|
|
67
68
|
organizationId: string;
|
|
68
69
|
}[] | null;
|
|
70
|
+
instanceId: string | null;
|
|
69
71
|
createdAt: number;
|
|
70
72
|
updatedAt: number;
|
|
71
73
|
googleOauthTokens?: any;
|
|
@@ -87,6 +89,7 @@ export declare const bidderAccountSchema: z.ZodObject<{
|
|
|
87
89
|
contractors: string[];
|
|
88
90
|
organizationId: string;
|
|
89
91
|
}[] | null;
|
|
92
|
+
instanceId: string | null;
|
|
90
93
|
createdAt: number;
|
|
91
94
|
updatedAt: number;
|
|
92
95
|
googleOauthTokens?: any;
|
|
@@ -120,6 +123,7 @@ export declare const createBidderAccountSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
120
123
|
contractors: string[];
|
|
121
124
|
organizationId: string;
|
|
122
125
|
}>, "many">>;
|
|
126
|
+
instanceId: z.ZodNullable<z.ZodString>;
|
|
123
127
|
createdAt: z.ZodNumber;
|
|
124
128
|
updatedAt: z.ZodNumber;
|
|
125
129
|
}, "name" | "provider" | "email" | "password" | "securityQuestionAnswer" | "assignedOrganizations" | "profilePhotoUrl" | "agencies">, {
|
|
@@ -183,6 +187,7 @@ export declare const updateBidderAccountSchema: z.ZodObject<{
|
|
|
183
187
|
contractors: string[];
|
|
184
188
|
organizationId: string;
|
|
185
189
|
}>, "many">>>;
|
|
190
|
+
instanceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
186
191
|
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
187
192
|
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
188
193
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -203,6 +208,7 @@ export declare const updateBidderAccountSchema: z.ZodObject<{
|
|
|
203
208
|
contractors: string[];
|
|
204
209
|
organizationId: string;
|
|
205
210
|
}[] | null | undefined;
|
|
211
|
+
instanceId?: string | null | undefined;
|
|
206
212
|
createdAt?: number | undefined;
|
|
207
213
|
updatedAt?: number | undefined;
|
|
208
214
|
}, {
|
|
@@ -223,6 +229,7 @@ export declare const updateBidderAccountSchema: z.ZodObject<{
|
|
|
223
229
|
contractors: string[];
|
|
224
230
|
organizationId: string;
|
|
225
231
|
}[] | null | undefined;
|
|
232
|
+
instanceId?: string | null | undefined;
|
|
226
233
|
createdAt?: number | undefined;
|
|
227
234
|
updatedAt?: number | undefined;
|
|
228
235
|
}>;
|
|
@@ -80,3 +80,8 @@ export declare const updateCampaignIntegrationsSchema: z.ZodObject<{
|
|
|
80
80
|
slack: string | null;
|
|
81
81
|
} | undefined;
|
|
82
82
|
}>;
|
|
83
|
+
export type CampaignIntegration = z.infer<typeof campaignIntegrations>;
|
|
84
|
+
export interface CampaignIntegrations extends z.infer<typeof campaignIntegrationsSchema> {
|
|
85
|
+
}
|
|
86
|
+
export interface UpdateCampaignIntegrations extends z.infer<typeof updateCampaignIntegrationsSchema> {
|
|
87
|
+
}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { infer, z } from "zod";
|
|
2
|
+
export declare const bidderInstanceStatusEnum: z.ZodEnum<["available", "unavailable"]>;
|
|
3
|
+
export declare const bidderInstanceSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
ipAddress: z.ZodString;
|
|
6
|
+
domain: z.ZodNullable<z.ZodString>;
|
|
7
|
+
bidderAccounts: z.ZodArray<z.ZodString, "many">;
|
|
8
|
+
gcp: z.ZodObject<{
|
|
9
|
+
instanceName: z.ZodString;
|
|
10
|
+
machineType: z.ZodString;
|
|
11
|
+
zone: z.ZodString;
|
|
12
|
+
region: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
instanceName: string;
|
|
15
|
+
machineType: string;
|
|
16
|
+
zone: string;
|
|
17
|
+
region: string;
|
|
18
|
+
}, {
|
|
19
|
+
instanceName: string;
|
|
20
|
+
machineType: string;
|
|
21
|
+
zone: string;
|
|
22
|
+
region: string;
|
|
23
|
+
}>;
|
|
24
|
+
status: z.ZodEnum<["available", "unavailable"]>;
|
|
25
|
+
createdAt: z.ZodNumber;
|
|
26
|
+
updatedAt: z.ZodNumber;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
status: "available" | "unavailable";
|
|
29
|
+
id: string;
|
|
30
|
+
ipAddress: string;
|
|
31
|
+
domain: string | null;
|
|
32
|
+
bidderAccounts: string[];
|
|
33
|
+
gcp: {
|
|
34
|
+
instanceName: string;
|
|
35
|
+
machineType: string;
|
|
36
|
+
zone: string;
|
|
37
|
+
region: string;
|
|
38
|
+
};
|
|
39
|
+
createdAt: number;
|
|
40
|
+
updatedAt: number;
|
|
41
|
+
}, {
|
|
42
|
+
status: "available" | "unavailable";
|
|
43
|
+
id: string;
|
|
44
|
+
ipAddress: string;
|
|
45
|
+
domain: string | null;
|
|
46
|
+
bidderAccounts: string[];
|
|
47
|
+
gcp: {
|
|
48
|
+
instanceName: string;
|
|
49
|
+
machineType: string;
|
|
50
|
+
zone: string;
|
|
51
|
+
region: string;
|
|
52
|
+
};
|
|
53
|
+
createdAt: number;
|
|
54
|
+
updatedAt: number;
|
|
55
|
+
}>;
|
|
56
|
+
export interface BidderInstance extends infer<typeof bidderInstanceSchema> {
|
|
57
|
+
}
|
|
@@ -44,9 +44,9 @@ export declare const clientInfoSchema: z.ZodObject<{
|
|
|
44
44
|
}, "strip", z.ZodTypeAny, {
|
|
45
45
|
country: string | null;
|
|
46
46
|
region: string | null;
|
|
47
|
+
rating: number | null;
|
|
47
48
|
isPaymentVerified: boolean | null;
|
|
48
49
|
numberOfReviews: number | null;
|
|
49
|
-
rating: number | null;
|
|
50
50
|
jobsPosted: number | null;
|
|
51
51
|
totalSpent: number | null;
|
|
52
52
|
numberOfHires: number | null;
|
|
@@ -60,9 +60,9 @@ export declare const clientInfoSchema: z.ZodObject<{
|
|
|
60
60
|
}, {
|
|
61
61
|
country: string | null;
|
|
62
62
|
region: string | null;
|
|
63
|
+
rating: number | null;
|
|
63
64
|
isPaymentVerified: boolean | null;
|
|
64
65
|
numberOfReviews: number | null;
|
|
65
|
-
rating: number | null;
|
|
66
66
|
jobsPosted: number | null;
|
|
67
67
|
totalSpent: number | null;
|
|
68
68
|
numberOfHires: number | null;
|
|
@@ -187,9 +187,9 @@ export declare const upworkJobSchema: z.ZodObject<{
|
|
|
187
187
|
}, "strip", z.ZodTypeAny, {
|
|
188
188
|
country: string | null;
|
|
189
189
|
region: string | null;
|
|
190
|
+
rating: number | null;
|
|
190
191
|
isPaymentVerified: boolean | null;
|
|
191
192
|
numberOfReviews: number | null;
|
|
192
|
-
rating: number | null;
|
|
193
193
|
jobsPosted: number | null;
|
|
194
194
|
totalSpent: number | null;
|
|
195
195
|
numberOfHires: number | null;
|
|
@@ -203,9 +203,9 @@ export declare const upworkJobSchema: z.ZodObject<{
|
|
|
203
203
|
}, {
|
|
204
204
|
country: string | null;
|
|
205
205
|
region: string | null;
|
|
206
|
+
rating: number | null;
|
|
206
207
|
isPaymentVerified: boolean | null;
|
|
207
208
|
numberOfReviews: number | null;
|
|
208
|
-
rating: number | null;
|
|
209
209
|
jobsPosted: number | null;
|
|
210
210
|
totalSpent: number | null;
|
|
211
211
|
numberOfHires: number | null;
|
|
@@ -267,9 +267,9 @@ export declare const upworkJobSchema: z.ZodObject<{
|
|
|
267
267
|
clientInfo: {
|
|
268
268
|
country: string | null;
|
|
269
269
|
region: string | null;
|
|
270
|
+
rating: number | null;
|
|
270
271
|
isPaymentVerified: boolean | null;
|
|
271
272
|
numberOfReviews: number | null;
|
|
272
|
-
rating: number | null;
|
|
273
273
|
jobsPosted: number | null;
|
|
274
274
|
totalSpent: number | null;
|
|
275
275
|
numberOfHires: number | null;
|
|
@@ -319,9 +319,9 @@ export declare const upworkJobSchema: z.ZodObject<{
|
|
|
319
319
|
clientInfo: {
|
|
320
320
|
country: string | null;
|
|
321
321
|
region: string | null;
|
|
322
|
+
rating: number | null;
|
|
322
323
|
isPaymentVerified: boolean | null;
|
|
323
324
|
numberOfReviews: number | null;
|
|
324
|
-
rating: number | null;
|
|
325
325
|
jobsPosted: number | null;
|
|
326
326
|
totalSpent: number | null;
|
|
327
327
|
numberOfHires: number | null;
|
|
@@ -418,9 +418,9 @@ export declare const jobSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
418
418
|
}, "strip", z.ZodTypeAny, {
|
|
419
419
|
country: string | null;
|
|
420
420
|
region: string | null;
|
|
421
|
+
rating: number | null;
|
|
421
422
|
isPaymentVerified: boolean | null;
|
|
422
423
|
numberOfReviews: number | null;
|
|
423
|
-
rating: number | null;
|
|
424
424
|
jobsPosted: number | null;
|
|
425
425
|
totalSpent: number | null;
|
|
426
426
|
numberOfHires: number | null;
|
|
@@ -434,9 +434,9 @@ export declare const jobSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
434
434
|
}, {
|
|
435
435
|
country: string | null;
|
|
436
436
|
region: string | null;
|
|
437
|
+
rating: number | null;
|
|
437
438
|
isPaymentVerified: boolean | null;
|
|
438
439
|
numberOfReviews: number | null;
|
|
439
|
-
rating: number | null;
|
|
440
440
|
jobsPosted: number | null;
|
|
441
441
|
totalSpent: number | null;
|
|
442
442
|
numberOfHires: number | null;
|
|
@@ -550,9 +550,9 @@ export declare const jobSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
550
550
|
clientInfo: {
|
|
551
551
|
country: string | null;
|
|
552
552
|
region: string | null;
|
|
553
|
+
rating: number | null;
|
|
553
554
|
isPaymentVerified: boolean | null;
|
|
554
555
|
numberOfReviews: number | null;
|
|
555
|
-
rating: number | null;
|
|
556
556
|
jobsPosted: number | null;
|
|
557
557
|
totalSpent: number | null;
|
|
558
558
|
numberOfHires: number | null;
|
|
@@ -624,9 +624,9 @@ export declare const jobSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
624
624
|
clientInfo: {
|
|
625
625
|
country: string | null;
|
|
626
626
|
region: string | null;
|
|
627
|
+
rating: number | null;
|
|
627
628
|
isPaymentVerified: boolean | null;
|
|
628
629
|
numberOfReviews: number | null;
|
|
629
|
-
rating: number | null;
|
|
630
630
|
jobsPosted: number | null;
|
|
631
631
|
totalSpent: number | null;
|
|
632
632
|
numberOfHires: number | null;
|
|
@@ -752,9 +752,9 @@ export declare const jobResponseSchema: z.ZodObject<{
|
|
|
752
752
|
}, "strip", z.ZodTypeAny, {
|
|
753
753
|
country: string | null;
|
|
754
754
|
region: string | null;
|
|
755
|
+
rating: number | null;
|
|
755
756
|
isPaymentVerified: boolean | null;
|
|
756
757
|
numberOfReviews: number | null;
|
|
757
|
-
rating: number | null;
|
|
758
758
|
jobsPosted: number | null;
|
|
759
759
|
totalSpent: number | null;
|
|
760
760
|
numberOfHires: number | null;
|
|
@@ -768,9 +768,9 @@ export declare const jobResponseSchema: z.ZodObject<{
|
|
|
768
768
|
}, {
|
|
769
769
|
country: string | null;
|
|
770
770
|
region: string | null;
|
|
771
|
+
rating: number | null;
|
|
771
772
|
isPaymentVerified: boolean | null;
|
|
772
773
|
numberOfReviews: number | null;
|
|
773
|
-
rating: number | null;
|
|
774
774
|
jobsPosted: number | null;
|
|
775
775
|
totalSpent: number | null;
|
|
776
776
|
numberOfHires: number | null;
|
|
@@ -884,9 +884,9 @@ export declare const jobResponseSchema: z.ZodObject<{
|
|
|
884
884
|
clientInfo: {
|
|
885
885
|
country: string | null;
|
|
886
886
|
region: string | null;
|
|
887
|
+
rating: number | null;
|
|
887
888
|
isPaymentVerified: boolean | null;
|
|
888
889
|
numberOfReviews: number | null;
|
|
889
|
-
rating: number | null;
|
|
890
890
|
jobsPosted: number | null;
|
|
891
891
|
totalSpent: number | null;
|
|
892
892
|
numberOfHires: number | null;
|
|
@@ -958,9 +958,9 @@ export declare const jobResponseSchema: z.ZodObject<{
|
|
|
958
958
|
clientInfo: {
|
|
959
959
|
country: string | null;
|
|
960
960
|
region: string | null;
|
|
961
|
+
rating: number | null;
|
|
961
962
|
isPaymentVerified: boolean | null;
|
|
962
963
|
numberOfReviews: number | null;
|
|
963
|
-
rating: number | null;
|
|
964
964
|
jobsPosted: number | null;
|
|
965
965
|
totalSpent: number | null;
|
|
966
966
|
numberOfHires: number | null;
|
|
@@ -1037,9 +1037,9 @@ export declare const jobResponseSchema: z.ZodObject<{
|
|
|
1037
1037
|
clientInfo: {
|
|
1038
1038
|
country: string | null;
|
|
1039
1039
|
region: string | null;
|
|
1040
|
+
rating: number | null;
|
|
1040
1041
|
isPaymentVerified: boolean | null;
|
|
1041
1042
|
numberOfReviews: number | null;
|
|
1042
|
-
rating: number | null;
|
|
1043
1043
|
jobsPosted: number | null;
|
|
1044
1044
|
totalSpent: number | null;
|
|
1045
1045
|
numberOfHires: number | null;
|
|
@@ -1116,9 +1116,9 @@ export declare const jobResponseSchema: z.ZodObject<{
|
|
|
1116
1116
|
clientInfo: {
|
|
1117
1117
|
country: string | null;
|
|
1118
1118
|
region: string | null;
|
|
1119
|
+
rating: number | null;
|
|
1119
1120
|
isPaymentVerified: boolean | null;
|
|
1120
1121
|
numberOfReviews: number | null;
|
|
1121
|
-
rating: number | null;
|
|
1122
1122
|
jobsPosted: number | null;
|
|
1123
1123
|
totalSpent: number | null;
|
|
1124
1124
|
numberOfHires: number | null;
|