lancer-shared 1.2.19 → 1.2.21

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 (160) hide show
  1. package/dist/bundle.cjs.js +134 -23
  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 +16 -0
  5. package/dist/constants/common-questions.js +60 -0
  6. package/dist/constants/index.d.ts +1 -1
  7. package/dist/constants/index.js +40 -0
  8. package/dist/constants/invoice.d.ts +2 -0
  9. package/dist/constants/job-filter-options.js +268 -0
  10. package/dist/constants/job-status.js +26 -0
  11. package/dist/constants/mappings/countryMapping.js +122 -0
  12. package/dist/constants/mappings/regionMapping.js +242 -0
  13. package/dist/constants/routes.js +108 -0
  14. package/dist/constants/upwork-accounts.js +21 -0
  15. package/dist/index.js +20 -0
  16. package/dist/schemas/account/account-status.js +11 -0
  17. package/dist/schemas/account/bidder-account.js +37 -0
  18. package/dist/schemas/account/index.js +19 -0
  19. package/dist/schemas/account/manager-account.d.ts +116 -0
  20. package/dist/schemas/account/manager-account.js +38 -0
  21. package/dist/schemas/account/scraper-account.js +37 -0
  22. package/dist/schemas/ai/ai-config.d.ts +36 -0
  23. package/dist/schemas/ai/ai-config.js +12 -0
  24. package/dist/schemas/ai/index.d.ts +3 -0
  25. package/dist/schemas/ai/index.js +19 -0
  26. package/dist/schemas/ai/proposal.d.ts +82 -0
  27. package/dist/schemas/ai/proposal.js +16 -0
  28. package/dist/schemas/ai/suitability.d.ts +37 -0
  29. package/dist/schemas/ai/suitability.js +17 -0
  30. package/dist/schemas/bid/bid-result.js +15 -0
  31. package/dist/schemas/bid/bid.js +36 -0
  32. package/dist/schemas/bid/index.js +18 -0
  33. package/dist/schemas/bidding/index.d.ts +1 -0
  34. package/dist/schemas/bidding/index.js +17 -0
  35. package/dist/schemas/bidding/proposal-bidding-status.d.ts +26 -0
  36. package/dist/schemas/bidding/proposal-bidding-status.js +18 -0
  37. package/dist/schemas/campaign/campaign-ai-metrics.js +9 -0
  38. package/dist/schemas/campaign/campaign-analytics.d.ts +2621 -38
  39. package/dist/schemas/campaign/campaign-analytics.js +41 -0
  40. package/dist/schemas/campaign/campaign-expenses.js +9 -0
  41. package/dist/schemas/campaign/campaign-insights.js +31 -0
  42. package/dist/schemas/campaign/campaign-integrations.js +16 -0
  43. package/dist/schemas/campaign/campaign-job-count.js +6 -0
  44. package/dist/schemas/campaign/campaign.js +44 -0
  45. package/dist/schemas/campaign/index.js +23 -0
  46. package/dist/schemas/chat-message/chat-message.js +13 -0
  47. package/dist/schemas/chat-message/index.js +17 -0
  48. package/dist/schemas/config/agency-config.js +10 -0
  49. package/dist/schemas/config/index.js +17 -0
  50. package/dist/schemas/index.js +32 -0
  51. package/dist/schemas/invoice/index.d.ts +8 -0
  52. package/dist/schemas/job/index.js +19 -0
  53. package/dist/schemas/job/job-details.d.ts +335 -0
  54. package/dist/schemas/job/job-details.js +29 -0
  55. package/dist/schemas/job/job-note.d.ts +83 -0
  56. package/dist/schemas/job/job-note.js +30 -0
  57. package/dist/schemas/job/job-status.d.ts +3 -0
  58. package/dist/schemas/job/job-status.js +27 -0
  59. package/dist/schemas/job/job.d.ts +1160 -0
  60. package/dist/schemas/job/job.js +90 -0
  61. package/dist/schemas/job/pipeline-job.d.ts +602 -0
  62. package/dist/schemas/job/pipeline-job.js +42 -0
  63. package/dist/schemas/job/upwork-job.d.ts +334 -0
  64. package/dist/schemas/job/upwork-job.js +60 -0
  65. package/dist/schemas/job-filters/index.js +17 -0
  66. package/dist/schemas/job-filters/job-filters.js +87 -0
  67. package/dist/schemas/lead/index.js +19 -0
  68. package/dist/schemas/lead/lead-note.js +30 -0
  69. package/dist/schemas/lead/lead-status.d.ts +23 -0
  70. package/dist/schemas/lead/lead-status.js +26 -0
  71. package/dist/schemas/lead/lead.d.ts +1897 -0
  72. package/dist/schemas/lead/lead.js +143 -0
  73. package/dist/schemas/logger/index.js +17 -0
  74. package/dist/schemas/logger/log-event.d.ts +13 -10
  75. package/dist/schemas/logger/log-event.js +66 -0
  76. package/dist/schemas/organization/index.d.ts +68 -1
  77. package/dist/schemas/organization/index.js +17 -0
  78. package/dist/schemas/organization/organization.d.ts +13 -87
  79. package/dist/schemas/organization/organization.js +19 -0
  80. package/dist/schemas/organization/subscription.d.ts +47 -0
  81. package/dist/schemas/plan/index.d.ts +36 -3
  82. package/dist/schemas/proxy/index.js +17 -0
  83. package/dist/schemas/proxy/proxy.js +21 -0
  84. package/dist/schemas/saved-search/index.js +12 -0
  85. package/dist/schemas/scraper/index.js +18 -0
  86. package/dist/schemas/scraper/scrape-payload.d.ts +49 -0
  87. package/dist/schemas/scraper/scrape-payload.js +16 -0
  88. package/dist/schemas/scraper/scrape-result.js +23 -0
  89. package/dist/schemas/shared.js +16 -0
  90. package/dist/schemas/time-filter/index.js +9 -0
  91. package/dist/schemas/upwork-account/index.d.ts +3 -0
  92. package/dist/schemas/upwork-account/index.js +19 -0
  93. package/dist/schemas/upwork-account/upwork-account-status.d.ts +2 -0
  94. package/dist/schemas/upwork-account/upwork-account-status.js +11 -0
  95. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +95 -0
  96. package/dist/schemas/upwork-account/upwork-business-manager-account.js +35 -0
  97. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
  98. package/dist/schemas/upwork-account/upwork-scraping-account.js +29 -0
  99. package/dist/schemas/user/index.js +55 -0
  100. package/dist/types/account/account-status.js +2 -0
  101. package/dist/types/account/bidder-account.js +2 -0
  102. package/dist/types/account/index.js +19 -0
  103. package/dist/types/account/manager-account.d.ts +7 -0
  104. package/dist/types/account/manager-account.js +2 -0
  105. package/dist/types/account/scraper-account.js +2 -0
  106. package/dist/types/ai/ai-config.d.ts +6 -0
  107. package/dist/types/ai/ai-config.js +2 -0
  108. package/dist/types/ai/index.d.ts +3 -0
  109. package/dist/types/ai/index.js +19 -0
  110. package/dist/types/ai/proposal.d.ts +10 -0
  111. package/dist/types/ai/proposal.js +2 -0
  112. package/dist/types/ai/suitability.d.ts +6 -0
  113. package/dist/types/ai/suitability.js +2 -0
  114. package/dist/types/bid/bid-result.js +2 -0
  115. package/dist/types/bid/bid.js +2 -0
  116. package/dist/types/bid/index.js +18 -0
  117. package/dist/types/bidding/index.d.ts +1 -0
  118. package/dist/types/bidding/index.js +17 -0
  119. package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
  120. package/dist/types/bidding/proposal-bidding-status.js +2 -0
  121. package/dist/types/campaign/campaign-analytics.js +2 -0
  122. package/dist/types/campaign/campaign-expenses.js +2 -0
  123. package/dist/types/campaign/campaign-insights.js +2 -0
  124. package/dist/types/campaign/campaign-integrations.js +2 -0
  125. package/dist/types/campaign/campaign-job-count.js +2 -0
  126. package/dist/types/campaign/campaign.js +2 -0
  127. package/dist/types/campaign/index.js +22 -0
  128. package/dist/types/chat-message/chat-message.js +2 -0
  129. package/dist/types/chat-message/index.js +17 -0
  130. package/dist/types/config/agency-config.js +2 -0
  131. package/dist/types/config/index.js +17 -0
  132. package/dist/types/index.js +29 -0
  133. package/dist/types/job/index.js +19 -0
  134. package/dist/types/job/job-details.d.ts +36 -0
  135. package/dist/types/job/job-details.js +2 -0
  136. package/dist/types/job/job-note.js +2 -0
  137. package/dist/types/job/job-status.js +12 -0
  138. package/dist/types/job/job.d.ts +36 -0
  139. package/dist/types/job/job.js +2 -0
  140. package/dist/types/job-filters/index.js +17 -0
  141. package/dist/types/job-filters/job-filters.js +2 -0
  142. package/dist/types/logger/index.js +17 -0
  143. package/dist/types/logger/log-event.js +2 -0
  144. package/dist/types/saved-search/index.js +2 -0
  145. package/dist/types/scraper/index.js +18 -0
  146. package/dist/types/scraper/scrape-payload.js +2 -0
  147. package/dist/types/scraper/scrape-result.js +2 -0
  148. package/dist/types/time-filter/index.js +2 -0
  149. package/dist/types/upwork-account/index.d.ts +3 -0
  150. package/dist/types/upwork-account/index.js +19 -0
  151. package/dist/types/upwork-account/upwork-account-status.d.ts +3 -0
  152. package/dist/types/upwork-account/upwork-account-status.js +2 -0
  153. package/dist/types/upwork-account/upwork-business-manager-account.d.ts +7 -0
  154. package/dist/types/upwork-account/upwork-business-manager-account.js +2 -0
  155. package/dist/types/upwork-account/upwork-scraping-account.d.ts +5 -0
  156. package/dist/types/upwork-account/upwork-scraping-account.js +2 -0
  157. package/dist/types/user/index.js +2 -0
  158. package/dist/utils/index.js +17 -0
  159. package/dist/utils/try-catch.js +25 -0
  160. package/package.json +1 -1
