lancer-shared 1.2.86 → 1.2.88

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 (68) hide show
  1. package/dist/bundle.cjs.js +39 -14
  2. package/dist/constants/organization.d.ts +2 -2
  3. package/dist/constants/routes.d.ts +2 -0
  4. package/dist/constants/routes.js +0 -6
  5. package/dist/schemas/agent/index.d.ts +31 -0
  6. package/dist/schemas/campaign/campaign-analytics.d.ts +28 -2
  7. package/dist/schemas/campaign/campaign-integrations.d.ts +5 -0
  8. package/dist/schemas/campaign/campaign.d.ts +9 -0
  9. package/dist/schemas/job/job.d.ts +16 -16
  10. package/dist/schemas/job/pipeline-job.d.ts +3 -9
  11. package/dist/schemas/job/pipeline-job.js +0 -1
  12. package/dist/schemas/lead/index.d.ts +30 -4
  13. package/dist/schemas/logger/log-event.d.ts +118 -41
  14. package/dist/schemas/proxy/proxy.js +1 -3
  15. package/dist/schemas/scraper/scrape-payload.d.ts +21 -6
  16. package/dist/schemas/upwork-account/index.d.ts +1 -1
  17. package/dist/schemas/upwork-account/index.js +1 -1
  18. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +14 -14
  19. package/dist/schemas/upwork-account/upwork-business-manager-account.js +2 -2
  20. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +23 -23
  21. package/dist/schemas/upwork-account/upwork-scraping-account.js +3 -4
  22. package/dist/types/upwork-account/upwork-scraping-account.d.ts +2 -2
  23. package/package.json +1 -1
  24. package/dist/constants/proxies.d.ts +0 -4
  25. package/dist/constants/upwork-filters.d.ts +0 -5
  26. package/dist/constants/upwork-filters.js +0 -75
  27. package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +0 -5
  28. package/dist/schemas/ai-config/ai-config.d.ts +0 -39
  29. package/dist/schemas/ai-config/ai-config.js +0 -12
  30. package/dist/schemas/ai-config/index.d.ts +0 -1
  31. package/dist/schemas/ai-config/index.js +0 -17
  32. package/dist/schemas/bid/bid-status.d.ts +0 -30
  33. package/dist/schemas/bid/bid-status.js +0 -15
  34. package/dist/schemas/bid/exceptions/base-exception.d.ts +0 -4
  35. package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +0 -5
  36. package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +0 -5
  37. package/dist/schemas/bidding/proposal-dto.d.ts +0 -26
  38. package/dist/schemas/bidding/proposal-dto.js +0 -18
  39. package/dist/schemas/job/job-pipeline.d.ts +0 -74
  40. package/dist/schemas/job/job-pipeline.js +0 -29
  41. package/dist/schemas/job/job-suitability.d.ts +0 -12
  42. package/dist/schemas/job/job-suitability.js +0 -13
  43. package/dist/schemas/knowledge-object/index.d.ts +0 -1
  44. package/dist/schemas/knowledge-object/index.js +0 -17
  45. package/dist/schemas/knowledge-object/knowledge-object.d.ts +0 -128
  46. package/dist/schemas/knowledge-object/knowledge-object.js +0 -47
  47. package/dist/schemas/scraper/scrape-response.d.ts +0 -345
  48. package/dist/schemas/scraper/scrape-response.js +0 -9
  49. package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +0 -92
  50. package/dist/schemas/upwork-account/upwork-scraper-account.js +0 -31
  51. package/dist/types/ai-config/ai-config.d.ts +0 -6
  52. package/dist/types/ai-config/ai-config.js +0 -2
  53. package/dist/types/ai-config/index.d.ts +0 -1
  54. package/dist/types/ai-config/index.js +0 -17
  55. package/dist/types/bid/bid-status.d.ts +0 -5
  56. package/dist/types/bid/bid-status.js +0 -2
  57. package/dist/types/bidding/proposal-dto.d.ts +0 -3
  58. package/dist/types/bidding/proposal-dto.js +0 -2
  59. package/dist/types/job/job-pipeline.d.ts +0 -4
  60. package/dist/types/job/job-pipeline.js +0 -2
  61. package/dist/types/job/job-suitability.d.ts +0 -3
  62. package/dist/types/job/job-suitability.js +0 -2
  63. package/dist/types/knowledge-object/index.d.ts +0 -1
  64. package/dist/types/knowledge-object/index.js +0 -17
  65. package/dist/types/knowledge-object/knowledge-object.d.ts +0 -4
  66. package/dist/types/knowledge-object/knowledge-object.js +0 -2
  67. package/dist/types/scraper/scrape-response.d.ts +0 -4
  68. package/dist/types/scraper/scrape-response.js +0 -2
