lancer-shared 1.0.167 → 1.0.168

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 (213) hide show
  1. package/dist/bundle.cjs.js +6251 -0
  2. package/dist/constants/collections.js +1 -4
  3. package/dist/constants/common-questions.js +1 -4
  4. package/dist/constants/index.js +10 -32
  5. package/dist/constants/job-filter-options.js +1 -4
  6. package/dist/constants/job-status.js +7 -12
  7. package/dist/constants/mappings/countryMapping.js +1 -3
  8. package/dist/constants/mappings/regionMapping.js +1 -3
  9. package/dist/constants/routes.d.ts +8 -2
  10. package/dist/constants/routes.js +39 -37
  11. package/dist/constants/upwork-accounts.js +3 -6
  12. package/dist/index.js +4 -20
  13. package/dist/schemas/account/account-status.js +2 -5
  14. package/dist/schemas/account/bidder-account.d.ts +15 -15
  15. package/dist/schemas/account/bidder-account.js +19 -22
  16. package/dist/schemas/account/index.js +3 -19
  17. package/dist/schemas/account/scraper-account.d.ts +27 -27
  18. package/dist/schemas/account/scraper-account.js +21 -24
  19. package/dist/schemas/ai/ai-config.js +8 -11
  20. package/dist/schemas/ai/index.js +3 -19
  21. package/dist/schemas/ai/proposal.d.ts +12 -12
  22. package/dist/schemas/ai/proposal.js +10 -13
  23. package/dist/schemas/ai/suitability.d.ts +6 -6
  24. package/dist/schemas/ai/suitability.js +8 -11
  25. package/dist/schemas/bid/bid-result.d.ts +2 -2
  26. package/dist/schemas/bid/bid-result.js +10 -13
  27. package/dist/schemas/bid/bid.d.ts +42 -42
  28. package/dist/schemas/bid/bid.js +27 -30
  29. package/dist/schemas/bid/index.js +2 -18
  30. package/dist/schemas/campaign/campaign-ai-metrics.js +5 -8
  31. package/dist/schemas/campaign/campaign-analytics.d.ts +99 -40
  32. package/dist/schemas/campaign/campaign-analytics.js +28 -31
  33. package/dist/schemas/campaign/campaign-expenses.d.ts +2 -2
  34. package/dist/schemas/campaign/campaign-expenses.js +5 -8
  35. package/dist/schemas/campaign/campaign-insights.d.ts +12 -12
  36. package/dist/schemas/campaign/campaign-insights.js +30 -30
  37. package/dist/schemas/campaign/campaign-integrations.js +10 -13
  38. package/dist/schemas/campaign/campaign-job-count.js +3 -6
  39. package/dist/schemas/campaign/campaign.d.ts +107 -107
  40. package/dist/schemas/campaign/campaign.js +32 -35
  41. package/dist/schemas/campaign/index.js +7 -23
  42. package/dist/schemas/chat-message/chat-message.js +7 -10
  43. package/dist/schemas/chat-message/index.js +1 -17
  44. package/dist/schemas/config/agency-config.js +6 -9
  45. package/dist/schemas/config/index.js +1 -17
  46. package/dist/schemas/event/index.d.ts +58 -0
  47. package/dist/schemas/index.d.ts +16 -16
  48. package/dist/schemas/index.js +16 -32
  49. package/dist/schemas/job/index.d.ts +95 -3
  50. package/dist/schemas/job-filters/index.js +1 -17
  51. package/dist/schemas/job-filters/job-filters.d.ts +16 -16
  52. package/dist/schemas/job-filters/job-filters.js +62 -65
  53. package/dist/schemas/lead/index.d.ts +2405 -1
  54. package/dist/schemas/lead/index.js +166 -19
  55. package/dist/schemas/lead/lead-note.d.ts +4 -4
  56. package/dist/schemas/lead/lead-note.js +13 -16
  57. package/dist/schemas/lead/lead-status.js +3 -6
  58. package/dist/schemas/logger/index.js +1 -17
  59. package/dist/schemas/logger/log-event.d.ts +183 -13
  60. package/dist/schemas/logger/log-event.js +38 -19
  61. package/dist/schemas/organization/index.js +1 -17
  62. package/dist/schemas/organization/organization.d.ts +10 -10
  63. package/dist/schemas/organization/organization.js +14 -17
  64. package/dist/schemas/proxy/index.js +1 -17
  65. package/dist/schemas/proxy/proxy.d.ts +16 -16
  66. package/dist/schemas/proxy/proxy.js +14 -17
  67. package/dist/schemas/saved-search/index.d.ts +5 -5
  68. package/dist/schemas/saved-search/index.js +8 -11
  69. package/dist/schemas/scraper/index.js +2 -18
  70. package/dist/schemas/scraper/scrape-payload.d.ts +105 -19
  71. package/dist/schemas/scraper/scrape-payload.js +19 -14
  72. package/dist/schemas/scraper/scrape-result.d.ts +476 -289
  73. package/dist/schemas/scraper/scrape-result.js +21 -21
  74. package/dist/schemas/shared.d.ts +2 -1
  75. package/dist/schemas/shared.js +12 -9
  76. package/dist/schemas/time-filter/index.js +5 -8
  77. package/dist/schemas/user/index.d.ts +26 -26
  78. package/dist/schemas/user/index.js +38 -41
  79. package/dist/types/account/account-status.js +1 -2
  80. package/dist/types/account/bidder-account.js +1 -2
  81. package/dist/types/account/index.js +3 -19
  82. package/dist/types/account/scraper-account.js +1 -2
  83. package/dist/types/ai/ai-config.js +1 -2
  84. package/dist/types/ai/index.js +3 -19
  85. package/dist/types/ai/proposal.js +1 -2
  86. package/dist/types/ai/suitability.js +1 -2
  87. package/dist/types/bid/bid-result.js +1 -2
  88. package/dist/types/bid/bid.js +1 -2
  89. package/dist/types/bid/index.js +2 -18
  90. package/dist/types/campaign/campaign-analytics.js +1 -2
  91. package/dist/types/campaign/campaign-expenses.js +1 -2
  92. package/dist/types/campaign/campaign-insights.js +1 -2
  93. package/dist/types/campaign/campaign-integrations.js +1 -2
  94. package/dist/types/campaign/campaign-job-count.js +1 -2
  95. package/dist/types/campaign/campaign.js +1 -2
  96. package/dist/types/campaign/index.js +6 -22
  97. package/dist/types/chat-message/chat-message.js +1 -2
  98. package/dist/types/chat-message/index.js +1 -17
  99. package/dist/types/config/agency-config.js +1 -2
  100. package/dist/types/config/index.js +1 -17
  101. package/dist/types/index.d.ts +1 -0
  102. package/dist/types/index.js +14 -29
  103. package/dist/types/job/index.d.ts +44 -1
  104. package/dist/types/job/index.js +2 -19
  105. package/dist/types/job/job-note.js +1 -2
  106. package/dist/types/job/job-status.js +1 -4
  107. package/dist/types/job-filters/index.js +1 -17
  108. package/dist/types/job-filters/job-filters.js +1 -2
  109. package/dist/types/logger/index.js +1 -17
  110. package/dist/types/logger/log-event.d.ts +4 -1
  111. package/dist/types/logger/log-event.js +1 -2
  112. package/dist/types/saved-search/index.js +1 -2
  113. package/dist/types/scraper/index.js +2 -18
  114. package/dist/types/scraper/scrape-payload.d.ts +5 -1
  115. package/dist/types/scraper/scrape-payload.js +1 -2
  116. package/dist/types/scraper/scrape-result.d.ts +3 -2
  117. package/dist/types/scraper/scrape-result.js +1 -2
  118. package/dist/types/shared.d.ts +3 -0
  119. package/dist/types/shared.js +1 -0
  120. package/dist/types/time-filter/index.js +1 -2
  121. package/dist/types/user/index.js +1 -2
  122. package/dist/utils/index.js +1 -17
  123. package/dist/utils/try-catch.js +8 -23
  124. package/package.json +12 -7
  125. package/dist/constants/account-status.d.ts +0 -3
  126. package/dist/constants/account-status.js +0 -17
  127. package/dist/constants/upwork-filters.d.ts +0 -5
  128. package/dist/constants/upwork-filters.js +0 -75
  129. package/dist/schemas/account/manager-account.d.ts +0 -116
  130. package/dist/schemas/account/manager-account.js +0 -38
  131. package/dist/schemas/ai-config/ai-config.d.ts +0 -39
  132. package/dist/schemas/ai-config/ai-config.js +0 -12
  133. package/dist/schemas/ai-config/index.d.ts +0 -1
  134. package/dist/schemas/ai-config/index.js +0 -17
  135. package/dist/schemas/bid/bid-status.d.ts +0 -30
  136. package/dist/schemas/bid/bid-status.js +0 -15
  137. package/dist/schemas/bidding/index.d.ts +0 -1
  138. package/dist/schemas/bidding/index.js +0 -17
  139. package/dist/schemas/bidding/proposal-bidding-status.d.ts +0 -26
  140. package/dist/schemas/bidding/proposal-bidding-status.js +0 -18
  141. package/dist/schemas/bidding/proposal-dto.d.ts +0 -26
  142. package/dist/schemas/bidding/proposal-dto.js +0 -18
  143. package/dist/schemas/job/index.js +0 -19
  144. package/dist/schemas/job/job-details.d.ts +0 -335
  145. package/dist/schemas/job/job-details.js +0 -29
  146. package/dist/schemas/job/job-note.d.ts +0 -83
  147. package/dist/schemas/job/job-note.js +0 -30
  148. package/dist/schemas/job/job-pipeline.d.ts +0 -74
  149. package/dist/schemas/job/job-pipeline.js +0 -29
  150. package/dist/schemas/job/job-status.d.ts +0 -3
  151. package/dist/schemas/job/job-status.js +0 -27
  152. package/dist/schemas/job/job-suitability.d.ts +0 -12
  153. package/dist/schemas/job/job-suitability.js +0 -13
  154. package/dist/schemas/job/job.d.ts +0 -1160
  155. package/dist/schemas/job/job.js +0 -90
  156. package/dist/schemas/job/pipeline-job.d.ts +0 -608
  157. package/dist/schemas/job/pipeline-job.js +0 -43
  158. package/dist/schemas/job/upwork-job.d.ts +0 -334
  159. package/dist/schemas/job/upwork-job.js +0 -60
  160. package/dist/schemas/knowledge-object/index.d.ts +0 -1
  161. package/dist/schemas/knowledge-object/index.js +0 -17
  162. package/dist/schemas/knowledge-object/knowledge-object.d.ts +0 -128
  163. package/dist/schemas/knowledge-object/knowledge-object.js +0 -47
  164. package/dist/schemas/lead/lead.d.ts +0 -1897
  165. package/dist/schemas/lead/lead.js +0 -143
  166. package/dist/schemas/scraper/scrape-response.d.ts +0 -345
  167. package/dist/schemas/scraper/scrape-response.js +0 -9
  168. package/dist/schemas/upwork-account/index.d.ts +0 -3
  169. package/dist/schemas/upwork-account/index.js +0 -19
  170. package/dist/schemas/upwork-account/upwork-account-status.d.ts +0 -2
  171. package/dist/schemas/upwork-account/upwork-account-status.js +0 -11
  172. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +0 -95
  173. package/dist/schemas/upwork-account/upwork-business-manager-account.js +0 -35
  174. package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +0 -92
  175. package/dist/schemas/upwork-account/upwork-scraper-account.js +0 -31
  176. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +0 -90
  177. package/dist/schemas/upwork-account/upwork-scraping-account.js +0 -30
  178. package/dist/types/account/manager-account.d.ts +0 -7
  179. package/dist/types/account/manager-account.js +0 -2
  180. package/dist/types/ai-config/ai-config.d.ts +0 -6
  181. package/dist/types/ai-config/ai-config.js +0 -2
  182. package/dist/types/ai-config/index.d.ts +0 -1
  183. package/dist/types/ai-config/index.js +0 -17
  184. package/dist/types/bid/bid-status.d.ts +0 -5
  185. package/dist/types/bid/bid-status.js +0 -2
  186. package/dist/types/bidding/index.d.ts +0 -1
  187. package/dist/types/bidding/index.js +0 -17
  188. package/dist/types/bidding/proposal-bidding-status.d.ts +0 -3
  189. package/dist/types/bidding/proposal-bidding-status.js +0 -2
  190. package/dist/types/bidding/proposal-dto.d.ts +0 -3
  191. package/dist/types/bidding/proposal-dto.js +0 -2
  192. package/dist/types/job/job-details.d.ts +0 -36
  193. package/dist/types/job/job-details.js +0 -2
  194. package/dist/types/job/job-pipeline.d.ts +0 -4
  195. package/dist/types/job/job-pipeline.js +0 -2
  196. package/dist/types/job/job-suitability.d.ts +0 -3
  197. package/dist/types/job/job-suitability.js +0 -2
  198. package/dist/types/job/job.d.ts +0 -36
  199. package/dist/types/job/job.js +0 -2
  200. package/dist/types/knowledge-object/index.d.ts +0 -1
  201. package/dist/types/knowledge-object/index.js +0 -17
  202. package/dist/types/knowledge-object/knowledge-object.d.ts +0 -4
  203. package/dist/types/knowledge-object/knowledge-object.js +0 -2
  204. package/dist/types/scraper/scrape-response.d.ts +0 -4
  205. package/dist/types/scraper/scrape-response.js +0 -2
  206. package/dist/types/upwork-account/index.d.ts +0 -3
  207. package/dist/types/upwork-account/index.js +0 -19
  208. package/dist/types/upwork-account/upwork-account-status.d.ts +0 -3
  209. package/dist/types/upwork-account/upwork-account-status.js +0 -2
  210. package/dist/types/upwork-account/upwork-business-manager-account.d.ts +0 -7
  211. package/dist/types/upwork-account/upwork-business-manager-account.js +0 -2
  212. package/dist/types/upwork-account/upwork-scraping-account.d.ts +0 -5
  213. package/dist/types/upwork-account/upwork-scraping-account.js +0 -2
