lancer-shared 1.2.82 → 1.2.84

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 (216) hide show
  1. package/dist/bundle.cjs.js +220 -200
  2. package/dist/constants/account-status.d.ts +3 -0
  3. package/dist/constants/account-status.js +17 -0
  4. package/dist/constants/collections.js +13 -11
  5. package/dist/constants/common-questions.js +4 -1
  6. package/dist/constants/index.js +32 -10
  7. package/dist/constants/job-filter-options.js +4 -1
  8. package/dist/constants/job-status.js +12 -7
  9. package/dist/constants/mappings/countryMapping.js +3 -1
  10. package/dist/constants/mappings/regionMapping.js +3 -1
  11. package/dist/constants/organization.d.ts +2 -2
  12. package/dist/constants/proxies.d.ts +4 -0
  13. package/dist/constants/routes.d.ts +12 -1
  14. package/dist/constants/routes.js +37 -39
  15. package/dist/constants/upwork-accounts.js +6 -3
  16. package/dist/constants/upwork-filters.d.ts +5 -0
  17. package/dist/constants/upwork-filters.js +75 -0
  18. package/dist/index.js +20 -4
  19. package/dist/schemas/account/account-status.js +5 -2
  20. package/dist/schemas/account/bidder-account.js +24 -22
  21. package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +5 -0
  22. package/dist/schemas/account/index.js +19 -3
  23. package/dist/schemas/account/manager-account.d.ts +116 -0
  24. package/dist/schemas/account/manager-account.js +38 -0
  25. package/dist/schemas/account/scraper-account.js +24 -21
  26. package/dist/schemas/agent/index.d.ts +20 -1059
  27. package/dist/schemas/ai/ai-config.js +11 -8
  28. package/dist/schemas/ai/index.js +19 -3
  29. package/dist/schemas/ai/proposal.js +13 -10
  30. package/dist/schemas/ai/suitability.js +11 -8
  31. package/dist/schemas/ai-config/ai-config.d.ts +39 -0
  32. package/dist/schemas/ai-config/ai-config.js +12 -0
  33. package/dist/schemas/ai-config/index.d.ts +1 -0
  34. package/dist/schemas/ai-config/index.js +17 -0
  35. package/dist/schemas/bid/bid-result.js +13 -9
  36. package/dist/schemas/bid/bid-status.d.ts +30 -0
  37. package/dist/schemas/bid/bid-status.js +15 -0
  38. package/dist/schemas/bid/bid.js +30 -29
  39. package/dist/schemas/bid/exceptions/base-exception.d.ts +4 -0
  40. package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +5 -0
  41. package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +5 -0
  42. package/dist/schemas/bid/index.js +18 -2
  43. package/dist/schemas/bidding/index.d.ts +1 -0
  44. package/dist/schemas/bidding/index.js +17 -0
  45. package/dist/schemas/bidding/proposal-bidding-status.d.ts +26 -0
  46. package/dist/schemas/bidding/proposal-bidding-status.js +18 -0
  47. package/dist/schemas/bidding/proposal-dto.d.ts +26 -0
  48. package/dist/schemas/bidding/proposal-dto.js +18 -0
  49. package/dist/schemas/campaign/campaign-ai-metrics.js +8 -5
  50. package/dist/schemas/campaign/campaign-analytics.d.ts +43 -208
  51. package/dist/schemas/campaign/campaign-analytics.js +31 -32
  52. package/dist/schemas/campaign/campaign-chat-bot.d.ts +135 -0
  53. package/dist/schemas/campaign/campaign-expenses.js +8 -5
  54. package/dist/schemas/campaign/campaign-insights.js +30 -30
  55. package/dist/schemas/campaign/campaign-integrations.d.ts +0 -5
  56. package/dist/schemas/campaign/campaign-integrations.js +13 -10
  57. package/dist/schemas/campaign/campaign-job-count.js +6 -3
  58. package/dist/schemas/campaign/campaign-webhooks.d.ts +0 -58
  59. package/dist/schemas/campaign/campaign.d.ts +4 -133
  60. package/dist/schemas/campaign/campaign.js +35 -32
  61. package/dist/schemas/campaign/index.d.ts +1 -1
  62. package/dist/schemas/campaign/index.js +23 -7
  63. package/dist/schemas/chat-message/chat-message.js +10 -7
  64. package/dist/schemas/chat-message/index.js +17 -1
  65. package/dist/schemas/config/agency-config.js +9 -6
  66. package/dist/schemas/config/index.js +17 -1
  67. package/dist/schemas/index.js +32 -17
  68. package/dist/schemas/job/index.js +19 -0
  69. package/dist/schemas/job/job-details.d.ts +335 -0
  70. package/dist/schemas/job/job-details.js +29 -0
  71. package/dist/schemas/job/job-note.d.ts +83 -0
  72. package/dist/schemas/job/job-note.js +30 -0
  73. package/dist/schemas/job/job-pipeline.d.ts +74 -0
  74. package/dist/schemas/job/job-pipeline.js +29 -0
  75. package/dist/schemas/job/job-status.d.ts +3 -0
  76. package/dist/schemas/job/job-status.js +27 -0
  77. package/dist/schemas/job/job-suitability.d.ts +12 -0
  78. package/dist/schemas/job/job-suitability.js +13 -0
  79. package/dist/schemas/job/job.d.ts +1160 -0
  80. package/dist/schemas/job/job.js +90 -0
  81. package/dist/schemas/job/pipeline-job.d.ts +608 -0
  82. package/dist/schemas/job/pipeline-job.js +43 -0
  83. package/dist/schemas/job/upwork-job.d.ts +334 -0
  84. package/dist/schemas/job/upwork-job.js +60 -0
  85. package/dist/schemas/job-filters/index.js +17 -1
  86. package/dist/schemas/job-filters/job-filters.js +65 -62
  87. package/dist/schemas/knowledge-object/index.d.ts +1 -0
  88. package/dist/schemas/knowledge-object/index.js +17 -0
  89. package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
  90. package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
  91. package/dist/schemas/lead/index.d.ts +30 -4
  92. package/dist/schemas/lead/index.js +19 -173
  93. package/dist/schemas/lead/lead-note.js +16 -13
  94. package/dist/schemas/lead/lead-status.js +6 -3
  95. package/dist/schemas/lead/lead.d.ts +1897 -0
  96. package/dist/schemas/lead/lead.js +143 -0
  97. package/dist/schemas/logger/index.js +17 -1
  98. package/dist/schemas/logger/log-event.d.ts +19 -11
  99. package/dist/schemas/logger/log-event.js +49 -100
  100. package/dist/schemas/organization/index.d.ts +27 -7
  101. package/dist/schemas/organization/index.js +17 -70
  102. package/dist/schemas/organization/organization.d.ts +7 -177
  103. package/dist/schemas/organization/organization.js +17 -14
  104. package/dist/schemas/proxy/index.js +17 -3
  105. package/dist/schemas/proxy/proxy.js +19 -25
  106. package/dist/schemas/saved-search/index.js +11 -8
  107. package/dist/schemas/scraper/index.js +18 -2
  108. package/dist/schemas/scraper/scrape-payload.d.ts +15 -58
  109. package/dist/schemas/scraper/scrape-payload.js +14 -19
  110. package/dist/schemas/scraper/scrape-response.d.ts +345 -0
  111. package/dist/schemas/scraper/scrape-response.js +9 -0
  112. package/dist/schemas/scraper/scrape-result.js +21 -21
  113. package/dist/schemas/shared.js +9 -12
  114. package/dist/schemas/time-filter/index.js +8 -5
  115. package/dist/schemas/upwork-account/index.d.ts +3 -0
  116. package/dist/schemas/upwork-account/index.js +19 -0
  117. package/dist/schemas/upwork-account/upwork-account-status.d.ts +2 -0
  118. package/dist/schemas/upwork-account/upwork-account-status.js +11 -0
  119. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +95 -0
  120. package/dist/schemas/upwork-account/upwork-business-manager-account.js +35 -0
  121. package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +92 -0
  122. package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
  123. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
  124. package/dist/schemas/upwork-account/upwork-scraping-account.js +30 -0
  125. package/dist/schemas/user/index.js +41 -38
  126. package/dist/types/account/account-status.js +2 -1
  127. package/dist/types/account/bidder-account.js +2 -1
  128. package/dist/types/account/index.js +19 -3
  129. package/dist/types/account/manager-account.d.ts +7 -0
  130. package/dist/types/account/manager-account.js +2 -0
  131. package/dist/types/account/scraper-account.js +2 -1
  132. package/dist/types/ai/ai-config.js +2 -1
  133. package/dist/types/ai/index.js +19 -3
  134. package/dist/types/ai/proposal.js +2 -1
  135. package/dist/types/ai/suitability.js +2 -1
  136. package/dist/types/ai-config/ai-config.d.ts +6 -0
  137. package/dist/types/ai-config/ai-config.js +2 -0
  138. package/dist/types/ai-config/index.d.ts +1 -0
  139. package/dist/types/ai-config/index.js +17 -0
  140. package/dist/types/bid/bid-result.js +2 -1
  141. package/dist/types/bid/bid-status.d.ts +5 -0
  142. package/dist/types/bid/bid-status.js +2 -0
  143. package/dist/types/bid/bid.js +2 -1
  144. package/dist/types/bid/index.js +18 -2
  145. package/dist/types/bidding/index.d.ts +1 -0
  146. package/dist/types/bidding/index.js +17 -0
  147. package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
  148. package/dist/types/bidding/proposal-bidding-status.js +2 -0
  149. package/dist/types/bidding/proposal-dto.d.ts +3 -0
  150. package/dist/types/bidding/proposal-dto.js +2 -0
  151. package/dist/types/campaign/campaign-analytics.js +2 -1
  152. package/dist/types/campaign/campaign-expenses.js +2 -1
  153. package/dist/types/campaign/campaign-insights.js +2 -1
  154. package/dist/types/campaign/campaign-integrations.js +2 -1
  155. package/dist/types/campaign/campaign-job-count.js +2 -1
  156. package/dist/types/campaign/campaign.d.ts +0 -2
  157. package/dist/types/campaign/campaign.js +2 -1
  158. package/dist/types/campaign/index.js +22 -6
  159. package/dist/types/chat-message/chat-message.js +2 -1
  160. package/dist/types/chat-message/index.js +17 -1
  161. package/dist/types/config/agency-config.js +2 -1
  162. package/dist/types/config/index.js +17 -1
  163. package/dist/types/index.js +29 -15
  164. package/dist/types/job/index.js +19 -3
  165. package/dist/types/job/job-details.d.ts +36 -0
  166. package/dist/types/job/job-details.js +2 -0
  167. package/dist/types/job/job-note.js +2 -1
  168. package/dist/types/job/job-pipeline.d.ts +4 -0
  169. package/dist/types/job/job-pipeline.js +2 -0
  170. package/dist/types/job/job-status.js +4 -1
  171. package/dist/types/job/job-suitability.d.ts +3 -0
  172. package/dist/types/job/job-suitability.js +2 -0
  173. package/dist/types/job/job.d.ts +36 -0
  174. package/dist/types/job/job.js +2 -0
  175. package/dist/types/job-filters/index.js +17 -1
  176. package/dist/types/job-filters/job-filters.js +2 -1
  177. package/dist/types/knowledge-object/index.d.ts +1 -0
  178. package/dist/types/knowledge-object/index.js +17 -0
  179. package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
  180. package/dist/types/knowledge-object/knowledge-object.js +2 -0
  181. package/dist/types/logger/index.js +17 -1
  182. package/dist/types/logger/log-event.js +2 -1
  183. package/dist/types/saved-search/index.js +2 -1
  184. package/dist/types/scraper/index.js +18 -2
  185. package/dist/types/scraper/scrape-payload.js +2 -1
  186. package/dist/types/scraper/scrape-response.d.ts +4 -0
  187. package/dist/types/scraper/scrape-response.js +2 -0
  188. package/dist/types/scraper/scrape-result.js +2 -1
  189. package/dist/types/time-filter/index.js +2 -1
  190. package/dist/types/upwork-account/index.d.ts +3 -0
  191. package/dist/types/upwork-account/index.js +19 -0
  192. package/dist/types/upwork-account/upwork-account-status.d.ts +3 -0
  193. package/dist/types/upwork-account/upwork-account-status.js +2 -0
  194. package/dist/types/upwork-account/upwork-business-manager-account.d.ts +7 -0
  195. package/dist/types/upwork-account/upwork-business-manager-account.js +2 -0
  196. package/dist/types/upwork-account/upwork-scraping-account.d.ts +5 -0
  197. package/dist/types/upwork-account/upwork-scraping-account.js +2 -0
  198. package/dist/types/user/index.js +2 -1
  199. package/dist/utils/index.js +17 -1
  200. package/dist/utils/try-catch.js +23 -8
  201. package/package.json +1 -1
  202. package/dist/schemas/event/index.d.ts +0 -58
  203. package/dist/schemas/job/haha.json +0 -581
  204. package/dist/schemas/lead/nuxt.js +0 -287
  205. package/dist/schemas/meter-event/index.d.ts +0 -12
  206. package/dist/schemas/organization/member.js +0 -7
  207. package/dist/schemas/organization/subscription.js +0 -17
  208. package/dist/schemas/proxy/proxy-available-replacements.js +0 -3
  209. package/dist/schemas/proxy/proxy-country.js +0 -249
  210. package/dist/schemas/tier/index.d.ts +0 -119
  211. package/dist/schemas/transaction/index.js +0 -17
  212. package/dist/schemas/usage/index.js +0 -18
  213. package/dist/types/job/nuxt.js +0 -1
  214. package/dist/types/shared.js +0 -1
  215. package/dist/types/transaction/index.js +0 -1
  216. package/dist/types/usage/index.js +0 -1
