lancer-shared 1.2.90 → 1.2.91

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 (164) hide show
  1. package/dist/bundle.cjs.js +3 -1
  2. package/dist/constants/collections.d.ts +13 -0
  3. package/dist/constants/collections.js +14 -0
  4. package/dist/constants/common-questions.js +57 -0
  5. package/dist/constants/index.js +18 -0
  6. package/dist/constants/job-filter-options.js +265 -0
  7. package/dist/constants/job-status.js +21 -0
  8. package/dist/constants/mappings/countryMapping.js +120 -0
  9. package/dist/constants/mappings/regionMapping.js +240 -0
  10. package/dist/constants/organization.d.ts +2 -0
  11. package/dist/constants/routes.js +116 -0
  12. package/dist/constants/upwork-accounts.js +18 -0
  13. package/dist/index.js +4 -0
  14. package/dist/schemas/account/account-status.js +8 -0
  15. package/dist/schemas/account/bidder-account.js +35 -0
  16. package/dist/schemas/account/index.js +3 -0
  17. package/dist/schemas/account/scraper-account.js +34 -0
  18. package/dist/schemas/ai/ai-config.d.ts +36 -0
  19. package/dist/schemas/ai/ai-config.js +9 -0
  20. package/dist/schemas/ai/index.d.ts +3 -0
  21. package/dist/schemas/ai/index.js +3 -0
  22. package/dist/schemas/ai/proposal.d.ts +82 -0
  23. package/dist/schemas/ai/proposal.js +13 -0
  24. package/dist/schemas/ai/suitability.d.ts +37 -0
  25. package/dist/schemas/ai/suitability.js +14 -0
  26. package/dist/schemas/bid/bid-result.js +11 -0
  27. package/dist/schemas/bid/bid.js +35 -0
  28. package/dist/schemas/bid/index.js +2 -0
  29. package/dist/schemas/campaign/campaign-ai-metrics.js +6 -0
  30. package/dist/schemas/campaign/campaign-analytics.d.ts +40 -40
  31. package/dist/schemas/campaign/campaign-analytics.js +42 -0
  32. package/dist/schemas/campaign/campaign-expenses.js +6 -0
  33. package/dist/schemas/campaign/campaign-insights.js +31 -0
  34. package/dist/schemas/campaign/campaign-integrations.d.ts +87 -0
  35. package/dist/schemas/campaign/campaign-integrations.js +13 -0
  36. package/dist/schemas/campaign/campaign-job-count.d.ts +2 -0
  37. package/dist/schemas/campaign/campaign-job-count.js +3 -0
  38. package/dist/schemas/campaign/campaign.d.ts +21 -21
  39. package/dist/schemas/campaign/campaign.js +41 -0
  40. package/dist/schemas/campaign/index.js +7 -0
  41. package/dist/schemas/chat-message/chat-message.d.ts +31 -0
  42. package/dist/schemas/chat-message/chat-message.js +10 -0
  43. package/dist/schemas/chat-message/index.d.ts +1 -0
  44. package/dist/schemas/chat-message/index.js +1 -0
  45. package/dist/schemas/config/agency-config.d.ts +17 -0
  46. package/dist/schemas/config/agency-config.js +7 -0
  47. package/dist/schemas/config/index.d.ts +1 -0
  48. package/dist/schemas/config/index.js +1 -0
  49. package/dist/schemas/event/index.d.ts +58 -0
  50. package/dist/schemas/index.js +17 -0
  51. package/dist/schemas/job/haha.json +581 -0
  52. package/dist/schemas/job/job-filters.d.ts +8 -5
  53. package/dist/schemas/job-filters/index.d.ts +1 -0
  54. package/dist/schemas/job-filters/index.js +1 -0
  55. package/dist/schemas/job-filters/job-filters.d.ts +241 -0
  56. package/dist/schemas/job-filters/job-filters.js +84 -0
  57. package/dist/schemas/lead/index.js +173 -0
  58. package/dist/schemas/lead/lead-note.d.ts +83 -0
  59. package/dist/schemas/lead/lead-note.js +27 -0
  60. package/dist/schemas/lead/lead-status.js +23 -0
  61. package/dist/schemas/lead/nuxt.d.ts +1664 -0
  62. package/dist/schemas/lead/nuxt.js +287 -0
  63. package/dist/schemas/logger/index.js +1 -0
  64. package/dist/schemas/logger/log-event.js +117 -0
  65. package/dist/schemas/meter-event/index.d.ts +12 -0
  66. package/dist/schemas/organization/index.js +70 -0
  67. package/dist/schemas/organization/member.js +7 -0
  68. package/dist/schemas/organization/organization.d.ts +240 -0
  69. package/dist/schemas/organization/organization.js +16 -0
  70. package/dist/schemas/organization/subscription.js +17 -0
  71. package/dist/schemas/proxy/index.js +3 -0
  72. package/dist/schemas/proxy/proxy-available-replacements.js +3 -0
  73. package/dist/schemas/proxy/proxy-country.js +249 -0
  74. package/dist/schemas/proxy/proxy.js +29 -0
  75. package/dist/schemas/saved-search/index.js +9 -0
  76. package/dist/schemas/scraper/index.js +2 -0
  77. package/dist/schemas/scraper/scrape-payload.d.ts +9 -9
  78. package/dist/schemas/scraper/scrape-payload.js +21 -0
  79. package/dist/schemas/scraper/scrape-result.js +23 -0
  80. package/dist/schemas/shared.js +19 -0
  81. package/dist/schemas/tier/index.d.ts +119 -0
  82. package/dist/schemas/time-filter/index.js +6 -0
  83. package/dist/schemas/transaction/index.js +17 -0
  84. package/dist/schemas/usage/index.js +18 -0
  85. package/dist/schemas/user/index.js +52 -0
  86. package/dist/types/account/account-status.d.ts +3 -0
  87. package/dist/types/account/account-status.js +1 -0
  88. package/dist/types/account/bidder-account.d.ts +7 -0
  89. package/dist/types/account/bidder-account.js +1 -0
  90. package/dist/types/account/index.d.ts +3 -0
  91. package/dist/types/account/index.js +3 -0
  92. package/dist/types/account/scraper-account.d.ts +5 -0
  93. package/dist/types/account/scraper-account.js +1 -0
  94. package/dist/types/ai/ai-config.d.ts +6 -0
  95. package/dist/types/ai/ai-config.js +1 -0
  96. package/dist/types/ai/index.d.ts +3 -0
  97. package/dist/types/ai/index.js +3 -0
  98. package/dist/types/ai/proposal.d.ts +10 -0
  99. package/dist/types/ai/proposal.js +1 -0
  100. package/dist/types/ai/suitability.d.ts +6 -0
  101. package/dist/types/ai/suitability.js +1 -0
  102. package/dist/types/bid/bid-result.d.ts +5 -0
  103. package/dist/types/bid/bid-result.js +1 -0
  104. package/dist/types/bid/bid.d.ts +9 -0
  105. package/dist/types/bid/bid.js +1 -0
  106. package/dist/types/bid/index.d.ts +2 -0
  107. package/dist/types/bid/index.js +2 -0
  108. package/dist/types/campaign/campaign-analytics.d.ts +7 -0
  109. package/dist/types/campaign/campaign-analytics.js +1 -0
  110. package/dist/types/campaign/campaign-expenses.d.ts +3 -0
  111. package/dist/types/campaign/campaign-expenses.js +1 -0
  112. package/dist/types/campaign/campaign-insights.js +1 -0
  113. package/dist/types/campaign/campaign-integrations.d.ts +6 -0
  114. package/dist/types/campaign/campaign-integrations.js +1 -0
  115. package/dist/types/campaign/campaign-job-count.d.ts +4 -0
  116. package/dist/types/campaign/campaign-job-count.js +1 -0
  117. package/dist/types/campaign/campaign.js +1 -0
  118. package/dist/types/campaign/index.js +6 -0
  119. package/dist/types/chat-message/chat-message.d.ts +4 -0
  120. package/dist/types/chat-message/chat-message.js +1 -0
  121. package/dist/types/chat-message/index.d.ts +1 -0
  122. package/dist/types/chat-message/index.js +1 -0
  123. package/dist/types/config/agency-config.d.ts +4 -0
  124. package/dist/types/config/agency-config.js +1 -0
  125. package/dist/types/config/index.d.ts +1 -0
  126. package/dist/types/config/index.js +1 -0
  127. package/dist/types/index.d.ts +15 -0
  128. package/dist/types/index.js +15 -0
  129. package/dist/types/job/index.d.ts +48 -0
  130. package/dist/types/job/index.js +3 -0
  131. package/dist/types/job/job-note.d.ts +10 -0
  132. package/dist/types/job/job-note.js +1 -0
  133. package/dist/types/job/job-status.d.ts +5 -0
  134. package/dist/types/job/job-status.js +9 -0
  135. package/dist/types/job/nuxt.d.ts +4 -0
  136. package/dist/types/job/nuxt.js +1 -0
  137. package/dist/types/job-filters/index.d.ts +1 -0
  138. package/dist/types/job-filters/index.js +1 -0
  139. package/dist/types/job-filters/job-filters.d.ts +4 -0
  140. package/dist/types/job-filters/job-filters.js +1 -0
  141. package/dist/types/logger/index.d.ts +1 -0
  142. package/dist/types/logger/index.js +1 -0
  143. package/dist/types/logger/log-event.js +1 -0
  144. package/dist/types/saved-search/index.d.ts +6 -0
  145. package/dist/types/saved-search/index.js +1 -0
  146. package/dist/types/scraper/index.d.ts +2 -0
  147. package/dist/types/scraper/index.js +2 -0
  148. package/dist/types/scraper/scrape-payload.d.ts +10 -0
  149. package/dist/types/scraper/scrape-payload.js +1 -0
  150. package/dist/types/scraper/scrape-result.d.ts +8 -0
  151. package/dist/types/scraper/scrape-result.js +1 -0
  152. package/dist/types/shared.d.ts +8 -0
  153. package/dist/types/shared.js +1 -0
  154. package/dist/types/time-filter/index.d.ts +3 -0
  155. package/dist/types/time-filter/index.js +1 -0
  156. package/dist/types/transaction/index.d.ts +4 -0
  157. package/dist/types/transaction/index.js +1 -0
  158. package/dist/types/usage/index.d.ts +6 -0
  159. package/dist/types/usage/index.js +1 -0
  160. package/dist/types/user/index.d.ts +15 -0
  161. package/dist/types/user/index.js +1 -0
  162. package/dist/utils/index.js +1 -0
  163. package/dist/utils/try-catch.js +10 -0
  164. package/package.json +1 -1
