lancer-shared 1.2.265 → 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 +26 -0
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +24 -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 +76 -46
- package/dist/schemas/lead/lead-status.d.ts +7 -7
- package/dist/schemas/logger/log-event.d.ts +5 -5
- package/dist/schemas/organization/organization-leads.d.ts +4 -4
- package/dist/schemas/scraper/scrape-payload.d.ts +32 -20
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -6212,6 +6212,7 @@ const upworkJobSchema = objectType({
|
|
|
6212
6212
|
region: regionSchema.nullable(),
|
|
6213
6213
|
bidRange: bidRangeSchema.nullable(),
|
|
6214
6214
|
jobActivity: jobActivitySchema.nullable(),
|
|
6215
|
+
occupation: stringType().nullable(),
|
|
6215
6216
|
activityUpdates: z
|
|
6216
6217
|
.union([z.literal(1), z.literal(2), z.literal(3)])
|
|
6217
6218
|
.nullable(),
|
|
@@ -6729,6 +6730,7 @@ const leadStatusEnum = z.enum([
|
|
|
6729
6730
|
'replied',
|
|
6730
6731
|
'biddingScheduled',
|
|
6731
6732
|
'biddingFailed',
|
|
6733
|
+
'alreadyHired',
|
|
6732
6734
|
'won',
|
|
6733
6735
|
]);
|
|
6734
6736
|
const updateLeadStatusSchema = z.object({
|
|
@@ -6745,6 +6747,8 @@ const updateOrganizationLeadsStatusPayloadSchema = z.array(z.object({
|
|
|
6745
6747
|
status: leadStatusEnum,
|
|
6746
6748
|
}));
|
|
6747
6749
|
|
|
6750
|
+
const alreadyHiredActionEnum = z.enum(['skip', 'bid']);
|
|
6751
|
+
|
|
6748
6752
|
const questionAnswerPairSchema = z.object({
|
|
6749
6753
|
question: z.string(),
|
|
6750
6754
|
answer: z.string(),
|
|
@@ -6766,6 +6770,7 @@ const leadBiddingConfigSchema = z.object({
|
|
|
6766
6770
|
maximumBoost: z.number().nullable(),
|
|
6767
6771
|
minBoost: z.number().nullable(),
|
|
6768
6772
|
insufficeintBoostConnectsAction: z.enum(['skip', 'bid_without_boost']),
|
|
6773
|
+
alreadyHiredAction: alreadyHiredActionEnum,
|
|
6769
6774
|
bidConfig: z.object({
|
|
6770
6775
|
agencyName: z.string().nullable(),
|
|
6771
6776
|
contractorName: z.string().nullable(),
|
|
@@ -6836,6 +6841,7 @@ const getCampaignLeadsStatusEnum = z.enum([
|
|
|
6836
6841
|
'contacted',
|
|
6837
6842
|
'viewed',
|
|
6838
6843
|
'replied',
|
|
6844
|
+
'rejected',
|
|
6839
6845
|
]);
|
|
6840
6846
|
const getCampaignLeadsRequestQuerySchema = z.object({
|
|
6841
6847
|
cursor: z.string().optional(),
|
|
@@ -7034,6 +7040,7 @@ const getOrganizationLeadsStatusEnum = z.enum([
|
|
|
7034
7040
|
'contacted',
|
|
7035
7041
|
'viewed',
|
|
7036
7042
|
'replied',
|
|
7043
|
+
'rejected',
|
|
7037
7044
|
]);
|
|
7038
7045
|
const getOrganizationLeadsRequestQuerySchema = z.object({
|
|
7039
7046
|
cursor: z.string().optional(),
|
|
@@ -7218,6 +7225,7 @@ const campaignSchema = z.object({
|
|
|
7218
7225
|
biddingDelayInMinutes: z.number().default(5),
|
|
7219
7226
|
biddingHourlyRateStrategy: biddingHourlyRateStrategyEnum,
|
|
7220
7227
|
biddingFixedHourlyRate: z.number().nullable(),
|
|
7228
|
+
alreadyHiredAction: alreadyHiredActionEnum,
|
|
7221
7229
|
biddingHourlyRatePercentage: z.number().min(0).max(100).nullable(),
|
|
7222
7230
|
bidWithWarning: bidWithWarningEnum,
|
|
7223
7231
|
leadCounts: z.record(leadStatusEnum, z.number()).nullable(),
|
|
@@ -7395,6 +7403,7 @@ const updateCampaignAnalyticsSchema = z.object({
|
|
|
7395
7403
|
'noLongerAvailable',
|
|
7396
7404
|
'rejected',
|
|
7397
7405
|
'alreadyBiddedOn',
|
|
7406
|
+
'alreadyHired',
|
|
7398
7407
|
'won',
|
|
7399
7408
|
'leadsAnalyzed',
|
|
7400
7409
|
'leadsFailed',
|
|
@@ -7420,6 +7429,7 @@ const campaignNotificationType = z.enum([
|
|
|
7420
7429
|
'privateJob',
|
|
7421
7430
|
'jobAlreadyBiddedOn',
|
|
7422
7431
|
'biddingFailed',
|
|
7432
|
+
'alreadyHired',
|
|
7423
7433
|
]);
|
|
7424
7434
|
const chatbotChannelSchema = z.object({
|
|
7425
7435
|
id: z.string(),
|
|
@@ -7480,6 +7490,7 @@ const CAMPAIGN_NOTIFICATION_TYPES = {
|
|
|
7480
7490
|
privateJob: 'Private Job',
|
|
7481
7491
|
jobAlreadyBiddedOn: 'Job Already Bidded On',
|
|
7482
7492
|
biddingFailed: 'Bidding Failed',
|
|
7493
|
+
alreadyHired: 'Already Hired',
|
|
7483
7494
|
};
|
|
7484
7495
|
const CAMPAIGN_NOTIFICATION_SETTINGS = {
|
|
7485
7496
|
suitableLead: 'When Lancer determines a job is suitable for your company',
|
|
@@ -7494,6 +7505,7 @@ const CAMPAIGN_NOTIFICATION_SETTINGS = {
|
|
|
7494
7505
|
privateJob: 'When a job is private',
|
|
7495
7506
|
jobAlreadyBiddedOn: 'When a job is already bidded on',
|
|
7496
7507
|
biddingFailed: 'When a bidding fails',
|
|
7508
|
+
alreadyHired: 'When a client already hired someone else',
|
|
7497
7509
|
};
|
|
7498
7510
|
|
|
7499
7511
|
const campaignCountByStatusSchema = z.object({
|
|
@@ -8112,6 +8124,7 @@ const bidPayloadProposalDataSchema = z.object({
|
|
|
8112
8124
|
biddingHourlyRateStrategy: biddingHourlyRateStrategyEnum,
|
|
8113
8125
|
biddingHourlyRatePercentage: z.number().min(0).max(100).nullable(),
|
|
8114
8126
|
biddingFixedHourlyRate: z.number().nullable(),
|
|
8127
|
+
alreadyHiredAction: alreadyHiredActionEnum,
|
|
8115
8128
|
isHourlyRate: z.boolean(),
|
|
8116
8129
|
jobMinHourlyRate: z.number().nullable(),
|
|
8117
8130
|
jobMaxHourlyRate: z.number().nullable(),
|
|
@@ -8287,6 +8300,16 @@ const jobAlreadyBiddedOnException = (message) => {
|
|
|
8287
8300
|
return new JobAlreadyBiddedOnException(message);
|
|
8288
8301
|
};
|
|
8289
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
|
+
|
|
8290
8313
|
class JobAlreadyProcessedInAnotherCampaignException extends Error {
|
|
8291
8314
|
code = 'JOB_ALREADY_PROCESSED_IN_ANOTHER_CAMPAIGN_EXCEPTION';
|
|
8292
8315
|
constructor(message) {
|
|
@@ -23963,6 +23986,7 @@ exports.InvalidGoogleOAuthTokenException = InvalidGoogleOAuthTokenException;
|
|
|
23963
23986
|
exports.InvalidJobUrlException = InvalidJobUrlException;
|
|
23964
23987
|
exports.JOB_FILTER_OPTIONS = JOB_FILTER_OPTIONS;
|
|
23965
23988
|
exports.JobAlreadyBiddedOnException = JobAlreadyBiddedOnException;
|
|
23989
|
+
exports.JobAlreadyHiredException = JobAlreadyHiredException;
|
|
23966
23990
|
exports.JobAlreadyProcessedInAnotherCampaignException = JobAlreadyProcessedInAnotherCampaignException;
|
|
23967
23991
|
exports.JobIsPrivateException = JobIsPrivateException;
|
|
23968
23992
|
exports.JobNoLongerAvailableException = JobNoLongerAvailableException;
|
|
@@ -24018,6 +24042,7 @@ exports.agentPickSpecialisedProfileResponseSchema = agentPickSpecialisedProfileR
|
|
|
24018
24042
|
exports.agentStatusSchema = agentStatusSchema;
|
|
24019
24043
|
exports.agentTaskResponseSchema = agentTaskResponseSchema;
|
|
24020
24044
|
exports.aiConfigSchema = aiConfigSchema;
|
|
24045
|
+
exports.alreadyHiredActionEnum = alreadyHiredActionEnum;
|
|
24021
24046
|
exports.bidConfigSchema = bidConfigSchema;
|
|
24022
24047
|
exports.bidDtoSchema = bidDtoSchema;
|
|
24023
24048
|
exports.bidFailedSchema = bidFailedSchema;
|
|
@@ -24169,6 +24194,7 @@ exports.jobActivityScrapedEventMetadata = jobActivityScrapedEventMetadata;
|
|
|
24169
24194
|
exports.jobActivitySnapshotSchema = jobActivitySnapshotSchema;
|
|
24170
24195
|
exports.jobActivityUpdateSchema = jobActivityUpdateSchema;
|
|
24171
24196
|
exports.jobAlreadyBiddedOnException = jobAlreadyBiddedOnException;
|
|
24197
|
+
exports.jobAlreadyHiredException = jobAlreadyHiredException;
|
|
24172
24198
|
exports.jobAlreadyProcessedInAnotherCampaignException = jobAlreadyProcessedInAnotherCampaignException;
|
|
24173
24199
|
exports.jobDetailsStateSchema = jobDetailsStateSchema;
|
|
24174
24200
|
exports.jobFiltersSchema = jobFiltersSchema;
|