lancer-shared 1.2.37 → 1.2.39

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 (209) hide show
  1. package/dist/bundle.cjs.js +9 -14
  2. package/dist/constants/account-status.d.ts +3 -0
  3. package/dist/constants/account-status.js +17 -0
  4. package/dist/constants/collections.js +13 -11
  5. package/dist/constants/common-questions.js +4 -1
  6. package/dist/constants/index.js +32 -10
  7. package/dist/constants/job-filter-options.js +4 -1
  8. package/dist/constants/job-status.js +12 -7
  9. package/dist/constants/mappings/countryMapping.js +3 -1
  10. package/dist/constants/mappings/regionMapping.js +3 -1
  11. package/dist/constants/organization.d.ts +2 -2
  12. package/dist/constants/proxies.d.ts +4 -0
  13. package/dist/constants/routes.js +37 -39
  14. package/dist/constants/upwork-accounts.js +6 -3
  15. package/dist/constants/upwork-filters.d.ts +5 -0
  16. package/dist/constants/upwork-filters.js +75 -0
  17. package/dist/index.js +20 -4
  18. package/dist/schemas/account/account-status.js +5 -2
  19. package/dist/schemas/account/bidder-account.d.ts +9 -10
  20. package/dist/schemas/account/bidder-account.js +24 -22
  21. package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +5 -0
  22. package/dist/schemas/account/index.js +19 -3
  23. package/dist/schemas/account/manager-account.d.ts +116 -0
  24. package/dist/schemas/account/manager-account.js +38 -0
  25. package/dist/schemas/account/scraper-account.d.ts +2 -6
  26. package/dist/schemas/account/scraper-account.js +24 -21
  27. package/dist/schemas/ai/ai-config.js +11 -8
  28. package/dist/schemas/ai/index.js +19 -3
  29. package/dist/schemas/ai/proposal.js +13 -10
  30. package/dist/schemas/ai/suitability.js +11 -8
  31. package/dist/schemas/ai-config/ai-config.d.ts +39 -0
  32. package/dist/schemas/ai-config/ai-config.js +12 -0
  33. package/dist/schemas/ai-config/index.d.ts +1 -0
  34. package/dist/schemas/ai-config/index.js +17 -0
  35. package/dist/schemas/bid/bid-result.js +13 -9
  36. package/dist/schemas/bid/bid-status.d.ts +30 -0
  37. package/dist/schemas/bid/bid-status.js +15 -0
  38. package/dist/schemas/bid/bid.js +30 -29
  39. package/dist/schemas/bid/exceptions/base-exception.d.ts +4 -0
  40. package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +5 -0
  41. package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +5 -0
  42. package/dist/schemas/bid/index.js +18 -2
  43. package/dist/schemas/bidding/index.d.ts +1 -0
  44. package/dist/schemas/bidding/index.js +17 -0
  45. package/dist/schemas/bidding/proposal-bidding-status.d.ts +26 -0
  46. package/dist/schemas/bidding/proposal-bidding-status.js +18 -0
  47. package/dist/schemas/bidding/proposal-dto.d.ts +26 -0
  48. package/dist/schemas/bidding/proposal-dto.js +18 -0
  49. package/dist/schemas/campaign/campaign-ai-metrics.js +8 -5
  50. package/dist/schemas/campaign/campaign-analytics.d.ts +0 -8
  51. package/dist/schemas/campaign/campaign-analytics.js +31 -32
  52. package/dist/schemas/campaign/campaign-expenses.js +8 -5
  53. package/dist/schemas/campaign/campaign-insights.js +30 -30
  54. package/dist/schemas/campaign/campaign-integrations.d.ts +0 -5
  55. package/dist/schemas/campaign/campaign-integrations.js +13 -10
  56. package/dist/schemas/campaign/campaign-job-count.js +6 -3
  57. package/dist/schemas/campaign/campaign.d.ts +1 -22
  58. package/dist/schemas/campaign/campaign.js +35 -32
  59. package/dist/schemas/campaign/index.js +23 -7
  60. package/dist/schemas/chat-message/chat-message.js +10 -7
  61. package/dist/schemas/chat-message/index.js +17 -1
  62. package/dist/schemas/config/agency-config.js +9 -6
  63. package/dist/schemas/config/index.js +17 -1
  64. package/dist/schemas/index.js +32 -17
  65. package/dist/schemas/job/index.js +19 -0
  66. package/dist/schemas/job/job-details.d.ts +335 -0
  67. package/dist/schemas/job/job-details.js +29 -0
  68. package/dist/schemas/job/job-note.d.ts +83 -0
  69. package/dist/schemas/job/job-note.js +30 -0
  70. package/dist/schemas/job/job-pipeline.d.ts +74 -0
  71. package/dist/schemas/job/job-pipeline.js +29 -0
  72. package/dist/schemas/job/job-status.d.ts +3 -0
  73. package/dist/schemas/job/job-status.js +27 -0
  74. package/dist/schemas/job/job-suitability.d.ts +12 -0
  75. package/dist/schemas/job/job-suitability.js +13 -0
  76. package/dist/schemas/job/job.d.ts +1160 -0
  77. package/dist/schemas/job/job.js +90 -0
  78. package/dist/schemas/job/pipeline-job.d.ts +608 -0
  79. package/dist/schemas/job/pipeline-job.js +43 -0
  80. package/dist/schemas/job/upwork-job.d.ts +334 -0
  81. package/dist/schemas/job/upwork-job.js +60 -0
  82. package/dist/schemas/job-filters/index.js +17 -1
  83. package/dist/schemas/job-filters/job-filters.js +65 -62
  84. package/dist/schemas/knowledge-object/index.d.ts +1 -0
  85. package/dist/schemas/knowledge-object/index.js +17 -0
  86. package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
  87. package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
  88. package/dist/schemas/lead/index.js +19 -173
  89. package/dist/schemas/lead/lead-note.js +16 -13
  90. package/dist/schemas/lead/lead-status.js +6 -3
  91. package/dist/schemas/lead/lead.d.ts +1897 -0
  92. package/dist/schemas/lead/lead.js +143 -0
  93. package/dist/schemas/logger/index.js +17 -1
  94. package/dist/schemas/logger/log-event.js +49 -100
  95. package/dist/schemas/organization/index.js +17 -70
  96. package/dist/schemas/organization/organization.d.ts +7 -177
  97. package/dist/schemas/organization/organization.js +17 -14
  98. package/dist/schemas/proxy/index.js +17 -3
  99. package/dist/schemas/proxy/proxy.d.ts +5 -5
  100. package/dist/schemas/proxy/proxy.js +19 -25
  101. package/dist/schemas/saved-search/index.js +11 -8
  102. package/dist/schemas/scraper/index.js +18 -2
  103. package/dist/schemas/scraper/scrape-payload.d.ts +0 -5
  104. package/dist/schemas/scraper/scrape-payload.js +14 -19
  105. package/dist/schemas/scraper/scrape-response.d.ts +345 -0
  106. package/dist/schemas/scraper/scrape-response.js +9 -0
  107. package/dist/schemas/scraper/scrape-result.js +21 -21
  108. package/dist/schemas/shared.js +9 -12
  109. package/dist/schemas/time-filter/index.js +8 -5
  110. package/dist/schemas/upwork-account/index.d.ts +3 -0
  111. package/dist/schemas/upwork-account/index.js +19 -0
  112. package/dist/schemas/upwork-account/upwork-account-status.d.ts +2 -0
  113. package/dist/schemas/upwork-account/upwork-account-status.js +11 -0
  114. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +95 -0
  115. package/dist/schemas/upwork-account/upwork-business-manager-account.js +35 -0
  116. package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +92 -0
  117. package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
  118. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
  119. package/dist/schemas/upwork-account/upwork-scraping-account.js +30 -0
  120. package/dist/schemas/user/index.js +41 -38
  121. package/dist/types/account/account-status.js +2 -1
  122. package/dist/types/account/bidder-account.js +2 -1
  123. package/dist/types/account/index.js +19 -3
  124. package/dist/types/account/manager-account.d.ts +7 -0
  125. package/dist/types/account/manager-account.js +2 -0
  126. package/dist/types/account/scraper-account.js +2 -1
  127. package/dist/types/ai/ai-config.js +2 -1
  128. package/dist/types/ai/index.js +19 -3
  129. package/dist/types/ai/proposal.js +2 -1
  130. package/dist/types/ai/suitability.js +2 -1
  131. package/dist/types/ai-config/ai-config.d.ts +6 -0
  132. package/dist/types/ai-config/ai-config.js +2 -0
  133. package/dist/types/ai-config/index.d.ts +1 -0
  134. package/dist/types/ai-config/index.js +17 -0
  135. package/dist/types/bid/bid-result.js +2 -1
  136. package/dist/types/bid/bid-status.d.ts +5 -0
  137. package/dist/types/bid/bid-status.js +2 -0
  138. package/dist/types/bid/bid.js +2 -1
  139. package/dist/types/bid/index.js +18 -2
  140. package/dist/types/bidding/index.d.ts +1 -0
  141. package/dist/types/bidding/index.js +17 -0
  142. package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
  143. package/dist/types/bidding/proposal-bidding-status.js +2 -0
  144. package/dist/types/bidding/proposal-dto.d.ts +3 -0
  145. package/dist/types/bidding/proposal-dto.js +2 -0
  146. package/dist/types/campaign/campaign-analytics.js +2 -1
  147. package/dist/types/campaign/campaign-expenses.js +2 -1
  148. package/dist/types/campaign/campaign-insights.js +2 -1
  149. package/dist/types/campaign/campaign-integrations.js +2 -1
  150. package/dist/types/campaign/campaign-job-count.js +2 -1
  151. package/dist/types/campaign/campaign.js +2 -1
  152. package/dist/types/campaign/index.js +22 -6
  153. package/dist/types/chat-message/chat-message.js +2 -1
  154. package/dist/types/chat-message/index.js +17 -1
  155. package/dist/types/config/agency-config.js +2 -1
  156. package/dist/types/config/index.js +17 -1
  157. package/dist/types/index.js +29 -15
  158. package/dist/types/job/index.js +19 -3
  159. package/dist/types/job/job-details.d.ts +36 -0
  160. package/dist/types/job/job-details.js +2 -0
  161. package/dist/types/job/job-note.js +2 -1
  162. package/dist/types/job/job-pipeline.d.ts +4 -0
  163. package/dist/types/job/job-pipeline.js +2 -0
  164. package/dist/types/job/job-status.js +4 -1
  165. package/dist/types/job/job-suitability.d.ts +3 -0
  166. package/dist/types/job/job-suitability.js +2 -0
  167. package/dist/types/job/job.d.ts +36 -0
  168. package/dist/types/job/job.js +2 -0
  169. package/dist/types/job-filters/index.js +17 -1
  170. package/dist/types/job-filters/job-filters.js +2 -1
  171. package/dist/types/knowledge-object/index.d.ts +1 -0
  172. package/dist/types/knowledge-object/index.js +17 -0
  173. package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
  174. package/dist/types/knowledge-object/knowledge-object.js +2 -0
  175. package/dist/types/logger/index.js +17 -1
  176. package/dist/types/logger/log-event.js +2 -1
  177. package/dist/types/saved-search/index.js +2 -1
  178. package/dist/types/scraper/index.js +18 -2
  179. package/dist/types/scraper/scrape-payload.js +2 -1
  180. package/dist/types/scraper/scrape-response.d.ts +4 -0
  181. package/dist/types/scraper/scrape-response.js +2 -0
  182. package/dist/types/scraper/scrape-result.js +2 -1
  183. package/dist/types/time-filter/index.js +2 -1
  184. package/dist/types/upwork-account/index.d.ts +3 -0
  185. package/dist/types/upwork-account/index.js +19 -0
  186. package/dist/types/upwork-account/upwork-account-status.d.ts +3 -0
  187. package/dist/types/upwork-account/upwork-account-status.js +2 -0
  188. package/dist/types/upwork-account/upwork-business-manager-account.d.ts +7 -0
  189. package/dist/types/upwork-account/upwork-business-manager-account.js +2 -0
  190. package/dist/types/upwork-account/upwork-scraping-account.d.ts +5 -0
  191. package/dist/types/upwork-account/upwork-scraping-account.js +2 -0
  192. package/dist/types/user/index.js +2 -1
  193. package/dist/utils/index.js +17 -1
  194. package/dist/utils/try-catch.js +23 -8
  195. package/package.json +1 -1
  196. package/dist/schemas/event/index.d.ts +0 -58
  197. package/dist/schemas/lead/nuxt.js +0 -287
  198. package/dist/schemas/meter-event/index.d.ts +0 -12
  199. package/dist/schemas/organization/member.js +0 -7
  200. package/dist/schemas/organization/subscription.js +0 -17
  201. package/dist/schemas/proxy/proxy-available-replacements.js +0 -3
  202. package/dist/schemas/proxy/proxy-country.js +0 -249
  203. package/dist/schemas/tier/index.d.ts +0 -119
  204. package/dist/schemas/transaction/index.js +0 -17
  205. package/dist/schemas/usage/index.js +0 -18
  206. package/dist/types/job/nuxt.js +0 -1
  207. package/dist/types/shared.js +0 -1
  208. package/dist/types/transaction/index.js +0 -1
  209. package/dist/types/usage/index.js +0 -1
