lancer-shared 1.2.137 → 1.2.139

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 +26 -3
  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.d.ts +2 -0
  14. package/dist/constants/routes.js +37 -39
  15. package/dist/constants/upwork-accounts.js +6 -3
  16. package/dist/constants/upwork-filters.d.ts +5 -0
  17. package/dist/constants/upwork-filters.js +75 -0
  18. package/dist/index.js +20 -4
  19. package/dist/schemas/account/account-status.js +5 -2
  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.js +24 -21
  26. package/dist/schemas/ai/ai-config.js +11 -8
  27. package/dist/schemas/ai/index.js +19 -3
  28. package/dist/schemas/ai/proposal.js +13 -10
  29. package/dist/schemas/ai/suitability.js +11 -8
  30. package/dist/schemas/ai-config/ai-config.d.ts +39 -0
  31. package/dist/schemas/ai-config/ai-config.js +12 -0
  32. package/dist/schemas/ai-config/index.d.ts +1 -0
  33. package/dist/schemas/ai-config/index.js +17 -0
  34. package/dist/schemas/bid/bid-result.js +13 -9
  35. package/dist/schemas/bid/bid-status.d.ts +30 -0
  36. package/dist/schemas/bid/bid-status.js +15 -0
  37. package/dist/schemas/bid/bid.js +30 -29
  38. package/dist/schemas/bid/exceptions/base-exception.d.ts +4 -0
  39. package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +5 -0
  40. package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +5 -0
  41. package/dist/schemas/bid/index.js +18 -2
  42. package/dist/schemas/bidding/index.d.ts +1 -0
  43. package/dist/schemas/bidding/index.js +17 -0
  44. package/dist/schemas/bidding/proposal-bidding-status.d.ts +26 -0
  45. package/dist/schemas/bidding/proposal-bidding-status.js +18 -0
  46. package/dist/schemas/bidding/proposal-dto.d.ts +26 -0
  47. package/dist/schemas/bidding/proposal-dto.js +18 -0
  48. package/dist/schemas/campaign/campaign-ai-metrics.js +8 -5
  49. package/dist/schemas/campaign/campaign-analytics.d.ts +0 -296
  50. package/dist/schemas/campaign/campaign-analytics.js +31 -32
  51. package/dist/schemas/campaign/campaign-chat-bot.d.ts +35 -9
  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.js +35 -32
  58. package/dist/schemas/campaign/index.js +23 -7
  59. package/dist/schemas/chat-message/chat-message.js +10 -7
  60. package/dist/schemas/chat-message/index.js +17 -1
  61. package/dist/schemas/config/agency-config.js +9 -6
  62. package/dist/schemas/config/index.js +17 -1
  63. package/dist/schemas/index.js +32 -17
  64. package/dist/schemas/job/feed-job.d.ts +866 -0
  65. package/dist/schemas/job/index.js +19 -0
  66. package/dist/schemas/job/job-details.js +29 -0
  67. package/dist/schemas/job/job-note.d.ts +83 -0
  68. package/dist/schemas/job/job-note.js +30 -0
  69. package/dist/schemas/job/job-pipeline.d.ts +74 -0
  70. package/dist/schemas/job/job-pipeline.js +29 -0
  71. package/dist/schemas/job/job-status.d.ts +3 -0
  72. package/dist/schemas/job/job-status.js +27 -0
  73. package/dist/schemas/job/job-suitability.d.ts +12 -0
  74. package/dist/schemas/job/job-suitability.js +13 -0
  75. package/dist/schemas/job/job.d.ts +1160 -0
  76. package/dist/schemas/job/job.js +90 -0
  77. package/dist/schemas/job/pipeline-job.d.ts +608 -0
  78. package/dist/schemas/job/pipeline-job.js +43 -0
  79. package/dist/schemas/job/upwork-job.d.ts +334 -0
  80. package/dist/schemas/job/upwork-job.js +60 -0
  81. package/dist/schemas/job-filters/index.js +17 -1
  82. package/dist/schemas/job-filters/job-filters.js +65 -62
  83. package/dist/schemas/knowledge-object/index.d.ts +1 -0
  84. package/dist/schemas/knowledge-object/index.js +17 -0
  85. package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
  86. package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
  87. package/dist/schemas/lead/index.d.ts +14 -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.js +19 -25
  100. package/dist/schemas/saved-search/index.js +11 -8
  101. package/dist/schemas/scraper/index.js +18 -2
  102. package/dist/schemas/scraper/scrape-payload.d.ts +0 -78
  103. package/dist/schemas/scraper/scrape-payload.js +14 -19
  104. package/dist/schemas/scraper/scrape-response.d.ts +345 -0
  105. package/dist/schemas/scraper/scrape-response.js +9 -0
  106. package/dist/schemas/scraper/scrape-result.js +21 -21
  107. package/dist/schemas/shared.js +9 -12
  108. package/dist/schemas/time-filter/index.js +8 -5
  109. package/dist/schemas/upwork-account/index.d.ts +3 -0
  110. package/dist/schemas/upwork-account/index.js +19 -0
  111. package/dist/schemas/upwork-account/upwork-account-status.d.ts +2 -0
  112. package/dist/schemas/upwork-account/upwork-account-status.js +11 -0
  113. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +95 -0
  114. package/dist/schemas/upwork-account/upwork-business-manager-account.js +35 -0
  115. package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +92 -0
  116. package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
  117. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
  118. package/dist/schemas/upwork-account/upwork-scraping-account.js +30 -0
  119. package/dist/schemas/user/index.js +41 -38
  120. package/dist/types/account/account-status.js +2 -1
  121. package/dist/types/account/bidder-account.js +2 -1
  122. package/dist/types/account/index.js +19 -3
  123. package/dist/types/account/manager-account.d.ts +7 -0
  124. package/dist/types/account/manager-account.js +2 -0
  125. package/dist/types/account/scraper-account.js +2 -1
  126. package/dist/types/ai/ai-config.js +2 -1
  127. package/dist/types/ai/index.js +19 -3
  128. package/dist/types/ai/proposal.js +2 -1
  129. package/dist/types/ai/suitability.js +2 -1
  130. package/dist/types/ai-config/ai-config.d.ts +6 -0
  131. package/dist/types/ai-config/ai-config.js +2 -0
  132. package/dist/types/ai-config/index.d.ts +1 -0
  133. package/dist/types/ai-config/index.js +17 -0
  134. package/dist/types/bid/bid-result.js +2 -1
  135. package/dist/types/bid/bid-status.d.ts +5 -0
  136. package/dist/types/bid/bid-status.js +2 -0
  137. package/dist/types/bid/bid.js +2 -1
  138. package/dist/types/bid/index.js +18 -2
  139. package/dist/types/bidding/index.d.ts +1 -0
  140. package/dist/types/bidding/index.js +17 -0
  141. package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
  142. package/dist/types/bidding/proposal-bidding-status.js +2 -0
  143. package/dist/types/bidding/proposal-dto.d.ts +3 -0
  144. package/dist/types/bidding/proposal-dto.js +2 -0
  145. package/dist/types/campaign/campaign-analytics.js +2 -1
  146. package/dist/types/campaign/campaign-expenses.js +2 -1
  147. package/dist/types/campaign/campaign-insights.js +2 -1
  148. package/dist/types/campaign/campaign-integrations.js +2 -1
  149. package/dist/types/campaign/campaign-job-count.js +2 -1
  150. package/dist/types/campaign/campaign.js +2 -1
  151. package/dist/types/campaign/index.js +22 -6
  152. package/dist/types/chat-message/chat-message.js +2 -1
  153. package/dist/types/chat-message/index.js +17 -1
  154. package/dist/types/config/agency-config.js +2 -1
  155. package/dist/types/config/index.js +17 -1
  156. package/dist/types/index.js +29 -15
  157. package/dist/types/job/index.js +19 -3
  158. package/dist/types/job/job-details.d.ts +36 -0
  159. package/dist/types/job/job-details.js +2 -0
  160. package/dist/types/job/job-note.js +2 -1
  161. package/dist/types/job/job-pipeline.d.ts +4 -0
  162. package/dist/types/job/job-pipeline.js +2 -0
  163. package/dist/types/job/job-status.js +4 -1
  164. package/dist/types/job/job-suitability.d.ts +3 -0
  165. package/dist/types/job/job-suitability.js +2 -0
  166. package/dist/types/job/job.d.ts +36 -0
  167. package/dist/types/job/job.js +2 -0
  168. package/dist/types/job-filters/index.js +17 -1
  169. package/dist/types/job-filters/job-filters.js +2 -1
  170. package/dist/types/knowledge-object/index.d.ts +1 -0
  171. package/dist/types/knowledge-object/index.js +17 -0
  172. package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
  173. package/dist/types/knowledge-object/knowledge-object.js +2 -0
  174. package/dist/types/logger/index.js +17 -1
  175. package/dist/types/logger/log-event.js +2 -1
  176. package/dist/types/saved-search/index.js +2 -1
  177. package/dist/types/scraper/index.js +18 -2
  178. package/dist/types/scraper/scrape-payload.js +2 -1
  179. package/dist/types/scraper/scrape-response.d.ts +4 -0
  180. package/dist/types/scraper/scrape-response.js +2 -0
  181. package/dist/types/scraper/scrape-result.js +2 -1
  182. package/dist/types/time-filter/index.js +2 -1
  183. package/dist/types/upwork-account/index.d.ts +3 -0
  184. package/dist/types/upwork-account/index.js +19 -0
  185. package/dist/types/upwork-account/upwork-account-status.d.ts +3 -0
  186. package/dist/types/upwork-account/upwork-account-status.js +2 -0
  187. package/dist/types/upwork-account/upwork-business-manager-account.d.ts +7 -0
  188. package/dist/types/upwork-account/upwork-business-manager-account.js +2 -0
  189. package/dist/types/upwork-account/upwork-scraping-account.d.ts +5 -0
  190. package/dist/types/upwork-account/upwork-scraping-account.js +2 -0
  191. package/dist/types/user/index.js +2 -1
  192. package/dist/utils/index.js +17 -1
  193. package/dist/utils/try-catch.js +23 -8
  194. package/package.json +1 -1
  195. package/dist/schemas/event/index.d.ts +0 -58
  196. package/dist/schemas/job/haha.json +0 -581
  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