@@ -6,13 +6,13 @@ export declare const bidConfigSchema: z.ZodObject<{
6
6
  specialisedProfile: z.ZodNullable<z.ZodString>;
7
7
  }, "strip", z.ZodTypeAny, {
8
8
  agencyName: string | null;
9
- contractorName: string | null;
10
9
  bidderId: string | null;
10
+ contractorName: string | null;
11
11
  specialisedProfile: string | null;
12
12
  }, {
13
13
  agencyName: string | null;
14
- contractorName: string | null;
15
14
  bidderId: string | null;
15
+ contractorName: string | null;
16
16
  specialisedProfile: string | null;
17
17
  }>;
18
18
  export declare const organizationTypeSchema: z.ZodEnum<["agency", "freelancer"]>;
@@ -27,13 +27,13 @@ export declare const organizationSchema: z.ZodObject<{
27
27
  specialisedProfile: z.ZodNullable<z.ZodString>;
28
28
  }, "strip", z.ZodTypeAny, {
29
29
  agencyName: string | null;
30
- contractorName: string | null;
31
30
  bidderId: string | null;
31
+ contractorName: string | null;
32
32
  specialisedProfile: string | null;
33
33
  }, {
34
34
  agencyName: string | null;
35
- contractorName: string | null;
36
35
  bidderId: string | null;
36
+ contractorName: string | null;
37
37
  specialisedProfile: string | null;
38
38
  }>;
