lancer-shared 1.2.231 → 1.2.233

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 (291) hide show
  1. package/package.json +1 -1
  2. package/dist/constants/account-status.d.ts +0 -3
  3. package/dist/constants/account-status.js +0 -17
  4. package/dist/constants/campaign-notifications.d.ts +0 -2
  5. package/dist/constants/campaign-webhook-types.d.ts +0 -2
  6. package/dist/constants/collections.d.ts +0 -13
  7. package/dist/constants/collections.js +0 -16
  8. package/dist/constants/common-questions.d.ts +0 -2
  9. package/dist/constants/common-questions.js +0 -60
  10. package/dist/constants/index.js +0 -40
  11. package/dist/constants/job-filter-options.js +0 -268
  12. package/dist/constants/job-status.js +0 -26
  13. package/dist/constants/mappings/countryMapping.js +0 -122
  14. package/dist/constants/mappings/regionMapping.js +0 -242
  15. package/dist/constants/organization.d.ts +0 -2
  16. package/dist/constants/proxies.d.ts +0 -4
  17. package/dist/constants/routes.js +0 -114
  18. package/dist/constants/upwork-accounts.js +0 -21
  19. package/dist/constants/upwork-filters.d.ts +0 -5
  20. package/dist/constants/upwork-filters.js +0 -75
  21. package/dist/schemas/account/account-status.js +0 -11
  22. package/dist/schemas/account/bidder-account.js +0 -37
  23. package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +0 -5
  24. package/dist/schemas/account/index.js +0 -19
  25. package/dist/schemas/account/manager-account.d.ts +0 -116
  26. package/dist/schemas/account/manager-account.js +0 -38
  27. package/dist/schemas/account/scraper-account.js +0 -37
  28. package/dist/schemas/ai/ai-config.d.ts +0 -36
  29. package/dist/schemas/ai/ai-config.js +0 -12
  30. package/dist/schemas/ai/index.d.ts +0 -3
  31. package/dist/schemas/ai/index.js +0 -19
  32. package/dist/schemas/ai/proposal.d.ts +0 -82
  33. package/dist/schemas/ai/proposal.js +0 -16
  34. package/dist/schemas/ai/suitability.d.ts +0 -37
  35. package/dist/schemas/ai/suitability.js +0 -17
  36. package/dist/schemas/ai-config/ai-config.d.ts +0 -39
  37. package/dist/schemas/ai-config/ai-config.js +0 -12
  38. package/dist/schemas/ai-config/index.d.ts +0 -1
  39. package/dist/schemas/ai-config/index.js +0 -17
  40. package/dist/schemas/bid/bid-result.d.ts +0 -30
  41. package/dist/schemas/bid/bid-result.js +0 -15
  42. package/dist/schemas/bid/bid-status.d.ts +0 -30
  43. package/dist/schemas/bid/bid-status.js +0 -15
  44. package/dist/schemas/bid/bid.d.ts +0 -8010
  45. package/dist/schemas/bid/bid.js +0 -36
  46. package/dist/schemas/bid/exceptions/base-exception.d.ts +0 -4
  47. package/dist/schemas/bid/exceptions/cloudflare-challenge-failed.exception.d.ts +0 -5
  48. package/dist/schemas/bid/exceptions/delete-multilogin-profile.exception.d.ts +0 -5
  49. package/dist/schemas/bid/exceptions/dropdown-option-not-present.exception.d.ts +0 -5
  50. package/dist/schemas/bid/exceptions/element-not-clickable.exception.d.ts +0 -5
  51. package/dist/schemas/bid/exceptions/evalaute-element.exception.d.ts +0 -5
  52. package/dist/schemas/bid/exceptions/evaluate-function.exception.d.ts +0 -5
  53. package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +0 -5
  54. package/dist/schemas/bid/exceptions/get-multilogin-browser.exception.d.ts +0 -5
  55. package/dist/schemas/bid/exceptions/incorrect-security-question-answer.exception.d.ts +0 -5
  56. package/dist/schemas/bid/exceptions/index.d.ts +0 -63
  57. package/dist/schemas/bid/exceptions/init-browser.exception.d.ts +0 -5
  58. package/dist/schemas/bid/exceptions/insufficient-connects.exception.d.ts +0 -5
  59. package/dist/schemas/bid/exceptions/invalid-credentials.exception.d.ts +0 -5
  60. package/dist/schemas/bid/exceptions/invalid-job-url.exception.d.ts +0 -5
  61. package/dist/schemas/bid/exceptions/login-failed.exception.d.ts +0 -5
  62. package/dist/schemas/bid/exceptions/multilogin-authentication.exception.d.ts +0 -5
  63. package/dist/schemas/bid/exceptions/navigation-timeout.exception.d.ts +0 -5
  64. package/dist/schemas/bid/exceptions/new-browser-page.exception.d.ts +0 -5
  65. package/dist/schemas/bid/exceptions/new-page.exception.d.ts +0 -5
  66. package/dist/schemas/bid/exceptions/open-new-url.exception.d.ts +0 -15
  67. package/dist/schemas/bid/exceptions/parse-connects.exception.d.ts +0 -5
  68. package/dist/schemas/bid/exceptions/proposal-error-alert.exception.d.ts +0 -5
  69. package/dist/schemas/bid/exceptions/proposal-form-warning-alert.exception.d.ts +0 -5
  70. package/dist/schemas/bid/exceptions/proposal-generation-failed.exception.d.ts +0 -5
  71. package/dist/schemas/bid/exceptions/proposal-submit-failed.exception.d.ts +0 -5
  72. package/dist/schemas/bid/exceptions/pupeteer-conection-error.exception.d.ts +0 -5
  73. package/dist/schemas/bid/exceptions/question-pair-not-matching.exception.d.ts +0 -5
  74. package/dist/schemas/bid/exceptions/select-agency.exception.d.ts +0 -5
  75. package/dist/schemas/bid/exceptions/select-contractor.exception.d.ts +0 -5
  76. package/dist/schemas/bid/exceptions/selector-not-found.exception.d.ts +0 -5
  77. package/dist/schemas/bid/exceptions/typed-value-not-matching.exception.d.ts +0 -5
  78. package/dist/schemas/bid/exceptions/typing-input-field.exception.d.ts +0 -5
  79. package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +0 -5
  80. package/dist/schemas/bid/exceptions/wait-for-function-timeout.exception.d.ts +0 -5
  81. package/dist/schemas/bid/index.d.ts +0 -3
  82. package/dist/schemas/bid/index.js +0 -18
  83. package/dist/schemas/bidding/index.d.ts +0 -1
  84. package/dist/schemas/bidding/index.js +0 -17
  85. package/dist/schemas/bidding/proposal-bidding-status.d.ts +0 -26
  86. package/dist/schemas/bidding/proposal-bidding-status.js +0 -18
  87. package/dist/schemas/bidding/proposal-dto.d.ts +0 -26
  88. package/dist/schemas/bidding/proposal-dto.js +0 -18
  89. package/dist/schemas/campaign/campaign-ai-metrics.js +0 -9
  90. package/dist/schemas/campaign/campaign-analytics.js +0 -41
  91. package/dist/schemas/campaign/campaign-expenses.js +0 -9
  92. package/dist/schemas/campaign/campaign-insights.js +0 -31
  93. package/dist/schemas/campaign/campaign-integrations.d.ts +0 -82
  94. package/dist/schemas/campaign/campaign-integrations.js +0 -16
  95. package/dist/schemas/campaign/campaign-job-count.d.ts +0 -2
  96. package/dist/schemas/campaign/campaign-job-count.js +0 -6
  97. package/dist/schemas/campaign/campaign-notifications.d.ts +0 -9
  98. package/dist/schemas/campaign/campaign.js +0 -44
  99. package/dist/schemas/campaign/index.js +0 -23
  100. package/dist/schemas/campaign/sequence/budget-node.d.ts +0 -294
  101. package/dist/schemas/campaign/sequence/client-size.d.ts +0 -45
  102. package/dist/schemas/campaign/sequence/fixed-budget-node.d.ts +0 -91
  103. package/dist/schemas/campaign/sequence/hire-rate.d.ts +0 -91
  104. package/dist/schemas/campaign/sequence/hourly-budget-node.d.ts +0 -91
  105. package/dist/schemas/campaign/sequence/hourly-rate.d.ts +0 -91
  106. package/dist/schemas/campaign/sequence/payment-type-node.d.ts +0 -45
  107. package/dist/schemas/campaign/sequence/payment-type.d.ts +0 -45
  108. package/dist/schemas/campaign/sequence/start-node.d.ts +0 -16
  109. package/dist/schemas/campaign/sequence/suitability.d.ts +0 -90
  110. package/dist/schemas/chat-message/chat-message.d.ts +0 -31
  111. package/dist/schemas/chat-message/chat-message.js +0 -13
  112. package/dist/schemas/chat-message/index.d.ts +0 -1
  113. package/dist/schemas/chat-message/index.js +0 -17
  114. package/dist/schemas/config/agency-config.d.ts +0 -17
  115. package/dist/schemas/config/agency-config.js +0 -10
  116. package/dist/schemas/config/index.d.ts +0 -1
  117. package/dist/schemas/config/index.js +0 -17
  118. package/dist/schemas/index.js +0 -32
  119. package/dist/schemas/job/feed-job.d.ts +0 -866
  120. package/dist/schemas/job/index.js +0 -19
  121. package/dist/schemas/job/job-details.js +0 -29
  122. package/dist/schemas/job/job-note.d.ts +0 -83
  123. package/dist/schemas/job/job-note.js +0 -30
  124. package/dist/schemas/job/job-pipeline.d.ts +0 -74
  125. package/dist/schemas/job/job-pipeline.js +0 -29
  126. package/dist/schemas/job/job-status.d.ts +0 -3
  127. package/dist/schemas/job/job-status.js +0 -27
  128. package/dist/schemas/job/job-suitability.d.ts +0 -12
  129. package/dist/schemas/job/job-suitability.js +0 -13
  130. package/dist/schemas/job/job.d.ts +0 -1160
  131. package/dist/schemas/job/job.js +0 -90
  132. package/dist/schemas/job/pipeline-job.d.ts +0 -608
  133. package/dist/schemas/job/pipeline-job.js +0 -43
  134. package/dist/schemas/job/upwork-job.d.ts +0 -334
  135. package/dist/schemas/job/upwork-job.js +0 -60
  136. package/dist/schemas/job-filters/index.d.ts +0 -1
  137. package/dist/schemas/job-filters/index.js +0 -17
  138. package/dist/schemas/job-filters/job-filters.d.ts +0 -241
  139. package/dist/schemas/job-filters/job-filters.js +0 -87
  140. package/dist/schemas/knowledge-object/index.d.ts +0 -1
  141. package/dist/schemas/knowledge-object/index.js +0 -17
  142. package/dist/schemas/knowledge-object/knowledge-object.d.ts +0 -128
  143. package/dist/schemas/knowledge-object/knowledge-object.js +0 -47
  144. package/dist/schemas/lead/index.js +0 -19
  145. package/dist/schemas/lead/lead-note.d.ts +0 -83
  146. package/dist/schemas/lead/lead-note.js +0 -30
  147. package/dist/schemas/lead/lead-status.js +0 -26
  148. package/dist/schemas/lead/lead.d.ts +0 -1897
  149. package/dist/schemas/lead/lead.js +0 -143
  150. package/dist/schemas/lead/nuxt.d.ts +0 -1664
  151. package/dist/schemas/logger/index.js +0 -17
  152. package/dist/schemas/logger/log-event.js +0 -66
  153. package/dist/schemas/organization/index.js +0 -17
  154. package/dist/schemas/organization/organization.d.ts +0 -70
  155. package/dist/schemas/organization/organization.js +0 -19
  156. package/dist/schemas/proxy/index.js +0 -17
  157. package/dist/schemas/proxy/proxy.js +0 -23
  158. package/dist/schemas/saved-search/index.js +0 -12
  159. package/dist/schemas/scraper/index.js +0 -18
  160. package/dist/schemas/scraper/scrape-payload.js +0 -16
  161. package/dist/schemas/scraper/scrape-response.d.ts +0 -345
  162. package/dist/schemas/scraper/scrape-response.js +0 -9
  163. package/dist/schemas/scraper/scrape-result.js +0 -23
  164. package/dist/schemas/shared.js +0 -16
  165. package/dist/schemas/time-filter/index.js +0 -9
  166. package/dist/schemas/upwork-account/index.d.ts +0 -3
  167. package/dist/schemas/upwork-account/index.js +0 -19
  168. package/dist/schemas/upwork-account/upwork-account-status.d.ts +0 -2
  169. package/dist/schemas/upwork-account/upwork-account-status.js +0 -11
  170. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +0 -95
  171. package/dist/schemas/upwork-account/upwork-business-manager-account.js +0 -35
  172. package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +0 -92
  173. package/dist/schemas/upwork-account/upwork-scraper-account.js +0 -31
  174. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +0 -90
  175. package/dist/schemas/upwork-account/upwork-scraping-account.js +0 -30
  176. package/dist/schemas/user/index.js +0 -55
  177. package/dist/types/account/account-status.d.ts +0 -3
  178. package/dist/types/account/account-status.js +0 -2
  179. package/dist/types/account/bidder-account.d.ts +0 -7
  180. package/dist/types/account/bidder-account.js +0 -2
  181. package/dist/types/account/index.d.ts +0 -3
  182. package/dist/types/account/index.js +0 -19
  183. package/dist/types/account/manager-account.d.ts +0 -7
  184. package/dist/types/account/manager-account.js +0 -2
  185. package/dist/types/account/scraper-account.d.ts +0 -5
  186. package/dist/types/account/scraper-account.js +0 -2
  187. package/dist/types/ai/ai-config.d.ts +0 -6
  188. package/dist/types/ai/ai-config.js +0 -2
  189. package/dist/types/ai/index.d.ts +0 -3
  190. package/dist/types/ai/index.js +0 -19
  191. package/dist/types/ai/proposal.d.ts +0 -10
  192. package/dist/types/ai/proposal.js +0 -2
  193. package/dist/types/ai/suitability.d.ts +0 -6
  194. package/dist/types/ai/suitability.js +0 -2
  195. package/dist/types/ai-config/ai-config.d.ts +0 -6
  196. package/dist/types/ai-config/ai-config.js +0 -2
  197. package/dist/types/ai-config/index.d.ts +0 -1
  198. package/dist/types/ai-config/index.js +0 -17
  199. package/dist/types/bid/bid-result.d.ts +0 -5
  200. package/dist/types/bid/bid-result.js +0 -2
  201. package/dist/types/bid/bid-status.d.ts +0 -5
  202. package/dist/types/bid/bid-status.js +0 -2
  203. package/dist/types/bid/bid.d.ts +0 -9
  204. package/dist/types/bid/bid.js +0 -2
  205. package/dist/types/bid/index.d.ts +0 -2
  206. package/dist/types/bid/index.js +0 -18
  207. package/dist/types/bidding/index.d.ts +0 -1
  208. package/dist/types/bidding/index.js +0 -17
  209. package/dist/types/bidding/proposal-bidding-status.d.ts +0 -3
  210. package/dist/types/bidding/proposal-bidding-status.js +0 -2
  211. package/dist/types/bidding/proposal-dto.d.ts +0 -3
  212. package/dist/types/bidding/proposal-dto.js +0 -2
  213. package/dist/types/campaign/campaign-analytics.d.ts +0 -7
  214. package/dist/types/campaign/campaign-analytics.js +0 -2
  215. package/dist/types/campaign/campaign-expenses.d.ts +0 -3
  216. package/dist/types/campaign/campaign-expenses.js +0 -2
  217. package/dist/types/campaign/campaign-insights.d.ts +0 -7
  218. package/dist/types/campaign/campaign-insights.js +0 -2
  219. package/dist/types/campaign/campaign-integrations.d.ts +0 -6
  220. package/dist/types/campaign/campaign-integrations.js +0 -2
  221. package/dist/types/campaign/campaign-job-count.d.ts +0 -4
  222. package/dist/types/campaign/campaign-job-count.js +0 -2
  223. package/dist/types/campaign/campaign-notifications.d.ts +0 -7
  224. package/dist/types/campaign/campaign.d.ts +0 -13
  225. package/dist/types/campaign/campaign.js +0 -2
  226. package/dist/types/campaign/index.d.ts +0 -2
  227. package/dist/types/campaign/index.js +0 -22
  228. package/dist/types/chat-message/chat-message.d.ts +0 -4
  229. package/dist/types/chat-message/chat-message.js +0 -2
  230. package/dist/types/chat-message/index.d.ts +0 -1
  231. package/dist/types/chat-message/index.js +0 -17
  232. package/dist/types/config/agency-config.d.ts +0 -4
  233. package/dist/types/config/agency-config.js +0 -2
  234. package/dist/types/config/index.d.ts +0 -1
  235. package/dist/types/config/index.js +0 -17
  236. package/dist/types/index.d.ts +0 -15
  237. package/dist/types/index.js +0 -29
  238. package/dist/types/job/index.d.ts +0 -48
  239. package/dist/types/job/index.js +0 -19
  240. package/dist/types/job/job-details.d.ts +0 -36
  241. package/dist/types/job/job-details.js +0 -2
  242. package/dist/types/job/job-note.d.ts +0 -10
  243. package/dist/types/job/job-note.js +0 -2
  244. package/dist/types/job/job-pipeline.d.ts +0 -4
  245. package/dist/types/job/job-pipeline.js +0 -2
  246. package/dist/types/job/job-status.d.ts +0 -5
  247. package/dist/types/job/job-status.js +0 -12
  248. package/dist/types/job/job-suitability.d.ts +0 -3
  249. package/dist/types/job/job-suitability.js +0 -2
  250. package/dist/types/job/job.d.ts +0 -36
  251. package/dist/types/job/job.js +0 -2
  252. package/dist/types/job/nuxt.d.ts +0 -4
  253. package/dist/types/job-filters/index.d.ts +0 -1
  254. package/dist/types/job-filters/index.js +0 -17
  255. package/dist/types/job-filters/job-filters.d.ts +0 -4
  256. package/dist/types/job-filters/job-filters.js +0 -2
  257. package/dist/types/knowledge-object/index.d.ts +0 -1
  258. package/dist/types/knowledge-object/index.js +0 -17
  259. package/dist/types/knowledge-object/knowledge-object.d.ts +0 -4
  260. package/dist/types/knowledge-object/knowledge-object.js +0 -2
  261. package/dist/types/logger/index.d.ts +0 -1
  262. package/dist/types/logger/index.js +0 -17
  263. package/dist/types/logger/log-event.d.ts +0 -14
  264. package/dist/types/logger/log-event.js +0 -2
  265. package/dist/types/saved-search/index.d.ts +0 -6
  266. package/dist/types/saved-search/index.js +0 -2
  267. package/dist/types/scraper/index.d.ts +0 -2
  268. package/dist/types/scraper/index.js +0 -18
  269. package/dist/types/scraper/scrape-payload.d.ts +0 -10
  270. package/dist/types/scraper/scrape-payload.js +0 -2
  271. package/dist/types/scraper/scrape-response.d.ts +0 -4
  272. package/dist/types/scraper/scrape-response.js +0 -2
  273. package/dist/types/scraper/scrape-result.d.ts +0 -8
  274. package/dist/types/scraper/scrape-result.js +0 -2
  275. package/dist/types/shared.d.ts +0 -8
  276. package/dist/types/time-filter/index.d.ts +0 -3
  277. package/dist/types/time-filter/index.js +0 -2
  278. package/dist/types/transaction/index.d.ts +0 -4
  279. package/dist/types/upwork-account/index.d.ts +0 -3
  280. package/dist/types/upwork-account/index.js +0 -19
  281. package/dist/types/upwork-account/upwork-account-status.d.ts +0 -3
  282. package/dist/types/upwork-account/upwork-account-status.js +0 -2
  283. package/dist/types/upwork-account/upwork-business-manager-account.d.ts +0 -7
  284. package/dist/types/upwork-account/upwork-business-manager-account.js +0 -2
  285. package/dist/types/upwork-account/upwork-scraping-account.d.ts +0 -5
  286. package/dist/types/upwork-account/upwork-scraping-account.js +0 -2
  287. package/dist/types/usage/index.d.ts +0 -6
  288. package/dist/types/user/index.d.ts +0 -15
  289. package/dist/types/user/index.js +0 -2
  290. package/dist/utils/index.js +0 -17
  291. package/dist/utils/try-catch.js +0 -25
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./log-event"), exports);
@@ -1,66 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.logEventSchema = exports.LogEventTypeEnum = void 0;
4
- const zod_1 = require("zod");
5
- exports.LogEventTypeEnum = zod_1.z.enum([
6
- // Scraper Events
7
- "scraperStarted",
8
- "scraperCompleted",
9
- "jobScraped",
10
- "jobsIndexed",
11
- "jobDuplicateSkipped",
12
- "scraperFailed",
13
- "userProfileScrapingStarted",
14
- "userProfileScrapingComplete",
15
- "userProfileScrapingFailed",
16
- // Job Sync & Campaign Matching
17
- "jobSyncPublished",
18
- "jobSyncReceived",
19
- "leadsCreatedAndSynced",
20
- // Suitability Events
21
- "suitabilityPending",
22
- "suitabilityProcessing",
23
- "suitabilityComplete",
24
- "suitabilityFailed",
25
- "manualSuitabilityAnalyzed",
26
- // Proposal Events
27
- "proposalProcessing",
28
- "proposalComplete",
29
- "proposalFailed",
30
- "manualProposalGenerated",
31
- // Bidding Events
32
- "biddingProcessing",
33
- "biddingComplete",
34
- "biddingFailed",
35
- "biddingSkipped",
36
- "biddingPending",
37
- // System/Generic Events
38
- "errorLogged",
39
- "cloudTaskRetry",
40
- "manualLeadEdited",
41
- "leadArchived",
42
- "auditTrailLogged",
43
- // Knowledge Base Events
44
- "knowledgeBaseGenerationComplete",
45
- "knowledgeBaseGenerationFailed",
46
- ]);
47
- exports.logEventSchema = zod_1.z.object({
48
- // The type of event (use a z.enum if possible)
49
- type: exports.LogEventTypeEnum, // e.g. "suitability-failed", "proposal-generated"
50
- // The service that triggered the event
51
- source: zod_1.z.string(), // e.g. "lancer-agents", "lancer-bidding"
52
- // Optional: Allow logging non-lead events in the future
53
- resourceType: zod_1.z.string().default("lead"), // e.g. "lead", "campaign", "user"
54
- // ID of the resource (primary entity affected)
55
- resourceId: zod_1.z.string().nullable(), // fallback if leadId is not applicable
56
- // Lead-level metadata
57
- leadId: zod_1.z.string().nullable(),
58
- campaignId: zod_1.z.string().nullable(),
59
- userId: zod_1.z.string().nullable(),
60
- // Reason or message for the event
61
- reason: zod_1.z.string().nullable(),
62
- // Generic metadata (stacktrace, score, raw request, etc.)
63
- metadata: zod_1.z.record(zod_1.z.unknown()).nullable(),
64
- // Optional timestamp override
65
- timestamp: zod_1.z.number(),
66
- });
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./organization"), exports);
@@ -1,70 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const bidConfigSchema: z.ZodObject<{
3
- agencyName: z.ZodNullable<z.ZodString>;
4
- bidderId: z.ZodNullable<z.ZodString>;
5
- contractorName: z.ZodNullable<z.ZodString>;
6
- specialisedProfile: z.ZodNullable<z.ZodString>;
7
- }, "strip", z.ZodTypeAny, {
8
- agencyName: string | null;
9
- bidderId: string | null;
10
- contractorName: string | null;
11
- specialisedProfile: string | null;
12
- }, {
13
- agencyName: string | null;
14
- bidderId: string | null;
15
- contractorName: string | null;
16
- specialisedProfile: string | null;
17
- }>;
18
- export declare const organizationTypeSchema: z.ZodEnum<["agency", "freelancer"]>;
19
- export declare const organizationSchema: z.ZodObject<{
20
- id: z.ZodString;
21
- name: z.ZodString;
22
- type: z.ZodEnum<["agency", "freelancer"]>;
23
- bidConfig: z.ZodObject<{
24
- agencyName: z.ZodNullable<z.ZodString>;
25
- bidderId: z.ZodNullable<z.ZodString>;
26
- contractorName: z.ZodNullable<z.ZodString>;
27
- specialisedProfile: z.ZodNullable<z.ZodString>;
28
- }, "strip", z.ZodTypeAny, {
29
- agencyName: string | null;
30
- bidderId: string | null;
31
- contractorName: string | null;
32
- specialisedProfile: string | null;
33
- }, {
34
- agencyName: string | null;
35
- bidderId: string | null;
36
- contractorName: string | null;
37
- specialisedProfile: string | null;
38
- }>;
39
- createdAt: z.ZodDate;
40
- updatedAt: z.ZodDate;
41
- }, "strip", z.ZodTypeAny, {
42
- type: "agency" | "freelancer";
43
- id: string;
44
- name: string;
45
- bidConfig: {
46
- agencyName: string | null;
47
- bidderId: string | null;
48
- contractorName: string | null;
49
- specialisedProfile: string | null;
50
- };
51
- createdAt: Date;
52
- updatedAt: Date;
53
- }, {
54
- type: "agency" | "freelancer";
55
- id: string;
56
- name: string;
57
- bidConfig: {
58
- agencyName: string | null;
59
- bidderId: string | null;
60
- contractorName: string | null;
61
- specialisedProfile: string | null;
62
- };
63
- createdAt: Date;
64
- updatedAt: Date;
65
- }>;
66
- export interface Organization extends z.infer<typeof organizationSchema> {
67
- }
68
- export interface BidConfig extends z.infer<typeof bidConfigSchema> {
69
- }
70
- export type OrganizationType = z.infer<typeof organizationTypeSchema>;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.organizationSchema = exports.organizationTypeSchema = exports.bidConfigSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.bidConfigSchema = zod_1.z.object({
6
- agencyName: zod_1.z.string().nullable(),
7
- bidderId: zod_1.z.string().nullable(),
8
- contractorName: zod_1.z.string().nullable(),
9
- specialisedProfile: zod_1.z.string().nullable(),
10
- });
11
- exports.organizationTypeSchema = zod_1.z.enum(['agency', 'freelancer']);
12
- exports.organizationSchema = zod_1.z.object({
13
- id: zod_1.z.string(),
14
- name: zod_1.z.string(),
15
- type: exports.organizationTypeSchema,
16
- bidConfig: exports.bidConfigSchema,
17
- createdAt: zod_1.z.date(),
18
- updatedAt: zod_1.z.date(),
19
- });
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./proxy"), exports);
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.externalProxySchema = exports.proxySchema = exports.proxyCountrySchema = exports.proxyProviderSchema = exports.proxyStatusSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.proxyStatusSchema = zod_1.z.enum(['ready', 'pending', 'to_replace']);
6
- exports.proxyProviderSchema = zod_1.z.enum(['webshare']);
7
- exports.proxyCountrySchema = zod_1.z.enum(['USA']);
8
- exports.proxySchema = zod_1.z.object({
9
- id: zod_1.z.string(),
10
- externalId: zod_1.z.string(),
11
- host: zod_1.z.string(),
12
- port: zod_1.z.number(),
13
- username: zod_1.z.string(),
14
- password: zod_1.z.string(),
15
- provider: exports.proxyProviderSchema,
16
- country: exports.proxyCountrySchema,
17
- status: exports.proxyStatusSchema,
18
- bidderId: zod_1.z.string().nullable(),
19
- });
20
- exports.externalProxySchema = exports.proxySchema.omit({
21
- id: true,
22
- bidderId: true,
23
- });
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.savedSearchSchema = void 0;
4
- const zod_1 = require("zod");
5
- const shared_1 = require("../shared");
6
- exports.savedSearchSchema = (0, zod_1.object)({
7
- id: (0, zod_1.number)().int(),
8
- name: (0, zod_1.string)(),
9
- url: (0, zod_1.string)(),
10
- createdAt: (0, zod_1.date)(),
11
- isActive: shared_1.booleanSchema,
12
- });
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./scrape-payload"), exports);
18
- __exportStar(require("./scrape-result"), exports);
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scrapeUserProfilePayloadSchema = exports.scrapePayloadSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.scrapePayloadSchema = zod_1.z.object({
6
- latestJobsUrls: zod_1.z.array(zod_1.z.string()),
7
- cookies: zod_1.z.array(zod_1.z.any()),
8
- username: zod_1.z.string(),
9
- password: zod_1.z.string(),
10
- });
11
- exports.scrapeUserProfilePayloadSchema = zod_1.z.object({
12
- profileUrl: zod_1.z.string(),
13
- cookies: zod_1.z.array(zod_1.z.any()),
14
- username: zod_1.z.string(),
15
- password: zod_1.z.string(),
16
- });
@@ -1,345 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const scrapeResponseSchema: z.ZodObject<{
3
- jobs: z.ZodArray<z.ZodObject<{
4
- id: z.ZodNullable<z.ZodString>;
5
- createdAt: z.ZodNullable<z.ZodNumber>;
6
- title: z.ZodNullable<z.ZodString>;
7
- category: z.ZodNullable<z.ZodString>;
8
- skills: z.ZodNullable<z.ZodArray<z.ZodObject<{
9
- name: z.ZodString;
10
- }, "strip", z.ZodTypeAny, {
11
- name: string;
12
- }, {
13
- name: string;
14
- }>, "many">>;
15
- datetime: z.ZodNullable<z.ZodNumber>;
16
- description: z.ZodNullable<z.ZodString>;
17
- descriptionLength: z.ZodNullable<z.ZodNumber>;
18
- connectsRequired: z.ZodNullable<z.ZodNumber>;
19
- projectType: z.ZodNullable<z.ZodString>;
20
- projectDuration: z.ZodNullable<z.ZodString>;
21
- questions: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
22
- jobUrl: z.ZodNullable<z.ZodString>;
23
- metadata: z.ZodNullable<z.ZodObject<{
24
- hours: z.ZodNullable<z.ZodString>;
25
- duration: z.ZodNullable<z.ZodString>;
26
- experienceLevel: z.ZodNullable<z.ZodString>;
27
- hourlyRate: z.ZodNullable<z.ZodObject<{
28
- min: z.ZodNullable<z.ZodNumber>;
29
- max: z.ZodNullable<z.ZodNumber>;
30
- }, "strip", z.ZodTypeAny, {
31
- max: number | null;
32
- min: number | null;
33
- }, {
34
- max: number | null;
35
- min: number | null;
36
- }>>;
37
- paymentType: z.ZodNullable<z.ZodString>;
38
- fixedPrice: z.ZodNullable<z.ZodNumber>;
39
- }, "strip", z.ZodTypeAny, {
40
- hours: string | null;
41
- duration: string | null;
42
- experienceLevel: string | null;
43
- hourlyRate: {
44
- max: number | null;
45
- min: number | null;
46
- } | null;
47
- paymentType: string | null;
48
- fixedPrice: number | null;
49
- }, {
50
- hours: string | null;
51
- duration: string | null;
52
- experienceLevel: string | null;
53
- hourlyRate: {
54
- max: number | null;
55
- min: number | null;
56
- } | null;
57
- paymentType: string | null;
58
- fixedPrice: number | null;
59
- }>>;
60
- clientInfo: z.ZodNullable<z.ZodObject<{
61
- isPaymentVerified: z.ZodNullable<z.ZodBoolean>;
62
- numberOfReviews: z.ZodNullable<z.ZodNumber>;
63
- rating: z.ZodNullable<z.ZodNumber>;
64
- country: z.ZodNullable<z.ZodString>;
65
- region: z.ZodNullable<z.ZodString>;
66
- jobsPosted: z.ZodNullable<z.ZodNumber>;
67
- totalSpent: z.ZodNullable<z.ZodNumber>;
68
- numberOfHires: z.ZodNullable<z.ZodNumber>;
69
- activeEngagements: z.ZodNullable<z.ZodNumber>;
70
- openJobs: z.ZodNullable<z.ZodNumber>;
71
- hireRate: z.ZodNullable<z.ZodNumber>;
72
- memberSince: z.ZodNullable<z.ZodString>;
73
- companyIndustry: z.ZodNullable<z.ZodString>;
74
- companySize: z.ZodNullable<z.ZodString>;
75
- enterpriseClient: z.ZodNullable<z.ZodBoolean>;
76
- }, "strip", z.ZodTypeAny, {
77
- country: string | null;
78
- region: string | null;
79
- rating: number | null;
80
- isPaymentVerified: boolean | null;
81
- numberOfReviews: number | null;
82
- jobsPosted: number | null;
83
- totalSpent: number | null;
84
- numberOfHires: number | null;
85
- activeEngagements: number | null;
86
- openJobs: number | null;
87
- hireRate: number | null;
88
- memberSince: string | null;
89
- companyIndustry: string | null;
90
- companySize: string | null;
91
- enterpriseClient: boolean | null;
92
- }, {
93
- country: string | null;
94
- region: string | null;
95
- rating: number | null;
96
- isPaymentVerified: boolean | null;
97
- numberOfReviews: number | null;
98
- jobsPosted: number | null;
99
- totalSpent: number | null;
100
- numberOfHires: number | null;
101
- activeEngagements: number | null;
102
- openJobs: number | null;
103
- hireRate: number | null;
104
- memberSince: string | null;
105
- companyIndustry: string | null;
106
- companySize: string | null;
107
- enterpriseClient: boolean | null;
108
- }>>;
109
- vendorQualifications: z.ZodNullable<z.ZodObject<{
110
- location: z.ZodNullable<z.ZodString>;
111
- talentType: z.ZodNullable<z.ZodEnum<["Agency", "Independent", "unspecified"]>>;
112
- englishLevel: z.ZodNullable<z.ZodString>;
113
- minimumEarnings: z.ZodNullable<z.ZodNumber>;
114
- jobSuccessScore: z.ZodNullable<z.ZodString>;
115
- }, "strip", z.ZodTypeAny, {
116
- location: string | null;
117
- talentType: "unspecified" | "Agency" | "Independent" | null;
118
- englishLevel: string | null;
119
- minimumEarnings: number | null;
120
- jobSuccessScore: string | null;
121
- }, {
122
- location: string | null;
123
- talentType: "unspecified" | "Agency" | "Independent" | null;
124
- englishLevel: string | null;
125
- minimumEarnings: number | null;
126
- jobSuccessScore: string | null;
127
- }>>;
128
- processed: z.ZodNullable<z.ZodBoolean>;
129
- }, "strip", z.ZodTypeAny, {
130
- id: string | null;
131
- title: string | null;
132
- metadata: {
133
- hours: string | null;
134
- duration: string | null;
135
- experienceLevel: string | null;
136
- hourlyRate: {
137
- max: number | null;
138
- min: number | null;
139
- } | null;
140
- paymentType: string | null;
141
- fixedPrice: number | null;
142
- } | null;
143
- description: string | null;
144
- datetime: number | null;
145
- createdAt: number | null;
146
- category: string | null;
147
- skills: {
148
- name: string;
149
- }[] | null;
150
- descriptionLength: number | null;
151
- connectsRequired: number | null;
152
- projectType: string | null;
153
- projectDuration: string | null;
154
- questions: string[] | null;
155
- jobUrl: string | null;
156
- clientInfo: {
157
- country: string | null;
158
- region: string | null;
159
- rating: number | null;
160
- isPaymentVerified: boolean | null;
161
- numberOfReviews: number | null;
162
- jobsPosted: number | null;
163
- totalSpent: number | null;
164
- numberOfHires: number | null;
165
- activeEngagements: number | null;
166
- openJobs: number | null;
167
- hireRate: number | null;
168
- memberSince: string | null;
169
- companyIndustry: string | null;
170
- companySize: string | null;
171
- enterpriseClient: boolean | null;
172
- } | null;
173
- vendorQualifications: {
174
- location: string | null;
175
- talentType: "unspecified" | "Agency" | "Independent" | null;
176
- englishLevel: string | null;
177
- minimumEarnings: number | null;
178
- jobSuccessScore: string | null;
179
- } | null;
180
- processed: boolean | null;
181
- }, {
182
- id: string | null;
183
- title: string | null;
184
- metadata: {
185
- hours: string | null;
186
- duration: string | null;
187
- experienceLevel: string | null;
188
- hourlyRate: {
189
- max: number | null;
190
- min: number | null;
191
- } | null;
192
- paymentType: string | null;
193
- fixedPrice: number | null;
194
- } | null;
195
- description: string | null;
196
- datetime: number | null;
197
- createdAt: number | null;
198
- category: string | null;
199
- skills: {
200
- name: string;
201
- }[] | null;
202
- descriptionLength: number | null;
203
- connectsRequired: number | null;
204
- projectType: string | null;
205
- projectDuration: string | null;
206
- questions: string[] | null;
207
- jobUrl: string | null;
208
- clientInfo: {
209
- country: string | null;
210
- region: string | null;
211
- rating: number | null;
212
- isPaymentVerified: boolean | null;
213
- numberOfReviews: number | null;
214
- jobsPosted: number | null;
215
- totalSpent: number | null;
216
- numberOfHires: number | null;
217
- activeEngagements: number | null;
218
- openJobs: number | null;
219
- hireRate: number | null;
220
- memberSince: string | null;
221
- companyIndustry: string | null;
222
- companySize: string | null;
223
- enterpriseClient: boolean | null;
224
- } | null;
225
- vendorQualifications: {
226
- location: string | null;
227
- talentType: "unspecified" | "Agency" | "Independent" | null;
228
- englishLevel: string | null;
229
- minimumEarnings: number | null;
230
- jobSuccessScore: string | null;
231
- } | null;
232
- processed: boolean | null;
233
- }>, "many">;
234
- cookies: z.ZodArray<z.ZodAny, "many">;
235
- }, "strip", z.ZodTypeAny, {
236
- jobs: {
237
- id: string | null;
238
- title: string | null;
239
- metadata: {
240
- hours: string | null;
241
- duration: string | null;
242
- experienceLevel: string | null;
243
- hourlyRate: {
244
- max: number | null;
245
- min: number | null;
246
- } | null;
247
- paymentType: string | null;
248
- fixedPrice: number | null;
249
- } | null;
250
- description: string | null;
251
- datetime: number | null;
252
- createdAt: number | null;
253
- category: string | null;
254
- skills: {
255
- name: string;
256
- }[] | null;
257
- descriptionLength: number | null;
258
- connectsRequired: number | null;
259
- projectType: string | null;
260
- projectDuration: string | null;
261
- questions: string[] | null;
262
- jobUrl: string | null;
263
- clientInfo: {
264
- country: string | null;
265
- region: string | null;
266
- rating: number | null;
267
- isPaymentVerified: boolean | null;
268
- numberOfReviews: number | null;
269
- jobsPosted: number | null;
270
- totalSpent: number | null;
271
- numberOfHires: number | null;
272
- activeEngagements: number | null;
273
- openJobs: number | null;
274
- hireRate: number | null;
275
- memberSince: string | null;
276
- companyIndustry: string | null;
277
- companySize: string | null;
278
- enterpriseClient: boolean | null;
279
- } | null;
280
- vendorQualifications: {
281
- location: string | null;
282
- talentType: "unspecified" | "Agency" | "Independent" | null;
283
- englishLevel: string | null;
284
- minimumEarnings: number | null;
285
- jobSuccessScore: string | null;
286
- } | null;
287
- processed: boolean | null;
288
- }[];
289
- cookies: any[];
290
- }, {
291
- jobs: {
292
- id: string | null;
293
- title: string | null;
294
- metadata: {
295
- hours: string | null;
296
- duration: string | null;
297
- experienceLevel: string | null;
298
- hourlyRate: {
299
- max: number | null;
300
- min: number | null;
301
- } | null;
302
- paymentType: string | null;
303
- fixedPrice: number | null;
304
- } | null;
305
- description: string | null;
306
- datetime: number | null;
307
- createdAt: number | null;
308
- category: string | null;
309
- skills: {
310
- name: string;
311
- }[] | null;
312
- descriptionLength: number | null;
313
- connectsRequired: number | null;
314
- projectType: string | null;
315
- projectDuration: string | null;
316
- questions: string[] | null;
317
- jobUrl: string | null;
318
- clientInfo: {
319
- country: string | null;
320
- region: string | null;
321
- rating: number | null;
322
- isPaymentVerified: boolean | null;
323
- numberOfReviews: number | null;
324
- jobsPosted: number | null;
325
- totalSpent: number | null;
326
- numberOfHires: number | null;
327
- activeEngagements: number | null;
328
- openJobs: number | null;
329
- hireRate: number | null;
330
- memberSince: string | null;
331
- companyIndustry: string | null;
332
- companySize: string | null;
333
- enterpriseClient: boolean | null;
334
- } | null;
335
- vendorQualifications: {
336
- location: string | null;
337
- talentType: "unspecified" | "Agency" | "Independent" | null;
338
- englishLevel: string | null;
339
- minimumEarnings: number | null;
340
- jobSuccessScore: string | null;
341
- } | null;
342
- processed: boolean | null;
343
- }[];
344
- cookies: any[];
345
- }>;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scrapeResponseSchema = void 0;
4
- const zod_1 = require("zod");
5
- const job_1 = require("../job");
6
- exports.scrapeResponseSchema = zod_1.z.object({
7
- jobs: zod_1.z.array(job_1.upworkJobSchema),
8
- cookies: zod_1.z.array(zod_1.z.any()),
9
- });
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scrapeUserProfileResultSchema = exports.scrapeResultSchema = exports.regionSchema = void 0;
4
- const zod_1 = require("zod");
5
- const lead_1 = require("../lead");
6
- const user_1 = require("../user");
7
- exports.regionSchema = zod_1.z.union([
8
- zod_1.z.literal("USOnly"),
9
- zod_1.z.literal("UKOnly"),
10
- zod_1.z.literal("Worldwide"),
11
- ]);
12
- exports.scrapeResultSchema = zod_1.z.object({
13
- jobs: zod_1.z.array(lead_1.upworkJobSchema),
14
- cookies: zod_1.z.array(zod_1.z.any()),
15
- region: exports.regionSchema,
16
- usAccountCookies: zod_1.z.array(zod_1.z.any()).optional(),
17
- ukAccountCookies: zod_1.z.array(zod_1.z.any()).optional(),
18
- });
19
- exports.scrapeUserProfileResultSchema = zod_1.z.object({
20
- success: zod_1.z.boolean(),
21
- message: zod_1.z.string(),
22
- data: user_1.upworkProfileSchema,
23
- });
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.passwordSchema = exports.dateSchema = exports.booleanSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.booleanSchema = zod_1.z
6
- .union([zod_1.z.boolean(), zod_1.z.literal("true"), zod_1.z.literal("false")])
7
- .transform((value) => value === true || value === "true");
8
- const dateSchema = (params = {}) => zod_1.coerce.date(Object.assign({}, params));
9
- exports.dateSchema = dateSchema;
10
- exports.passwordSchema = (0, zod_1.string)()
11
- .min(8, "Password must be at least 8 characters long.")
12
- .max(255, "Password must be at most 255 characters long.")
13
- .refine((password) => /[a-z]/.test(password), "Password must contain at least one lowercase letter.")
14
- .refine((password) => /[A-Z]/.test(password), "Password must contain at least one uppercase letter.")
15
- .refine((password) => /\d/.test(password), "Password must contain at least one number.")
16
- .refine((password) => /[\W_]/.test(password), "Password must contain at least one symbol.");