@@ -1,3 +1,17 @@
1
- export * from './proxy';
2
- export * from './proxy-available-replacements';
3
- export * from './proxy-country';
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,29 +1,23 @@
1
- import { z } from 'zod';
2
- import { proxyCountrySchema } from './proxy-country';
3
- export const proxyStatusSchema = z.enum([
4
- 'invalid',
5
- 'valid',
6
- 'pending_validation',
7
- ]);
8
- export const proxyProviderSchema = z.enum(['webshare']);
9
- export const proxySchema = z.object({
10
- id: z.string(),
11
- externalId: z.string(),
12
- host: z.string(),
13
- port: z.number(),
14
- username: z.string(),
15
- password: z.string(),
16
- provider: proxyProviderSchema,
17
- fraudScore: z.number().nullable(),
18
- claimedCountry: proxyCountrySchema,
19
- status: proxyStatusSchema.nullable(),
20
- country: proxyCountrySchema.nullable(),
21
- bidderId: z.string().nullable(),
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(),
22
19
  });
23
- export const externalProxySchema = proxySchema.omit({
20
+ exports.externalProxySchema = exports.proxySchema.omit({
24
21
  id: true,
25
22
  bidderId: true,
26
- status: true,
27
- country: true,
28
- fraudScore: true,
29
23
  });
@@ -1,9 +1,12 @@
1
- import { date, number, object, string } from "zod";
2
- import { booleanSchema } from "../shared";
3
- export const savedSearchSchema = object({
4
- id: number().int(),
5
- name: string(),
6
- url: string(),
7
- createdAt: date(),
8
- isActive: booleanSchema,
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,
9
12
  });
@@ -1,2 +1,18 @@
1
- export * from './scrape-payload';
2
- export * from './scrape-result';
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);
@@ -1046,43 +1046,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1046
1046
  updatedAt: import("zod").ZodNumber;
1047
1047
  openRouterApiKey: import("zod").ZodNullable<import("zod").ZodString>;
1048
1048
  appTrialEndsAt: import("zod").ZodNullable<import("zod").ZodNumber>;
1049
- oneTimePayments: import("zod").ZodOptional<import("zod").ZodObject<{
1050
- usAccountRental: import("zod").ZodOptional<import("zod").ZodObject<{
1051
- paidAt: import("zod").ZodNumber;
1052
- amount: import("zod").ZodNumber;
1053
- currency: import("zod").ZodString;
1054
- status: import("zod").ZodString;
1055
- paymentIntentId: import("zod").ZodString;
1056
- }, "strip", import("zod").ZodTypeAny, {
1057
- status: string;
1058
- amount: number;
1059
- paidAt: number;
1060
- currency: string;
1061
- paymentIntentId: string;
1062
- }, {
1063
- status: string;
1064
- amount: number;
1065
- paidAt: number;
1066
- currency: string;
1067
- paymentIntentId: string;
1068
- }>>;
1069
- }, "strip", import("zod").ZodTypeAny, {
1070
- usAccountRental?: {
1071
- status: string;
1072
- amount: number;
1073
- paidAt: number;
1074
- currency: string;
1075
- paymentIntentId: string;
1076
- } | undefined;
1077
- }, {
1078
- usAccountRental?: {
1079
- status: string;
1080
- amount: number;
1081
- paidAt: number;
1082
- currency: string;
1083
- paymentIntentId: string;
1084
- } | undefined;
1085
- }>>;
1086
1049
  }, "strip", import("zod").ZodTypeAny, {
1087
1050
  type: "agency" | "freelancer";
1088
1051
  id: string;
@@ -1130,15 +1093,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1130
1093
  nextScheduledBidTime: number | null;
1131
1094
  openRouterApiKey: string | null;
1132
1095
  appTrialEndsAt: number | null;
1133
- oneTimePayments?: {
1134
- usAccountRental?: {
1135
- status: string;
1136
- amount: number;
1137
- paidAt: number;
1138
- currency: string;
1139
- paymentIntentId: string;
1140
- } | undefined;
1141
- } | undefined;
1142
1096
  }, {
1143
1097
  type: "agency" | "freelancer";
1144
1098
  id: string;
@@ -1186,15 +1140,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1186
1140
  nextScheduledBidTime: number | null;
1187
1141
  openRouterApiKey: string | null;
1188
1142
  appTrialEndsAt: number | null;
1189
- oneTimePayments?: {
1190
- usAccountRental?: {
1191
- status: string;
1192
- amount: number;
1193
- paidAt: number;
1194
- currency: string;
1195
- paymentIntentId: string;
1196
- } | undefined;
1197
- } | undefined;
1198
1143
  }>;