@@ -1,70 +1,17 @@
1
- import { boolean, number, object, string, z } from "zod";
2
- import { LogEventTypeEnum } from "../logger";
3
- import { organizationSubscriptionSchema } from "./subscription";
4
- export const bidConfigSchema = object({
5
- agencyName: string().nullable(),
6
- bidderId: string().nullable(),
7
- contractorName: string().nullable(),
8
- specialisedProfile: string().nullable(),
9
- });
10
- export const organizationTypeSchema = z.enum(["agency", "freelancer"]);
11
- export const organizationTierEnum = z.enum(["free", "premium"]);
12
- export const organizationLimitsSchema = object({
13
- monthlyCredits: number(),
14
- usedCredits: number(),
15
- extraCredits: number(),
16
- });
17
- export const organizationBillingSchema = object({
18
- stripeCustomerId: string(),
19
- savedCard: boolean(),
20
- creditsRemaining: number(),
21
- });
22
- export const organizationSchema = object({
23
- id: string(),
24
- name: string(),
25
- type: organizationTypeSchema,
26
- tierId: organizationTierEnum,
27
- subscription: organizationSubscriptionSchema.nullable(),
28
- bidConfig: bidConfigSchema,
29
- active: boolean(),
30
- limits: organizationLimitsSchema,
31
- billing: organizationBillingSchema.nullable(),
32
- createdAt: number(),
33
- updatedAt: number(),
34
- });
35
- export const creditDeductionEventTypeEnum = LogEventTypeEnum.extract([
36
- "suitabilityComplete",
37
- "proposalComplete",
38
- ]);
39
- export const creditDeductionPayloadSchema = object({
40
- event: creditDeductionEventTypeEnum,
41
- campaignId: string().nullish(),
42
- });
43
- export const aiConfigOldSchema = object({
44
- id: string(),
45
- suitabilityPrompt: string().nullable(),
46
- proposalPrompt: string().nullable(),
47
- questionProposalPrompt: string().nullable(),
48
- knowledgeBase: string().nullable(),
49
- });
50
- export const aiConfigSchema = object({
51
- suitabilityRules: string().nullable(),
52
- coverLetterRules: string().nullable(),
53
- questionRules: string().nullable(),
54
- });
55
- export const knowledgeBaseSchema = object({
56
- about: string(),
57
- caseStudies: string(),
58
- });
59
- export const notificationConfigSchema = object({
60
- emailEnabled: boolean(),
61
- discordWebhookUrl: string().nullable(),
62
- slackWebhookUrl: string().nullable(),
63
- });
64
- export const organizationSettingsSchema = object({
65
- aiConfig: aiConfigSchema,
66
- knowledgeBase: knowledgeBaseSchema,
67
- notifications: notificationConfigSchema,
68
- });
69
- export * from "./member";
70
- export * from "./subscription";
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("./organization"), exports);
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  export declare const bidConfigSchema: z.ZodObject<{
3
3
  agencyName: z.ZodNullable<z.ZodString>;
4
4
  bidderId: z.ZodNullable<z.ZodString>;
@@ -36,61 +36,8 @@ export declare const organizationSchema: z.ZodObject<{
36
36
  contractorName: string | null;
37
37
  specialisedProfile: string | null;
38
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;
39
+ createdAt: z.ZodDate;
40
+ updatedAt: z.ZodDate;
94
41
  }, "strip", z.ZodTypeAny, {
95
42
  type: "agency" | "freelancer";
96
43
  id: string;
@@ -101,29 +48,8 @@ export declare const organizationSchema: z.ZodObject<{
101
48
  contractorName: string | null;
102
49
  specialisedProfile: string | null;
103
50
  };
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;
51
+ createdAt: Date;
52
+ updatedAt: Date;
127
53
  }, {
128
54
  type: "agency" | "freelancer";
129
55
  id: string;
@@ -134,107 +60,11 @@ export declare const organizationSchema: z.ZodObject<{
134
60
  contractorName: string | null;
135
61
  specialisedProfile: string | null;
136
62
  };
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
- };
63
+ createdAt: Date;
64
+ updatedAt: Date;
228
65
  }>;