@@ -6547,6 +6547,8 @@ const ROUTES = {
6547
6547
  AVAILABLE_LANCER_PROVIDED_BIDDER_ACCOUNT: (id) => `organizations/${id}/bidder-accounts/available-lancer-provided`,
6548
6548
  ACCEPT_UPWORK_INVITATION: (id, bidderId) => `organizations/${id}/bidder-accounts/${bidderId}/accept-upwork-invitation`,
6549
6549
  },
6550
+ LEADS_BY_JOB_ID: (organizationId, jobId) => `organizations/${organizationId}/leads/${jobId}`,
6551
+ UPDATE_CAMPAIGN_PRIORITY: (organizationId) => `organizations/${organizationId}/update-campaign-priority`,
6550
6552
  CAMPAIGNS: {
6551
6553
  BASE: (organizationId) => `organizations/${organizationId}/campaigns`,
6552
6554
  BY_ID: (organizationId, campaignId) => `organizations/${organizationId}/campaigns/${campaignId}`,
@@ -12072,6 +12074,8 @@ const questionAnswerPairSchema = z.object({
12072
12074
  const leadSchema = upworkJobSchema
12073
12075
  .extend({
12074
12076
  jobId: stringType(),
12077
+ campaignId: stringType(),
12078
+ organizationId: stringType(),
12075
12079
  scrapedAt: numberType().nullable(),
12076
12080
  updatedAt: numberType().nullable(),
12077
12081
  suitabilityRating: numberType().nullable(),
@@ -12463,6 +12467,7 @@ const campaignSchema = z.object({
12463
12467
  status: campaignStatusSchema.optional(),
12464
12468
  bidConfig: bidConfigSchema.nullable(),
12465
12469
  coverLetterTemplateId: z.string().nullable(),
12470
+ priority: z.number().nullable(),
12466
12471
  });
12467
12472
  const upworkAccountConnectStatusSchema = z.union([
12468
12473
  z.literal('processing'),
@@ -12630,34 +12635,49 @@ const leadStatusEventMetadata = objectType({
12630
12635
  const biddingRejectedWithFeedbackEventMetadata = objectType({
12631
12636
  feedback: z.string(),
12632
12637
  });
12638
+ const suitabilityPendingEventMetadataSchema = objectType({
12639
+ jobId: z.string(),
12640
+ jobUrl: z.string(),
12641
+ title: z.string(),
12642
+ timestamp: z.number(),
12643
+ applyToLeads: z.array(z.object({ leadId: z.string(), campaignId: z.string() })),
12644
+ });
12633
12645
  const suitabilityCompleteEventMetadataSchema = objectType({
12634
12646
  suitabilityRating: z.number(),
12635
12647
  suitabilityReason: z.string(),
12636
- agentStatus: z.string(),
12637
- model: z.string(),
12638
- provider: z.string(),
12639
- promptTokens: z.number(),
12640
- completionTokens: z.number(),
12641
- messages: z.array(objectType({
12648
+ agentStatus: z.string().optional(),
12649
+ model: z.string().optional(),
12650
+ provider: z.string().optional(),
12651
+ promptTokens: z.number().optional(),
12652
+ completionTokens: z.number().optional(),
12653
+ messages: z
12654
+ .array(objectType({
12642
12655
  role: z.string(),
12643
12656
  content: z.string(),
12644
- })),
12657
+ }))
12658
+ .optional(),
12659
+ jobId: z.string(),
12660
+ applyToLeads: z.array(z.object({ leadId: z.string(), campaignId: z.string() })),
12645
12661
  });
12646
12662
  const suitabilityFailedEventMetadataSchema = objectType({
12647
12663
  agentStatus: z.string(),
12648
12664
  reason: z.string(),
12649
12665
  });
12650
12666
  const proposalCompleteEventMetadataSchema = objectType({
12651
- agentStatus: z.string(),
12652
12667
  proposal: proposalSchema,
12653
- model: z.string(),
12654
- provider: z.string(),
12655
- promptTokens: z.number(),
12656
- completionTokens: z.number(),
12657
- messages: z.array(objectType({
12668
+ model: z.string().optional(),
12669
+ provider: z.string().optional(),
12670
+ promptTokens: z.number().optional(),
12671
+ completionTokens: z.number().optional(),
12672
+ messages: z
12673
+ .array(objectType({
12658
12674
  role: z.string(),
12659
12675
  content: z.string(),
12660
- })),
12676
+ }))
12677
+ .optional(),
12678
+ jobId: z.string(),
12679
+ isOverallHighestPriorityCampaign: z.boolean(),
12680
+ applyToLeads: z.array(z.object({ leadId: z.string(), campaignId: z.string() })),
12661
12681
  });
12662
12682
  const eventLoggerPayloadSchema = unionType([
12663
12683
  logEventSchema,
@@ -13092,6 +13112,10 @@ const agentTaskRequestSchema = z.object({
13092
13112
  organizationId: z.string(),
13093
13113
  campaignId: z.string(),
13094
13114
  lead: leadSchema,
13115
+ isOverallHighestPriorityCampaign: z.boolean().optional(),
13116
+ applyToLeads: z
13117
+ .array(z.object({ leadId: z.string(), campaignId: z.string() }))
13118
+ .optional(),
13095
13119
  });
13096
13120
  const suitabilityRatingSchema = z.object({
13097
13121
  rating: z.number(),
@@ -13923,6 +13947,7 @@ exports.subscriptionStripeMetadataItemSchema = subscriptionStripeMetadataItemSch
13923
13947
  exports.subscriptionStripeMetadataSchema = subscriptionStripeMetadataSchema;
13924
13948
  exports.suitabilityCompleteEventMetadataSchema = suitabilityCompleteEventMetadataSchema;
13925
13949
  exports.suitabilityFailedEventMetadataSchema = suitabilityFailedEventMetadataSchema;
13950
+ exports.suitabilityPendingEventMetadataSchema = suitabilityPendingEventMetadataSchema;
13926
13951
  exports.suitabilityRatingSchema = suitabilityRatingSchema;
13927
13952
  exports.systemPromptSchema = systemPromptSchema;
13928
13953
  exports.systemSchema = systemSchema;
@@ -1,2 +1,2 @@
1
- import { CreditDeductionEventType } from "../schemas";
2
- export declare const creditDeductionAmountMap: Record<CreditDeductionEventType, number>;
1
+ import { TrackUsageEventType } from "../schemas";
2
+ export declare const creditDeductionAmountMap: Record<TrackUsageEventType, number>;
@@ -130,6 +130,8 @@ export declare const ROUTES: {
130
130
  readonly AVAILABLE_LANCER_PROVIDED_BIDDER_ACCOUNT: (id: string) => string;
131
131
  readonly ACCEPT_UPWORK_INVITATION: (id: string, bidderId: string) => string;
132
132
  };
133
+ readonly LEADS_BY_JOB_ID: (organizationId: string, jobId: string) => string;
134
+ readonly UPDATE_CAMPAIGN_PRIORITY: (organizationId: string) => string;
133
135
  readonly CAMPAIGNS: {
134
136
  readonly BASE: (organizationId: string) => string;
135
137
  readonly BY_ID: (organizationId: string, campaignId: string) => string;
@@ -91,12 +91,6 @@ exports.ROUTES = {
91
91
  BY_PROVIDER: (provider) => `admin/scraper-accounts/${provider}`,
92
92
  BY_PROVIDER_AND_ID: (provider, id) => `admin/scraper-accounts/${provider}/${id}`,
93
93
  },
94
- PROXIES: {
95
- BASE: 'admin/proxies',
96
- BY_ID: (id) => `admin/proxies/${id}`,
97
- REPLACE_PROXY: (id) => `admin/proxies/${id}/replace`,
98
- SYNC: 'admin/proxies/sync',
99
- },
100
94
  },
101
95
  BID: {
102
96
  BASE: 'bid',
@@ -303,6 +303,8 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
303
303
  }>>>;
304
304
  }, {
305
305
  jobId: z.ZodString;
306
+ campaignId: z.ZodString;
307
+ organizationId: z.ZodString;
306
308
  scrapedAt: z.ZodNullable<z.ZodNumber>;
307
309
  updatedAt: z.ZodNullable<z.ZodNumber>;
308
310
  suitabilityRating: z.ZodNullable<z.ZodNumber>;
@@ -330,6 +332,8 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
330
332
  biddingTaskId: z.ZodNullable<z.ZodString>;
331
333
  doNotApplyReason: z.ZodNullable<z.ZodString>;
332
334
  }>, "processed">, "strip", z.ZodTypeAny, {
335
+ organizationId: string;
336
+ campaignId: string;
333
337
  id: string | null;
334
338
  uid: string | null;
335
339
  createdAt: number | null;
@@ -461,6 +465,8 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
461
465
  proposalId?: string | undefined;
462
466
  wonAmount?: number | undefined;
463
467
  }, {
468
+ organizationId: string;
469
+ campaignId: string;
464
470
  id: string | null;
465
471
  uid: string | null;
466
472
  createdAt: number | null;
@@ -592,11 +598,24 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
592
598
  proposalId?: string | undefined;
593
599
  wonAmount?: number | undefined;
594
600
  }>;
601
+ isOverallHighestPriorityCampaign: z.ZodOptional<z.ZodBoolean>;
602
+ applyToLeads: z.ZodOptional<z.ZodArray<z.ZodObject<{
603
+ leadId: z.ZodString;
604
+ campaignId: z.ZodString;
605
+ }, "strip", z.ZodTypeAny, {
606
+ campaignId: string;
607
+ leadId: string;
608
+ }, {
609
+ campaignId: string;
610
+ leadId: string;
611
+ }>, "many">>;
595
612
  }, "strip", z.ZodTypeAny, {
596
613
  userId: string | null;
597
614
  organizationId: string;
598
615
  campaignId: string;
599
616
  lead: {
617
+ organizationId: string;
618
+ campaignId: string;
600
619
  id: string | null;
601
620
  uid: string | null;
602
621
  createdAt: number | null;
@@ -728,11 +747,18 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
728
747
  proposalId?: string | undefined;
729
748
  wonAmount?: number | undefined;
730
749
  };
750
+ isOverallHighestPriorityCampaign?: boolean | undefined;
751
+ applyToLeads?: {
752
+ campaignId: string;
753
+ leadId: string;
754
+ }[] | undefined;
731
755
  }, {
732
756
  userId: string | null;
733
757
  organizationId: string;
734
758
  campaignId: string;
735
759
  lead: {
760
+ organizationId: string;
761
+ campaignId: string;
736
762
  id: string | null;
737
763
  uid: string | null;
738
764
  createdAt: number | null;
@@ -864,6 +890,11 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
864
890
  proposalId?: string | undefined;
865
891
  wonAmount?: number | undefined;
866
892
  };
893
+ isOverallHighestPriorityCampaign?: boolean | undefined;
894
+ applyToLeads?: {
895
+ campaignId: string;
896
+ leadId: string;
897
+ }[] | undefined;
867
898
  }>;
868
899
  export type AgentTaskRequest = z.infer<typeof agentTaskRequestSchema>;
869
900
  export declare const suitabilityRatingSchema: z.ZodObject<{
@@ -598,6 +598,7 @@ export declare const campaignStatusActivitySchema: z.ZodObject<z.objectUtil.exte
598
598
  specialisedProfile: string | null;
599
599
  }>>;
600
600
  coverLetterTemplateId: z.ZodNullable<z.ZodString>;
601
+ priority: z.ZodNullable<z.ZodNumber>;
601
602
  }, "id" | "name">, "strip", z.ZodTypeAny, {
602
603
  id: string;
603
604
  name: string;
@@ -1082,6 +1083,7 @@ export declare const leadAnalysisActivitySchema: z.ZodObject<z.objectUtil.extend
1082
1083
  specialisedProfile: string | null;
1083
1084
  }>>;
1084
1085
  coverLetterTemplateId: z.ZodNullable<z.ZodString>;
1086
+ priority: z.ZodNullable<z.ZodNumber>;
1085
1087
  }, "id" | "name">, "strip", z.ZodTypeAny, {
1086
1088
  id: string;
1087
1089
  name: string;
@@ -1391,6 +1393,8 @@ export declare const leadAnalysisActivitySchema: z.ZodObject<z.objectUtil.extend
1391
1393
  }>>>;
1392
1394
  }, {
1393
1395
  jobId: z.ZodString;
1396
+ campaignId: z.ZodString;
1397
+ organizationId: z.ZodString;
1394
1398
  scrapedAt: z.ZodNullable<z.ZodNumber>;
1395
1399
  updatedAt: z.ZodNullable<z.ZodNumber>;
1396
1400
  suitabilityRating: z.ZodNullable<z.ZodNumber>;
@@ -1914,6 +1918,7 @@ export declare const leadStatusActivitySchema: z.ZodObject<z.objectUtil.extendSh
1914
1918
  specialisedProfile: string | null;
1915
1919
  }>>;
1916
1920
  coverLetterTemplateId: z.ZodNullable<z.ZodString>;
1921
+ priority: z.ZodNullable<z.ZodNumber>;
1917
1922
  }, "id" | "name">, "strip", z.ZodTypeAny, {
1918
1923
  id: string;
1919
1924
  name: string;
@@ -2224,6 +2229,8 @@ export declare const leadStatusActivitySchema: z.ZodObject<z.objectUtil.extendSh
2224
2229
  }>>>;
2225
2230
  }, {
2226
2231
  jobId: z.ZodString;
2232
+ campaignId: z.ZodString;
2233
+ organizationId: z.ZodString;
2227
2234
  scrapedAt: z.ZodNullable<z.ZodNumber>;
2228
2235
  updatedAt: z.ZodNullable<z.ZodNumber>;
2229
2236
  suitabilityRating: z.ZodNullable<z.ZodNumber>;
@@ -2746,6 +2753,7 @@ export declare const proposalSentActivitySchema: z.ZodObject<z.objectUtil.extend
2746
2753
  specialisedProfile: string | null;
2747
2754
  }>>;
2748
2755
  coverLetterTemplateId: z.ZodNullable<z.ZodString>;
2756
+ priority: z.ZodNullable<z.ZodNumber>;
2749
2757
  }, "id" | "name">, "strip", z.ZodTypeAny, {
2750
2758
  id: string;
2751
2759
  name: string;
@@ -3055,6 +3063,8 @@ export declare const proposalSentActivitySchema: z.ZodObject<z.objectUtil.extend
3055
3063
  }>>>;
3056
3064
  }, {
3057
3065
  jobId: z.ZodString;
3066
+ campaignId: z.ZodString;
3067
+ organizationId: z.ZodString;
3058
3068
  scrapedAt: z.ZodNullable<z.ZodNumber>;
3059
3069
  updatedAt: z.ZodNullable<z.ZodNumber>;
3060
3070
  suitabilityRating: z.ZodNullable<z.ZodNumber>;
@@ -3575,6 +3585,7 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
3575
3585
  specialisedProfile: string | null;
3576
3586
  }>>;
3577
3587
  coverLetterTemplateId: z.ZodNullable<z.ZodString>;
3588
+ priority: z.ZodNullable<z.ZodNumber>;
3578
3589
  }, "id" | "name">, "strip", z.ZodTypeAny, {
3579
3590
  id: string;
3580
3591
  name: string;
@@ -4058,6 +4069,7 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
4058
4069
  specialisedProfile: string | null;
4059
4070
  }>>;
4060
4071
  coverLetterTemplateId: z.ZodNullable<z.ZodString>;
4072
+ priority: z.ZodNullable<z.ZodNumber>;
4061
4073
  }, "id" | "name">, "strip", z.ZodTypeAny, {
4062
4074
  id: string;
4063
4075
  name: string;
@@ -4367,6 +4379,8 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
4367
4379
  }>>>;
4368
4380
  }, {
4369
4381
  jobId: z.ZodString;
4382
+ campaignId: z.ZodString;
4383
+ organizationId: z.ZodString;
4370
4384
  scrapedAt: z.ZodNullable<z.ZodNumber>;
4371
4385
  updatedAt: z.ZodNullable<z.ZodNumber>;
4372
4386
  suitabilityRating: z.ZodNullable<z.ZodNumber>;
@@ -4889,6 +4903,7 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
4889
4903
  specialisedProfile: string | null;
4890
4904
  }>>;
4891
4905
  coverLetterTemplateId: z.ZodNullable<z.ZodString>;
4906
+ priority: z.ZodNullable<z.ZodNumber>;
4892
4907
  }, "id" | "name">, "strip", z.ZodTypeAny, {
4893
4908
  id: string;
4894
4909
  name: string;
@@ -5199,6 +5214,8 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
5199
5214
  }>>>;
