lancer-shared 1.0.44 → 1.0.46
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const JOB_FILTER_OPTIONS: {
|
|
2
|
+
REGIONS: readonly ["Worldwide", "UKOnly", "USOnly"];
|
|
2
3
|
PROJECT_DURATION: readonly ["Less than 1 month", "1 to 3 months", "3 to 6 months", "More than 6 months", "Unspecified"];
|
|
3
4
|
ENGAGEMENT_TYPE: readonly ["Less than 30 hrs/week", "More than 30 hrs/week", "Unspecified"];
|
|
4
5
|
VENDOR_TYPE: readonly ["Independent", "Agency", "Unspecified"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
export declare const LogEventTypeEnum: z.ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobsIndexed", "jobDuplicateSkipped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const LogEventTypeEnum: z.ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobsIndexed", "jobDuplicateSkipped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
3
3
|
export declare const logEventSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobsIndexed", "jobDuplicateSkipped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
4
|
+
type: z.ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobsIndexed", "jobDuplicateSkipped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
5
5
|
source: z.ZodString;
|
|
6
6
|
resourceType: z.ZodDefault<z.ZodString>;
|
|
7
7
|
resourceId: z.ZodNullable<z.ZodString>;
|
|
@@ -12,7 +12,7 @@ export declare const logEventSchema: z.ZodObject<{
|
|
|
12
12
|
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
13
13
|
timestamp: z.ZodNumber;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
type: "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobsIndexed" | "jobDuplicateSkipped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "manualSuitabilityAnalyzed" | "manualProposalGenerated" | "biddingSkipped" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
15
|
+
type: "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobsIndexed" | "jobDuplicateSkipped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "manualSuitabilityAnalyzed" | "manualProposalGenerated" | "biddingSkipped" | "biddingPending" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
16
16
|
reason: string | null;
|
|
17
17
|
source: string;
|
|
18
18
|
metadata: Record<string, unknown> | null;
|
|
@@ -23,7 +23,7 @@ export declare const logEventSchema: z.ZodObject<{
|
|
|
23
23
|
campaignId: string | null;
|
|
24
24
|
userId: string | null;
|
|
25
25
|
}, {
|
|
26
|
-
type: "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobsIndexed" | "jobDuplicateSkipped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "manualSuitabilityAnalyzed" | "manualProposalGenerated" | "biddingSkipped" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
26
|
+
type: "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobsIndexed" | "jobDuplicateSkipped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "manualSuitabilityAnalyzed" | "manualProposalGenerated" | "biddingSkipped" | "biddingPending" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
27
27
|
reason: string | null;
|
|
28
28
|
source: string;
|
|
29
29
|
metadata: Record<string, unknown> | null;
|
|
@@ -4,37 +4,38 @@ exports.logEventSchema = exports.LogEventTypeEnum = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.LogEventTypeEnum = zod_1.z.enum([
|
|
6
6
|
// Scraper Events
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
'scraperStarted',
|
|
8
|
+
'scraperCompleted',
|
|
9
|
+
'jobScraped',
|
|
10
|
+
'jobsIndexed',
|
|
11
|
+
'jobDuplicateSkipped',
|
|
12
12
|
// Job Sync & Campaign Matching
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
'jobSyncPublished',
|
|
14
|
+
'jobSyncReceived',
|
|
15
|
+
'leadsCreatedAndSynced',
|
|
16
16
|
// Suitability Events
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
'suitabilityPending',
|
|
18
|
+
'suitabilityProcessing',
|
|
19
|
+
'suitabilityComplete',
|
|
20
|
+
'suitabilityFailed',
|
|
21
|
+
'manualSuitabilityAnalyzed',
|
|
22
22
|
// Proposal Events
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
'proposalProcessing',
|
|
24
|
+
'proposalComplete',
|
|
25
|
+
'proposalFailed',
|
|
26
|
+
'manualProposalGenerated',
|
|
27
27
|
// Bidding Events
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
'biddingProcessing',
|
|
29
|
+
'biddingComplete',
|
|
30
|
+
'biddingFailed',
|
|
31
|
+
'biddingSkipped',
|
|
32
|
+
'biddingPending',
|
|
32
33
|
// System/Generic Events
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
'errorLogged',
|
|
35
|
+
'cloudTaskRetry',
|
|
36
|
+
'manualLeadEdited',
|
|
37
|
+
'leadArchived',
|
|
38
|
+
'auditTrailLogged',
|
|
38
39
|
]);
|
|
39
40
|
exports.logEventSchema = zod_1.z.object({
|
|
40
41
|
// The type of event (use a z.enum if possible)
|
|
@@ -42,7 +43,7 @@ exports.logEventSchema = zod_1.z.object({
|
|
|
42
43
|
// The service that triggered the event
|
|
43
44
|
source: zod_1.z.string(), // e.g. "lancer-agents", "lancer-bidding"
|
|
44
45
|
// Optional: Allow logging non-lead events in the future
|
|
45
|
-
resourceType: zod_1.z.string().default(
|
|
46
|
+
resourceType: zod_1.z.string().default('lead'), // e.g. "lead", "campaign", "user"
|
|
46
47
|
// ID of the resource (primary entity affected)
|
|
47
48
|
resourceId: zod_1.z.string().nullable(), // fallback if leadId is not applicable
|
|
48
49
|
// Lead-level metadata
|