lancer-shared 1.2.78 → 1.2.80

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 (196) hide show
  1. package/dist/bundle.cjs.js +7 -1
  2. package/dist/constants/account-status.d.ts +3 -0
  3. package/dist/constants/account-status.js +17 -0
  4. package/dist/constants/collections.d.ts +13 -0
  5. package/dist/constants/collections.js +16 -0
  6. package/dist/constants/common-questions.js +60 -0
  7. package/dist/constants/index.js +40 -0
  8. package/dist/constants/job-filter-options.js +268 -0
  9. package/dist/constants/job-status.js +26 -0
  10. package/dist/constants/mappings/countryMapping.js +122 -0
  11. package/dist/constants/mappings/regionMapping.js +242 -0
  12. package/dist/constants/organization.d.ts +2 -0
  13. package/dist/constants/routes.d.ts +6 -1
  14. package/dist/constants/routes.js +108 -0
  15. package/dist/constants/upwork-accounts.js +21 -0
  16. package/dist/index.js +20 -0
  17. package/dist/schemas/account/account-status.js +11 -0
  18. package/dist/schemas/account/bidder-account.js +37 -0
  19. package/dist/schemas/account/index.js +19 -0
  20. package/dist/schemas/account/manager-account.d.ts +116 -0
  21. package/dist/schemas/account/manager-account.js +38 -0
  22. package/dist/schemas/account/scraper-account.js +37 -0
  23. package/dist/schemas/ai/ai-config.d.ts +36 -0
  24. package/dist/schemas/ai/ai-config.js +12 -0
  25. package/dist/schemas/ai/index.d.ts +3 -0
  26. package/dist/schemas/ai/index.js +19 -0
  27. package/dist/schemas/ai/proposal.d.ts +82 -0
  28. package/dist/schemas/ai/proposal.js +16 -0
  29. package/dist/schemas/ai/suitability.d.ts +37 -0
  30. package/dist/schemas/ai/suitability.js +17 -0
  31. package/dist/schemas/bid/bid-result.js +15 -0
  32. package/dist/schemas/bid/bid.js +36 -0
  33. package/dist/schemas/bid/index.js +18 -0
  34. package/dist/schemas/bidding/index.d.ts +1 -0
  35. package/dist/schemas/bidding/index.js +17 -0
  36. package/dist/schemas/bidding/proposal-bidding-status.d.ts +26 -0
  37. package/dist/schemas/bidding/proposal-bidding-status.js +18 -0
  38. package/dist/schemas/campaign/campaign-ai-metrics.js +9 -0
  39. package/dist/schemas/campaign/campaign-analytics.js +41 -0
  40. package/dist/schemas/campaign/campaign-expenses.js +9 -0
  41. package/dist/schemas/campaign/campaign-insights.js +31 -0
  42. package/dist/schemas/campaign/campaign-integrations.d.ts +87 -0
  43. package/dist/schemas/campaign/campaign-integrations.js +16 -0
  44. package/dist/schemas/campaign/campaign-job-count.d.ts +2 -0
  45. package/dist/schemas/campaign/campaign-job-count.js +6 -0
  46. package/dist/schemas/campaign/campaign.d.ts +9 -0
  47. package/dist/schemas/campaign/campaign.js +44 -0
  48. package/dist/schemas/campaign/index.js +23 -0
  49. package/dist/schemas/chat-message/chat-message.d.ts +31 -0
  50. package/dist/schemas/chat-message/chat-message.js +13 -0
  51. package/dist/schemas/chat-message/index.d.ts +1 -0
  52. package/dist/schemas/chat-message/index.js +17 -0
  53. package/dist/schemas/config/agency-config.d.ts +17 -0
  54. package/dist/schemas/config/agency-config.js +10 -0
  55. package/dist/schemas/config/index.d.ts +1 -0
  56. package/dist/schemas/config/index.js +17 -0
  57. package/dist/schemas/index.js +32 -0
  58. package/dist/schemas/job/index.js +19 -0
  59. package/dist/schemas/job/job-details.d.ts +335 -0
  60. package/dist/schemas/job/job-details.js +29 -0
  61. package/dist/schemas/job/job-note.d.ts +83 -0
  62. package/dist/schemas/job/job-note.js +30 -0
  63. package/dist/schemas/job/job-status.d.ts +3 -0
  64. package/dist/schemas/job/job-status.js +27 -0
  65. package/dist/schemas/job/job.d.ts +1160 -0
  66. package/dist/schemas/job/job.js +90 -0
  67. package/dist/schemas/job/pipeline-job.d.ts +602 -0
  68. package/dist/schemas/job/pipeline-job.js +42 -0
  69. package/dist/schemas/job/upwork-job.d.ts +334 -0
  70. package/dist/schemas/job/upwork-job.js +60 -0
  71. package/dist/schemas/job-filters/index.d.ts +1 -0
  72. package/dist/schemas/job-filters/index.js +17 -0
  73. package/dist/schemas/job-filters/job-filters.d.ts +241 -0
  74. package/dist/schemas/job-filters/job-filters.js +87 -0
  75. package/dist/schemas/lead/index.js +19 -0
  76. package/dist/schemas/lead/lead-note.d.ts +83 -0
  77. package/dist/schemas/lead/lead-note.js +30 -0
  78. package/dist/schemas/lead/lead-status.js +26 -0
  79. package/dist/schemas/lead/lead.d.ts +1897 -0
  80. package/dist/schemas/lead/lead.js +143 -0
  81. package/dist/schemas/lead/nuxt.d.ts +1664 -0
  82. package/dist/schemas/logger/index.js +17 -0
  83. package/dist/schemas/logger/log-event.js +66 -0
  84. package/dist/schemas/organization/index.js +17 -0
  85. package/dist/schemas/organization/organization.d.ts +70 -0
  86. package/dist/schemas/organization/organization.js +19 -0
  87. package/dist/schemas/proxy/index.js +17 -0
  88. package/dist/schemas/proxy/proxy.js +21 -0
  89. package/dist/schemas/saved-search/index.js +12 -0
  90. package/dist/schemas/scraper/index.js +18 -0
  91. package/dist/schemas/scraper/scrape-payload.js +16 -0
  92. package/dist/schemas/scraper/scrape-result.js +23 -0
  93. package/dist/schemas/shared.js +16 -0
  94. package/dist/schemas/time-filter/index.js +9 -0
  95. package/dist/schemas/upwork-account/index.d.ts +3 -0
  96. package/dist/schemas/upwork-account/index.js +19 -0
  97. package/dist/schemas/upwork-account/upwork-account-status.d.ts +2 -0
  98. package/dist/schemas/upwork-account/upwork-account-status.js +11 -0
  99. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +95 -0
  100. package/dist/schemas/upwork-account/upwork-business-manager-account.js +35 -0
  101. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
  102. package/dist/schemas/upwork-account/upwork-scraping-account.js +29 -0
  103. package/dist/schemas/user/index.js +55 -0
  104. package/dist/types/account/account-status.d.ts +3 -0
  105. package/dist/types/account/account-status.js +2 -0
  106. package/dist/types/account/bidder-account.d.ts +7 -0
  107. package/dist/types/account/bidder-account.js +2 -0
  108. package/dist/types/account/index.d.ts +3 -0
  109. package/dist/types/account/index.js +19 -0
  110. package/dist/types/account/manager-account.d.ts +7 -0
  111. package/dist/types/account/manager-account.js +2 -0
  112. package/dist/types/account/scraper-account.d.ts +5 -0
  113. package/dist/types/account/scraper-account.js +2 -0
  114. package/dist/types/ai/ai-config.d.ts +6 -0
  115. package/dist/types/ai/ai-config.js +2 -0
  116. package/dist/types/ai/index.d.ts +3 -0
  117. package/dist/types/ai/index.js +19 -0
  118. package/dist/types/ai/proposal.d.ts +10 -0
  119. package/dist/types/ai/proposal.js +2 -0
  120. package/dist/types/ai/suitability.d.ts +6 -0
  121. package/dist/types/ai/suitability.js +2 -0
  122. package/dist/types/bid/bid-result.d.ts +5 -0
  123. package/dist/types/bid/bid-result.js +2 -0
  124. package/dist/types/bid/bid.d.ts +9 -0
  125. package/dist/types/bid/bid.js +2 -0
  126. package/dist/types/bid/index.d.ts +2 -0
  127. package/dist/types/bid/index.js +18 -0
  128. package/dist/types/bidding/index.d.ts +1 -0
  129. package/dist/types/bidding/index.js +17 -0
  130. package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
  131. package/dist/types/bidding/proposal-bidding-status.js +2 -0
  132. package/dist/types/campaign/campaign-analytics.d.ts +7 -0
  133. package/dist/types/campaign/campaign-analytics.js +2 -0
  134. package/dist/types/campaign/campaign-expenses.d.ts +3 -0
  135. package/dist/types/campaign/campaign-expenses.js +2 -0
  136. package/dist/types/campaign/campaign-insights.js +2 -0
  137. package/dist/types/campaign/campaign-integrations.d.ts +6 -0
  138. package/dist/types/campaign/campaign-integrations.js +2 -0
  139. package/dist/types/campaign/campaign-job-count.d.ts +4 -0
  140. package/dist/types/campaign/campaign-job-count.js +2 -0
  141. package/dist/types/campaign/campaign.js +2 -0
  142. package/dist/types/campaign/index.js +22 -0
  143. package/dist/types/chat-message/chat-message.d.ts +4 -0
  144. package/dist/types/chat-message/chat-message.js +2 -0
  145. package/dist/types/chat-message/index.d.ts +1 -0
  146. package/dist/types/chat-message/index.js +17 -0
  147. package/dist/types/config/agency-config.d.ts +4 -0
  148. package/dist/types/config/agency-config.js +2 -0
  149. package/dist/types/config/index.d.ts +1 -0
  150. package/dist/types/config/index.js +17 -0
  151. package/dist/types/index.d.ts +15 -0
  152. package/dist/types/index.js +29 -0
  153. package/dist/types/job/index.d.ts +48 -0
  154. package/dist/types/job/index.js +19 -0
  155. package/dist/types/job/job-details.d.ts +36 -0
  156. package/dist/types/job/job-details.js +2 -0
  157. package/dist/types/job/job-note.d.ts +10 -0
  158. package/dist/types/job/job-note.js +2 -0
  159. package/dist/types/job/job-status.d.ts +5 -0
  160. package/dist/types/job/job-status.js +12 -0
  161. package/dist/types/job/job.d.ts +36 -0
  162. package/dist/types/job/job.js +2 -0
  163. package/dist/types/job/nuxt.d.ts +4 -0
  164. package/dist/types/job-filters/index.d.ts +1 -0
  165. package/dist/types/job-filters/index.js +17 -0
  166. package/dist/types/job-filters/job-filters.d.ts +4 -0
  167. package/dist/types/job-filters/job-filters.js +2 -0
  168. package/dist/types/logger/index.d.ts +1 -0
  169. package/dist/types/logger/index.js +17 -0
  170. package/dist/types/logger/log-event.js +2 -0
  171. package/dist/types/saved-search/index.d.ts +6 -0
  172. package/dist/types/saved-search/index.js +2 -0
  173. package/dist/types/scraper/index.d.ts +2 -0
  174. package/dist/types/scraper/index.js +18 -0
  175. package/dist/types/scraper/scrape-payload.d.ts +10 -0
  176. package/dist/types/scraper/scrape-payload.js +2 -0
  177. package/dist/types/scraper/scrape-result.d.ts +8 -0
  178. package/dist/types/scraper/scrape-result.js +2 -0
  179. package/dist/types/shared.d.ts +8 -0
  180. package/dist/types/time-filter/index.d.ts +3 -0
  181. package/dist/types/time-filter/index.js +2 -0
  182. package/dist/types/transaction/index.d.ts +4 -0
  183. package/dist/types/upwork-account/index.d.ts +3 -0
  184. package/dist/types/upwork-account/index.js +19 -0
  185. package/dist/types/upwork-account/upwork-account-status.d.ts +3 -0
  186. package/dist/types/upwork-account/upwork-account-status.js +2 -0
  187. package/dist/types/upwork-account/upwork-business-manager-account.d.ts +7 -0
  188. package/dist/types/upwork-account/upwork-business-manager-account.js +2 -0
  189. package/dist/types/upwork-account/upwork-scraping-account.d.ts +5 -0
  190. package/dist/types/upwork-account/upwork-scraping-account.js +2 -0
  191. package/dist/types/usage/index.d.ts +6 -0
  192. package/dist/types/user/index.d.ts +15 -0
  193. package/dist/types/user/index.js +2 -0
  194. package/dist/utils/index.js +17 -0
  195. package/dist/utils/try-catch.js +25 -0
  196. package/package.json +1 -1
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const regionMapping = {
4
+ Africa: [
5
+ "Algeria",
6
+ "Angola",
7
+ "Benin",
8
+ "Botswana",
9
+ "Burkina Faso",
10
+ "Burundi",
11
+ "Cabo Verde",
12
+ "Cameroon",
13
+ "Central African Republic",
14
+ "Chad",
15
+ "Comoros",
16
+ "Congo",
17
+ "Congo, the Democratic Republic of the",
18
+ "Cote d'Ivoire",
19
+ "Djibouti",
20
+ "Egypt",
21
+ "Equatorial Guinea",
22
+ "Eritrea",
23
+ "Eswatini",
24
+ "Ethiopia",
25
+ "Gabon",
26
+ "Gambia",
27
+ "Ghana",
28
+ "Guinea",
29
+ "Guinea-Bissau",
30
+ "Kenya",
31
+ "Lesotho",
32
+ "Liberia",
33
+ "Libya",
34
+ "Madagascar",
35
+ "Malawi",
36
+ "Mali",
37
+ "Mauritania",
38
+ "Mauritius",
39
+ "Morocco",
40
+ "Mozambique",
41
+ "Namibia",
42
+ "Niger",
43
+ "Nigeria",
44
+ "Rwanda",
45
+ "Sao Tome and Principe",
46
+ "Senegal",
47
+ "Seychelles",
48
+ "Sierra Leone",
49
+ "Somalia",
50
+ "South Africa",
51
+ "South Sudan",
52
+ "Sudan",
53
+ "Tanzania",
54
+ "Togo",
55
+ "Tunisia",
56
+ "Uganda",
57
+ "Zambia",
58
+ "Zimbabwe",
59
+ ],
60
+ Americas: [
61
+ "Anguilla",
62
+ "Antigua and Barbuda",
63
+ "Argentina",
64
+ "Aruba",
65
+ "Bahamas",
66
+ "Barbados",
67
+ "Belize",
68
+ "Bermuda",
69
+ "Bolivia",
70
+ "Brazil",
71
+ "British Virgin Islands",
72
+ "Canada",
73
+ "Cayman Islands",
74
+ "Chile",
75
+ "Colombia",
76
+ "Costa Rica",
77
+ "Cuba",
78
+ "Curacao",
79
+ "Dominica",
80
+ "Dominican Republic",
81
+ "Ecuador",
82
+ "El Salvador",
83
+ "Falkland Islands",
84
+ "French Guiana",
85
+ "Grenada",
86
+ "Guadeloupe",
87
+ "Guatemala",
88
+ "Guyana",
89
+ "Haiti",
90
+ "Honduras",
91
+ "Jamaica",
92
+ "Martinique",
93
+ "Mexico",
94
+ "Montserrat",
95
+ "Nicaragua",
96
+ "Panama",
97
+ "Paraguay",
98
+ "Peru",
99
+ "Puerto Rico",
100
+ "Saint Kitts and Nevis",
101
+ "Saint Lucia",
102
+ "Saint Vincent and the Grenadines",
103
+ "Suriname",
104
+ "Trinidad and Tobago",
105
+ "Turks and Caicos Islands",
106
+ "United States",
107
+ "United States Virgin Islands",
108
+ "Uruguay",
109
+ "Venezuela",
110
+ ],
111
+ Antarctica: ["French Southern And Antarctic Lands"],
112
+ Asia: [
113
+ "Afghanistan",
114
+ "Armenia",
115
+ "Azerbaijan",
116
+ "Bahrain",
117
+ "Bangladesh",
118
+ "Bhutan",
119
+ "Brunei Darussalam",
120
+ "Cambodia",
121
+ "China",
122
+ "East Timor",
123
+ "Georgia",
124
+ "Hong Kong",
125
+ "India",
126
+ "Indonesia",
127
+ "Iran",
128
+ "Iraq",
129
+ "Israel",
130
+ "Japan",
131
+ "Jordan",
132
+ "Kazakhstan",
133
+ "Kuwait",
134
+ "Kyrgyzstan",
135
+ "Laos",
136
+ "Lebanon",
137
+ "Macao",
138
+ "Malaysia",
139
+ "Maldives",
140
+ "Mongolia",
141
+ "Myanmar",
142
+ "Nepal",
143
+ "Palestine",
144
+ "Oman",
145
+ "Pakistan",
146
+ "Palestinian Territories",
147
+ "Philippines",
148
+ "Qatar",
149
+ "Russia",
150
+ "Saudi Arabia",
151
+ "Singapore",
152
+ "South Korea",
153
+ "Sri Lanka",
154
+ "Syria",
155
+ "Taiwan",
156
+ "Tajikistan",
157
+ "Turkey",
158
+ "Thailand",
159
+ "Turkmenistan",
160
+ "United Arab Emirates",
161
+ "Uzbekistan",
162
+ "Vietnam",
163
+ "Yemen",
164
+ ],
165
+ Europe: [
166
+ "Albania",
167
+ "Andorra",
168
+ "Austria",
169
+ "Belarus",
170
+ "Belgium",
171
+ "Bosnia and Herzegovina",
172
+ "Bulgaria",
173
+ "Croatia",
174
+ "Cyprus",
175
+ "Czech Republic",
176
+ "Denmark",
177
+ "Estonia",
178
+ "Faroe Islands",
179
+ "Finland",
180
+ "France",
181
+ "Germany",
182
+ "Gibraltar",
183
+ "Greece",
184
+ "Guernsey",
185
+ "Hungary",
186
+ "Iceland",
187
+ "Ireland",
188
+ "Isle of Man",
189
+ "Italy",
190
+ "Jersey",
191
+ "Latvia",
192
+ "Liechtenstein",
193
+ "Lithuania",
194
+ "Luxembourg",
195
+ "Malta",
196
+ "Moldova",
197
+ "Monaco",
198
+ "Montenegro",
199
+ "Netherlands",
200
+ "Macedonia",
201
+ "Norway",
202
+ "Poland",
203
+ "Portugal",
204
+ "Romania",
205
+ "San Marino",
206
+ "Serbia",
207
+ "Slovakia",
208
+ "Slovenia",
209
+ "Spain",
210
+ "Sweden",
211
+ "Switzerland",
212
+ "Ukraine",
213
+ "United Kingdom",
214
+ "Vatican City",
215
+ ],
216
+ Oceania: [
217
+ "American Samoa",
218
+ "Australia",
219
+ "Cook Islands",
220
+ "Fiji",
221
+ "French Polynesia",
222
+ "Guam",
223
+ "Kiribati",
224
+ "Marshall Islands",
225
+ "Micronesia",
226
+ "Nauru",
227
+ "New Caledonia",
228
+ "New Zealand",
229
+ "Niue",
230
+ "Northern Mariana Islands",
231
+ "Palau",
232
+ "Papua New Guinea",
233
+ "Samoa",
234
+ "Solomon Islands",
235
+ "Tokelau",
236
+ "Tonga",
237
+ "Tuvalu",
238
+ "Vanuatu",
239
+ "Wallis and Futuna",
240
+ ],
241
+ };
242
+ exports.default = regionMapping;
@@ -0,0 +1,2 @@
1
+ import { TrackUsageEventType } from "../schemas";
2
+ export declare const creditDeductionAmountMap: Record<TrackUsageEventType, number>;
@@ -83,6 +83,11 @@ export declare const ROUTES: {
83
83
  readonly BASE: "admin/alerts";
84
84
  readonly SEND_ALERT: "admin/alerts/send";
85
85
  };