5200
5215
  }, {
5201
5216
  jobId: z.ZodString;
5217
+ campaignId: z.ZodString;
5218
+ organizationId: z.ZodString;
5202
5219
  scrapedAt: z.ZodNullable<z.ZodNumber>;
5203
5220
  updatedAt: z.ZodNullable<z.ZodNumber>;
5204
5221
  suitabilityRating: z.ZodNullable<z.ZodNumber>;
@@ -5720,6 +5737,7 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
5720
5737
  specialisedProfile: string | null;
5721
5738
  }>>;
5722
5739
  coverLetterTemplateId: z.ZodNullable<z.ZodString>;
5740
+ priority: z.ZodNullable<z.ZodNumber>;
5723
5741
  }, "id" | "name">, "strip", z.ZodTypeAny, {
5724
5742
  id: string;
5725
5743
  name: string;
@@ -6029,6 +6047,8 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
6029
6047
  }>>>;
6030
6048
  }, {
6031
6049
  jobId: z.ZodString;
6050
+ campaignId: z.ZodString;
6051
+ organizationId: z.ZodString;
6032
6052
  scrapedAt: z.ZodNullable<z.ZodNumber>;
6033
6053
  updatedAt: z.ZodNullable<z.ZodNumber>;
6034
6054
  suitabilityRating: z.ZodNullable<z.ZodNumber>;
@@ -6417,6 +6437,8 @@ export declare const campaignActivityCreateSchema: z.ZodDiscriminatedUnion<"type
6417
6437
  }>>>;
