lancer-shared 1.2.91 → 1.2.92

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 (211) hide show
  1. package/dist/bundle.cjs.js +6 -5
  2. package/dist/constants/account-status.d.ts +3 -0
  3. package/dist/constants/account-status.js +17 -0
  4. package/dist/constants/collections.js +13 -11
  5. package/dist/constants/common-questions.js +4 -1
  6. package/dist/constants/index.js +32 -10
  7. package/dist/constants/job-filter-options.js +4 -1
  8. package/dist/constants/job-status.js +12 -7
  9. package/dist/constants/mappings/countryMapping.js +3 -1
  10. package/dist/constants/mappings/regionMapping.js +3 -1
  11. package/dist/constants/organization.d.ts +2 -2
  12. package/dist/constants/proxies.d.ts +4 -0
  13. package/dist/constants/routes.js +37 -39
  14. package/dist/constants/upwork-accounts.js +6 -3
  15. package/dist/constants/upwork-filters.d.ts +5 -0
  16. package/dist/constants/upwork-filters.js +75 -0
  17. package/dist/index.js +20 -4
  18. package/dist/schemas/account/account-status.js +5 -2
  19. package/dist/schemas/account/bidder-account.js +24 -22
  20. package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +5 -0
  21. package/dist/schemas/account/index.js +19 -3
  22. package/dist/schemas/account/manager-account.d.ts +116 -0
  23. package/dist/schemas/account/manager-account.js +38 -0
  24. package/dist/schemas/account/scraper-account.js +24 -21
  25. package/dist/schemas/agent/index.d.ts +15 -10
  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 +67 -58
  50. package/dist/schemas/campaign/campaign-analytics.js +31 -32
  51. package/dist/schemas/campaign/campaign-expenses.js +8 -5
  52. package/dist/schemas/campaign/campaign-insights.js +30 -30
  53. package/dist/schemas/campaign/campaign-integrations.d.ts +0 -5
  54. package/dist/schemas/campaign/campaign-integrations.js +13 -10
  55. package/dist/schemas/campaign/campaign-job-count.js +6 -3
  56. package/dist/schemas/campaign/campaign.d.ts +21 -21
  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/index.js +19 -0
  65. package/dist/schemas/job/job-details.d.ts +335 -0
  66. package/dist/schemas/job/job-details.js +29 -0
  67. package/dist/schemas/job/job-filters.d.ts +5 -8
  68. package/dist/schemas/job/job-note.d.ts +83 -0
  69. package/dist/schemas/job/job-note.js +30 -0
  70. package/dist/schemas/job/job-pipeline.d.ts +74 -0
  71. package/dist/schemas/job/job-pipeline.js +29 -0
  72. package/dist/schemas/job/job-status.d.ts +3 -0
  73. package/dist/schemas/job/job-status.js +27 -0
  74. package/dist/schemas/job/job-suitability.d.ts +12 -0
  75. package/dist/schemas/job/job-suitability.js +13 -0
  76. package/dist/schemas/job/job.d.ts +1160 -0
  77. package/dist/schemas/job/job.js +90 -0
  78. package/dist/schemas/job/pipeline-job.d.ts +608 -0
  79. package/dist/schemas/job/pipeline-job.js +43 -0
  80. package/dist/schemas/job/upwork-job.d.ts +334 -0
  81. package/dist/schemas/job/upwork-job.js +60 -0
  82. package/dist/schemas/job-filters/index.js +17 -1
  83. package/dist/schemas/job-filters/job-filters.js +65 -62
  84. package/dist/schemas/knowledge-object/index.d.ts +1 -0
  85. package/dist/schemas/knowledge-object/index.js +17 -0
  86. package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
  87. package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
  88. package/dist/schemas/lead/index.d.ts +39 -26
  89. package/dist/schemas/lead/index.js +19 -173
  90. package/dist/schemas/lead/lead-note.js +16 -13
  91. package/dist/schemas/lead/lead-status.js +6 -3
  92. package/dist/schemas/lead/lead.d.ts +1897 -0
  93. package/dist/schemas/lead/lead.js +143 -0
  94. package/dist/schemas/logger/index.js +17 -1
  95. package/dist/schemas/logger/log-event.d.ts +10 -10
  96. package/dist/schemas/logger/log-event.js +49 -100
  97. package/dist/schemas/organization/index.js +17 -70
  98. package/dist/schemas/organization/organization.d.ts +7 -177
  99. package/dist/schemas/organization/organization.js +17 -14
  100. package/dist/schemas/proxy/index.js +17 -3
  101. package/dist/schemas/proxy/proxy.js +19 -25
  102. package/dist/schemas/saved-search/index.js +11 -8
  103. package/dist/schemas/scraper/index.js +18 -2
  104. package/dist/schemas/scraper/scrape-payload.d.ts +15 -30
  105. package/dist/schemas/scraper/scrape-payload.js +14 -19
  106. package/dist/schemas/scraper/scrape-response.d.ts +345 -0
  107. package/dist/schemas/scraper/scrape-response.js +9 -0
  108. package/dist/schemas/scraper/scrape-result.js +21 -21
  109. package/dist/schemas/shared.js +9 -12
  110. package/dist/schemas/time-filter/index.js +8 -5
  111. package/dist/schemas/upwork-account/index.d.ts +3 -0
  112. package/dist/schemas/upwork-account/index.js +19 -0
  113. package/dist/schemas/upwork-account/upwork-account-status.d.ts +2 -0
  114. package/dist/schemas/upwork-account/upwork-account-status.js +11 -0
  115. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +95 -0
  116. package/dist/schemas/upwork-account/upwork-business-manager-account.js +35 -0
  117. package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +92 -0
  118. package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
  119. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
  120. package/dist/schemas/upwork-account/upwork-scraping-account.js +30 -0
  121. package/dist/schemas/user/index.js +41 -38
  122. package/dist/types/account/account-status.js +2 -1
  123. package/dist/types/account/bidder-account.js +2 -1
  124. package/dist/types/account/index.js +19 -3
  125. package/dist/types/account/manager-account.d.ts +7 -0
  126. package/dist/types/account/manager-account.js +2 -0
  127. package/dist/types/account/scraper-account.js +2 -1
  128. package/dist/types/ai/ai-config.js +2 -1
  129. package/dist/types/ai/index.js +19 -3
  130. package/dist/types/ai/proposal.js +2 -1
  131. package/dist/types/ai/suitability.js +2 -1
  132. package/dist/types/ai-config/ai-config.d.ts +6 -0
  133. package/dist/types/ai-config/ai-config.js +2 -0
  134. package/dist/types/ai-config/index.d.ts +1 -0
  135. package/dist/types/ai-config/index.js +17 -0
  136. package/dist/types/bid/bid-result.js +2 -1
  137. package/dist/types/bid/bid-status.d.ts +5 -0
  138. package/dist/types/bid/bid-status.js +2 -0
  139. package/dist/types/bid/bid.js +2 -1
  140. package/dist/types/bid/index.js +18 -2
  141. package/dist/types/bidding/index.d.ts +1 -0
  142. package/dist/types/bidding/index.js +17 -0
  143. package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
  144. package/dist/types/bidding/proposal-bidding-status.js +2 -0
  145. package/dist/types/bidding/proposal-dto.d.ts +3 -0
  146. package/dist/types/bidding/proposal-dto.js +2 -0
  147. package/dist/types/campaign/campaign-analytics.js +2 -1
  148. package/dist/types/campaign/campaign-expenses.js +2 -1
  149. package/dist/types/campaign/campaign-insights.js +2 -1
  150. package/dist/types/campaign/campaign-integrations.js +2 -1
  151. package/dist/types/campaign/campaign-job-count.js +2 -1
  152. package/dist/types/campaign/campaign.js +2 -1
  153. package/dist/types/campaign/index.js +22 -6
  154. package/dist/types/chat-message/chat-message.js +2 -1
  155. package/dist/types/chat-message/index.js +17 -1
  156. package/dist/types/config/agency-config.js +2 -1
  157. package/dist/types/config/index.js +17 -1
  158. package/dist/types/index.js +29 -15
  159. package/dist/types/job/index.js +19 -3
  160. package/dist/types/job/job-details.d.ts +36 -0
  161. package/dist/types/job/job-details.js +2 -0
  162. package/dist/types/job/job-note.js +2 -1
  163. package/dist/types/job/job-pipeline.d.ts +4 -0
  164. package/dist/types/job/job-pipeline.js +2 -0
  165. package/dist/types/job/job-status.js +4 -1
  166. package/dist/types/job/job-suitability.d.ts +3 -0
  167. package/dist/types/job/job-suitability.js +2 -0
  168. package/dist/types/job/job.d.ts +36 -0
  169. package/dist/types/job/job.js +2 -0
  170. package/dist/types/job-filters/index.js +17 -1
  171. package/dist/types/job-filters/job-filters.js +2 -1
  172. package/dist/types/knowledge-object/index.d.ts +1 -0
  173. package/dist/types/knowledge-object/index.js +17 -0
  174. package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
  175. package/dist/types/knowledge-object/knowledge-object.js +2 -0
  176. package/dist/types/logger/index.js +17 -1
  177. package/dist/types/logger/log-event.js +2 -1
  178. package/dist/types/saved-search/index.js +2 -1
  179. package/dist/types/scraper/index.js +18 -2
  180. package/dist/types/scraper/scrape-payload.js +2 -1
  181. package/dist/types/scraper/scrape-response.d.ts +4 -0
  182. package/dist/types/scraper/scrape-response.js +2 -0
  183. package/dist/types/scraper/scrape-result.js +2 -1
  184. package/dist/types/time-filter/index.js +2 -1
  185. package/dist/types/upwork-account/index.d.ts +3 -0
  186. package/dist/types/upwork-account/index.js +19 -0
  187. package/dist/types/upwork-account/upwork-account-status.d.ts +3 -0
  188. package/dist/types/upwork-account/upwork-account-status.js +2 -0
  189. package/dist/types/upwork-account/upwork-business-manager-account.d.ts +7 -0
  190. package/dist/types/upwork-account/upwork-business-manager-account.js +2 -0
  191. package/dist/types/upwork-account/upwork-scraping-account.d.ts +5 -0
  192. package/dist/types/upwork-account/upwork-scraping-account.js +2 -0
  193. package/dist/types/user/index.js +2 -1
  194. package/dist/utils/index.js +17 -1
  195. package/dist/utils/try-catch.js +23 -8
  196. package/package.json +1 -1
  197. package/dist/schemas/event/index.d.ts +0 -58
  198. package/dist/schemas/job/haha.json +0 -581
  199. package/dist/schemas/lead/nuxt.js +0 -287
  200. package/dist/schemas/meter-event/index.d.ts +0 -12
  201. package/dist/schemas/organization/member.js +0 -7
  202. package/dist/schemas/organization/subscription.js +0 -17
  203. package/dist/schemas/proxy/proxy-available-replacements.js +0 -3
  204. package/dist/schemas/proxy/proxy-country.js +0 -249
  205. package/dist/schemas/tier/index.d.ts +0 -119
  206. package/dist/schemas/transaction/index.js +0 -17
  207. package/dist/schemas/usage/index.js +0 -18
  208. package/dist/types/job/nuxt.js +0 -1
  209. package/dist/types/shared.js +0 -1
  210. package/dist/types/transaction/index.js +0 -1
  211. package/dist/types/usage/index.js +0 -1
