lancer-shared 1.2.34 → 1.2.36
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 +52 -20
- package/dist/index.d.ts +3 -3
- package/dist/schemas/campaign/campaign-analytics.d.ts +3975 -206
- package/dist/schemas/campaign/campaign.d.ts +11 -11
- package/dist/schemas/dashboard/index.d.ts +0 -20
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/lead/index.d.ts +856 -14
- package/dist/schemas/lead/lead-status.d.ts +10 -7
- package/dist/schemas/organization/cover-letter.d.ts +21 -17
- package/dist/schemas/organization/index.d.ts +4 -2
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -336,15 +336,14 @@ const jobStatusOrder = [
|
|
|
336
336
|
"contacted",
|
|
337
337
|
"viewed",
|
|
338
338
|
"replied",
|
|
339
|
-
"interview",
|
|
340
339
|
"won",
|
|
341
340
|
"lost",
|
|
342
341
|
];
|
|
343
342
|
const getPreviousStatus = (status) => {
|
|
344
343
|
if (status === "won")
|
|
345
|
-
return "
|
|
344
|
+
return "replied";
|
|
346
345
|
if (status === "lost")
|
|
347
|
-
return "
|
|
346
|
+
return "replied";
|
|
348
347
|
const index = jobStatusOrder.indexOf(status);
|
|
349
348
|
return index > 0 ? jobStatusOrder[index - 1] : null;
|
|
350
349
|
};
|
|
@@ -12026,7 +12025,6 @@ const leadStatusSchema = z.enum([
|
|
|
12026
12025
|
"contacted",
|
|
12027
12026
|
"viewed",
|
|
12028
12027
|
"replied",
|
|
12029
|
-
"interview",
|
|
12030
12028
|
"won",
|
|
12031
12029
|
"lost",
|
|
12032
12030
|
]);
|
|
@@ -12036,7 +12034,8 @@ const updateLeadStatusSchema = z.object({
|
|
|
12036
12034
|
campaignId: z.string(),
|
|
12037
12035
|
status: leadStatusSchema,
|
|
12038
12036
|
proposalId: z.string().optional(),
|
|
12039
|
-
userId: z.string(),
|
|
12037
|
+
userId: z.string().optional(),
|
|
12038
|
+
wonAmount: z.number().optional(),
|
|
12040
12039
|
});
|
|
12041
12040
|
|
|
12042
12041
|
const questionAnswerPairSchema = z.object({
|
|
@@ -12059,6 +12058,7 @@ const leadSchema = upworkJobSchema
|
|
|
12059
12058
|
boostingAmount: numberType().nullable(),
|
|
12060
12059
|
biddingTaskScheduled: booleanType().nullable(),
|
|
12061
12060
|
scheduledBiddingTime: numberType().nullable(),
|
|
12061
|
+
wonAmount: numberType().optional(),
|
|
12062
12062
|
})
|
|
12063
12063
|
.omit({
|
|
12064
12064
|
processed: true,
|
|
@@ -12080,7 +12080,7 @@ const findLeadsRequestSchema = z.object({
|
|
|
12080
12080
|
// Lead Search Response Schema
|
|
12081
12081
|
const findLeadsResponseSchema = z.object({
|
|
12082
12082
|
total: z.number(),
|
|
12083
|
-
|
|
12083
|
+
data: z.array(upworkJobSchema.or(leadSchema)),
|
|
12084
12084
|
lastMonthTotal: z.number().optional(),
|
|
12085
12085
|
error: z.string().optional(),
|
|
12086
12086
|
});
|
|
@@ -12287,16 +12287,17 @@ const onboardingProgressSchema = z.object({
|
|
|
12287
12287
|
automationEnabled: z.boolean(),
|
|
12288
12288
|
});
|
|
12289
12289
|
|
|
12290
|
-
const
|
|
12290
|
+
const coverLetterTemplateSchema = z.object({
|
|
12291
12291
|
id: z.string(),
|
|
12292
12292
|
name: z.string(),
|
|
12293
|
-
|
|
12294
|
-
|
|
12293
|
+
description: z.string().nullable(),
|
|
12294
|
+
template: z.string(),
|
|
12295
|
+
instructions: z.string(),
|
|
12295
12296
|
});
|
|
12296
|
-
const
|
|
12297
|
+
const createCoverLetterTemplateSchema = coverLetterTemplateSchema.pick({
|
|
12297
12298
|
name: true,
|
|
12298
|
-
|
|
12299
|
-
|
|
12299
|
+
template: true,
|
|
12300
|
+
instructions: true,
|
|
12300
12301
|
});
|
|
12301
12302
|
|
|
12302
12303
|
const organizationTypeSchema = z.enum(["agency", "freelancer"]);
|
|
@@ -12820,11 +12821,13 @@ const campaignAnalyticsSchema = z.object({
|
|
|
12820
12821
|
contacted: z.number().optional(),
|
|
12821
12822
|
viewed: z.number().optional(),
|
|
12822
12823
|
replied: z.number().optional(),
|
|
12823
|
-
interview: z.number().optional(),
|
|
12824
12824
|
won: z.number().optional(),
|
|
12825
12825
|
proposalsGenerated: z.number().optional(),
|
|
12826
12826
|
leadsAnalyzed: z.number().optional(),
|
|
12827
12827
|
leadsFailed: z.number().optional(),
|
|
12828
|
+
suitableJobs: z.number().optional(),
|
|
12829
|
+
unsuitableJobs: z.number().optional(),
|
|
12830
|
+
wonAmount: z.number().optional(),
|
|
12828
12831
|
});
|
|
12829
12832
|
const campaignAnalyticsStatsSchema = z.object({
|
|
12830
12833
|
totalStats: campaignAnalyticsSchema,
|
|
@@ -12833,7 +12836,6 @@ const campaignAnalyticsStatsSchema = z.object({
|
|
|
12833
12836
|
contacted: z.number(),
|
|
12834
12837
|
viewed: z.number(),
|
|
12835
12838
|
replied: z.number(),
|
|
12836
|
-
interview: z.number(),
|
|
12837
12839
|
won: z.number(),
|
|
12838
12840
|
leadsAnalyzed: z.number(),
|
|
12839
12841
|
})),
|
|
@@ -12843,7 +12845,6 @@ const campaignAnalyticsResponseSchema = z.object({
|
|
|
12843
12845
|
contacted: z.number(),
|
|
12844
12846
|
viewed: z.number(),
|
|
12845
12847
|
replied: z.number(),
|
|
12846
|
-
interview: z.number(),
|
|
12847
12848
|
won: z.number(),
|
|
12848
12849
|
});
|
|
12849
12850
|
const campaignActivityTypeSchema = z.enum([
|
|
@@ -12855,7 +12856,15 @@ const campaignActivityTypeSchema = z.enum([
|
|
|
12855
12856
|
const campaignStatusActivitySchema = z.object({
|
|
12856
12857
|
type: z.literal("campaign_status"),
|
|
12857
12858
|
createdAt: z.number(),
|
|
12858
|
-
status: z.enum(["started", "paused"]),
|
|
12859
|
+
status: z.enum(["started", "paused", "created", "error"]),
|
|
12860
|
+
organization: organizationSchema.pick({
|
|
12861
|
+
id: true,
|
|
12862
|
+
name: true,
|
|
12863
|
+
}),
|
|
12864
|
+
campaign: campaignSchema.pick({
|
|
12865
|
+
id: true,
|
|
12866
|
+
name: true,
|
|
12867
|
+
}),
|
|
12859
12868
|
});
|
|
12860
12869
|
const leadAnalysisActivitySchema = z.object({
|
|
12861
12870
|
type: z.literal("lead_analysis"),
|
|
@@ -12867,6 +12876,14 @@ const leadAnalysisActivitySchema = z.object({
|
|
|
12867
12876
|
jobUrl: true,
|
|
12868
12877
|
}),
|
|
12869
12878
|
suitabilityRating: z.number().min(0).max(100),
|
|
12879
|
+
organization: organizationSchema.pick({
|
|
12880
|
+
id: true,
|
|
12881
|
+
name: true,
|
|
12882
|
+
}),
|
|
12883
|
+
campaign: campaignSchema.pick({
|
|
12884
|
+
id: true,
|
|
12885
|
+
name: true,
|
|
12886
|
+
}),
|
|
12870
12887
|
});
|
|
12871
12888
|
const leadStatusActivitySchema = z.object({
|
|
12872
12889
|
type: z.literal("lead_status"),
|
|
@@ -12878,6 +12895,14 @@ const leadStatusActivitySchema = z.object({
|
|
|
12878
12895
|
datetime: true,
|
|
12879
12896
|
jobUrl: true,
|
|
12880
12897
|
}),
|
|
12898
|
+
organization: organizationSchema.pick({
|
|
12899
|
+
id: true,
|
|
12900
|
+
name: true,
|
|
12901
|
+
}),
|
|
12902
|
+
campaign: campaignSchema.pick({
|
|
12903
|
+
id: true,
|
|
12904
|
+
name: true,
|
|
12905
|
+
}),
|
|
12881
12906
|
});
|
|
12882
12907
|
const proposalSentActivitySchema = z.object({
|
|
12883
12908
|
type: z.literal("proposal_sent"),
|
|
@@ -12888,6 +12913,14 @@ const proposalSentActivitySchema = z.object({
|
|
|
12888
12913
|
datetime: true,
|
|
12889
12914
|
jobUrl: true,
|
|
12890
12915
|
}),
|
|
12916
|
+
organization: organizationSchema.pick({
|
|
12917
|
+
id: true,
|
|
12918
|
+
name: true,
|
|
12919
|
+
}),
|
|
12920
|
+
campaign: campaignSchema.pick({
|
|
12921
|
+
id: true,
|
|
12922
|
+
name: true,
|
|
12923
|
+
}),
|
|
12891
12924
|
});
|
|
12892
12925
|
const campaignActivitySchema = z.discriminatedUnion("type", [
|
|
12893
12926
|
campaignStatusActivitySchema,
|
|
@@ -12898,7 +12931,7 @@ const campaignActivitySchema = z.discriminatedUnion("type", [
|
|
|
12898
12931
|
const campaignActivityCreateSchema = z.discriminatedUnion("type", [
|
|
12899
12932
|
z.object({
|
|
12900
12933
|
type: z.literal("campaign_status"),
|
|
12901
|
-
status: z.enum(["started", "paused"]),
|
|
12934
|
+
status: z.enum(["started", "paused", "created", "error"]),
|
|
12902
12935
|
}),
|
|
12903
12936
|
z.object({
|
|
12904
12937
|
type: z.literal("lead_analysis"),
|
|
@@ -13179,7 +13212,6 @@ const campaignStatsSchema = z.object({
|
|
|
13179
13212
|
contacted: z.number(),
|
|
13180
13213
|
viewed: z.number(),
|
|
13181
13214
|
replied: z.number(),
|
|
13182
|
-
interview: z.number(),
|
|
13183
13215
|
won: z.number(),
|
|
13184
13216
|
proposalsGenerated: z.number(),
|
|
13185
13217
|
leadsAnalyzed: z.number(),
|
|
@@ -13656,10 +13688,10 @@ exports.clientSizeEnum = clientSizeEnum;
|
|
|
13656
13688
|
exports.cloudflareProtectionFailure = cloudflareProtectionFailure;
|
|
13657
13689
|
exports.commonQuestions = commonQuestions;
|
|
13658
13690
|
exports.countryMapping = countryMapping;
|
|
13659
|
-
exports.
|
|
13691
|
+
exports.coverLetterTemplateSchema = coverLetterTemplateSchema;
|
|
13660
13692
|
exports.createBidderAccountSchema = createBidderAccountSchema;
|
|
13661
13693
|
exports.createCampaignSchema = createCampaignSchema;
|
|
13662
|
-
exports.
|
|
13694
|
+
exports.createCoverLetterTemplateSchema = createCoverLetterTemplateSchema;
|
|
13663
13695
|
exports.createOrganizationSchema = createOrganizationSchema;
|
|
13664
13696
|
exports.createScraperAccountSchema = createScraperAccountSchema;
|
|
13665
13697
|
exports.dailyUsageSchema = dailyUsageSchema;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from "./constants";
|
|
2
|
+
export * from "./schemas";
|
|
3
|
+
export * from "./utils";
|