@@ -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>;
@@ -6,13 +6,13 @@ export declare const bidConfigSchema: z.ZodObject<{
6
6
  specialisedProfile: z.ZodNullable<z.ZodString>;
7
7
  }, "strip", z.ZodTypeAny, {
8
8
  agencyName: string | null;
9
- contractorName: string | null;
10
9
  bidderId: string | null;
10
+ contractorName: string | null;
11
11
  specialisedProfile: string | null;
12
12
  }, {
13
13
  agencyName: string | null;
14
- contractorName: string | null;
15
14
  bidderId: string | null;
15
+ contractorName: string | null;
16
16
  specialisedProfile: string | null;
17
17
  }>;
18
18
  export declare const organizationTypeSchema: z.ZodEnum<["agency", "freelancer"]>;
@@ -27,118 +27,44 @@ export declare const organizationSchema: z.ZodObject<{
27
27
  specialisedProfile: z.ZodNullable<z.ZodString>;
28
28
  }, "strip", z.ZodTypeAny, {
29
29
  agencyName: string | null;
30
- contractorName: string | null;
31
30
  bidderId: string | null;
31
+ contractorName: string | null;
32
32
  specialisedProfile: string | null;
33
33
  }, {
34
34
  agencyName: string | null;
35
- contractorName: string | null;
36
35
  bidderId: string | null;
36
+ contractorName: string | null;
37
37
  specialisedProfile: string | null;
38
38
  }>;