1199
1144
  lead: import("zod").ZodObject<Omit<import("zod").objectUtil.extendShape<{
1200
1145
  id: import("zod").ZodNullable<import("zod").ZodString>;
@@ -1798,7 +1743,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1798
1743
  provider: import("zod").ZodEnum<["user-provided", "lancer-provided"]>;
1799
1744
  email: import("zod").ZodString;
1800
1745
  password: import("zod").ZodString;
1801
- isConnecting: import("zod").ZodNullable<import("zod").ZodBoolean>;
1802
1746
  securityQuestionAnswer: import("zod").ZodNullable<import("zod").ZodString>;
1803
1747
  assignedOrganizations: import("zod").ZodArray<import("zod").ZodString, "many">;
1804
1748
  googleOauthTokens: import("zod").ZodNullable<import("zod").ZodAny>;
@@ -1837,7 +1781,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1837
1781
  provider: "user-provided" | "lancer-provided";
1838
1782
  email: string;
1839
1783
  password: string;
1840
- isConnecting: boolean | null;
1841
1784
  securityQuestionAnswer: string | null;
1842
1785
  assignedOrganizations: string[];
1843
1786
  lastUsed: number | null;
@@ -1862,7 +1805,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1862
1805
  provider: "user-provided" | "lancer-provided";
1863
1806
  email: string;
1864
1807
  password: string;
1865
- isConnecting: boolean | null;
1866
1808
  securityQuestionAnswer: string | null;
1867
1809
  assignedOrganizations: string[];
1868
1810
  lastUsed: number | null;
@@ -2014,15 +1956,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
2014
1956
  nextScheduledBidTime: number | null;
2015
1957
  openRouterApiKey: string | null;
2016
1958
  appTrialEndsAt: number | null;
2017
- oneTimePayments?: {
2018
- usAccountRental?: {
2019
- status: string;
2020
- amount: number;
2021
- paidAt: number;
2022
- currency: string;
2023
- paymentIntentId: string;
2024
- } | undefined;
2025
- } | undefined;
2026
1959
  };
