lancer-shared 1.0.11 → 1.0.12

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,4 @@
1
- import { JobLeadStatus } from "../types";
2
- export declare const jobStatusOrder: JobLeadStatus[];
3
- export declare const getPreviousStatus: (status: JobLeadStatus) => JobLeadStatus | null;
4
- export declare const getNextStatus: (status: JobLeadStatus) => JobLeadStatus | null;
1
+ import { LeadStatus } from "../types";
2
+ export declare const jobStatusOrder: LeadStatus[];
3
+ export declare const getPreviousStatus: (status: LeadStatus) => LeadStatus | null;
4
+ export declare const getNextStatus: (status: LeadStatus) => LeadStatus | null;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { z } from "zod";
2
2
  export declare const campaignCountByStatusSchema: z.ZodObject<{
3
3
  [x: string]: z.ZodObject<{
4
4
  boosted: z.ZodNumber;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.campaignInsightsSchema = exports.campaignCountByStatusSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const job_1 = require("../job");
6
- exports.campaignCountByStatusSchema = zod_1.z.object(Object.assign({}, Object.fromEntries(Object.values(job_1.jobStatusSchema.enum).map((status) => [
5
+ const lead_1 = require("../lead");
6
+ exports.campaignCountByStatusSchema = zod_1.z.object(Object.assign({}, Object.fromEntries(Object.values(lead_1.agentStatusSchema.enum).map((status) => [
7
7
  status,
8
8
  zod_1.z.object({
9
9
  boosted: zod_1.z.number(),
@@ -1,2 +1,2 @@
1
- import { z } from 'zod';
2
- export declare const campaignJobCountSchema: z.ZodRecord<z.ZodEnum<["suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "proposalPending", "proposalProcessing", "proposalComplete", "biddingPending", "biddingProcessing", "biddingComplete", "biddingFailed", "jobArchived"]>, z.ZodNumber>;
1
+ import { z } from "zod";
2
+ export declare const campaignJobCountSchema: z.ZodRecord<z.ZodEnum<["leads", "contacted", "viewed", "replied", "negotiations", "won", "lost"]>, z.ZodNumber>;
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.campaignJobCountSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const job_1 = require("../job");
6
- exports.campaignJobCountSchema = zod_1.z.record(job_1.jobStatusSchema, zod_1.z.number());
5
+ const lead_1 = require("../lead");
6
+ exports.campaignJobCountSchema = zod_1.z.record(lead_1.leadStatusSchema, zod_1.z.number());
@@ -248,7 +248,6 @@ export declare const campaignSchema: z.ZodObject<{
248
248
  name: string;
249
249
  createdAt: Date;
250
250
  updatedAt: Date;
251
- jobCounts: Partial<Record<"suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalPending" | "proposalProcessing" | "proposalComplete" | "biddingPending" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "jobArchived", number>> | null;
252
251
  filters: {
253
252
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
254
253
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -298,6 +297,7 @@ export declare const campaignSchema: z.ZodObject<{
298
297
  monthlyBudget: number | null;
299
298
  suitabilityThreshold: number | null;
300
299
  boostingThreshold: number | null;
300
+ jobCounts: Partial<Record<"suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalPending" | "proposalProcessing" | "proposalComplete" | "biddingPending" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "jobArchived", number>> | null;
301
301
  expenses: {
302
302
  biddingAmount: number;
303
303
  boosted: number;
@@ -318,7 +318,6 @@ export declare const campaignSchema: z.ZodObject<{
318
318
  name: string;
319
319
  createdAt: Date;
320
320
  updatedAt: Date;
321
- jobCounts: Partial<Record<"suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalPending" | "proposalProcessing" | "proposalComplete" | "biddingPending" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "jobArchived", number>> | null;
322
321
  filters: {
323
322
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
324
323
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -363,6 +362,7 @@ export declare const campaignSchema: z.ZodObject<{
363
362
  automatedBidding: boolean | null;
364
363
  webhookUrl: string | null;
365
364
  monthlyBudget: number | null;
365
+ jobCounts: Partial<Record<"suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalPending" | "proposalProcessing" | "proposalComplete" | "biddingPending" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "jobArchived", number>> | null;
366
366
  expenses: {
367
367
  biddingAmount?: number | undefined;
368
368
  boosted?: number | undefined;
@@ -630,7 +630,6 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
630
630
  }>;
631
631
  }, "id" | "createdAt" | "updatedAt">, "strip", z.ZodTypeAny, {
632
632
  name: string;
633
- jobCounts: Partial<Record<"suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalPending" | "proposalProcessing" | "proposalComplete" | "biddingPending" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "jobArchived", number>> | null;
634
633
  filters: {
635
634
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
636
635
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -680,6 +679,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
680
679
  monthlyBudget: number | null;
681
680
  suitabilityThreshold: number | null;
682
681
  boostingThreshold: number | null;
682
+ jobCounts: Partial<Record<"suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalPending" | "proposalProcessing" | "proposalComplete" | "biddingPending" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "jobArchived", number>> | null;
683
683
  expenses: {
684
684
  biddingAmount: number;
685
685
  boosted: number;
@@ -697,7 +697,6 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
697
697
  };
698
698
  }, {
699
699
  name: string;
700
- jobCounts: Partial<Record<"suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalPending" | "proposalProcessing" | "proposalComplete" | "biddingPending" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "jobArchived", number>> | null;
701
700
  filters: {
702
701
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
703
702
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -742,6 +741,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
742
741
  automatedBidding: boolean | null;
743
742
  webhookUrl: string | null;
744
743
  monthlyBudget: number | null;
744
+ jobCounts: Partial<Record<"suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalPending" | "proposalProcessing" | "proposalComplete" | "biddingPending" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "jobArchived", number>> | null;
745
745
  expenses: {
746
746
  biddingAmount?: number | undefined;
747
747
  boosted?: number | undefined;
@@ -1010,7 +1010,6 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
1010
1010
  }, "createdAt" | "updatedAt">, "strip", z.ZodTypeAny, {
1011
1011
  id: string;
1012
1012
  name: string;
1013
- jobCounts: Partial<Record<"suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalPending" | "proposalProcessing" | "proposalComplete" | "biddingPending" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "jobArchived", number>> | null;
1014
1013
  filters: {
1015
1014
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
1016
1015
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -1060,6 +1059,7 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
1060
1059
  monthlyBudget: number | null;
1061
1060
  suitabilityThreshold: number | null;
1062
1061
  boostingThreshold: number | null;
1062
+ jobCounts: Partial<Record<"suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalPending" | "proposalProcessing" | "proposalComplete" | "biddingPending" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "jobArchived", number>> | null;
1063
1063
  expenses: {
1064
1064
  biddingAmount: number;
1065
1065
  boosted: number;
@@ -1078,7 +1078,6 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
1078
1078
  }, {
1079
1079
  id: string;
1080
1080
  name: string;
1081
- jobCounts: Partial<Record<"suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalPending" | "proposalProcessing" | "proposalComplete" | "biddingPending" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "jobArchived", number>> | null;
1082
1081
  filters: {
1083
1082
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
1084
1083
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -1123,6 +1122,7 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
1123
1122
  automatedBidding: boolean | null;
1124
1123
  webhookUrl: string | null;
1125
1124
  monthlyBudget: number | null;
1125
+ jobCounts: Partial<Record<"suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalPending" | "proposalProcessing" | "proposalComplete" | "biddingPending" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "jobArchived", number>> | null;
1126
1126
  expenses: {
1127
1127
  biddingAmount?: number | undefined;
1128
1128
  boosted?: number | undefined;
@@ -4,7 +4,7 @@ exports.updateCampaignSchema = exports.createCampaignSchema = exports.campaignSc
4
4
  const zod_1 = require("zod");
5
5
  const job_filters_1 = require("../job-filters");
6
6
  const shared_1 = require("../shared");
7
- const job_1 = require("../job");
7
+ const lead_1 = require("../lead");
8
8
  const campaign_expenses_1 = require("./campaign-expenses");
9
9
  const campaign_integrations_1 = require("./campaign-integrations");
10
10
  exports.campaignSchema = zod_1.z.object({
@@ -22,7 +22,7 @@ exports.campaignSchema = zod_1.z.object({
22
22
  monthlyBudget: zod_1.z.number().nullable(),
23
23
  suitabilityThreshold: zod_1.z.number().min(0).max(100).nullable().default(0),
24
24
  boostingThreshold: zod_1.z.number().min(0).max(100).nullable().default(0),
25
- jobCounts: zod_1.z.record(job_1.jobStatusSchema, zod_1.z.number()).nullable(),
25
+ jobCounts: zod_1.z.record(lead_1.agentStatusSchema, zod_1.z.number()).nullable(),
26
26
  expenses: campaign_expenses_1.campaignExpensesSchema,
27
27
  integrations: campaign_integrations_1.campaignIntegrationsSchema,
28
28
  });
@@ -1,10 +1,10 @@
1
- export * from './job';
2
- export * from './saved-search';
3
- export * from './shared';
4
- export * from './user';
5
- export * from './chat-message';
6
- export * from './job-filters';
7
- export * from './campaign';
8
- export * from './ai';
9
- export * from './bidding';
10
- export * from './scraper';
1
+ export * from "./lead";
2
+ export * from "./saved-search";
3
+ export * from "./shared";
4
+ export * from "./user";
5
+ export * from "./chat-message";
6
+ export * from "./job-filters";
7
+ export * from "./campaign";
8
+ export * from "./ai";
9
+ export * from "./bidding";
10
+ export * from "./scraper";
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./job"), exports);
17
+ __exportStar(require("./lead"), exports);
18
18
  __exportStar(require("./saved-search"), exports);
19
19
  __exportStar(require("./shared"), exports);
20
20
  __exportStar(require("./user"), exports);
@@ -0,0 +1,3 @@
1
+ export * from "./lead";
2
+ export * from "./lead-note";
3
+ export * from "./lead-status";
@@ -0,0 +1,19 @@
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("./lead"), exports);
18
+ __exportStar(require("./lead-note"), exports);
19
+ __exportStar(require("./lead-status"), exports);
@@ -0,0 +1,83 @@
1
+ import { z } from "zod";
2
+ export declare const leadNoteSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ jobId: z.ZodString;
5
+ content: z.ZodString;
6
+ order: z.ZodNumber;
7
+ bgColor: z.ZodString;
8
+ createdAt: z.ZodNumber;
9
+ updatedAt: z.ZodNumber;
10
+ }, "strip", z.ZodTypeAny, {
11
+ id: string;
12
+ content: string;
13
+ order: number;
14
+ jobId: string;
15
+ bgColor: string;
16
+ createdAt: number;
17
+ updatedAt: number;
18
+ }, {
19
+ id: string;
20
+ content: string;
21
+ order: number;
22
+ jobId: string;
23
+ bgColor: string;
24
+ createdAt: number;
25
+ updatedAt: number;
26
+ }>;
27
+ export declare const createLeadNoteSchema: z.ZodObject<Pick<{
28
+ id: z.ZodString;
29
+ jobId: z.ZodString;
30
+ content: z.ZodString;
31
+ order: z.ZodNumber;
32
+ bgColor: z.ZodString;
33
+ createdAt: z.ZodNumber;
34
+ updatedAt: z.ZodNumber;
35
+ }, "id" | "content" | "order" | "bgColor">, "strip", z.ZodTypeAny, {
36
+ id: string;
37
+ content: string;
38
+ order: number;
39
+ bgColor: string;
40
+ }, {
41
+ id: string;
42
+ content: string;
43
+ order: number;
44
+ bgColor: string;
45
+ }>;
46
+ export declare const updateLeadNoteSchema: z.ZodObject<{
47
+ id: z.ZodString;
48
+ content: z.ZodOptional<z.ZodString>;
49
+ order: z.ZodOptional<z.ZodNumber>;
50
+ bgColor: z.ZodOptional<z.ZodString>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ id: string;
53
+ content?: string | undefined;
54
+ order?: number | undefined;
55
+ bgColor?: string | undefined;
56
+ }, {
57
+ id: string;
58
+ content?: string | undefined;
59
+ order?: number | undefined;
60
+ bgColor?: string | undefined;
61
+ }>;
62
+ export declare const updateLeadNotesOrderSchema: z.ZodObject<{
63
+ order: z.ZodArray<z.ZodObject<{
64
+ id: z.ZodString;
65
+ order: z.ZodNumber;
66
+ }, "strip", z.ZodTypeAny, {
67
+ id: string;
68
+ order: number;
69
+ }, {
70
+ id: string;
71
+ order: number;
72
+ }>, "many">;
73
+ }, "strip", z.ZodTypeAny, {
74
+ order: {
75
+ id: string;
76
+ order: number;
77
+ }[];
78
+ }, {
79
+ order: {
80
+ id: string;
81
+ order: number;
82
+ }[];
83
+ }>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateLeadNotesOrderSchema = exports.updateLeadNoteSchema = exports.createLeadNoteSchema = exports.leadNoteSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.leadNoteSchema = zod_1.z.object({
6
+ id: zod_1.z.string(),
7
+ jobId: zod_1.z.string(),
8
+ content: zod_1.z.string(),
9
+ order: zod_1.z.number(),
10
+ bgColor: zod_1.z.string(),
11
+ createdAt: zod_1.z.number(),
12
+ updatedAt: zod_1.z.number(),
13
+ });
14
+ exports.createLeadNoteSchema = exports.leadNoteSchema.pick({
15
+ id: true,
16
+ content: true,
17
+ order: true,
18
+ bgColor: true,
19
+ });
20
+ exports.updateLeadNoteSchema = exports.leadNoteSchema
21
+ .pick({
22
+ id: true,
23
+ content: true,
24
+ order: true,
25
+ bgColor: true,
26
+ })
27
+ .partial({ content: true, order: true, bgColor: true });
28
+ exports.updateLeadNotesOrderSchema = zod_1.z.object({
29
+ order: zod_1.z.array(zod_1.z.object({ id: zod_1.z.string(), order: zod_1.z.number() })),
30
+ });
@@ -0,0 +1,3 @@
1
+ import { z } from "zod";
2
+ export declare const agentStatusSchema: z.ZodEnum<["suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "proposalPending", "proposalProcessing", "proposalComplete", "biddingPending", "biddingProcessing", "biddingComplete", "biddingFailed", "jobArchived"]>;
3
+ export declare const leadStatusSchema: z.ZodEnum<["leads", "contacted", "viewed", "replied", "negotiations", "won", "lost"]>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.leadStatusSchema = exports.agentStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.agentStatusSchema = zod_1.z.enum([
6
+ "suitabilityPending",
7
+ "suitabilityProcessing",
8
+ "suitabilityComplete",
9
+ "suitabilityFailed",
10
+ "proposalPending",
11
+ "proposalProcessing",
12
+ "proposalComplete",
13
+ "biddingPending",
14
+ "biddingProcessing",
15
+ "biddingComplete",
16
+ "biddingFailed",
17
+ "jobArchived",
18
+ ]);
19
+ exports.leadStatusSchema = zod_1.z.enum([
20
+ "leads",
21
+ "contacted",
22
+ "viewed",
23
+ "replied",
24
+ "negotiations",
25
+ "won",
26
+ "lost",
27
+ ]);