39
39
  createdAt: z.ZodDate;
40
40
  updatedAt: z.ZodDate;
41
41
  }, "strip", z.ZodTypeAny, {
42
- id: string;
43
42
  type: "agency" | "freelancer";
44
- createdAt: Date;
45
- updatedAt: Date;
43
+ id: string;
46
44
  name: string;
47
45
  bidConfig: {
48
46
  agencyName: string | null;
49
- contractorName: string | null;
50
47
  bidderId: string | null;
48
+ contractorName: string | null;
51
49
  specialisedProfile: string | null;
52
50
  };
53
- }, {
54
- id: string;
55
- type: "agency" | "freelancer";
56
51
  createdAt: Date;
57
52
  updatedAt: Date;
53
+ }, {
54
+ type: "agency" | "freelancer";
55
+ id: string;
58
56
  name: string;
59
57
  bidConfig: {
60
58
  agencyName: string | null;
61
- contractorName: string | null;
62
59
  bidderId: string | null;
60
+ contractorName: string | null;
63
61
  specialisedProfile: string | null;
64
62
  };
65
- }>;
66
- export declare const aiConfigSchema: z.ZodObject<{
67
- suitabilityRules: z.ZodNullable<z.ZodString>;
68
- coverLetterRules: z.ZodNullable<z.ZodString>;
69
- questionRules: z.ZodNullable<z.ZodString>;
70
- }, "strip", z.ZodTypeAny, {
71
- suitabilityRules: string | null;
72
- questionRules: string | null;
73
- coverLetterRules: string | null;
74
- }, {
75
- suitabilityRules: string | null;
76
- questionRules: string | null;
77
- coverLetterRules: string | null;
78
- }>;
79
- export declare const knowledgeBaseSchema: z.ZodObject<{
80
- about: z.ZodString;
81
- caseStudies: z.ZodString;
82
- }, "strip", z.ZodTypeAny, {
83
- about: string;
84
- caseStudies: string;
85
- }, {
86
- about: string;
87
- caseStudies: string;
88
- }>;
89
- export declare const organizationSettingsSchema: z.ZodObject<{
90
- aiConfig: z.ZodObject<{
91
- suitabilityRules: z.ZodNullable<z.ZodString>;
92
- coverLetterRules: z.ZodNullable<z.ZodString>;
93
- questionRules: z.ZodNullable<z.ZodString>;
94
- }, "strip", z.ZodTypeAny, {
95
- suitabilityRules: string | null;
96
- questionRules: string | null;
97
- coverLetterRules: string | null;
98
- }, {
99
- suitabilityRules: string | null;
100
- questionRules: string | null;
101
- coverLetterRules: string | null;
102
- }>;
103
- knowledgeBase: z.ZodObject<{
104
- about: z.ZodString;
105
- caseStudies: z.ZodString;
106
- }, "strip", z.ZodTypeAny, {
107
- about: string;
108
- caseStudies: string;
109
- }, {
110
- about: string;
111
- caseStudies: string;
112
- }>;
113
- }, "strip", z.ZodTypeAny, {
114
- aiConfig: {
115
- suitabilityRules: string | null;
116
- questionRules: string | null;
117
- coverLetterRules: string | null;
118
- };
119
- knowledgeBase: {
120
- about: string;
121
- caseStudies: string;
122
- };
123
- }, {
124
- aiConfig: {
125
- suitabilityRules: string | null;
126
- questionRules: string | null;
127
- coverLetterRules: string | null;
128
- };
129
- knowledgeBase: {
130
- about: string;
131
- caseStudies: string;
132
- };
63
+ createdAt: Date;
64
+ updatedAt: Date;
133
65
  }>;