86
+ readonly AGENT: {
87
+ readonly BASE: "admin/agent";
88
+ readonly TEST_SUITABILITY: "admin/agent/test-suitability";
89
+ readonly TEST_PROPOSAL: "admin/agent/test-proposal";
90
+ };
86
91
  };
87
92
  readonly BID: {
88
93
  readonly BASE: "bid";
@@ -143,7 +148,7 @@ export declare const ROUTES: {
143
148
  readonly BASE: (organizationId: string, campaignId: string) => string;
144
149
  readonly BY_ID: (organizationId: string, campaignId: string, activityId: string) => string;
145
150
  };
146
- readonly CHECK_LEAD_STATUS: (organizationId: string, campaignId: string) => string;
151
+ readonly CHECK_LEAD_STATUS: (organizationId: string, campaignId: string, leadId: string) => string;
147
152
  };
148
153
  readonly USAGE_SUMMARIES: {
149
154
  readonly DAILY: {
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildRoute = exports.ROUTES = void 0;
4
+ exports.ROUTES = {
5
+ AUTH: {
6
+ BASE: 'auth',
7
+ REGISTER: 'auth/register',
8
+ },
9
+ EVENTS: {
10
+ BASE: 'events',
11
+ BY_ID: (id) => `events/${id}`,
12
+ },
13
+ CAMPAIGNS: {
14
+ BASE: 'campaigns',
15
+ BY_ID: (id) => `campaigns/${id}`,
16
+ LEADS: {
17
+ BASE: (campaignId) => `campaigns/${campaignId}/leads`,
18
+ BY_ID: (campaignId, leadId) => `campaigns/${campaignId}/leads/${leadId}`,
19
+ SYNC: (campaignId) => `campaigns/${campaignId}/leads/sync`,
20
+ NOTES: (campaignId, leadId, noteId) => `campaigns/${campaignId}/leads/${leadId}/notes/${noteId}`,
21
+ SEARCH: (campaignId) => `campaigns/${campaignId}/leads/search`,
22
+ },
23
+ INSIGHTS: (campaignId) => `campaigns/${campaignId}/insights`,
24
+ AI_METRICS: (campaignId) => `campaigns/${campaignId}/ai-metrics`,
25
+ CONNECT_SAVED: (campaignId) => `campaigns/${campaignId}/get-connects-saved`,
26
+ ANALYTICS: (campaignId, timeFilter) => `campaigns/${campaignId}/analytics?createdAt=${timeFilter}`,
27
+ ACTIVITY: (campaignId, status, offset, limit) => `campaigns/${campaignId}/activity?status=${status}&offset=${offset}&limit=${limit}`,
28
+ INTEGRATIONS: {
29
+ BASE: (campaignId) => `campaigns/${campaignId}/integrations`,
30
+ TEST_SUITABILITY_WEBHOOK: (campaignId, integrationId) => `campaigns/${campaignId}/integrations/${integrationId}/suitability/test-webhook`,
31
+ TEST_PROPOSAL_WEBHOOK: (campaignId, integrationId) => `campaigns/${campaignId}/integrations/${integrationId}/proposal/test-webhook`,
32
+ SUITABILITY_NOTIFICATION: (campaignId, leadId) => `campaigns/${campaignId}/integrations/suitability/notify/${leadId}`,
33
+ PROPOSAL_SENT_NOTIFICATION: (campaignId, leadId) => `campaigns/${campaignId}/integrations/proposal-sent/notify/${leadId}`,
34
+ SLACK: {
35
+ BASE: (campaignId) => `campaigns/${campaignId}/integrations/slack`,
36
+ TEST_SUITABILITY_WEBHOOK: (campaignId) => `campaigns/${campaignId}/integrations/slack/suitability/test-webhook`,
37
+ TEST_PROPOSAL_WEBHOOK: (campaignId) => `campaigns/${campaignId}/integrations/slack/proposal/test-webhook`,
38
+ },
39
+ DISCORD: {
40
+ BASE: (campaignId) => `campaigns/${campaignId}/integrations/discord`,
41
+ TEST_SUITABILITY_WEBHOOK: (campaignId) => `campaigns/${campaignId}/integrations/discord/suitability/test-webhook`,
42
+ TEST_PROPOSAL_WEBHOOK: (campaignId) => `campaigns/${campaignId}/integrations/discord/proposal/test-webhook`,
43
+ },
44
+ },
45
+ },
46
+ JOBS: {
47
+ BASE: 'jobs',
48
+ BY_ID: (id) => `jobs/${id}`,
49
+ IMPORT: 'jobs/import',
50
+ FILTER_OPTIONS: 'jobs/filter-options',
51
+ TOTAL_JOBS: 'jobs/total-jobs',
52
+ GET_JOB_TITLE: (jobId) => `jobs/get-job-title/${jobId}`,
53
+ SEARCH: 'jobs/search',
54
+ },
55
+ USERS: {
56
+ BASE: 'users',
57
+ BY_ID: (id) => `users/${id}`,
58
+ },
59
+ AI_CONFIG: {
60
+ BASE: 'ai-config',
61
+ GENERATE_KNOWLEDGE_BASE: 'ai-config/generate-knowledge-base',
62
+ },
63
+ COOKIES: {
64
+ BASE: 'cookies',
65
+ SCRAPE: 'cookies/scrape-cookies',
66
+ },
67
+ SCRAPING: {
68
+ BASE: 'scraping',
69
+ START_SCRAPING: 'scraping/start',
70
+ START_WORLDWIDE_SCRAPING: 'scraping/start-worldwide',
71
+ START_US_SCRAPING: 'scraping/start-us',
72
+ START_UK_SCRAPING: 'scraping/start-uk',
73
+ UPDATE_ACTIVITY_4H_WORLDWIDE: 'scraping/update-activity/4h',
74
+ UPDATE_ACTIVITY_4H_UK: 'scraping/update-activity/4h/uk',
75
+ UPDATE_ACTIVITY_4H_US: 'scraping/update-activity/4h/us',
76
+ UPDATE_ACTIVITY_24H_WORLDWIDE: 'scraping/update-activity/24h',
77
+ UPDATE_ACTIVITY_24H_UK: 'scraping/update-activity/24h/uk',
78
+ UPDATE_ACTIVITY_24H_US: 'scraping/update-activity/24h/us',
79
+ },
80
+ ADMIN: {
81
+ BASE: 'admin',
82
+ BIDDER_ACCOUNTS: {
83
+ BASE: 'admin/bidder-accounts',
84
+ BY_ID: (id) => `admin/bidder-accounts/${id}`,
85
+ BY_PROVIDER: (provider) => `admin/bidder-accounts/${provider}`,
86
+ BY_PROVIDER_AND_ID: (provider, id) => `admin/bidder-accounts/${provider}/${id}`,
87
+ },
88
+ SCRAPER_ACCOUNTS: {
89
+ BASE: 'admin/scraper-accounts',
90
+ BY_ID: (id) => `admin/scraper-accounts/${id}`,
91
+ BY_PROVIDER: (provider) => `admin/scraper-accounts/${provider}`,
92
+ BY_PROVIDER_AND_ID: (provider, id) => `admin/scraper-accounts/${provider}/${id}`,
93
+ },
94
+ },
95
+ BID: {
96
+ BASE: 'bid',
97
+ BID_ON_JOB: (userId, campaignId, leadId) => `bid/${userId}/${campaignId}/${leadId}`,
98
+ },
99
+ };
100
+ // Helper function to build route with parameters
101
+ const buildRoute = (route, params = {}) => {
102
+ let builtRoute = route;
103
+ Object.entries(params).forEach(([key, value]) => {
104
+ builtRoute = builtRoute.replace(`:${key}`, value);
105
+ });
106
+ return builtRoute;
107
+ };
108
+ exports.buildRoute = buildRoute;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bidderAccountProviderDisplayMap = exports.accountStatusDisplayMap = exports.accountStatusOrder = void 0;
4
+ exports.accountStatusOrder = [
5
+ 'verification_required',
6
+ 'shadow_banned',
7
+ 'healthy',
8
+ 'banned',
9
+ 'suspended',
10
+ ];
11
+ exports.accountStatusDisplayMap = {
12
+ verification_required: 'Verification Required',
13
+ shadow_banned: 'Shadow Banned',
14
+ healthy: 'Healthy',
15
+ banned: 'Banned',
16
+ suspended: 'Suspended',
17
+ };
18
+ exports.bidderAccountProviderDisplayMap = {
19
+ 'lancer-provided': 'Lancer Provided',
20
+ 'user-provided': 'User Provided',
21
+ };
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./schemas"), exports);
18
+ __exportStar(require("./types"), exports);
19
+ __exportStar(require("./constants"), exports);
20
+ __exportStar(require("./utils"), exports);
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.accountStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.accountStatusSchema = zod_1.z.enum([
6
+ 'verification_required',
7
+ 'shadow_banned',
8
+ 'healthy',
9
+ 'banned',
10
+ 'suspended',
11
+ ]);
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateBidderAccountSchema = exports.createBidderAccountSchema = exports.bidderAccountSchema = exports.bidderAccountProvider = void 0;
4
+ const zod_1 = require("zod");
5
+ const account_status_1 = require("./account-status");
6
+ exports.bidderAccountProvider = zod_1.z.enum([
7
+ 'user-provided',
8
+ 'lancer-provided',
9
+ ]);
10
+ exports.bidderAccountSchema = zod_1.z.object({
11
+ id: zod_1.z.string(),
12
+ provider: exports.bidderAccountProvider,
13
+ email: zod_1.z.string().email(),
14
+ password: zod_1.z.string(),
15
+ cookies: zod_1.z.array(zod_1.z.any()).nullable(),
16
+ status: account_status_1.accountStatusSchema,
17
+ verified: zod_1.z.boolean(),
18
+ isActive: zod_1.z.boolean(),
19
+ assignedOrganizations: zod_1.z.array(zod_1.z.string()),
20
+ lastUsed: zod_1.z.number().nullable(),
21
+ multiLoginProfileId: zod_1.z.string().nullable(),
22
+ createdAt: zod_1.z.number(),
23
+ updatedAt: zod_1.z.number(),
24
+ });
25
+ exports.createBidderAccountSchema = exports.bidderAccountSchema.pick({
26
+ email: true,
27
+ password: true,
28
+ provider: true,
29
+ status: true,
30
+ verified: true,
31
+ isActive: true,
32
+ });
33
+ exports.updateBidderAccountSchema = exports.bidderAccountSchema
34
+ .omit({
35
+ id: true,
36
+ })
37
+ .partial();
@@ -0,0 +1,19 @@
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);
@@ -0,0 +1,116 @@
1
+ import { z } from 'zod';
2
+ export declare const managerAccountProvider: z.ZodEnum<["user_provided", "lancer_provided"]>;
3
+ export declare const managerAccountSchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ provider: z.ZodEnum<["user_provided", "lancer_provided"]>;
6
+ email: z.ZodString;
7
+ password: z.ZodString;
8
+ cookies: z.ZodNullable<z.ZodArray<z.ZodAny, "many">>;
9
+ proxy: z.ZodString;
10
+ status: z.ZodEnum<["verification_required", "shadow_banned", "healthy", "banned", "suspended"]>;
11
+ verified: z.ZodBoolean;
12
+ isActive: z.ZodBoolean;
13
+ assignedOrganizations: z.ZodArray<z.ZodString, "many">;
14
+ lastUsed: z.ZodNullable<z.ZodNumber>;
15
+ createdAt: z.ZodNumber;
16
+ updatedAt: z.ZodNumber;
17
+ }, "strip", z.ZodTypeAny, {
18
+ id: string;
19
+ email: string;
20
+ status: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned";
21
+ createdAt: number;
22
+ updatedAt: number;
23
+ cookies: any[] | null;
24
+ password: string;
25
+ isActive: boolean;
26
+ provider: "user_provided" | "lancer_provided";
27
+ proxy: string;
28
+ verified: boolean;
29
+ assignedOrganizations: string[];
30
+ lastUsed: number | null;
31
+ }, {
32
+ id: string;
33
+ email: string;
34
+ status: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned";
35
+ createdAt: number;
36
+ updatedAt: number;
37
+ cookies: any[] | null;
38
+ password: string;
39
+ isActive: boolean;
40
+ provider: "user_provided" | "lancer_provided";
41
+ proxy: string;
42
+ verified: boolean;
43
+ assignedOrganizations: string[];
44
+ lastUsed: number | null;
45
+ }>;
46
+ export declare const createManagerAccountSchema: z.ZodObject<Pick<{
47
+ id: z.ZodString;
48
+ provider: z.ZodEnum<["user_provided", "lancer_provided"]>;
49
+ email: z.ZodString;
50
+ password: z.ZodString;
51
+ cookies: z.ZodNullable<z.ZodArray<z.ZodAny, "many">>;
52
+ proxy: z.ZodString;
53
+ status: z.ZodEnum<["verification_required", "shadow_banned", "healthy", "banned", "suspended"]>;
54
+ verified: z.ZodBoolean;
55
+ isActive: z.ZodBoolean;
56
+ assignedOrganizations: z.ZodArray<z.ZodString, "many">;
57
+ lastUsed: z.ZodNullable<z.ZodNumber>;
58
+ createdAt: z.ZodNumber;
59
+ updatedAt: z.ZodNumber;
60
+ }, "email" | "status" | "password" | "isActive" | "provider" | "proxy" | "verified">, "strip", z.ZodTypeAny, {
61
+ email: string;
62
+ status: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned";
63
+ password: string;
64
+ isActive: boolean;
65
+ provider: "user_provided" | "lancer_provided";
66
+ proxy: string;
67
+ verified: boolean;
68
+ }, {
69
+ email: string;
70
+ status: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned";
71
+ password: string;
72
+ isActive: boolean;
73
+ provider: "user_provided" | "lancer_provided";
74
+ proxy: string;
75
+ verified: boolean;
76
+ }>;
77
+ export declare const updateManagerAccountSchema: z.ZodObject<{
78
+ email: z.ZodOptional<z.ZodString>;
79
+ status: z.ZodOptional<z.ZodEnum<["verification_required", "shadow_banned", "healthy", "banned", "suspended"]>>;
80
+ createdAt: z.ZodOptional<z.ZodNumber>;
81
+ updatedAt: z.ZodOptional<z.ZodNumber>;
82
+ cookies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodAny, "many">>>;
83
+ password: z.ZodOptional<z.ZodString>;
84
+ isActive: z.ZodOptional<z.ZodBoolean>;
85
+ provider: z.ZodOptional<z.ZodEnum<["user_provided", "lancer_provided"]>>;
86
+ proxy: z.ZodOptional<z.ZodString>;
87
+ verified: z.ZodOptional<z.ZodBoolean>;
88
+ assignedOrganizations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
89
+ lastUsed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ email?: string | undefined;
92
+ status?: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned" | undefined;
93
+ createdAt?: number | undefined;
94
+ updatedAt?: number | undefined;
95
+ cookies?: any[] | null | undefined;
96
+ password?: string | undefined;
97
+ isActive?: boolean | undefined;
98
+ provider?: "user_provided" | "lancer_provided" | undefined;
99
+ proxy?: string | undefined;
100
+ verified?: boolean | undefined;
101
+ assignedOrganizations?: string[] | undefined;
102
+ lastUsed?: number | null | undefined;
103
+ }, {
104
+ email?: string | undefined;
105
+ status?: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned" | undefined;
106
+ createdAt?: number | undefined;
107
+ updatedAt?: number | undefined;
108
+ cookies?: any[] | null | undefined;
109
+ password?: string | undefined;
110
+ isActive?: boolean | undefined;
111
+ provider?: "user_provided" | "lancer_provided" | undefined;
112
+ proxy?: string | undefined;
113
+ verified?: boolean | undefined;
114
+ assignedOrganizations?: string[] | undefined;
115
+ lastUsed?: number | null | undefined;
116
+ }>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateManagerAccountSchema = exports.createManagerAccountSchema = exports.managerAccountSchema = exports.managerAccountProvider = void 0;
4
+ const zod_1 = require("zod");
5
+ const account_status_1 = require("./account-status");
6
+ exports.managerAccountProvider = zod_1.z.enum([
7
+ 'user_provided',
8
+ 'lancer_provided',
9
+ ]);
10
+ exports.managerAccountSchema = zod_1.z.object({
11
+ id: zod_1.z.string(),
12
+ provider: exports.managerAccountProvider,
13
+ email: zod_1.z.string().email(),
14
+ password: zod_1.z.string(),
15
+ cookies: zod_1.z.array(zod_1.z.any()).nullable(),
16
+ proxy: zod_1.z.string(),
17
+ status: account_status_1.accountStatusSchema,
18
+ verified: zod_1.z.boolean(),
19
+ isActive: zod_1.z.boolean(),
20
+ assignedOrganizations: zod_1.z.array(zod_1.z.string()),
21
+ lastUsed: zod_1.z.number().nullable(),
22
+ createdAt: zod_1.z.number(),
23
+ updatedAt: zod_1.z.number(),
24
+ });
25
+ exports.createManagerAccountSchema = exports.managerAccountSchema.pick({
26
+ email: true,
27
+ password: true,
28
+ provider: true,
29
+ proxy: true,
30
+ status: true,
31
+ verified: true,
32
+ isActive: true,
33
+ });
34
+ exports.updateManagerAccountSchema = exports.managerAccountSchema
35
+ .omit({
36
+ id: true,
37
+ })
38
+ .partial();
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateScraperAccountSchema = exports.createScraperAccountSchema = exports.scraperAccountSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const account_status_1 = require("./account-status");
6
+ const job_filters_1 = require("../job-filters");
7
+ exports.scraperAccountSchema = zod_1.z.object({
8
+ id: zod_1.z.string(),
9
+ email: zod_1.z.string().email(),
10
+ password: zod_1.z.string(),
11
+ cookies: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
12
+ proxy_credentials: zod_1.z.string(),
13
+ region: job_filters_1.regionEnum,
14
+ isActive: zod_1.z.boolean(),
15
+ lastUsed: zod_1.z.number(),
16
+ status: account_status_1.accountStatusSchema,
17
+ verified: zod_1.z.boolean(),
18
+ errors: zod_1.z.array(zod_1.z.object({
19
+ errorMessage: zod_1.z.string(),
20
+ timestamp: zod_1.z.number(),
21
+ screenshotUrl: zod_1.z.string(),
22
+ htmlUrl: zod_1.z.string(),
23
+ })),
24
+ });
25
+ exports.createScraperAccountSchema = exports.scraperAccountSchema.pick({
26
+ email: true,
27
+ password: true,
28
+ proxy_credentials: true,
29
+ region: true,
30
+ verified: true,
31
+ isActive: true,
32
+ });
33
+ exports.updateScraperAccountSchema = exports.scraperAccountSchema
34
+ .omit({
35
+ id: true,
36
+ })
37
+ .partial();