lancer-shared 1.2.29 → 1.2.31

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 (52) hide show
  1. package/dist/bundle.cjs.js +68 -59
  2. package/dist/constants/routes.d.ts +3 -2
  3. package/dist/schemas/agent/index.d.ts +94 -18
  4. package/dist/schemas/organization/index.d.ts +86 -8
  5. package/dist/schemas/organization/onboarding.d.ts +15 -15
  6. package/dist/schemas/scraper/upwork-profile.d.ts +0 -8
  7. package/package.json +1 -1
  8. package/dist/constants/collections.d.ts +0 -13
  9. package/dist/constants/organization.d.ts +0 -2
  10. package/dist/schemas/campaign/campaign-integrations.d.ts +0 -87
  11. package/dist/schemas/campaign/campaign-job-count.d.ts +0 -2
  12. package/dist/schemas/chat-message/chat-message.d.ts +0 -31
  13. package/dist/schemas/chat-message/index.d.ts +0 -1
  14. package/dist/schemas/config/agency-config.d.ts +0 -17
  15. package/dist/schemas/config/index.d.ts +0 -1
  16. package/dist/schemas/job-filters/index.d.ts +0 -1
  17. package/dist/schemas/job-filters/job-filters.d.ts +0 -241
  18. package/dist/schemas/lead/lead-note.d.ts +0 -83
  19. package/dist/schemas/lead/nuxt.d.ts +0 -1664
  20. package/dist/schemas/organization/organization.d.ts +0 -144
  21. package/dist/types/account/account-status.d.ts +0 -3
  22. package/dist/types/account/bidder-account.d.ts +0 -7
  23. package/dist/types/account/index.d.ts +0 -3
  24. package/dist/types/account/scraper-account.d.ts +0 -5
  25. package/dist/types/bid/bid-result.d.ts +0 -5
  26. package/dist/types/bid/bid.d.ts +0 -9
  27. package/dist/types/bid/index.d.ts +0 -2
  28. package/dist/types/campaign/campaign-analytics.d.ts +0 -7
  29. package/dist/types/campaign/campaign-expenses.d.ts +0 -3
  30. package/dist/types/campaign/campaign-integrations.d.ts +0 -6
  31. package/dist/types/campaign/campaign-job-count.d.ts +0 -4
  32. package/dist/types/chat-message/chat-message.d.ts +0 -4
  33. package/dist/types/chat-message/index.d.ts +0 -1
  34. package/dist/types/config/agency-config.d.ts +0 -4
  35. package/dist/types/config/index.d.ts +0 -1
  36. package/dist/types/index.d.ts +0 -15
  37. package/dist/types/job/index.d.ts +0 -48
  38. package/dist/types/job/job-note.d.ts +0 -10
  39. package/dist/types/job/job-status.d.ts +0 -5
  40. package/dist/types/job/nuxt.d.ts +0 -4
  41. package/dist/types/job-filters/index.d.ts +0 -1
  42. package/dist/types/job-filters/job-filters.d.ts +0 -4
  43. package/dist/types/logger/index.d.ts +0 -1
  44. package/dist/types/saved-search/index.d.ts +0 -6
  45. package/dist/types/scraper/index.d.ts +0 -2
  46. package/dist/types/scraper/scrape-payload.d.ts +0 -10
  47. package/dist/types/scraper/scrape-result.d.ts +0 -8
  48. package/dist/types/shared.d.ts +0 -8
  49. package/dist/types/time-filter/index.d.ts +0 -3
  50. package/dist/types/transaction/index.d.ts +0 -4
  51. package/dist/types/usage/index.d.ts +0 -6
  52. package/dist/types/user/index.d.ts +0 -15
@@ -6418,88 +6418,88 @@ var moment = /*@__PURE__*/getDefaultExportFromCjs(momentExports);
6418
6418
 