@@ -0,0 +1,128 @@
1
+ import { z } from 'zod';
2
+ export declare const KnowledgeObjectSchema: z.ZodObject<{
3
+ categories: z.ZodObject<any, "strip", z.ZodTypeAny, {
4
+ [x: string]: any;
5
+ }, {
6
+ [x: string]: any;
7
+ }>;
8
+ experienceLevels: z.ZodObject<any, "strip", z.ZodTypeAny, {
9
+ [x: string]: any;
10
+ }, {
11
+ [x: string]: any;
12
+ }>;
13
+ minHourlyRate: z.ZodNullable<z.ZodNumber>;
14
+ fixedPriceMin: z.ZodNullable<z.ZodNumber>;
15
+ clientHistory: z.ZodObject<any, "strip", z.ZodTypeAny, {
16
+ [x: string]: any;
17
+ }, {
18
+ [x: string]: any;
19
+ }>;
20
+ keywords: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ categories: {
23
+ [x: string]: any;
24
+ };
25
+ experienceLevels: {
26
+ [x: string]: any;
27
+ };
28
+ minHourlyRate: number | null;
29
+ fixedPriceMin: number | null;
30
+ clientHistory: {
31
+ [x: string]: any;
32
+ };
33
+ keywords: string[] | null;
34
+ }, {
35
+ categories: {
36
+ [x: string]: any;
37
+ };
38
+ experienceLevels: {
39
+ [x: string]: any;
40
+ };
41
+ minHourlyRate: number | null;
42
+ fixedPriceMin: number | null;
43
+ clientHistory: {
44
+ [x: string]: any;
45
+ };
46
+ keywords: string[] | null;
47
+ }>;
48
+ export declare const chatResponseSchema: z.ZodObject<{
49
+ followUpQuestion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ knowledgeObject: z.ZodOptional<z.ZodObject<{
51
+ categories: z.ZodObject<any, "strip", z.ZodTypeAny, {
52
+ [x: string]: any;
53
+ }, {
54
+ [x: string]: any;
55
+ }>;
56
+ experienceLevels: z.ZodObject<any, "strip", z.ZodTypeAny, {
57
+ [x: string]: any;
58
+ }, {
59
+ [x: string]: any;
60
+ }>;
61
+ minHourlyRate: z.ZodNullable<z.ZodNumber>;
62
+ fixedPriceMin: z.ZodNullable<z.ZodNumber>;
63
+ clientHistory: z.ZodObject<any, "strip", z.ZodTypeAny, {
64
+ [x: string]: any;
65
+ }, {
66
+ [x: string]: any;
67
+ }>;
68
+ keywords: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ categories: {
71
+ [x: string]: any;
72
+ };
73
+ experienceLevels: {
74
+ [x: string]: any;
75
+ };
76
+ minHourlyRate: number | null;
77
+ fixedPriceMin: number | null;
78
+ clientHistory: {
79
+ [x: string]: any;
80
+ };
81
+ keywords: string[] | null;
82
+ }, {
83
+ categories: {
84
+ [x: string]: any;
85
+ };
86
+ experienceLevels: {
87
+ [x: string]: any;
88
+ };
89
+ minHourlyRate: number | null;
90
+ fixedPriceMin: number | null;
91
+ clientHistory: {
92
+ [x: string]: any;
93
+ };
94
+ keywords: string[] | null;
95
+ }>>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ followUpQuestion?: string | null | undefined;
98
+ knowledgeObject?: {
99
+ categories: {
100
+ [x: string]: any;
101
+ };
102
+ experienceLevels: {
103
+ [x: string]: any;
104
+ };
105
+ minHourlyRate: number | null;
106
+ fixedPriceMin: number | null;
107
+ clientHistory: {
108
+ [x: string]: any;
109
+ };
110
+ keywords: string[] | null;
111
+ } | undefined;
112
+ }, {
113
+ followUpQuestion?: string | null | undefined;
114
+ knowledgeObject?: {
115
+ categories: {
116
+ [x: string]: any;
117
+ };
118
+ experienceLevels: {
119
+ [x: string]: any;
120
+ };
121
+ minHourlyRate: number | null;
122
+ fixedPriceMin: number | null;
123
+ clientHistory: {
124
+ [x: string]: any;
125
+ };
126
+ keywords: string[] | null;
127
+ } | undefined;
128
+ }>;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chatResponseSchema = exports.KnowledgeObjectSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const job_filter_options_1 = require("../../constants/job-filter-options");
6
+ exports.KnowledgeObjectSchema = zod_1.z.object({
7
+ categories: zod_1.z
8
+ .object(job_filter_options_1.CATEGORIES.reduce((acc, category) => (Object.assign(Object.assign({}, acc), { [category]: zod_1.z
9
+ .boolean()
10
+ .nullable()
11
+ .describe(`Indicates if ${category} category is suitable based on skills and services`) })), {}))
12
+ .describe('Job categories for the agency'),
13
+ experienceLevels: zod_1.z
14
+ .object(job_filter_options_1.EXPERIENCE_LEVELS.reduce((acc, level) => (Object.assign(Object.assign({}, acc), { [level]: zod_1.z
15
+ .boolean()
16
+ .nullable()
17
+ .describe(`Has ${level} experience level`) })), {}))
18
+ .describe('Experience level of the agency in the services they offer'),
19
+ minHourlyRate: zod_1.z
20
+ .number()
21
+ .min(0)
22
+ .nullable()
23
+ .describe('Minimum hourly rate in USD that the agency is willing to accept for providing their services'),
24
+ fixedPriceMin: zod_1.z
25
+ .number()
26
+ .min(0)
27
+ .nullable()
28
+ .describe('Minimum budget of the project in USD that the agency is willing to accept for providing their services'),
29
+ clientHistory: zod_1.z
30
+ .object(job_filter_options_1.CLIENT_HISTORY.reduce((acc, history) => (Object.assign(Object.assign({}, acc), { [history]: zod_1.z
31
+ .boolean()
32
+ .nullable()
33
+ .describe(`Whether the job poster (client) has made ${history} hires on Upwork. This refers to the client's hiring history, not the agency's experience.`) })), {}))
34
+ .describe("Filters for the job poster's (client's) hiring history on Upwork - indicates how many previous hires the client should have made to be considered suitable"),
35
+ keywords: zod_1.z
36
+ .array(zod_1.z.string())
37
+ .nullable()
38
+ .describe('List of search keywords that best match the agency\'s expertise and services. These keywords will be used when searching for job posts on Upwork to find the most relevant opportunities. Examples might include specific technologies, skills, or service areas like "React.js", "mobile development", or "UI/UX design".'),
39
+ });
40
+ exports.chatResponseSchema = zod_1.z.object({
41
+ followUpQuestion: zod_1.z
42
+ .string()
43
+ .nullable()
44
+ .optional()
45
+ .describe('This is a question that you should ask a user for a field that you left null. This is important. Always ask this if there is a null field.'),
46
+ knowledgeObject: exports.KnowledgeObjectSchema.optional(),
47
+ });
@@ -336,8 +336,9 @@ export declare const leadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
336
336
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
337
337
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
338
338
  wonAmount: z.ZodOptional<z.ZodNumber>;