134
66
  export interface Organization extends z.infer<typeof organizationSchema> {
135
67
  }
136
- export interface AiConfig extends z.infer<typeof aiConfigSchema> {
137
- }
138
- export interface KnowledgeBase extends z.infer<typeof knowledgeBaseSchema> {
139
- }
140
- export interface OrganizationSettings extends z.infer<typeof organizationSettingsSchema> {
141
- }
142
68
  export interface BidConfig extends z.infer<typeof bidConfigSchema> {
143
69
  }
144
70
  export type OrganizationType = z.infer<typeof organizationTypeSchema>;
@@ -0,0 +1,19 @@
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(),
10
+ });
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(),
19
+ });
@@ -43,6 +43,16 @@ export declare const subscriptionStripeMetadataSchema: z.ZodObject<{
43
43
  id: string;
44
44
  };
45
45
  }>, "many">;
46
+ invoice: z.ZodObject<{
47
+ id: z.ZodString;
48
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ id: string;
51
+ hosted_invoice_url: string | null;
52
+ }, {
53
+ id: string;
54
+ hosted_invoice_url: string | null;
55
+ }>;
46
56
  }, "strip", z.ZodTypeAny, {
47
57
  id: string;
48
58
  items: {
@@ -51,6 +61,10 @@ export declare const subscriptionStripeMetadataSchema: z.ZodObject<{
51
61
  id: string;
52
62
  };
53
63
  }[];
64
+ invoice: {
65
+ id: string;
66
+ hosted_invoice_url: string | null;
67
+ };
54
68
  }, {
55
69
  id: string;
56
70
  items: {
@@ -59,9 +73,14 @@ export declare const subscriptionStripeMetadataSchema: z.ZodObject<{
59
73
  id: string;
60
74
  };
61
75
  }[];
76
+ invoice: {
77
+ id: string;
78
+ hosted_invoice_url: string | null;
79
+ };
62
80
  }>;
