lancer-shared 1.2.2 → 1.2.3
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/collections.js +11 -13
- package/dist/constants/common-questions.js +1 -4
- package/dist/constants/index.js +10 -32
- package/dist/constants/job-filter-options.js +1 -4
- package/dist/constants/job-status.js +7 -12
- package/dist/constants/mappings/countryMapping.js +1 -3
- package/dist/constants/mappings/regionMapping.js +1 -3
- package/dist/constants/routes.js +43 -35
- package/dist/constants/upwork-accounts.js +3 -6
- package/dist/index.js +4 -20
- package/dist/schemas/account/account-status.js +2 -5
- package/dist/schemas/account/bidder-account.js +22 -24
- package/dist/schemas/account/index.js +3 -19
- package/dist/schemas/account/scraper-account.js +21 -24
- package/dist/schemas/ai/ai-config.js +8 -11
- package/dist/schemas/ai/index.js +3 -19
- package/dist/schemas/ai/proposal.js +10 -13
- package/dist/schemas/ai/suitability.js +8 -11
- package/dist/schemas/bid/bid-result.js +9 -13
- package/dist/schemas/bid/bid.js +29 -30
- package/dist/schemas/bid/index.js +2 -18
- package/dist/schemas/campaign/campaign-ai-metrics.js +5 -8
- package/dist/schemas/campaign/campaign-analytics.js +32 -31
- package/dist/schemas/campaign/campaign-expenses.js +5 -8
- package/dist/schemas/campaign/campaign-insights.js +30 -30
- package/dist/schemas/campaign/campaign-integrations.js +10 -13
- package/dist/schemas/campaign/campaign-job-count.js +3 -6
- package/dist/schemas/campaign/campaign.js +32 -35
- package/dist/schemas/campaign/index.js +7 -23
- package/dist/schemas/chat-message/chat-message.js +7 -10
- package/dist/schemas/chat-message/index.js +1 -17
- package/dist/schemas/config/agency-config.js +6 -9
- package/dist/schemas/config/index.js +1 -17
- package/dist/schemas/event/index.d.ts +58 -0
- package/dist/schemas/index.js +17 -32
- package/dist/schemas/job/index.d.ts +95 -3
- package/dist/schemas/job-filters/index.js +1 -17
- package/dist/schemas/job-filters/job-filters.js +62 -65
- package/dist/schemas/lead/index.js +173 -19
- package/dist/schemas/lead/lead-note.js +13 -16
- package/dist/schemas/lead/lead-status.js +3 -6
- package/dist/schemas/lead/nuxt.js +287 -0
- package/dist/schemas/logger/index.js +1 -17
- package/dist/schemas/logger/log-event.js +100 -49
- package/dist/schemas/organization/index.js +70 -17
- package/dist/schemas/organization/member.js +7 -0
- package/dist/schemas/organization/organization.d.ts +177 -7
- package/dist/schemas/organization/organization.js +14 -17
- package/dist/schemas/organization/subscription.js +17 -0
- package/dist/schemas/proxy/index.js +3 -17
- package/dist/schemas/proxy/proxy-available-replacements.js +3 -0
- package/dist/schemas/proxy/proxy-country.js +249 -0
- package/dist/schemas/proxy/proxy.js +25 -17
- package/dist/schemas/saved-search/index.js +8 -11
- package/dist/schemas/scraper/index.js +2 -18
- package/dist/schemas/scraper/scrape-payload.js +19 -14
- package/dist/schemas/scraper/scrape-result.js +21 -21
- package/dist/schemas/shared.js +12 -9
- package/dist/schemas/time-filter/index.js +5 -8
- package/dist/schemas/transaction/index.js +17 -0
- package/dist/schemas/usage/index.js +18 -0
- package/dist/schemas/user/index.js +38 -41
- package/dist/types/account/account-status.js +1 -2
- package/dist/types/account/bidder-account.js +1 -2
- package/dist/types/account/index.js +3 -19
- package/dist/types/account/scraper-account.js +1 -2
- package/dist/types/ai/ai-config.js +1 -2
- package/dist/types/ai/index.js +3 -19
- package/dist/types/ai/proposal.js +1 -2
- package/dist/types/ai/suitability.js +1 -2
- package/dist/types/bid/bid-result.js +1 -2
- package/dist/types/bid/bid.js +1 -2
- package/dist/types/bid/index.js +2 -18
- package/dist/types/campaign/campaign-analytics.js +1 -2
- package/dist/types/campaign/campaign-expenses.js +1 -2
- package/dist/types/campaign/campaign-insights.js +1 -2
- package/dist/types/campaign/campaign-integrations.js +1 -2
- package/dist/types/campaign/campaign-job-count.js +1 -2
- package/dist/types/campaign/campaign.js +1 -2
- package/dist/types/campaign/index.js +6 -22
- package/dist/types/chat-message/chat-message.js +1 -2
- package/dist/types/chat-message/index.js +1 -17
- package/dist/types/config/agency-config.js +1 -2
- package/dist/types/config/index.js +1 -17
- package/dist/types/index.js +15 -29
- package/dist/types/job/index.js +3 -19
- package/dist/types/job/job-note.js +1 -2
- package/dist/types/job/job-status.js +1 -4
- package/dist/types/job/nuxt.js +1 -0
- package/dist/types/job-filters/index.js +1 -17
- package/dist/types/job-filters/job-filters.js +1 -2
- package/dist/types/logger/index.js +1 -17
- package/dist/types/logger/log-event.js +1 -2
- package/dist/types/saved-search/index.js +1 -2
- package/dist/types/scraper/index.js +2 -18
- package/dist/types/scraper/scrape-payload.js +1 -2
- package/dist/types/scraper/scrape-result.js +1 -2
- package/dist/types/shared.js +1 -0
- package/dist/types/time-filter/index.js +1 -2
- package/dist/types/transaction/index.js +1 -0
- package/dist/types/usage/index.js +1 -0
- package/dist/types/user/index.js +1 -2
- package/dist/utils/index.js +1 -17
- package/dist/utils/try-catch.js +8 -23
- package/package.json +2 -2
- package/dist/constants/account-status.d.ts +0 -3
- package/dist/constants/account-status.js +0 -17
- package/dist/schemas/account/manager-account.d.ts +0 -116
- package/dist/schemas/account/manager-account.js +0 -38
- package/dist/schemas/bidding/index.d.ts +0 -1
- package/dist/schemas/bidding/index.js +0 -17
- package/dist/schemas/bidding/proposal-bidding-status.d.ts +0 -26
- package/dist/schemas/bidding/proposal-bidding-status.js +0 -18
- package/dist/schemas/job/index.js +0 -19
- package/dist/schemas/job/job-details.d.ts +0 -335
- package/dist/schemas/job/job-details.js +0 -29
- package/dist/schemas/job/job-note.d.ts +0 -83
- package/dist/schemas/job/job-note.js +0 -30
- package/dist/schemas/job/job-status.d.ts +0 -3
- package/dist/schemas/job/job-status.js +0 -27
- package/dist/schemas/job/job.d.ts +0 -1160
- package/dist/schemas/job/job.js +0 -90
- package/dist/schemas/job/pipeline-job.d.ts +0 -602
- package/dist/schemas/job/pipeline-job.js +0 -42
- package/dist/schemas/job/upwork-job.d.ts +0 -334
- package/dist/schemas/job/upwork-job.js +0 -60
- package/dist/schemas/lead/lead.d.ts +0 -1897
- package/dist/schemas/lead/lead.js +0 -143
- package/dist/schemas/upwork-account/index.d.ts +0 -3
- package/dist/schemas/upwork-account/index.js +0 -19
- package/dist/schemas/upwork-account/upwork-account-status.d.ts +0 -2
- package/dist/schemas/upwork-account/upwork-account-status.js +0 -11
- package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +0 -95
- package/dist/schemas/upwork-account/upwork-business-manager-account.js +0 -35
- package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +0 -90
- package/dist/schemas/upwork-account/upwork-scraping-account.js +0 -29
- package/dist/types/account/manager-account.d.ts +0 -7
- package/dist/types/account/manager-account.js +0 -2
- package/dist/types/bidding/index.d.ts +0 -1
- package/dist/types/bidding/index.js +0 -17
- package/dist/types/bidding/proposal-bidding-status.d.ts +0 -3
- package/dist/types/bidding/proposal-bidding-status.js +0 -2
- package/dist/types/job/job-details.d.ts +0 -36
- package/dist/types/job/job-details.js +0 -2
- package/dist/types/job/job.d.ts +0 -36
- package/dist/types/job/job.js +0 -2
- package/dist/types/upwork-account/index.d.ts +0 -3
- package/dist/types/upwork-account/index.js +0 -19
- package/dist/types/upwork-account/upwork-account-status.d.ts +0 -3
- package/dist/types/upwork-account/upwork-account-status.js +0 -2
- package/dist/types/upwork-account/upwork-business-manager-account.d.ts +0 -7
- package/dist/types/upwork-account/upwork-business-manager-account.js +0 -2
- package/dist/types/upwork-account/upwork-scraping-account.d.ts +0 -5
- package/dist/types/upwork-account/upwork-scraping-account.js +0 -2
package/dist/schemas/bid/bid.js
CHANGED
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const bidPayloadProposalDataSchema = z.object({
|
|
3
|
+
coverLetter: z.string(),
|
|
4
|
+
questionAnswerPairs: z
|
|
5
|
+
.array(z.object({
|
|
6
|
+
question: z.string(),
|
|
7
|
+
answer: z.string(),
|
|
8
|
+
}))
|
|
9
|
+
.nullable(),
|
|
10
|
+
boostingEnabled: z.boolean(),
|
|
11
|
+
minimumBoost: z.number().nullable(),
|
|
12
|
+
maximumBoost: z.number().nullable(),
|
|
12
13
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
agencyName:
|
|
16
|
-
contractorName:
|
|
17
|
-
specializedProfile:
|
|
14
|
+
export const freelancerBidProposalDataSchema = bidPayloadProposalDataSchema;
|
|
15
|
+
export const agencyBidProposalDataSchema = bidPayloadProposalDataSchema.extend({
|
|
16
|
+
agencyName: z.string(),
|
|
17
|
+
contractorName: z.string(),
|
|
18
|
+
specializedProfile: z.string().nullable(),
|
|
18
19
|
});
|
|
19
|
-
|
|
20
|
-
jobUrl:
|
|
21
|
-
username:
|
|
22
|
-
password:
|
|
23
|
-
cookies: zod_1.z.array(zod_1.z.any()),
|
|
24
|
-
multiLoginProfileId: zod_1.z.string(),
|
|
20
|
+
export const bidPayloadSchema = z.object({
|
|
21
|
+
jobUrl: z.string(),
|
|
22
|
+
username: z.string(),
|
|
23
|
+
password: z.string(),
|
|
25
24
|
});
|
|
26
|
-
|
|
27
|
-
proposalData:
|
|
25
|
+
export const agencyBidPayloadSchema = bidPayloadSchema.extend({
|
|
26
|
+
proposalData: agencyBidProposalDataSchema,
|
|
28
27
|
});
|
|
29
|
-
|
|
30
|
-
proposalData:
|
|
28
|
+
export const freelancerBidPayloadSchema = bidPayloadSchema.extend({
|
|
29
|
+
proposalData: freelancerBidProposalDataSchema,
|
|
31
30
|
});
|
|
32
|
-
|
|
33
|
-
organizationId:
|
|
34
|
-
campaignId:
|
|
35
|
-
leadId:
|
|
31
|
+
export const bidDtoSchema = z.object({
|
|
32
|
+
organizationId: z.string(),
|
|
33
|
+
campaignId: z.string(),
|
|
34
|
+
leadId: z.string(),
|
|
36
35
|
});
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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("./bid"), exports);
|
|
18
|
-
__exportStar(require("./bid-result"), exports);
|
|
1
|
+
export * from './bid';
|
|
2
|
+
export * from './bid-result';
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
leadsAnalyzed: zod_1.z.number(),
|
|
7
|
-
leadsBidded: zod_1.z.number(),
|
|
8
|
-
connectsSaved: zod_1.z.number(),
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const campaignAIMetricsSchema = z.object({
|
|
3
|
+
leadsAnalyzed: z.number(),
|
|
4
|
+
leadsBidded: z.number(),
|
|
5
|
+
connectsSaved: z.number(),
|
|
9
6
|
});
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
replied: zod_1.z.number(),
|
|
12
|
-
negotiations: zod_1.z.number(),
|
|
13
|
-
won: zod_1.z.number(),
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { leadStatusSchema, upworkJobSchema } from "../lead";
|
|
3
|
+
export const campaignAnalyticsStatsSchema = z.object({
|
|
4
|
+
jobsAnalyzed: z.number(),
|
|
5
|
+
totalStats: z.object({
|
|
6
|
+
contacted: z.number(),
|
|
7
|
+
viewed: z.number(),
|
|
8
|
+
replied: z.number(),
|
|
9
|
+
negotiations: z.number(),
|
|
10
|
+
won: z.number(),
|
|
14
11
|
}),
|
|
15
|
-
statsByDate:
|
|
16
|
-
label:
|
|
17
|
-
contacted:
|
|
18
|
-
viewed:
|
|
19
|
-
replied:
|
|
20
|
-
negotiations:
|
|
21
|
-
won:
|
|
12
|
+
statsByDate: z.array(z.object({
|
|
13
|
+
label: z.string(),
|
|
14
|
+
contacted: z.number(),
|
|
15
|
+
viewed: z.number(),
|
|
16
|
+
replied: z.number(),
|
|
17
|
+
negotiations: z.number(),
|
|
18
|
+
won: z.number(),
|
|
22
19
|
})),
|
|
23
20
|
});
|
|
24
|
-
|
|
25
|
-
jobsAnalyzed:
|
|
26
|
-
contacted:
|
|
27
|
-
viewed:
|
|
28
|
-
replied:
|
|
29
|
-
negotiations:
|
|
30
|
-
won:
|
|
21
|
+
export const campaignAnalyticsResponseSchema = z.object({
|
|
22
|
+
jobsAnalyzed: z.number(),
|
|
23
|
+
contacted: z.number(),
|
|
24
|
+
viewed: z.number(),
|
|
25
|
+
replied: z.number(),
|
|
26
|
+
negotiations: z.number(),
|
|
27
|
+
won: z.number(),
|
|
31
28
|
});
|
|
32
|
-
|
|
33
|
-
createdAt:
|
|
34
|
-
status:
|
|
35
|
-
job:
|
|
29
|
+
export const campaignActivitySchema = z.object({
|
|
30
|
+
createdAt: z.number(),
|
|
31
|
+
status: leadStatusSchema,
|
|
32
|
+
job: upworkJobSchema.pick({
|
|
36
33
|
id: true,
|
|
37
34
|
title: true,
|
|
38
35
|
datetime: true,
|
|
39
36
|
jobUrl: true,
|
|
40
37
|
}),
|
|
41
38
|
});
|
|
39
|
+
export const campaignActivityCreateSchema = campaignActivitySchema.pick({
|
|
40
|
+
status: true,
|
|
41
|
+
job: true,
|
|
42
|
+
});
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
biddingAmount: zod_1.z.number().default(0),
|
|
7
|
-
boostingAmount: zod_1.z.number().default(0),
|
|
8
|
-
boosted: zod_1.z.number().default(0),
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const campaignExpensesSchema = z.object({
|
|
3
|
+
biddingAmount: z.number().default(0),
|
|
4
|
+
boostingAmount: z.number().default(0),
|
|
5
|
+
boosted: z.number().default(0),
|
|
9
6
|
});
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
pipelineHealth:
|
|
16
|
-
biddingAmount:
|
|
17
|
-
boostingAmount:
|
|
18
|
-
boostedProposalsCount:
|
|
19
|
-
totalProposalsCount:
|
|
20
|
-
totalExpenses:
|
|
21
|
-
suitabilityRange0to10:
|
|
22
|
-
suitabilityRange10to20:
|
|
23
|
-
suitabilityRange20to30:
|
|
24
|
-
suitabilityRange30to40:
|
|
25
|
-
suitabilityRange40to50:
|
|
26
|
-
suitabilityRange50to60:
|
|
27
|
-
suitabilityRange60to70:
|
|
28
|
-
suitabilityRange70to80:
|
|
29
|
-
suitabilityRange80to90:
|
|
30
|
-
suitabilityRange90to100:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { agentStatusSchema } from "../lead";
|
|
3
|
+
export const campaignCountByStatusSchema = z.object({
|
|
4
|
+
// Using z.enum values to create a schema with all possible job statuses
|
|
5
|
+
...Object.fromEntries(Object.values(agentStatusSchema.enum).map((status) => [
|
|
6
|
+
status,
|
|
7
|
+
z.object({
|
|
8
|
+
boosted: z.number(),
|
|
9
|
+
organic: z.number(),
|
|
10
|
+
total: z.number(),
|
|
11
|
+
}),
|
|
12
|
+
])),
|
|
13
|
+
});
|
|
14
|
+
export const campaignInsightsSchema = z.object({
|
|
15
|
+
pipelineHealth: campaignCountByStatusSchema,
|
|
16
|
+
biddingAmount: z.number().default(0),
|
|
17
|
+
boostingAmount: z.number().default(0),
|
|
18
|
+
boostedProposalsCount: z.number().default(0),
|
|
19
|
+
totalProposalsCount: z.number().default(0),
|
|
20
|
+
totalExpenses: z.number().default(0),
|
|
21
|
+
suitabilityRange0to10: z.number(),
|
|
22
|
+
suitabilityRange10to20: z.number(),
|
|
23
|
+
suitabilityRange20to30: z.number(),
|
|
24
|
+
suitabilityRange30to40: z.number(),
|
|
25
|
+
suitabilityRange40to50: z.number(),
|
|
26
|
+
suitabilityRange50to60: z.number(),
|
|
27
|
+
suitabilityRange60to70: z.number(),
|
|
28
|
+
suitabilityRange70to80: z.number(),
|
|
29
|
+
suitabilityRange80to90: z.number(),
|
|
30
|
+
suitabilityRange90to100: z.number(),
|
|
31
31
|
});
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
suitabilityHooks: zod_1.z.object({
|
|
8
|
-
discord: zod_1.z.string().url().nullable(),
|
|
9
|
-
slack: zod_1.z.string().url().nullable(),
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const campaignIntegrations = z.enum(["discord", "slack"]);
|
|
3
|
+
export const campaignIntegrationsSchema = z.object({
|
|
4
|
+
suitabilityHooks: z.object({
|
|
5
|
+
discord: z.string().url().nullable(),
|
|
6
|
+
slack: z.string().url().nullable(),
|
|
10
7
|
}),
|
|
11
|
-
proposalSentHooks:
|
|
12
|
-
discord:
|
|
13
|
-
slack:
|
|
8
|
+
proposalSentHooks: z.object({
|
|
9
|
+
discord: z.string().url().nullable(),
|
|
10
|
+
slack: z.string().url().nullable(),
|
|
14
11
|
}),
|
|
15
12
|
});
|
|
16
|
-
|
|
13
|
+
export const updateCampaignIntegrationsSchema = campaignIntegrationsSchema.partial();
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const lead_1 = require("../lead");
|
|
6
|
-
exports.campaignJobCountSchema = zod_1.z.record(lead_1.leadStatusSchema, zod_1.z.number());
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { leadStatusSchema } from "../lead";
|
|
3
|
+
export const campaignJobCountSchema = z.record(leadStatusSchema, z.number());
|
|
@@ -1,44 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
zod_1.z.literal('draft'),
|
|
12
|
-
zod_1.z.literal('paused'),
|
|
13
|
-
zod_1.z.literal('error'),
|
|
1
|
+
import { number, z } from "zod";
|
|
2
|
+
import { jobFiltersSchema } from "../job-filters";
|
|
3
|
+
import { leadStatusSchema } from "../lead";
|
|
4
|
+
import { campaignExpensesSchema } from "./campaign-expenses";
|
|
5
|
+
import { campaignIntegrationsSchema } from "./campaign-integrations";
|
|
6
|
+
export const campaignStatusSchema = z.union([
|
|
7
|
+
z.literal("active"),
|
|
8
|
+
z.literal("draft"),
|
|
9
|
+
z.literal("paused"),
|
|
10
|
+
z.literal("error"),
|
|
14
11
|
]);
|
|
15
|
-
|
|
16
|
-
id:
|
|
17
|
-
name:
|
|
18
|
-
filters:
|
|
19
|
-
createdAt:
|
|
20
|
-
updatedAt:
|
|
21
|
-
confirmedBillingAt:
|
|
22
|
-
automatedSuitability:
|
|
23
|
-
automatedBidding:
|
|
24
|
-
boostingEnabled:
|
|
25
|
-
maximumBoost:
|
|
26
|
-
minimumBoost:
|
|
27
|
-
webhookUrl:
|
|
28
|
-
monthlyBudget:
|
|
29
|
-
suitabilityThreshold:
|
|
30
|
-
boostingThreshold:
|
|
31
|
-
leadCounts:
|
|
32
|
-
expenses:
|
|
33
|
-
integrations:
|
|
34
|
-
status:
|
|
12
|
+
export const campaignSchema = z.object({
|
|
13
|
+
id: z.string(),
|
|
14
|
+
name: z.string(),
|
|
15
|
+
filters: jobFiltersSchema,
|
|
16
|
+
createdAt: number(),
|
|
17
|
+
updatedAt: number(),
|
|
18
|
+
confirmedBillingAt: number().nullable(),
|
|
19
|
+
automatedSuitability: z.boolean().nullable(),
|
|
20
|
+
automatedBidding: z.boolean().nullable(),
|
|
21
|
+
boostingEnabled: z.boolean().nullable().default(false),
|
|
22
|
+
maximumBoost: z.number().nullable().default(30),
|
|
23
|
+
minimumBoost: z.number().nullable().default(0),
|
|
24
|
+
webhookUrl: z.string().nullable(),
|
|
25
|
+
monthlyBudget: z.number().nullable(),
|
|
26
|
+
suitabilityThreshold: z.number().min(0).max(100).nullable().default(0),
|
|
27
|
+
boostingThreshold: z.number().min(0).max(100).nullable().default(0),
|
|
28
|
+
leadCounts: z.record(leadStatusSchema, z.number()).nullable(),
|
|
29
|
+
expenses: campaignExpensesSchema,
|
|
30
|
+
integrations: campaignIntegrationsSchema,
|
|
31
|
+
status: campaignStatusSchema.optional(),
|
|
35
32
|
});
|
|
36
|
-
|
|
33
|
+
export const createCampaignSchema = campaignSchema.omit({
|
|
37
34
|
id: true,
|
|
38
35
|
createdAt: true,
|
|
39
36
|
updatedAt: true,
|
|
40
37
|
});
|
|
41
|
-
|
|
38
|
+
export const updateCampaignSchema = campaignSchema.omit({
|
|
42
39
|
createdAt: true,
|
|
43
40
|
updatedAt: true,
|
|
44
41
|
});
|
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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("./campaign"), exports);
|
|
18
|
-
__exportStar(require("./campaign-insights"), exports);
|
|
19
|
-
__exportStar(require("./campaign-job-count"), exports);
|
|
20
|
-
__exportStar(require("./campaign-expenses"), exports);
|
|
21
|
-
__exportStar(require("./campaign-integrations"), exports);
|
|
22
|
-
__exportStar(require("./campaign-analytics"), exports);
|
|
23
|
-
__exportStar(require("./campaign-ai-metrics"), exports);
|
|
1
|
+
export * from './campaign';
|
|
2
|
+
export * from './campaign-insights';
|
|
3
|
+
export * from './campaign-job-count';
|
|
4
|
+
export * from './campaign-expenses';
|
|
5
|
+
export * from './campaign-integrations';
|
|
6
|
+
export * from './campaign-analytics';
|
|
7
|
+
export * from './campaign-ai-metrics';
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
content: zod_1.z.string(),
|
|
8
|
-
role: zod_1.z.enum(['user', 'assistant']),
|
|
9
|
-
timestamp: zod_1.z.string(),
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const chatMessageSchema = z.object({
|
|
3
|
+
id: z.string(),
|
|
4
|
+
content: z.string(),
|
|
5
|
+
role: z.enum(['user', 'assistant']),
|
|
6
|
+
timestamp: z.string(),
|
|
10
7
|
});
|
|
11
|
-
|
|
8
|
+
export const newChatMessageSchema = chatMessageSchema.omit({
|
|
12
9
|
id: true,
|
|
13
10
|
});
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
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("./chat-message"), exports);
|
|
1
|
+
export * from './chat-message';
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
contractorName: zod_1.z.string(),
|
|
8
|
-
specializedProfile: zod_1.z.string().nullable(),
|
|
9
|
-
accountId: zod_1.z.string(),
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const agencyConfigSchema = z.object({
|
|
3
|
+
agencyName: z.string(),
|
|
4
|
+
contractorName: z.string(),
|
|
5
|
+
specializedProfile: z.string().nullable(),
|
|
6
|
+
accountId: z.string(),
|
|
10
7
|
});
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
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("./agency-config"), exports);
|
|
1
|
+
export * from './agency-config';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare const logEventSchemaWithMetadata: import("zod").ZodIntersection<import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
2
|
+
type: import("zod").ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
3
|
+
source: import("zod").ZodString;
|
|
4
|
+
resourceType: import("zod").ZodDefault<import("zod").ZodString>;
|
|
5
|
+
resourceId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
6
|
+
leadId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
7
|
+
campaignId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
8
|
+
userId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
9
|
+
reason: import("zod").ZodNullable<import("zod").ZodString>;
|
|
10
|
+
timestamp: import("zod").ZodNumber;
|
|
11
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
12
|
+
type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
13
|
+
source: string;
|
|
14
|
+
resourceType: string;
|
|
15
|
+
resourceId: string | null;
|
|
16
|
+
leadId: string | null;
|
|
17
|
+
campaignId: string | null;
|
|
18
|
+
userId: string | null;
|
|
19
|
+
reason: string | null;
|
|
20
|
+
timestamp: number;
|
|
21
|
+
}, {
|
|
22
|
+
type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
23
|
+
source: string;
|
|
24
|
+
resourceId: string | null;
|
|
25
|
+
leadId: string | null;
|
|
26
|
+
campaignId: string | null;
|
|
27
|
+
userId: string | null;
|
|
28
|
+
reason: string | null;
|
|
29
|
+
timestamp: number;
|
|
30
|
+
resourceType?: string | undefined;
|
|
31
|
+
}>, import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
|
|
32
|
+
type: import("zod").ZodEnum<["jobActivityScraped"]>;
|
|
33
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
34
|
+
type: "jobActivityScraped";
|
|
35
|
+
}, {
|
|
36
|
+
type: "jobActivityScraped";
|
|
37
|
+
}>, import("zod").ZodObject<{
|
|
38
|
+
type: import("zod").ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScrapeFailed", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
|
|
39
|
+
metadata: import("zod").ZodNullable<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
40
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
41
|
+
type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScrapeFailed" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
42
|
+
metadata: Record<string, unknown> | null;
|
|
43
|
+
}, {
|
|
44
|
+
type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScrapeFailed" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
|
|
45
|
+
metadata: Record<string, unknown> | null;
|
|
46
|
+
}>]>>, import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
|
|
47
|
+
type: import("zod").ZodEnum<["jobActivityScraped"]>;
|
|
48
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
49
|
+
type: "jobActivityScraped";
|
|
50
|
+
}, {
|
|
51
|
+
type: "jobActivityScraped";
|
|
52
|
+
}>, import("zod").ZodObject<{
|
|
53
|
+
type: import("zod").ZodEnum<["jobActivityScraped"]>;
|
|
54
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
55
|
+
type: "jobActivityScraped";
|
|
56
|
+
}, {
|
|
57
|
+
type: "jobActivityScraped";
|
|
58
|
+
}>]>>;
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,32 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./ai"), exports);
|
|
19
|
-
__exportStar(require("./bid"), exports);
|
|
20
|
-
__exportStar(require("./campaign"), exports);
|
|
21
|
-
__exportStar(require("./chat-message"), exports);
|
|
22
|
-
__exportStar(require("./config"), exports);
|
|
23
|
-
__exportStar(require("./job-filters"), exports);
|
|
24
|
-
__exportStar(require("./lead"), exports);
|
|
25
|
-
__exportStar(require("./logger"), exports);
|
|
26
|
-
__exportStar(require("./organization"), exports);
|
|
27
|
-
__exportStar(require("./proxy"), exports);
|
|
28
|
-
__exportStar(require("./saved-search"), exports);
|
|
29
|
-
__exportStar(require("./scraper"), exports);
|
|
30
|
-
__exportStar(require("./shared"), exports);
|
|
31
|
-
__exportStar(require("./time-filter"), exports);
|
|
32
|
-
__exportStar(require("./user"), exports);
|
|
1
|
+
export * from "./account";
|
|
2
|
+
export * from "./bid";
|
|
3
|
+
export * from "./campaign";
|
|
4
|
+
export * from "./chat-message";
|
|
5
|
+
export * from "./config";
|
|
6
|
+
export * from "./job-filters";
|
|
7
|
+
export * from "./lead";
|
|
8
|
+
export * from "./logger";
|
|
9
|
+
export * from "./organization";
|
|
10
|
+
export * from "./proxy";
|
|
11
|
+
export * from "./saved-search";
|
|
12
|
+
export * from "./scraper";
|
|
13
|
+
export * from "./shared";
|
|
14
|
+
export * from "./time-filter";
|
|
15
|
+
export * from "./user";
|
|
16
|
+
export * from "./usage";
|
|
17
|
+
export * from "./transaction";
|