lancer-shared 1.0.0
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.
- package/dist/constants/common-questions.d.ts +5 -0
- package/dist/constants/common-questions.js +60 -0
- package/dist/constants/index.d.ts +16 -0
- package/dist/constants/index.js +38 -0
- package/dist/constants/job-filter-options.d.ts +61 -0
- package/dist/constants/job-filter-options.js +265 -0
- package/dist/constants/job-status.d.ts +4 -0
- package/dist/constants/job-status.js +26 -0
- package/dist/constants/mappings/countryMapping.d.ts +2 -0
- package/dist/constants/mappings/countryMapping.js +122 -0
- package/dist/constants/mappings/regionMapping.d.ts +2 -0
- package/dist/constants/mappings/regionMapping.js +242 -0
- package/dist/constants/routes.d.ts +57 -0
- package/dist/constants/routes.js +63 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/schemas/ai/ai-config.d.ts +36 -0
- package/dist/schemas/ai/ai-config.js +12 -0
- package/dist/schemas/ai/index.d.ts +3 -0
- package/dist/schemas/ai/index.js +19 -0
- package/dist/schemas/ai/proposal.d.ts +82 -0
- package/dist/schemas/ai/proposal.js +16 -0
- package/dist/schemas/ai/suitability.d.ts +37 -0
- package/dist/schemas/ai/suitability.js +17 -0
- package/dist/schemas/bidding/index.d.ts +1 -0
- package/dist/schemas/bidding/index.js +17 -0
- package/dist/schemas/bidding/proposal-bidding-status.d.ts +26 -0
- package/dist/schemas/bidding/proposal-bidding-status.js +18 -0
- package/dist/schemas/campaign/campaign-expenses.d.ts +14 -0
- package/dist/schemas/campaign/campaign-expenses.js +9 -0
- package/dist/schemas/campaign/campaign-insights.d.ts +118 -0
- package/dist/schemas/campaign/campaign-insights.js +31 -0
- package/dist/schemas/campaign/campaign-integrations.d.ts +82 -0
- package/dist/schemas/campaign/campaign-integrations.js +16 -0
- package/dist/schemas/campaign/campaign-job-count.d.ts +2 -0
- package/dist/schemas/campaign/campaign-job-count.js +6 -0
- package/dist/schemas/campaign/campaign.d.ts +1146 -0
- package/dist/schemas/campaign/campaign.js +37 -0
- package/dist/schemas/campaign/index.d.ts +5 -0
- package/dist/schemas/campaign/index.js +21 -0
- package/dist/schemas/chat-message/chat-message.d.ts +31 -0
- package/dist/schemas/chat-message/chat-message.js +13 -0
- package/dist/schemas/chat-message/index.d.ts +1 -0
- package/dist/schemas/chat-message/index.js +17 -0
- package/dist/schemas/index.d.ts +10 -0
- package/dist/schemas/index.js +26 -0
- package/dist/schemas/job/index.d.ts +3 -0
- package/dist/schemas/job/index.js +19 -0
- package/dist/schemas/job/job-details.d.ts +335 -0
- package/dist/schemas/job/job-details.js +29 -0
- package/dist/schemas/job/job-note.d.ts +83 -0
- package/dist/schemas/job/job-note.js +30 -0
- package/dist/schemas/job/job-status.d.ts +3 -0
- package/dist/schemas/job/job-status.js +27 -0
- package/dist/schemas/job/job.d.ts +1160 -0
- package/dist/schemas/job/job.js +90 -0
- package/dist/schemas/job/pipeline-job.d.ts +602 -0
- package/dist/schemas/job/pipeline-job.js +42 -0
- package/dist/schemas/job/upwork-job.d.ts +334 -0
- package/dist/schemas/job/upwork-job.js +60 -0
- package/dist/schemas/job-filters/index.d.ts +1 -0
- package/dist/schemas/job-filters/index.js +17 -0
- package/dist/schemas/job-filters/job-filters.d.ts +187 -0
- package/dist/schemas/job-filters/job-filters.js +69 -0
- package/dist/schemas/saved-search/index.d.ts +19 -0
- package/dist/schemas/saved-search/index.js +12 -0
- package/dist/schemas/scraper/index.d.ts +2 -0
- package/dist/schemas/scraper/index.js +18 -0
- package/dist/schemas/scraper/scrape-payload.d.ts +17 -0
- package/dist/schemas/scraper/scrape-payload.js +10 -0
- package/dist/schemas/scraper/scrape-result.d.ts +345 -0
- package/dist/schemas/scraper/scrape-result.js +9 -0
- package/dist/schemas/shared.d.ts +7 -0
- package/dist/schemas/shared.js +16 -0
- package/dist/schemas/user/index.d.ts +72 -0
- package/dist/schemas/user/index.js +33 -0
- package/dist/types/ai/ai-config.d.ts +6 -0
- package/dist/types/ai/ai-config.js +2 -0
- package/dist/types/ai/index.d.ts +3 -0
- package/dist/types/ai/index.js +19 -0
- package/dist/types/ai/proposal.d.ts +10 -0
- package/dist/types/ai/proposal.js +2 -0
- package/dist/types/ai/suitability.d.ts +6 -0
- package/dist/types/ai/suitability.js +2 -0
- package/dist/types/bidding/index.d.ts +1 -0
- package/dist/types/bidding/index.js +17 -0
- package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
- package/dist/types/bidding/proposal-bidding-status.js +2 -0
- package/dist/types/campaign/campaign-expenses.d.ts +3 -0
- package/dist/types/campaign/campaign-expenses.js +2 -0
- package/dist/types/campaign/campaign-insights.d.ts +8 -0
- package/dist/types/campaign/campaign-insights.js +2 -0
- package/dist/types/campaign/campaign-integrations.d.ts +6 -0
- package/dist/types/campaign/campaign-integrations.js +2 -0
- package/dist/types/campaign/campaign-job-count.d.ts +4 -0
- package/dist/types/campaign/campaign-job-count.js +2 -0
- package/dist/types/campaign/campaign.d.ts +16 -0
- package/dist/types/campaign/campaign.js +2 -0
- package/dist/types/campaign/index.d.ts +5 -0
- package/dist/types/campaign/index.js +21 -0
- package/dist/types/chat-message/chat-message.d.ts +4 -0
- package/dist/types/chat-message/chat-message.js +2 -0
- package/dist/types/chat-message/index.d.ts +1 -0
- package/dist/types/chat-message/index.js +17 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.js +25 -0
- package/dist/types/job/index.d.ts +3 -0
- package/dist/types/job/index.js +19 -0
- package/dist/types/job/job-details.d.ts +36 -0
- package/dist/types/job/job-details.js +2 -0
- package/dist/types/job/job-note.d.ts +10 -0
- package/dist/types/job/job-note.js +2 -0
- package/dist/types/job/job-status.d.ts +5 -0
- package/dist/types/job/job-status.js +12 -0
- package/dist/types/job/job.d.ts +32 -0
- package/dist/types/job/job.js +2 -0
- package/dist/types/job-filters/index.d.ts +1 -0
- package/dist/types/job-filters/index.js +17 -0
- package/dist/types/job-filters/job-filters.d.ts +4 -0
- package/dist/types/job-filters/job-filters.js +2 -0
- package/dist/types/saved-search/index.d.ts +6 -0
- package/dist/types/saved-search/index.js +2 -0
- package/dist/types/scraper/index.d.ts +2 -0
- package/dist/types/scraper/index.js +18 -0
- package/dist/types/scraper/scrape-payload.d.ts +4 -0
- package/dist/types/scraper/scrape-payload.js +2 -0
- package/dist/types/scraper/scrape-result.d.ts +4 -0
- package/dist/types/scraper/scrape-result.js +2 -0
- package/dist/types/user/index.d.ts +12 -0
- package/dist/types/user/index.js +2 -0
- package/package.json +35 -0
|
@@ -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,57 @@
|
|
|
1
|
+
export declare const ROUTES: {
|
|
2
|
+
readonly AUTH: {
|
|
3
|
+
readonly BASE: "/auth";
|
|
4
|
+
readonly REGISTER: "/auth/register";
|
|
5
|
+
};
|
|
6
|
+
readonly CAMPAIGNS: {
|
|
7
|
+
readonly BASE: "/campaigns";
|
|
8
|
+
readonly BY_ID: (id: string) => string;
|
|
9
|
+
readonly JOBS: {
|
|
10
|
+
readonly BASE: (campaignId: string) => string;
|
|
11
|
+
readonly BY_ID: (campaignId: string, jobId: string) => string;
|
|
12
|
+
readonly SUITABILITY_SCORES: (campaignId: string) => string;
|
|
13
|
+
readonly SYNC: (campaignId: string) => string;
|
|
14
|
+
};
|
|
15
|
+
readonly INSIGHTS: (campaignId: string) => string;
|
|
16
|
+
readonly INTEGRATIONS: {
|
|
17
|
+
readonly BASE: (campaignId: string) => string;
|
|
18
|
+
readonly SLACK: {
|
|
19
|
+
readonly BASE: (campaignId: string) => string;
|
|
20
|
+
readonly TEST_SUITABILITY_WEBHOOK: (campaignId: string) => string;
|
|
21
|
+
readonly TEST_PROPOSAL_WEBHOOK: (campaignId: string) => string;
|
|
22
|
+
};
|
|
23
|
+
readonly DISCORD: {
|
|
24
|
+
readonly BASE: (campaignId: string) => string;
|
|
25
|
+
readonly TEST_SUITABILITY_WEBHOOK: (campaignId: string) => string;
|
|
26
|
+
readonly TEST_PROPOSAL_WEBHOOK: (campaignId: string) => string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
readonly JOBS: {
|
|
31
|
+
readonly BASE: "/jobs";
|
|
32
|
+
readonly IMPORT: "/jobs/import";
|
|
33
|
+
readonly FILTER_OPTIONS: "/jobs/filter-options";
|
|
34
|
+
readonly TOTAL_JOBS: "/jobs/total-jobs";
|
|
35
|
+
};
|
|
36
|
+
readonly USERS: {
|
|
37
|
+
readonly BASE: "/users";
|
|
38
|
+
readonly BY_ID: (id: string) => string;
|
|
39
|
+
};
|
|
40
|
+
readonly AI_CONFIG: {
|
|
41
|
+
readonly BASE: "/ai-config";
|
|
42
|
+
};
|
|
43
|
+
readonly COOKIES: {
|
|
44
|
+
readonly BASE: "/cookies";
|
|
45
|
+
readonly SCRAPE: "/cookies/scrape-cookies";
|
|
46
|
+
};
|
|
47
|
+
readonly SCRAPING: {
|
|
48
|
+
readonly BASE: "/scraping";
|
|
49
|
+
readonly UPWORK: "/scraping/upwork";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export type RouteParams = {
|
|
53
|
+
id?: string;
|
|
54
|
+
campaignId?: string;
|
|
55
|
+
jobId?: string;
|
|
56
|
+
};
|
|
57
|
+
export declare const buildRoute: (route: string, params?: RouteParams) => string;
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
CAMPAIGNS: {
|
|
10
|
+
BASE: "/campaigns",
|
|
11
|
+
BY_ID: (id) => `/campaigns/${id}`,
|
|
12
|
+
JOBS: {
|
|
13
|
+
BASE: (campaignId) => `/campaigns/${campaignId}/jobs`,
|
|
14
|
+
BY_ID: (campaignId, jobId) => `/campaigns/${campaignId}/jobs/${jobId}`,
|
|
15
|
+
SUITABILITY_SCORES: (campaignId) => `/campaigns/${campaignId}/jobs/suitability-scores`,
|
|
16
|
+
SYNC: (campaignId) => `/campaigns/${campaignId}/jobs/sync`,
|
|
17
|
+
},
|
|
18
|
+
INSIGHTS: (campaignId) => `/campaigns/${campaignId}/insights`,
|
|
19
|
+
INTEGRATIONS: {
|
|
20
|
+
BASE: (campaignId) => `/campaigns/${campaignId}/integrations`,
|
|
21
|
+
SLACK: {
|
|
22
|
+
BASE: (campaignId) => `/campaigns/${campaignId}/integrations/slack`,
|
|
23
|
+
TEST_SUITABILITY_WEBHOOK: (campaignId) => `/campaigns/${campaignId}/integrations/slack/suitability/test-webhook`,
|
|
24
|
+
TEST_PROPOSAL_WEBHOOK: (campaignId) => `/campaigns/${campaignId}/integrations/slack/proposal/test-webhook`,
|
|
25
|
+
},
|
|
26
|
+
DISCORD: {
|
|
27
|
+
BASE: (campaignId) => `/campaigns/${campaignId}/integrations/discord`,
|
|
28
|
+
TEST_SUITABILITY_WEBHOOK: (campaignId) => `/campaigns/${campaignId}/integrations/discord/suitability/test-webhook`,
|
|
29
|
+
TEST_PROPOSAL_WEBHOOK: (campaignId) => `/campaigns/${campaignId}/integrations/discord/proposal/test-webhook`,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
JOBS: {
|
|
34
|
+
BASE: "/jobs",
|
|
35
|
+
IMPORT: "/jobs/import",
|
|
36
|
+
FILTER_OPTIONS: "/jobs/filter-options",
|
|
37
|
+
TOTAL_JOBS: "/jobs/total-jobs",
|
|
38
|
+
},
|
|
39
|
+
USERS: {
|
|
40
|
+
BASE: "/users",
|
|
41
|
+
BY_ID: (id) => `/users/${id}`,
|
|
42
|
+
},
|
|
43
|
+
AI_CONFIG: {
|
|
44
|
+
BASE: "/ai-config",
|
|
45
|
+
},
|
|
46
|
+
COOKIES: {
|
|
47
|
+
BASE: "/cookies",
|
|
48
|
+
SCRAPE: "/cookies/scrape-cookies",
|
|
49
|
+
},
|
|
50
|
+
SCRAPING: {
|
|
51
|
+
BASE: "/scraping",
|
|
52
|
+
UPWORK: "/scraping/upwork",
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
// Helper function to build route with parameters
|
|
56
|
+
const buildRoute = (route, params = {}) => {
|
|
57
|
+
let builtRoute = route;
|
|
58
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
59
|
+
builtRoute = builtRoute.replace(`:${key}`, value);
|
|
60
|
+
});
|
|
61
|
+
return builtRoute;
|
|
62
|
+
};
|
|
63
|
+
exports.buildRoute = buildRoute;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -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("./schemas"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
__exportStar(require("./constants"), exports);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const aiConfigSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
suitabilityPrompt: z.ZodNullable<z.ZodString>;
|
|
5
|
+
proposalPrompt: z.ZodNullable<z.ZodString>;
|
|
6
|
+
questionProposalPrompt: z.ZodNullable<z.ZodString>;
|
|
7
|
+
knowledgeBase: z.ZodNullable<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
id: string;
|
|
10
|
+
suitabilityPrompt: string | null;
|
|
11
|
+
proposalPrompt: string | null;
|
|
12
|
+
questionProposalPrompt: string | null;
|
|
13
|
+
knowledgeBase: string | null;
|
|
14
|
+
}, {
|
|
15
|
+
id: string;
|
|
16
|
+
suitabilityPrompt: string | null;
|
|
17
|
+
proposalPrompt: string | null;
|
|
18
|
+
questionProposalPrompt: string | null;
|
|
19
|
+
knowledgeBase: string | null;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const updateAiConfigSchema: z.ZodObject<{
|
|
22
|
+
suitabilityPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
proposalPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
questionProposalPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
knowledgeBase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
suitabilityPrompt?: string | null | undefined;
|
|
28
|
+
proposalPrompt?: string | null | undefined;
|
|
29
|
+
questionProposalPrompt?: string | null | undefined;
|
|
30
|
+
knowledgeBase?: string | null | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
suitabilityPrompt?: string | null | undefined;
|
|
33
|
+
proposalPrompt?: string | null | undefined;
|
|
34
|
+
questionProposalPrompt?: string | null | undefined;
|
|
35
|
+
knowledgeBase?: string | null | undefined;
|
|
36
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateAiConfigSchema = exports.aiConfigSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.aiConfigSchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string(),
|
|
7
|
+
suitabilityPrompt: zod_1.z.string().nullable(),
|
|
8
|
+
proposalPrompt: zod_1.z.string().nullable(),
|
|
9
|
+
questionProposalPrompt: zod_1.z.string().nullable(),
|
|
10
|
+
knowledgeBase: zod_1.z.string().nullable(),
|
|
11
|
+
});
|
|
12
|
+
exports.updateAiConfigSchema = exports.aiConfigSchema.omit({ id: true }).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("./ai-config"), exports);
|
|
18
|
+
__exportStar(require("./proposal"), exports);
|
|
19
|
+
__exportStar(require("./suitability"), exports);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const questionAnswerPairSchema: z.ZodObject<{
|
|
3
|
+
question: z.ZodString;
|
|
4
|
+
answer: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
answer: string;
|
|
7
|
+
question: string;
|
|
8
|
+
}, {
|
|
9
|
+
answer: string;
|
|
10
|
+
question: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const proposalSchema: z.ZodObject<{
|
|
13
|
+
coverLetter: z.ZodString;
|
|
14
|
+
questionAnswerPairs: z.ZodArray<z.ZodObject<{
|
|
15
|
+
question: z.ZodString;
|
|
16
|
+
answer: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
answer: string;
|
|
19
|
+
question: string;
|
|
20
|
+
}, {
|
|
21
|
+
answer: string;
|
|
22
|
+
question: string;
|
|
23
|
+
}>, "many">;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
coverLetter: string;
|
|
26
|
+
questionAnswerPairs: {
|
|
27
|
+
answer: string;
|
|
28
|
+
question: string;
|
|
29
|
+
}[];
|
|
30
|
+
}, {
|
|
31
|
+
coverLetter: string;
|
|
32
|
+
questionAnswerPairs: {
|
|
33
|
+
answer: string;
|
|
34
|
+
question: string;
|
|
35
|
+
}[];
|
|
36
|
+
}>;
|
|
37
|
+
export declare const proposalResponseSchema: z.ZodArray<z.ZodObject<{
|
|
38
|
+
modelName: z.ZodString;
|
|
39
|
+
proposal: z.ZodObject<{
|
|
40
|
+
coverLetter: z.ZodString;
|
|
41
|
+
questionAnswerPairs: z.ZodArray<z.ZodObject<{
|
|
42
|
+
question: z.ZodString;
|
|
43
|
+
answer: z.ZodString;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
answer: string;
|
|
46
|
+
question: string;
|
|
47
|
+
}, {
|
|
48
|
+
answer: string;
|
|
49
|
+
question: string;
|
|
50
|
+
}>, "many">;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
coverLetter: string;
|
|
53
|
+
questionAnswerPairs: {
|
|
54
|
+
answer: string;
|
|
55
|
+
question: string;
|
|
56
|
+
}[];
|
|
57
|
+
}, {
|
|
58
|
+
coverLetter: string;
|
|
59
|
+
questionAnswerPairs: {
|
|
60
|
+
answer: string;
|
|
61
|
+
question: string;
|
|
62
|
+
}[];
|
|
63
|
+
}>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
modelName: string;
|
|
66
|
+
proposal: {
|
|
67
|
+
coverLetter: string;
|
|
68
|
+
questionAnswerPairs: {
|
|
69
|
+
answer: string;
|
|
70
|
+
question: string;
|
|
71
|
+
}[];
|
|
72
|
+
};
|
|
73
|
+
}, {
|
|
74
|
+
modelName: string;
|
|
75
|
+
proposal: {
|
|
76
|
+
coverLetter: string;
|
|
77
|
+
questionAnswerPairs: {
|
|
78
|
+
answer: string;
|
|
79
|
+
question: string;
|
|
80
|
+
}[];
|
|
81
|
+
};
|
|
82
|
+
}>, "many">;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.proposalResponseSchema = exports.proposalSchema = exports.questionAnswerPairSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.questionAnswerPairSchema = zod_1.z.object({
|
|
6
|
+
question: zod_1.z.string(),
|
|
7
|
+
answer: zod_1.z.string(),
|
|
8
|
+
});
|
|
9
|
+
exports.proposalSchema = zod_1.z.object({
|
|
10
|
+
coverLetter: zod_1.z.string(),
|
|
11
|
+
questionAnswerPairs: zod_1.z.array(exports.questionAnswerPairSchema),
|
|
12
|
+
});
|
|
13
|
+
exports.proposalResponseSchema = zod_1.z.array(zod_1.z.object({
|
|
14
|
+
modelName: zod_1.z.string(),
|
|
15
|
+
proposal: exports.proposalSchema,
|
|
16
|
+
}));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const suitabilitySchema: z.ZodObject<{
|
|
3
|
+
rating: z.ZodString;
|
|
4
|
+
reason: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
reason: string;
|
|
7
|
+
rating: string;
|
|
8
|
+
}, {
|
|
9
|
+
reason: string;
|
|
10
|
+
rating: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const suitabilityStatusSchema: z.ZodEnum<["completed", "pending", "failed"]>;
|
|
13
|
+
export declare const suitabilityResponseSchema: z.ZodArray<z.ZodObject<{
|
|
14
|
+
modelName: z.ZodString;
|
|
15
|
+
suitability: z.ZodObject<{
|
|
16
|
+
rating: z.ZodString;
|
|
17
|
+
reason: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
reason: string;
|
|
20
|
+
rating: string;
|
|
21
|
+
}, {
|
|
22
|
+
reason: string;
|
|
23
|
+
rating: string;
|
|
24
|
+
}>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
modelName: string;
|
|
27
|
+
suitability: {
|
|
28
|
+
reason: string;
|
|
29
|
+
rating: string;
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
modelName: string;
|
|
33
|
+
suitability: {
|
|
34
|
+
reason: string;
|
|
35
|
+
rating: string;
|
|
36
|
+
};
|
|
37
|
+
}>, "many">;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.suitabilityResponseSchema = exports.suitabilityStatusSchema = exports.suitabilitySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.suitabilitySchema = zod_1.z.object({
|
|
6
|
+
rating: zod_1.z.string(),
|
|
7
|
+
reason: zod_1.z.string(),
|
|
8
|
+
});
|
|
9
|
+
exports.suitabilityStatusSchema = zod_1.z.enum([
|
|
10
|
+
'completed',
|
|
11
|
+
'pending',
|
|
12
|
+
'failed',
|
|
13
|
+
]);
|
|
14
|
+
exports.suitabilityResponseSchema = zod_1.z.array(zod_1.z.object({
|
|
15
|
+
modelName: zod_1.z.string(),
|
|
16
|
+
suitability: exports.suitabilitySchema,
|
|
17
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './proposal-bidding-status';
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./proposal-bidding-status"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const proposalBiddingStatusSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
3
|
+
status: z.ZodLiteral<"success">;
|
|
4
|
+
biddingAmount: z.ZodNumber;
|
|
5
|
+
boosted: z.ZodBoolean;
|
|
6
|
+
boostingAmount: z.ZodNumber;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
status: "success";
|
|
9
|
+
biddingAmount: number;
|
|
10
|
+
boosted: boolean;
|
|
11
|
+
boostingAmount: number;
|
|
12
|
+
}, {
|
|
13
|
+
status: "success";
|
|
14
|
+
biddingAmount: number;
|
|
15
|
+
boosted: boolean;
|
|
16
|
+
boostingAmount: number;
|
|
17
|
+
}>, z.ZodObject<{
|
|
18
|
+
status: z.ZodLiteral<"failed">;
|
|
19
|
+
errorMessage: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
status: "failed";
|
|
22
|
+
errorMessage: string;
|
|
23
|
+
}, {
|
|
24
|
+
status: "failed";
|
|
25
|
+
errorMessage: string;
|
|
26
|
+
}>]>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.proposalBiddingStatusSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.proposalBiddingStatusSchema = zod_1.z.discriminatedUnion('status', [
|
|
6
|
+
// Success case
|
|
7
|
+
zod_1.z.object({
|
|
8
|
+
status: zod_1.z.literal('success'),
|
|
9
|
+
biddingAmount: zod_1.z.number(),
|
|
10
|
+
boosted: zod_1.z.boolean(),
|
|
11
|
+
boostingAmount: zod_1.z.number(),
|
|
12
|
+
}),
|
|
13
|
+
// Failed case
|
|
14
|
+
zod_1.z.object({
|
|
15
|
+
status: zod_1.z.literal('failed'),
|
|
16
|
+
errorMessage: zod_1.z.string(),
|
|
17
|
+
}),
|
|
18
|
+
]);
|