63
81
  export declare const subscriptionSchema: z.ZodObject<{
64
82
  planId: z.ZodString;
83
+ pendingPlanId: z.ZodNullable<z.ZodString>;
65
84
  status: z.ZodEnum<["active", "trialing", "cancelled", "paused", "payment_pending", "payment_failed"]>;
66
85
  startedAt: z.ZodNumber;
67
86
  currentPeriodEnd: z.ZodNumber;
@@ -87,6 +106,16 @@ export declare const subscriptionSchema: z.ZodObject<{
87
106
  id: string;
88
107
  };
89
108
  }>, "many">;
109
+ invoice: z.ZodObject<{
110
+ id: z.ZodString;
111
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ id: string;
114
+ hosted_invoice_url: string | null;
115
+ }, {
116
+ id: string;
117
+ hosted_invoice_url: string | null;
118
+ }>;
90
119
  }, "strip", z.ZodTypeAny, {
91
120
  id: string;
92
121
  items: {
@@ -95,6 +124,10 @@ export declare const subscriptionSchema: z.ZodObject<{
95
124
  id: string;
96
125
  };
97
126
  }[];
127
+ invoice: {
128
+ id: string;
129
+ hosted_invoice_url: string | null;
130
+ };
98
131
  }, {
99
132
  id: string;
100
133
  items: {
@@ -103,6 +136,10 @@ export declare const subscriptionSchema: z.ZodObject<{
103
136
  id: string;
104
137
  };
105
138
  }[];
139
+ invoice: {
140
+ id: string;
141
+ hosted_invoice_url: string | null;
142
+ };
106
143
  }>;
107
144
  source: z.ZodEnum<["stripe", "manual"]>;
108
145
  }, "strip", z.ZodTypeAny, {
@@ -114,9 +151,14 @@ export declare const subscriptionSchema: z.ZodObject<{
114
151
  id: string;
115
152
  };
116
153
  }[];
154
+ invoice: {
155
+ id: string;
156
+ hosted_invoice_url: string | null;
157
+ };
117
158
  };
118
159
  status: "active" | "trialing" | "cancelled" | "paused" | "payment_pending" | "payment_failed";
119
160
  planId: string;
161
+ pendingPlanId: string | null;
120
162
  startedAt: number;
121
163
  currentPeriodEnd: number;
122
164
  source: "stripe" | "manual";
@@ -129,9 +171,14 @@ export declare const subscriptionSchema: z.ZodObject<{
129
171
  id: string;
130
172
  };
131
173
  }[];
174
+ invoice: {
175
+ id: string;
176
+ hosted_invoice_url: string | null;
177
+ };
132
178
  };
133
179
  status: "active" | "trialing" | "cancelled" | "paused" | "payment_pending" | "payment_failed";
134
180
  planId: string;
181
+ pendingPlanId: string | null;
135
182
  startedAt: number;
136
183
  currentPeriodEnd: number;
137
184
  source: "stripe" | "manual";
@@ -32,10 +32,22 @@ export declare const planStripeMetadataSchema: import("zod").ZodObject<{
32
32
  lookup_key: string;
33
33
  }[];
34
34
  }>;
