lancer-shared 1.2.99 → 1.2.100

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.
@@ -12431,74 +12431,6 @@ class WaitForFunctionTimeoutError extends Error {
12431
12431
  }
12432
12432
  const waitForFunctionTimeoutError = (fn, timeout) => new WaitForFunctionTimeoutError(fn, timeout);
12433
12433
 
12434
- const campaignExpensesSchema = z.object({
12435
- biddingAmount: z.number().default(0),
12436
- boostingAmount: z.number().default(0),
12437
- boosted: z.number().default(0),
12438
- });
12439
-
12440
- const bidConfigSchema = z.object({
12441
- agencyName: z.string().nullable(),
12442
- bidderId: z.string().nullable(),
12443
- contractorName: z.string().nullable(),
12444
- specialisedProfile: z.string().nullable(),
12445
- });
12446
- const campaignStatusSchema = z.union([
12447
- z.literal("active"),
12448
- z.literal("draft"),
12449
- z.literal("paused"),
12450
- z.literal("error"),
12451
- ]);
12452
- const campaignSchema = z.object({
12453
- id: z.string(),
12454
- name: z.string(),
12455
- filters: jobFiltersSchema,
12456
- createdAt: numberType(),
12457
- updatedAt: numberType(),
12458
- confirmedBillingAt: numberType().nullable(),
12459
- // automatedSuitability: z.boolean().nullable(),
12460
- boostingEnabled: z.boolean().nullable().default(false),
12461
- maximumBoost: z.number().nullable().default(30),
12462
- // minimumBoost: z.number().nullable().default(0),
12463
- monthlyBudget: z.number().nullable(),
12464
- // suitabilityThreshold: z.number().min(0).max(100).nullable().default(0),
12465
- boostingThreshold: z.number().min(0).max(100).nullable().default(0),
12466
- leadCounts: z.record(leadStatusSchema, z.number()).nullable(),
12467
- expenses: campaignExpensesSchema,
12468
- notificationsEnabled: z.boolean().nullable(),
12469
- status: campaignStatusSchema.optional(),
12470
- bidConfig: bidConfigSchema.nullable(),
12471
- coverLetterTemplateId: z.string().nullable(),
12472
- priority: z.number().nullable(),
12473
- });
12474
- const upworkAccountConnectStatusSchema = z.union([
12475
- z.literal("processing"),
12476
- z.literal("connected"),
12477
- z.literal("failed"),
12478
- ]);
12479
- const upworkAccountConnectSchema = z.object({
12480
- status: upworkAccountConnectStatusSchema.nullable(),
12481
- error: z.string().nullable(),
12482
- });
12483
- const createCampaignSchema = campaignSchema.omit({
12484
- id: true,
12485
- createdAt: true,
12486
- updatedAt: true,
12487
- bidConfig: true,
12488
- });
12489
- const updateCampaignSchema = campaignSchema
12490
- .omit({
12491
- createdAt: true,
12492
- updatedAt: true,
12493
- })
12494
- .partial();
12495
-
12496
- const campaignAIMetricsSchema = z.object({
12497
- leadsAnalyzed: z.number(),
12498
- leadsBidded: z.number(),
12499
- connectsSaved: z.number(),
12500
- });
12501
-
12502
12434
  const proposalSchema = z.object({
12503
12435
  coverLetter: z.string(),
12504
12436
  questionAnswerPairs: questionAnswerPairSchema.array(),
@@ -12865,6 +12797,75 @@ const subscribePayloadSchema = objectType({
12865
12797
  couponCode: stringType().nullish(),
12866
12798
  });
12867
12799
 
12800
+ const campaignExpensesSchema = z.object({
12801
+ biddingAmount: z.number().default(0),
12802
+ boostingAmount: z.number().default(0),
12803
+ boosted: z.number().default(0),
12804
+ });
12805
+
12806
+ const bidConfigSchema = z.object({
12807
+ agencyName: z.string().nullable(),
12808
+ bidderId: z.string().nullable(),
12809
+ contractorName: z.string().nullable(),
12810
+ specialisedProfile: z.string().nullable(),
12811
+ });
12812
+ const campaignStatusSchema = z.union([
12813
+ z.literal("active"),
12814
+ z.literal("draft"),
12815
+ z.literal("paused"),
12816
+ z.literal("error"),
12817
+ ]);
12818
+ const campaignSchema = z.object({
12819
+ id: z.string(),
12820
+ name: z.string(),
12821
+ filters: jobFiltersSchema,
12822
+ createdAt: numberType(),
12823
+ updatedAt: numberType(),
12824
+ confirmedBillingAt: numberType().nullable(),
12825
+ // automatedSuitability: z.boolean().nullable(),
12826
+ boostingEnabled: z.boolean().nullable().default(false),
12827
+ maximumBoost: z.number().nullable().default(30),
12828
+ // minimumBoost: z.number().nullable().default(0),
12829
+ monthlyBudget: z.number().nullable(),
12830
+ // suitabilityThreshold: z.number().min(0).max(100).nullable().default(0),
12831
+ boostingThreshold: z.number().min(0).max(100).nullable().default(0),
12832
+ leadCounts: z.record(leadStatusSchema, z.number()).nullable(),
12833
+ expenses: campaignExpensesSchema,
12834
+ notificationsEnabled: z.boolean().nullable(),
12835
+ status: campaignStatusSchema.optional(),
12836
+ bidConfig: bidConfigSchema.nullable(),
12837
+ coverLetterTemplateId: z.string().nullable(),
12838
+ priority: z.number().nullable(),
12839
+ coverLetterTemplate: coverLetterTemplateSchema.nullable(),
12840
+ });
12841
+ const upworkAccountConnectStatusSchema = z.union([
12842
+ z.literal("processing"),
12843
+ z.literal("connected"),
12844
+ z.literal("failed"),
12845
+ ]);
12846
+ const upworkAccountConnectSchema = z.object({
12847
+ status: upworkAccountConnectStatusSchema.nullable(),
12848
+ error: z.string().nullable(),
12849
+ });
12850
+ const createCampaignSchema = campaignSchema.omit({
12851
+ id: true,
12852
+ createdAt: true,
12853
+ updatedAt: true,
12854
+ bidConfig: true,
12855
+ });
12856
+ const updateCampaignSchema = campaignSchema
12857
+ .omit({
12858
+ createdAt: true,
12859
+ updatedAt: true,
12860
+ })
12861
+ .partial();
12862
+
12863
+ const campaignAIMetricsSchema = z.object({
12864
+ leadsAnalyzed: z.number(),
12865
+ leadsBidded: z.number(),
12866
+ connectsSaved: z.number(),
12867
+ });
12868
+
12868
12869
  const campaignAnalyticsSchema = z.object({
12869
12870
  contacted: z.number().optional(),
12870
12871
  viewed: z.number().optional(),
@@ -1,6 +1,5 @@
1
1
  import { infer, z } from "zod";
2
2
  import { JobFilters } from "../job";
3
- import { CoverLetterTemplate } from "../organization";
4
3
  import { CampaignExpenses } from "./campaign-expenses";
5
4
  export declare const bidConfigSchema: z.ZodObject<{
6
5
  agencyName: z.ZodNullable<z.ZodString>;
@@ -290,6 +289,25 @@ export declare const campaignSchema: z.ZodObject<{
290
289
  }>>;
291
290
  coverLetterTemplateId: z.ZodNullable<z.ZodString>;
292
291
  priority: z.ZodNullable<z.ZodNumber>;
292
+ coverLetterTemplate: z.ZodNullable<z.ZodObject<{
293
+ id: z.ZodString;
294
+ name: z.ZodString;
295
+ description: z.ZodNullable<z.ZodString>;
296
+ template: z.ZodString;
297
+ instructions: z.ZodString;
298
+ }, "strip", z.ZodTypeAny, {
299
+ id: string;
300
+ name: string;
301
+ description: string | null;
302
+ template: string;
303
+ instructions: string;
304
+ }, {
305
+ id: string;
306
+ name: string;
307
+ description: string | null;
308
+ template: string;
309
+ instructions: string;
310
+ }>>;
293
311
  }, "strip", z.ZodTypeAny, {
294
312
  id: string;
295
313
  name: string;
@@ -366,6 +384,13 @@ export declare const campaignSchema: z.ZodObject<{
366
384
  } | null;
367
385
  coverLetterTemplateId: string | null;
368
386
  priority: number | null;
387
+ coverLetterTemplate: {
388
+ id: string;
389
+ name: string;
390
+ description: string | null;
391
+ template: string;
392
+ instructions: string;
393
+ } | null;
369
394
  status?: "active" | "draft" | "paused" | "error" | undefined;
370
395
  }, {
371
396
  id: string;
@@ -440,6 +465,13 @@ export declare const campaignSchema: z.ZodObject<{
440
465
  } | null;
441
466
  coverLetterTemplateId: string | null;
442
467
  priority: number | null;
468
+ coverLetterTemplate: {
469
+ id: string;
470
+ name: string;
471
+ description: string | null;
472
+ template: string;
473
+ instructions: string;
474
+ } | null;
443
475
  status?: "active" | "draft" | "paused" | "error" | undefined;
444
476
  boostingEnabled?: boolean | null | undefined;
445
477
  maximumBoost?: number | null | undefined;
@@ -729,6 +761,25 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
729
761
  }>>;
730
762
  coverLetterTemplateId: z.ZodNullable<z.ZodString>;
731
763
  priority: z.ZodNullable<z.ZodNumber>;
764
+ coverLetterTemplate: z.ZodNullable<z.ZodObject<{
765
+ id: z.ZodString;
766
+ name: z.ZodString;
767
+ description: z.ZodNullable<z.ZodString>;
768
+ template: z.ZodString;
769
+ instructions: z.ZodString;
770
+ }, "strip", z.ZodTypeAny, {
771
+ id: string;
772
+ name: string;
773
+ description: string | null;
774
+ template: string;
775
+ instructions: string;
776
+ }, {
777
+ id: string;
778
+ name: string;
779
+ description: string | null;
780
+ template: string;
781
+ instructions: string;
782
+ }>>;
732
783
  }, "id" | "createdAt" | "updatedAt" | "bidConfig">, "strip", z.ZodTypeAny, {
733
784
  name: string;
734
785
  filters: {
@@ -796,6 +847,13 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
796
847
  notificationsEnabled: boolean | null;
797
848
  coverLetterTemplateId: string | null;
798
849
  priority: number | null;
850
+ coverLetterTemplate: {
851
+ id: string;
852
+ name: string;
853
+ description: string | null;
854
+ template: string;
855
+ instructions: string;
856
+ } | null;
799
857
  status?: "active" | "draft" | "paused" | "error" | undefined;
800
858
  }, {
801
859
  name: string;
@@ -861,6 +919,13 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
861
919
  notificationsEnabled: boolean | null;
862
920
  coverLetterTemplateId: string | null;
863
921
  priority: number | null;
922
+ coverLetterTemplate: {
923
+ id: string;
924
+ name: string;
925
+ description: string | null;
926
+ template: string;
927
+ instructions: string;
928
+ } | null;
864
929
  status?: "active" | "draft" | "paused" | "error" | undefined;
865
930
  boostingEnabled?: boolean | null | undefined;
866
931
  maximumBoost?: number | null | undefined;
@@ -1135,6 +1200,25 @@ export declare const updateCampaignSchema: z.ZodObject<{
1135
1200
  }>>>;
1136
1201
  coverLetterTemplateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1137
1202
  priority: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1203
+ coverLetterTemplate: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1204
+ id: z.ZodString;
1205
+ name: z.ZodString;
1206
+ description: z.ZodNullable<z.ZodString>;
1207
+ template: z.ZodString;
1208
+ instructions: z.ZodString;
1209
+ }, "strip", z.ZodTypeAny, {
1210
+ id: string;
1211
+ name: string;
1212
+ description: string | null;
1213
+ template: string;
1214
+ instructions: string;
1215
+ }, {
1216
+ id: string;
1217
+ name: string;
1218
+ description: string | null;
1219
+ template: string;
1220
+ instructions: string;
1221
+ }>>>;
1138
1222
  }, "strip", z.ZodTypeAny, {
1139
1223
  status?: "active" | "draft" | "paused" | "error" | undefined;
1140
1224
  id?: string | undefined;
@@ -1210,6 +1294,13 @@ export declare const updateCampaignSchema: z.ZodObject<{
1210
1294
  } | null | undefined;
1211
1295
  coverLetterTemplateId?: string | null | undefined;
1212
1296
  priority?: number | null | undefined;
1297
+ coverLetterTemplate?: {
1298
+ id: string;
1299
+ name: string;
1300
+ description: string | null;
1301
+ template: string;
1302
+ instructions: string;
1303
+ } | null | undefined;
1213
1304
  }, {
1214
1305
  status?: "active" | "draft" | "paused" | "error" | undefined;
1215
1306
  id?: string | undefined;
@@ -1285,9 +1376,15 @@ export declare const updateCampaignSchema: z.ZodObject<{
1285
1376
  } | null | undefined;
1286
1377
  coverLetterTemplateId?: string | null | undefined;
1287
1378
  priority?: number | null | undefined;
1379
+ coverLetterTemplate?: {
1380
+ id: string;
1381
+ name: string;
1382
+ description: string | null;
1383
+ template: string;
1384
+ instructions: string;
1385
+ } | null | undefined;
1288
1386
  }>;
1289
1387
  export interface Campaign extends z.infer<typeof campaignSchema> {
1290
- coverLetterTemplate: CoverLetterTemplate | null;
1291
1388
  }
1292
1389
  export type CampaignStatus = z.infer<typeof campaignStatusSchema>;
1293
1390
  export interface CreateCampaign extends z.infer<typeof createCampaignSchema> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lancer-shared",
3
- "version": "1.2.99",
3
+ "version": "1.2.100",
4
4
  "description": "This package contains shared stuff.",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "dist/bundle.cjs.js",