lancer-shared 1.2.112 → 1.2.114
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 +180 -160
- package/dist/constants/account-status.d.ts +3 -0
- package/dist/constants/account-status.js +17 -0
- package/dist/constants/collections.js +13 -11
- package/dist/constants/common-questions.js +4 -1
- package/dist/constants/index.js +32 -10
- package/dist/constants/job-filter-options.js +4 -1
- package/dist/constants/job-status.js +12 -7
- package/dist/constants/mappings/countryMapping.js +3 -1
- package/dist/constants/mappings/regionMapping.js +3 -1
- package/dist/constants/organization.d.ts +2 -2
- package/dist/constants/proxies.d.ts +4 -0
- package/dist/constants/routes.js +37 -39
- package/dist/constants/upwork-accounts.js +6 -3
- package/dist/constants/upwork-filters.d.ts +5 -0
- package/dist/constants/upwork-filters.js +75 -0
- package/dist/index.js +20 -4
- package/dist/schemas/account/account-status.js +5 -2
- package/dist/schemas/account/bidder-account.d.ts +10 -1
- package/dist/schemas/account/bidder-account.js +24 -22
- package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +5 -0
- package/dist/schemas/account/index.js +19 -3
- package/dist/schemas/account/manager-account.d.ts +116 -0
- package/dist/schemas/account/manager-account.js +38 -0
- package/dist/schemas/account/scraper-account.js +24 -21
- package/dist/schemas/ai/ai-config.js +11 -8
- package/dist/schemas/ai/index.js +19 -3
- package/dist/schemas/ai/proposal.js +13 -10
- package/dist/schemas/ai/suitability.js +11 -8
- package/dist/schemas/ai-config/ai-config.d.ts +39 -0
- package/dist/schemas/ai-config/ai-config.js +12 -0
- package/dist/schemas/ai-config/index.d.ts +1 -0
- package/dist/schemas/ai-config/index.js +17 -0
- package/dist/schemas/bid/bid-result.js +13 -9
- package/dist/schemas/bid/bid-status.d.ts +30 -0
- package/dist/schemas/bid/bid-status.js +15 -0
- package/dist/schemas/bid/bid.js +30 -29
- package/dist/schemas/bid/exceptions/base-exception.d.ts +4 -0
- package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +5 -0
- package/dist/schemas/bid/index.js +18 -2
- package/dist/schemas/bidding/index.d.ts +1 -0
- package/dist/schemas/bidding/index.js +17 -0
- package/dist/schemas/bidding/proposal-bidding-status.d.ts +26 -0
- package/dist/schemas/bidding/proposal-bidding-status.js +18 -0
- package/dist/schemas/bidding/proposal-dto.d.ts +26 -0
- package/dist/schemas/bidding/proposal-dto.js +18 -0
- package/dist/schemas/campaign/campaign-ai-metrics.js +8 -5
- package/dist/schemas/campaign/campaign-analytics.js +31 -32
- package/dist/schemas/campaign/campaign-expenses.js +8 -5
- package/dist/schemas/campaign/campaign-insights.js +30 -30
- package/dist/schemas/campaign/campaign-integrations.d.ts +0 -5
- package/dist/schemas/campaign/campaign-integrations.js +13 -10
- package/dist/schemas/campaign/campaign-job-count.js +6 -3
- package/dist/schemas/campaign/campaign.js +35 -32
- package/dist/schemas/campaign/index.js +23 -7
- package/dist/schemas/chat-message/chat-message.js +10 -7
- package/dist/schemas/chat-message/index.js +17 -1
- package/dist/schemas/config/agency-config.js +9 -6
- package/dist/schemas/config/index.js +17 -1
- package/dist/schemas/index.js +32 -17
- package/dist/schemas/job/index.d.ts +6 -6
- package/dist/schemas/job/index.js +19 -0
- package/dist/schemas/job/job-details.d.ts +335 -0
- package/dist/schemas/job/job-details.js +29 -0
- package/dist/schemas/job/job-note.d.ts +83 -0
- package/dist/schemas/job/job-note.js +30 -0
- package/dist/schemas/job/job-pipeline.d.ts +74 -0
- package/dist/schemas/job/job-pipeline.js +29 -0
- package/dist/schemas/job/job-status.d.ts +3 -0
- package/dist/schemas/job/job-status.js +27 -0
- package/dist/schemas/job/job-suitability.d.ts +12 -0
- package/dist/schemas/job/job-suitability.js +13 -0
- package/dist/schemas/job/job.d.ts +1160 -0
- package/dist/schemas/job/job.js +90 -0
- package/dist/schemas/job/pipeline-job.d.ts +608 -0
- package/dist/schemas/job/pipeline-job.js +43 -0
- package/dist/schemas/job/upwork-job.d.ts +334 -0
- package/dist/schemas/job/upwork-job.js +60 -0
- package/dist/schemas/job-filters/index.js +17 -1
- package/dist/schemas/job-filters/job-filters.js +65 -62
- package/dist/schemas/knowledge-object/index.d.ts +1 -0
- package/dist/schemas/knowledge-object/index.js +17 -0
- package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
- package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
- package/dist/schemas/lead/index.js +19 -173
- package/dist/schemas/lead/lead-note.js +16 -13
- package/dist/schemas/lead/lead-status.js +6 -3
- package/dist/schemas/lead/lead.d.ts +1897 -0
- package/dist/schemas/lead/lead.js +143 -0
- package/dist/schemas/logger/index.js +17 -1
- package/dist/schemas/logger/log-event.d.ts +127 -14
- package/dist/schemas/logger/log-event.js +49 -100
- package/dist/schemas/organization/index.js +17 -70
- package/dist/schemas/organization/organization.d.ts +7 -177
- package/dist/schemas/organization/organization.js +17 -14
- package/dist/schemas/proxy/index.js +17 -3
- package/dist/schemas/proxy/proxy.js +19 -25
- package/dist/schemas/saved-search/index.js +11 -8
- package/dist/schemas/scraper/index.js +18 -2
- package/dist/schemas/scraper/scrape-payload.d.ts +5 -0
- package/dist/schemas/scraper/scrape-payload.js +14 -19
- package/dist/schemas/scraper/scrape-response.d.ts +345 -0
- package/dist/schemas/scraper/scrape-response.js +9 -0
- package/dist/schemas/scraper/scrape-result.js +21 -21
- package/dist/schemas/shared.js +9 -12
- package/dist/schemas/time-filter/index.js +8 -5
- package/dist/schemas/upwork-account/index.d.ts +3 -0
- package/dist/schemas/upwork-account/index.js +19 -0
- package/dist/schemas/upwork-account/upwork-account-status.d.ts +2 -0
- package/dist/schemas/upwork-account/upwork-account-status.js +11 -0
- package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +95 -0
- package/dist/schemas/upwork-account/upwork-business-manager-account.js +35 -0
- package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +92 -0
- package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
- package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
- package/dist/schemas/upwork-account/upwork-scraping-account.js +30 -0
- package/dist/schemas/user/index.js +41 -38
- package/dist/types/account/account-status.js +2 -1
- package/dist/types/account/bidder-account.js +2 -1
- package/dist/types/account/index.js +19 -3
- package/dist/types/account/manager-account.d.ts +7 -0
- package/dist/types/account/manager-account.js +2 -0
- package/dist/types/account/scraper-account.js +2 -1
- package/dist/types/ai/ai-config.js +2 -1
- package/dist/types/ai/index.js +19 -3
- package/dist/types/ai/proposal.js +2 -1
- package/dist/types/ai/suitability.js +2 -1
- package/dist/types/ai-config/ai-config.d.ts +6 -0
- package/dist/types/ai-config/ai-config.js +2 -0
- package/dist/types/ai-config/index.d.ts +1 -0
- package/dist/types/ai-config/index.js +17 -0
- package/dist/types/bid/bid-result.js +2 -1
- package/dist/types/bid/bid-status.d.ts +5 -0
- package/dist/types/bid/bid-status.js +2 -0
- package/dist/types/bid/bid.js +2 -1
- package/dist/types/bid/index.js +18 -2
- package/dist/types/bidding/index.d.ts +1 -0
- package/dist/types/bidding/index.js +17 -0
- package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
- package/dist/types/bidding/proposal-bidding-status.js +2 -0
- package/dist/types/bidding/proposal-dto.d.ts +3 -0
- package/dist/types/bidding/proposal-dto.js +2 -0
- package/dist/types/campaign/campaign-analytics.js +2 -1
- package/dist/types/campaign/campaign-expenses.js +2 -1
- package/dist/types/campaign/campaign-insights.js +2 -1
- package/dist/types/campaign/campaign-integrations.js +2 -1
- package/dist/types/campaign/campaign-job-count.js +2 -1
- package/dist/types/campaign/campaign.js +2 -1
- package/dist/types/campaign/index.js +22 -6
- package/dist/types/chat-message/chat-message.js +2 -1
- package/dist/types/chat-message/index.js +17 -1
- package/dist/types/config/agency-config.js +2 -1
- package/dist/types/config/index.js +17 -1
- package/dist/types/index.js +29 -15
- package/dist/types/job/index.js +19 -3
- package/dist/types/job/job-details.d.ts +36 -0
- package/dist/types/job/job-details.js +2 -0
- package/dist/types/job/job-note.js +2 -1
- package/dist/types/job/job-pipeline.d.ts +4 -0
- package/dist/types/job/job-pipeline.js +2 -0
- package/dist/types/job/job-status.js +4 -1
- package/dist/types/job/job-suitability.d.ts +3 -0
- package/dist/types/job/job-suitability.js +2 -0
- package/dist/types/job/job.d.ts +36 -0
- package/dist/types/job/job.js +2 -0
- package/dist/types/job-filters/index.js +17 -1
- package/dist/types/job-filters/job-filters.js +2 -1
- package/dist/types/knowledge-object/index.d.ts +1 -0
- package/dist/types/knowledge-object/index.js +17 -0
- package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
- package/dist/types/knowledge-object/knowledge-object.js +2 -0
- package/dist/types/logger/index.js +17 -1
- package/dist/types/logger/log-event.js +2 -1
- package/dist/types/saved-search/index.js +2 -1
- package/dist/types/scraper/index.js +18 -2
- package/dist/types/scraper/scrape-payload.js +2 -1
- package/dist/types/scraper/scrape-response.d.ts +4 -0
- package/dist/types/scraper/scrape-response.js +2 -0
- package/dist/types/scraper/scrape-result.js +2 -1
- package/dist/types/time-filter/index.js +2 -1
- package/dist/types/upwork-account/index.d.ts +3 -0
- package/dist/types/upwork-account/index.js +19 -0
- package/dist/types/upwork-account/upwork-account-status.d.ts +3 -0
- package/dist/types/upwork-account/upwork-account-status.js +2 -0
- package/dist/types/upwork-account/upwork-business-manager-account.d.ts +7 -0
- package/dist/types/upwork-account/upwork-business-manager-account.js +2 -0
- package/dist/types/upwork-account/upwork-scraping-account.d.ts +5 -0
- package/dist/types/upwork-account/upwork-scraping-account.js +2 -0
- package/dist/types/user/index.js +2 -1
- package/dist/utils/index.js +17 -1
- package/dist/utils/try-catch.js +23 -8
- package/package.json +1 -1
- package/dist/schemas/event/index.d.ts +0 -58
- package/dist/schemas/job/haha.json +0 -581
- package/dist/schemas/lead/nuxt.js +0 -287
- package/dist/schemas/meter-event/index.d.ts +0 -12
- package/dist/schemas/organization/member.js +0 -7
- package/dist/schemas/organization/subscription.js +0 -17
- package/dist/schemas/proxy/proxy-available-replacements.js +0 -3
- package/dist/schemas/proxy/proxy-country.js +0 -249
- package/dist/schemas/tier/index.d.ts +0 -119
- package/dist/schemas/transaction/index.js +0 -17
- package/dist/schemas/usage/index.js +0 -18
- package/dist/types/job/nuxt.js +0 -1
- package/dist/types/shared.js +0 -1
- package/dist/types/transaction/index.js +0 -1
- package/dist/types/usage/index.js +0 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.leadResponseSchema = exports.jobListItemSchema = exports.leadSchema = exports.upworkJobSchema = exports.metadataSchema = exports.jobActivitySchema = exports.bidRangeSchema = exports.clientReviewSchema = exports.clientInfoSchema = exports.vendorQualificationSchema = exports.jobSkillsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const lead_note_1 = require("./lead-note");
|
|
6
|
+
const lead_status_1 = require("./lead-status");
|
|
7
|
+
const proposal_1 = require("../ai/proposal");
|
|
8
|
+
const scraper_1 = require("../scraper");
|
|
9
|
+
exports.jobSkillsSchema = zod_1.z.object({
|
|
10
|
+
name: zod_1.z.string(),
|
|
11
|
+
});
|
|
12
|
+
exports.vendorQualificationSchema = zod_1.z.object({
|
|
13
|
+
location: zod_1.z.string().nullable(),
|
|
14
|
+
talentType: zod_1.z.enum(["Agency", "Independent", "unspecified"]).nullable(),
|
|
15
|
+
englishLevel: zod_1.z.string().nullable(),
|
|
16
|
+
minimumEarnings: zod_1.z.number().nullable(),
|
|
17
|
+
jobSuccessScore: zod_1.z.string().nullable(),
|
|
18
|
+
includeRisingTalent: zod_1.z.string().nullable(),
|
|
19
|
+
});
|
|
20
|
+
exports.clientInfoSchema = zod_1.z.object({
|
|
21
|
+
isPaymentVerified: zod_1.z.boolean().nullable(),
|
|
22
|
+
isPhoneVerified: zod_1.z.boolean().nullable(),
|
|
23
|
+
numberOfReviews: zod_1.z.number().nullable(),
|
|
24
|
+
rating: zod_1.z.number().nullable(),
|
|
25
|
+
country: zod_1.z.string().nullable(),
|
|
26
|
+
region: zod_1.z.string().nullable(),
|
|
27
|
+
jobsPosted: zod_1.z.number().nullable(),
|
|
28
|
+
totalSpent: zod_1.z.number().nullable(),
|
|
29
|
+
numberOfHires: zod_1.z.number().nullable(),
|
|
30
|
+
activeEngagements: zod_1.z.number().nullable(),
|
|
31
|
+
openJobs: zod_1.z.number().nullable(),
|
|
32
|
+
hireRate: zod_1.z.number().nullable(),
|
|
33
|
+
memberSince: zod_1.z.string().nullable(),
|
|
34
|
+
companyIndustry: zod_1.z.string().nullable(),
|
|
35
|
+
companySize: zod_1.z.string().nullable(),
|
|
36
|
+
enterpriseClient: zod_1.z.boolean().nullable(),
|
|
37
|
+
avgHourlyRatePaid: zod_1.z.number().nullable(),
|
|
38
|
+
});
|
|
39
|
+
exports.clientReviewSchema = zod_1.z.object({
|
|
40
|
+
jobTitle: zod_1.z.string().nullable(),
|
|
41
|
+
freelancerName: zod_1.z.string().nullable(),
|
|
42
|
+
freelancerRating: zod_1.z.number().nullable(),
|
|
43
|
+
freelancerFeedback: zod_1.z.string().nullable(),
|
|
44
|
+
clientFeedback: zod_1.z.string().nullable(),
|
|
45
|
+
clientFeedbackRating: zod_1.z.number().nullable(),
|
|
46
|
+
dateRange: zod_1.z.string().nullable(),
|
|
47
|
+
paymentType: zod_1.z.string().nullable(),
|
|
48
|
+
fixedPrice: zod_1.z.number().nullable(),
|
|
49
|
+
hourlyRate: zod_1.z.number().nullable(),
|
|
50
|
+
numHours: zod_1.z.number().nullable(),
|
|
51
|
+
totalBilled: zod_1.z.number().nullable(),
|
|
52
|
+
});
|
|
53
|
+
exports.bidRangeSchema = zod_1.z.object({
|
|
54
|
+
high: zod_1.z.number().nullable(),
|
|
55
|
+
avg: zod_1.z.number().nullable(),
|
|
56
|
+
low: zod_1.z.number().nullable(),
|
|
57
|
+
});
|
|
58
|
+
exports.jobActivitySchema = zod_1.z.object({
|
|
59
|
+
proposals: zod_1.z.object({
|
|
60
|
+
min: zod_1.z.number().nullable(),
|
|
61
|
+
max: zod_1.z.number().nullable(),
|
|
62
|
+
}),
|
|
63
|
+
lastViewedByClient: zod_1.z.string().nullable(),
|
|
64
|
+
hires: zod_1.z.number().nullable(),
|
|
65
|
+
interviewing: zod_1.z.number().nullable(),
|
|
66
|
+
invitesSent: zod_1.z.number().nullable(),
|
|
67
|
+
unansweredInvites: zod_1.z.number().nullable(),
|
|
68
|
+
updatedAt: zod_1.z.number().nullable(),
|
|
69
|
+
});
|
|
70
|
+
exports.metadataSchema = zod_1.z.object({
|
|
71
|
+
hours: zod_1.z.string().nullable(),
|
|
72
|
+
duration: zod_1.z.string().nullable(),
|
|
73
|
+
experienceLevel: zod_1.z.string().nullable(),
|
|
74
|
+
hourlyRate: zod_1.z
|
|
75
|
+
.object({
|
|
76
|
+
min: zod_1.z.number().nullable(),
|
|
77
|
+
max: zod_1.z.number().nullable(),
|
|
78
|
+
})
|
|
79
|
+
.nullable(),
|
|
80
|
+
paymentType: zod_1.z.string().nullable(),
|
|
81
|
+
fixedPrice: zod_1.z.number().nullable(),
|
|
82
|
+
});
|
|
83
|
+
exports.upworkJobSchema = zod_1.z.object({
|
|
84
|
+
id: zod_1.z.string().nullable(),
|
|
85
|
+
createdAt: zod_1.z.number().nullable(),
|
|
86
|
+
title: zod_1.z.string().nullable(),
|
|
87
|
+
category: zod_1.z.string().nullable(),
|
|
88
|
+
skills: zod_1.z.array(exports.jobSkillsSchema).nullable(),
|
|
89
|
+
datetime: zod_1.z.number().nullable(),
|
|
90
|
+
description: zod_1.z.string().nullable(),
|
|
91
|
+
descriptionLength: zod_1.z.number().nullable(),
|
|
92
|
+
connectsRequired: zod_1.z.number().nullable(),
|
|
93
|
+
projectType: zod_1.z.string().nullable(),
|
|
94
|
+
projectDuration: zod_1.z.string().nullable(),
|
|
95
|
+
questions: zod_1.z.array(zod_1.z.string()).nullable(),
|
|
96
|
+
jobUrl: zod_1.z.string().nullable(),
|
|
97
|
+
metadata: exports.metadataSchema.nullable(),
|
|
98
|
+
clientInfo: exports.clientInfoSchema.nullable(),
|
|
99
|
+
vendorQualifications: exports.vendorQualificationSchema.nullable(),
|
|
100
|
+
processed: (0, zod_1.boolean)().nullable(),
|
|
101
|
+
isFeatured: (0, zod_1.boolean)().nullable(),
|
|
102
|
+
clientReviews: zod_1.z.array(exports.clientReviewSchema).nullable(),
|
|
103
|
+
region: scraper_1.regionSchema.nullable(),
|
|
104
|
+
bidRange: exports.bidRangeSchema.nullable(),
|
|
105
|
+
jobActivity: exports.jobActivitySchema.nullable(),
|
|
106
|
+
activityUpdates: zod_1.z
|
|
107
|
+
// 1 = First scraping, 2 = After 4h, 3 = After 24h
|
|
108
|
+
.union([zod_1.z.literal(1), zod_1.z.literal(2), zod_1.z.literal(3)])
|
|
109
|
+
.nullable(),
|
|
110
|
+
});
|
|
111
|
+
exports.leadSchema = exports.upworkJobSchema
|
|
112
|
+
.extend({
|
|
113
|
+
jobId: zod_1.z.string(),
|
|
114
|
+
updatedAt: zod_1.z.number().nullable(),
|
|
115
|
+
suitabilityRating: zod_1.z.number().nullable(),
|
|
116
|
+
suitabilityReason: zod_1.z.string().nullable(),
|
|
117
|
+
proposal: zod_1.z.string().nullable(),
|
|
118
|
+
questionAnswerPairs: zod_1.z.array(proposal_1.questionAnswerPairSchema).nullable(),
|
|
119
|
+
agentStatus: lead_status_1.agentStatusSchema.nullable(),
|
|
120
|
+
leadStatus: lead_status_1.leadStatusSchema.nullable(),
|
|
121
|
+
notes: zod_1.z.array(lead_note_1.leadNoteSchema).nullable(),
|
|
122
|
+
biddingAmount: (0, zod_1.number)().nullable(),
|
|
123
|
+
boosted: (0, zod_1.boolean)().nullable(),
|
|
124
|
+
boostingAmount: (0, zod_1.number)().nullable(),
|
|
125
|
+
biddingTaskScheduled: (0, zod_1.boolean)().nullable(),
|
|
126
|
+
scheduledBiddingTime: (0, zod_1.number)().nullable(),
|
|
127
|
+
})
|
|
128
|
+
.omit({
|
|
129
|
+
processed: true,
|
|
130
|
+
});
|
|
131
|
+
exports.jobListItemSchema = zod_1.z.object({
|
|
132
|
+
title: zod_1.z.string().nullable(),
|
|
133
|
+
jobUrl: zod_1.z.string().nullable(),
|
|
134
|
+
datetime: zod_1.z.string().nullable(),
|
|
135
|
+
isFeatured: zod_1.z.boolean().nullable(),
|
|
136
|
+
region: scraper_1.regionSchema.nullable(),
|
|
137
|
+
});
|
|
138
|
+
exports.leadResponseSchema = zod_1.z.object({
|
|
139
|
+
leads: zod_1.z.array(exports.leadSchema),
|
|
140
|
+
nextCursor: zod_1.z.string().nullable(),
|
|
141
|
+
hasMore: zod_1.z.boolean(),
|
|
142
|
+
leadCounts: zod_1.z.number().nullable(),
|
|
143
|
+
});
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./log-event"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
export declare const LogEventTypeEnum: z.ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "leadStatusCheckFailed", "leadStatusUpdated", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "biddingRetry", "biddingInsufficientConnects", "biddingWarningAlert", "biddingRejected", "biddingRejectedWithFeedback", "checkSuitableLeadFeedbackStatus", "biddingApproved", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const LogEventTypeEnum: z.ZodEnum<["scraperStarted", "scraperCompleted", "scrapeJobStarted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "leadStatusCheckFailed", "leadStatusUpdated", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "biddingRetry", "biddingInsufficientConnects", "biddingWarningAlert", "biddingRejected", "biddingRejectedWithFeedback", "checkSuitableLeadFeedbackStatus", "biddingApproved", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
3
3
|
export declare const logEventSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "leadStatusCheckFailed", "leadStatusUpdated", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "biddingRetry", "biddingInsufficientConnects", "biddingWarningAlert", "biddingRejected", "biddingRejectedWithFeedback", "checkSuitableLeadFeedbackStatus", "biddingApproved", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
4
|
+
type: z.ZodEnum<["scraperStarted", "scraperCompleted", "scrapeJobStarted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "leadStatusCheckFailed", "leadStatusUpdated", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "biddingRetry", "biddingInsufficientConnects", "biddingWarningAlert", "biddingRejected", "biddingRejectedWithFeedback", "checkSuitableLeadFeedbackStatus", "biddingApproved", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
5
5
|
source: z.ZodString;
|
|
6
6
|
resourceType: z.ZodDefault<z.ZodString>;
|
|
7
7
|
resourceId: z.ZodNullable<z.ZodString>;
|
|
@@ -13,7 +13,7 @@ export declare const logEventSchema: z.ZodObject<{
|
|
|
13
13
|
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
14
14
|
timestamp: z.ZodNumber;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "biddingRejected" | "biddingRejectedWithFeedback" | "checkSuitableLeadFeedbackStatus" | "biddingApproved" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
16
|
+
type: "scraperStarted" | "scraperCompleted" | "scrapeJobStarted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "biddingRejected" | "biddingRejectedWithFeedback" | "checkSuitableLeadFeedbackStatus" | "biddingApproved" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
17
17
|
source: string;
|
|
18
18
|
resourceType: string;
|
|
19
19
|
resourceId: string | null;
|
|
@@ -25,7 +25,7 @@ export declare const logEventSchema: z.ZodObject<{
|
|
|
25
25
|
metadata: Record<string, unknown> | null;
|
|
26
26
|
timestamp: number;
|
|
27
27
|
}, {
|
|
28
|
-
type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "biddingRejected" | "biddingRejectedWithFeedback" | "checkSuitableLeadFeedbackStatus" | "biddingApproved" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
28
|
+
type: "scraperStarted" | "scraperCompleted" | "scrapeJobStarted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "biddingRejected" | "biddingRejectedWithFeedback" | "checkSuitableLeadFeedbackStatus" | "biddingApproved" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
29
29
|
source: string;
|
|
30
30
|
resourceId: string | null;
|
|
31
31
|
organizationId: string | null;
|
|
@@ -82,6 +82,111 @@ export declare const listingScrapedEventMetadata: z.ZodObject<{
|
|
|
82
82
|
region: "USOnly" | "UKOnly" | "Worldwide" | null;
|
|
83
83
|
};
|
|
84
84
|
}>;
|
|
85
|
+
export declare const scrapeJobStartedEventMetadata: z.ZodObject<{
|
|
86
|
+
listing: z.ZodObject<{
|
|
87
|
+
uid: z.ZodNullable<z.ZodString>;
|
|
88
|
+
title: z.ZodNullable<z.ZodString>;
|
|
89
|
+
jobUrl: z.ZodNullable<z.ZodString>;
|
|
90
|
+
datetime: z.ZodNullable<z.ZodString>;
|
|
91
|
+
isFeatured: z.ZodNullable<z.ZodBoolean>;
|
|
92
|
+
region: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"USOnly">, z.ZodLiteral<"UKOnly">, z.ZodLiteral<"Worldwide">]>>;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
uid: string | null;
|
|
95
|
+
title: string | null;
|
|
96
|
+
jobUrl: string | null;
|
|
97
|
+
datetime: string | null;
|
|
98
|
+
isFeatured: boolean | null;
|
|
99
|
+
region: "USOnly" | "UKOnly" | "Worldwide" | null;
|
|
100
|
+
}, {
|
|
101
|
+
uid: string | null;
|
|
102
|
+
title: string | null;
|
|
103
|
+
jobUrl: string | null;
|
|
104
|
+
datetime: string | null;
|
|
105
|
+
isFeatured: boolean | null;
|
|
106
|
+
region: "USOnly" | "UKOnly" | "Worldwide" | null;
|
|
107
|
+
}>;
|
|
108
|
+
region: z.ZodUnion<[z.ZodLiteral<"USOnly">, z.ZodLiteral<"UKOnly">, z.ZodLiteral<"Worldwide">]>;
|
|
109
|
+
accountId: z.ZodString;
|
|
110
|
+
accountEmail: z.ZodString;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
region: "USOnly" | "UKOnly" | "Worldwide";
|
|
113
|
+
listing: {
|
|
114
|
+
uid: string | null;
|
|
115
|
+
title: string | null;
|
|
116
|
+
jobUrl: string | null;
|
|
117
|
+
datetime: string | null;
|
|
118
|
+
isFeatured: boolean | null;
|
|
119
|
+
region: "USOnly" | "UKOnly" | "Worldwide" | null;
|
|
120
|
+
};
|
|
121
|
+
accountId: string;
|
|
122
|
+
accountEmail: string;
|
|
123
|
+
}, {
|
|
124
|
+
region: "USOnly" | "UKOnly" | "Worldwide";
|
|
125
|
+
listing: {
|
|
126
|
+
uid: string | null;
|
|
127
|
+
title: string | null;
|
|
128
|
+
jobUrl: string | null;
|
|
129
|
+
datetime: string | null;
|
|
130
|
+
isFeatured: boolean | null;
|
|
131
|
+
region: "USOnly" | "UKOnly" | "Worldwide" | null;
|
|
132
|
+
};
|
|
133
|
+
accountId: string;
|
|
134
|
+
accountEmail: string;
|
|
135
|
+
}>;
|
|
136
|
+
export declare const scrapeJobFailedEventMetadata: z.ZodObject<{
|
|
137
|
+
listing: z.ZodObject<{
|
|
138
|
+
uid: z.ZodNullable<z.ZodString>;
|
|
139
|
+
title: z.ZodNullable<z.ZodString>;
|
|
140
|
+
jobUrl: z.ZodNullable<z.ZodString>;
|
|
141
|
+
datetime: z.ZodNullable<z.ZodString>;
|
|
142
|
+
isFeatured: z.ZodNullable<z.ZodBoolean>;
|
|
143
|
+
region: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"USOnly">, z.ZodLiteral<"UKOnly">, z.ZodLiteral<"Worldwide">]>>;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
uid: string | null;
|
|
146
|
+
title: string | null;
|
|
147
|
+
jobUrl: string | null;
|
|
148
|
+
datetime: string | null;
|
|
149
|
+
isFeatured: boolean | null;
|
|
150
|
+
region: "USOnly" | "UKOnly" | "Worldwide" | null;
|
|
151
|
+
}, {
|
|
152
|
+
uid: string | null;
|
|
153
|
+
title: string | null;
|
|
154
|
+
jobUrl: string | null;
|
|
155
|
+
datetime: string | null;
|
|
156
|
+
isFeatured: boolean | null;
|
|
157
|
+
region: "USOnly" | "UKOnly" | "Worldwide" | null;
|
|
158
|
+
}>;
|
|
159
|
+
region: z.ZodUnion<[z.ZodLiteral<"USOnly">, z.ZodLiteral<"UKOnly">, z.ZodLiteral<"Worldwide">]>;
|
|
160
|
+
accountId: z.ZodString;
|
|
161
|
+
accountEmail: z.ZodString;
|
|
162
|
+
error: z.ZodString;
|
|
163
|
+
}, "strip", z.ZodTypeAny, {
|
|
164
|
+
region: "USOnly" | "UKOnly" | "Worldwide";
|
|
165
|
+
listing: {
|
|
166
|
+
uid: string | null;
|
|
167
|
+
title: string | null;
|
|
168
|
+
jobUrl: string | null;
|
|
169
|
+
datetime: string | null;
|
|
170
|
+
isFeatured: boolean | null;
|
|
171
|
+
region: "USOnly" | "UKOnly" | "Worldwide" | null;
|
|
172
|
+
};
|
|
173
|
+
accountId: string;
|
|
174
|
+
accountEmail: string;
|
|
175
|
+
error: string;
|
|
176
|
+
}, {
|
|
177
|
+
region: "USOnly" | "UKOnly" | "Worldwide";
|
|
178
|
+
listing: {
|
|
179
|
+
uid: string | null;
|
|
180
|
+
title: string | null;
|
|
181
|
+
jobUrl: string | null;
|
|
182
|
+
datetime: string | null;
|
|
183
|
+
isFeatured: boolean | null;
|
|
184
|
+
region: "USOnly" | "UKOnly" | "Worldwide" | null;
|
|
185
|
+
};
|
|
186
|
+
accountId: string;
|
|
187
|
+
accountEmail: string;
|
|
188
|
+
error: string;
|
|
189
|
+
}>;
|
|
85
190
|
export declare const jobActivityScrapedEventMetadata: z.ZodObject<{
|
|
86
191
|
activity: z.ZodObject<{
|
|
87
192
|
proposals: z.ZodObject<{
|
|
@@ -228,21 +333,27 @@ export declare const feedScrapeStartedEventMetadata: z.ZodObject<{
|
|
|
228
333
|
export declare const feedScrapeCompletedEventMetadata: z.ZodObject<{
|
|
229
334
|
id: z.ZodString;
|
|
230
335
|
endTime: z.ZodNumber;
|
|
336
|
+
listingCount: z.ZodNumber;
|
|
337
|
+
duration: z.ZodString;
|
|
338
|
+
accountEmail: z.ZodString;
|
|
231
339
|
region: z.ZodUnion<[z.ZodLiteral<"USOnly">, z.ZodLiteral<"UKOnly">, z.ZodLiteral<"Worldwide">]>;
|
|
232
340
|
durationMillis: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
233
|
-
duration: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
234
341
|
}, "strip", z.ZodTypeAny, {
|
|
235
342
|
region: "USOnly" | "UKOnly" | "Worldwide";
|
|
343
|
+
accountEmail: string;
|
|
236
344
|
id: string;
|
|
237
345
|
endTime: number;
|
|
346
|
+
listingCount: number;
|
|
347
|
+
duration: string;
|
|
238
348
|
durationMillis?: number | null | undefined;
|
|
239
|
-
duration?: string | null | undefined;
|
|
240
349
|
}, {
|
|
241
350
|
region: "USOnly" | "UKOnly" | "Worldwide";
|
|
351
|
+
accountEmail: string;
|
|
242
352
|
id: string;
|
|
243
353
|
endTime: number;
|
|
354
|
+
listingCount: number;
|
|
355
|
+
duration: string;
|
|
244
356
|
durationMillis?: number | null | undefined;
|
|
245
|
-
duration?: string | null | undefined;
|
|
246
357
|
}>;
|
|
247
358
|
export declare const biddingCompletedEventMetadata: z.ZodObject<{
|
|
248
359
|
biddingAmount: z.ZodNumber;
|
|
@@ -334,6 +445,8 @@ export declare const biddingRejectedWithFeedbackEventMetadata: z.ZodObject<{
|
|
|
334
445
|
export type LogEventType = z.infer<typeof LogEventTypeEnum>;
|
|
335
446
|
export type LogEvent = z.infer<typeof logEventSchema>;
|
|
336
447
|
export type ListingScrapedEventMetadata = z.infer<typeof listingScrapedEventMetadata>;
|
|
448
|
+
export type ScrapeJobStartedEventMetadata = z.infer<typeof scrapeJobStartedEventMetadata>;
|
|
449
|
+
export type ScrapeJobFailedEventMetadata = z.infer<typeof scrapeJobFailedEventMetadata>;
|
|
337
450
|
export type JobActivityScrapedEventMetadata = z.infer<typeof jobActivityScrapedEventMetadata>;
|
|
338
451
|
export type JobActivityScrapeFailedEventMetadata = z.infer<typeof jobActivityScrapeFailedEventMetadata>;
|
|
339
452
|
export type FeedScrapeStartedEventMetadata = z.infer<typeof feedScrapeStartedEventMetadata>;
|
|
@@ -552,7 +665,7 @@ export declare const proposalCompleteEventMetadataSchema: z.ZodObject<{
|
|
|
552
665
|
}>;
|
|
553
666
|
export type ProposalCompleteEventMetadata = z.infer<typeof proposalCompleteEventMetadataSchema>;
|
|
554
667
|
export declare const eventLoggerPayloadSchema: z.ZodUnion<[z.ZodObject<{
|
|
555
|
-
type: z.ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "leadStatusCheckFailed", "leadStatusUpdated", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "biddingRetry", "biddingInsufficientConnects", "biddingWarningAlert", "biddingRejected", "biddingRejectedWithFeedback", "checkSuitableLeadFeedbackStatus", "biddingApproved", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
668
|
+
type: z.ZodEnum<["scraperStarted", "scraperCompleted", "scrapeJobStarted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "leadStatusCheckFailed", "leadStatusUpdated", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "biddingRetry", "biddingInsufficientConnects", "biddingWarningAlert", "biddingRejected", "biddingRejectedWithFeedback", "checkSuitableLeadFeedbackStatus", "biddingApproved", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
556
669
|
source: z.ZodString;
|
|
557
670
|
resourceType: z.ZodDefault<z.ZodString>;
|
|
558
671
|
resourceId: z.ZodNullable<z.ZodString>;
|
|
@@ -564,7 +677,7 @@ export declare const eventLoggerPayloadSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
564
677
|
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
565
678
|
timestamp: z.ZodNumber;
|
|
566
679
|
}, "strip", z.ZodTypeAny, {
|
|
567
|
-
type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "biddingRejected" | "biddingRejectedWithFeedback" | "checkSuitableLeadFeedbackStatus" | "biddingApproved" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
680
|
+
type: "scraperStarted" | "scraperCompleted" | "scrapeJobStarted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "biddingRejected" | "biddingRejectedWithFeedback" | "checkSuitableLeadFeedbackStatus" | "biddingApproved" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
568
681
|
source: string;
|
|
569
682
|
resourceType: string;
|
|
570
683
|
resourceId: string | null;
|
|
@@ -576,7 +689,7 @@ export declare const eventLoggerPayloadSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
576
689
|
metadata: Record<string, unknown> | null;
|
|
577
690
|
timestamp: number;
|
|
578
691
|
}, {
|
|
579
|
-
type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "biddingRejected" | "biddingRejectedWithFeedback" | "checkSuitableLeadFeedbackStatus" | "biddingApproved" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
692
|
+
type: "scraperStarted" | "scraperCompleted" | "scrapeJobStarted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "biddingRejected" | "biddingRejectedWithFeedback" | "checkSuitableLeadFeedbackStatus" | "biddingApproved" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
580
693
|
source: string;
|
|
581
694
|
resourceId: string | null;
|
|
582
695
|
organizationId: string | null;
|
|
@@ -588,7 +701,7 @@ export declare const eventLoggerPayloadSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
588
701
|
timestamp: number;
|
|
589
702
|
resourceType?: string | undefined;
|
|
590
703
|
}>, z.ZodArray<z.ZodObject<{
|
|
591
|
-
type: z.ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "leadStatusCheckFailed", "leadStatusUpdated", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "biddingRetry", "biddingInsufficientConnects", "biddingWarningAlert", "biddingRejected", "biddingRejectedWithFeedback", "checkSuitableLeadFeedbackStatus", "biddingApproved", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
704
|
+
type: z.ZodEnum<["scraperStarted", "scraperCompleted", "scrapeJobStarted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "leadStatusCheckFailed", "leadStatusUpdated", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "biddingRetry", "biddingInsufficientConnects", "biddingWarningAlert", "biddingRejected", "biddingRejectedWithFeedback", "checkSuitableLeadFeedbackStatus", "biddingApproved", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
592
705
|
source: z.ZodString;
|
|
593
706
|
resourceType: z.ZodDefault<z.ZodString>;
|
|
594
707
|
resourceId: z.ZodNullable<z.ZodString>;
|
|
@@ -600,7 +713,7 @@ export declare const eventLoggerPayloadSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
600
713
|
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
601
714
|
timestamp: z.ZodNumber;
|
|
602
715
|
}, "strip", z.ZodTypeAny, {
|
|
603
|
-
type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "biddingRejected" | "biddingRejectedWithFeedback" | "checkSuitableLeadFeedbackStatus" | "biddingApproved" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
716
|
+
type: "scraperStarted" | "scraperCompleted" | "scrapeJobStarted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "biddingRejected" | "biddingRejectedWithFeedback" | "checkSuitableLeadFeedbackStatus" | "biddingApproved" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
604
717
|
source: string;
|
|
605
718
|
resourceType: string;
|
|
606
719
|
resourceId: string | null;
|
|
@@ -612,7 +725,7 @@ export declare const eventLoggerPayloadSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
612
725
|
metadata: Record<string, unknown> | null;
|
|
613
726
|
timestamp: number;
|
|
614
727
|
}, {
|
|
615
|
-
type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "biddingRejected" | "biddingRejectedWithFeedback" | "checkSuitableLeadFeedbackStatus" | "biddingApproved" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
728
|
+
type: "scraperStarted" | "scraperCompleted" | "scrapeJobStarted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "biddingRejected" | "biddingRejectedWithFeedback" | "checkSuitableLeadFeedbackStatus" | "biddingApproved" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
616
729
|
source: string;
|
|
617
730
|
resourceId: string | null;
|
|
618
731
|
organizationId: string | null;
|
|
@@ -1,117 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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([
|
|
5
6
|
// Scraper Events
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// Feed Scraper Events
|
|
16
|
-
'feedScrapeStarted',
|
|
17
|
-
'feedScrapeCompleted',
|
|
18
|
-
'feedScrapeFailed',
|
|
19
|
-
'jobListingScraped',
|
|
7
|
+
"scraperStarted",
|
|
8
|
+
"scraperCompleted",
|
|
9
|
+
"jobScraped",
|
|
10
|
+
"jobsIndexed",
|
|
11
|
+
"jobDuplicateSkipped",
|
|
12
|
+
"scraperFailed",
|
|
13
|
+
"userProfileScrapingStarted",
|
|
14
|
+
"userProfileScrapingComplete",
|
|
15
|
+
"userProfileScrapingFailed",
|
|
20
16
|
// Job Sync & Campaign Matching
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
"jobSyncPublished",
|
|
18
|
+
"jobSyncReceived",
|
|
19
|
+
"leadsCreatedAndSynced",
|
|
24
20
|
// Suitability Events
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
"suitabilityPending",
|
|
22
|
+
"suitabilityProcessing",
|
|
23
|
+
"suitabilityComplete",
|
|
24
|
+
"suitabilityFailed",
|
|
25
|
+
"manualSuitabilityAnalyzed",
|
|
30
26
|
// Proposal Events
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
"proposalProcessing",
|
|
28
|
+
"proposalComplete",
|
|
29
|
+
"proposalFailed",
|
|
30
|
+
"manualProposalGenerated",
|
|
35
31
|
// Bidding Events
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
'biddingRetry',
|
|
42
|
-
'biddingInsufficientConnects',
|
|
43
|
-
'biddingWarningAlert',
|
|
32
|
+
"biddingProcessing",
|
|
33
|
+
"biddingComplete",
|
|
34
|
+
"biddingFailed",
|
|
35
|
+
"biddingSkipped",
|
|
36
|
+
"biddingPending",
|
|
44
37
|
// System/Generic Events
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
"errorLogged",
|
|
39
|
+
"cloudTaskRetry",
|
|
40
|
+
"manualLeadEdited",
|
|
41
|
+
"leadArchived",
|
|
42
|
+
"auditTrailLogged",
|
|
50
43
|
// Knowledge Base Events
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
// Model Chain Events
|
|
54
|
-
'modelFailed',
|
|
44
|
+
"knowledgeBaseGenerationComplete",
|
|
45
|
+
"knowledgeBaseGenerationFailed",
|
|
55
46
|
]);
|
|
56
|
-
|
|
47
|
+
exports.logEventSchema = zod_1.z.object({
|
|
57
48
|
// The type of event (use a z.enum if possible)
|
|
58
|
-
type: LogEventTypeEnum, // e.g. "suitability-failed", "proposal-generated"
|
|
49
|
+
type: exports.LogEventTypeEnum, // e.g. "suitability-failed", "proposal-generated"
|
|
59
50
|
// The service that triggered the event
|
|
60
|
-
source: z.string(), // e.g. "lancer-agents", "lancer-bidding"
|
|
51
|
+
source: zod_1.z.string(), // e.g. "lancer-agents", "lancer-bidding"
|
|
61
52
|
// Optional: Allow logging non-lead events in the future
|
|
62
|
-
resourceType: z.string().default(
|
|
53
|
+
resourceType: zod_1.z.string().default("lead"), // e.g. "lead", "campaign", "user"
|
|
63
54
|
// ID of the resource (primary entity affected)
|
|
64
|
-
resourceId: z.string().nullable(), // fallback if leadId is not applicable
|
|
55
|
+
resourceId: zod_1.z.string().nullable(), // fallback if leadId is not applicable
|
|
65
56
|
// Lead-level metadata
|
|
66
|
-
leadId: z.string().nullable(),
|
|
67
|
-
campaignId: z.string().nullable(),
|
|
68
|
-
userId: z.string().nullable(),
|
|
57
|
+
leadId: zod_1.z.string().nullable(),
|
|
58
|
+
campaignId: zod_1.z.string().nullable(),
|
|
59
|
+
userId: zod_1.z.string().nullable(),
|
|
69
60
|
// Reason or message for the event
|
|
70
|
-
reason: z.string().nullable(),
|
|
61
|
+
reason: zod_1.z.string().nullable(),
|
|
71
62
|
// Generic metadata (stacktrace, score, raw request, etc.)
|
|
72
|
-
metadata: z.record(z.unknown()).nullable(),
|
|
63
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).nullable(),
|
|
73
64
|
// Optional timestamp override
|
|
74
|
-
timestamp: z.number(),
|
|
75
|
-
});
|
|
76
|
-
export const listingScrapedEventMetadata = object({
|
|
77
|
-
listing: jobListingSchema,
|
|
78
|
-
region: regionSchema,
|
|
79
|
-
});
|
|
80
|
-
export const jobActivityScrapedEventMetadata = object({
|
|
81
|
-
activity: jobActivitySchema,
|
|
82
|
-
region: regionSchema,
|
|
83
|
-
offsetHour: jobActivityOffsetHourSchema,
|
|
84
|
-
scrapedAt: number(),
|
|
85
|
-
});
|
|
86
|
-
export const jobActivityScrapeFailedEventMetadata = object({
|
|
87
|
-
listing: jobListingSchema,
|
|
88
|
-
region: regionSchema,
|
|
89
|
-
offsetHour: jobActivityOffsetHourSchema,
|
|
90
|
-
});
|
|
91
|
-
export const feedScrapeStartedEventMetadata = object({
|
|
92
|
-
id: string(),
|
|
93
|
-
startTime: number(),
|
|
94
|
-
region: regionSchema,
|
|
95
|
-
});
|
|
96
|
-
export const feedScrapeCompletedEventMetadata = object({
|
|
97
|
-
id: string(),
|
|
98
|
-
endTime: number(),
|
|
99
|
-
region: regionSchema,
|
|
100
|
-
accountUsername: string(),
|
|
101
|
-
});
|
|
102
|
-
export const biddingCompletedEventMetadata = object({
|
|
103
|
-
biddingAmount: number(),
|
|
104
|
-
boosted: boolean(),
|
|
105
|
-
boostingAmount: number(),
|
|
106
|
-
});
|
|
107
|
-
export const biddingFailedEventMetadata = object({
|
|
108
|
-
errorType: string(),
|
|
109
|
-
errorMessage: string(),
|
|
110
|
-
context: z.string().optional(),
|
|
111
|
-
});
|
|
112
|
-
export const biddingWarningAlertEventMetadata = object({
|
|
113
|
-
warningMessage: string(),
|
|
114
|
-
});
|
|
115
|
-
export const biddingRetryEventMetadata = object({
|
|
116
|
-
errorMessage: string(),
|
|
65
|
+
timestamp: zod_1.z.number(),
|
|
117
66
|
});
|