35
+ export declare const planFeatureSchema: import("zod").ZodObject<{
36
+ id: import("zod").ZodString;
37
+ description: import("zod").ZodString;
38
+ }, "strip", import("zod").ZodTypeAny, {
39
+ id: string;
40
+ description: string;
41
+ }, {
42
+ id: string;
43
+ description: string;
44
+ }>;
35
45
  export declare const planSchema: import("zod").ZodObject<{
36
46
  id: import("zod").ZodString;
37
47
  name: import("zod").ZodString;
38
48
  slug: import("zod").ZodString;
49
+ description: import("zod").ZodString;
50
+ price: import("zod").ZodNumber;
39
51
  stripe: import("zod").ZodObject<{
40
52
  id: import("zod").ZodString;
41
53
  name: import("zod").ZodString;
@@ -70,7 +82,16 @@ export declare const planSchema: import("zod").ZodObject<{
70
82
  }[];
71
83
  }>;
72
84
  version: import("zod").ZodNumber;
73
- features: import("zod").ZodArray<import("zod").ZodString, "many">;
85
+ features: import("zod").ZodArray<import("zod").ZodObject<{
86
+ id: import("zod").ZodString;
87
+ description: import("zod").ZodString;
88
+ }, "strip", import("zod").ZodTypeAny, {
89
+ id: string;
90
+ description: string;
91
+ }, {
92
+ id: string;
93
+ description: string;
94
+ }>, "many">;
74
95
  sortOrder: import("zod").ZodNumber;
75
96
  isActive: import("zod").ZodBoolean;
76
97
  createdAt: import("zod").ZodNumber;
@@ -78,7 +99,9 @@ export declare const planSchema: import("zod").ZodObject<{
78
99
  }, "strip", import("zod").ZodTypeAny, {
79
100
  id: string;
80
101
  name: string;
102
+ description: string;
81
103
  slug: string;
104
+ price: number;
82
105
  stripe: {
83
106
  id: string;
84
107
  name: string;
@@ -89,7 +112,10 @@ export declare const planSchema: import("zod").ZodObject<{
89
112
  }[];
90
113
  };
91
114
  version: number;
92
- features: string[];
115
+ features: {
116
+ id: string;
117
+ description: string;
118
+ }[];
93
119
  sortOrder: number;
94
120
  isActive: boolean;
95
121
  createdAt: number;
@@ -97,7 +123,9 @@ export declare const planSchema: import("zod").ZodObject<{
97
123
  }, {
98
124
  id: string;
99
125
  name: string;
126
+ description: string;
100
127
  slug: string;
128
+ price: number;
101
129
  stripe: {
102
130
  id: string;
103
131
  name: string;
@@ -108,7 +136,10 @@ export declare const planSchema: import("zod").ZodObject<{
108
136
  }[];
109
137
  };
110
138
  version: number;
111
- features: string[];
139
+ features: {
140
+ id: string;
141
+ description: string;
142
+ }[];
112
143
  sortOrder: number;
113
144
  isActive: boolean;
114
145
  createdAt: number;
@@ -116,5 +147,7 @@ export declare const planSchema: import("zod").ZodObject<{
116
147
  }>;
117
148
  export interface PlanStripeMetadata extends infer<typeof planStripeMetadataSchema> {
118
149
  }
150
+ export interface PlanFeature extends infer<typeof planFeatureSchema> {
151
+ }
119
152
  export interface Plan extends infer<typeof planSchema> {
120
153
  }
@@ -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("./proxy"), exports);
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.externalProxySchema = exports.proxySchema = exports.proxyCountrySchema = exports.proxyProviderSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.proxyProviderSchema = zod_1.z.enum(['webshare']);
6
+ exports.proxyCountrySchema = zod_1.z.enum(['USA']);
7
+ exports.proxySchema = zod_1.z.object({
8
+ id: zod_1.z.string(),
9
+ externalId: zod_1.z.string(),
10
+ host: zod_1.z.string(),
11
+ port: zod_1.z.number(),
12
+ username: zod_1.z.string(),
13
+ password: zod_1.z.string(),
14
+ provider: exports.proxyProviderSchema,
15
+ country: exports.proxyCountrySchema,
16
+ bidderId: zod_1.z.string().nullable(),
17
+ });
18
+ exports.externalProxySchema = exports.proxySchema.omit({
19
+ id: true,
20
+ bidderId: true,
21
+ });
@@ -0,0 +1,12 @@
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,
12
+ });
@@ -0,0 +1,18 @@
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);
@@ -128,6 +128,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
128
128
  tierId: import("zod").ZodEnum<["free", "premium"]>;
