lancer-shared 1.2.51 → 1.2.53
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
CHANGED
|
@@ -6534,6 +6534,7 @@ const ROUTES = {
|
|
|
6534
6534
|
BIDDER_ACCOUNTS: {
|
|
6535
6535
|
BASE: (organizationId, campaignId) => `organizations/${organizationId}/campaigns/${campaignId}/bidder-account`,
|
|
6536
6536
|
},
|
|
6537
|
+
UPWORK_ACCOUNT: (organizationId, campaignId) => `organizations/${organizationId}/campaigns/${campaignId}/upwork-account`,
|
|
6537
6538
|
LEADS: {
|
|
6538
6539
|
BASE: (organizationId, campaignId) => `organizations/${organizationId}/campaigns/${campaignId}/leads`,
|
|
6539
6540
|
BY_ID: (organizationId, campaignId, leadId) => `organizations/${organizationId}/campaigns/${campaignId}/leads/${leadId}`,
|
|
@@ -12281,6 +12282,19 @@ const subscriptionSchema = objectType({
|
|
|
12281
12282
|
usage: recordType(usageEventTypeEnum, numberType()),
|
|
12282
12283
|
});
|
|
12283
12284
|
|
|
12285
|
+
const coverLetterTemplateSchema = z.object({
|
|
12286
|
+
id: z.string(),
|
|
12287
|
+
name: z.string(),
|
|
12288
|
+
description: z.string().nullable(),
|
|
12289
|
+
template: z.string(),
|
|
12290
|
+
instructions: z.string(),
|
|
12291
|
+
});
|
|
12292
|
+
const createCoverLetterTemplateSchema = coverLetterTemplateSchema.pick({
|
|
12293
|
+
name: true,
|
|
12294
|
+
template: true,
|
|
12295
|
+
instructions: true,
|
|
12296
|
+
});
|
|
12297
|
+
|
|
12284
12298
|
const organizationMemberRoleEnum = z.enum(["admin", "member"]);
|
|
12285
12299
|
const organizationMemberSchema = objectType({
|
|
12286
12300
|
role: organizationMemberRoleEnum,
|
|
@@ -12296,19 +12310,6 @@ const onboardingProgressSchema = z.object({
|
|
|
12296
12310
|
startCampaign: z.boolean(),
|
|
12297
12311
|
});
|
|
12298
12312
|
|
|
12299
|
-
const coverLetterTemplateSchema = z.object({
|
|
12300
|
-
id: z.string(),
|
|
12301
|
-
name: z.string(),
|
|
12302
|
-
description: z.string().nullable(),
|
|
12303
|
-
template: z.string(),
|
|
12304
|
-
instructions: z.string(),
|
|
12305
|
-
});
|
|
12306
|
-
const createCoverLetterTemplateSchema = coverLetterTemplateSchema.pick({
|
|
12307
|
-
name: true,
|
|
12308
|
-
template: true,
|
|
12309
|
-
instructions: true,
|
|
12310
|
-
});
|
|
12311
|
-
|
|
12312
12313
|
const organizationTypeSchema = z.enum(["agency", "freelancer"]);
|
|
12313
12314
|
const organizationTierEnum = z.enum(["free", "premium"]);
|
|
12314
12315
|
const limitsSchema = objectType({
|
|
@@ -12388,6 +12389,7 @@ const subscribePayloadSchema = objectType({
|
|
|
12388
12389
|
planId: stringType().min(1, "Plan id is required."),
|
|
12389
12390
|
paymentMethodId: stringType().min(1, "Payment method is required."),
|
|
12390
12391
|
toltReferral: stringType().optional(),
|
|
12392
|
+
couponCode: stringType().nullish(),
|
|
12391
12393
|
});
|
|
12392
12394
|
|
|
12393
12395
|
const systemPromptSchema = objectType({
|
|
@@ -12799,10 +12801,10 @@ const bidConfigSchema = z.object({
|
|
|
12799
12801
|
specialisedProfile: z.string().nullable(),
|
|
12800
12802
|
});
|
|
12801
12803
|
const campaignStatusSchema = z.union([
|
|
12802
|
-
z.literal(
|
|
12803
|
-
z.literal(
|
|
12804
|
-
z.literal(
|
|
12805
|
-
z.literal(
|
|
12804
|
+
z.literal("active"),
|
|
12805
|
+
z.literal("draft"),
|
|
12806
|
+
z.literal("paused"),
|
|
12807
|
+
z.literal("error"),
|
|
12806
12808
|
]);
|
|
12807
12809
|
const campaignSchema = z.object({
|
|
12808
12810
|
id: z.string(),
|
|
@@ -12826,6 +12828,15 @@ const campaignSchema = z.object({
|
|
|
12826
12828
|
bidConfig: bidConfigSchema.nullable(),
|
|
12827
12829
|
coverLetterTemplateId: z.string().nullable(),
|
|
12828
12830
|
});
|
|
12831
|
+
const upworkAccountConnectStatusSchema = z.union([
|
|
12832
|
+
z.literal("processing"),
|
|
12833
|
+
z.literal("connected"),
|
|
12834
|
+
z.literal("failed"),
|
|
12835
|
+
]);
|
|
12836
|
+
const upworkAccountConnectSchema = z.object({
|
|
12837
|
+
status: upworkAccountConnectStatusSchema.nullable(),
|
|
12838
|
+
error: z.string().nullable(),
|
|
12839
|
+
});
|
|
12829
12840
|
const createCampaignSchema = campaignSchema.omit({
|
|
12830
12841
|
id: true,
|
|
12831
12842
|
createdAt: true,
|
|
@@ -13847,6 +13858,8 @@ exports.updateCampaignAnalyticsSchema = updateCampaignAnalyticsSchema;
|
|
|
13847
13858
|
exports.updateCampaignSchema = updateCampaignSchema;
|
|
13848
13859
|
exports.updateLeadStatusSchema = updateLeadStatusSchema;
|
|
13849
13860
|
exports.updateScraperAccountSchema = updateScraperAccountSchema;
|
|
13861
|
+
exports.upworkAccountConnectSchema = upworkAccountConnectSchema;
|
|
13862
|
+
exports.upworkAccountConnectStatusSchema = upworkAccountConnectStatusSchema;
|
|
13850
13863
|
exports.upworkJobSchema = upworkJobSchema;
|
|
13851
13864
|
exports.upworkProfileSchema = upworkProfileSchema;
|
|
13852
13865
|
exports.usageEventMetadataSchema = usageEventMetadataSchema;
|
|
@@ -121,6 +121,7 @@ export declare const ROUTES: {
|
|
|
121
121
|
readonly BIDDER_ACCOUNTS: {
|
|
122
122
|
readonly BASE: (organizationId: string, campaignId: string) => string;
|
|
123
123
|
};
|
|
124
|
+
readonly UPWORK_ACCOUNT: (organizationId: string, campaignId: string) => string;
|
|
124
125
|
readonly LEADS: {
|
|
125
126
|
readonly BASE: (organizationId: string, campaignId: string) => string;
|
|
126
127
|
readonly BY_ID: (organizationId: string, campaignId: string, leadId: string) => string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { infer, z } from
|
|
2
|
-
import { JobFilters } from
|
|
3
|
-
import { CoverLetterTemplate } from
|
|
4
|
-
import { CampaignExpenses } from
|
|
5
|
-
import { CampaignWebhook } from
|
|
1
|
+
import { infer, z } from "zod";
|
|
2
|
+
import { JobFilters } from "../job";
|
|
3
|
+
import { CoverLetterTemplate } from "../organization";
|
|
4
|
+
import { CampaignExpenses } from "./campaign-expenses";
|
|
5
|
+
import { CampaignWebhook } from "./campaign-webhooks";
|
|
6
6
|
export declare const bidConfigSchema: z.ZodObject<{
|
|
7
7
|
agencyName: z.ZodNullable<z.ZodString>;
|
|
8
8
|
bidderId: z.ZodNullable<z.ZodString>;
|
|
@@ -485,6 +485,19 @@ export declare const campaignSchema: z.ZodObject<{
|
|
|
485
485
|
maximumBoost?: number | null | undefined;
|
|
486
486
|
boostingThreshold?: number | null | undefined;
|
|
487
487
|
}>;
|
|
488
|
+
export declare const upworkAccountConnectStatusSchema: z.ZodUnion<[z.ZodLiteral<"processing">, z.ZodLiteral<"connected">, z.ZodLiteral<"failed">]>;
|
|
489
|
+
export declare const upworkAccountConnectSchema: z.ZodObject<{
|
|
490
|
+
status: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"processing">, z.ZodLiteral<"connected">, z.ZodLiteral<"failed">]>>;
|
|
491
|
+
error: z.ZodNullable<z.ZodString>;
|
|
492
|
+
}, "strip", z.ZodTypeAny, {
|
|
493
|
+
status: "processing" | "connected" | "failed" | null;
|
|
494
|
+
error: string | null;
|
|
495
|
+
}, {
|
|
496
|
+
status: "processing" | "connected" | "failed" | null;
|
|
497
|
+
error: string | null;
|
|
498
|
+
}>;
|
|
499
|
+
export type UpworkAccountConnectStatus = z.infer<typeof upworkAccountConnectStatusSchema>;
|
|
500
|
+
export type UpworkAccountConnect = z.infer<typeof upworkAccountConnectSchema>;
|
|
488
501
|
export declare const createCampaignSchema: z.ZodObject<Omit<{
|
|
489
502
|
id: z.ZodString;
|
|
490
503
|
name: z.ZodString;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { infer, z } from "zod";
|
|
2
|
-
import { OnboardingProgress } from "./onboarding";
|
|
3
2
|
import { CoverLetterTemplate } from "./cover-letter";
|
|
3
|
+
import { OnboardingProgress } from "./onboarding";
|
|
4
4
|
export declare const organizationTypeSchema: z.ZodEnum<["agency", "freelancer"]>;
|
|
5
5
|
export declare const organizationTierEnum: z.ZodEnum<["free", "premium"]>;
|
|
6
6
|
export declare const limitsSchema: z.ZodObject<{
|
|
@@ -639,14 +639,17 @@ export declare const subscribePayloadSchema: z.ZodObject<{
|
|
|
639
639
|
planId: z.ZodString;
|
|
640
640
|
paymentMethodId: z.ZodString;
|
|
641
641
|
toltReferral: z.ZodOptional<z.ZodString>;
|
|
642
|
+
couponCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
642
643
|
}, "strip", z.ZodTypeAny, {
|
|
643
644
|
planId: string;
|
|
644
645
|
paymentMethodId: string;
|
|
645
646
|
toltReferral?: string | undefined;
|
|
647
|
+
couponCode?: string | null | undefined;
|
|
646
648
|
}, {
|
|
647
649
|
planId: string;
|
|
648
650
|
paymentMethodId: string;
|
|
649
651
|
toltReferral?: string | undefined;
|
|
652
|
+
couponCode?: string | null | undefined;
|
|
650
653
|
}>;
|
|
651
654
|
export interface Organization extends infer<typeof organizationSchema> {
|
|
652
655
|
coverLetterTemplates: CoverLetterTemplate[] | null;
|
|
@@ -665,7 +668,7 @@ export interface OrganizationSettings extends infer<typeof organizationSettingsS
|
|
|
665
668
|
export type OrganizationType = z.infer<typeof organizationTypeSchema>;
|
|
666
669
|
export interface SubscribePayload extends z.infer<typeof subscribePayloadSchema> {
|
|
667
670
|
}
|
|
671
|
+
export * from "./cover-letter";
|
|
668
672
|
export * from "./member";
|
|
669
673
|
export * from "./onboarding";
|
|
670
674
|
export * from "./subscription";
|
|
671
|
-
export * from "./cover-letter";
|