39
39
  createdAt: z.ZodDate;
@@ -42,26 +42,26 @@ export declare const organizationSchema: z.ZodObject<{
42
42
  type: "agency" | "freelancer";
43
43
  id: string;
44
44
  name: string;
45
- createdAt: Date;
46
- updatedAt: Date;
47
45
  bidConfig: {
48
46
  agencyName: string | null;
49
- contractorName: string | null;
50
47
  bidderId: string | null;
48
+ contractorName: string | null;
51
49
  specialisedProfile: string | null;
52
50
  };
51
+ createdAt: Date;
52
+ updatedAt: Date;
53
53
  }, {
54
54
  type: "agency" | "freelancer";
55
55
  id: string;
56
56
  name: string;
57
- createdAt: Date;
58
- updatedAt: Date;
59
57
  bidConfig: {
60
58
  agencyName: string | null;
61
- contractorName: string | null;
62
59
  bidderId: string | null;
60
+ contractorName: string | null;
63
61
  specialisedProfile: string | null;
64
62
  };
63
+ createdAt: Date;
64
+ updatedAt: Date;
65
65
  }>;
66
66
  export interface Organization extends z.infer<typeof organizationSchema> {
67
67
  }
@@ -1,19 +1,16 @@
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(),
1
+ import { z } from 'zod';
2
+ export const bidConfigSchema = z.object({
3
+ agencyName: z.string().nullable(),
4
+ bidderId: z.string().nullable(),
5
+ contractorName: z.string().nullable(),
6
+ specialisedProfile: z.string().nullable(),
10
7
  });
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(),
8
+ export const organizationTypeSchema = z.enum(['agency', 'freelancer']);
9
+ export const organizationSchema = z.object({
10
+ id: z.string(),
11
+ name: z.string(),
12
+ type: organizationTypeSchema,
13
+ bidConfig: bidConfigSchema,
14
+ createdAt: z.date(),
15
+ updatedAt: z.date(),
19
16
  });
