lancer-shared 1.2.188 → 1.2.190

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.
Files changed (27) hide show
  1. package/dist/bundle.cjs.js +250 -28
  2. package/dist/schemas/agent/index.d.ts +5 -5
  3. package/dist/schemas/bidder/bid.d.ts +44 -44
  4. package/dist/schemas/campaign/campaign-analytics.d.ts +405 -61
  5. package/dist/schemas/campaign/campaign.d.ts +270 -45
  6. package/dist/schemas/campaign/index.d.ts +1 -0
  7. package/dist/schemas/campaign/sequence/bid-node.d.ts +6 -0
  8. package/dist/schemas/campaign/sequence/boost-node.d.ts +26 -0
  9. package/dist/schemas/campaign/sequence/client-size-node.d.ts +45 -0
  10. package/dist/schemas/campaign/sequence/client-size.d.ts +45 -0
  11. package/dist/schemas/campaign/sequence/client-spent-node.d.ts +92 -0
  12. package/dist/schemas/campaign/sequence/edges.d.ts +24 -0
  13. package/dist/schemas/campaign/sequence/hire-rate-node.d.ts +91 -0
  14. package/dist/schemas/campaign/sequence/hire-rate.d.ts +91 -0
  15. package/dist/schemas/campaign/sequence/hourly-rate-node.d.ts +91 -0
  16. package/dist/schemas/campaign/sequence/hourly-rate.d.ts +91 -0
  17. package/dist/schemas/campaign/sequence/index.d.ts +10 -0
  18. package/dist/schemas/campaign/sequence/node-types.d.ts +3 -0
  19. package/dist/schemas/campaign/sequence/rating-node.d.ts +91 -0
  20. package/dist/schemas/campaign/sequence/suitability-node.d.ts +90 -0
  21. package/dist/schemas/campaign/sequence/suitability.d.ts +90 -0
  22. package/dist/schemas/lead/index.d.ts +18 -18
  23. package/dist/schemas/lead/lead-status.d.ts +7 -7
  24. package/dist/schemas/logger/log-event.d.ts +5 -5
  25. package/dist/schemas/scraper/scrape-payload.d.ts +147 -50
  26. package/dist/utils/timezones.d.ts +4 -3
  27. package/package.json +1 -1
@@ -19,7 +19,49 @@ export declare const bidConfigSchema: z.ZodObject<{
19
19
  }>;
20
20
  export declare const campaignStatusSchema: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>;
21
21
  export declare const biddingHourlyRateStrategyEnum: z.ZodEnum<["match_job_budget", "match_profile_rate", "fixed_rate"]>;