2027
1960
  lead: {
2028
1961
  uid: string | null;
@@ -2168,7 +2101,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
2168
2101
  provider: "user-provided" | "lancer-provided";
2169
2102
  email: string;
2170
2103
  password: string;
2171
- isConnecting: boolean | null;
2172
2104
  securityQuestionAnswer: string | null;
2173
2105
  assignedOrganizations: string[];
2174
2106
  lastUsed: number | null;
@@ -2320,15 +2252,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
2320
2252
  nextScheduledBidTime: number | null;
2321
2253
  openRouterApiKey: string | null;
2322
2254
  appTrialEndsAt: number | null;
2323
- oneTimePayments?: {
2324
- usAccountRental?: {
2325
- status: string;
2326
- amount: number;
2327
- paidAt: number;
2328
- currency: string;
2329
- paymentIntentId: string;
2330
- } | undefined;
2331
- } | undefined;
2332
2255
  };
2333
2256
  lead: {
2334
2257
  uid: string | null;
@@ -2474,7 +2397,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
2474
2397
  provider: "user-provided" | "lancer-provided";
2475
2398
  email: string;
2476
2399
  password: string;
2477
- isConnecting: boolean | null;
2478
2400
  securityQuestionAnswer: string | null;
2479
2401
  assignedOrganizations: string[];
2480
2402
  lastUsed: number | null;
@@ -1,21 +1,16 @@
1
- import { any, array, object, string } from "zod";
2
- import { jobActivityOffsetHourSchema, jobListingSchema } from "../lead";
3
- export const scrapePayloadSchema = object({
4
- latestJobsUrls: array(string()),
5
- cookies: array(any()),
6
- username: string(),
7
- password: string(),
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(),
8
10
  });
9
- export const scrapeUserProfilePayloadSchema = object({
10
- profileUrl: string(),
11
- cookies: array(any()),
12
- username: string(),
13
- password: string(),
14
- });
15
- export const scrapeJobPayloadSchema = object({
16
- listing: jobListingSchema,
17
- });
18
- export const scrapeJobActivityPayloadSchema = object({
19
- listing: jobListingSchema,
20
- offsetHour: jobActivityOffsetHourSchema,
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(),
21
16
  });
@@ -0,0 +1,345 @@
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
+ }>;
@@ -0,0 +1,9 @@
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
+ });