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"];
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.JOB_FILTER_OPTIONS = void 0;
4
4
  exports.JOB_FILTER_OPTIONS = {
5
+ REGIONS: ["Worldwide", "UKOnly", "USOnly"],
5
6
  PROJECT_DURATION: [
6
7
  "Less than 1 month",
7
8
  "1 to 3 months",
@@ -1,7 +1,7 @@
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", "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
- "scraperStarted",
8
- "scraperCompleted",
9
- "jobScraped",
10
- "jobsIndexed",
11
- "jobDuplicateSkipped",
7
+ 'scraperStarted',
8
+ 'scraperCompleted',
9
+ 'jobScraped',
10
+ 'jobsIndexed',
11
+ 'jobDuplicateSkipped',
12
12
  // Job Sync & Campaign Matching
13
- "jobSyncPublished",
14
- "jobSyncReceived",
15
- "leadsCreatedAndSynced",
13
+ 'jobSyncPublished',
14
+ 'jobSyncReceived',
15
+ 'leadsCreatedAndSynced',
16
16
  // Suitability Events
17
- "suitabilityPending",
18
- "suitabilityProcessing",
19
- "suitabilityComplete",
20
- "suitabilityFailed",
21
- "manualSuitabilityAnalyzed",
17
+ 'suitabilityPending',
18
+ 'suitabilityProcessing',
19
+ 'suitabilityComplete',
20
+ 'suitabilityFailed',
21
+ 'manualSuitabilityAnalyzed',
22
22
  // Proposal Events
23
- "proposalProcessing",
24
- "proposalComplete",
25
- "proposalFailed",
26
- "manualProposalGenerated",
23
+ 'proposalProcessing',
24
+ 'proposalComplete',
25
+ 'proposalFailed',
26
+ 'manualProposalGenerated',
27
27
  // Bidding Events
28
- "biddingProcessing",
29
- "biddingComplete",
30
- "biddingFailed",
31
- "biddingSkipped",
28
+ 'biddingProcessing',
29
+ 'biddingComplete',
30
+ 'biddingFailed',
31
+ 'biddingSkipped',
32
+ 'biddingPending',
32
33
  // System/Generic Events
33
- "errorLogged",
34
- "cloudTaskRetry",
35
- "manualLeadEdited",
36
- "leadArchived",
37
- "auditTrailLogged",
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("lead"), // e.g. "lead", "campaign", "user"
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
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "lancer-shared",
4
- "version": "1.0.44",
4
+ "version": "1.0.46",
5
5
  "description": "This package contains shared stuff.",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.js",