6418
6438
  }, {
6419
6439
  jobId: z.ZodString;
6440
+ campaignId: z.ZodString;
6441
+ organizationId: z.ZodString;
6420
6442
  scrapedAt: z.ZodNullable<z.ZodNumber>;
6421
6443
  updatedAt: z.ZodNullable<z.ZodNumber>;
6422
6444
  suitabilityRating: z.ZodNullable<z.ZodNumber>;
@@ -6778,6 +6800,8 @@ export declare const campaignActivityCreateSchema: z.ZodDiscriminatedUnion<"type
6778
6800
  }>>>;
6779
6801
  }, {
6780
6802
  jobId: z.ZodString;
6803
+ campaignId: z.ZodString;
6804
+ organizationId: z.ZodString;
6781
6805
  scrapedAt: z.ZodNullable<z.ZodNumber>;
6782
6806
  updatedAt: z.ZodNullable<z.ZodNumber>;
6783
6807
  suitabilityRating: z.ZodNullable<z.ZodNumber>;
@@ -7137,6 +7161,8 @@ export declare const campaignActivityCreateSchema: z.ZodDiscriminatedUnion<"type
7137
7161
  }>>>;
7138
7162
  }, {
7139
7163
  jobId: z.ZodString;
7164
+ campaignId: z.ZodString;
7165
+ organizationId: z.ZodString;
7140
7166
  scrapedAt: z.ZodNullable<z.ZodNumber>;
7141
7167
  updatedAt: z.ZodNullable<z.ZodNumber>;
7142
7168
  suitabilityRating: z.ZodNullable<z.ZodNumber>;
@@ -7199,12 +7225,12 @@ export declare const updateCampaignAnalyticsSchema: z.ZodObject<{
7199
7225
  campaignId: z.ZodString;
7200
7226
  field: z.ZodString;
7201
7227
  }, "strip", z.ZodTypeAny, {
7202
- organizationId: string;
7203
7228
  campaignId: string;
7229
+ organizationId: string;
7204
7230
  field: string;
7205
7231
  }, {
7206
- organizationId: string;
7207
7232
  campaignId: string;
7233
+ organizationId: string;
7208
7234
  field: string;
7209
7235
  }>;
7210
7236
  export type CampaignAnalytics = z.infer<typeof campaignAnalyticsSchema>;
@@ -80,3 +80,8 @@ export declare const updateCampaignIntegrationsSchema: z.ZodObject<{
80
80
  slack: string | null;
81
81
  } | undefined;
82
82
  }>;