229
66
  export interface Organization extends z.infer<typeof organizationSchema> {
230
67
  }
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
68
  export interface BidConfig extends z.infer<typeof bidConfigSchema> {
238
69
  }
239
70
  export type OrganizationType = z.infer<typeof organizationTypeSchema>;
240
- export * from "./subscription";
@@ -1,16 +1,19 @@
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(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.organizationSchema = exports.organizationTypeSchema = exports.bidConfigSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.bidConfigSchema = zod_1.z.object({
6
+ agencyName: zod_1.z.string().nullable(),
7
+ bidderId: zod_1.z.string().nullable(),
8
+ contractorName: zod_1.z.string().nullable(),
9
+ specialisedProfile: zod_1.z.string().nullable(),
7
10
  });
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(),
11
+ exports.organizationTypeSchema = zod_1.z.enum(['agency', 'freelancer']);
12
+ exports.organizationSchema = zod_1.z.object({
13
+ id: zod_1.z.string(),
14
+ name: zod_1.z.string(),
15
+ type: exports.organizationTypeSchema,
16
+ bidConfig: exports.bidConfigSchema,
17
+ createdAt: zod_1.z.date(),
18
+ updatedAt: zod_1.z.date(),
16
19
  });
@@ -1,3 +1,17 @@
1
- export * from './proxy';
2
- export * from './proxy-available-replacements';
3
- export * from './proxy-country';
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("./proxy"), exports);
@@ -1,29 +1,23 @@
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(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.externalProxySchema = exports.proxySchema = exports.proxyCountrySchema = exports.proxyProviderSchema = exports.proxyStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.proxyStatusSchema = zod_1.z.enum(['ready', 'pending', 'to_replace']);
6
+ exports.proxyProviderSchema = zod_1.z.enum(['webshare']);
7
+ exports.proxyCountrySchema = zod_1.z.enum(['USA']);
8
+ exports.proxySchema = zod_1.z.object({
9
+ id: zod_1.z.string(),
10
+ externalId: zod_1.z.string(),
11
+ host: zod_1.z.string(),
12
+ port: zod_1.z.number(),
13
+ username: zod_1.z.string(),
14
+ password: zod_1.z.string(),
15
+ provider: exports.proxyProviderSchema,
16
+ country: exports.proxyCountrySchema,
17
+ status: exports.proxyStatusSchema,
18
+ bidderId: zod_1.z.string().nullable(),
22
19
  });
23
- export const externalProxySchema = proxySchema.omit({
20
+ exports.externalProxySchema = exports.proxySchema.omit({
24
21
  id: true,
25
22
  bidderId: true,
26
- status: true,
27
- country: true,
28
- fraudScore: true,
29
23
  });
@@ -1,9 +1,12 @@
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,
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.savedSearchSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const shared_1 = require("../shared");
6
+ exports.savedSearchSchema = (0, zod_1.object)({
7
+ id: (0, zod_1.number)().int(),
8
+ name: (0, zod_1.string)(),
9
+ url: (0, zod_1.string)(),
10
+ createdAt: (0, zod_1.date)(),
11
+ isActive: shared_1.booleanSchema,
9
12
  });
@@ -1,2 +1,18 @@
1
- export * from './scrape-payload';
2
- export * from './scrape-result';
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("./scrape-payload"), exports);
18
+ __exportStar(require("./scrape-result"), exports);
@@ -401,32 +401,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
401
401
  boosted?: number | undefined;
402
402
  }>;
403
403
  notificationsEnabled: import("zod").ZodNullable<import("zod").ZodBoolean>;
404
- webhooks: import("zod").ZodArray<import("zod").ZodObject<{
405
- id: import("zod").ZodString;
406
- title: import("zod").ZodString;
407
- url: import("zod").ZodString;
408
- notificationSettings: import("zod").ZodObject<{
409
- [k: string]: import("zod").ZodDefault<import("zod").ZodBoolean>;
410
- }, "strip", import("zod").ZodTypeAny, {
411
- [x: string]: boolean;
412
- }, {
413
- [x: string]: boolean | undefined;
414
- }>;
415
- }, "strip", import("zod").ZodTypeAny, {
416
- title: string;
417
- id: string;
418
- url: string;
419
- notificationSettings: {
420
- [x: string]: boolean;
421
- };
422
- }, {
423
- title: string;
424
- id: string;
425
- url: string;
426
- notificationSettings: {
427
- [x: string]: boolean | undefined;
428
- };
429
- }>, "many">;
430
404
  status: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"active">, import("zod").ZodLiteral<"draft">, import("zod").ZodLiteral<"paused">, import("zod").ZodLiteral<"error">]>>;
