lancer-shared 1.2.266 → 1.2.267
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/bundle.cjs.js +23 -0
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +21 -1
- package/dist/bundle.esm.js.map +1 -1
- package/dist/schemas/agent/index.d.ts +18 -11
- package/dist/schemas/bidder/bid.d.ts +207 -121
- package/dist/schemas/bidder/exceptions/index.d.ts +3 -1
- package/dist/schemas/bidder/exceptions/job-already-hired.exception.d.ts +5 -0
- package/dist/schemas/campaign/campaign-analytics.d.ts +82 -47
- package/dist/schemas/campaign/campaign-chat-bot.d.ts +11 -11
- package/dist/schemas/campaign/campaign.d.ts +24 -15
- package/dist/schemas/lead/already-hired-action.d.ts +3 -0
- package/dist/schemas/lead/index.d.ts +72 -42
- package/dist/schemas/lead/lead-status.d.ts +7 -7
- package/dist/schemas/logger/log-event.d.ts +5 -5
- package/dist/schemas/scraper/scrape-payload.d.ts +32 -20
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -6730,6 +6730,7 @@ const leadStatusEnum = z.enum([
|
|
|
6730
6730
|
'replied',
|
|
6731
6731
|
'biddingScheduled',
|
|
6732
6732
|
'biddingFailed',
|
|
6733
|
+
'alreadyHired',
|
|
6733
6734
|
'won',
|
|
6734
6735
|
]);
|
|
6735
6736
|
const updateLeadStatusSchema = z.object({
|
|
@@ -6746,6 +6747,8 @@ const updateOrganizationLeadsStatusPayloadSchema = z.array(z.object({
|
|
|
6746
6747
|
status: leadStatusEnum,
|
|
6747
6748
|
}));
|
|
6748
6749
|
|
|
6750
|
+
const alreadyHiredActionEnum = z.enum(['skip', 'bid']);
|
|
6751
|
+
|
|
6749
6752
|
const questionAnswerPairSchema = z.object({
|
|
6750
6753
|
question: z.string(),
|
|
6751
6754
|
answer: z.string(),
|
|
@@ -6767,6 +6770,7 @@ const leadBiddingConfigSchema = z.object({
|
|
|
6767
6770
|
maximumBoost: z.number().nullable(),
|
|
6768
6771
|
minBoost: z.number().nullable(),
|
|
6769
6772
|
insufficeintBoostConnectsAction: z.enum(['skip', 'bid_without_boost']),
|
|
6773
|
+
alreadyHiredAction: alreadyHiredActionEnum,
|
|
6770
6774
|
bidConfig: z.object({
|
|
6771
6775
|
agencyName: z.string().nullable(),
|
|
6772
6776
|
contractorName: z.string().nullable(),
|
|
@@ -7221,6 +7225,7 @@ const campaignSchema = z.object({
|
|
|
7221
7225
|
biddingDelayInMinutes: z.number().default(5),
|
|
7222
7226
|
biddingHourlyRateStrategy: biddingHourlyRateStrategyEnum,
|
|
7223
7227
|
biddingFixedHourlyRate: z.number().nullable(),
|
|
7228
|
+
alreadyHiredAction: alreadyHiredActionEnum,
|
|
7224
7229
|
biddingHourlyRatePercentage: z.number().min(0).max(100).nullable(),
|
|
7225
7230
|
bidWithWarning: bidWithWarningEnum,
|
|
7226
7231
|
leadCounts: z.record(leadStatusEnum, z.number()).nullable(),
|
|
@@ -7398,6 +7403,7 @@ const updateCampaignAnalyticsSchema = z.object({
|
|
|
7398
7403
|
'noLongerAvailable',
|
|
7399
7404
|
'rejected',
|
|
7400
7405
|
'alreadyBiddedOn',
|
|
7406
|
+
'alreadyHired',
|
|
7401
7407
|
'won',
|
|
7402
7408
|
'leadsAnalyzed',
|
|
7403
7409
|
'leadsFailed',
|
|
@@ -7423,6 +7429,7 @@ const campaignNotificationType = z.enum([
|
|
|
7423
7429
|
'privateJob',
|
|
7424
7430
|
'jobAlreadyBiddedOn',
|
|
7425
7431
|
'biddingFailed',
|
|
7432
|
+
'alreadyHired',
|
|
7426
7433
|
]);
|
|
7427
7434
|
const chatbotChannelSchema = z.object({
|
|
7428
7435
|
id: z.string(),
|
|
@@ -7483,6 +7490,7 @@ const CAMPAIGN_NOTIFICATION_TYPES = {
|
|
|
7483
7490
|
privateJob: 'Private Job',
|
|
7484
7491
|
jobAlreadyBiddedOn: 'Job Already Bidded On',
|
|
7485
7492
|
biddingFailed: 'Bidding Failed',
|
|
7493
|
+
alreadyHired: 'Already Hired',
|
|
7486
7494
|
};
|
|
7487
7495
|
const CAMPAIGN_NOTIFICATION_SETTINGS = {
|
|
7488
7496
|
suitableLead: 'When Lancer determines a job is suitable for your company',
|
|
@@ -7497,6 +7505,7 @@ const CAMPAIGN_NOTIFICATION_SETTINGS = {
|
|
|
7497
7505
|
privateJob: 'When a job is private',
|
|
7498
7506
|
jobAlreadyBiddedOn: 'When a job is already bidded on',
|
|
7499
7507
|
biddingFailed: 'When a bidding fails',
|
|
7508
|
+
alreadyHired: 'When a client already hired someone else',
|
|
7500
7509
|
};
|
|
7501
7510
|
|
|
7502
7511
|
const campaignCountByStatusSchema = z.object({
|
|
@@ -8115,6 +8124,7 @@ const bidPayloadProposalDataSchema = z.object({
|
|
|
8115
8124
|
biddingHourlyRateStrategy: biddingHourlyRateStrategyEnum,
|
|
8116
8125
|
biddingHourlyRatePercentage: z.number().min(0).max(100).nullable(),
|
|
8117
8126
|
biddingFixedHourlyRate: z.number().nullable(),
|
|
8127
|
+
alreadyHiredAction: alreadyHiredActionEnum,
|
|
8118
8128
|
isHourlyRate: z.boolean(),
|
|
8119
8129
|
jobMinHourlyRate: z.number().nullable(),
|
|
8120
8130
|
jobMaxHourlyRate: z.number().nullable(),
|
|
@@ -8290,6 +8300,16 @@ const jobAlreadyBiddedOnException = (message) => {
|
|
|
8290
8300
|
return new JobAlreadyBiddedOnException(message);
|
|
8291
8301
|
};
|
|
8292
8302
|
|
|
8303
|
+
class JobAlreadyHiredException extends Error {
|
|
8304
|
+
code = 'JOB_ALREADY_HIRED_EXCEPTION';
|
|
8305
|
+
constructor(message) {
|
|
8306
|
+
super(message);
|
|
8307
|
+
}
|
|
8308
|
+
}
|
|
8309
|
+
const jobAlreadyHiredException = (message) => {
|
|
8310
|
+
return new JobAlreadyHiredException(message);
|
|
8311
|
+
};
|
|
8312
|
+
|
|
8293
8313
|
class JobAlreadyProcessedInAnotherCampaignException extends Error {
|
|
8294
8314
|
code = 'JOB_ALREADY_PROCESSED_IN_ANOTHER_CAMPAIGN_EXCEPTION';
|
|
8295
8315
|
constructor(message) {
|
|
@@ -23966,6 +23986,7 @@ exports.InvalidGoogleOAuthTokenException = InvalidGoogleOAuthTokenException;
|
|
|
23966
23986
|
exports.InvalidJobUrlException = InvalidJobUrlException;
|
|
23967
23987
|
exports.JOB_FILTER_OPTIONS = JOB_FILTER_OPTIONS;
|
|
23968
23988
|
exports.JobAlreadyBiddedOnException = JobAlreadyBiddedOnException;
|
|
23989
|
+
exports.JobAlreadyHiredException = JobAlreadyHiredException;
|
|
23969
23990
|
exports.JobAlreadyProcessedInAnotherCampaignException = JobAlreadyProcessedInAnotherCampaignException;
|
|
23970
23991
|
exports.JobIsPrivateException = JobIsPrivateException;
|
|
23971
23992
|
exports.JobNoLongerAvailableException = JobNoLongerAvailableException;
|
|
@@ -24021,6 +24042,7 @@ exports.agentPickSpecialisedProfileResponseSchema = agentPickSpecialisedProfileR
|
|
|
24021
24042
|
exports.agentStatusSchema = agentStatusSchema;
|
|
24022
24043
|
exports.agentTaskResponseSchema = agentTaskResponseSchema;
|
|
24023
24044
|
exports.aiConfigSchema = aiConfigSchema;
|
|
24045
|
+
exports.alreadyHiredActionEnum = alreadyHiredActionEnum;
|
|
24024
24046
|
exports.bidConfigSchema = bidConfigSchema;
|
|
24025
24047
|
exports.bidDtoSchema = bidDtoSchema;
|
|
24026
24048
|
exports.bidFailedSchema = bidFailedSchema;
|
|
@@ -24172,6 +24194,7 @@ exports.jobActivityScrapedEventMetadata = jobActivityScrapedEventMetadata;
|
|
|
24172
24194
|
exports.jobActivitySnapshotSchema = jobActivitySnapshotSchema;
|
|
24173
24195
|
exports.jobActivityUpdateSchema = jobActivityUpdateSchema;
|
|
24174
24196
|
exports.jobAlreadyBiddedOnException = jobAlreadyBiddedOnException;
|
|
24197
|
+
exports.jobAlreadyHiredException = jobAlreadyHiredException;
|
|
24175
24198
|
exports.jobAlreadyProcessedInAnotherCampaignException = jobAlreadyProcessedInAnotherCampaignException;
|
|
24176
24199
|
exports.jobDetailsStateSchema = jobDetailsStateSchema;
|
|
24177
24200
|
exports.jobFiltersSchema = jobFiltersSchema;
|