@@ -0,0 +1,240 @@
1
+ import { z } from "zod";
2
+ export declare const bidConfigSchema: z.ZodObject<{
3
+ agencyName: z.ZodNullable<z.ZodString>;
4
+ bidderId: z.ZodNullable<z.ZodString>;
5
+ contractorName: z.ZodNullable<z.ZodString>;
6
+ specialisedProfile: z.ZodNullable<z.ZodString>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ agencyName: string | null;
9
+ bidderId: string | null;
10
+ contractorName: string | null;
11
+ specialisedProfile: string | null;
12
+ }, {
13
+ agencyName: string | null;
14
+ bidderId: string | null;
15
+ contractorName: string | null;
16
+ specialisedProfile: string | null;
17
+ }>;
18
+ export declare const organizationTypeSchema: z.ZodEnum<["agency", "freelancer"]>;
19
+ export declare const organizationSchema: z.ZodObject<{
20
+ id: z.ZodString;
21
+ name: z.ZodString;
22
+ type: z.ZodEnum<["agency", "freelancer"]>;
23
+ bidConfig: z.ZodObject<{
24
+ agencyName: z.ZodNullable<z.ZodString>;
25
+ bidderId: z.ZodNullable<z.ZodString>;
26
+ contractorName: z.ZodNullable<z.ZodString>;
27
+ specialisedProfile: z.ZodNullable<z.ZodString>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ agencyName: string | null;
30
+ bidderId: string | null;
31
+ contractorName: string | null;
32
+ specialisedProfile: string | null;
33
+ }, {
34
+ agencyName: string | null;
35
+ bidderId: string | null;
36
+ contractorName: string | null;
37
+ specialisedProfile: string | null;
38
+ }>;
39
+ tierId: z.ZodEnum<["free", "premium"]>;
40
+ active: z.ZodBoolean;
41
+ limits: z.ZodNullable<z.ZodObject<{
42
+ monthlyCredits: z.ZodNumber;
43
+ usedCredits: z.ZodNumber;
44
+ extraCredits: z.ZodNumber;
45
+ }, "strip", z.ZodTypeAny, {
46
+ monthlyCredits: number;
47
+ usedCredits: number;
48
+ extraCredits: number;
49
+ }, {
50
+ monthlyCredits: number;
51
+ usedCredits: number;
52
+ extraCredits: number;
53
+ }>>;
54
+ billing: z.ZodNullable<z.ZodObject<{
55
+ stripeCustomerId: z.ZodString;
56
+ savedCard: z.ZodBoolean;
57
+ creditsRemaining: z.ZodNumber;
58
+ }, "strip", z.ZodTypeAny, {
59
+ stripeCustomerId: string;
60
+ savedCard: boolean;
61
+ creditsRemaining: number;
62
+ }, {
63
+ stripeCustomerId: string;
64
+ savedCard: boolean;
65
+ creditsRemaining: number;
66
+ }>>;
67
+ subscription: z.ZodNullable<z.ZodObject<{
68
+ tierId: z.ZodString;
69
+ status: z.ZodEnum<["active", "trialing", "cancelled", "paused"]>;
70
+ creditsRemaining: z.ZodNumber;
71
+ startedAt: z.ZodNumber;
72
+ currentPeriodEnd: z.ZodNumber;
73
+ stripeSubscriptionId: z.ZodString;
74
+ source: z.ZodEnum<["stripe", "manual"]>;
75
+ }, "strip", z.ZodTypeAny, {
76
+ status: "active" | "trialing" | "cancelled" | "paused";
77
+ creditsRemaining: number;
78
+ tierId: string;
79
+ startedAt: number;
80
+ currentPeriodEnd: number;
81
+ stripeSubscriptionId: string;
82
+ source: "stripe" | "manual";
83
+ }, {
84
+ status: "active" | "trialing" | "cancelled" | "paused";
85
+ creditsRemaining: number;
86
+ tierId: string;
87
+ startedAt: number;
88
+ currentPeriodEnd: number;
89
+ stripeSubscriptionId: string;
90
+ source: "stripe" | "manual";
91
+ }>>;
92
+ createdAt: z.ZodNumber;
93
+ updatedAt: z.ZodNumber;
94
+ }, "strip", z.ZodTypeAny, {
95
+ type: "agency" | "freelancer";
96
+ id: string;
97
+ name: string;
98
+ bidConfig: {
99
+ agencyName: string | null;
100
+ bidderId: string | null;
101
+ contractorName: string | null;
102
+ specialisedProfile: string | null;
103
+ };
104
+ tierId: "free" | "premium";
105
+ active: boolean;
106
+ limits: {
107
+ monthlyCredits: number;
108
+ usedCredits: number;
109
+ extraCredits: number;
110
+ } | null;
111
+ billing: {
112
+ stripeCustomerId: string;
113
+ savedCard: boolean;
114
+ creditsRemaining: number;
115
+ } | null;
116
+ subscription: {
117
+ status: "active" | "trialing" | "cancelled" | "paused";
118
+ creditsRemaining: number;
119
+ tierId: string;
120
+ startedAt: number;
121
+ currentPeriodEnd: number;
122
+ stripeSubscriptionId: string;
123
+ source: "stripe" | "manual";
124
+ } | null;
125
+ createdAt: number;
126
+ updatedAt: number;
127
+ }, {
128
+ type: "agency" | "freelancer";
129
+ id: string;
130
+ name: string;
131
+ bidConfig: {
132
+ agencyName: string | null;
133
+ bidderId: string | null;
134
+ contractorName: string | null;
135
+ specialisedProfile: string | null;
136
+ };
137
+ tierId: "free" | "premium";
138
+ active: boolean;
139
+ limits: {
140
+ monthlyCredits: number;
141
+ usedCredits: number;
142
+ extraCredits: number;
143
+ } | null;
144
+ billing: {
145
+ stripeCustomerId: string;
146
+ savedCard: boolean;
147
+ creditsRemaining: number;
148
+ } | null;
149
+ subscription: {
150
+ status: "active" | "trialing" | "cancelled" | "paused";
151
+ creditsRemaining: number;
152
+ tierId: string;
153
+ startedAt: number;
154
+ currentPeriodEnd: number;
155
+ stripeSubscriptionId: string;
156
+ source: "stripe" | "manual";
157
+ } | null;
158
+ createdAt: number;
159
+ updatedAt: number;
160
+ }>;
161
+ export declare const aiConfigSchema: z.ZodObject<{
162
+ suitabilityRules: z.ZodNullable<z.ZodString>;
163
+ proposalRules: z.ZodNullable<z.ZodString>;
164
+ questionRules: z.ZodNullable<z.ZodString>;
165
+ }, "strip", z.ZodTypeAny, {
166
+ suitabilityRules: string | null;
167
+ proposalRules: string | null;
168
+ questionRules: string | null;
169
+ }, {
170
+ suitabilityRules: string | null;
171
+ proposalRules: string | null;
172
+ questionRules: string | null;
173
+ }>;
174
+ export declare const knowledgeBaseSchema: z.ZodObject<{
175
+ about: z.ZodString;
176
+ caseStudies: z.ZodString;
177
+ }, "strip", z.ZodTypeAny, {
178
+ about: string;
179
+ caseStudies: string;
180
+ }, {
181
+ about: string;
182
+ caseStudies: string;
183
+ }>;
184
+ export declare const organizationSettingsSchema: z.ZodObject<{
185
+ aiConfig: z.ZodObject<{
186
+ suitabilityRules: z.ZodNullable<z.ZodString>;
187
+ proposalRules: z.ZodNullable<z.ZodString>;
188
+ questionRules: z.ZodNullable<z.ZodString>;
189
+ }, "strip", z.ZodTypeAny, {
190
+ suitabilityRules: string | null;
191
+ proposalRules: string | null;
192
+ questionRules: string | null;
193
+ }, {
194
+ suitabilityRules: string | null;
195
+ proposalRules: string | null;
196
+ questionRules: string | null;
197
+ }>;
198
+ knowledgeBase: z.ZodObject<{
199
+ about: z.ZodString;
200
+ caseStudies: z.ZodString;
201
+ }, "strip", z.ZodTypeAny, {
202
+ about: string;
203
+ caseStudies: string;
204
+ }, {
205
+ about: string;
206
+ caseStudies: string;
207
+ }>;
208
+ }, "strip", z.ZodTypeAny, {
209
+ aiConfig: {
210
+ suitabilityRules: string | null;
211
+ proposalRules: string | null;
212
+ questionRules: string | null;
213
+ };
214
+ knowledgeBase: {
215
+ about: string;
216
+ caseStudies: string;
217
+ };
218
+ }, {
219
+ aiConfig: {
220
+ suitabilityRules: string | null;
221
+ proposalRules: string | null;
222
+ questionRules: string | null;
223
+ };
224
+ knowledgeBase: {
225
+ about: string;
226
+ caseStudies: string;
227
+ };
228
+ }>;
229
+ export interface Organization extends z.infer<typeof organizationSchema> {
230
+ }
231
+ export interface AiConfig extends z.infer<typeof aiConfigSchema> {
232
+ }
233
+ export interface KnowledgeBase extends z.infer<typeof knowledgeBaseSchema> {
234
+ }
235
+ export interface OrganizationSettings extends z.infer<typeof organizationSettingsSchema> {
236
+ }
237
+ export interface BidConfig extends z.infer<typeof bidConfigSchema> {
238
+ }
239
+ export type OrganizationType = z.infer<typeof organizationTypeSchema>;
240
+ export * from "./subscription";
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ export const bidConfigSchema = z.object({
3
+ agencyName: z.string().nullable(),
4
+ bidderId: z.string().nullable(),
5
+ contractorName: z.string().nullable(),
6
+ specialisedProfile: z.string().nullable(),
7
+ });
8
+ export const organizationTypeSchema = z.enum(['agency', 'freelancer']);
9
+ export const organizationSchema = z.object({
10
+ id: z.string(),
11
+ name: z.string(),
12
+ type: organizationTypeSchema,
13
+ bidConfig: bidConfigSchema,
14
+ createdAt: z.date(),
15
+ updatedAt: z.date(),
16
+ });
@@ -0,0 +1,17 @@
1
+ import { number, object, string, z } from "zod";
2
+ export const subscriptionStatusEnum = z.enum([
3
+ "active",
4
+ "trialing",
5
+ "cancelled",
6
+ "paused",
7
+ ]);
8
+ export const subscriptionSourceEnum = z.enum(["stripe", "manual"]);
9
+ export const organizationSubscriptionSchema = object({
10
+ tierId: string(),
11
+ status: subscriptionStatusEnum,
12
+ creditsRemaining: number(),
13
+ startedAt: number(),
14
+ currentPeriodEnd: number(),
15
+ stripeSubscriptionId: string(),
16
+ source: subscriptionSourceEnum,
17
+ });
@@ -0,0 +1,3 @@
1
+ export * from './proxy';
2
+ export * from './proxy-available-replacements';
3
+ export * from './proxy-country';
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ import { proxyProviderSchema } from './proxy';
3
+ export const proxyAvailableReplacementsSchema = z.record(proxyProviderSchema, z.number());
@@ -0,0 +1,249 @@
1
+ import { z } from 'zod';
2
+ export const proxyCountrySchema = z.enum([
3
+ 'US',
4
+ 'CA',
5
+ 'GB',
6
+ 'AF',
7
+ 'AX',
8
+ 'AL',
9
+ 'DZ',
10
+ 'AS',
11
+ 'AD',
12
+ 'AO',
13
+ 'AI',
14
+ 'AQ',
15
+ 'AG',
16
+ 'AR',
17
+ 'AM',
18
+ 'AW',
19
+ 'AU',
20
+ 'AT',
21
+ 'AZ',
22
+ 'BS',
23
+ 'BH',
24
+ 'BD',
25
+ 'BB',
26
+ 'BY',
27
+ 'BE',
28
+ 'BZ',
29
+ 'BJ',
30
+ 'BM',
31
+ 'BT',
32
+ 'BO',
33
+ 'BA',
34
+ 'BW',
35
+ 'BV',
36
+ 'BR',
37
+ 'IO',
38
+ 'BN',
39
+ 'BG',
40
+ 'BF',
41
+ 'BI',
42
+ 'KH',
43
+ 'CM',
44
+ 'CV',
45
+ 'KY',
46
+ 'CF',
47
+ 'TD',
48
+ 'CL',
49
+ 'CN',
50
+ 'CX',
51
+ 'CC',
52
+ 'CO',
53
+ 'KM',
54
+ 'CG',
55
+ 'CD',
56
+ 'CK',
57
+ 'CR',
58
+ 'CI',
59
+ 'HR',
60
+ 'CU',
61
+ 'CY',
62
+ 'CZ',
63
+ 'DK',
64
+ 'DJ',
65
+ 'DM',
66
+ 'DO',
67
+ 'EC',
68
+ 'EG',
69
+ 'SV',
70
+ 'GQ',
71
+ 'ER',
72
+ 'EE',
73
+ 'ET',
74
+ 'FK',
75
+ 'FO',
76
+ 'FJ',
77
+ 'FI',
78
+ 'FR',
79
+ 'GF',
80
+ 'PF',
81
+ 'TF',
82
+ 'GA',
83
+ 'GM',
84
+ 'GE',
85
+ 'DE',
86
+ 'GH',
87
+ 'GI',
88
+ 'GR',
89
+ 'GL',
90
+ 'GD',
91
+ 'GP',
92
+ 'GU',
93
+ 'GT',
94
+ 'GG',
95
+ 'GN',
96
+ 'GW',
97
+ 'GY',
98
+ 'HT',
99
+ 'HM',
100
+ 'VA',
101
+ 'HN',
102
+ 'HK',
103
+ 'HU',
104
+ 'IS',
105
+ 'IN',
106
+ 'ID',
107
+ 'IR',
108
+ 'IQ',
109
+ 'IE',
110
+ 'IM',
111
+ 'IL',
112
+ 'IT',
113
+ 'JM',
114
+ 'JP',
115
+ 'JE',
116
+ 'JO',
117
+ 'KZ',
118
+ 'KE',
119
+ 'KI',
120
+ 'KP',
121
+ 'KR',
122
+ 'KW',
123
+ 'KG',
124
+ 'LA',
125
+ 'LV',
126
+ 'LB',
127
+ 'LS',
128
+ 'LR',
129
+ 'LY',
130
+ 'LI',
131
+ 'LT',
132
+ 'LU',
133
+ 'MO',
134
+ 'MK',
135
+ 'MG',
136
+ 'MW',
137
+ 'MY',
138
+ 'MV',
139
+ 'ML',
140
+ 'MT',
141
+ 'MH',
142
+ 'MQ',
143
+ 'MR',
144
+ 'MU',
145
+ 'YT',
146
+ 'MX',
147
+ 'FM',
148
+ 'MD',
149
+ 'MC',
150
+ 'MN',
151
+ 'ME',
152
+ 'MS',
153
+ 'MA',
154
+ 'MZ',
155
+ 'MM',
156
+ 'NA',
157
+ 'NR',
158
+ 'NP',
159
+ 'NL',
160
+ 'AN',
161
+ 'NC',
162
+ 'NZ',
163
+ 'NI',
164
+ 'NE',
165
+ 'NG',
166
+ 'NU',
167
+ 'NF',
168
+ 'MP',
169
+ 'NO',
170
+ 'OM',
171
+ 'PK',
172
+ 'PW',
173
+ 'PS',
174
+ 'PA',
175
+ 'PG',
176
+ 'PY',
177
+ 'PE',
178
+ 'PH',
179
+ 'PN',
180
+ 'PL',
181
+ 'PT',
182
+ 'PR',
183
+ 'QA',
184
+ 'RE',
185
+ 'RO',
186
+ 'RU',
187
+ 'RW',
188
+ 'BL',
189
+ 'SH',
190
+ 'KN',
191
+ 'LC',
192
+ 'MF',
193
+ 'PM',
194
+ 'VC',
195
+ 'WS',
196
+ 'SM',
197
+ 'ST',
198
+ 'SA',
199
+ 'SN',
200
+ 'RS',
201
+ 'SC',
202
+ 'SL',
203
+ 'SG',
204
+ 'SK',
205
+ 'SI',
206
+ 'SB',
207
+ 'SO',
208
+ 'ZA',
209
+ 'GS',
210
+ 'ES',
211
+ 'LK',
212
+ 'SD',
213
+ 'SR',
214
+ 'SJ',
215
+ 'SZ',
216
+ 'SE',
217
+ 'CH',
218
+ 'SY',
219
+ 'TW',
220
+ 'TJ',
221
+ 'TZ',
222
+ 'TH',
223
+ 'TL',
224
+ 'TG',
225
+ 'TK',
226
+ 'TO',
227
+ 'TT',
228
+ 'TN',
229
+ 'TR',
230
+ 'TM',
231
+ 'TC',
232
+ 'TV',
233
+ 'UG',
234
+ 'UA',
235
+ 'AE',
236
+ 'UM',
237
+ 'UY',
238
+ 'UZ',
239
+ 'VU',
240
+ 'VE',
241
+ 'VN',
242
+ 'VG',
243
+ 'VI',
244
+ 'WF',
245
+ 'EH',
246
+ 'YE',
247
+ 'ZM',
248
+ 'ZW',
249
+ ]);
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ import { proxyCountrySchema } from './proxy-country';
3
+ export const proxyStatusSchema = z.enum([
4
+ 'invalid',
5
+ 'valid',
6
+ 'pending_validation',
7
+ ]);
8
+ export const proxyProviderSchema = z.enum(['webshare']);
9
+ export const proxySchema = z.object({
10
+ id: z.string(),
11
+ externalId: z.string(),
12
+ host: z.string(),
13
+ port: z.number(),
14
+ username: z.string(),
15
+ password: z.string(),
16
+ provider: proxyProviderSchema,
17
+ fraudScore: z.number().nullable(),
18
+ claimedCountry: proxyCountrySchema,
19
+ status: proxyStatusSchema.nullable(),
20
+ country: proxyCountrySchema.nullable(),
21
+ bidderId: z.string().nullable(),
22
+ });
23
+ export const externalProxySchema = proxySchema.omit({
24
+ id: true,
25
+ bidderId: true,
26
+ status: true,
27
+ country: true,
28
+ fraudScore: true,
29
+ });
@@ -0,0 +1,9 @@
1
+ import { date, number, object, string } from "zod";
2
+ import { booleanSchema } from "../shared";
3
+ export const savedSearchSchema = object({
4
+ id: number().int(),
5
+ name: string(),
6
+ url: string(),
7
+ createdAt: date(),
8
+ isActive: booleanSchema,
9
+ });
@@ -0,0 +1,2 @@
1
+ export * from './scrape-payload';
2
+ export * from './scrape-result';
@@ -197,11 +197,11 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
197
197
  projectDuration: import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodEnum<["Less than 1 month", "1 to 3 months", "3 to 6 months", "More than 6 months", "Unspecified"]>, "many">>;