431
405
  bidConfig: import("zod").ZodNullable<import("zod").ZodObject<{
432
406
  agencyName: import("zod").ZodNullable<import("zod").ZodString>;
@@ -513,14 +487,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
513
487
  boosted: number;
514
488
  };
515
489
  notificationsEnabled: boolean | null;
516
- webhooks: {
517
- title: string;
518
- id: string;
519
- url: string;
520
- notificationSettings: {
521
- [x: string]: boolean;
522
- };
523
- }[];
524
490
  bidConfig: {
525
491
  agencyName: string | null;
526
492
  bidderId: string | null;
@@ -594,14 +560,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
594
560
  boosted?: number | undefined;
595
561
  };
596
562
  notificationsEnabled: boolean | null;
597
- webhooks: {
598
- title: string;
599
- id: string;
600
- url: string;
601
- notificationSettings: {
602
- [x: string]: boolean | undefined;
603
- };
604
- }[];
605
563
  bidConfig: {
606
564
  agencyName: string | null;
607
565
  bidderId: string | null;
@@ -779,6 +737,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
779
737
  createdAt: import("zod").ZodNumber;
780
738
  updatedAt: import("zod").ZodNumber;
781
739
  openRouterApiKey: import("zod").ZodNullable<import("zod").ZodString>;
740
+ appTrialEndsAt: import("zod").ZodNullable<import("zod").ZodNumber>;
782
741
  }, "strip", import("zod").ZodTypeAny, {
783
742
  type: "agency" | "freelancer";
784
743
  id: string;
@@ -824,6 +783,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
824
783
  } | null;
