lancer-shared 1.2.159 → 1.2.161

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 (251) hide show
  1. package/dist/bundle.cjs.js +294 -161
  2. package/dist/constants/account-status.d.ts +3 -0
  3. package/dist/constants/account-status.js +17 -0
  4. package/dist/constants/campaign-notifications.d.ts +2 -0
  5. package/dist/constants/campaign-webhook-types.d.ts +2 -0
  6. package/dist/constants/collections.d.ts +13 -0
  7. package/dist/constants/collections.js +16 -0
  8. package/dist/constants/common-questions.js +60 -0
  9. package/dist/constants/index.js +40 -0
  10. package/dist/constants/job-filter-options.js +268 -0
  11. package/dist/constants/job-status.js +26 -0
  12. package/dist/constants/mappings/countryMapping.js +122 -0
  13. package/dist/constants/mappings/regionMapping.js +242 -0
  14. package/dist/constants/organization.d.ts +2 -0
  15. package/dist/constants/proxies.d.ts +4 -0
  16. package/dist/constants/routes.js +114 -0
  17. package/dist/constants/upwork-accounts.js +21 -0
  18. package/dist/constants/upwork-filters.d.ts +5 -0
  19. package/dist/constants/upwork-filters.js +75 -0
  20. package/dist/index.js +20 -0
  21. package/dist/schemas/account/account-status.js +11 -0
  22. package/dist/schemas/account/bidder-account.d.ts +1 -5
  23. package/dist/schemas/account/bidder-account.js +37 -0
  24. package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +5 -0
  25. package/dist/schemas/account/index.js +19 -0
  26. package/dist/schemas/account/manager-account.d.ts +116 -0
  27. package/dist/schemas/account/manager-account.js +38 -0
  28. package/dist/schemas/account/scraper-account.js +37 -0
  29. package/dist/schemas/ai/ai-config.d.ts +36 -0
  30. package/dist/schemas/ai/ai-config.js +12 -0
  31. package/dist/schemas/ai/index.d.ts +3 -0
  32. package/dist/schemas/ai/index.js +19 -0
  33. package/dist/schemas/ai/proposal.d.ts +82 -0
  34. package/dist/schemas/ai/proposal.js +16 -0
  35. package/dist/schemas/ai/suitability.d.ts +37 -0
  36. package/dist/schemas/ai/suitability.js +17 -0
  37. package/dist/schemas/ai-config/ai-config.d.ts +39 -0
  38. package/dist/schemas/ai-config/ai-config.js +12 -0
  39. package/dist/schemas/ai-config/index.d.ts +1 -0
  40. package/dist/schemas/ai-config/index.js +17 -0
  41. package/dist/schemas/bid/bid-result.js +15 -0
  42. package/dist/schemas/bid/bid-status.d.ts +30 -0
  43. package/dist/schemas/bid/bid-status.js +15 -0
  44. package/dist/schemas/bid/bid.js +36 -0
  45. package/dist/schemas/bid/exceptions/base-exception.d.ts +4 -0
  46. package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +5 -0
  47. package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +5 -0
  48. package/dist/schemas/bid/index.js +18 -0
  49. package/dist/schemas/bidding/index.d.ts +1 -0
  50. package/dist/schemas/bidding/index.js +17 -0
  51. package/dist/schemas/bidding/proposal-bidding-status.d.ts +26 -0
  52. package/dist/schemas/bidding/proposal-bidding-status.js +18 -0
  53. package/dist/schemas/bidding/proposal-dto.d.ts +26 -0
  54. package/dist/schemas/bidding/proposal-dto.js +18 -0
  55. package/dist/schemas/campaign/campaign-ai-metrics.js +9 -0
  56. package/dist/schemas/campaign/campaign-analytics.js +41 -0
  57. package/dist/schemas/campaign/campaign-expenses.js +9 -0
  58. package/dist/schemas/campaign/campaign-insights.js +31 -0
  59. package/dist/schemas/campaign/campaign-integrations.d.ts +82 -0
  60. package/dist/schemas/campaign/campaign-integrations.js +16 -0
  61. package/dist/schemas/campaign/campaign-job-count.d.ts +2 -0
  62. package/dist/schemas/campaign/campaign-job-count.js +6 -0
  63. package/dist/schemas/campaign/campaign-notifications.d.ts +9 -0
  64. package/dist/schemas/campaign/campaign.js +44 -0
  65. package/dist/schemas/campaign/index.js +23 -0
  66. package/dist/schemas/chat-message/chat-message.d.ts +31 -0
  67. package/dist/schemas/chat-message/chat-message.js +13 -0
  68. package/dist/schemas/chat-message/index.d.ts +1 -0
  69. package/dist/schemas/chat-message/index.js +17 -0
  70. package/dist/schemas/config/agency-config.d.ts +17 -0
  71. package/dist/schemas/config/agency-config.js +10 -0
  72. package/dist/schemas/config/index.d.ts +1 -0
  73. package/dist/schemas/config/index.js +17 -0
  74. package/dist/schemas/index.d.ts +6 -5
  75. package/dist/schemas/index.js +32 -0
  76. package/dist/schemas/job/feed-job.d.ts +866 -0
  77. package/dist/schemas/job/index.js +19 -0
  78. package/dist/schemas/job/job-details.js +29 -0
  79. package/dist/schemas/job/job-note.d.ts +83 -0
  80. package/dist/schemas/job/job-note.js +30 -0
  81. package/dist/schemas/job/job-pipeline.d.ts +74 -0
  82. package/dist/schemas/job/job-pipeline.js +29 -0
  83. package/dist/schemas/job/job-status.d.ts +3 -0
  84. package/dist/schemas/job/job-status.js +27 -0
  85. package/dist/schemas/job/job-suitability.d.ts +12 -0
  86. package/dist/schemas/job/job-suitability.js +13 -0
  87. package/dist/schemas/job/job.d.ts +1160 -0
  88. package/dist/schemas/job/job.js +90 -0
  89. package/dist/schemas/job/pipeline-job.d.ts +608 -0
  90. package/dist/schemas/job/pipeline-job.js +43 -0
  91. package/dist/schemas/job/upwork-job.d.ts +334 -0
  92. package/dist/schemas/job/upwork-job.js +60 -0
  93. package/dist/schemas/job-filters/index.d.ts +1 -0
  94. package/dist/schemas/job-filters/index.js +17 -0
  95. package/dist/schemas/job-filters/job-filters.d.ts +241 -0
  96. package/dist/schemas/job-filters/job-filters.js +87 -0
  97. package/dist/schemas/knowledge-object/index.d.ts +1 -0
  98. package/dist/schemas/knowledge-object/index.js +17 -0
  99. package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
  100. package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
  101. package/dist/schemas/lead/index.js +19 -0
  102. package/dist/schemas/lead/lead-note.d.ts +83 -0
  103. package/dist/schemas/lead/lead-note.js +30 -0
  104. package/dist/schemas/lead/lead-status.js +26 -0
  105. package/dist/schemas/lead/lead.d.ts +1897 -0
  106. package/dist/schemas/lead/lead.js +143 -0
  107. package/dist/schemas/lead/nuxt.d.ts +1664 -0
  108. package/dist/schemas/logger/index.js +17 -0
  109. package/dist/schemas/logger/log-event.js +66 -0
  110. package/dist/schemas/organization/index.d.ts +13 -8
  111. package/dist/schemas/organization/index.js +17 -0
  112. package/dist/schemas/organization/organization.d.ts +70 -0
  113. package/dist/schemas/organization/organization.js +19 -0
  114. package/dist/schemas/organization/subscription.d.ts +1 -4
  115. package/dist/schemas/plan/index.d.ts +42 -44
  116. package/dist/schemas/proxy/index.js +17 -0
  117. package/dist/schemas/proxy/proxy.js +23 -0
  118. package/dist/schemas/saved-search/index.js +12 -0
  119. package/dist/schemas/scraper/index.js +18 -0
  120. package/dist/schemas/scraper/scrape-payload.js +16 -0
  121. package/dist/schemas/scraper/scrape-response.d.ts +345 -0
  122. package/dist/schemas/scraper/scrape-response.js +9 -0
  123. package/dist/schemas/scraper/scrape-result.js +23 -0
  124. package/dist/schemas/shared.js +16 -0
  125. package/dist/schemas/talent/index.d.ts +2408 -0
  126. package/dist/schemas/time-filter/index.js +9 -0
  127. package/dist/schemas/upwork-account/index.d.ts +3 -0
  128. package/dist/schemas/upwork-account/index.js +19 -0
  129. package/dist/schemas/upwork-account/upwork-account-status.d.ts +2 -0
  130. package/dist/schemas/upwork-account/upwork-account-status.js +11 -0
  131. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +95 -0
  132. package/dist/schemas/upwork-account/upwork-business-manager-account.js +35 -0
  133. package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +92 -0
  134. package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
  135. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
  136. package/dist/schemas/upwork-account/upwork-scraping-account.js +30 -0
  137. package/dist/schemas/user/index.js +55 -0
  138. package/dist/types/account/account-status.d.ts +3 -0
  139. package/dist/types/account/account-status.js +2 -0
  140. package/dist/types/account/bidder-account.d.ts +7 -0
  141. package/dist/types/account/bidder-account.js +2 -0
  142. package/dist/types/account/index.d.ts +3 -0
  143. package/dist/types/account/index.js +19 -0
  144. package/dist/types/account/manager-account.d.ts +7 -0
  145. package/dist/types/account/manager-account.js +2 -0
  146. package/dist/types/account/scraper-account.d.ts +5 -0
  147. package/dist/types/account/scraper-account.js +2 -0
  148. package/dist/types/ai/ai-config.d.ts +6 -0
  149. package/dist/types/ai/ai-config.js +2 -0
  150. package/dist/types/ai/index.d.ts +3 -0
  151. package/dist/types/ai/index.js +19 -0
  152. package/dist/types/ai/proposal.d.ts +10 -0
  153. package/dist/types/ai/proposal.js +2 -0
  154. package/dist/types/ai/suitability.d.ts +6 -0
  155. package/dist/types/ai/suitability.js +2 -0
  156. package/dist/types/ai-config/ai-config.d.ts +6 -0
  157. package/dist/types/ai-config/ai-config.js +2 -0
  158. package/dist/types/ai-config/index.d.ts +1 -0
  159. package/dist/types/ai-config/index.js +17 -0
  160. package/dist/types/bid/bid-result.d.ts +5 -0
  161. package/dist/types/bid/bid-result.js +2 -0
  162. package/dist/types/bid/bid-status.d.ts +5 -0
  163. package/dist/types/bid/bid-status.js +2 -0
  164. package/dist/types/bid/bid.d.ts +9 -0
  165. package/dist/types/bid/bid.js +2 -0
  166. package/dist/types/bid/index.d.ts +2 -0
  167. package/dist/types/bid/index.js +18 -0
  168. package/dist/types/bidding/index.d.ts +1 -0
  169. package/dist/types/bidding/index.js +17 -0
  170. package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
  171. package/dist/types/bidding/proposal-bidding-status.js +2 -0
  172. package/dist/types/bidding/proposal-dto.d.ts +3 -0
  173. package/dist/types/bidding/proposal-dto.js +2 -0
  174. package/dist/types/campaign/campaign-analytics.d.ts +7 -0
  175. package/dist/types/campaign/campaign-analytics.js +2 -0
  176. package/dist/types/campaign/campaign-expenses.d.ts +3 -0
  177. package/dist/types/campaign/campaign-expenses.js +2 -0
  178. package/dist/types/campaign/campaign-insights.js +2 -0
  179. package/dist/types/campaign/campaign-integrations.d.ts +6 -0
  180. package/dist/types/campaign/campaign-integrations.js +2 -0
  181. package/dist/types/campaign/campaign-job-count.d.ts +4 -0
  182. package/dist/types/campaign/campaign-job-count.js +2 -0
  183. package/dist/types/campaign/campaign-notifications.d.ts +7 -0
  184. package/dist/types/campaign/campaign.js +2 -0
  185. package/dist/types/campaign/index.js +22 -0
  186. package/dist/types/chat-message/chat-message.d.ts +4 -0
  187. package/dist/types/chat-message/chat-message.js +2 -0
  188. package/dist/types/chat-message/index.d.ts +1 -0
  189. package/dist/types/chat-message/index.js +17 -0
  190. package/dist/types/config/agency-config.d.ts +4 -0
  191. package/dist/types/config/agency-config.js +2 -0
  192. package/dist/types/config/index.d.ts +1 -0
  193. package/dist/types/config/index.js +17 -0
  194. package/dist/types/index.d.ts +15 -0
  195. package/dist/types/index.js +29 -0
  196. package/dist/types/job/index.d.ts +48 -0
  197. package/dist/types/job/index.js +19 -0
  198. package/dist/types/job/job-details.d.ts +36 -0
  199. package/dist/types/job/job-details.js +2 -0
  200. package/dist/types/job/job-note.d.ts +10 -0
  201. package/dist/types/job/job-note.js +2 -0
  202. package/dist/types/job/job-pipeline.d.ts +4 -0
  203. package/dist/types/job/job-pipeline.js +2 -0
  204. package/dist/types/job/job-status.d.ts +5 -0
  205. package/dist/types/job/job-status.js +12 -0
  206. package/dist/types/job/job-suitability.d.ts +3 -0
  207. package/dist/types/job/job-suitability.js +2 -0
  208. package/dist/types/job/job.d.ts +36 -0
  209. package/dist/types/job/job.js +2 -0
  210. package/dist/types/job/nuxt.d.ts +4 -0
  211. package/dist/types/job-filters/index.d.ts +1 -0
  212. package/dist/types/job-filters/index.js +17 -0
  213. package/dist/types/job-filters/job-filters.d.ts +4 -0
  214. package/dist/types/job-filters/job-filters.js +2 -0
  215. package/dist/types/knowledge-object/index.d.ts +1 -0
  216. package/dist/types/knowledge-object/index.js +17 -0
  217. package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
  218. package/dist/types/knowledge-object/knowledge-object.js +2 -0
  219. package/dist/types/logger/index.d.ts +1 -0
  220. package/dist/types/logger/index.js +17 -0
  221. package/dist/types/logger/log-event.d.ts +14 -0
  222. package/dist/types/logger/log-event.js +2 -0
  223. package/dist/types/saved-search/index.d.ts +6 -0
  224. package/dist/types/saved-search/index.js +2 -0
  225. package/dist/types/scraper/index.d.ts +2 -0
  226. package/dist/types/scraper/index.js +18 -0
  227. package/dist/types/scraper/scrape-payload.d.ts +10 -0
  228. package/dist/types/scraper/scrape-payload.js +2 -0
  229. package/dist/types/scraper/scrape-response.d.ts +4 -0
  230. package/dist/types/scraper/scrape-response.js +2 -0
  231. package/dist/types/scraper/scrape-result.d.ts +8 -0
  232. package/dist/types/scraper/scrape-result.js +2 -0
  233. package/dist/types/shared.d.ts +8 -0
  234. package/dist/types/time-filter/index.d.ts +3 -0
  235. package/dist/types/time-filter/index.js +2 -0
  236. package/dist/types/transaction/index.d.ts +4 -0
  237. package/dist/types/upwork-account/index.d.ts +3 -0
  238. package/dist/types/upwork-account/index.js +19 -0
  239. package/dist/types/upwork-account/upwork-account-status.d.ts +3 -0
  240. package/dist/types/upwork-account/upwork-account-status.js +2 -0
  241. package/dist/types/upwork-account/upwork-business-manager-account.d.ts +7 -0
  242. package/dist/types/upwork-account/upwork-business-manager-account.js +2 -0
  243. package/dist/types/upwork-account/upwork-scraping-account.d.ts +5 -0
  244. package/dist/types/upwork-account/upwork-scraping-account.js +2 -0
  245. package/dist/types/usage/index.d.ts +6 -0
  246. package/dist/types/user/index.d.ts +15 -0
  247. package/dist/types/user/index.js +2 -0
  248. package/dist/utils/index.js +17 -0
  249. package/dist/utils/timezones.d.ts +5 -0
  250. package/dist/utils/try-catch.js +25 -0
  251. package/package.json +1 -1