129
129
  subscription: import("zod").ZodNullable<import("zod").ZodObject<{
130
130
  planId: import("zod").ZodString;
131
+ pendingPlanId: import("zod").ZodNullable<import("zod").ZodString>;
131
132
  status: import("zod").ZodEnum<["active", "trialing", "cancelled", "paused", "payment_pending", "payment_failed"]>;
132
133
  startedAt: import("zod").ZodNumber;
133
134
  currentPeriodEnd: import("zod").ZodNumber;
@@ -153,6 +154,16 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
153
154
  id: string;
154
155
  };
155
156
  }>, "many">;
157
+ invoice: import("zod").ZodObject<{
158
+ id: import("zod").ZodString;
159
+ hosted_invoice_url: import("zod").ZodNullable<import("zod").ZodString>;
160
+ }, "strip", import("zod").ZodTypeAny, {
161
+ id: string;
162
+ hosted_invoice_url: string | null;
163
+ }, {
164
+ id: string;
165
+ hosted_invoice_url: string | null;
166
+ }>;
156
167
  }, "strip", import("zod").ZodTypeAny, {
157
168
  id: string;
158
169
  items: {
@@ -161,6 +172,10 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
161
172
  id: string;
162
173
  };
163
174
  }[];
175
+ invoice: {
176
+ id: string;
177
+ hosted_invoice_url: string | null;
178
+ };
164
179
  }, {
165
180
  id: string;
166
181
  items: {
@@ -169,11 +184,16 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
169
184
  id: string;
170
185
  };
171
186
  }[];
187
+ invoice: {
188
+ id: string;
189
+ hosted_invoice_url: string | null;
190
+ };
172
191
  }>;
173
192
  source: import("zod").ZodEnum<["stripe", "manual"]>;
174
193
  }, "strip", import("zod").ZodTypeAny, {
175
194
  status: "active" | "trialing" | "cancelled" | "paused" | "payment_pending" | "payment_failed";
176
195
  planId: string;
196
+ pendingPlanId: string | null;
177
197
  startedAt: number;
178
198
  currentPeriodEnd: number;
179
199
  stripe: {
@@ -184,11 +204,16 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
184
204
  id: string;
185
205
  };
186
206
  }[];
207
+ invoice: {
208
+ id: string;
209
+ hosted_invoice_url: string | null;
210
+ };
187
211
  };
188
212
  source: "stripe" | "manual";
189
213
  }, {
190
214
  status: "active" | "trialing" | "cancelled" | "paused" | "payment_pending" | "payment_failed";
191
215
  planId: string;
216
+ pendingPlanId: string | null;
192
217
  startedAt: number;
193
218
  currentPeriodEnd: number;
194
219
  stripe: {
@@ -199,6 +224,10 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
199
224
  id: string;
200
225
  };
201
226
  }[];
227
+ invoice: {
228
+ id: string;
229
+ hosted_invoice_url: string | null;
230
+ };
202
231
  };
203
232
  source: "stripe" | "manual";
204
233
  }>>;
@@ -277,6 +306,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
277
306
  subscription: {
278
307
  status: "active" | "trialing" | "cancelled" | "paused" | "payment_pending" | "payment_failed";
279
308
  planId: string;
309
+ pendingPlanId: string | null;
280
310
  startedAt: number;
281
311
  currentPeriodEnd: number;
282
312
  stripe: {
@@ -287,6 +317,10 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
287
317
  id: string;
288
318
  };
289
319
  }[];
320
+ invoice: {
321
+ id: string;
322
+ hosted_invoice_url: string | null;
323
+ };
290
324
  };
291
325
  source: "stripe" | "manual";
292
326
  } | null;
@@ -320,6 +354,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
320
354
  subscription: {
321
355
  status: "active" | "trialing" | "cancelled" | "paused" | "payment_pending" | "payment_failed";
322
356
  planId: string;
357
+ pendingPlanId: string | null;
323
358
  startedAt: number;
324
359
  currentPeriodEnd: number;
325
360
  stripe: {
@@ -330,6 +365,10 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
330
365
  id: string;
331
366
  };
332
367
  }[];
368
+ invoice: {
369
+ id: string;
370
+ hosted_invoice_url: string | null;
371
+ };
333
372
  };