@@ -1,17 +1 @@
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
+ export * from './proxy';
@@ -13,24 +13,24 @@ export declare const proxySchema: z.ZodObject<{
13
13
  bidderId: z.ZodNullable<z.ZodString>;
14
14
  }, "strip", z.ZodTypeAny, {
15
15
  id: string;
16
+ externalId: string;
17
+ host: string;
16
18
  port: number;
17
- country: "USA";
18
19
  username: string;
19
- host: string;
20
- provider: "webshare";
21
20
  password: string;
21
+ provider: "webshare";
22
+ country: "USA";
22
23
  bidderId: string | null;
23
- externalId: string;
24
24
  }, {
25
25
  id: string;
26
+ externalId: string;
27
+ host: string;
26
28
  port: number;
27
- country: "USA";
28
29
  username: string;
29
- host: string;
30
- provider: "webshare";
31
30
  password: string;
31
+ provider: "webshare";
32
+ country: "USA";
32
33
  bidderId: string | null;
33
- externalId: string;
34
34
  }>;
35
35
  export declare const externalProxySchema: z.ZodObject<Omit<{
36
36
  id: z.ZodString;
@@ -43,21 +43,21 @@ export declare const externalProxySchema: z.ZodObject<Omit<{
43
43
  country: z.ZodEnum<["USA"]>;
44
44
  bidderId: z.ZodNullable<z.ZodString>;
45
45
  }, "id" | "bidderId">, "strip", z.ZodTypeAny, {
46
+ externalId: string;
47
+ host: string;
46
48
  port: number;
47
- country: "USA";
48
49
  username: string;
49
- host: string;
50
- provider: "webshare";
51
50
  password: string;
52
- externalId: string;
51
+ provider: "webshare";
52
+ country: "USA";
53
53
  }, {
54
+ externalId: string;
55
+ host: string;
54
56
  port: number;
55
- country: "USA";
56
57
  username: string;
57
- host: string;
58
- provider: "webshare";
59
58
  password: string;
60
- externalId: string;
59
+ provider: "webshare";
60
+ country: "USA";
61
61
  }>;
62
62
  export type ProxyProvider = z.infer<typeof proxyProviderSchema>;
63
63
  export type ProxyCountry = z.infer<typeof proxyCountrySchema>;
@@ -1,21 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.externalProxySchema = exports.proxySchema = exports.proxyCountrySchema = exports.proxyProviderSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.proxyProviderSchema = zod_1.z.enum(['webshare']);
6
- exports.proxyCountrySchema = zod_1.z.enum(['USA']);
7
- exports.proxySchema = zod_1.z.object({
8
- id: zod_1.z.string(),
9
- externalId: zod_1.z.string(),
10
- host: zod_1.z.string(),
11
- port: zod_1.z.number(),
12
- username: zod_1.z.string(),
13
- password: zod_1.z.string(),
14
- provider: exports.proxyProviderSchema,
15
- country: exports.proxyCountrySchema,
16
- bidderId: zod_1.z.string().nullable(),
1
+ import { z } from 'zod';
2
+ export const proxyProviderSchema = z.enum(['webshare']);
3
+ export const proxyCountrySchema = z.enum(['USA']);
4
+ export const proxySchema = z.object({
5
+ id: z.string(),
6
+ externalId: z.string(),
7
+ host: z.string(),
8
+ port: z.number(),
9
+ username: z.string(),
10
+ password: z.string(),
11
+ provider: proxyProviderSchema,
12
+ country: proxyCountrySchema,
13
+ bidderId: z.string().nullable(),
17
14
  });
18
- exports.externalProxySchema = exports.proxySchema.omit({
15
+ export const externalProxySchema = proxySchema.omit({
19
16
  id: true,
20
17
  bidderId: true,
21
18
  });
@@ -3,17 +3,17 @@ export declare const savedSearchSchema: import("zod").ZodObject<{
3
3
  name: import("zod").ZodString;
4
4
  url: import("zod").ZodString;
5
5
  createdAt: import("zod").ZodDate;
6
- isActive: import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodLiteral<"true">, import("zod").ZodLiteral<"false">]>, boolean, boolean | "false" | "true">;
6
+ isActive: import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodLiteral<"true">, import("zod").ZodLiteral<"false">]>, boolean, boolean | "true" | "false">;
7
7
  }, "strip", import("zod").ZodTypeAny, {
8
8
  id: number;
9
- url: string;
10
9
  name: string;
11
- isActive: boolean;
10
+ url: string;
12
11
  createdAt: Date;
12
+ isActive: boolean;
13
13
  }, {
14
14
  id: number;
15
- url: string;
16
15
  name: string;
17
- isActive: boolean | "false" | "true";
16
+ url: string;
18
17
  createdAt: Date;
18
+ isActive: boolean | "true" | "false";
19
19
  }>;
@@ -1,12 +1,9 @@
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,
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,
12
9
  });
@@ -1,18 +1,2 @@
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
+ export * from './scrape-payload';
2
+ export * from './scrape-result';
@@ -1,33 +1,119 @@
1
- import { z } from "zod";
2
- export declare const scrapePayloadSchema: z.ZodObject<{
3
- latestJobsUrls: z.ZodArray<z.ZodString, "many">;
4
- cookies: z.ZodArray<z.ZodAny, "many">;
5
- username: z.ZodString;
6
- password: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
1
+ export declare const scrapePayloadSchema: import("zod").ZodObject<{
2
+ latestJobsUrls: import("zod").ZodArray<import("zod").ZodString, "many">;
3
+ cookies: import("zod").ZodArray<import("zod").ZodAny, "many">;
4
+ username: import("zod").ZodString;
5
+ password: import("zod").ZodString;
6
+ }, "strip", import("zod").ZodTypeAny, {
7
+ latestJobsUrls: string[];
8
+ cookies: any[];
8
9
  username: string;
9
10
  password: string;
10
- cookies: any[];
11
- latestJobsUrls: string[];
12
11
  }, {
12
+ latestJobsUrls: string[];
13
+ cookies: any[];
13
14
  username: string;
14
15
  password: string;
15
- cookies: any[];
16
- latestJobsUrls: string[];
17
16
  }>;
18
- export declare const scrapeUserProfilePayloadSchema: z.ZodObject<{
19
- profileUrl: z.ZodString;
20
- cookies: z.ZodArray<z.ZodAny, "many">;
21
- username: z.ZodString;
22
- password: z.ZodString;
23
- }, "strip", z.ZodTypeAny, {
17
+ export declare const scrapeUserProfilePayloadSchema: import("zod").ZodObject<{
18
+ profileUrl: import("zod").ZodString;
19
+ cookies: import("zod").ZodArray<import("zod").ZodAny, "many">;
20
+ username: import("zod").ZodString;
21
+ password: import("zod").ZodString;
22
+ }, "strip", import("zod").ZodTypeAny, {
23
+ cookies: any[];
24
24
  username: string;
25
25
  password: string;
26
- cookies: any[];
27
26
  profileUrl: string;
28
27
  }, {
28
+ cookies: any[];
29
29
  username: string;
30
30
  password: string;
31
- cookies: any[];
32
31
  profileUrl: string;
33
32
  }>;
33
+ export declare const scrapeJobPayloadSchema: import("zod").ZodObject<{
34
+ listing: import("zod").ZodObject<{
35
+ uid: import("zod").ZodNullable<import("zod").ZodString>;
36
+ title: import("zod").ZodNullable<import("zod").ZodString>;
37
+ jobUrl: import("zod").ZodNullable<import("zod").ZodString>;
38
+ datetime: import("zod").ZodNullable<import("zod").ZodString>;
39
+ isFeatured: import("zod").ZodNullable<import("zod").ZodBoolean>;
40
+ region: import("zod").ZodNullable<import("zod").ZodUnion<[import("zod").ZodLiteral<"USOnly">, import("zod").ZodLiteral<"UKOnly">, import("zod").ZodLiteral<"Worldwide">]>>;
41
+ }, "strip", import("zod").ZodTypeAny, {
42
+ uid: string | null;
43
+ title: string | null;
44
+ jobUrl: string | null;
45
+ datetime: string | null;
46
+ isFeatured: boolean | null;
47
+ region: "USOnly" | "UKOnly" | "Worldwide" | null;
48
+ }, {
49
+ uid: string | null;
50
+ title: string | null;
51
+ jobUrl: string | null;
52
+ datetime: string | null;
53
+ isFeatured: boolean | null;
54
+ region: "USOnly" | "UKOnly" | "Worldwide" | null;
55
+ }>;
56
+ }, "strip", import("zod").ZodTypeAny, {
57
+ listing: {
58
+ uid: string | null;
59
+ title: string | null;
60
+ jobUrl: string | null;
61
+ datetime: string | null;
62
+ isFeatured: boolean | null;
63
+ region: "USOnly" | "UKOnly" | "Worldwide" | null;
64
+ };
65
+ }, {
66
+ listing: {
67
+ uid: string | null;
68
+ title: string | null;
69
+ jobUrl: string | null;
70
+ datetime: string | null;
71
+ isFeatured: boolean | null;
72
+ region: "USOnly" | "UKOnly" | "Worldwide" | null;
73
+ };
74
+ }>;
75
+ export declare const scrapeJobActivityPayloadSchema: import("zod").ZodObject<{
76
+ listing: import("zod").ZodObject<{
77
+ uid: import("zod").ZodNullable<import("zod").ZodString>;
78
+ title: import("zod").ZodNullable<import("zod").ZodString>;
79
+ jobUrl: import("zod").ZodNullable<import("zod").ZodString>;
80
+ datetime: import("zod").ZodNullable<import("zod").ZodString>;
81
+ isFeatured: import("zod").ZodNullable<import("zod").ZodBoolean>;
82
+ region: import("zod").ZodNullable<import("zod").ZodUnion<[import("zod").ZodLiteral<"USOnly">, import("zod").ZodLiteral<"UKOnly">, import("zod").ZodLiteral<"Worldwide">]>>;
83
+ }, "strip", import("zod").ZodTypeAny, {
84
+ uid: string | null;
85
+ title: string | null;
86
+ jobUrl: string | null;
87
+ datetime: string | null;
88
+ isFeatured: boolean | null;
89
+ region: "USOnly" | "UKOnly" | "Worldwide" | null;
90
+ }, {
91
+ uid: string | null;
92
+ title: string | null;
93
+ jobUrl: string | null;
94
+ datetime: string | null;
95
+ isFeatured: boolean | null;
96
+ region: "USOnly" | "UKOnly" | "Worldwide" | null;
97
+ }>;
98
+ offsetHour: import("zod").ZodType<4 | 24, import("zod").ZodTypeDef, 4 | 24>;
99
+ }, "strip", import("zod").ZodTypeAny, {
100
+ listing: {
101
+ uid: string | null;
102
+ title: string | null;
103
+ jobUrl: string | null;
104
+ datetime: string | null;
105
+ isFeatured: boolean | null;
106
+ region: "USOnly" | "UKOnly" | "Worldwide" | null;
107
+ };
108
+ offsetHour: 4 | 24;
109
+ }, {
110
+ listing: {
111
+ uid: string | null;
112
+ title: string | null;
113
+ jobUrl: string | null;
114
+ datetime: string | null;
115
+ isFeatured: boolean | null;
116
+ region: "USOnly" | "UKOnly" | "Worldwide" | null;
117
+ };
118
+ offsetHour: 4 | 24;
119
+ }>;
@@ -1,16 +1,21 @@
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(),
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(),
10
8
  });
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(),
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,
16
21
  });