83
+ export type CampaignIntegration = z.infer<typeof campaignIntegrations>;
84
+ export interface CampaignIntegrations extends z.infer<typeof campaignIntegrationsSchema> {
85
+ }
86
+ export interface UpdateCampaignIntegrations extends z.infer<typeof updateCampaignIntegrationsSchema> {
87
+ }
@@ -289,6 +289,7 @@ export declare const campaignSchema: z.ZodObject<{
289
289
  specialisedProfile: string | null;
290
290
  }>>;
291
291
  coverLetterTemplateId: z.ZodNullable<z.ZodString>;
292
+ priority: z.ZodNullable<z.ZodNumber>;
292
293
  }, "strip", z.ZodTypeAny, {
293
294
  id: string;
294
295
  name: string;
@@ -364,6 +365,7 @@ export declare const campaignSchema: z.ZodObject<{
364
365
  specialisedProfile: string | null;
365
366
  } | null;
366
367
  coverLetterTemplateId: string | null;
368
+ priority: number | null;
367
369
  status?: "active" | "draft" | "paused" | "error" | undefined;
368
370
  }, {
369
371
  id: string;
@@ -437,6 +439,7 @@ export declare const campaignSchema: z.ZodObject<{
437
439
  specialisedProfile: string | null;
438
440
  } | null;
439
441
  coverLetterTemplateId: string | null;
442
+ priority: number | null;
440
443
  status?: "active" | "draft" | "paused" | "error" | undefined;
441
444
  boostingEnabled?: boolean | null | undefined;
442
445
  maximumBoost?: number | null | undefined;
@@ -725,6 +728,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
725
728
  specialisedProfile: string | null;
726
729
  }>>;
