lancer-shared 1.2.159 → 1.2.160
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 +8245 -60
- package/dist/constants/account-status.d.ts +3 -0
- package/dist/constants/account-status.js +17 -0
- package/dist/constants/campaign-notifications.d.ts +2 -0
- package/dist/constants/campaign-webhook-types.d.ts +2 -0
- package/dist/constants/collections.d.ts +13 -0
- package/dist/constants/collections.js +16 -0
- package/dist/constants/common-questions.js +60 -0
- package/dist/constants/index.js +40 -0
- package/dist/constants/job-filter-options.js +268 -0
- package/dist/constants/job-status.js +26 -0
- package/dist/constants/mappings/countryMapping.js +122 -0
- package/dist/constants/mappings/regionMapping.js +242 -0
- package/dist/constants/organization.d.ts +2 -0
- package/dist/constants/proxies.d.ts +4 -0
- package/dist/constants/routes.js +114 -0
- package/dist/constants/upwork-accounts.js +21 -0
- package/dist/constants/upwork-filters.d.ts +5 -0
- package/dist/constants/upwork-filters.js +75 -0
- package/dist/index.js +20 -0
- package/dist/schemas/account/account-status.js +11 -0
- package/dist/schemas/account/bidder-account.js +37 -0
- package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +5 -0
- package/dist/schemas/account/index.js +19 -0
- 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 +37 -0
- package/dist/schemas/ai/ai-config.d.ts +36 -0
- package/dist/schemas/ai/ai-config.js +12 -0
- package/dist/schemas/ai/index.d.ts +3 -0
- package/dist/schemas/ai/index.js +19 -0
- package/dist/schemas/ai/proposal.d.ts +82 -0
- package/dist/schemas/ai/proposal.js +16 -0
- package/dist/schemas/ai/suitability.d.ts +37 -0
- package/dist/schemas/ai/suitability.js +17 -0
- package/dist/schemas/ai-config/ai-config.d.ts +39 -0
- package/dist/schemas/ai-config/ai-config.js +12 -0
- package/dist/schemas/ai-config/index.d.ts +1 -0
- package/dist/schemas/ai-config/index.js +17 -0
- package/dist/schemas/bid/bid-result.js +15 -0
- package/dist/schemas/bid/bid-status.d.ts +30 -0
- package/dist/schemas/bid/bid-status.js +15 -0
- package/dist/schemas/bid/bid.js +36 -0
- package/dist/schemas/bid/exceptions/base-exception.d.ts +4 -0
- package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +5 -0
- package/dist/schemas/bid/index.js +18 -0
- 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 +9 -0
- package/dist/schemas/campaign/campaign-analytics.d.ts +56 -8
- package/dist/schemas/campaign/campaign-analytics.js +41 -0
- package/dist/schemas/campaign/campaign-chat-bot.d.ts +3 -0
- package/dist/schemas/campaign/campaign-expenses.js +9 -0
- package/dist/schemas/campaign/campaign-insights.js +31 -0
- package/dist/schemas/campaign/campaign-integrations.d.ts +82 -0
- package/dist/schemas/campaign/campaign-integrations.js +16 -0
- package/dist/schemas/campaign/campaign-job-count.d.ts +2 -0
- package/dist/schemas/campaign/campaign-job-count.js +6 -0
- package/dist/schemas/campaign/campaign-notifications.d.ts +9 -0
- package/dist/schemas/campaign/campaign.d.ts +36 -0
- package/dist/schemas/campaign/campaign.js +44 -0
- package/dist/schemas/campaign/index.js +23 -0
- package/dist/schemas/chat-message/chat-message.d.ts +31 -0
- package/dist/schemas/chat-message/chat-message.js +13 -0
- package/dist/schemas/chat-message/index.d.ts +1 -0
- package/dist/schemas/chat-message/index.js +17 -0
- package/dist/schemas/config/agency-config.d.ts +17 -0
- package/dist/schemas/config/agency-config.js +10 -0
- package/dist/schemas/config/index.d.ts +1 -0
- package/dist/schemas/config/index.js +17 -0
- package/dist/schemas/index.js +32 -0
- 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.d.ts +1 -0
- package/dist/schemas/job-filters/index.js +17 -0
- package/dist/schemas/job-filters/job-filters.d.ts +241 -0
- package/dist/schemas/job-filters/job-filters.js +87 -0
- package/dist/schemas/knowledge-object/index.d.ts +1 -0
- package/dist/schemas/knowledge-object/index.js +17 -0
- package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
- package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
- package/dist/schemas/lead/index.js +19 -0
- package/dist/schemas/lead/lead-note.d.ts +83 -0
- package/dist/schemas/lead/lead-note.js +30 -0
- package/dist/schemas/lead/lead-status.js +26 -0
- package/dist/schemas/lead/lead.d.ts +1897 -0
- package/dist/schemas/lead/lead.js +143 -0
- package/dist/schemas/lead/nuxt.d.ts +1664 -0
- package/dist/schemas/logger/index.js +17 -0
- package/dist/schemas/logger/log-event.js +66 -0
- package/dist/schemas/organization/index.js +17 -0
- package/dist/schemas/organization/organization.d.ts +70 -0
- package/dist/schemas/organization/organization.js +19 -0
- package/dist/schemas/proxy/index.js +17 -0
- package/dist/schemas/proxy/proxy.js +23 -0
- package/dist/schemas/saved-search/index.js +12 -0
- package/dist/schemas/scraper/index.js +18 -0
- package/dist/schemas/scraper/scrape-payload.d.ts +27 -5
- package/dist/schemas/scraper/scrape-payload.js +16 -0
- package/dist/schemas/scraper/scrape-response.d.ts +345 -0
- package/dist/schemas/scraper/scrape-response.js +9 -0
- package/dist/schemas/scraper/scrape-result.js +23 -0
- package/dist/schemas/shared.js +16 -0
- package/dist/schemas/time-filter/index.js +9 -0
- 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 +55 -0
- package/dist/types/account/account-status.d.ts +3 -0
- package/dist/types/account/account-status.js +2 -0
- package/dist/types/account/bidder-account.d.ts +7 -0
- package/dist/types/account/bidder-account.js +2 -0
- package/dist/types/account/index.d.ts +3 -0
- package/dist/types/account/index.js +19 -0
- 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.d.ts +5 -0
- package/dist/types/account/scraper-account.js +2 -0
- package/dist/types/ai/ai-config.d.ts +6 -0
- package/dist/types/ai/ai-config.js +2 -0
- package/dist/types/ai/index.d.ts +3 -0
- package/dist/types/ai/index.js +19 -0
- package/dist/types/ai/proposal.d.ts +10 -0
- package/dist/types/ai/proposal.js +2 -0
- package/dist/types/ai/suitability.d.ts +6 -0
- package/dist/types/ai/suitability.js +2 -0
- 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.d.ts +5 -0
- package/dist/types/bid/bid-result.js +2 -0
- package/dist/types/bid/bid-status.d.ts +5 -0
- package/dist/types/bid/bid-status.js +2 -0
- package/dist/types/bid/bid.d.ts +9 -0
- package/dist/types/bid/bid.js +2 -0
- package/dist/types/bid/index.d.ts +2 -0
- package/dist/types/bid/index.js +18 -0
- 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.d.ts +7 -0
- package/dist/types/campaign/campaign-analytics.js +2 -0
- package/dist/types/campaign/campaign-expenses.d.ts +3 -0
- package/dist/types/campaign/campaign-expenses.js +2 -0
- package/dist/types/campaign/campaign-insights.js +2 -0
- package/dist/types/campaign/campaign-integrations.d.ts +6 -0
- package/dist/types/campaign/campaign-integrations.js +2 -0
- package/dist/types/campaign/campaign-job-count.d.ts +4 -0
- package/dist/types/campaign/campaign-job-count.js +2 -0
- package/dist/types/campaign/campaign-notifications.d.ts +7 -0
- package/dist/types/campaign/campaign.js +2 -0
- package/dist/types/campaign/index.js +22 -0
- package/dist/types/chat-message/chat-message.d.ts +4 -0
- package/dist/types/chat-message/chat-message.js +2 -0
- package/dist/types/chat-message/index.d.ts +1 -0
- package/dist/types/chat-message/index.js +17 -0
- package/dist/types/config/agency-config.d.ts +4 -0
- package/dist/types/config/agency-config.js +2 -0
- package/dist/types/config/index.d.ts +1 -0
- package/dist/types/config/index.js +17 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.js +29 -0
- package/dist/types/job/index.d.ts +48 -0
- package/dist/types/job/index.js +19 -0
- 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.d.ts +10 -0
- package/dist/types/job/job-note.js +2 -0
- package/dist/types/job/job-pipeline.d.ts +4 -0
- package/dist/types/job/job-pipeline.js +2 -0
- package/dist/types/job/job-status.d.ts +5 -0
- package/dist/types/job/job-status.js +12 -0
- 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/nuxt.d.ts +4 -0
- package/dist/types/job-filters/index.d.ts +1 -0
- package/dist/types/job-filters/index.js +17 -0
- package/dist/types/job-filters/job-filters.d.ts +4 -0
- package/dist/types/job-filters/job-filters.js +2 -0
- package/dist/types/knowledge-object/index.d.ts +1 -0
- package/dist/types/knowledge-object/index.js +17 -0
- package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
- package/dist/types/knowledge-object/knowledge-object.js +2 -0
- package/dist/types/logger/index.d.ts +1 -0
- package/dist/types/logger/index.js +17 -0
- package/dist/types/logger/log-event.d.ts +14 -0
- package/dist/types/logger/log-event.js +2 -0
- package/dist/types/saved-search/index.d.ts +6 -0
- package/dist/types/saved-search/index.js +2 -0
- package/dist/types/scraper/index.d.ts +2 -0
- package/dist/types/scraper/index.js +18 -0
- package/dist/types/scraper/scrape-payload.d.ts +10 -0
- package/dist/types/scraper/scrape-payload.js +2 -0
- package/dist/types/scraper/scrape-response.d.ts +4 -0
- package/dist/types/scraper/scrape-response.js +2 -0
- package/dist/types/scraper/scrape-result.d.ts +8 -0
- package/dist/types/scraper/scrape-result.js +2 -0
- package/dist/types/shared.d.ts +8 -0
- package/dist/types/time-filter/index.d.ts +3 -0
- package/dist/types/time-filter/index.js +2 -0
- package/dist/types/transaction/index.d.ts +4 -0
- 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/usage/index.d.ts +6 -0
- package/dist/types/user/index.d.ts +15 -0
- package/dist/types/user/index.js +2 -0
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/index.js +17 -0
- package/dist/utils/timezones.d.ts +5 -0
- package/dist/utils/try-catch.js +25 -0
- package/package.json +3 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./log-event"), exports);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.logEventSchema = exports.LogEventTypeEnum = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.LogEventTypeEnum = zod_1.z.enum([
|
|
6
|
+
// Scraper Events
|
|
7
|
+
"scraperStarted",
|
|
8
|
+
"scraperCompleted",
|
|
9
|
+
"jobScraped",
|
|
10
|
+
"jobsIndexed",
|
|
11
|
+
"jobDuplicateSkipped",
|
|
12
|
+
"scraperFailed",
|
|
13
|
+
"userProfileScrapingStarted",
|
|
14
|
+
"userProfileScrapingComplete",
|
|
15
|
+
"userProfileScrapingFailed",
|
|
16
|
+
// Job Sync & Campaign Matching
|
|
17
|
+
"jobSyncPublished",
|
|
18
|
+
"jobSyncReceived",
|
|
19
|
+
"leadsCreatedAndSynced",
|
|
20
|
+
// Suitability Events
|
|
21
|
+
"suitabilityPending",
|
|
22
|
+
"suitabilityProcessing",
|
|
23
|
+
"suitabilityComplete",
|
|
24
|
+
"suitabilityFailed",
|
|
25
|
+
"manualSuitabilityAnalyzed",
|
|
26
|
+
// Proposal Events
|
|
27
|
+
"proposalProcessing",
|
|
28
|
+
"proposalComplete",
|
|
29
|
+
"proposalFailed",
|
|
30
|
+
"manualProposalGenerated",
|
|
31
|
+
// Bidding Events
|
|
32
|
+
"biddingProcessing",
|
|
33
|
+
"biddingComplete",
|
|
34
|
+
"biddingFailed",
|
|
35
|
+
"biddingSkipped",
|
|
36
|
+
"biddingPending",
|
|
37
|
+
// System/Generic Events
|
|
38
|
+
"errorLogged",
|
|
39
|
+
"cloudTaskRetry",
|
|
40
|
+
"manualLeadEdited",
|
|
41
|
+
"leadArchived",
|
|
42
|
+
"auditTrailLogged",
|
|
43
|
+
// Knowledge Base Events
|
|
44
|
+
"knowledgeBaseGenerationComplete",
|
|
45
|
+
"knowledgeBaseGenerationFailed",
|
|
46
|
+
]);
|
|
47
|
+
exports.logEventSchema = zod_1.z.object({
|
|
48
|
+
// The type of event (use a z.enum if possible)
|
|
49
|
+
type: exports.LogEventTypeEnum, // e.g. "suitability-failed", "proposal-generated"
|
|
50
|
+
// The service that triggered the event
|
|
51
|
+
source: zod_1.z.string(), // e.g. "lancer-agents", "lancer-bidding"
|
|
52
|
+
// Optional: Allow logging non-lead events in the future
|
|
53
|
+
resourceType: zod_1.z.string().default("lead"), // e.g. "lead", "campaign", "user"
|
|
54
|
+
// ID of the resource (primary entity affected)
|
|
55
|
+
resourceId: zod_1.z.string().nullable(), // fallback if leadId is not applicable
|
|
56
|
+
// Lead-level metadata
|
|
57
|
+
leadId: zod_1.z.string().nullable(),
|
|
58
|
+
campaignId: zod_1.z.string().nullable(),
|
|
59
|
+
userId: zod_1.z.string().nullable(),
|
|
60
|
+
// Reason or message for the event
|
|
61
|
+
reason: zod_1.z.string().nullable(),
|
|
62
|
+
// Generic metadata (stacktrace, score, raw request, etc.)
|
|
63
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).nullable(),
|
|
64
|
+
// Optional timestamp override
|
|
65
|
+
timestamp: zod_1.z.number(),
|
|
66
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./organization"), exports);
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const bidConfigSchema: z.ZodObject<{
|
|
3
|
+
agencyName: z.ZodNullable<z.ZodString>;
|
|
4
|
+
bidderId: z.ZodNullable<z.ZodString>;
|
|
5
|
+
contractorName: z.ZodNullable<z.ZodString>;
|
|
6
|
+
specialisedProfile: z.ZodNullable<z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
agencyName: string | null;
|
|
9
|
+
bidderId: string | null;
|
|
10
|
+
contractorName: string | null;
|
|
11
|
+
specialisedProfile: string | null;
|
|
12
|
+
}, {
|
|
13
|
+
agencyName: string | null;
|
|
14
|
+
bidderId: string | null;
|
|
15
|
+
contractorName: string | null;
|
|
16
|
+
specialisedProfile: string | null;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const organizationTypeSchema: z.ZodEnum<["agency", "freelancer"]>;
|
|
19
|
+
export declare const organizationSchema: z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
type: z.ZodEnum<["agency", "freelancer"]>;
|
|
23
|
+
bidConfig: z.ZodObject<{
|
|
24
|
+
agencyName: z.ZodNullable<z.ZodString>;
|
|
25
|
+
bidderId: z.ZodNullable<z.ZodString>;
|
|
26
|
+
contractorName: z.ZodNullable<z.ZodString>;
|
|
27
|
+
specialisedProfile: z.ZodNullable<z.ZodString>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
agencyName: string | null;
|
|
30
|
+
bidderId: string | null;
|
|
31
|
+
contractorName: string | null;
|
|
32
|
+
specialisedProfile: string | null;
|
|
33
|
+
}, {
|
|
34
|
+
agencyName: string | null;
|
|
35
|
+
bidderId: string | null;
|
|
36
|
+
contractorName: string | null;
|
|
37
|
+
specialisedProfile: string | null;
|
|
38
|
+
}>;
|
|
39
|
+
createdAt: z.ZodDate;
|
|
40
|
+
updatedAt: z.ZodDate;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
type: "agency" | "freelancer";
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
bidConfig: {
|
|
46
|
+
agencyName: string | null;
|
|
47
|
+
bidderId: string | null;
|
|
48
|
+
contractorName: string | null;
|
|
49
|
+
specialisedProfile: string | null;
|
|
50
|
+
};
|
|
51
|
+
createdAt: Date;
|
|
52
|
+
updatedAt: Date;
|
|
53
|
+
}, {
|
|
54
|
+
type: "agency" | "freelancer";
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
bidConfig: {
|
|
58
|
+
agencyName: string | null;
|
|
59
|
+
bidderId: string | null;
|
|
60
|
+
contractorName: string | null;
|
|
61
|
+
specialisedProfile: string | null;
|
|
62
|
+
};
|
|
63
|
+
createdAt: Date;
|
|
64
|
+
updatedAt: Date;
|
|
65
|
+
}>;
|
|
66
|
+
export interface Organization extends z.infer<typeof organizationSchema> {
|
|
67
|
+
}
|
|
68
|
+
export interface BidConfig extends z.infer<typeof bidConfigSchema> {
|
|
69
|
+
}
|
|
70
|
+
export type OrganizationType = z.infer<typeof organizationTypeSchema>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.organizationSchema = exports.organizationTypeSchema = exports.bidConfigSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.bidConfigSchema = zod_1.z.object({
|
|
6
|
+
agencyName: zod_1.z.string().nullable(),
|
|
7
|
+
bidderId: zod_1.z.string().nullable(),
|
|
8
|
+
contractorName: zod_1.z.string().nullable(),
|
|
9
|
+
specialisedProfile: zod_1.z.string().nullable(),
|
|
10
|
+
});
|
|
11
|
+
exports.organizationTypeSchema = zod_1.z.enum(['agency', 'freelancer']);
|
|
12
|
+
exports.organizationSchema = zod_1.z.object({
|
|
13
|
+
id: zod_1.z.string(),
|
|
14
|
+
name: zod_1.z.string(),
|
|
15
|
+
type: exports.organizationTypeSchema,
|
|
16
|
+
bidConfig: exports.bidConfigSchema,
|
|
17
|
+
createdAt: zod_1.z.date(),
|
|
18
|
+
updatedAt: zod_1.z.date(),
|
|
19
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./proxy"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.externalProxySchema = exports.proxySchema = exports.proxyCountrySchema = exports.proxyProviderSchema = exports.proxyStatusSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.proxyStatusSchema = zod_1.z.enum(['ready', 'pending', 'to_replace']);
|
|
6
|
+
exports.proxyProviderSchema = zod_1.z.enum(['webshare']);
|
|
7
|
+
exports.proxyCountrySchema = zod_1.z.enum(['USA']);
|
|
8
|
+
exports.proxySchema = zod_1.z.object({
|
|
9
|
+
id: zod_1.z.string(),
|
|
10
|
+
externalId: zod_1.z.string(),
|
|
11
|
+
host: zod_1.z.string(),
|
|
12
|
+
port: zod_1.z.number(),
|
|
13
|
+
username: zod_1.z.string(),
|
|
14
|
+
password: zod_1.z.string(),
|
|
15
|
+
provider: exports.proxyProviderSchema,
|
|
16
|
+
country: exports.proxyCountrySchema,
|
|
17
|
+
status: exports.proxyStatusSchema,
|
|
18
|
+
bidderId: zod_1.z.string().nullable(),
|
|
19
|
+
});
|
|
20
|
+
exports.externalProxySchema = exports.proxySchema.omit({
|
|
21
|
+
id: true,
|
|
22
|
+
bidderId: true,
|
|
23
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.savedSearchSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const shared_1 = require("../shared");
|
|
6
|
+
exports.savedSearchSchema = (0, zod_1.object)({
|
|
7
|
+
id: (0, zod_1.number)().int(),
|
|
8
|
+
name: (0, zod_1.string)(),
|
|
9
|
+
url: (0, zod_1.string)(),
|
|
10
|
+
createdAt: (0, zod_1.date)(),
|
|
11
|
+
isActive: shared_1.booleanSchema,
|
|
12
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./scrape-payload"), exports);
|
|
18
|
+
__exportStar(require("./scrape-result"), exports);
|
|
@@ -662,6 +662,10 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
662
662
|
biddingFixedHourlyRate: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
663
663
|
biddingHourlyRatePercentage: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
664
664
|
bidWithWarning: import("zod").ZodEnum<["bid", "skip"]>;
|
|
665
|
+
sleepEnabled: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodBoolean>>;
|
|
666
|
+
sleepStartAtHour: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
667
|
+
sleepEndAtHour: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
668
|
+
sleepTimezone: import("zod").ZodNullable<import("zod").ZodString>;
|
|
665
669
|
leadCounts: import("zod").ZodNullable<import("zod").ZodRecord<import("zod").ZodEnum<["leads", "contacted", "viewed", "replied", "won"]>, import("zod").ZodNumber>>;
|
|
666
670
|
expenses: import("zod").ZodObject<{
|
|
667
671
|
biddingAmount: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
@@ -781,6 +785,10 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
781
785
|
biddingFixedHourlyRate: number | null;
|
|
782
786
|
biddingHourlyRatePercentage: number | null;
|
|
783
787
|
bidWithWarning: "bid" | "skip";
|
|
788
|
+
sleepEnabled: boolean | null;
|
|
789
|
+
sleepStartAtHour: number | null;
|
|
790
|
+
sleepEndAtHour: number | null;
|
|
791
|
+
sleepTimezone: string | null;
|
|
784
792
|
leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "won", number>> | null;
|
|
785
793
|
expenses: {
|
|
786
794
|
biddingAmount: number;
|
|
@@ -866,6 +874,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
866
874
|
biddingFixedHourlyRate: number | null;
|
|
867
875
|
biddingHourlyRatePercentage: number | null;
|
|
868
876
|
bidWithWarning: "bid" | "skip";
|
|
877
|
+
sleepTimezone: string | null;
|
|
869
878
|
leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "won", number>> | null;
|
|
870
879
|
expenses: {
|
|
871
880
|
biddingAmount?: number | undefined;
|
|
@@ -893,6 +902,9 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
893
902
|
maximumBoost?: number | null | undefined;
|
|
894
903
|
boostingThreshold?: number | null | undefined;
|
|
895
904
|
biddingDelayInMinutes?: number | undefined;
|
|
905
|
+
sleepEnabled?: boolean | null | undefined;
|
|
906
|
+
sleepStartAtHour?: number | null | undefined;
|
|
907
|
+
sleepEndAtHour?: number | null | undefined;
|
|
896
908
|
}>;
|
|
897
909
|
organization: import("zod").ZodObject<{
|
|
898
910
|
id: import("zod").ZodString;
|
|
@@ -964,6 +976,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
964
976
|
}>;
|
|
965
977
|
source: import("zod").ZodEnum<["stripe", "manual"]>;
|
|
966
978
|
usage: import("zod").ZodRecord<import("zod").ZodEnum<["suitabilityComplete", "proposalComplete", "biddingComplete"]>, import("zod").ZodNumber>;
|
|
979
|
+
trialEndsAt: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
967
980
|
}, "strip", import("zod").ZodTypeAny, {
|
|
968
981
|
status: "active" | "paused" | "trialing" | "cancelled" | "payment_processing" | "payment_pending" | "payment_failed";
|
|
969
982
|
planId: string;
|
|
@@ -985,6 +998,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
985
998
|
};
|
|
986
999
|
source: "stripe" | "manual";
|
|
987
1000
|
usage: Partial<Record<"suitabilityComplete" | "proposalComplete" | "biddingComplete", number>>;
|
|
1001
|
+
trialEndsAt: number | null;
|
|
988
1002
|
}, {
|
|
989
1003
|
status: "active" | "paused" | "trialing" | "cancelled" | "payment_processing" | "payment_pending" | "payment_failed";
|
|
990
1004
|
planId: string;
|
|
@@ -1006,6 +1020,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
1006
1020
|
};
|
|
1007
1021
|
source: "stripe" | "manual";
|
|
1008
1022
|
usage: Partial<Record<"suitabilityComplete" | "proposalComplete" | "biddingComplete", number>>;
|
|
1023
|
+
trialEndsAt: number | null;
|
|
1009
1024
|
}>>;
|
|
1010
1025
|
active: import("zod").ZodBoolean;
|
|
1011
1026
|
limits: import("zod").ZodObject<{
|
|
@@ -1060,7 +1075,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
1060
1075
|
createdAt: import("zod").ZodNumber;
|
|
1061
1076
|
updatedAt: import("zod").ZodNumber;
|
|
1062
1077
|
openRouterApiKey: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1063
|
-
appTrialEndsAt: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
1064
1078
|
oneTimePayments: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1065
1079
|
usBidderAccountPayment: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1066
1080
|
paidAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -1132,6 +1146,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
1132
1146
|
};
|
|
1133
1147
|
source: "stripe" | "manual";
|
|
1134
1148
|
usage: Partial<Record<"suitabilityComplete" | "proposalComplete" | "biddingComplete", number>>;
|
|
1149
|
+
trialEndsAt: number | null;
|
|
1135
1150
|
} | null;
|
|
1136
1151
|
limits: {
|
|
1137
1152
|
monthlyCredits: number;
|
|
@@ -1149,7 +1164,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
1149
1164
|
lastBidTime: number | null;
|
|
1150
1165
|
nextScheduledBidTime: number | null;
|
|
1151
1166
|
openRouterApiKey: string | null;
|
|
1152
|
-
appTrialEndsAt: number | null;
|
|
1153
1167
|
oneTimePayments?: {
|
|
1154
1168
|
usBidderAccountPayment?: {
|
|
1155
1169
|
status: string;
|
|
@@ -1189,6 +1203,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
1189
1203
|
};
|
|
1190
1204
|
source: "stripe" | "manual";
|
|
1191
1205
|
usage: Partial<Record<"suitabilityComplete" | "proposalComplete" | "biddingComplete", number>>;
|
|
1206
|
+
trialEndsAt: number | null;
|
|
1192
1207
|
} | null;
|
|
1193
1208
|
limits: {
|
|
1194
1209
|
monthlyCredits: number;
|
|
@@ -1206,7 +1221,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
1206
1221
|
lastBidTime: number | null;
|
|
1207
1222
|
nextScheduledBidTime: number | null;
|
|
1208
1223
|
openRouterApiKey: string | null;
|
|
1209
|
-
appTrialEndsAt: number | null;
|
|
1210
1224
|
oneTimePayments?: {
|
|
1211
1225
|
usBidderAccountPayment?: {
|
|
1212
1226
|
status: string;
|
|
@@ -1991,6 +2005,10 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
1991
2005
|
biddingFixedHourlyRate: number | null;
|
|
1992
2006
|
biddingHourlyRatePercentage: number | null;
|
|
1993
2007
|
bidWithWarning: "bid" | "skip";
|
|
2008
|
+
sleepEnabled: boolean | null;
|
|
2009
|
+
sleepStartAtHour: number | null;
|
|
2010
|
+
sleepEndAtHour: number | null;
|
|
2011
|
+
sleepTimezone: string | null;
|
|
1994
2012
|
leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "won", number>> | null;
|
|
1995
2013
|
expenses: {
|
|
1996
2014
|
biddingAmount: number;
|
|
@@ -2044,6 +2062,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
2044
2062
|
};
|
|
2045
2063
|
source: "stripe" | "manual";
|
|
2046
2064
|
usage: Partial<Record<"suitabilityComplete" | "proposalComplete" | "biddingComplete", number>>;
|
|
2065
|
+
trialEndsAt: number | null;
|
|
2047
2066
|
} | null;
|
|
2048
2067
|
limits: {
|
|
2049
2068
|
monthlyCredits: number;
|
|
@@ -2061,7 +2080,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
2061
2080
|
lastBidTime: number | null;
|
|
2062
2081
|
nextScheduledBidTime: number | null;
|
|
2063
2082
|
openRouterApiKey: string | null;
|
|
2064
|
-
appTrialEndsAt: number | null;
|
|
2065
2083
|
oneTimePayments?: {
|
|
2066
2084
|
usBidderAccountPayment?: {
|
|
2067
2085
|
status: string;
|
|
@@ -2302,6 +2320,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
2302
2320
|
biddingFixedHourlyRate: number | null;
|
|
2303
2321
|
biddingHourlyRatePercentage: number | null;
|
|
2304
2322
|
bidWithWarning: "bid" | "skip";
|
|
2323
|
+
sleepTimezone: string | null;
|
|
2305
2324
|
leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "won", number>> | null;
|
|
2306
2325
|
expenses: {
|
|
2307
2326
|
biddingAmount?: number | undefined;
|
|
@@ -2329,6 +2348,9 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
2329
2348
|
maximumBoost?: number | null | undefined;
|
|
2330
2349
|
boostingThreshold?: number | null | undefined;
|
|
2331
2350
|
biddingDelayInMinutes?: number | undefined;
|
|
2351
|
+
sleepEnabled?: boolean | null | undefined;
|
|
2352
|
+
sleepStartAtHour?: number | null | undefined;
|
|
2353
|
+
sleepEndAtHour?: number | null | undefined;
|
|
2332
2354
|
};
|
|
2333
2355
|
organization: {
|
|
2334
2356
|
type: "agency" | "freelancer";
|
|
@@ -2359,6 +2381,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
2359
2381
|
};
|
|
2360
2382
|
source: "stripe" | "manual";
|
|
2361
2383
|
usage: Partial<Record<"suitabilityComplete" | "proposalComplete" | "biddingComplete", number>>;
|
|
2384
|
+
trialEndsAt: number | null;
|
|
2362
2385
|
} | null;
|
|
2363
2386
|
limits: {
|
|
2364
2387
|
monthlyCredits: number;
|
|
@@ -2376,7 +2399,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
2376
2399
|
lastBidTime: number | null;
|
|
2377
2400
|
nextScheduledBidTime: number | null;
|
|
2378
2401
|
openRouterApiKey: string | null;
|
|
2379
|
-
appTrialEndsAt: number | null;
|
|
2380
2402
|
oneTimePayments?: {
|
|
2381
2403
|
usBidderAccountPayment?: {
|
|
2382
2404
|
status: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.scrapeUserProfilePayloadSchema = exports.scrapePayloadSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.scrapePayloadSchema = zod_1.z.object({
|
|
6
|
+
latestJobsUrls: zod_1.z.array(zod_1.z.string()),
|
|
7
|
+
cookies: zod_1.z.array(zod_1.z.any()),
|
|
8
|
+
username: zod_1.z.string(),
|
|
9
|
+
password: zod_1.z.string(),
|
|
10
|
+
});
|
|
11
|
+
exports.scrapeUserProfilePayloadSchema = zod_1.z.object({
|
|
12
|
+
profileUrl: zod_1.z.string(),
|
|
13
|
+
cookies: zod_1.z.array(zod_1.z.any()),
|
|
14
|
+
username: zod_1.z.string(),
|
|
15
|
+
password: zod_1.z.string(),
|
|
16
|
+
});
|