@@ -11329,11 +11329,11 @@ const proxySchema = z.object({
11329
11329
  claimedCountry: proxyCountrySchema,
11330
11330
  status: proxyStatusSchema.nullable(),
11331
11331
  country: proxyCountrySchema.nullable(),
11332
- bidderId: z.string().nullable(),
11332
+ accountId: z.string().nullable(),
11333
11333
  });
11334
11334
  const externalProxySchema = proxySchema.omit({
11335
11335
  id: true,
11336
- bidderId: true,
11336
+ accountId: true,
11337
11337
  status: true,
11338
11338
  country: true,
11339
11339
  fraudScore: true,
@@ -11345,11 +11345,6 @@ const bidderAccountProvider = z.enum([
11345
11345
  'user-provided',
11346
11346
  'lancer-provided',
11347
11347
  ]);
11348
- const bidderAccountCredentialsStatus = z.enum([
11349
- 'pending_verification',
11350
- 'verified',
11351
- 'invalid',
11352
- ]);
11353
11348
  const bidderAccountAgencySchema = z.object({
11354
11349
  name: z.string(),
11355
11350
  logoUrl: z.string().nullable(),
@@ -11998,11 +11993,11 @@ const scraperAccountSchema = z.object({
11998
11993
  createdAt: z.number(),
11999
11994
  updatedAt: z.number(),
12000
11995
  });
12001
- const createScraperAccountSchema = scraperAccountSchema.omit({
12002
- id: true,
12003
- lastUsed: true,
12004
- createdAt: true,
12005
- updatedAt: true,
11996
+ const createScraperAccountSchema = scraperAccountSchema.pick({
11997
+ region: true,
11998
+ email: true,
11999
+ password: true,
12000
+ securityQuestionAnswer: true,
12006
12001
  });
12007
12002
  const updateScraperAccountSchema = scraperAccountSchema
12008
12003
  .omit({
@@ -12797,7 +12792,7 @@ const campaignSchema = z.object({
12797
12792
  minimumBoost: z.number().nullable().default(0),
12798
12793
  webhookUrl: z.string().nullable(),
12799
12794
  monthlyBudget: z.number().nullable(),
12800
- suitabilityThreshold: z.number().min(0).max(100).nullable().default(0),
12795
+ // suitabilityThreshold: z.number().min(0).max(100).nullable().default(0),
12801
12796
  boostingThreshold: z.number().min(0).max(100).nullable().default(0),
12802
12797
  leadCounts: z.record(leadStatusSchema, z.number()).nullable(),
12803
12798
  expenses: campaignExpensesSchema,
@@ -12810,6 +12805,7 @@ const createCampaignSchema = campaignSchema.omit({
12810
12805
  id: true,
12811
12806
  createdAt: true,
12812
12807
  updatedAt: true,
12808
+ bidConfig: true,
12813
12809
  });
12814
12810
  const updateCampaignSchema = campaignSchema
12815
12811
  .omit({
@@ -13661,7 +13657,6 @@ exports.bidRangeSchema = bidRangeSchema;
13661
13657
  exports.bidSuccessSchema = bidSuccessSchema;
13662
13658
  exports.bidderAccountAgencySchema = bidderAccountAgencySchema;
13663
13659
  exports.bidderAccountAlreadyConnectedException = bidderAccountAlreadyConnectedException;
13664
- exports.bidderAccountCredentialsStatus = bidderAccountCredentialsStatus;
13665
13660
  exports.bidderAccountProvider = bidderAccountProvider;
13666
13661
  exports.bidderAccountProviderDisplayMap = bidderAccountProviderDisplayMap;
13667
13662
  exports.bidderAccountSchema = bidderAccountSchema;
@@ -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
+ };
@@ -1,14 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.COLLECTIONS = void 0;
1
4
  // Base collection names
2
- export const COLLECTIONS = {
3
- USERS: "users",
4
- SETTINGS: "settings",
5
- CAMPAIGNS: "campaigns",
6
- LEADS: "leads",
7
- EVENTS: "events",
8
- SCRAPER_ACCOUNTS: "scrapers",
9
- BIDDER_ACCOUNTS: "bidders",
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',
10
13
  CAMPAIGN_ACTIVITIES: (userId, campaignId) => `users/${userId}/campaigns/${campaignId}/activities`,
11
- ORGANIZATIONS: "organizations",
12
- PROXIES: "proxies",
13
- TRANSACTIONS: "transactions",
14
+ ORGANIZATIONS: 'organizations',
15
+ PROXIES: 'proxies',
14
16
  };
@@ -1,4 +1,7 @@
1
- export const commonQuestions = [
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commonQuestions = void 0;
4
+ exports.commonQuestions = [
2
5
  {
3
6
  id: 'similar_experience',
4
7
  question: 'Describe your recent experience with similar projects',
@@ -1,4 +1,24 @@
1
- export const paths = {
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.regionMapping = exports.countryMapping = exports.paths = void 0;
21
+ exports.paths = {
2
22
  auth: {
3
23
  register: `auth/register`,
4
24
  },
@@ -7,12 +27,14 @@ export const paths = {
7
27
  details: (id) => `users/${id}`,
8
28
  },
9
29
  };
10
- export * from './job-filter-options';
11
- export { default as countryMapping } from './mappings/countryMapping';
12
- export { default as regionMapping } from './mappings/regionMapping';
13
- export * from './job-filter-options';
14
- export * from './common-questions';
15
- export * from './job-status';
16
- export * from './routes';
17
- export * from './collections';
18
- export * from './upwork-accounts';
30
+ __exportStar(require("./job-filter-options"), exports);
31
+ var countryMapping_1 = require("./mappings/countryMapping");
32
+ Object.defineProperty(exports, "countryMapping", { enumerable: true, get: function () { return __importDefault(countryMapping_1).default; } });
33
+ var regionMapping_1 = require("./mappings/regionMapping");
34
+ Object.defineProperty(exports, "regionMapping", { enumerable: true, get: function () { return __importDefault(regionMapping_1).default; } });
35
+ __exportStar(require("./job-filter-options"), exports);
36
+ __exportStar(require("./common-questions"), exports);
37
+ __exportStar(require("./job-status"), exports);
38
+ __exportStar(require("./routes"), exports);
39
+ __exportStar(require("./collections"), exports);
40
+ __exportStar(require("./upwork-accounts"), exports);
@@ -1,4 +1,7 @@
1
- export const JOB_FILTER_OPTIONS = {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JOB_FILTER_OPTIONS = void 0;
4
+ exports.JOB_FILTER_OPTIONS = {
2
5
  REGIONS: ["Worldwide", "UKOnly", "USOnly"],
3
6
  PROJECT_DURATION: [
4
7
  "Less than 1 month",
@@ -1,4 +1,7 @@
1
- export const jobStatusOrder = [
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getNextStatus = exports.getPreviousStatus = exports.jobStatusOrder = void 0;
4
+ exports.jobStatusOrder = [
2
5
  "leads",
3
6
  "contacted",
4
7
  "viewed",
@@ -7,15 +10,17 @@ export const jobStatusOrder = [
7
10
  "won",
8
11
  "lost",
9
12
  ];
10
- export const getPreviousStatus = (status) => {
13
+ const getPreviousStatus = (status) => {
11
14
  if (status === "won")
12
15
  return "negotiations";
13
16
  if (status === "lost")
14
17
  return "negotiations";
15
- const index = jobStatusOrder.indexOf(status);
16
- return index > 0 ? jobStatusOrder[index - 1] : null;
18
+ const index = exports.jobStatusOrder.indexOf(status);
19
+ return index > 0 ? exports.jobStatusOrder[index - 1] : null;
17
20
  };
18
- export const getNextStatus = (status) => {
19
- const index = jobStatusOrder.indexOf(status);
20
- return index < jobStatusOrder.length - 1 ? jobStatusOrder[index + 1] : null;
21
+ exports.getPreviousStatus = getPreviousStatus;
22
+ const getNextStatus = (status) => {
23
+ const index = exports.jobStatusOrder.indexOf(status);
24
+ return index < exports.jobStatusOrder.length - 1 ? exports.jobStatusOrder[index + 1] : null;
21
25
  };
26
+ exports.getNextStatus = getNextStatus;
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
1
3
  const countryMapping = {
2
4
  USA: "United States",
3
5
  GBR: "United Kingdom",
@@ -117,4 +119,4 @@ const countryMapping = {
117
119
  VCT: "Saint Vincent and the Grenadines",
118
120
  VGB: "British Virgin Islands",
119
121
  };
120
- export default countryMapping;
122
+ exports.default = countryMapping;
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
1
3
  const regionMapping = {
2
4
  Africa: [
3
5
  "Algeria",
@@ -237,4 +239,4 @@ const regionMapping = {
237
239
  "Wallis and Futuna",
238
240
  ],
239
241
  };
240
- export default regionMapping;
242
+ exports.default = regionMapping;
@@ -1,2 +1,2 @@
1
- import { TrackUsageEventType } from "../schemas";
2
- export declare const creditDeductionAmountMap: Record<TrackUsageEventType, number>;
1
+ import { CreditDeductionEventType } from "../schemas";
2
+ export declare const creditDeductionAmountMap: Record<CreditDeductionEventType, number>;
@@ -0,0 +1,4 @@
1
+ import { ProxyCountry } from '../schemas';
2
+ export declare const countryToWebshareCountryCode: (country: ProxyCountry) => string;
3
+ export declare const webshareCountryCodeToCountry: (countryCode: string) => ProxyCountry;
4
+ export declare const IPQualityScoreCountryCodeToCountry: (countryCode: string) => ProxyCountry;
@@ -1,14 +1,17 @@
1
- export const ROUTES = {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildRoute = exports.ROUTES = void 0;
4
+ exports.ROUTES = {
2
5
  AUTH: {
3
- BASE: "auth",
4
- REGISTER: "auth/register",
6
+ BASE: 'auth',
7
+ REGISTER: 'auth/register',
5
8
  },
6
9
  EVENTS: {
7
- BASE: "events",
10
+ BASE: 'events',
8
11
  BY_ID: (id) => `events/${id}`,
9
12
  },
10
13
  CAMPAIGNS: {
11
- BASE: "campaigns",
14
+ BASE: 'campaigns',
12
15
  BY_ID: (id) => `campaigns/${id}`,
13
16
  LEADS: {
14
17
  BASE: (campaignId) => `campaigns/${campaignId}/leads`,
@@ -41,76 +44,71 @@ export const ROUTES = {
41
44
  },
42
45
  },
43
46
  JOBS: {
44
- BASE: "jobs",
47
+ BASE: 'jobs',
45
48
  BY_ID: (id) => `jobs/${id}`,
46
- BY_URL: (url) => `jobs/${encodeURIComponent(url)}`,
47
- IMPORT: "jobs/import",
48
- FILTER_OPTIONS: "jobs/filter-options",
49
- TOTAL_JOBS: "jobs/total-jobs",
49
+ IMPORT: 'jobs/import',
50
+ FILTER_OPTIONS: 'jobs/filter-options',
51
+ TOTAL_JOBS: 'jobs/total-jobs',
50
52
  GET_JOB_TITLE: (jobId) => `jobs/get-job-title/${jobId}`,
51
- SEARCH: "jobs/search",
53
+ SEARCH: 'jobs/search',
52
54
  },
53
55
  USERS: {
54
- BASE: "users",
56
+ BASE: 'users',
55
57
  BY_ID: (id) => `users/${id}`,
56
58
  },
57
59
  AI_CONFIG: {
58
- BASE: "ai-config",
59
- GENERATE_KNOWLEDGE_BASE: "ai-config/generate-knowledge-base",
60
+ BASE: 'ai-config',
61
+ GENERATE_KNOWLEDGE_BASE: 'ai-config/generate-knowledge-base',
60
62
  },
61
63
  COOKIES: {
62
- BASE: "cookies",
63
- SCRAPE: "cookies/scrape-cookies",
64
+ BASE: 'cookies',
65
+ SCRAPE: 'cookies/scrape-cookies',
64
66
  },
65
67
  SCRAPING: {
66
- BASE: "scraping",
67
- START_SCRAPING: "scraping/start",
68
- START_WORLDWIDE_SCRAPING: "scraping/start-worldwide",
69
- START_US_SCRAPING: "scraping/start-us",
70
- START_UK_SCRAPING: "scraping/start-uk",
71
- UPDATE_ACTIVITY_4H_WORLDWIDE: "scraping/update-activity/4h",
72
- UPDATE_ACTIVITY_4H_UK: "scraping/update-activity/4h/uk",
73
- UPDATE_ACTIVITY_4H_US: "scraping/update-activity/4h/us",
74
- UPDATE_ACTIVITY_24H_WORLDWIDE: "scraping/update-activity/24h",
75
- UPDATE_ACTIVITY_24H_UK: "scraping/update-activity/24h/uk",
76
- UPDATE_ACTIVITY_24H_US: "scraping/update-activity/24h/us",
77
- SCRAPE_FEED_WORLDWIDE: "scraping/feed-worldwide",
78
- SCRAPE_FEED_UK: "scraping/feed-uk",
79
- SCRAPE_FEED_US: "scraping/feed-us",
80
- SCRAPE_JOB: "scraping/job",
81
- SCRAPE_JOB_ACTIVITY: "scraping/job-activity",
68
+ BASE: 'scraping',
69
+ START_SCRAPING: 'scraping/start',
70
+ START_WORLDWIDE_SCRAPING: 'scraping/start-worldwide',
71
+ START_US_SCRAPING: 'scraping/start-us',
72
+ START_UK_SCRAPING: 'scraping/start-uk',
73
+ UPDATE_ACTIVITY_4H_WORLDWIDE: 'scraping/update-activity/4h',
74
+ UPDATE_ACTIVITY_4H_UK: 'scraping/update-activity/4h/uk',
75
+ UPDATE_ACTIVITY_4H_US: 'scraping/update-activity/4h/us',
76
+ UPDATE_ACTIVITY_24H_WORLDWIDE: 'scraping/update-activity/24h',
77
+ UPDATE_ACTIVITY_24H_UK: 'scraping/update-activity/24h/uk',
78
+ UPDATE_ACTIVITY_24H_US: 'scraping/update-activity/24h/us',
82
79
  },
83
80
  ADMIN: {
84
- BASE: "admin",
81
+ BASE: 'admin',
85
82
  BIDDER_ACCOUNTS: {
86
- BASE: "admin/bidder-accounts",
83
+ BASE: 'admin/bidder-accounts',
87
84
  BY_ID: (id) => `admin/bidder-accounts/${id}`,
88
85
  BY_PROVIDER: (provider) => `admin/bidder-accounts/${provider}`,
89
86
  BY_PROVIDER_AND_ID: (provider, id) => `admin/bidder-accounts/${provider}/${id}`,
90
87
  },
91
88
  SCRAPER_ACCOUNTS: {
92
- BASE: "admin/scraper-accounts",
89
+ BASE: 'admin/scraper-accounts',
93
90
  BY_ID: (id) => `admin/scraper-accounts/${id}`,
94
91
  BY_PROVIDER: (provider) => `admin/scraper-accounts/${provider}`,
95
92
  BY_PROVIDER_AND_ID: (provider, id) => `admin/scraper-accounts/${provider}/${id}`,
96
93
  },
97
94
  PROXIES: {
98
- BASE: "admin/proxies",
95
+ BASE: 'admin/proxies',
99
96
  BY_ID: (id) => `admin/proxies/${id}`,
100
97
  REPLACE_PROXY: (id) => `admin/proxies/${id}/replace`,
101
- SYNC: "admin/proxies/sync",
98
+ SYNC: 'admin/proxies/sync',
102
99
  },
103
100
  },
104
101
  BID: {
105
- BASE: "bid",
102
+ BASE: 'bid',
106
103
  BID_ON_JOB: (userId, campaignId, leadId) => `bid/${userId}/${campaignId}/${leadId}`,
107
104
  },
108
105
  };
109
106
  // Helper function to build route with parameters
110
- export const buildRoute = (route, params = {}) => {
107
+ const buildRoute = (route, params = {}) => {
111
108
  let builtRoute = route;
112
109
  Object.entries(params).forEach(([key, value]) => {
113
110
  builtRoute = builtRoute.replace(`:${key}`, value);
114
111
  });
115
112
  return builtRoute;
116
113
  };
114
+ exports.buildRoute = buildRoute;
@@ -1,18 +1,21 @@
1
- export const accountStatusOrder = [
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bidderAccountProviderDisplayMap = exports.accountStatusDisplayMap = exports.accountStatusOrder = void 0;
4
+ exports.accountStatusOrder = [
2
5
  'verification_required',
3
6
  'shadow_banned',
4
7
  'healthy',
5
8
  'banned',
6
9
  'suspended',
7
10
  ];
8
- export const accountStatusDisplayMap = {
11
+ exports.accountStatusDisplayMap = {
9
12
  verification_required: 'Verification Required',
10
13
  shadow_banned: 'Shadow Banned',
11
14
  healthy: 'Healthy',
12
15
  banned: 'Banned',
13
16
  suspended: 'Suspended',
14
17
  };
15
- export const bidderAccountProviderDisplayMap = {
18
+ exports.bidderAccountProviderDisplayMap = {
16
19
  'lancer-provided': 'Lancer Provided',
17
20
  'user-provided': 'User Provided',
18
21
  };
@@ -0,0 +1,5 @@
1
+ import { KnowledgeObject } from '../types/knowledge-object';
2
+ export declare const CATEGORIES: string[];
3
+ export declare const EXPERIENCE_LEVELS: string[];
4
+ export declare const CLIENT_HISTORY: string[];
5
+ export declare const emptyKnowledgeObject: KnowledgeObject;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyKnowledgeObject = exports.CLIENT_HISTORY = exports.EXPERIENCE_LEVELS = exports.CATEGORIES = void 0;
4
+ exports.CATEGORIES = [
5
+ 'Accounting',
6
+ 'Business Analysis & Strategy',
7
+ 'Financial Analysis & Modeling',
8
+ 'HR Administration',
9
+ 'Management Consulting',
10
+ 'Tax Preparation',
11
+ 'Data Entry',
12
+ 'Personal/Virtual Assistance',
13
+ 'Project Management',
14
+ 'Research',
15
+ 'Customer Service',
16
+ 'Technical Support',
17
+ 'Data Analytics',
18
+ 'Data Processing',
19
+ 'Data Engineering',
20
+ 'Machine Learning',
21
+ 'AI Development',
22
+ 'Art & Illustration',
23
+ 'Audio Production',
24
+ 'Brand Design',
25
+ 'Logo Design',
26
+ 'Graphics Design',
27
+ 'Video Production',
28
+ 'Voice Acting',
29
+ 'Architecture',
30
+ 'Chemical Engineering',
31
+ 'Civil Engineering',
32
+ 'Electrical Engineering',
33
+ 'Interior Design',
34
+ 'Mechanical Engineering',
35
+ 'Database Administration',
36
+ 'Information Security',
37
+ 'Network Administration',
38
+ 'Systems Administration',
39
+ 'DevOps Engineering',
40
+ 'Business Law',
41
+ 'Immigration Law',
42
+ 'Tax Law',
43
+ 'Regulatory Law',
44
+ 'Paralegal Services',
45
+ 'Digital Marketing',
46
+ 'Lead Generation',
47
+ 'Marketing Strategy',
48
+ 'Social Media Marketing',
49
+ 'SEO',
50
+ 'Language Translation',
51
+ 'Legal Translation',
52
+ 'Technical Translation',
53
+ 'Medical Translation',
54
+ 'Desktop Development',
55
+ 'Mobile Development',
56
+ 'Web Development',
57
+ 'Game Development',
58
+ 'QA & Testing',
59
+ 'Content Writing',
60
+ 'Copywriting',
61
+ 'Technical Writing',
62
+ 'Creative Writing',
63
+ 'Editing',
64
+ ];
65
+ exports.EXPERIENCE_LEVELS = ['Entry Level', 'Mid Level', 'Senior Level'];
66
+ exports.CLIENT_HISTORY = ['No hires', '1-9 hires', '10+ hires'];
67
+ // Default knowledge object with all null values
68
+ exports.emptyKnowledgeObject = {
69
+ categories: exports.CATEGORIES.reduce((acc, category) => (Object.assign(Object.assign({}, acc), { [category]: null })), {}),
70
+ experienceLevels: exports.EXPERIENCE_LEVELS.reduce((acc, level) => (Object.assign(Object.assign({}, acc), { [level]: null })), {}),
71
+ minHourlyRate: null,
72
+ fixedPriceMin: null,
73
+ clientHistory: exports.CLIENT_HISTORY.reduce((acc, history) => (Object.assign(Object.assign({}, acc), { [history]: null })), {}),
74
+ keywords: [],
75
+ };
package/dist/index.js CHANGED
@@ -1,4 +1,20 @@
1
- export * from './schemas';
2
- export * from './types';
3
- export * from './constants';
4
- export * from './utils';
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("./schemas"), exports);
18
+ __exportStar(require("./types"), exports);
19
+ __exportStar(require("./constants"), exports);
20
+ __exportStar(require("./utils"), exports);
@@ -1,5 +1,8 @@
1
- import { z } from 'zod';
2
- export const accountStatusSchema = z.enum([
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.accountStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.accountStatusSchema = zod_1.z.enum([
3
6
  'verification_required',
4
7
  'shadow_banned',
5
8
  'healthy',