727
730
  coverLetterTemplateId: z.ZodNullable<z.ZodString>;
731
+ priority: z.ZodNullable<z.ZodNumber>;
728
732
  }, "id" | "createdAt" | "updatedAt" | "bidConfig">, "strip", z.ZodTypeAny, {
729
733
  name: string;
730
734
  filters: {
@@ -791,6 +795,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
791
795
  };
792
796
  notificationsEnabled: boolean | null;
793
797
  coverLetterTemplateId: string | null;
798
+ priority: number | null;
794
799
  status?: "active" | "draft" | "paused" | "error" | undefined;
795
800
  }, {
796
801
  name: string;
@@ -855,6 +860,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
855
860
  };
856
861
  notificationsEnabled: boolean | null;
857
862
  coverLetterTemplateId: string | null;
863
+ priority: number | null;
858
864
  status?: "active" | "draft" | "paused" | "error" | undefined;
859
865
  boostingEnabled?: boolean | null | undefined;
860
866
  maximumBoost?: number | null | undefined;
@@ -1128,6 +1134,7 @@ export declare const updateCampaignSchema: z.ZodObject<{
1128
1134
  specialisedProfile: string | null;
1129
1135
  }>>>;
1130
1136
  coverLetterTemplateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1137
+ priority: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1131
1138
  }, "strip", z.ZodTypeAny, {
1132
1139
  status?: "active" | "draft" | "paused" | "error" | undefined;
1133
1140
  id?: string | undefined;
@@ -1202,6 +1209,7 @@ export declare const updateCampaignSchema: z.ZodObject<{
1202
1209
  specialisedProfile: string | null;
1203
1210
  } | null | undefined;
1204
1211
  coverLetterTemplateId?: string | null | undefined;
1212
+ priority?: number | null | undefined;
1205
1213
  }, {
1206
1214
  status?: "active" | "draft" | "paused" | "error" | undefined;
1207
1215
  id?: string | undefined;
@@ -1276,6 +1284,7 @@ export declare const updateCampaignSchema: z.ZodObject<{
1276
1284
  specialisedProfile: string | null;
1277
1285
  } | null | undefined;
1278
1286
  coverLetterTemplateId?: string | null | undefined;
1287
+ priority?: number | null | undefined;
1279
1288
  }>;