339
- biddingTaskId: z.ZodNullable<z.ZodString>;
340
- doNotApplyReason: z.ZodNullable<z.ZodString>;
339
+ feedbackCheckTaskId: z.ZodNullable<z.ZodString>;
340
+ bidDecision: z.ZodNullable<z.ZodEnum<["proceeded", "rejected"]>>;
341
+ rejectedFeedback: z.ZodNullable<z.ZodString>;
341
342
  }>, "processed">, "strip", z.ZodTypeAny, {
342
343
  id: string | null;
343
344
  uid: string | null;
@@ -447,8 +448,9 @@ export declare const leadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
447
448
  boostingAmount: number | null;
448
449
  biddingTaskScheduled: boolean | null;
449
450
  scheduledBiddingTime: number | null;
450
- biddingTaskId: string | null;
451
- doNotApplyReason: string | null;
451
+ feedbackCheckTaskId: string | null;
452
+ bidDecision: "proceeded" | "rejected" | null;
453
+ rejectedFeedback: string | null;
452
454
  activity?: Partial<Record<"4h" | "24h", {
453
455
  proposals: {
454
456
  min: number | null;
@@ -580,8 +582,9 @@ export declare const leadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
580
582
  boostingAmount: number | null;
581
583
  biddingTaskScheduled: boolean | null;
582
584
  scheduledBiddingTime: number | null;
583
- biddingTaskId: string | null;
584
- doNotApplyReason: string | null;
585
+ feedbackCheckTaskId: string | null;
586
+ bidDecision: "proceeded" | "rejected" | null;
587
+ rejectedFeedback: string | null;
585
588
  activity?: Partial<Record<"4h" | "24h", {
586
589
  proposals: {
587
590
  min: number | null;
@@ -931,8 +934,9 @@ export declare const leadResponseSchema: z.ZodObject<{
931
934
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
932
935
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
933
936
  wonAmount: z.ZodOptional<z.ZodNumber>;
934
- biddingTaskId: z.ZodNullable<z.ZodString>;
935
- doNotApplyReason: z.ZodNullable<z.ZodString>;
937
+ feedbackCheckTaskId: z.ZodNullable<z.ZodString>;
938
+ bidDecision: z.ZodNullable<z.ZodEnum<["proceeded", "rejected"]>>;
939
+ rejectedFeedback: z.ZodNullable<z.ZodString>;
936
940
  }>, "processed">, "strip", z.ZodTypeAny, {
937
941
  id: string | null;
938
942
  uid: string | null;
@@ -1042,8 +1046,9 @@ export declare const leadResponseSchema: z.ZodObject<{
1042
1046
  boostingAmount: number | null;
1043
1047
  biddingTaskScheduled: boolean | null;
1044
1048
  scheduledBiddingTime: number | null;
1045
- biddingTaskId: string | null;
1046
- doNotApplyReason: string | null;
1049
+ feedbackCheckTaskId: string | null;
1050
+ bidDecision: "proceeded" | "rejected" | null;
1051
+ rejectedFeedback: string | null;
1047
1052
  activity?: Partial<Record<"4h" | "24h", {
1048
1053
  proposals: {
1049
1054
  min: number | null;
@@ -1175,8 +1180,9 @@ export declare const leadResponseSchema: z.ZodObject<{
1175
1180
  boostingAmount: number | null;
1176
1181
  biddingTaskScheduled: boolean | null;
1177
1182
  scheduledBiddingTime: number | null;
1178
- biddingTaskId: string | null;
1179
- doNotApplyReason: string | null;
1183
+ feedbackCheckTaskId: string | null;
1184
+ bidDecision: "proceeded" | "rejected" | null;
1185
+ rejectedFeedback: string | null;
1180
1186
  activity?: Partial<Record<"4h" | "24h", {
1181
1187
  proposals: {
1182
1188
  min: number | null;
@@ -1313,8 +1319,9 @@ export declare const leadResponseSchema: z.ZodObject<{
1313
1319
  boostingAmount: number | null;
1314
1320
  biddingTaskScheduled: boolean | null;
1315
1321
  scheduledBiddingTime: number | null;
1316
- biddingTaskId: string | null;
1317
- doNotApplyReason: string | null;
1322
+ feedbackCheckTaskId: string | null;
1323
+ bidDecision: "proceeded" | "rejected" | null;
1324
+ rejectedFeedback: string | null;
1318
1325
  activity?: Partial<Record<"4h" | "24h", {
1319
1326
  proposals: {
1320
1327
  min: number | null;
@@ -1451,8 +1458,9 @@ export declare const leadResponseSchema: z.ZodObject<{
1451
1458
  boostingAmount: number | null;
1452
1459
  biddingTaskScheduled: boolean | null;
1453
1460
  scheduledBiddingTime: number | null;
1454
- biddingTaskId: string | null;
1455
- doNotApplyReason: string | null;
1461
+ feedbackCheckTaskId: string | null;
1462
+ bidDecision: "proceeded" | "rejected" | null;
1463
+ rejectedFeedback: string | null;
1456
1464
  activity?: Partial<Record<"4h" | "24h", {
1457
1465
  proposals: {
1458
1466
  min: number | null;
@@ -2342,8 +2350,9 @@ export declare const findLeadsResponseSchema: z.ZodObject<{
2342
2350
  biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
2343
2351
  scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
2344
2352
  wonAmount: z.ZodOptional<z.ZodNumber>;
2345
- biddingTaskId: z.ZodNullable<z.ZodString>;
2346
- doNotApplyReason: z.ZodNullable<z.ZodString>;
2353
+ feedbackCheckTaskId: z.ZodNullable<z.ZodString>;
2354
+ bidDecision: z.ZodNullable<z.ZodEnum<["proceeded", "rejected"]>>;
2355
+ rejectedFeedback: z.ZodNullable<z.ZodString>;
2347
2356
  }>, "processed">, "strip", z.ZodTypeAny, {
2348
2357
  id: string | null;
2349
2358
  uid: string | null;
@@ -2453,8 +2462,9 @@ export declare const findLeadsResponseSchema: z.ZodObject<{
2453
2462
  boostingAmount: number | null;
2454
2463
  biddingTaskScheduled: boolean | null;
2455
2464
  scheduledBiddingTime: number | null;
2456
- biddingTaskId: string | null;
2457
- doNotApplyReason: string | null;
2465
+ feedbackCheckTaskId: string | null;
2466
+ bidDecision: "proceeded" | "rejected" | null;
2467
+ rejectedFeedback: string | null;
2458
2468
  activity?: Partial<Record<"4h" | "24h", {
2459
2469
  proposals: {
2460
2470
  min: number | null;
@@ -2586,8 +2596,9 @@ export declare const findLeadsResponseSchema: z.ZodObject<{
2586
2596
  boostingAmount: number | null;
2587
2597
  biddingTaskScheduled: boolean | null;
2588
2598
  scheduledBiddingTime: number | null;
2589
- biddingTaskId: string | null;
2590
- doNotApplyReason: string | null;
2599
+ feedbackCheckTaskId: string | null;
2600
+ bidDecision: "proceeded" | "rejected" | null;
2601
+ rejectedFeedback: string | null;
2591
2602
  activity?: Partial<Record<"4h" | "24h", {
2592
2603
  proposals: {
2593
2604
  min: number | null;
@@ -2835,8 +2846,9 @@ export declare const findLeadsResponseSchema: z.ZodObject<{
2835
2846
  boostingAmount: number | null;
2836
2847
  biddingTaskScheduled: boolean | null;
2837
2848
  scheduledBiddingTime: number | null;
2838
- biddingTaskId: string | null;
2839
- doNotApplyReason: string | null;
2849
+ feedbackCheckTaskId: string | null;
2850
+ bidDecision: "proceeded" | "rejected" | null;
2851
+ rejectedFeedback: string | null;
2840
2852
  activity?: Partial<Record<"4h" | "24h", {
2841
2853
  proposals: {
2842
2854
  min: number | null;
@@ -3084,8 +3096,9 @@ export declare const findLeadsResponseSchema: z.ZodObject<{
3084
3096
  boostingAmount: number | null;
3085
3097
  biddingTaskScheduled: boolean | null;
3086
3098
  scheduledBiddingTime: number | null;
3087
- biddingTaskId: string | null;
3088
- doNotApplyReason: string | null;
3099
+ feedbackCheckTaskId: string | null;
3100
+ bidDecision: "proceeded" | "rejected" | null;
3101
+ rejectedFeedback: string | null;
3089
3102
  activity?: Partial<Record<"4h" | "24h", {
3090
3103
  proposals: {
3091
3104
  min: number | null;
@@ -1,173 +1,19 @@
1
- import { array, boolean, custom, number, object, record, string, z } from "zod";
2
- import { regionSchema } from "../shared";
3
- import { leadNoteSchema } from "./lead-note";
4
- import { agentStatusSchema, leadStatusSchema } from "./lead-status";
5
- export const jobSkillsSchema = object({
6
- name: string(),
7
- });
8
- export const vendorQualificationSchema = object({
9
- location: string().nullable(),
10
- talentType: z.enum(["Agency", "Independent", "unspecified"]).nullable(),
11
- englishLevel: string().nullable(),
12
- minimumEarnings: number().nullable(),
13
- jobSuccessScore: string().nullable(),
14
- includeRisingTalent: string().nullable(),
15
- });
16
- export const clientInfoSchema = object({
17
- isPaymentVerified: boolean().nullable(),
18
- isPhoneVerified: boolean().nullable(),
19
- numberOfReviews: number().nullable(),
20
- rating: number().nullable(),
21
- country: string().nullable(),
22
- region: string().nullable(),
23
- jobsPosted: number().nullable(),
24
- totalSpent: number().nullable(),
25
- numberOfHires: number().nullable(),
26
- activeEngagements: number().nullable(),
27
- openJobs: number().nullable(),
28
- hireRate: number().nullable(),
29
- memberSince: string().nullable(),
30
- companyIndustry: string().nullable(),
31
- companySize: string().nullable(),
32
- enterpriseClient: boolean().nullable(),
33
- avgHourlyRatePaid: number().nullable(),
34
- });
35
- export const clientReviewSchema = object({
36
- jobTitle: string().nullable(),
37
- freelancerName: string().nullable(),
38
- freelancerRating: number().nullable(),
39
- freelancerFeedback: string().nullable(),
40
- clientFeedback: string().nullable(),
41
- clientFeedbackRating: number().nullable(),
42
- dateRange: string().nullable(),
43
- paymentType: string().nullable(),
44
- fixedPrice: number().nullable(),
45
- hourlyRate: number().nullable(),
46
- numHours: number().nullable(),
47
- totalBilled: number().nullable(),
48
- });
49
- export const bidRangeSchema = object({
50
- high: number().nullable(),
51
- avg: number().nullable(),
52
- low: number().nullable(),
53
- });
54
- export const jobActivitySchema = object({
55
- proposals: object({
56
- min: number().nullable(),
57
- max: number().nullable(),
58
- }),
59
- lastViewedByClient: string().nullable(),
60
- lastViewedByClientTimestamp: number().nullable(),
61
- hires: number().nullable(),
62
- interviewing: number().nullable(),
63
- invitesSent: number().nullable(),
64
- unansweredInvites: number().nullable(),
65
- updatedAt: number().nullable(),
66
- });
67
- export const jobActivityDeltaSchema = object({
68
- proposals: number(),
69
- interviewing: number(),
70
- hires: number(),
71
- invitesSent: number(),
72
- unansweredInvites: number(),
73
- });
74
- export const metadataSchema = object({
75
- hours: string().nullable(),
76
- duration: string().nullable(),
77
- experienceLevel: string().nullable(),
78
- hourlyRate: z
79
- .object({
80
- min: number().nullable(),
81
- max: number().nullable(),
82
- })
83
- .nullable(),
84
- paymentType: string().nullable(),
85
- fixedPrice: number().nullable(),
86
- });
87
- export const jobActivityOffsetHours = [4, 24];
88
- export const jobActivityOffsetEnum = z.enum(jobActivityOffsetHours.map((h) => `${h}h`));
89
- export const upworkJobSchema = object({
90
- id: string().nullable(),
91
- uid: string().nullable(),
92
- createdAt: number().nullable(),
93
- title: string().nullable(),
94
- category: string().nullable(),
95
- skills: array(jobSkillsSchema).nullable(),
96
- datetime: number().nullable(),
97
- description: string().nullable(),
98
- descriptionLength: number().nullable(),
99
- connectsRequired: number().nullable(),
100
- projectType: string().nullable(),
101
- projectDuration: string().nullable(),
102
- questions: array(string()).nullable(),
103
- jobUrl: string().nullable(),
104
- metadata: metadataSchema.nullable(),
105
- clientInfo: clientInfoSchema.nullable(),
106
- vendorQualifications: vendorQualificationSchema.nullable(),
107
- processed: boolean().nullable(),
108
- isFeatured: boolean().nullable(),
109
- clientReviews: array(clientReviewSchema).nullable(),
110
- region: regionSchema.nullable(),
111
- bidRange: bidRangeSchema.nullable(),
112
- jobActivity: jobActivitySchema.nullable(),
113
- activityUpdates: z
114
- .union([z.literal(1), z.literal(2), z.literal(3)])
115
- .nullable(),
116
- activity: record(jobActivityOffsetEnum, jobActivitySchema).nullish(),
117
- activityDelta: jobActivityDeltaSchema.nullish(),
118
- });
119
- export const questionAnswerPairSchema = z.object({
120
- question: z.string(),
121
- answer: z.string(),
122
- });
123
- export const leadSchema = upworkJobSchema
124
- .extend({
125
- jobId: string(),
126
- updatedAt: number().nullable(),
127
- suitabilityRating: number().nullable(),
128
- suitabilityReason: string().nullable(),
129
- proposal: string().nullable(),
130
- questionAnswerPairs: array(questionAnswerPairSchema).nullable(),
131
- agentStatus: agentStatusSchema.nullable(),
132
- leadStatus: leadStatusSchema.nullable(),
133
- notes: array(leadNoteSchema).nullable(),
134
- biddingAmount: number().nullable(),
135
- boosted: boolean().nullable(),
136
- boostingAmount: number().nullable(),
137
- biddingTaskScheduled: boolean().nullable(),
138
- scheduledBiddingTime: number().nullable(),
139
- })
140
- .omit({
141
- processed: true,
142
- });
143
- export const leadResponseSchema = object({
144
- leads: array(leadSchema),
145
- nextCursor: string().nullable(),
146
- hasMore: boolean(),
147
- leadCounts: number().nullable(),
148
- });
149
- export const jobListingSchema = object({
150
- uid: string().nullable(),
151
- title: string().nullable(),
152
- jobUrl: string().nullable(),
153
- datetime: string().nullable(),
154
- isFeatured: boolean().nullable(),
155
- region: regionSchema.nullable(),
156
- });
157
- export const jobActivityOffsetHourSchema = custom((val) => jobActivityOffsetHours.includes(val));
158
- export const jobActivityUpdateSchema = object({
159
- jobUrl: string(),
160
- data: jobActivitySchema,
161
- offsetHour: jobActivityOffsetHourSchema,
162
- scrapedAt: number(),
163
- });
164
- export const jobActivitySnapshotSchema = object({
165
- jobUrl: string(),
166
- activity: jobActivitySchema,
167
- postedAt: number(),
168
- scrapedAt: number(),
169
- hoursSincePosted: number(),
170
- });
171
- export * from "./lead-note";
172
- export * from "./lead-status";
173
- export * from "./nuxt";
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("./lead"), exports);
18
+ __exportStar(require("./lead-note"), exports);
19
+ __exportStar(require("./lead-status"), exports);
@@ -1,20 +1,23 @@
1
- import { z } from "zod";
2
- export const leadNoteSchema = z.object({
3
- id: z.string(),
4
- jobId: z.string(),
5
- content: z.string(),
6
- order: z.number(),
7
- bgColor: z.string(),
8
- createdAt: z.number(),
9
- updatedAt: z.number(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateLeadNotesOrderSchema = exports.updateLeadNoteSchema = exports.createLeadNoteSchema = exports.leadNoteSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.leadNoteSchema = zod_1.z.object({
6
+ id: zod_1.z.string(),
7
+ jobId: zod_1.z.string(),
8
+ content: zod_1.z.string(),
9
+ order: zod_1.z.number(),
10
+ bgColor: zod_1.z.string(),
11
+ createdAt: zod_1.z.number(),
12
+ updatedAt: zod_1.z.number(),
10
13
  });
11
- export const createLeadNoteSchema = leadNoteSchema.pick({
14
+ exports.createLeadNoteSchema = exports.leadNoteSchema.pick({
12
15
  id: true,
13
16
  content: true,
14
17
  order: true,
15
18
  bgColor: true,
16
19
  });
17
- export const updateLeadNoteSchema = leadNoteSchema
20
+ exports.updateLeadNoteSchema = exports.leadNoteSchema
18
21
  .pick({
19
22
  id: true,
20
23
  content: true,
@@ -22,6 +25,6 @@ export const updateLeadNoteSchema = leadNoteSchema
22
25
  bgColor: true,
23
26
  })
24
27
  .partial({ content: true, order: true, bgColor: true });
25
- export const updateLeadNotesOrderSchema = z.object({
26
- order: z.array(z.object({ id: z.string(), order: z.number() })),
28
+ exports.updateLeadNotesOrderSchema = zod_1.z.object({
29
+ order: zod_1.z.array(zod_1.z.object({ id: zod_1.z.string(), order: zod_1.z.number() })),
27
30
  });
@@ -1,5 +1,8 @@
1
- import { z } from "zod";
2
- export const agentStatusSchema = z.enum([
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.leadStatusSchema = exports.agentStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.agentStatusSchema = zod_1.z.enum([
3
6
  "suitabilityPending",
4
7
  "suitabilityProcessing",
5
8
  "suitabilityComplete",
@@ -12,7 +15,7 @@ export const agentStatusSchema = z.enum([
12
15
  "biddingFailed",
13
16
  "jobArchived",
14
17
  ]);
15
- export const leadStatusSchema = z.enum([
18
+ exports.leadStatusSchema = zod_1.z.enum([
16
19
  "leads",
17
20
  "contacted",
18
21
  "viewed",