@@ -6691,6 +6691,10 @@ const bidderAccountProviderDisplayMap = {
6691
6691
  'user-provided': 'User Provided',
6692
6692
  };
6693
6693
 
6694
+ const planSlugToNameMap = {
6695
+ "lancer-unlimited-launch-offer": "Lancer Unlimited - Launch Offer",
6696
+ };
6697
+
6694
6698
  var util;
6695
6699
  (function (util) {
6696
6700
  util.assertEqual = (val) => val;
@@ -11557,7 +11561,7 @@ const jobListingSchema = objectType({
11557
11561
  weeklyBudget: amountSchema,
11558
11562
  isSTSVectorSearchResult: booleanType(),
11559
11563
  });
11560
- const pagingSchema = objectType({
11564
+ const pagingSchema$1 = objectType({
11561
11565
  total: numberType(),
11562
11566
  offset: numberType(),
11563
11567
  count: numberType(),
@@ -11569,7 +11573,7 @@ const jobsSearchSchema = objectType({
11569
11573
  failed: booleanType(),
11570
11574
  }),
11571
11575
  jobs: arrayType(jobListingSchema),
11572
- paging: pagingSchema,
11576
+ paging: pagingSchema$1,
11573
11577
  abortController: anyType().nullable(),
11574
11578
  currentPage: numberType(),
11575
11579
  jobsPerPage: numberType(),
@@ -12542,8 +12546,6 @@ const createBidderAccountSchema = bidderAccountSchema
12542
12546
  name: true,
12543
12547
  agencies: true,
12544
12548
  assignedOrganizations: true,
12545
- multiLoginProfileId: true,
12546
- proxyId: true,
12547
12549
  region: true,
12548
12550
  })
12549
12551
  .extend({
@@ -12769,6 +12771,70 @@ const generateLeadCountsRequestSchema = z.object({
12769
12771
  campaignId: z.string().optional(),
12770
12772
  });
12771
12773
 
12774
+ const proposalSchema = z.object({
12775
+ coverLetter: z.string(),
12776
+ questionAnswerPairs: questionAnswerPairSchema.array(),
12777
+ });
12778
+
12779
+ const agentGenerateProposalRequestSchema = z.object({
12780
+ userId: z.string().nullable(),
12781
+ organizationId: z.string(),
12782
+ campaignId: z.string(),
12783
+ job: z.object({
12784
+ leadId: z.string(),
12785
+ jobId: z.string(),
12786
+ title: z.string(),
12787
+ description: z.string(),
12788
+ questions: z.array(z.string()),
12789
+ clientCountry: z.string(),
12790
+ }),
12791
+ isOverallHighestPriorityCampaign: z.boolean().optional(),
12792
+ applyToLeads: z
12793
+ .array(z.object({ leadId: z.string(), campaignId: z.string() }))
12794
+ .optional(),
12795
+ });
12796
+ const agentGenerateProposalResponseSchema = z.object({
12797
+ coverLetter: z.string(),
12798
+ questionAnswerPairs: z.array(z.object({
12799
+ question: z.string(),
12800
+ answer: z.string(),
12801
+ })),
12802
+ });
12803
+ const agentCalculateSuitabilityRequestSchema = z.object({
12804
+ userId: z.string().nullable(),
12805
+ organizationId: z.string(),
12806
+ campaignId: z.string(),
12807
+ lead: leadSchema,
12808
+ isOverallHighestPriorityCampaign: z.boolean().optional(),
12809
+ applyToLeads: z
12810
+ .array(z.object({ leadId: z.string(), campaignId: z.string() }))
12811
+ .optional(),
12812
+ });
12813
+ const agentPickSpecialisedProfileRequestSchema = z.object({
12814
+ jobTitle: z.string(),
12815
+ jobDescription: z.string(),
12816
+ specialisedProfiles: z.array(z.string()),
12817
+ });
12818
+ const agentPickSpecialisedProfileResponseSchema = z.object({
12819
+ profile: z.string(),
12820
+ reason: z.string(),
12821
+ });
12822
+ const suitabilityRatingSchema = z.object({
12823
+ rating: z.number(),
12824
+ reason: z.string(),
12825
+ });
12826
+ const jobQualityScoreSchema = z.object({
12827
+ rating: z.number(),
12828
+ reason: z.string(),
12829
+ });
12830
+ const agentTaskResponseSchema = z.object({
12831
+ result: z.union([suitabilityRatingSchema, proposalSchema]),
12832
+ model: z.string(),
12833
+ provider: z.string(),
12834
+ promptTokens: z.number(),
12835
+ completionTokens: z.number(),
12836
+ });
12837
+
12772
12838
  const usageEventTypeEnum = z.enum([
12773
12839
  'suitabilityComplete',
12774
12840
  'proposalComplete',
@@ -12796,15 +12862,15 @@ const billingSchema = objectType({
12796
12862
  });
12797
12863
 
12798
12864
  const subscriptionStatusEnum = z.enum([
12799
- 'active',
12800
- 'trialing',
12801
- 'cancelled',
12802
- 'paused',
12803
- 'payment_processing',
12804
- 'payment_pending',
12805
- 'payment_failed',
12865
+ "active",
12866
+ "trialing",
12867
+ "cancelled",
12868
+ "paused",
12869
+ "payment_processing",
12870
+ "payment_pending",
12871
+ "payment_failed",
12806
12872
  ]);
12807
- const subscriptionSourceEnum = z.enum(['stripe', 'manual']);
12873
+ const subscriptionSourceEnum = z.enum(["stripe", "manual"]);
12808
12874
  const subscriptionStripeMetadataItemSchema = objectType({
12809
12875
  id: stringType(),
12810
12876
  price: objectType({
@@ -12828,7 +12894,6 @@ const subscriptionSchema = objectType({
12828
12894
  stripe: subscriptionStripeMetadataSchema,
12829
12895
  source: subscriptionSourceEnum,
12830
12896
  usage: recordType(usageEventTypeEnum, numberType()),
12831
- trialEndsAt: numberType().nullable(),
12832
12897
  });
12833
12898
 
12834
12899
  const coverLetterTemplateSchema = z.object({
@@ -12891,8 +12956,10 @@ const organizationSchema = objectType({
12891
12956
  createdAt: numberType(),
12892
12957
  updatedAt: numberType(),
12893
12958
  openRouterApiKey: stringType().nullable(),
12959
+ appTrialEndsAt: numberType().nullable(),
12894
12960
  oneTimePayments: oneTimePaymentsSchema.optional(),
12895
12961
  });
12962
+ const organizationUpdateSchema = objectType({ planId: stringType() });
12896
12963
  const caseStudySchema = objectType({
12897
12964
  id: stringType(),
12898
12965
  title: stringType(),
@@ -13608,6 +13675,71 @@ class WaitForFunctionTimeoutError extends Error {
13608
13675
  }
13609
13676
  const waitForFunctionTimeoutError = (fn, timeout) => new WaitForFunctionTimeoutError(fn, timeout);
13610
13677
 
13678
+ const campaignStatsSchema = z.object({
13679
+ contacted: z.number(),
13680
+ viewed: z.number(),
13681
+ replied: z.number(),
13682
+ won: z.number(),
13683
+ proposalsGenerated: z.number(),
13684
+ leadsAnalyzed: z.number(),
13685
+ leadsFailed: z.number(),
13686
+ });
13687
+ const suitabilityBreakdownSchema = z.object({
13688
+ lessThan50: z.number(),
13689
+ between50And60: z.number(),
13690
+ between60And70: z.number(),
13691
+ between70And80: z.number(),
13692
+ between80And90: z.number(),
13693
+ above90: z.number(),
13694
+ });
13695
+ const campaignDetailsSchema = z.object({
13696
+ id: z.string(),
13697
+ name: z.string(),
13698
+ status: campaignStatusSchema,
13699
+ createdAt: z.number(),
13700
+ updatedAt: z.number(),
13701
+ stats: campaignStatsSchema,
13702
+ suitabilityBreakdown: suitabilityBreakdownSchema,
13703
+ });
13704
+ const organizationCampaignStatsSchema = z.object({
13705
+ organizationId: z.string(),
13706
+ organizationName: z.string(),
13707
+ organizationType: z.string(),
13708
+ tierId: z.string(),
13709
+ active: z.boolean(),
13710
+ createdAt: z.number(),
13711
+ campaignCount: z.number(),
13712
+ activeCampaignCount: z.number(),
13713
+ totalStats: campaignStatsSchema,
13714
+ campaigns: z.array(campaignDetailsSchema),
13715
+ });
13716
+
13717
+ const gcpMetadataSchema = objectType({
13718
+ instanceName: stringType(),
13719
+ machineType: stringType(),
13720
+ zone: stringType(),
13721
+ region: stringType(),
13722
+ });
13723
+ const hetznerMetadataSchema = objectType({
13724
+ id: stringType(),
13725
+ name: stringType(),
13726
+ type: stringType(),
13727
+ image: stringType(),
13728
+ createdAt: numberType(),
13729
+ });
13730
+ const bidderInstanceStatusEnum = z.enum(["available", "unavailable"]);
13731
+ const bidderInstanceSchema = objectType({
13732
+ id: stringType(),
13733
+ ipAddress: stringType(),
13734
+ domain: stringType().nullable(),
13735
+ bidderAccounts: arrayType(stringType()),
13736
+ gcp: gcpMetadataSchema,
13737
+ hetzner: hetznerMetadataSchema,
13738
+ status: bidderInstanceStatusEnum,
13739
+ createdAt: numberType(),
13740
+ updatedAt: numberType(),
13741
+ });
13742
+
13611
13743
  const invoiceStripeMetadataLineSchema = objectType({
13612
13744
  description: stringType(),
13613
13745
  amount: numberType(),
@@ -13653,70 +13785,6 @@ const invoiceSchema = objectType({
13653
13785
  updatedAt: numberType(),
13654
13786
  });
13655
13787
 
13656
- const proposalSchema = z.object({
13657
- coverLetter: z.string(),
13658
- questionAnswerPairs: questionAnswerPairSchema.array(),
13659
- });
13660
-
13661
- const agentGenerateProposalRequestSchema = z.object({
13662
- userId: z.string().nullable(),
13663
- organizationId: z.string(),
13664
- campaignId: z.string(),
13665
- job: z.object({
13666
- leadId: z.string(),
13667
- jobId: z.string(),
13668
- title: z.string(),
13669
- description: z.string(),
13670
- questions: z.array(z.string()),
13671
- clientCountry: z.string(),
13672
- }),
13673
- isOverallHighestPriorityCampaign: z.boolean().optional(),
13674
- applyToLeads: z
13675
- .array(z.object({ leadId: z.string(), campaignId: z.string() }))
13676
- .optional(),
13677
- });
13678
- const agentGenerateProposalResponseSchema = z.object({
13679
- coverLetter: z.string(),
13680
- questionAnswerPairs: z.array(z.object({
13681
- question: z.string(),
13682
- answer: z.string(),
13683
- })),
13684
- });
13685
- const agentCalculateSuitabilityRequestSchema = z.object({
13686
- userId: z.string().nullable(),
13687
- organizationId: z.string(),
13688
- campaignId: z.string(),
13689
- lead: leadSchema,
13690
- isOverallHighestPriorityCampaign: z.boolean().optional(),
13691
- applyToLeads: z
13692
- .array(z.object({ leadId: z.string(), campaignId: z.string() }))
13693
- .optional(),
13694
- });
13695
- const agentPickSpecialisedProfileRequestSchema = z.object({
13696
- jobTitle: z.string(),
13697
- jobDescription: z.string(),
13698
- specialisedProfiles: z.array(z.string()),
13699
- });
13700
- const agentPickSpecialisedProfileResponseSchema = z.object({
13701
- profile: z.string(),
13702
- reason: z.string(),
13703
- });
13704
- const suitabilityRatingSchema = z.object({
13705
- rating: z.number(),
13706
- reason: z.string(),
13707
- });
13708
- const jobQualityScoreSchema = z.object({
13709
- rating: z.number(),
13710
- reason: z.string(),
13711
- });
13712
- const agentTaskResponseSchema = z.object({
13713
- result: z.union([suitabilityRatingSchema, proposalSchema]),
13714
- model: z.string(),
13715
- provider: z.string(),
13716
- promptTokens: z.number(),
13717
- completionTokens: z.number(),
13718
- });
13719
-
13720
13788
  const feedEnrichStartedEventMetadata = objectType({
13721
13789
  id: stringType(),
13722
13790
  feedScrapeId: stringType(),
@@ -14041,6 +14109,19 @@ const scraperAccountSwapFailedEventMetadata = scraperAccountSwapStartedEventMeta
14041
14109
  errorMessage: stringType(),
14042
14110
  });
14043
14111
 
14112
+ const sendAlertPayloadSchema = z.object({
14113
+ type: z.union([
14114
+ z.literal("suitability"),
14115
+ z.literal("proposal"),
14116
+ z.literal("bidding"),
14117
+ z.literal("scraper"),
14118
+ ]),
14119
+ organizationId: z.string().nullable(),
14120
+ campaignId: z.string().nullable(),
14121
+ leadId: z.string().nullable(),
14122
+ errorMessage: z.string(),
14123
+ });
14124
+
14044
14125
  const planStripeMetadataSchema = objectType({
14045
14126
  id: stringType().regex(/^prod_[a-zA-Z0-9]+$/),
14046
14127
  name: stringType(),
@@ -14070,7 +14151,6 @@ const planSchema = objectType({
14070
14151
  createdAt: numberType(),
14071
14152
  archivedAt: numberType().nullable(),
14072
14153
  });
14073
- const planSlugEnum = z.enum(['lancer-unlimited-launch-offer']);
14074
14154
 
14075
14155
  const savedSearchSchema = objectType({
14076
14156
  id: numberType().int(),
@@ -14210,6 +14290,138 @@ const systemSchema = objectType({
14210
14290
  prompts: systemPromptSchema,
14211
14291
  });
14212
14292
 
14293
+ const skillSchema = objectType({
14294
+ prettyName: stringType(),
14295
+ uid: stringType(),
14296
+ });
14297
+ const skillWrapperSchema = objectType({
14298
+ skill: skillSchema,
14299
+ uid: stringType(),
14300
+ });
14301
+ const portfolioCategorySchema = objectType({
14302
+ id: stringType().optional(),
14303
+ level1: stringType().optional(),
14304
+ level2: stringType().optional(),
14305
+ });
14306
+ const portfolioItemSchema = objectType({
14307
+ description: stringType().optional(),
14308
+ title: stringType(),
14309
+ videoUrl: stringType().optional(),
14310
+ uid: stringType(),
14311
+ thumbnailUrl: stringType().optional(),
14312
+ publicPortfolioItem: booleanType(),
14313
+ category: portfolioCategorySchema,
14314
+ });
14315
+ const locationSchema = objectType({
14316
+ country: stringType(),
14317
+ state: stringType().optional(),
14318
+ city: stringType().optional(),
14319
+ region: stringType(),
14320
+ subregion: stringType(),
14321
+ timezone: stringType(),
14322
+ zip: stringType().optional(),
14323
+ });
14324
+ const chargeRateSchema = objectType({
14325
+ rawValue: stringType(),
14326
+ currency: stringType(),
14327
+ });
14328
+ const portraitSchema = objectType({
14329
+ portrait: stringType(),
14330
+ });
14331
+ const statsSchema = objectType({
14332
+ hideJss: booleanType(),
14333
+ hideEarnings: booleanType(),
14334
+ topRatedStatus: stringType(),
14335
+ topRatedStatusEx: stringType(),
14336
+ rate: numberType(),
14337
+ earned: numberType(),
14338
+ jobSuccessScore: numberType(),
14339
+ rankInfo: anyType().optional(),
14340
+ totalHours: numberType(),
14341
+ totalHourlyJobs: numberType(),
14342
+ totalFpJobs: numberType(),
14343
+ totalCompletedJobs: numberType(),
14344
+ });
14345
+ const nuxtStateProfileSchema = objectType({
14346
+ title: stringType().optional(),
14347
+ firstName: stringType().optional(),
14348
+ lastName: stringType().optional(),
14349
+ description: stringType().optional(),
14350
+ location: locationSchema.optional(),
14351
+ chargeRate: chargeRateSchema.optional(),
14352
+ portrait: portraitSchema.optional(),
14353
+ profileUrl: stringType().optional(),
14354
+ offerConsultations: booleanType().optional(),
14355
+ jobSummariesAssignmentRids: anyType().optional(),
14356
+ shortName: stringType().optional(),
14357
+ skills: skillWrapperSchema.array().optional(),
14358
+ stats: statsSchema.optional(),
14359
+ portfolioItems: portfolioItemSchema.array().optional(),
14360
+ totalPortfolioItems: numberType().optional(),
14361
+ specializedProfiles: anyType().array().optional(),
14362
+ isDiversityCertified: booleanType().optional(),
14363
+ isBoosted: booleanType().optional(),
14364
+ boosted: booleanType().optional(),
14365
+ boostedWouldHaveBeen: booleanType().optional(),
14366
+ });
14367
+ const identitySchema = objectType({
14368
+ id: stringType().optional(),
14369
+ ciphertext: stringType(),
14370
+ uid: stringType(),
14371
+ });
14372
+ const agencySchema = objectType({
14373
+ orgId: stringType(),
14374
+ ciphertext: stringType(),
14375
+ name: stringType(),
14376
+ classifications: anyType().array(),
14377
+ logo: stringType().optional(),
14378
+ hideEarnings: booleanType(),
14379
+ totalEarnings: numberType(),
14380
+ isAgencyDiversityCertified: anyType().array(),
14381
+ });
14382
+ const optionsSchema = objectType({
14383
+ position: numberType(),
14384
+ });
14385
+ const upworkTalentSchema = objectType({
14386
+ identity: identitySchema,
14387
+ isPibAvailable: booleanType(),
14388
+ profile: nuxtStateProfileSchema,
14389
+ agency: agencySchema,
14390
+ options: optionsSchema,
14391
+ linkedInURL: stringType().nullish(),
14392
+ });
14393
+ const statusSchema = objectType({
14394
+ loading: booleanType(),
14395
+ loaded: booleanType(),
14396
+ failed: booleanType(),
14397
+ });
14398
+ const pagingSchema = objectType({
14399
+ total: numberType(),
14400
+ offset: numberType(),
14401
+ count: numberType(),
14402
+ originTotal: numberType(),
14403
+ pagesTotal: numberType(),
14404
+ page: numberType(),
14405
+ perPage: numberType(),
14406
+ });
14407
+ const flagsSchema = objectType({
14408
+ portfolioSearch: booleanType(),
14409
+ });
14410
+ const nuxtStateProfileSearchSchema = objectType({
14411
+ status: statusSchema,
14412
+ profiles: nuxtStateProfileSchema.array(),
14413
+ currentPage: numberType(),
14414
+ paging: pagingSchema,
14415
+ flags: flagsSchema,
14416
+ searchQueryCache: recordType(anyType()),
14417
+ });
14418
+ const profileSearchNuxtObjectStateSchema = objectType({
14419
+ profilesSearch: nuxtStateProfileSearchSchema,
14420
+ });
14421
+ const profileSearchNuxtObjectSchema = objectType({
14422
+ state: profileSearchNuxtObjectStateSchema,
14423
+ });
14424
+
14213
14425
  const periodTypeSchema = z.union([
14214
14426
  z.literal("weekly"),
14215
14427
  z.literal("monthly"),
@@ -14284,88 +14496,6 @@ const forgotPasswordSchema = objectType({
14284
14496
  email: stringType().email(),
14285
14497
  });
14286
14498
 
14287
- const campaignStatsSchema = z.object({
14288
- contacted: z.number(),
14289
- viewed: z.number(),
14290
- replied: z.number(),
14291
- won: z.number(),
14292
- proposalsGenerated: z.number(),
14293
- leadsAnalyzed: z.number(),
14294
- leadsFailed: z.number(),
14295
- });
14296
- const suitabilityBreakdownSchema = z.object({
14297
- lessThan50: z.number(),
14298
- between50And60: z.number(),
14299
- between60And70: z.number(),
14300
- between70And80: z.number(),
14301
- between80And90: z.number(),
14302
- above90: z.number(),
14303
- });
14304
- const campaignDetailsSchema = z.object({
14305
- id: z.string(),
14306
- name: z.string(),
14307
- status: campaignStatusSchema,
14308
- createdAt: z.number(),
14309
- updatedAt: z.number(),
14310
- stats: campaignStatsSchema,
14311
- suitabilityBreakdown: suitabilityBreakdownSchema,
14312
- });
14313
- const organizationCampaignStatsSchema = z.object({
14314
- organizationId: z.string(),
14315
- organizationName: z.string(),
14316
- organizationType: z.string(),
14317
- tierId: z.string(),
14318
- active: z.boolean(),
14319
- createdAt: z.number(),
14320
- campaignCount: z.number(),
14321
- activeCampaignCount: z.number(),
14322
- totalStats: campaignStatsSchema,
14323
- campaigns: z.array(campaignDetailsSchema),
14324
- });
14325
-
14326
- const sendAlertPayloadSchema = z.object({
14327
- type: z.union([
14328
- z.literal("suitability"),
14329
- z.literal("proposal"),
14330
- z.literal("bidding"),
14331
- z.literal("scraper"),
14332
- ]),
14333
- organizationId: z.string().nullable(),
14334
- campaignId: z.string().nullable(),
14335
- leadId: z.string().nullable(),
14336
- errorMessage: z.string(),
14337
- });
14338
-
14339
- const gcpMetadataSchema = objectType({
14340
- instanceName: stringType(),
14341
- machineType: stringType(),
14342
- zone: stringType(),
14343
- region: stringType(),
14344
- });
14345
- const hetznerMetadataSchema = objectType({
14346
- id: stringType(),
14347
- name: stringType(),
14348
- type: stringType(),
14349
- image: stringType(),
14350
- createdAt: numberType(),
14351
- });
14352
- const bidderInstanceStatusEnum = z.enum(["available", "unavailable"]);
14353
- const bidderInstanceSchema = objectType({
14354
- id: stringType(),
14355
- ipAddress: stringType(),
14356
- domain: stringType().nullable(),
14357
- bidderAccounts: arrayType(stringType()),
14358
- gcp: gcpMetadataSchema,
14359
- hetzner: hetznerMetadataSchema,
14360
- status: bidderInstanceStatusEnum,
14361
- createdAt: numberType(),
14362
- updatedAt: numberType(),
14363
- });
14364
-
14365
- const planSlugToNameMap = {
14366
- [planSlugEnum.enum['lancer-unlimited-launch-offer']]: 'Lancer Unlimited - Launch Offer',
14367
- };
14368
-
14369
14499
  // Main wrapper function
14370
14500
  async function tryCatch(promise) {
14371
14501
  try {
@@ -14973,6 +15103,7 @@ exports.organizationSchema = organizationSchema;
14973
15103
  exports.organizationSettingsSchema = organizationSettingsSchema;
14974
15104
  exports.organizationTierEnum = organizationTierEnum;
14975
15105
  exports.organizationTypeSchema = organizationTypeSchema;
15106
+ exports.organizationUpdateSchema = organizationUpdateSchema;
14976
15107
  exports.pageClosedException = pageClosedException;
14977
15108
  exports.pageContentException = pageContentException;
14978
15109
  exports.parseConnectsException = parseConnectsException;
@@ -14983,12 +15114,13 @@ exports.periodTypeSchema = periodTypeSchema;
14983
15114
  exports.periodUsageSchema = periodUsageSchema;
14984
15115
  exports.planFeatureSchema = planFeatureSchema;
14985
15116
  exports.planSchema = planSchema;
14986
- exports.planSlugEnum = planSlugEnum;
14987
15117
  exports.planSlugToNameMap = planSlugToNameMap;
14988
15118
  exports.planStripeMetadataSchema = planStripeMetadataSchema;
14989
15119
  exports.pluralize = pluralize;
14990
15120
  exports.portfolioSchema = portfolioSchema;
14991
15121
  exports.processFeedPayloadSchema = processFeedPayloadSchema;
15122
+ exports.profileSearchNuxtObjectSchema = profileSearchNuxtObjectSchema;
15123
+ exports.profileSearchNuxtObjectStateSchema = profileSearchNuxtObjectStateSchema;
14992
15124
  exports.projectDurationEnum = projectDurationEnum;
14993
15125
  exports.proposalCompleteEventMetadataSchema = proposalCompleteEventMetadataSchema;
14994
15126
  exports.proposalErrorAlertException = proposalErrorAlertException;
@@ -15072,6 +15204,7 @@ exports.upworkAccountConnectSchema = upworkAccountConnectSchema;
15072
15204
  exports.upworkAccountConnectStatusSchema = upworkAccountConnectStatusSchema;
15073
15205
  exports.upworkJobSchema = upworkJobSchema;
15074
15206
  exports.upworkProfileSchema = upworkProfileSchema;
15207
+ exports.upworkTalentSchema = upworkTalentSchema;
15075
15208
  exports.usageEventMetadataSchema = usageEventMetadataSchema;
15076
15209
  exports.usageEventSchema = usageEventSchema;
15077
15210
  exports.usageEventTypeEnum = usageEventTypeEnum;
@@ -0,0 +1,3 @@
1
+ import { AccountStatus } from '../types/account/account-status';
2
+ export declare const accountStatusOrder: AccountStatus[];
3
+ export declare const accountStatusDisplayMap: Record<AccountStatus, string>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.accountStatusDisplayMap = exports.accountStatusOrder = void 0;
4
+ exports.accountStatusOrder = [
5
+ 'verification_required',
6
+ 'shadow_banned',
7
+ 'healthy',
8
+ 'banned',
9
+ 'suspended',
10
+ ];
11
+ exports.accountStatusDisplayMap = {
12
+ verification_required: 'Verification Required',
13
+ shadow_banned: 'Shadow Banned',
14
+ healthy: 'Healthy',
15
+ banned: 'Banned',
16
+ suspended: 'Suspended',
17
+ };
@@ -0,0 +1,2 @@
1
+ import { CampaignNotificationType } from '../types/campaign/campaign-notifications';
2
+ export declare const CAMPAIGN_NOTIFICATION_TYPES: Record<CampaignNotificationType, string>;
@@ -0,0 +1,2 @@
1
+ import { CampaignNotificationType } from '../schemas/campaign/campaign-webhooks';
2
+ export declare const CAMPAIGN_WEBHOOK_TYPES: Record<CampaignNotificationType, string>;
@@ -0,0 +1,13 @@
1
+ export declare const COLLECTIONS: {
2
+ readonly USERS: "users";
3
+ readonly SETTINGS: "settings";
4
+ readonly CAMPAIGNS: "campaigns";
5
+ readonly LEADS: "leads";
6
+ readonly EVENTS: "events";
7
+ readonly SCRAPER_ACCOUNTS: "scrapers";
8
+ readonly BIDDER_ACCOUNTS: "bidders";
9
+ readonly CAMPAIGN_ACTIVITIES: (userId: string, campaignId: string) => string;
10
+ readonly ORGANIZATIONS: "organizations";
11
+ readonly PROXIES: "proxies";
12
+ readonly TRANSACTIONS: "transactions";
13
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.COLLECTIONS = void 0;
4
+ // Base collection names
5
+ exports.COLLECTIONS = {
6
+ USERS: 'users',
7
+ SETTINGS: 'settings',
8
+ CAMPAIGNS: 'campaigns',
9
+ LEADS: 'leads',
10
+ EVENTS: 'events',
11
+ SCRAPER_ACCOUNTS: 'scrapers',
12
+ BIDDER_ACCOUNTS: 'bidders',
13
+ CAMPAIGN_ACTIVITIES: (userId, campaignId) => `users/${userId}/campaigns/${campaignId}/activities`,
14
+ ORGANIZATIONS: 'organizations',
15
+ PROXIES: 'proxies',
16
+ };
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commonQuestions = void 0;
4
+ exports.commonQuestions = [
5
+ {
6
+ id: 'similar_experience',
7
+ question: 'Describe your recent experience with similar projects',
8
+ placeholder: 'ex: [Answer the question based on case studies, if not certain ask to discuss in DMs]',
9
+ },
10
+ {
11
+ id: 'profile_links',
12
+ question: 'Include a link to your GitHub profile and/or website',
13
+ placeholder: 'ex: [https://github.com/yourusername or https://yourwebsite.com]',
14
+ },
15
+ {
16
+ id: 'frameworks',
17
+ question: 'What frameworks have you worked with?',
18
+ placeholder: 'ex: [NextJS, React, TailwindCSS, etc...]',
19
+ },
20
+ {
21
+ id: 'testing_approach',
22
+ question: 'Describe your approach to testing and improving QA',
23
+ placeholder: 'ex: [We are using test-driven development, and we are using Jest for testing]',
24
+ },
25
+ {
26
+ id: 'certifications',
27
+ question: 'Please list any certifications related to this project',
28
+ placeholder: 'ex: [Certification in React, Certification in NextJS, etc...]',
29
+ },
30
+ {
31
+ id: 'similar_project',
32
+ question: 'What past project or job have you had that is most like this one and why?',
33
+ placeholder: "ex: [Describe a similar project and explain the key similarities... If you can't answer based on the case studies, ask to discuss in DMs]",
34
+ },
35
+ {
36
+ id: 'project_fit',
37
+ question: 'Why do you think you are a good fit for this particular project?',
38
+ placeholder: 'ex: [Explain how your skills and experience match the project requirements...]',
39
+ },
40
+ {
41
+ id: 'job_questions',
42
+ question: 'Do you have any questions about the job description?',
43
+ placeholder: 'ex: [Ask for any clarifications needed about the role or requirements...]',
44
+ },
45
+ {
46
+ id: 'project_questions',
47
+ question: 'What questions do you have about the project?',
48
+ placeholder: 'ex: [Ask about project scope, timeline, team structure...]',
49
+ },
50
+ {
51
+ id: 'project_suggestions',
52
+ question: 'Do you have suggestions to make this project run successfully?',
53
+ placeholder: 'ex: [Ask to discuss in DMs]',
54
+ },
55
+ {
56
+ id: 'company_info',
57
+ question: 'What is your company website URL? . . . Company size?',
58
+ placeholder: 'ex: [https://company.com | Number of employees: ...]',
59
+ },
60
+ ];