6419
6419
  const ROUTES = {
6420
6420
  AUTH: {
6421
- BASE: 'auth',
6422
- REGISTER: 'auth/register',
6421
+ BASE: "auth",
6422
+ REGISTER: "auth/register",
6423
6423
  },
6424
6424
  SYSTEM: {
6425
- BASE: 'system',
6425
+ BASE: "system",
6426
6426
  PROMPTS: {
6427
- BASE: 'system/prompts',
6427
+ BASE: "system/prompts",
6428
6428
  },
6429
6429
  },
6430
6430
  EVENTS: {
6431
- BASE: 'events',
6431
+ BASE: "events",
6432
6432
  BY_ID: (id) => `events/${id}`,
6433
6433
  },
6434
6434
  JOBS: {
6435
- BASE: 'jobs',
6435
+ BASE: "jobs",
6436
6436
  BY_ID: (id) => `jobs/${id}`,
6437
6437
  UPDATE_ACTIVITY: `jobs/update-activity`,
6438
- IMPORT: 'jobs/import',
6439
- FILTER_OPTIONS: 'jobs/filter-options',
6440
- TOTAL_JOBS: 'jobs/total-jobs',
6438
+ IMPORT: "jobs/import",
6439
+ FILTER_OPTIONS: "jobs/filter-options",
6440
+ TOTAL_JOBS: "jobs/total-jobs",
6441
6441
  GET_JOB_TITLE: (jobId) => `jobs/get-job-title/${jobId}`,
6442
6442
  },
6443
6443
  USERS: {
6444
- BASE: 'users',
6444
+ BASE: "users",
6445
6445
  BY_ID: (id) => `users/${id}`,
6446
6446
  ORGANIZATIONS: (id) => `users/${id}/organizations`,
6447
6447
  },
6448
6448
  COOKIES: {
6449
- BASE: 'cookies',
6450
- SCRAPE: 'cookies/scrape-cookies',
6449
+ BASE: "cookies",
6450
+ SCRAPE: "cookies/scrape-cookies",
6451
6451
  },
6452
6452
  SCRAPING: {
6453
- BASE: 'scraping',
6454
- START_SCRAPING: 'scraping/start',
6455
- START_WORLDWIDE_SCRAPING: 'scraping/start-worldwide',
6456
- START_US_SCRAPING: 'scraping/start-us',
6457
- START_UK_SCRAPING: 'scraping/start-uk',
6458
- UPDATE_ACTIVITY_4H_WORLDWIDE: 'scraping/update-activity/4h',
6459
- UPDATE_ACTIVITY_4H_UK: 'scraping/update-activity/4h/uk',
6460
- UPDATE_ACTIVITY_4H_US: 'scraping/update-activity/4h/us',
6461
- UPDATE_ACTIVITY_24H_WORLDWIDE: 'scraping/update-activity/24h',
6462
- UPDATE_ACTIVITY_24H_UK: 'scraping/update-activity/24h/uk',
6463
- UPDATE_ACTIVITY_24H_US: 'scraping/update-activity/24h/us',
6464
- SCRAPE_FEED_WORLDWIDE: 'scraping/feed-worldwide',
6465
- SCRAPE_FEED_UK: 'scraping/feed-uk',
6466
- SCRAPE_FEED_US: 'scraping/feed-us',
6467
- SCRAPE_JOB: 'scraping/job',
6468
- SCRAPE_JOB_ACTIVITY: 'scraping/job-activity',
6469
- USER_PROFILE: 'scraping/user-profile',
6470
- CHECK_LEAD_STATUS: 'scraping/check-lead-status',
6453
+ BASE: "scraping",
6454
+ START_SCRAPING: "scraping/start",
6455
+ START_WORLDWIDE_SCRAPING: "scraping/start-worldwide",
6456
+ START_US_SCRAPING: "scraping/start-us",
6457
+ START_UK_SCRAPING: "scraping/start-uk",
6458
+ UPDATE_ACTIVITY_4H_WORLDWIDE: "scraping/update-activity/4h",
6459
+ UPDATE_ACTIVITY_4H_UK: "scraping/update-activity/4h/uk",
6460
+ UPDATE_ACTIVITY_4H_US: "scraping/update-activity/4h/us",
6461
+ UPDATE_ACTIVITY_24H_WORLDWIDE: "scraping/update-activity/24h",
6462
+ UPDATE_ACTIVITY_24H_UK: "scraping/update-activity/24h/uk",
6463
+ UPDATE_ACTIVITY_24H_US: "scraping/update-activity/24h/us",
6464
+ SCRAPE_FEED_WORLDWIDE: "scraping/feed-worldwide",
6465
+ SCRAPE_FEED_UK: "scraping/feed-uk",
6466
+ SCRAPE_FEED_US: "scraping/feed-us",
6467
+ SCRAPE_JOB: "scraping/job",
6468
+ SCRAPE_JOB_ACTIVITY: "scraping/job-activity",
6469
+ USER_PROFILE: "scraping/user-profile",
6470
+ CHECK_LEAD_STATUS: "scraping/check-lead-status",
6471
6471
  },
6472
6472
  ADMIN: {
6473
- BASE: 'admin',
6473
+ BASE: "admin",
6474
6474
  BIDDER_ACCOUNTS: {
6475
- BASE: 'admin/bidder-accounts',
6475
+ BASE: "admin/bidder-accounts",
6476
6476
  BY_ID: (id) => `admin/bidder-accounts/${id}`,
6477
6477
  BY_PROVIDER: (provider) => `admin/bidder-accounts/${provider}`,
6478
6478
  BY_PROVIDER_AND_ID: (provider, id) => `admin/bidder-accounts/${provider}/${id}`,
6479
6479
  },
6480
6480
  SCRAPER_ACCOUNTS: {
6481
- BASE: 'admin/scraper-accounts',
6481
+ BASE: "admin/scraper-accounts",
6482
6482
  BY_ID: (id) => `admin/scraper-accounts/${id}`,
6483
6483
  BY_PROVIDER: (provider) => `admin/scraper-accounts/${provider}`,
6484
6484
  BY_PROVIDER_AND_ID: (provider, id) => `admin/scraper-accounts/${provider}/${id}`,
6485
6485
  },
6486
6486
  PROXIES: {
6487
- BASE: 'admin/proxies',
6487
+ BASE: "admin/proxies",
6488
6488
  BY_ID: (id) => `admin/proxies/${id}`,
6489
6489
  REPLACE_PROXY: (id) => `admin/proxies/${id}/replace`,
6490
- SYNC: 'admin/proxies/sync',
6491
- AVAILABLE_REPLACEMENTS: 'admin/proxies/available-replacements',
6490
+ SYNC: "admin/proxies/sync",
6491
+ AVAILABLE_REPLACEMENTS: "admin/proxies/available-replacements",
6492
6492
  },
6493
6493
  DASHBOARD: {
6494
- CAMPAIGN_STATS: 'admin/dashboard/campaign-stats',
6494
+ CAMPAIGN_STATS: "admin/dashboard/campaign-stats",
6495
6495
  },
6496
6496
  },
6497
6497
  BID: {
6498
- BASE: 'bid',
6498
+ BASE: "bid",
6499
6499
  BID_ON_JOB: (userId, campaignId, leadId) => `bid/${userId}/${campaignId}/${leadId}`,
6500
6500
  },
6501
6501
  ORGANIZATIONS: {
6502
- BASE: 'organizations',
6502
+ BASE: "organizations",
6503
6503
  BY_ID: (id) => `organizations/${id}`,
6504
6504
  ONBOARDING: (id) => `organizations/${id}/onboarding/progress`,
6505
6505
  AI_CONFIG: (id) => `organizations/${id}/settings/ai-config`,
@@ -6561,26 +6561,26 @@ const ROUTES = {
6561
6561
  USAGE_SUMMARIES: {
6562
6562
  DAILY: {
6563
6563
  BASE: (organizationId) => `usage-summaries/${organizationId}/daily`,
6564
- BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/daily/${moment(date).format('YYYY-MM-DD')}`,
6564
+ BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/daily/${moment(date).format("YYYY-MM-DD")}`,
6565
6565
  },
6566
6566
  WEEKLY: {
6567
6567
  BASE: (organizationId) => `usage-summaries/${organizationId}/weekly`,
6568
- BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/weekly/${moment(date).format('YYYY-WW')}`,
6568
+ BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/weekly/${moment(date).format("YYYY-WW")}`,
6569
6569
  },
6570
6570
  MONTHLY: {
6571
6571
  BASE: (organizationId) => `usage-summaries/${organizationId}/monthly`,
6572
- BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/monthly/${moment(date).format('YYYY-MM')}`,
6572
+ BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/monthly/${moment(date).format("YYYY-MM")}`,
6573
6573
  },
6574
6574
  QUARTERLY: {
6575
6575
  BASE: (organizationId) => `usage-summaries/${organizationId}/quarterly`,
6576
6576
  BY_DATE: (organizationId, date) => {
6577
6577
  const parsed = moment(date);
6578
- return `usage-summaries/${organizationId}/quarterly/${parsed.format('YYYY')}-Q${parsed.quarter()}`;
6578
+ return `usage-summaries/${organizationId}/quarterly/${parsed.format("YYYY")}-Q${parsed.quarter()}`;
6579
6579
  },
6580
6580
  },
6581
6581
  YEARLY: {
6582
6582
  BASE: (organizationId) => `usage-summaries/${organizationId}/yearly`,
6583
- BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/yearly/${moment(date).format('YYYY')}`,
6583
+ BY_DATE: (organizationId, date) => `usage-summaries/${organizationId}/yearly/${moment(date).format("YYYY")}`,
6584
6584
  },
6585
6585
  },
6586
6586
  INVOICES: {
@@ -6594,18 +6594,20 @@ const ROUTES = {
6594
6594
  INVOICE_PREVIEW: (id) => `organizations/${id}/invoice-preview`,
6595
6595
  },
6596
6596
  TRANSACTIONS: {
6597
- BASE: 'transactions',
6597
+ BASE: "transactions",
6598
6598
  BY_ID: (id) => `transactions/${id}`,
6599
6599
  },
6600
6600
  AGENT: {
6601
- BASE: 'agent',
6602
- SCRAPE_UPWORK_PROFILE: 'agent/scrape-upwork-profile',
6603
- GENERATE_DEFAULT_AI_CONFIG: 'agent/generate-ai-config',
6604
- TEST_AI_CONFIG: 'agent/test-ai-config',
6605
- TEST_SYSTEM_PROMPTS: 'agent/test-system-prompts',
6601
+ BASE: "agent",
6602
+ SCRAPE_UPWORK_PROFILE: "agent/scrape-upwork-profile",
6603
+ GENERATE_DEFAULT_AI_CONFIG: "agent/generate-ai-config",
6604
+ // TEST_AI_CONFIG: 'agent/test-ai-config',
6605
+ TEST_SUITABILITY: "agent/test-suitability",
6606
+ TEST_PROPOSAL: "agent/test-proposal",
6607
+ TEST_SYSTEM_PROMPTS: "agent/test-system-prompts",
6606
6608
  },
6607
6609
  PLANS: {
6608
- BASE: 'plans',
6610
+ BASE: "plans",
6609
6611
  BY_ID: (id) => `plans/${id}`,
6610
6612
  },
6611
6613
  NOTIFICATIONS: {
@@ -6627,7 +6629,7 @@ const buildRoute = (route, params = {}) => {
6627
6629
  };
6628
6630
  // Helper function to get route without admin prefix
6629
6631
  const getRouteWithoutAdminPrefix = (route) => {
6630
- return route.replace('admin/', '');
6632
+ return route.replace("admin/", "");
6631
6633
  };
6632
6634
 
6633
6635
  const accountStatusOrder = [
@@ -12268,11 +12270,11 @@ const organizationMemberSchema = objectType({
12268
12270
  });
12269
12271
 
12270
12272
  const onboardingProgressSchema = z.object({
12271
- profileSetup: z.number(),
12272
- campaignCreated: z.number(),
12273
- filtersAdded: z.number(),
12274
- rulesConfigured: z.number(), // 2 is completed, 1 is when the system generates ai config
12275
- automationEnabled: z.number(),
12273
+ profileSetup: z.boolean(),
12274
+ campaignCreated: z.boolean(),
12275
+ filtersAdded: z.boolean(),
12276
+ rulesConfigured: z.boolean(),
12277
+ automationEnabled: z.boolean(),
12276
12278
  });
12277
12279
 
12278
12280
  const organizationTypeSchema = z.enum(["agency", "freelancer"]);
@@ -12309,11 +12311,18 @@ const trackUsagePayloadSchema = objectType({
12309
12311
  event: usageEventTypeEnum,
12310
12312
  campaignId: stringType().nullish(),
12311
12313
  });
12314
+ const questionRulesSchema = objectType({
12315
+ question: stringType(),
12316
+ answer: stringType(),
12317
+ category: stringType(),
12318
+ });
12312
12319
  const aiConfigSchema = objectType({
12313
12320
  suitabilityRules: stringType().nullable(),
12314
12321
  coverLetterRules: stringType().nullable(),
12315
12322
  coverLetterTemplate: stringType().nullable(),
12316
- questionRules: stringType().nullable(),
12323
+ questionRules: arrayType(questionRulesSchema).nullable(),
12324
+ approvedSuitabilityJobs: numberType().nullable(),
12325
+ approvedProposalJobs: numberType().nullable(),
12317
12326
  });
12318
12327
  const notificationConfigSchema = objectType({
12319
12328
  emailEnabled: booleanType(),
@@ -13048,7 +13057,6 @@ const portfolioSchema = objectType({
13048
13057
  title: stringType(),
13049
13058
  description: stringType(),
13050
13059
  skills: arrayType(stringType()),
13051
- publishedDate: stringType(),
13052
13060
  });
13053
13061
  const upworkProfileSchema = objectType({
13054
13062
  name: stringType().nullable(),
@@ -13718,6 +13726,7 @@ exports.proxyStatusSchema = proxyStatusSchema;
13718
13726
  exports.puppeteerConnectionErrorException = puppeteerConnectionErrorException;
13719
13727
  exports.questionAnswerPairSchema = questionAnswerPairSchema;
13720
13728
  exports.questionPairNotMatchingException = questionPairNotMatchingException;
13729
+ exports.questionRulesSchema = questionRulesSchema;
13721
13730
  exports.regionEnum = regionEnum;
13722
13731
  exports.regionMapping = regionMapping;
13723
13732
  exports.regionSchema = regionSchema;
@@ -1,4 +1,4 @@
1
- import { Moment } from 'moment';
1
+ import { Moment } from "moment";
2
2
  export declare const ROUTES: {
3
3
  readonly AUTH: {
4
4
  readonly BASE: "auth";
@@ -181,7 +181,8 @@ export declare const ROUTES: {
181
181
  readonly BASE: "agent";
182
182
  readonly SCRAPE_UPWORK_PROFILE: "agent/scrape-upwork-profile";
183
183
  readonly GENERATE_DEFAULT_AI_CONFIG: "agent/generate-ai-config";
184
- readonly TEST_AI_CONFIG: "agent/test-ai-config";
184
+ readonly TEST_SUITABILITY: "agent/test-suitability";
185
+ readonly TEST_PROPOSAL: "agent/test-proposal";
185
186
  readonly TEST_SYSTEM_PROMPTS: "agent/test-system-prompts";
186
187
  };
187
188
  readonly PLANS: {
@@ -8,17 +8,43 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
8
8
  suitabilityRules: z.ZodNullable<z.ZodString>;
9
9
  coverLetterRules: z.ZodNullable<z.ZodString>;
10
10
  coverLetterTemplate: z.ZodNullable<z.ZodString>;
11
- questionRules: z.ZodNullable<z.ZodString>;
11
+ questionRules: z.ZodNullable<z.ZodArray<z.ZodObject<{
12
+ question: z.ZodString;
13
+ answer: z.ZodString;
14
+ category: z.ZodString;
15
+ }, "strip", z.ZodTypeAny, {
16
+ question: string;
17
+ answer: string;
18
+ category: string;
19
+ }, {
20
+ question: string;
21
+ answer: string;
22
+ category: string;
23
+ }>, "many">>;
24
+ approvedSuitabilityJobs: z.ZodNullable<z.ZodNumber>;
25
+ approvedProposalJobs: z.ZodNullable<z.ZodNumber>;
12
26
  }, "strip", z.ZodTypeAny, {
13
27
  suitabilityRules: string | null;
14
28
  coverLetterRules: string | null;
15
29
  coverLetterTemplate: string | null;
16
- questionRules: string | null;
30
+ questionRules: {
31
+ question: string;
32
+ answer: string;
33
+ category: string;
34
+ }[] | null;
35
+ approvedSuitabilityJobs: number | null;
36
+ approvedProposalJobs: number | null;
17
37
  }, {
18
38
  suitabilityRules: string | null;
19
39
  coverLetterRules: string | null;
20
40
  coverLetterTemplate: string | null;
21
- questionRules: string | null;
41
+ questionRules: {
42
+ question: string;
43
+ answer: string;
44
+ category: string;
45
+ }[] | null;
46
+ approvedSuitabilityJobs: number | null;
47
+ approvedProposalJobs: number | null;
22
48
  }>;
23
49
  lead: z.ZodObject<Omit<z.objectUtil.extendShape<{
24
50
  id: z.ZodNullable<z.ZodString>;
@@ -342,11 +368,11 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
342
368
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
343
369
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
344
370
  }>, "processed">, "strip", z.ZodTypeAny, {
371
+ category: string | null;
345
372
  id: string | null;
346
373
  uid: string | null;
347
374
  createdAt: number | null;
348
375
  title: string | null;
349
- category: string | null;
350
376
  skills: {
351
377
  name: string;
352
378
  }[] | null;
@@ -469,11 +495,11 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
469
495
  } | null | undefined;
470
496
  proposalId?: string | undefined;
471
497
  }, {
498
+ category: string | null;
472
499
  id: string | null;
473
500
  uid: string | null;
474
501
  createdAt: number | null;
475
502
  title: string | null;
476
- category: string | null;
477
503
  skills: {
478
504
  name: string;
479
505
  }[] | null;
@@ -603,14 +629,20 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
603
629
  suitabilityRules: string | null;
604
630
  coverLetterRules: string | null;
605
631
  coverLetterTemplate: string | null;
606
- questionRules: string | null;
632
+ questionRules: {
633
+ question: string;
634
+ answer: string;
635
+ category: string;
636
+ }[] | null;
637
+ approvedSuitabilityJobs: number | null;
638
+ approvedProposalJobs: number | null;
607
639
  };
608
640
  lead: {
641
+ category: string | null;
609
642
  id: string | null;
610
643
  uid: string | null;
611
644
  createdAt: number | null;
612
645
  title: string | null;
613
- category: string | null;
614
646
  skills: {
615
647
  name: string;
616
648
  }[] | null;
@@ -742,14 +774,20 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
742
774
  suitabilityRules: string | null;
743
775
  coverLetterRules: string | null;
744
776
  coverLetterTemplate: string | null;
745
- questionRules: string | null;
777
+ questionRules: {
778
+ question: string;
779
+ answer: string;
780
+ category: string;
781
+ }[] | null;
782
+ approvedSuitabilityJobs: number | null;
783
+ approvedProposalJobs: number | null;
746
784
  };
747
785
  lead: {
786
+ category: string | null;
748
787
  id: string | null;
749
788
  uid: string | null;
750
789
  createdAt: number | null;
751
790
  title: string | null;
752
- category: string | null;
753
791
  skills: {
754
792
  name: string;
755
793
  }[] | null;
@@ -896,17 +934,43 @@ export declare const testSystemPromptsRequestSchema: z.ZodObject<{
896
934
  suitabilityRules: z.ZodNullable<z.ZodString>;
897
935
  coverLetterRules: z.ZodNullable<z.ZodString>;
898
936
  coverLetterTemplate: z.ZodNullable<z.ZodString>;
899
- questionRules: z.ZodNullable<z.ZodString>;
937
+ questionRules: z.ZodNullable<z.ZodArray<z.ZodObject<{
938
+ question: z.ZodString;
939
+ answer: z.ZodString;
940
+ category: z.ZodString;
941
+ }, "strip", z.ZodTypeAny, {
942
+ question: string;
943
+ answer: string;
944
+ category: string;
945
+ }, {
946
+ question: string;
947
+ answer: string;
948
+ category: string;
949
+ }>, "many">>;
950
+ approvedSuitabilityJobs: z.ZodNullable<z.ZodNumber>;
951
+ approvedProposalJobs: z.ZodNullable<z.ZodNumber>;
900
952
  }, "strip", z.ZodTypeAny, {
901
953
  suitabilityRules: string | null;
902
954
  coverLetterRules: string | null;
903
955
  coverLetterTemplate: string | null;
904
- questionRules: string | null;
956
+ questionRules: {
957
+ question: string;
958
+ answer: string;
959
+ category: string;
960
+ }[] | null;
961
+ approvedSuitabilityJobs: number | null;
962
+ approvedProposalJobs: number | null;
905
963
  }, {
906
964
  suitabilityRules: string | null;
907
965
  coverLetterRules: string | null;
908
966
  coverLetterTemplate: string | null;
909
- questionRules: string | null;
967
+ questionRules: {
968
+ question: string;
969
+ answer: string;
970
+ category: string;
971
+ }[] | null;
972
+ approvedSuitabilityJobs: number | null;
973
+ approvedProposalJobs: number | null;
910
974
  }>;
911
975
  lead: z.ZodObject<Omit<z.objectUtil.extendShape<{
912
976
  id: z.ZodNullable<z.ZodString>;
@@ -1230,11 +1294,11 @@ export declare const testSystemPromptsRequestSchema: z.ZodObject<{
1230
1294
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
1231
1295
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
1232
1296
  }>, "processed">, "strip", z.ZodTypeAny, {
1297
+ category: string | null;
1233
1298
  id: string | null;
1234
1299
  uid: string | null;
1235
1300
  createdAt: number | null;
1236
1301
  title: string | null;
1237
- category: string | null;
1238
1302
  skills: {
1239
1303
  name: string;
1240
1304
  }[] | null;
@@ -1357,11 +1421,11 @@ export declare const testSystemPromptsRequestSchema: z.ZodObject<{
1357
1421
  } | null | undefined;
1358
1422
  proposalId?: string | undefined;
1359
1423
  }, {
1424
+ category: string | null;
1360
1425
  id: string | null;
1361
1426
  uid: string | null;
1362
1427
  createdAt: number | null;
1363
1428
  title: string | null;
1364
- category: string | null;
1365
1429
  skills: {
1366
1430
  name: string;
1367
1431
  }[] | null;
@@ -1490,14 +1554,20 @@ export declare const testSystemPromptsRequestSchema: z.ZodObject<{
1490
1554
  suitabilityRules: string | null;
1491
1555
  coverLetterRules: string | null;
1492
1556
  coverLetterTemplate: string | null;
1493
- questionRules: string | null;
1557
+ questionRules: {
1558
+ question: string;
1559
+ answer: string;
1560
+ category: string;
1561
+ }[] | null;
1562
+ approvedSuitabilityJobs: number | null;
1563
+ approvedProposalJobs: number | null;
1494
1564
  };
1495
1565
  lead: {
1566
+ category: string | null;
1496
1567
  id: string | null;
1497
1568
  uid: string | null;
1498
1569
  createdAt: number | null;
1499
1570
  title: string | null;
1500
- category: string | null;
1501
1571
  skills: {
1502
1572
  name: string;
1503
1573
  }[] | null;
@@ -1633,14 +1703,20 @@ export declare const testSystemPromptsRequestSchema: z.ZodObject<{
1633
1703
  suitabilityRules: string | null;
1634
1704
  coverLetterRules: string | null;
1635
1705
  coverLetterTemplate: string | null;
1636
- questionRules: string | null;
1706
+ questionRules: {
1707
+ question: string;
1708
+ answer: string;
1709
+ category: string;
1710
+ }[] | null;
1711
+ approvedSuitabilityJobs: number | null;
1712
+ approvedProposalJobs: number | null;
1637
1713
  };
1638
1714
  lead: {
1715
+ category: string | null;
1639
1716
  id: string | null;
1640
1717
  uid: string | null;
1641
1718
  createdAt: number | null;
1642
1719
  title: string | null;
1643
- category: string | null;
1644
1720
  skills: {
1645
1721
  name: string;
1646
1722
  }[] | null;
@@ -452,21 +452,61 @@ export declare const trackUsagePayloadSchema: z.ZodObject<{
452
452
  event: "suitabilityComplete" | "proposalComplete" | "biddingComplete";
453
453
  campaignId?: string | null | undefined;
454
454
  }>;
455
+ export declare const questionRulesSchema: z.ZodObject<{
456
+ question: z.ZodString;
457
+ answer: z.ZodString;
458
+ category: z.ZodString;
459
+ }, "strip", z.ZodTypeAny, {
460
+ question: string;
461
+ answer: string;
462
+ category: string;
463
+ }, {
464
+ question: string;
465
+ answer: string;
466
+ category: string;
467
+ }>;
468
+ export type QuestionRules = z.infer<typeof questionRulesSchema>;
455
469
  export declare const aiConfigSchema: z.ZodObject<{
456
470
  suitabilityRules: z.ZodNullable<z.ZodString>;
457
471
  coverLetterRules: z.ZodNullable<z.ZodString>;
458
472
  coverLetterTemplate: z.ZodNullable<z.ZodString>;
459
- questionRules: z.ZodNullable<z.ZodString>;
473
+ questionRules: z.ZodNullable<z.ZodArray<z.ZodObject<{
474
+ question: z.ZodString;
475
+ answer: z.ZodString;
476
+ category: z.ZodString;
477
+ }, "strip", z.ZodTypeAny, {
478
+ question: string;
479
+ answer: string;
480
+ category: string;
481
+ }, {
482
+ question: string;
483
+ answer: string;
484
+ category: string;
485
+ }>, "many">>;
486
+ approvedSuitabilityJobs: z.ZodNullable<z.ZodNumber>;
487
+ approvedProposalJobs: z.ZodNullable<z.ZodNumber>;
460
488
  }, "strip", z.ZodTypeAny, {
461
489
  suitabilityRules: string | null;
462
490
  coverLetterRules: string | null;
463
491
  coverLetterTemplate: string | null;
464
- questionRules: string | null;
492
+ questionRules: {
493
+ question: string;
494
+ answer: string;
495
+ category: string;
496
+ }[] | null;
497
+ approvedSuitabilityJobs: number | null;
498
+ approvedProposalJobs: number | null;
465
499
  }, {
466
500
  suitabilityRules: string | null;
467
501
  coverLetterRules: string | null;
468
502
  coverLetterTemplate: string | null;
469
- questionRules: string | null;
503
+ questionRules: {
504
+ question: string;
505
+ answer: string;
506
+ category: string;
507
+ }[] | null;
508
+ approvedSuitabilityJobs: number | null;
509
+ approvedProposalJobs: number | null;
470
510
  }>;
471
511
  export declare const notificationConfigSchema: z.ZodObject<{
472
512
  emailEnabled: z.ZodBoolean;
@@ -486,17 +526,43 @@ export declare const organizationSettingsSchema: z.ZodObject<{
486
526
  suitabilityRules: z.ZodNullable<z.ZodString>;
487
527
  coverLetterRules: z.ZodNullable<z.ZodString>;
488
528
  coverLetterTemplate: z.ZodNullable<z.ZodString>;
489
- questionRules: z.ZodNullable<z.ZodString>;
529
+ questionRules: z.ZodNullable<z.ZodArray<z.ZodObject<{
530
+ question: z.ZodString;
531
+ answer: z.ZodString;
532
+ category: z.ZodString;
533
+ }, "strip", z.ZodTypeAny, {
534
+ question: string;
535
+ answer: string;
536
+ category: string;
537
+ }, {
538
+ question: string;
539
+ answer: string;
540
+ category: string;
541
+ }>, "many">>;
542
+ approvedSuitabilityJobs: z.ZodNullable<z.ZodNumber>;
543
+ approvedProposalJobs: z.ZodNullable<z.ZodNumber>;
490
544
  }, "strip", z.ZodTypeAny, {
491
545
  suitabilityRules: string | null;
492
546
  coverLetterRules: string | null;
493
547
  coverLetterTemplate: string | null;
494
- questionRules: string | null;
548
+ questionRules: {
549
+ question: string;
550
+ answer: string;
551
+ category: string;
552
+ }[] | null;
553
+ approvedSuitabilityJobs: number | null;
554
+ approvedProposalJobs: number | null;
495
555
  }, {
496
556
  suitabilityRules: string | null;
497
557
  coverLetterRules: string | null;
498
558
  coverLetterTemplate: string | null;
499
- questionRules: string | null;
559
+ questionRules: {
560
+ question: string;
561
+ answer: string;
562
+ category: string;
563
+ }[] | null;
564
+ approvedSuitabilityJobs: number | null;
565
+ approvedProposalJobs: number | null;
500
566
  }>;
501
567
  notifications: z.ZodObject<{
502
568
  emailEnabled: z.ZodBoolean;
@@ -516,7 +582,13 @@ export declare const organizationSettingsSchema: z.ZodObject<{
516
582
  suitabilityRules: string | null;
517
583
  coverLetterRules: string | null;
518
584
  coverLetterTemplate: string | null;
519
- questionRules: string | null;
585
+ questionRules: {
586
+ question: string;
587
+ answer: string;
588
+ category: string;
589
+ }[] | null;
590
+ approvedSuitabilityJobs: number | null;
591
+ approvedProposalJobs: number | null;
520
592
  };
521
593
  notifications: {
522
594
  emailEnabled: boolean;
@@ -528,7 +600,13 @@ export declare const organizationSettingsSchema: z.ZodObject<{
528
600
  suitabilityRules: string | null;
529
601
  coverLetterRules: string | null;
530
602
  coverLetterTemplate: string | null;
531
- questionRules: string | null;
603
+ questionRules: {
604
+ question: string;
605
+ answer: string;
606
+ category: string;
607
+ }[] | null;
608
+ approvedSuitabilityJobs: number | null;
609
+ approvedProposalJobs: number | null;
532
610
  };
533
611
  notifications: {
534
612
  emailEnabled: boolean;