lancer-shared 1.0.10 → 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.
- package/dist/constants/job-status.d.ts +4 -4
- package/dist/constants/routes.d.ts +0 -1
- package/dist/constants/routes.js +17 -18
- package/dist/schemas/campaign/campaign-insights.d.ts +1 -1
- package/dist/schemas/campaign/campaign-insights.js +2 -2
- package/dist/schemas/campaign/campaign-job-count.d.ts +2 -2
- package/dist/schemas/campaign/campaign-job-count.js +2 -2
- package/dist/schemas/campaign/campaign.d.ts +6 -6
- package/dist/schemas/campaign/campaign.js +2 -2
- package/dist/schemas/index.d.ts +10 -10
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/lead/index.d.ts +3 -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.d.ts +3 -0
- package/dist/schemas/lead/lead-status.js +27 -0
- package/dist/schemas/lead/lead.d.ts +1168 -0
- package/dist/schemas/lead/lead.js +91 -0
- package/dist/schemas/scraper/scrape-result.js +2 -2
- package/dist/types/job/job-note.d.ts +6 -6
- package/dist/types/job/job-status.d.ts +4 -4
- package/dist/types/job/job-status.js +2 -2
- package/dist/types/job/job.d.ts +6 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const jobStatusOrder:
|
|
3
|
-
export declare const getPreviousStatus: (status:
|
|
4
|
-
export declare const getNextStatus: (status:
|
|
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;
|
|
@@ -9,7 +9,6 @@ export declare const ROUTES: {
|
|
|
9
9
|
readonly JOBS: {
|
|
10
10
|
readonly BASE: (campaignId: string) => string;
|
|
11
11
|
readonly BY_ID: (campaignId: string, jobId: string) => string;
|
|
12
|
-
readonly SUITABILITY_SCORES: (campaignId: string) => string;
|
|
13
12
|
readonly SYNC: (campaignId: string) => string;
|
|
14
13
|
readonly NOTES: (campaignId: string, jobId: string, noteId: string) => string;
|
|
15
14
|
};
|
package/dist/constants/routes.js
CHANGED
|
@@ -3,18 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.buildRoute = exports.ROUTES = void 0;
|
|
4
4
|
exports.ROUTES = {
|
|
5
5
|
AUTH: {
|
|
6
|
-
BASE:
|
|
7
|
-
REGISTER:
|
|
6
|
+
BASE: "auth",
|
|
7
|
+
REGISTER: "auth/register",
|
|
8
8
|
},
|
|
9
9
|
CAMPAIGNS: {
|
|
10
|
-
BASE:
|
|
10
|
+
BASE: "campaigns",
|
|
11
11
|
BY_ID: (id) => `campaigns/${id}`,
|
|
12
12
|
JOBS: {
|
|
13
|
-
BASE: (campaignId) => `campaigns/${campaignId}/
|
|
13
|
+
BASE: (campaignId) => `campaigns/${campaignId}/leads`,
|
|
14
14
|
BY_ID: (campaignId, jobId) => `campaigns/${campaignId}/jobs/${jobId}`,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
NOTES: (campaignId, jobId, noteId) => `campaigns/${campaignId}/jobs/${jobId}/notes/${noteId}`,
|
|
15
|
+
SYNC: (campaignId) => `campaigns/${campaignId}/leads/sync`,
|
|
16
|
+
NOTES: (campaignId, jobId, noteId) => `campaigns/${campaignId}/leads/${jobId}/notes/${noteId}`,
|
|
18
17
|
},
|
|
19
18
|
INSIGHTS: (campaignId) => `campaigns/${campaignId}/insights`,
|
|
20
19
|
INTEGRATIONS: {
|
|
@@ -34,27 +33,27 @@ exports.ROUTES = {
|
|
|
34
33
|
},
|
|
35
34
|
},
|
|
36
35
|
JOBS: {
|
|
37
|
-
BASE:
|
|
38
|
-
IMPORT:
|
|
39
|
-
FILTER_OPTIONS:
|
|
40
|
-
TOTAL_JOBS:
|
|
36
|
+
BASE: "jobs",
|
|
37
|
+
IMPORT: "jobs/import",
|
|
38
|
+
FILTER_OPTIONS: "jobs/filter-options",
|
|
39
|
+
TOTAL_JOBS: "jobs/total-jobs",
|
|
41
40
|
GET_JOB_TITLE: (jobId) => `jobs/get-job-title/${jobId}`,
|
|
42
|
-
SEARCH:
|
|
41
|
+
SEARCH: "jobs/search",
|
|
43
42
|
},
|
|
44
43
|
USERS: {
|
|
45
|
-
BASE:
|
|
44
|
+
BASE: "users",
|
|
46
45
|
BY_ID: (id) => `users/${id}`,
|
|
47
46
|
},
|
|
48
47
|
AI_CONFIG: {
|
|
49
|
-
BASE:
|
|
48
|
+
BASE: "ai-config",
|
|
50
49
|
},
|
|
51
50
|
COOKIES: {
|
|
52
|
-
BASE:
|
|
53
|
-
SCRAPE:
|
|
51
|
+
BASE: "cookies",
|
|
52
|
+
SCRAPE: "cookies/scrape-cookies",
|
|
54
53
|
},
|
|
55
54
|
SCRAPING: {
|
|
56
|
-
BASE:
|
|
57
|
-
START_SCRAPING:
|
|
55
|
+
BASE: "scraping",
|
|
56
|
+
START_SCRAPING: "scraping/start",
|
|
58
57
|
},
|
|
59
58
|
};
|
|
60
59
|
// Helper function to build route with parameters
|
|
@@ -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
|
|
6
|
-
exports.campaignCountByStatusSchema = zod_1.z.object(Object.assign({}, Object.fromEntries(Object.values(
|
|
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
|
|
2
|
-
export declare const campaignJobCountSchema: z.ZodRecord<z.ZodEnum<["
|
|
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
|
|
6
|
-
exports.campaignJobCountSchema = zod_1.z.record(
|
|
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
|
|
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(
|
|
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
|
});
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
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";
|
package/dist/schemas/index.js
CHANGED
|
@@ -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("./
|
|
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,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
|
+
]);
|