22
+ export declare const weekDaysEnum: z.ZodEnum<["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]>;
22
23
  export declare const bidWithWarningEnum: z.ZodEnum<["bid", "skip"]>;
24
+ export declare const timeBlockSchema: z.ZodObject<{
25
+ fromHour: z.ZodNumber;
26
+ toHour: z.ZodNumber;
27
+ }, "strip", z.ZodTypeAny, {
28
+ fromHour: number;
29
+ toHour: number;
30
+ }, {
31
+ fromHour: number;
32
+ toHour: number;
33
+ }>;
34
+ export declare const workTimeSchema: z.ZodObject<{
35
+ enabled: z.ZodBoolean;
36
+ days: z.ZodArray<z.ZodEnum<["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]>, "many">;
37
+ timeBlocks: z.ZodArray<z.ZodObject<{
38
+ fromHour: z.ZodNumber;
39
+ toHour: z.ZodNumber;
40
+ }, "strip", z.ZodTypeAny, {
41
+ fromHour: number;
42
+ toHour: number;
43
+ }, {
44
+ fromHour: number;
45
+ toHour: number;
46
+ }>, "many">;
47
+ timezone: z.ZodNullable<z.ZodString>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ enabled: boolean;
50
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
51
+ timeBlocks: {
52
+ fromHour: number;
53
+ toHour: number;
54
+ }[];
55
+ timezone: string | null;
56
+ }, {
57
+ enabled: boolean;
58
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
59
+ timeBlocks: {
60
+ fromHour: number;
61
+ toHour: number;
62
+ }[];
63
+ timezone: string | null;
64
+ }>;
23
65
  export declare const campaignSchema: z.ZodObject<{
24
66
  id: z.ZodString;
25
67
  name: z.ZodString;
@@ -265,11 +307,7 @@ export declare const campaignSchema: z.ZodObject<{
265
307
  biddingFixedHourlyRate: z.ZodNullable<z.ZodNumber>;
266
308
  biddingHourlyRatePercentage: z.ZodNullable<z.ZodNumber>;
267
309
  bidWithWarning: z.ZodEnum<["bid", "skip"]>;
268
- sleepEnabled: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
269
- sleepStartAtHour: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
270
- sleepEndAtHour: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
271
- sleepTimezone: z.ZodNullable<z.ZodString>;
272
- leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "insufficientConnects", "doesNotMeetCriteria", "syncedInAnotherCampaign", "viewed", "replied", "won"]>, z.ZodNumber>>;
310
+ leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "insufficientConnects", "doesNotMeetCriteria", "syncedInAnotherCampaign", "dailyLimitReached", "viewed", "replied", "won"]>, z.ZodNumber>>;
273
311
  expenses: z.ZodObject<{
274
312
  biddingAmount: z.ZodDefault<z.ZodNumber>;
275
313
  boostingAmount: z.ZodDefault<z.ZodNumber>;
@@ -324,6 +362,50 @@ export declare const campaignSchema: z.ZodObject<{
324
362
  }>>;
325
363
  organizationProfileId: z.ZodNullable<z.ZodString>;
326
364
  lastSyncedProposalsAt: z.ZodNullable<z.ZodNumber>;
365
+ limits: z.ZodObject<{
366
+ maxDailyProposalsSent: z.ZodNumber;
367
+ enabled: z.ZodBoolean;
368
+ windowAnchorAt: z.ZodNullable<z.ZodNumber>;
369
+ }, "strip", z.ZodTypeAny, {
370
+ enabled: boolean;
371
+ maxDailyProposalsSent: number;
372
+ windowAnchorAt: number | null;
373
+ }, {
374
+ enabled: boolean;
375
+ maxDailyProposalsSent: number;
376
+ windowAnchorAt: number | null;
377
+ }>;
378
+ workTime: z.ZodObject<{
379
+ enabled: z.ZodBoolean;
380
+ days: z.ZodArray<z.ZodEnum<["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]>, "many">;
381
+ timeBlocks: z.ZodArray<z.ZodObject<{
382
+ fromHour: z.ZodNumber;
383
+ toHour: z.ZodNumber;
384
+ }, "strip", z.ZodTypeAny, {
385
+ fromHour: number;
386
+ toHour: number;
387
+ }, {
388
+ fromHour: number;
389
+ toHour: number;
390
+ }>, "many">;
391
+ timezone: z.ZodNullable<z.ZodString>;
392
+ }, "strip", z.ZodTypeAny, {
393
+ enabled: boolean;
394
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
395
+ timeBlocks: {
396
+ fromHour: number;
397
+ toHour: number;
398
+ }[];
399
+ timezone: string | null;
400
+ }, {
401
+ enabled: boolean;
402
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
403
+ timeBlocks: {
404
+ fromHour: number;
405
+ toHour: number;
406
+ }[];
407
+ timezone: string | null;
408
+ }>;
327
409
  }, "strip", z.ZodTypeAny, {
328
410
  id: string;
329
411
  name: string;
@@ -391,11 +473,7 @@ export declare const campaignSchema: z.ZodObject<{
391
473
  biddingFixedHourlyRate: number | null;
392
474
  biddingHourlyRatePercentage: number | null;
393
475
  bidWithWarning: "bid" | "skip";
394
- sleepEnabled: boolean | null;
395
- sleepStartAtHour: number | null;
396
- sleepEndAtHour: number | null;
397
- sleepTimezone: string | null;
398
- leadCounts: Partial<Record<"leads" | "contacted" | "insufficientConnects" | "doesNotMeetCriteria" | "syncedInAnotherCampaign" | "viewed" | "replied" | "won", number>> | null;
476
+ leadCounts: Partial<Record<"leads" | "contacted" | "insufficientConnects" | "doesNotMeetCriteria" | "syncedInAnotherCampaign" | "dailyLimitReached" | "viewed" | "replied" | "won", number>> | null;
399
477
  expenses: {
400
478
  biddingAmount: number;
401
479
  boostingAmount: number;
@@ -419,6 +497,20 @@ export declare const campaignSchema: z.ZodObject<{
419
497
  } | null;
420
498
  organizationProfileId: string | null;
421
499
  lastSyncedProposalsAt: number | null;
500
+ limits: {
501
+ enabled: boolean;
502
+ maxDailyProposalsSent: number;
503
+ windowAnchorAt: number | null;
504
+ };
505
+ workTime: {
506
+ enabled: boolean;
507
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
508
+ timeBlocks: {
509
+ fromHour: number;
510
+ toHour: number;
511
+ }[];
512
+ timezone: string | null;
513
+ };
422
514
  status?: "active" | "draft" | "paused" | "error" | undefined;
423
515
  }, {
424
516
  id: string;
@@ -483,8 +575,7 @@ export declare const campaignSchema: z.ZodObject<{
483
575
  biddingFixedHourlyRate: number | null;
484
576
  biddingHourlyRatePercentage: number | null;
485
577
  bidWithWarning: "bid" | "skip";
486
- sleepTimezone: string | null;
487
- leadCounts: Partial<Record<"leads" | "contacted" | "insufficientConnects" | "doesNotMeetCriteria" | "syncedInAnotherCampaign" | "viewed" | "replied" | "won", number>> | null;
578
+ leadCounts: Partial<Record<"leads" | "contacted" | "insufficientConnects" | "doesNotMeetCriteria" | "syncedInAnotherCampaign" | "dailyLimitReached" | "viewed" | "replied" | "won", number>> | null;
488
579
  expenses: {
489
580
  biddingAmount?: number | undefined;
490
581
  boostingAmount?: number | undefined;
@@ -508,14 +599,25 @@ export declare const campaignSchema: z.ZodObject<{
508
599
  } | null;
509
600
  organizationProfileId: string | null;
510
601
  lastSyncedProposalsAt: number | null;
602
+ limits: {
603
+ enabled: boolean;
604
+ maxDailyProposalsSent: number;
605
+ windowAnchorAt: number | null;
606
+ };
607
+ workTime: {
608
+ enabled: boolean;
609
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
610
+ timeBlocks: {
611
+ fromHour: number;
612
+ toHour: number;
613
+ }[];
614
+ timezone: string | null;
615
+ };
511
616
  status?: "active" | "draft" | "paused" | "error" | undefined;
512
617
  boostingEnabled?: boolean | null | undefined;
513
618
  maximumBoost?: number | null | undefined;
514
619
  boostingThreshold?: number | null | undefined;
515
620
  biddingDelayInMinutes?: number | undefined;
516
- sleepEnabled?: boolean | null | undefined;
517
- sleepStartAtHour?: number | null | undefined;
518
- sleepEndAtHour?: number | null | undefined;
519
621
  }>;
520
622
  export declare const upworkAccountConnectStatusSchema: z.ZodUnion<[z.ZodLiteral<"processing">, z.ZodLiteral<"connected">, z.ZodLiteral<"failed">, z.ZodLiteral<"reconnecting">, z.ZodLiteral<"reconnected">, z.ZodLiteral<"reconnect_failed">]>;
521
623
  export declare const upworkAccountConnectSchema: z.ZodObject<{
@@ -781,11 +883,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
781
883
  biddingFixedHourlyRate: z.ZodNullable<z.ZodNumber>;
782
884
  biddingHourlyRatePercentage: z.ZodNullable<z.ZodNumber>;
783
885
  bidWithWarning: z.ZodEnum<["bid", "skip"]>;
784
- sleepEnabled: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
785
- sleepStartAtHour: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
786
- sleepEndAtHour: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
787
- sleepTimezone: z.ZodNullable<z.ZodString>;
788
- leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "insufficientConnects", "doesNotMeetCriteria", "syncedInAnotherCampaign", "viewed", "replied", "won"]>, z.ZodNumber>>;
886
+ leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "insufficientConnects", "doesNotMeetCriteria", "syncedInAnotherCampaign", "dailyLimitReached", "viewed", "replied", "won"]>, z.ZodNumber>>;
789
887
  expenses: z.ZodObject<{
790
888
  biddingAmount: z.ZodDefault<z.ZodNumber>;
791
889
  boostingAmount: z.ZodDefault<z.ZodNumber>;
@@ -840,6 +938,50 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
840
938
  }>>;
841
939
  organizationProfileId: z.ZodNullable<z.ZodString>;
842
940
  lastSyncedProposalsAt: z.ZodNullable<z.ZodNumber>;
941
+ limits: z.ZodObject<{
942
+ maxDailyProposalsSent: z.ZodNumber;
943
+ enabled: z.ZodBoolean;
944
+ windowAnchorAt: z.ZodNullable<z.ZodNumber>;
945
+ }, "strip", z.ZodTypeAny, {
946
+ enabled: boolean;
947
+ maxDailyProposalsSent: number;
948
+ windowAnchorAt: number | null;
949
+ }, {
950
+ enabled: boolean;
951
+ maxDailyProposalsSent: number;
952
+ windowAnchorAt: number | null;
953
+ }>;
954
+ workTime: z.ZodObject<{
955
+ enabled: z.ZodBoolean;
956
+ days: z.ZodArray<z.ZodEnum<["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]>, "many">;
957
+ timeBlocks: z.ZodArray<z.ZodObject<{
958
+ fromHour: z.ZodNumber;
959
+ toHour: z.ZodNumber;
960
+ }, "strip", z.ZodTypeAny, {
961
+ fromHour: number;
962
+ toHour: number;
963
+ }, {
964
+ fromHour: number;
965
+ toHour: number;
966
+ }>, "many">;
967
+ timezone: z.ZodNullable<z.ZodString>;
968
+ }, "strip", z.ZodTypeAny, {
969
+ enabled: boolean;
970
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
971
+ timeBlocks: {
972
+ fromHour: number;
973
+ toHour: number;
974
+ }[];
975
+ timezone: string | null;
976
+ }, {
977
+ enabled: boolean;
978
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
979
+ timeBlocks: {
980
+ fromHour: number;
981
+ toHour: number;
982
+ }[];
983
+ timezone: string | null;
984
+ }>;
843
985
  }, "id" | "createdAt" | "updatedAt" | "bidConfig">, "strip", z.ZodTypeAny, {
844
986
  name: string;
845
987
  filters: {
@@ -904,11 +1046,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
904
1046
  biddingFixedHourlyRate: number | null;
905
1047
  biddingHourlyRatePercentage: number | null;
906
1048
  bidWithWarning: "bid" | "skip";
907
- sleepEnabled: boolean | null;
908
- sleepStartAtHour: number | null;
909
- sleepEndAtHour: number | null;
910
- sleepTimezone: string | null;
911
- leadCounts: Partial<Record<"leads" | "contacted" | "insufficientConnects" | "doesNotMeetCriteria" | "syncedInAnotherCampaign" | "viewed" | "replied" | "won", number>> | null;
1049
+ leadCounts: Partial<Record<"leads" | "contacted" | "insufficientConnects" | "doesNotMeetCriteria" | "syncedInAnotherCampaign" | "dailyLimitReached" | "viewed" | "replied" | "won", number>> | null;
912
1050
  expenses: {
913
1051
  biddingAmount: number;
914
1052
  boostingAmount: number;
@@ -926,6 +1064,20 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
926
1064
  } | null;
927
1065
  organizationProfileId: string | null;
928
1066
  lastSyncedProposalsAt: number | null;
1067
+ limits: {
1068
+ enabled: boolean;
1069
+ maxDailyProposalsSent: number;
1070
+ windowAnchorAt: number | null;
1071
+ };
1072
+ workTime: {
1073
+ enabled: boolean;
1074
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
1075
+ timeBlocks: {
1076
+ fromHour: number;
1077
+ toHour: number;
1078
+ }[];
1079
+ timezone: string | null;
1080
+ };
929
1081
  status?: "active" | "draft" | "paused" | "error" | undefined;
930
1082
  }, {
931
1083
  name: string;
@@ -987,8 +1139,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
987
1139
  biddingFixedHourlyRate: number | null;
988
1140
  biddingHourlyRatePercentage: number | null;
989
1141
  bidWithWarning: "bid" | "skip";
990
- sleepTimezone: string | null;
991
- leadCounts: Partial<Record<"leads" | "contacted" | "insufficientConnects" | "doesNotMeetCriteria" | "syncedInAnotherCampaign" | "viewed" | "replied" | "won", number>> | null;
1142
+ leadCounts: Partial<Record<"leads" | "contacted" | "insufficientConnects" | "doesNotMeetCriteria" | "syncedInAnotherCampaign" | "dailyLimitReached" | "viewed" | "replied" | "won", number>> | null;
992
1143
  expenses: {
993
1144
  biddingAmount?: number | undefined;
994
1145
  boostingAmount?: number | undefined;
@@ -1006,14 +1157,25 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
1006
1157
  } | null;
1007
1158
  organizationProfileId: string | null;
1008
1159
  lastSyncedProposalsAt: number | null;
1160
+ limits: {
1161
+ enabled: boolean;
1162
+ maxDailyProposalsSent: number;
1163
+ windowAnchorAt: number | null;
1164
+ };
1165
+ workTime: {
1166
+ enabled: boolean;
1167
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
1168
+ timeBlocks: {
1169
+ fromHour: number;
1170
+ toHour: number;
1171
+ }[];
1172
+ timezone: string | null;
1173
+ };
1009
1174
  status?: "active" | "draft" | "paused" | "error" | undefined;
1010
1175
  boostingEnabled?: boolean | null | undefined;
1011
1176
  maximumBoost?: number | null | undefined;
1012
1177
  boostingThreshold?: number | null | undefined;
1013
1178
  biddingDelayInMinutes?: number | undefined;
1014
- sleepEnabled?: boolean | null | undefined;
1015
- sleepStartAtHour?: number | null | undefined;
1016
- sleepEndAtHour?: number | null | undefined;
1017
1179
  }>;
1018
1180
  export declare const updateCampaignSchema: z.ZodObject<{
1019
1181
  status: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>>>;
@@ -1259,11 +1421,7 @@ export declare const updateCampaignSchema: z.ZodObject<{
1259
1421
  biddingFixedHourlyRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1260
1422
  biddingHourlyRatePercentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1261
1423
  bidWithWarning: z.ZodOptional<z.ZodEnum<["bid", "skip"]>>;
1262
- sleepEnabled: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
1263
- sleepStartAtHour: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
1264
- sleepEndAtHour: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
1265
- sleepTimezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1266
- leadCounts: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "insufficientConnects", "doesNotMeetCriteria", "syncedInAnotherCampaign", "viewed", "replied", "won"]>, z.ZodNumber>>>;
1424
+ leadCounts: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "insufficientConnects", "doesNotMeetCriteria", "syncedInAnotherCampaign", "dailyLimitReached", "viewed", "replied", "won"]>, z.ZodNumber>>>;
1267
1425
  expenses: z.ZodOptional<z.ZodObject<{
1268
1426
  biddingAmount: z.ZodDefault<z.ZodNumber>;
1269
1427
  boostingAmount: z.ZodDefault<z.ZodNumber>;
@@ -1317,6 +1475,50 @@ export declare const updateCampaignSchema: z.ZodObject<{
1317
1475
  }>>>;
1318
1476
  organizationProfileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1319
1477
  lastSyncedProposalsAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1478
+ limits: z.ZodOptional<z.ZodObject<{
1479
+ maxDailyProposalsSent: z.ZodNumber;
1480
+ enabled: z.ZodBoolean;
1481
+ windowAnchorAt: z.ZodNullable<z.ZodNumber>;
1482
+ }, "strip", z.ZodTypeAny, {
1483
+ enabled: boolean;
1484
+ maxDailyProposalsSent: number;
1485
+ windowAnchorAt: number | null;
1486
+ }, {
1487
+ enabled: boolean;
1488
+ maxDailyProposalsSent: number;
1489
+ windowAnchorAt: number | null;
1490
+ }>>;
1491
+ workTime: z.ZodOptional<z.ZodObject<{
1492
+ enabled: z.ZodBoolean;
1493
+ days: z.ZodArray<z.ZodEnum<["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]>, "many">;
1494
+ timeBlocks: z.ZodArray<z.ZodObject<{
1495
+ fromHour: z.ZodNumber;
1496
+ toHour: z.ZodNumber;
1497
+ }, "strip", z.ZodTypeAny, {
1498
+ fromHour: number;
1499
+ toHour: number;
1500
+ }, {
1501
+ fromHour: number;
1502
+ toHour: number;
1503
+ }>, "many">;
1504
+ timezone: z.ZodNullable<z.ZodString>;
1505
+ }, "strip", z.ZodTypeAny, {
1506
+ enabled: boolean;
1507
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
1508
+ timeBlocks: {
1509
+ fromHour: number;
1510
+ toHour: number;
1511
+ }[];
1512
+ timezone: string | null;
1513
+ }, {
1514
+ enabled: boolean;
1515
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
1516
+ timeBlocks: {
1517
+ fromHour: number;
1518
+ toHour: number;
1519
+ }[];
1520
+ timezone: string | null;
1521
+ }>>;
1320
1522
  }, "strip", z.ZodTypeAny, {
1321
1523
  status?: "active" | "draft" | "paused" | "error" | undefined;
1322
1524
  id?: string | undefined;
@@ -1383,11 +1585,7 @@ export declare const updateCampaignSchema: z.ZodObject<{
1383
1585
  biddingFixedHourlyRate?: number | null | undefined;
1384
1586
  biddingHourlyRatePercentage?: number | null | undefined;
1385
1587
  bidWithWarning?: "bid" | "skip" | undefined;
1386
- sleepEnabled?: boolean | null | undefined;
1387
- sleepStartAtHour?: number | null | undefined;
1388
- sleepEndAtHour?: number | null | undefined;
1389
- sleepTimezone?: string | null | undefined;
1390
- leadCounts?: Partial<Record<"leads" | "contacted" | "insufficientConnects" | "doesNotMeetCriteria" | "syncedInAnotherCampaign" | "viewed" | "replied" | "won", number>> | null | undefined;
1588
+ leadCounts?: Partial<Record<"leads" | "contacted" | "insufficientConnects" | "doesNotMeetCriteria" | "syncedInAnotherCampaign" | "dailyLimitReached" | "viewed" | "replied" | "won", number>> | null | undefined;
1391
1589
  expenses?: {
1392
1590
  biddingAmount: number;
1393
1591
  boostingAmount: number;
@@ -1411,6 +1609,20 @@ export declare const updateCampaignSchema: z.ZodObject<{
1411
1609
  } | null | undefined;
1412
1610
  organizationProfileId?: string | null | undefined;
1413
1611
  lastSyncedProposalsAt?: number | null | undefined;
1612
+ limits?: {
1613
+ enabled: boolean;
1614
+ maxDailyProposalsSent: number;
1615
+ windowAnchorAt: number | null;
1616
+ } | undefined;
1617
+ workTime?: {
1618
+ enabled: boolean;
1619
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
1620
+ timeBlocks: {
1621
+ fromHour: number;
1622
+ toHour: number;
1623
+ }[];
1624
+ timezone: string | null;
1625
+ } | undefined;
1414
1626
  }, {
1415
1627
  status?: "active" | "draft" | "paused" | "error" | undefined;
1416
1628
  id?: string | undefined;
@@ -1477,11 +1689,7 @@ export declare const updateCampaignSchema: z.ZodObject<{
1477
1689
  biddingFixedHourlyRate?: number | null | undefined;
1478
1690
  biddingHourlyRatePercentage?: number | null | undefined;
1479
1691
  bidWithWarning?: "bid" | "skip" | undefined;
1480
- sleepEnabled?: boolean | null | undefined;
1481
- sleepStartAtHour?: number | null | undefined;
1482
- sleepEndAtHour?: number | null | undefined;
1483
- sleepTimezone?: string | null | undefined;
1484
- leadCounts?: Partial<Record<"leads" | "contacted" | "insufficientConnects" | "doesNotMeetCriteria" | "syncedInAnotherCampaign" | "viewed" | "replied" | "won", number>> | null | undefined;
1692
+ leadCounts?: Partial<Record<"leads" | "contacted" | "insufficientConnects" | "doesNotMeetCriteria" | "syncedInAnotherCampaign" | "dailyLimitReached" | "viewed" | "replied" | "won", number>> | null | undefined;
1485
1693
  expenses?: {
1486
1694
  biddingAmount?: number | undefined;
1487
1695
  boostingAmount?: number | undefined;
@@ -1505,6 +1713,20 @@ export declare const updateCampaignSchema: z.ZodObject<{
1505
1713
  } | null | undefined;
1506
1714
  organizationProfileId?: string | null | undefined;
1507
1715
  lastSyncedProposalsAt?: number | null | undefined;
1716
+ limits?: {
1717
+ enabled: boolean;
1718
+ maxDailyProposalsSent: number;
1719
+ windowAnchorAt: number | null;
1720
+ } | undefined;
1721
+ workTime?: {
1722
+ enabled: boolean;
1723
+ days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
1724
+ timeBlocks: {
1725
+ fromHour: number;
1726
+ toHour: number;
1727
+ }[];
1728
+ timezone: string | null;
1729
+ } | undefined;
1508
1730
  }>;
1509
1731
  export type BiddingHourlyRateStrategy = z.infer<typeof biddingHourlyRateStrategyEnum>;
1510
1732
  export interface Campaign extends z.infer<typeof campaignSchema> {
@@ -1522,3 +1744,6 @@ export interface UpdateCampaign extends z.infer<typeof updateCampaignSchema> {
1522
1744
  }
1523
1745
  export interface BidConfig extends infer<typeof bidConfigSchema> {
1524
1746
  }
1747
+ export type WeekDays = z.infer<typeof weekDaysEnum>;
1748
+ export type TimeBlock = z.infer<typeof timeBlockSchema>;
1749
+ export type WorkTime = z.infer<typeof workTimeSchema>;
@@ -4,3 +4,4 @@ export * from './campaign-analytics';
4
4
  export * from './campaign-chat-bot';
5
5
  export * from './campaign-expenses';
6
6
  export * from './campaign-insights';
7
+ export * from './sequence';
@@ -0,0 +1,6 @@
1
+ export interface BidNodeData {
2
+ label: string;
3
+ onSubmit: () => void;
4
+ onDelete: () => void;
5
+ [key: string]: unknown;
6
+ }
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ import { NodeType } from './node-types';
3
+ declare const fallbackEnum: z.ZodEnum<["noBoostBid", "ignore"]>;
4
+ export type Fallback = z.infer<typeof fallbackEnum>;
5
+ export declare const boostFormSchema: z.ZodObject<{
6
+ minPlace: z.ZodNumber;
7
+ maxConnects: z.ZodNumber;
8
+ fallback: z.ZodEnum<["noBoostBid", "ignore"]>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ minPlace: number;
11
+ maxConnects: number;
12
+ fallback: "noBoostBid" | "ignore";
13
+ }, {
14
+ minPlace: number;
15
+ maxConnects: number;
16
+ fallback: "noBoostBid" | "ignore";
17
+ }>;
18
+ export type BoostFormData = z.infer<typeof boostFormSchema>;
19
+ export interface BoostNodeData {
20
+ label: string;
21
+ onSubmit: (formData: BoostFormData) => void;
22
+ onDelete: () => void;
23
+ allowedNodes: NodeType[];
24
+ [key: string]: unknown;
25
+ }
26
+ export {};
@@ -0,0 +1,45 @@
1
+ import { z } from 'zod';
2
+ import { clientSizeEnum } from '../../job';
3
+ import { NodeType } from './node-types';
4
+ export type ClientSize = z.infer<typeof clientSizeEnum>;
5
+ export declare const createClientSizeFormSchema: (existingSizes: ClientSize[]) => z.ZodEffects<z.ZodObject<{
6
+ sizes: z.ZodArray<z.ZodEnum<["Individual client", "Small company (2-9 people)", "Mid-sized company (10-99 people)", "Large company (100-1,000 people)", "Large company (1,000+ people)", "Unspecified"]>, "many">;
7
+ action: z.ZodEnum<["clientAvgHourlyRateNode", "bidNode", "suitabilityNode", "clientHireRateNode", "clientSizeNode", "boostNode", "clientSpentNode", "clientRatingNode"]>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ sizes: ("Unspecified" | "Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)")[];
10
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode" | "clientSpentNode" | "clientRatingNode";
11
+ }, {
12
+ sizes: ("Unspecified" | "Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)")[];
13
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode" | "clientSpentNode" | "clientRatingNode";
14
+ }>, {
15
+ sizes: ("Unspecified" | "Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)")[];
16
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode" | "clientSpentNode" | "clientRatingNode";
17
+ }, {
18
+ sizes: ("Unspecified" | "Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)")[];
19
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode" | "clientSpentNode" | "clientRatingNode";
20
+ }>;
21
+ export declare const addFromClientSizeNodeFormSchema: z.ZodEffects<z.ZodObject<{
22
+ sizes: z.ZodArray<z.ZodEnum<["Individual client", "Small company (2-9 people)", "Mid-sized company (10-99 people)", "Large company (100-1,000 people)", "Large company (1,000+ people)", "Unspecified"]>, "many">;
23
+ action: z.ZodEnum<["clientAvgHourlyRateNode", "bidNode", "suitabilityNode", "clientHireRateNode", "clientSizeNode", "boostNode", "clientSpentNode", "clientRatingNode"]>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ sizes: ("Unspecified" | "Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)")[];
26
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode" | "clientSpentNode" | "clientRatingNode";
27
+ }, {
28
+ sizes: ("Unspecified" | "Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)")[];
29
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode" | "clientSpentNode" | "clientRatingNode";
30
+ }>, {
31
+ sizes: ("Unspecified" | "Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)")[];
32
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode" | "clientSpentNode" | "clientRatingNode";
33
+ }, {
34
+ sizes: ("Unspecified" | "Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)")[];
35
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode" | "clientSpentNode" | "clientRatingNode";
36
+ }>;
37
+ export type AddFromClientSizeNodeFormData = z.infer<typeof addFromClientSizeNodeFormSchema>;
38
+ export interface ClientSizeNodeData {
39
+ label: string;
40
+ onSubmit: (formData: AddFromClientSizeNodeFormData) => void;
41
+ onDelete: () => void;
42
+ existingSizes: ClientSize[];
43
+ allowedNodes: NodeType[];
44
+ [key: string]: unknown;
45
+ }
@@ -0,0 +1,45 @@
1
+ import { clientSizeEnum } from 'lancer-shared';
2
+ import z from 'zod';
3
+ import { NodeType } from './node-types';
4
+ export type ClientSize = z.infer<typeof clientSizeEnum>;
5
+ export declare const createClientSizeFormSchema: (existingSizes: ClientSize[]) => z.ZodEffects<z.ZodObject<{
6
+ sizes: z.ZodArray<z.ZodEnum<["Individual client", "Small company (2-9 people)", "Mid-sized company (10-99 people)", "Large company (100-1,000 people)", "Large company (1,000+ people)", "Unspecified"]>, "many">;
7
+ action: z.ZodEnum<["clientAvgHourlyRateNode", "bidNode", "suitabilityNode", "clientHireRateNode", "clientSizeNode", "boostNode"]>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ sizes: ("Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)" | "Unspecified")[];
10
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode";
11
+ }, {
12
+ sizes: ("Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)" | "Unspecified")[];
13
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode";
14
+ }>, {
15
+ sizes: ("Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)" | "Unspecified")[];
16
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode";
17
+ }, {
18
+ sizes: ("Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)" | "Unspecified")[];
19
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode";
20
+ }>;
21
+ export declare const addFromClientSizeNodeFormSchema: z.ZodEffects<z.ZodObject<{
22
+ sizes: z.ZodArray<z.ZodEnum<["Individual client", "Small company (2-9 people)", "Mid-sized company (10-99 people)", "Large company (100-1,000 people)", "Large company (1,000+ people)", "Unspecified"]>, "many">;
23
+ action: z.ZodEnum<["clientAvgHourlyRateNode", "bidNode", "suitabilityNode", "clientHireRateNode", "clientSizeNode", "boostNode"]>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ sizes: ("Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)" | "Unspecified")[];
26
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode";
27
+ }, {
28
+ sizes: ("Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)" | "Unspecified")[];
29
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode";
30
+ }>, {
31
+ sizes: ("Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)" | "Unspecified")[];
32
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode";
33
+ }, {
34
+ sizes: ("Individual client" | "Small company (2-9 people)" | "Mid-sized company (10-99 people)" | "Large company (100-1,000 people)" | "Large company (1,000+ people)" | "Unspecified")[];
35
+ action: "clientAvgHourlyRateNode" | "bidNode" | "suitabilityNode" | "clientHireRateNode" | "clientSizeNode" | "boostNode";
36
+ }>;
37
+ export type AddFromClientSizeNodeFormData = z.infer<typeof addFromClientSizeNodeFormSchema>;
38
+ export interface ClientSizeNodeData {
39
+ label: string;
40
+ onSubmit: (formData: AddFromClientSizeNodeFormData) => void;
41
+ onDelete: () => void;
42
+ existingSizes: ClientSize[];
43
+ allowedNodes: NodeType[];
44
+ [key: string]: unknown;
45
+ }