334
373
  source: "stripe" | "manual";
335
374
  } | null;
@@ -989,6 +1028,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
989
1028
  subscription: {
990
1029
  status: "active" | "trialing" | "cancelled" | "paused" | "payment_pending" | "payment_failed";
991
1030
  planId: string;
1031
+ pendingPlanId: string | null;
992
1032
  startedAt: number;
993
1033
  currentPeriodEnd: number;
994
1034
  stripe: {
@@ -999,6 +1039,10 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
999
1039
  id: string;
1000
1040
  };
1001
1041
  }[];
1042
+ invoice: {
1043
+ id: string;
1044
+ hosted_invoice_url: string | null;
1045
+ };
1002
1046
  };
1003
1047
  source: "stripe" | "manual";
1004
1048
  } | null;
@@ -1180,6 +1224,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1180
1224
  subscription: {
1181
1225
  status: "active" | "trialing" | "cancelled" | "paused" | "payment_pending" | "payment_failed";
1182
1226
  planId: string;
1227
+ pendingPlanId: string | null;
1183
1228
  startedAt: number;
1184
1229
  currentPeriodEnd: number;
1185
1230
  stripe: {
@@ -1190,6 +1235,10 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
1190
1235
  id: string;
1191
1236
  };
1192
1237
  }[];
1238
+ invoice: {
1239
+ id: string;
1240
+ hosted_invoice_url: string | null;
1241
+ };
1193
1242
  };
1194
1243
  source: "stripe" | "manual";
1195
1244
  } | null;
@@ -0,0 +1,16 @@
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(),
10
+ });
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(),
16
+ });
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.scrapeUserProfileResultSchema = exports.scrapeResultSchema = exports.regionSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const lead_1 = require("../lead");
6
+ const user_1 = require("../user");
7
+ exports.regionSchema = zod_1.z.union([
8
+ zod_1.z.literal("USOnly"),
9
+ zod_1.z.literal("UKOnly"),
10
+ zod_1.z.literal("Worldwide"),
11
+ ]);
12
+ exports.scrapeResultSchema = zod_1.z.object({
13
+ jobs: zod_1.z.array(lead_1.upworkJobSchema),
14
+ cookies: zod_1.z.array(zod_1.z.any()),
15
+ region: exports.regionSchema,
16
+ usAccountCookies: zod_1.z.array(zod_1.z.any()).optional(),
17
+ ukAccountCookies: zod_1.z.array(zod_1.z.any()).optional(),
18
+ });
19
+ exports.scrapeUserProfileResultSchema = zod_1.z.object({
20
+ success: zod_1.z.boolean(),
21
+ message: zod_1.z.string(),
22
+ data: user_1.upworkProfileSchema,
23
+ });
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.passwordSchema = exports.dateSchema = exports.booleanSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.booleanSchema = zod_1.z
6
+ .union([zod_1.z.boolean(), zod_1.z.literal("true"), zod_1.z.literal("false")])
7
+ .transform((value) => value === true || value === "true");
8
+ const dateSchema = (params = {}) => zod_1.coerce.date(Object.assign({}, params));
9
+ exports.dateSchema = dateSchema;
10
+ exports.passwordSchema = (0, zod_1.string)()
11
+ .min(8, "Password must be at least 8 characters long.")
12
+ .max(255, "Password must be at most 255 characters long.")
13
+ .refine((password) => /[a-z]/.test(password), "Password must contain at least one lowercase letter.")
14
+ .refine((password) => /[A-Z]/.test(password), "Password must contain at least one uppercase letter.")
15
+ .refine((password) => /\d/.test(password), "Password must contain at least one number.")
16
+ .refine((password) => /[\W_]/.test(password), "Password must contain at least one symbol.");
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.timeFilterSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.timeFilterSchema = zod_1.z.union([
6
+ zod_1.z.literal("last_7_days"),
7
+ zod_1.z.literal("last_30_days"),
8
+ zod_1.z.literal("all_time"),
9
+ ]);
@@ -0,0 +1,3 @@
1
+ export * from './upwork-account-status';
2
+ export * from './upwork-business-manager-account';
3
+ export * from './upwork-scraping-account';