198
198
  experienceLevel: import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodEnum<["Entry level", "Intermediate", "Expert"]>, "many">>;
199
199
  questions: import("zod").ZodNullable<import("zod").ZodObject<{
200
- hasQuestions: import("zod").ZodDefault<import("zod").ZodEnum<["all", "yes", "no"]>>;
200
+ hasQuestions: import("zod").ZodArray<import("zod").ZodEnum<["all", "yes", "no"]>, "many">;
201
201
  }, "strip", import("zod").ZodTypeAny, {
202
- hasQuestions: "all" | "yes" | "no";
202
+ hasQuestions: ("all" | "yes" | "no")[];
203
203
  }, {
204
- hasQuestions?: "all" | "yes" | "no" | undefined;
204
+ hasQuestions: ("all" | "yes" | "no")[];
205
205
  }>>;
206
206
  engagementType: import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodEnum<["Less than 30 hrs/week", "More than 30 hrs/week", "Unspecified"]>, "many">>;
207
207
  clientInfo: import("zod").ZodNullable<import("zod").ZodObject<{
@@ -299,7 +299,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
299
299
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
300
300
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
301
301
  questions: {
302
- hasQuestions: "all" | "yes" | "no";
302
+ hasQuestions: ("all" | "yes" | "no")[];
303
303
  } | null;
304
304
  engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
305
305
  clientInfo: {
@@ -349,7 +349,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
349
349
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
350
350
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
351
351
  questions: {
352
- hasQuestions?: "all" | "yes" | "no" | undefined;
352
+ hasQuestions: ("all" | "yes" | "no")[];
353
353
  } | null;
354
354
  engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
355
355
  clientInfo: {
@@ -444,7 +444,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
444
444
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
445
445
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
446
446
  questions: {
447
- hasQuestions: "all" | "yes" | "no";
447
+ hasQuestions: ("all" | "yes" | "no")[];
448
448
  } | null;
449
449
  engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
450
450
  clientInfo: {
@@ -521,7 +521,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
521
521
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
522
522
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
523
523
  questions: {
524
- hasQuestions?: "all" | "yes" | "no" | undefined;
524
+ hasQuestions: ("all" | "yes" | "no")[];
525
525
  } | null;
526
526
  engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
527
527
  clientInfo: {
@@ -1529,7 +1529,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1529
1529
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
1530
1530
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
1531
1531
  questions: {
1532
- hasQuestions: "all" | "yes" | "no";
1532
+ hasQuestions: ("all" | "yes" | "no")[];
1533
1533
  } | null;
1534
1534
  engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
1535
1535
  clientInfo: {
@@ -1813,7 +1813,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1813
1813
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
1814
1814
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
1815
1815
  questions: {
1816
- hasQuestions?: "all" | "yes" | "no" | undefined;
1816
+ hasQuestions: ("all" | "yes" | "no")[];
1817
1817
  } | null;
1818
1818
  engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
1819
1819
  clientInfo: {
@@ -0,0 +1,21 @@
1
+ import { any, array, object, string } from "zod";
2
+ import { jobActivityOffsetHourSchema, jobListingSchema } from "../lead";
3
+ export const scrapePayloadSchema = object({
4
+ latestJobsUrls: array(string()),
5
+ cookies: array(any()),
6
+ username: string(),
7
+ password: string(),
8
+ });
9
+ export const scrapeUserProfilePayloadSchema = object({
10
+ profileUrl: string(),
11
+ cookies: array(any()),
12
+ username: string(),
13
+ password: string(),
14
+ });
15
+ export const scrapeJobPayloadSchema = object({
16
+ listing: jobListingSchema,
17
+ });
18
+ export const scrapeJobActivityPayloadSchema = object({
19
+ listing: jobListingSchema,
20
+ offsetHour: jobActivityOffsetHourSchema,
21
+ });
@@ -0,0 +1,23 @@
1
+ import { any, array, boolean, object, string } from "zod";
2
+ import { jobListingSchema, upworkJobSchema } from "../lead";
3
+ import { regionSchema } from "../shared";
4
+ import { upworkProfileSchema } from "../user";
5
+ export const scrapeResultSchema = object({
6
+ jobs: array(upworkJobSchema),
7
+ cookies: array(any()),
8
+ region: regionSchema,
9
+ usAccountCookies: array(any()).optional(),
10
+ ukAccountCookies: array(any()).optional(),
11
+ });
12
+ export const scrapeUserProfileResultSchema = object({
13
+ success: boolean(),
14
+ message: string(),
15
+ data: upworkProfileSchema,
16
+ });
17
+ export const scrapeFeedResultSchema = object({
18
+ listings: array(jobListingSchema),
19
+ cookies: array(any()),
20
+ region: regionSchema,
21
+ usAccountCookies: array(any()).optional(),
22
+ ukAccountCookies: array(any()).optional(),
23
+ });