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
@@ -1,23 +1,23 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scrapeUserProfileResultSchema = exports.scrapeResultSchema = exports.regionSchema = void 0;
4
- const zod_1 = require("zod");
5
- const lead_1 = require("../lead");
6
- const user_1 = require("../user");
7
- exports.regionSchema = zod_1.z.union([
8
- zod_1.z.literal("USOnly"),
9
- zod_1.z.literal("UKOnly"),
10
- zod_1.z.literal("Worldwide"),
11
- ]);
12
- exports.scrapeResultSchema = zod_1.z.object({
13
- jobs: zod_1.z.array(lead_1.upworkJobSchema),
14
- cookies: zod_1.z.array(zod_1.z.any()),
15
- region: exports.regionSchema,
16
- usAccountCookies: zod_1.z.array(zod_1.z.any()).optional(),
17
- ukAccountCookies: zod_1.z.array(zod_1.z.any()).optional(),
1
+ import { any, array, boolean, object, string } from "zod";
2
+ import { jobListingSchema, upworkJobSchema } from "../lead";
3
+ import { regionSchema } from "../shared";
4
+ import { upworkProfileSchema } from "../user";
5
+ export const scrapeResultSchema = object({
6
+ jobs: array(upworkJobSchema),
7
+ cookies: array(any()),
8
+ region: regionSchema,
9
+ usAccountCookies: array(any()).optional(),
10
+ ukAccountCookies: array(any()).optional(),
18
11
  });
19
- exports.scrapeUserProfileResultSchema = zod_1.z.object({
20
- success: zod_1.z.boolean(),
21
- message: zod_1.z.string(),
22
- data: user_1.upworkProfileSchema,
12
+ export const scrapeUserProfileResultSchema = object({
13
+ success: boolean(),
14
+ message: string(),
15
+ data: upworkProfileSchema,
16
+ });
17
+ export const scrapeFeedResultSchema = object({
18
+ listings: array(jobListingSchema),
19
+ cookies: array(any()),
20
+ region: regionSchema,
21
+ usAccountCookies: array(any()).optional(),
22
+ ukAccountCookies: array(any()).optional(),
23
23
  });
@@ -1,7 +1,8 @@
1
1
  import { z } from "zod";
2
- export declare const booleanSchema: z.ZodEffects<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, boolean, boolean | "false" | "true">;
2
+ export declare const booleanSchema: z.ZodEffects<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"true">, z.ZodLiteral<"false">]>, boolean, boolean | "true" | "false">;
3
3
  export declare const dateSchema: (params?: {
4
4
  invalid_type_error?: string;
5
5
  required_error?: string;
6
6
  }) => z.ZodDate;
7
7
  export declare const passwordSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
8
+ export declare const regionSchema: z.ZodUnion<[z.ZodLiteral<"USOnly">, z.ZodLiteral<"UKOnly">, z.ZodLiteral<"Worldwide">]>;
@@ -1,16 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.passwordSchema = exports.dateSchema = exports.booleanSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.booleanSchema = zod_1.z
6
- .union([zod_1.z.boolean(), zod_1.z.literal("true"), zod_1.z.literal("false")])
1
+ import { coerce, string, z } from "zod";
2
+ export const booleanSchema = z
3
+ .union([z.boolean(), z.literal("true"), z.literal("false")])
7
4
  .transform((value) => value === true || value === "true");
8
- const dateSchema = (params = {}) => zod_1.coerce.date(Object.assign({}, params));
9
- exports.dateSchema = dateSchema;
10
- exports.passwordSchema = (0, zod_1.string)()
5
+ export const dateSchema = (params = {}) => coerce.date({
6
+ ...params,
7
+ });
8
+ export const passwordSchema = string()
11
9
  .min(8, "Password must be at least 8 characters long.")
12
10
  .max(255, "Password must be at most 255 characters long.")
13
11
  .refine((password) => /[a-z]/.test(password), "Password must contain at least one lowercase letter.")
14
12
  .refine((password) => /[A-Z]/.test(password), "Password must contain at least one uppercase letter.")
15
13
  .refine((password) => /\d/.test(password), "Password must contain at least one number.")
16
14
  .refine((password) => /[\W_]/.test(password), "Password must contain at least one symbol.");
15
+ export const regionSchema = z.union([
16
+ z.literal("USOnly"),
17
+ z.literal("UKOnly"),
18
+ z.literal("Worldwide"),
19
+ ]);
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.timeFilterSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.timeFilterSchema = zod_1.z.union([
6
- zod_1.z.literal("last_7_days"),
7
- zod_1.z.literal("last_30_days"),
8
- zod_1.z.literal("all_time"),
1
+ import { z } from "zod";
2
+ export const timeFilterSchema = z.union([
3
+ z.literal("last_7_days"),
4
+ z.literal("last_30_days"),
5
+ z.literal("all_time"),
9
6
  ]);
@@ -10,22 +10,22 @@ export declare const userSchema: z.ZodObject<{
10
10
  updatedAt: z.ZodNumber;
11
11
  }, "strip", z.ZodTypeAny, {
12
12
  id: string;
13
- email: string;
14
- createdAt: number;
15
- updatedAt: number;
16
13
  firstName: string;
17
14
  lastName: string;
18
15
  displayName: string;
19
- organizationIds: string[];
20
- }, {
21
- id: string;
22
16
  email: string;
17
+ organizationIds: string[];
23
18
  createdAt: number;
24
19
  updatedAt: number;
20
+ }, {
21
+ id: string;
25
22
  firstName: string;
26
23
  lastName: string;
27
24
  displayName: string;
25
+ email: string;
28
26
  organizationIds: string[];
27
+ createdAt: number;
28
+ updatedAt: number;
29
29
  }>;
30
30
  export declare const loginSchema: z.ZodObject<{
31
31
  email: z.ZodString;
@@ -44,28 +44,28 @@ export declare const registerSchema: z.ZodEffects<z.ZodObject<{
44
44
  password: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
45
45
  confirmPassword: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
46
46
  }, "strip", z.ZodTypeAny, {
47
- email: string;
48
- password: string;
49
47
  firstName: string;
50
48
  lastName: string;
51
- confirmPassword: string;
52
- }, {
53
49
  email: string;
54
50
  password: string;
51
+ confirmPassword: string;
52
+ }, {
55
53
  firstName: string;
56
54
  lastName: string;
57
- confirmPassword: string;
58
- }>, {
59
55
  email: string;
60
56
  password: string;
57
+ confirmPassword: string;
58
+ }>, {
61
59
  firstName: string;
62
60
  lastName: string;
63
- confirmPassword: string;
64
- }, {
65
61
  email: string;
66
62
  password: string;
63
+ confirmPassword: string;
64
+ }, {
67
65
  firstName: string;
68
66
  lastName: string;
67
+ email: string;
68
+ password: string;
69
69
  confirmPassword: string;
70
70
  }>;
71
71
  export declare const upworkProfileSchema: z.ZodObject<{
@@ -79,13 +79,13 @@ export declare const upworkProfileSchema: z.ZodObject<{
79
79
  period: z.ZodString;
80
80
  description: z.ZodString;
81
81
  }, "strip", z.ZodTypeAny, {
82
- description: string;
83
82
  jobTitle: string;
84
83
  period: string;
85
- }, {
86
84
  description: string;
85
+ }, {
87
86
  jobTitle: string;
88
87
  period: string;
88
+ description: string;
89
89
  }>, "many">>;
90
90
  languages: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
91
91
  portfolio: z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -94,14 +94,14 @@ export declare const upworkProfileSchema: z.ZodObject<{
94
94
  skills: z.ZodArray<z.ZodString, "many">;
95
95
  publishedDate: z.ZodString;
96
96
  }, "strip", z.ZodTypeAny, {
97
- title: string;
98
- description: string;
99
97
  skills: string[];
98
+ description: string;
99
+ title: string;
100
100
  publishedDate: string;
101
101
  }, {
102
- title: string;
103
- description: string;
104
102
  skills: string[];
103
+ description: string;
104
+ title: string;
105
105
  publishedDate: string;
106
106
  }>, "many">>;
107
107
  }, "strip", z.ZodTypeAny, {
@@ -111,15 +111,15 @@ export declare const upworkProfileSchema: z.ZodObject<{
111
111
  skills: string[] | null;
112
112
  certifications: string[] | null;
113
113
  employmentHistory: {
114
- description: string;
115
114
  jobTitle: string;
116
115
  period: string;
116
+ description: string;
117
117
  }[] | null;
118
118
  languages: Record<string, string> | null;
119
119
  portfolio: {
120
- title: string;
121
- description: string;
122
120
  skills: string[];
121
+ description: string;
122
+ title: string;
123
123
  publishedDate: string;
124
124
  }[] | null;
125
125
  }, {
@@ -129,15 +129,15 @@ export declare const upworkProfileSchema: z.ZodObject<{
129
129
  skills: string[] | null;
130
130
  certifications: string[] | null;
131
131
  employmentHistory: {
132
- description: string;
133
132
  jobTitle: string;
134
133
  period: string;
134
+ description: string;
135
135
  }[] | null;
136
136
  languages: Record<string, string> | null;
137
137
  portfolio: {
138
- title: string;
139
- description: string;
140
138
  skills: string[];
139
+ description: string;
140
+ title: string;
141
141
  publishedDate: string;
142
142
  }[] | null;
143
143
  }>;
@@ -1,55 +1,52 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.upworkProfileSchema = exports.registerSchema = exports.loginSchema = exports.userSchema = void 0;
4
- const zod_1 = require("zod");
5
- const shared_1 = require("../shared");
6
- exports.userSchema = (0, zod_1.object)({
7
- id: (0, zod_1.string)(),
8
- firstName: (0, zod_1.string)(),
9
- lastName: (0, zod_1.string)(),
10
- displayName: (0, zod_1.string)(),
11
- email: (0, zod_1.string)(),
12
- organizationIds: zod_1.z.array((0, zod_1.string)()),
13
- createdAt: (0, zod_1.number)(),
14
- updatedAt: (0, zod_1.number)(),
1
+ import { number, object, string, z } from "zod";
2
+ import { passwordSchema } from "../shared";
3
+ export const userSchema = object({
4
+ id: string(),
5
+ firstName: string(),
6
+ lastName: string(),
7
+ displayName: string(),
8
+ email: string(),
9
+ organizationIds: z.array(string()),
10
+ createdAt: number(),
11
+ updatedAt: number(),
15
12
  });
16
- exports.loginSchema = (0, zod_1.object)({
17
- email: (0, zod_1.string)().email(),
18
- password: shared_1.passwordSchema,
13
+ export const loginSchema = object({
14
+ email: string().email(),
15
+ password: passwordSchema,
19
16
  });
20
- exports.registerSchema = (0, zod_1.object)({
21
- firstName: (0, zod_1.string)().min(1, "First name is required").max(255),
22
- lastName: (0, zod_1.string)().min(1, "Last name is required").max(255),
23
- email: (0, zod_1.string)()
17
+ export const registerSchema = object({
18
+ firstName: string().min(1, "First name is required").max(255),
19
+ lastName: string().min(1, "Last name is required").max(255),
20
+ email: string()
24
21
  .email("Must be a valid email address")
25
22
  .max(255)
26
23
  .min(1, "Email address is required"),
27
- password: shared_1.passwordSchema,
28
- confirmPassword: shared_1.passwordSchema,
24
+ password: passwordSchema,
25
+ confirmPassword: passwordSchema,
29
26
  }).refine(({ password, confirmPassword }) => password === confirmPassword, {
30
27
  message: `Passwords don't match.`,
31
28
  path: ["confirmPassword"],
32
29
  });
33
- exports.upworkProfileSchema = (0, zod_1.object)({
34
- name: (0, zod_1.string)().nullable(),
35
- country: (0, zod_1.string)().nullable(),
36
- bio: (0, zod_1.string)().nullable(),
37
- skills: zod_1.z.array((0, zod_1.string)()).nullable(),
38
- certifications: zod_1.z.array((0, zod_1.string)()).nullable(),
39
- employmentHistory: zod_1.z
40
- .array(zod_1.z.object({
41
- jobTitle: (0, zod_1.string)(),
42
- period: (0, zod_1.string)(),
43
- description: (0, zod_1.string)(),
30
+ export const upworkProfileSchema = object({
31
+ name: string().nullable(),
32
+ country: string().nullable(),
33
+ bio: string().nullable(),
34
+ skills: z.array(string()).nullable(),
35
+ certifications: z.array(string()).nullable(),
36
+ employmentHistory: z
37
+ .array(z.object({
38
+ jobTitle: string(),
39
+ period: string(),
40
+ description: string(),
44
41
  }))
45
42
  .nullable(),
46
- languages: zod_1.z.record((0, zod_1.string)(), (0, zod_1.string)()).nullable(),
47
- portfolio: zod_1.z
48
- .array(zod_1.z.object({
49
- title: (0, zod_1.string)(),
50
- description: (0, zod_1.string)(),
51
- skills: zod_1.z.array((0, zod_1.string)()),
52
- publishedDate: (0, zod_1.string)(),
43
+ languages: z.record(string(), string()).nullable(),
44
+ portfolio: z
45
+ .array(z.object({
46
+ title: string(),
47
+ description: string(),
48
+ skills: z.array(string()),
49
+ publishedDate: string(),
53
50
  }))
54
51
  .nullable(),
55
52
  });
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,19 +1,3 @@
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("./account-status"), exports);
18
- __exportStar(require("./bidder-account"), exports);
19
- __exportStar(require("./scraper-account"), exports);
1
+ export * from './account-status';
2
+ export * from './bidder-account';
3
+ export * from './scraper-account';
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,19 +1,3 @@
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("./ai-config"), exports);
18
- __exportStar(require("./proposal"), exports);
19
- __exportStar(require("./suitability"), exports);
1
+ export * from './ai-config';
2
+ export * from './proposal';
3
+ export * from './suitability';
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -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("./bid"), exports);
18
- __exportStar(require("./bid-result"), exports);
1
+ export * from './bid';
2
+ export * from './bid-result';
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,22 +1,6 @@
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("./campaign"), exports);
18
- __exportStar(require("./campaign-insights"), exports);
19
- __exportStar(require("./campaign-job-count"), exports);
20
- __exportStar(require("./campaign-expenses"), exports);
21
- __exportStar(require("./campaign-integrations"), exports);
22
- __exportStar(require("./campaign-analytics"), exports);
1
+ export * from "./campaign";
2
+ export * from "./campaign-insights";
3
+ export * from "./campaign-job-count";
4
+ export * from "./campaign-expenses";
5
+ export * from "./campaign-integrations";
6
+ export * from "./campaign-analytics";
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -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("./chat-message"), exports);
1
+ export * from './chat-message';
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -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("./agency-config"), exports);
1
+ export * from './agency-config';
@@ -11,3 +11,4 @@ export * from "./logger";
11
11
  export * from "./account";
12
12
  export * from "./bid";
13
13
  export * from "./time-filter";
14
+ export * from "./shared";
@@ -1,29 +1,14 @@
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("./chat-message"), exports);
18
- __exportStar(require("./job"), exports);
19
- __exportStar(require("./saved-search"), exports);
20
- __exportStar(require("./user"), exports);
21
- __exportStar(require("./job-filters"), exports);
22
- __exportStar(require("./campaign"), exports);
23
- __exportStar(require("./ai"), exports);
24
- __exportStar(require("./scraper"), exports);
25
- __exportStar(require("./config"), exports);
26
- __exportStar(require("./logger"), exports);
27
- __exportStar(require("./account"), exports);
28
- __exportStar(require("./bid"), exports);
29
- __exportStar(require("./time-filter"), exports);
1
+ export * from "./chat-message";
2
+ export * from "./job";
3
+ export * from "./saved-search";
4
+ export * from "./user";
5
+ export * from "./job-filters";
6
+ export * from "./campaign";
7
+ export * from "./ai";
8
+ export * from "./scraper";
9
+ export * from "./config";
10
+ export * from "./logger";
11
+ export * from "./account";
12
+ export * from "./bid";
13
+ export * from "./time-filter";
14
+ export * from "./shared";