825
784
  lastBidTime: number | null;
826
785
  openRouterApiKey: string | null;
786
+ appTrialEndsAt: number | null;
827
787
  }, {
828
788
  type: "agency" | "freelancer";
829
789
  id: string;
@@ -869,6 +829,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
869
829
  } | null;
870
830
  lastBidTime: number | null;
871
831
  openRouterApiKey: string | null;
832
+ appTrialEndsAt: number | null;
872
833
  }>;
873
834
  lead: import("zod").ZodObject<Omit<import("zod").objectUtil.extendShape<{
874
835
  id: import("zod").ZodNullable<import("zod").ZodString>;
@@ -1193,6 +1154,8 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1193
1154
  biddingTaskScheduled: import("zod").ZodNullable<import("zod").ZodBoolean>;
1194
1155
  scheduledBiddingTime: import("zod").ZodNullable<import("zod").ZodNumber>;
1195
1156
  wonAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
1157
+ biddingTaskId: import("zod").ZodNullable<import("zod").ZodString>;
1158
+ doNotApplyReason: import("zod").ZodNullable<import("zod").ZodString>;
1196
1159
  }>, "processed">, "strip", import("zod").ZodTypeAny, {
1197
1160
  uid: string | null;
1198
1161
  title: string | null;
@@ -1300,6 +1263,8 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1300
1263
  leadStatus: "leads" | "contacted" | "viewed" | "replied" | "won" | null;
1301
1264
  biddingTaskScheduled: boolean | null;
1302
1265
  scheduledBiddingTime: number | null;
1266
+ biddingTaskId: string | null;
1267
+ doNotApplyReason: string | null;
1303
1268
  activity?: Partial<Record<"4h" | "24h", {
1304
1269
  updatedAt: number | null;
1305
1270
  proposals: {
@@ -1429,6 +1394,8 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1429
1394
  leadStatus: "leads" | "contacted" | "viewed" | "replied" | "won" | null;
1430
1395
  biddingTaskScheduled: boolean | null;
1431
1396
  scheduledBiddingTime: number | null;
1397
+ biddingTaskId: string | null;
1398
+ doNotApplyReason: string | null;
1432
1399
  activity?: Partial<Record<"4h" | "24h", {
1433
1400
  updatedAt: number | null;
1434
1401
  proposals: {
@@ -1597,14 +1564,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1597
1564
  boosted: number;
1598
1565
  };
1599
1566
  notificationsEnabled: boolean | null;
1600
- webhooks: {
1601
- title: string;
1602
- id: string;
1603
- url: string;
1604
- notificationSettings: {
1605
- [x: string]: boolean;
1606
- };
1607
- }[];
1608
1567
  bidConfig: {
1609
1568
  agencyName: string | null;
1610
1569
  bidderId: string | null;
@@ -1659,6 +1618,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1659
1618
  } | null;
1660
1619
  lastBidTime: number | null;
1661
1620
  openRouterApiKey: string | null;
1621
+ appTrialEndsAt: number | null;
1662
1622
  };
1663
1623
  lead: {
1664
1624
  uid: string | null;
@@ -1767,6 +1727,8 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1767
1727
  leadStatus: "leads" | "contacted" | "viewed" | "replied" | "won" | null;
1768
1728
  biddingTaskScheduled: boolean | null;
1769
1729
  scheduledBiddingTime: number | null;
1730
+ biddingTaskId: string | null;
1731
+ doNotApplyReason: string | null;
1770
1732
  activity?: Partial<Record<"4h" | "24h", {
1771
1733
  updatedAt: number | null;
1772
1734
  proposals: {
@@ -1880,14 +1842,6 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1880
1842
  boosted?: number | undefined;
1881
1843
  };
1882
1844
  notificationsEnabled: boolean | null;
1883
- webhooks: {
1884
- title: string;
1885
- id: string;
1886
- url: string;
1887
- notificationSettings: {
1888
- [x: string]: boolean | undefined;
1889
- };
1890
- }[];
1891
1845
  bidConfig: {
1892
1846
  agencyName: string | null;
1893
1847
  bidderId: string | null;
@@ -1945,6 +1899,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1945
1899
  } | null;
1946
1900
  lastBidTime: number | null;
1947
1901
  openRouterApiKey: string | null;
1902
+ appTrialEndsAt: number | null;
1948
1903
  };
1949
1904
  lead: {
1950
1905
  uid: string | null;
@@ -2053,6 +2008,8 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
2053
2008
  leadStatus: "leads" | "contacted" | "viewed" | "replied" | "won" | null;
2054
2009
  biddingTaskScheduled: boolean | null;
2055
2010
  scheduledBiddingTime: number | null;
2011
+ biddingTaskId: string | null;
2012
+ doNotApplyReason: string | null;
2056
2013
  activity?: Partial<Record<"4h" | "24h", {
2057
2014
  updatedAt: number | null;
2058
2015
  proposals: {
@@ -1,21 +1,16 @@
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(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.scrapeUserProfilePayloadSchema = exports.scrapePayloadSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.scrapePayloadSchema = zod_1.z.object({
6
+ latestJobsUrls: zod_1.z.array(zod_1.z.string()),
7
+ cookies: zod_1.z.array(zod_1.z.any()),
8
+ username: zod_1.z.string(),
9
+ password: zod_1.z.string(),
8
10
  });
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,
11
+ exports.scrapeUserProfilePayloadSchema = zod_1.z.object({
12
+ profileUrl: zod_1.z.string(),
13
+ cookies: zod_1.z.array(zod_1.z.any()),
14
+ username: zod_1.z.string(),
15
+ password: zod_1.z.string(),
21
16
  });