1280
1289
  export interface Campaign extends z.infer<typeof campaignSchema> {
1281
1290
  filters: JobFilters;
@@ -44,9 +44,9 @@ export declare const clientInfoSchema: z.ZodObject<{
44
44
  }, "strip", z.ZodTypeAny, {
45
45
  country: string | null;
46
46
  region: string | null;
47
+ rating: number | null;
47
48
  isPaymentVerified: boolean | null;
48
49
  numberOfReviews: number | null;
49
- rating: number | null;
50
50
  jobsPosted: number | null;
51
51
  totalSpent: number | null;
52
52
  numberOfHires: number | null;
@@ -60,9 +60,9 @@ export declare const clientInfoSchema: z.ZodObject<{
60
60
  }, {
61
61
  country: string | null;
62
62
  region: string | null;
63
+ rating: number | null;
63
64
  isPaymentVerified: boolean | null;
64
65
  numberOfReviews: number | null;
65
- rating: number | null;
66
66
  jobsPosted: number | null;
67
67
  totalSpent: number | null;
68
68
  numberOfHires: number | null;
@@ -187,9 +187,9 @@ export declare const upworkJobSchema: z.ZodObject<{
187
187
  }, "strip", z.ZodTypeAny, {
188
188
  country: string | null;
189
189
  region: string | null;
190
+ rating: number | null;
190
191
  isPaymentVerified: boolean | null;
191
192
  numberOfReviews: number | null;
192
- rating: number | null;
193
193
  jobsPosted: number | null;
194
194
  totalSpent: number | null;
195
195
  numberOfHires: number | null;
@@ -203,9 +203,9 @@ export declare const upworkJobSchema: z.ZodObject<{
203
203
  }, {
204
204
  country: string | null;
205
205
  region: string | null;
206
+ rating: number | null;
206
207
  isPaymentVerified: boolean | null;
207
208
  numberOfReviews: number | null;
208
- rating: number | null;
209
209
  jobsPosted: number | null;
210
210
  totalSpent: number | null;
211
211
  numberOfHires: number | null;
@@ -267,9 +267,9 @@ export declare const upworkJobSchema: z.ZodObject<{
267
267
  clientInfo: {
268
268
  country: string | null;
269
269
  region: string | null;
270
+ rating: number | null;
270
271
  isPaymentVerified: boolean | null;
271
272
  numberOfReviews: number | null;
272
- rating: number | null;
273
273
  jobsPosted: number | null;
274
274
  totalSpent: number | null;
275
275
  numberOfHires: number | null;
@@ -319,9 +319,9 @@ export declare const upworkJobSchema: z.ZodObject<{
319
319
  clientInfo: {
320
320
  country: string | null;
321
321
  region: string | null;
322
+ rating: number | null;
322
323
  isPaymentVerified: boolean | null;
323
324
  numberOfReviews: number | null;
324
- rating: number | null;
325
325
  jobsPosted: number | null;
326
326
  totalSpent: number | null;
327
327
  numberOfHires: number | null;
@@ -418,9 +418,9 @@ export declare const jobSchema: z.ZodObject<z.objectUtil.extendShape<{
418
418
  }, "strip", z.ZodTypeAny, {
419
419
  country: string | null;
420
420
  region: string | null;
421
+ rating: number | null;
421
422
  isPaymentVerified: boolean | null;
422
423
  numberOfReviews: number | null;
423
- rating: number | null;
424
424
  jobsPosted: number | null;
425
425
  totalSpent: number | null;
426
426
  numberOfHires: number | null;
@@ -434,9 +434,9 @@ export declare const jobSchema: z.ZodObject<z.objectUtil.extendShape<{
434
434
  }, {
435
435
  country: string | null;
436
436
  region: string | null;
437
+ rating: number | null;
437
438
  isPaymentVerified: boolean | null;
438
439
  numberOfReviews: number | null;
439
- rating: number | null;
440
440
  jobsPosted: number | null;
441
441
  totalSpent: number | null;
442
442
  numberOfHires: number | null;
@@ -550,9 +550,9 @@ export declare const jobSchema: z.ZodObject<z.objectUtil.extendShape<{
550
550
  clientInfo: {
551
551
  country: string | null;
552
552
  region: string | null;
553
+ rating: number | null;
553
554
  isPaymentVerified: boolean | null;
554
555
  numberOfReviews: number | null;
555
- rating: number | null;
556
556
  jobsPosted: number | null;
557
557
  totalSpent: number | null;
558
558
  numberOfHires: number | null;
@@ -624,9 +624,9 @@ export declare const jobSchema: z.ZodObject<z.objectUtil.extendShape<{
624
624
  clientInfo: {
625
625
  country: string | null;
626
626
  region: string | null;
627
+ rating: number | null;
627
628
  isPaymentVerified: boolean | null;
628
629
  numberOfReviews: number | null;
629
- rating: number | null;
630
630
  jobsPosted: number | null;
631
631
  totalSpent: number | null;
632
632
  numberOfHires: number | null;
@@ -752,9 +752,9 @@ export declare const jobResponseSchema: z.ZodObject<{
752
752
  }, "strip", z.ZodTypeAny, {
753
753
  country: string | null;
754
754
  region: string | null;
755
+ rating: number | null;
755
756
  isPaymentVerified: boolean | null;
756
757
  numberOfReviews: number | null;
757
- rating: number | null;
758
758
  jobsPosted: number | null;
759
759
  totalSpent: number | null;
760
760
  numberOfHires: number | null;
@@ -768,9 +768,9 @@ export declare const jobResponseSchema: z.ZodObject<{
768
768
  }, {
769
769
  country: string | null;
770
770
  region: string | null;
771
+ rating: number | null;
771
772
  isPaymentVerified: boolean | null;
772
773
  numberOfReviews: number | null;
773
- rating: number | null;
774
774
  jobsPosted: number | null;
775
775
  totalSpent: number | null;
776
776
  numberOfHires: number | null;
@@ -884,9 +884,9 @@ export declare const jobResponseSchema: z.ZodObject<{
884
884
  clientInfo: {
885
885
  country: string | null;
886
886
  region: string | null;
887
+ rating: number | null;
887
888
  isPaymentVerified: boolean | null;
888
889
  numberOfReviews: number | null;
889
- rating: number | null;
890
890
  jobsPosted: number | null;
891
891
  totalSpent: number | null;
892
892
  numberOfHires: number | null;
@@ -958,9 +958,9 @@ export declare const jobResponseSchema: z.ZodObject<{
958
958
  clientInfo: {
959
959
  country: string | null;
960
960
  region: string | null;
961
+ rating: number | null;
961
962
  isPaymentVerified: boolean | null;
962
963
  numberOfReviews: number | null;
963
- rating: number | null;
964
964
  jobsPosted: number | null;
965
965
  totalSpent: number | null;
966
966
  numberOfHires: number | null;
@@ -1037,9 +1037,9 @@ export declare const jobResponseSchema: z.ZodObject<{
1037
1037
  clientInfo: {
1038
1038
  country: string | null;
1039
1039
  region: string | null;
1040
+ rating: number | null;
1040
1041
  isPaymentVerified: boolean | null;
1041
1042
  numberOfReviews: number | null;
1042
- rating: number | null;
1043
1043
  jobsPosted: number | null;
1044
1044
  totalSpent: number | null;
1045
1045
  numberOfHires: number | null;
@@ -1116,9 +1116,9 @@ export declare const jobResponseSchema: z.ZodObject<{
1116
1116
  clientInfo: {
1117
1117
  country: string | null;
1118
1118
  region: string | null;
1119
+ rating: number | null;
1119
1120
  isPaymentVerified: boolean | null;
1120
1121
  numberOfReviews: number | null;
1121
- rating: number | null;
1122
1122
  jobsPosted: number | null;
1123
1123
  totalSpent: number | null;
1124
1124
  numberOfHires: number | null;