lancer-shared 1.2.91 → 1.2.92

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 (211) hide show
  1. package/dist/bundle.cjs.js +6 -5
  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.js +37 -39
  14. package/dist/constants/upwork-accounts.js +6 -3
  15. package/dist/constants/upwork-filters.d.ts +5 -0
  16. package/dist/constants/upwork-filters.js +75 -0
  17. package/dist/index.js +20 -4
  18. package/dist/schemas/account/account-status.js +5 -2
  19. package/dist/schemas/account/bidder-account.js +24 -22
  20. package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +5 -0
  21. package/dist/schemas/account/index.js +19 -3
  22. package/dist/schemas/account/manager-account.d.ts +116 -0
  23. package/dist/schemas/account/manager-account.js +38 -0
  24. package/dist/schemas/account/scraper-account.js +24 -21
  25. package/dist/schemas/agent/index.d.ts +15 -10
  26. package/dist/schemas/ai/ai-config.js +11 -8
  27. package/dist/schemas/ai/index.js +19 -3
  28. package/dist/schemas/ai/proposal.js +13 -10
  29. package/dist/schemas/ai/suitability.js +11 -8
  30. package/dist/schemas/ai-config/ai-config.d.ts +39 -0
  31. package/dist/schemas/ai-config/ai-config.js +12 -0
  32. package/dist/schemas/ai-config/index.d.ts +1 -0
  33. package/dist/schemas/ai-config/index.js +17 -0
  34. package/dist/schemas/bid/bid-result.js +13 -9
  35. package/dist/schemas/bid/bid-status.d.ts +30 -0
  36. package/dist/schemas/bid/bid-status.js +15 -0
  37. package/dist/schemas/bid/bid.js +30 -29
  38. package/dist/schemas/bid/exceptions/base-exception.d.ts +4 -0
  39. package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +5 -0
  40. package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +5 -0
  41. package/dist/schemas/bid/index.js +18 -2
  42. package/dist/schemas/bidding/index.d.ts +1 -0
  43. package/dist/schemas/bidding/index.js +17 -0
  44. package/dist/schemas/bidding/proposal-bidding-status.d.ts +26 -0
  45. package/dist/schemas/bidding/proposal-bidding-status.js +18 -0
  46. package/dist/schemas/bidding/proposal-dto.d.ts +26 -0
  47. package/dist/schemas/bidding/proposal-dto.js +18 -0
  48. package/dist/schemas/campaign/campaign-ai-metrics.js +8 -5
  49. package/dist/schemas/campaign/campaign-analytics.d.ts +67 -58
  50. package/dist/schemas/campaign/campaign-analytics.js +31 -32
  51. package/dist/schemas/campaign/campaign-expenses.js +8 -5
  52. package/dist/schemas/campaign/campaign-insights.js +30 -30
  53. package/dist/schemas/campaign/campaign-integrations.d.ts +0 -5
  54. package/dist/schemas/campaign/campaign-integrations.js +13 -10
  55. package/dist/schemas/campaign/campaign-job-count.js +6 -3
  56. package/dist/schemas/campaign/campaign.d.ts +21 -21
  57. package/dist/schemas/campaign/campaign.js +35 -32
  58. package/dist/schemas/campaign/index.js +23 -7
  59. package/dist/schemas/chat-message/chat-message.js +10 -7
  60. package/dist/schemas/chat-message/index.js +17 -1
  61. package/dist/schemas/config/agency-config.js +9 -6
  62. package/dist/schemas/config/index.js +17 -1
  63. package/dist/schemas/index.js +32 -17
  64. package/dist/schemas/job/index.js +19 -0
  65. package/dist/schemas/job/job-details.d.ts +335 -0
  66. package/dist/schemas/job/job-details.js +29 -0
  67. package/dist/schemas/job/job-filters.d.ts +5 -8
  68. package/dist/schemas/job/job-note.d.ts +83 -0
  69. package/dist/schemas/job/job-note.js +30 -0
  70. package/dist/schemas/job/job-pipeline.d.ts +74 -0
  71. package/dist/schemas/job/job-pipeline.js +29 -0
  72. package/dist/schemas/job/job-status.d.ts +3 -0
  73. package/dist/schemas/job/job-status.js +27 -0
  74. package/dist/schemas/job/job-suitability.d.ts +12 -0
  75. package/dist/schemas/job/job-suitability.js +13 -0
  76. package/dist/schemas/job/job.d.ts +1160 -0
  77. package/dist/schemas/job/job.js +90 -0
  78. package/dist/schemas/job/pipeline-job.d.ts +608 -0
  79. package/dist/schemas/job/pipeline-job.js +43 -0
  80. package/dist/schemas/job/upwork-job.d.ts +334 -0
  81. package/dist/schemas/job/upwork-job.js +60 -0
  82. package/dist/schemas/job-filters/index.js +17 -1
  83. package/dist/schemas/job-filters/job-filters.js +65 -62
  84. package/dist/schemas/knowledge-object/index.d.ts +1 -0
  85. package/dist/schemas/knowledge-object/index.js +17 -0
  86. package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
  87. package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
  88. package/dist/schemas/lead/index.d.ts +39 -26
  89. package/dist/schemas/lead/index.js +19 -173
  90. package/dist/schemas/lead/lead-note.js +16 -13
  91. package/dist/schemas/lead/lead-status.js +6 -3
  92. package/dist/schemas/lead/lead.d.ts +1897 -0
  93. package/dist/schemas/lead/lead.js +143 -0
  94. package/dist/schemas/logger/index.js +17 -1
  95. package/dist/schemas/logger/log-event.d.ts +10 -10
  96. package/dist/schemas/logger/log-event.js +49 -100
  97. package/dist/schemas/organization/index.js +17 -70
  98. package/dist/schemas/organization/organization.d.ts +7 -177
  99. package/dist/schemas/organization/organization.js +17 -14
  100. package/dist/schemas/proxy/index.js +17 -3
  101. package/dist/schemas/proxy/proxy.js +19 -25
  102. package/dist/schemas/saved-search/index.js +11 -8
  103. package/dist/schemas/scraper/index.js +18 -2
  104. package/dist/schemas/scraper/scrape-payload.d.ts +15 -30
  105. package/dist/schemas/scraper/scrape-payload.js +14 -19
  106. package/dist/schemas/scraper/scrape-response.d.ts +345 -0
  107. package/dist/schemas/scraper/scrape-response.js +9 -0
  108. package/dist/schemas/scraper/scrape-result.js +21 -21
  109. package/dist/schemas/shared.js +9 -12
  110. package/dist/schemas/time-filter/index.js +8 -5
  111. package/dist/schemas/upwork-account/index.d.ts +3 -0
  112. package/dist/schemas/upwork-account/index.js +19 -0
  113. package/dist/schemas/upwork-account/upwork-account-status.d.ts +2 -0
  114. package/dist/schemas/upwork-account/upwork-account-status.js +11 -0
  115. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +95 -0
  116. package/dist/schemas/upwork-account/upwork-business-manager-account.js +35 -0
  117. package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +92 -0
  118. package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
  119. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
  120. package/dist/schemas/upwork-account/upwork-scraping-account.js +30 -0
  121. package/dist/schemas/user/index.js +41 -38
  122. package/dist/types/account/account-status.js +2 -1
  123. package/dist/types/account/bidder-account.js +2 -1
  124. package/dist/types/account/index.js +19 -3
  125. package/dist/types/account/manager-account.d.ts +7 -0
  126. package/dist/types/account/manager-account.js +2 -0
  127. package/dist/types/account/scraper-account.js +2 -1
  128. package/dist/types/ai/ai-config.js +2 -1
  129. package/dist/types/ai/index.js +19 -3
  130. package/dist/types/ai/proposal.js +2 -1
  131. package/dist/types/ai/suitability.js +2 -1
  132. package/dist/types/ai-config/ai-config.d.ts +6 -0
  133. package/dist/types/ai-config/ai-config.js +2 -0
  134. package/dist/types/ai-config/index.d.ts +1 -0
  135. package/dist/types/ai-config/index.js +17 -0
  136. package/dist/types/bid/bid-result.js +2 -1
  137. package/dist/types/bid/bid-status.d.ts +5 -0
  138. package/dist/types/bid/bid-status.js +2 -0
  139. package/dist/types/bid/bid.js +2 -1
  140. package/dist/types/bid/index.js +18 -2
  141. package/dist/types/bidding/index.d.ts +1 -0
  142. package/dist/types/bidding/index.js +17 -0
  143. package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
  144. package/dist/types/bidding/proposal-bidding-status.js +2 -0
  145. package/dist/types/bidding/proposal-dto.d.ts +3 -0
  146. package/dist/types/bidding/proposal-dto.js +2 -0
  147. package/dist/types/campaign/campaign-analytics.js +2 -1
  148. package/dist/types/campaign/campaign-expenses.js +2 -1
  149. package/dist/types/campaign/campaign-insights.js +2 -1
  150. package/dist/types/campaign/campaign-integrations.js +2 -1
  151. package/dist/types/campaign/campaign-job-count.js +2 -1
  152. package/dist/types/campaign/campaign.js +2 -1
  153. package/dist/types/campaign/index.js +22 -6
  154. package/dist/types/chat-message/chat-message.js +2 -1
  155. package/dist/types/chat-message/index.js +17 -1
  156. package/dist/types/config/agency-config.js +2 -1
  157. package/dist/types/config/index.js +17 -1
  158. package/dist/types/index.js +29 -15
  159. package/dist/types/job/index.js +19 -3
  160. package/dist/types/job/job-details.d.ts +36 -0
  161. package/dist/types/job/job-details.js +2 -0
  162. package/dist/types/job/job-note.js +2 -1
  163. package/dist/types/job/job-pipeline.d.ts +4 -0
  164. package/dist/types/job/job-pipeline.js +2 -0
  165. package/dist/types/job/job-status.js +4 -1
  166. package/dist/types/job/job-suitability.d.ts +3 -0
  167. package/dist/types/job/job-suitability.js +2 -0
  168. package/dist/types/job/job.d.ts +36 -0
  169. package/dist/types/job/job.js +2 -0
  170. package/dist/types/job-filters/index.js +17 -1
  171. package/dist/types/job-filters/job-filters.js +2 -1
  172. package/dist/types/knowledge-object/index.d.ts +1 -0
  173. package/dist/types/knowledge-object/index.js +17 -0
  174. package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
  175. package/dist/types/knowledge-object/knowledge-object.js +2 -0
  176. package/dist/types/logger/index.js +17 -1
  177. package/dist/types/logger/log-event.js +2 -1
  178. package/dist/types/saved-search/index.js +2 -1
  179. package/dist/types/scraper/index.js +18 -2
  180. package/dist/types/scraper/scrape-payload.js +2 -1
  181. package/dist/types/scraper/scrape-response.d.ts +4 -0
  182. package/dist/types/scraper/scrape-response.js +2 -0
  183. package/dist/types/scraper/scrape-result.js +2 -1
  184. package/dist/types/time-filter/index.js +2 -1
  185. package/dist/types/upwork-account/index.d.ts +3 -0
  186. package/dist/types/upwork-account/index.js +19 -0
  187. package/dist/types/upwork-account/upwork-account-status.d.ts +3 -0
  188. package/dist/types/upwork-account/upwork-account-status.js +2 -0
  189. package/dist/types/upwork-account/upwork-business-manager-account.d.ts +7 -0
  190. package/dist/types/upwork-account/upwork-business-manager-account.js +2 -0
  191. package/dist/types/upwork-account/upwork-scraping-account.d.ts +5 -0
  192. package/dist/types/upwork-account/upwork-scraping-account.js +2 -0
  193. package/dist/types/user/index.js +2 -1
  194. package/dist/utils/index.js +17 -1
  195. package/dist/utils/try-catch.js +23 -8
  196. package/package.json +1 -1
  197. package/dist/schemas/event/index.d.ts +0 -58
  198. package/dist/schemas/job/haha.json +0 -581
  199. package/dist/schemas/lead/nuxt.js +0 -287
  200. package/dist/schemas/meter-event/index.d.ts +0 -12
  201. package/dist/schemas/organization/member.js +0 -7
  202. package/dist/schemas/organization/subscription.js +0 -17
  203. package/dist/schemas/proxy/proxy-available-replacements.js +0 -3
  204. package/dist/schemas/proxy/proxy-country.js +0 -249
  205. package/dist/schemas/tier/index.d.ts +0 -119
  206. package/dist/schemas/transaction/index.js +0 -17
  207. package/dist/schemas/usage/index.js +0 -18
  208. package/dist/types/job/nuxt.js +0 -1
  209. package/dist/types/shared.js +0 -1
  210. package/dist/types/transaction/index.js +0 -1
  211. package/dist/types/usage/index.js +0 -1
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,17 @@
1
- export * from './agency-config';
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("./agency-config"), exports);
@@ -1,15 +1,29 @@
1
- export * from "./chat-message";
2
- export * from "./job";
3
- export * from "./saved-search";
4
- export * from "./user";
5
- export * from "./job-filters";
6
- export * from "./campaign";
7
- export * from "./scraper";
8
- export * from "./config";
9
- export * from "./logger";
10
- export * from "./account";
11
- export * from "./bid";
12
- export * from "./time-filter";
13
- export * from "./shared";
14
- export * from "./usage";
15
- export * from "./transaction";
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("./chat-message"), exports);
18
+ __exportStar(require("./job"), exports);
19
+ __exportStar(require("./saved-search"), exports);
20
+ __exportStar(require("./user"), exports);
21
+ __exportStar(require("./job-filters"), exports);
22
+ __exportStar(require("./campaign"), exports);
23
+ __exportStar(require("./ai"), exports);
24
+ __exportStar(require("./scraper"), exports);
25
+ __exportStar(require("./config"), exports);
26
+ __exportStar(require("./logger"), exports);
27
+ __exportStar(require("./account"), exports);
28
+ __exportStar(require("./bid"), exports);
29
+ __exportStar(require("./time-filter"), exports);
@@ -1,3 +1,19 @@
1
- export * from "./job-note";
2
- export * from "./job-status";
3
- export * from "./nuxt";
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("./job"), exports);
18
+ __exportStar(require("./job-note"), exports);
19
+ __exportStar(require("./job-status"), exports);
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ import { SavedSearch } from '../saved-search';
3
+ import { ClientInfoSchema, jobDetailsSchema, JobListItemSchema, JobMetadataSchema, jobPipelineDetailsSchema, jobPipelineResponseSchema, JobSkillsSchema, upworkJobDetailsSchema, VendorQualificationsSchema } from '../../schemas';
4
+ import { JobNote } from './job-note';
5
+ import { JobStatus } from './job-status';
6
+ import { QuestionAnswerPair } from '../ai';
7
+ export interface UpworkJob extends z.infer<typeof upworkJobDetailsSchema> {
8
+ clientInfo: ClientInfo | null;
9
+ metadata: JobMetadata | null;
10
+ skills: JobSkill[] | null;
11
+ vendorQualifications: VendorQualifications | null;
12
+ }
13
+ export interface Job extends z.infer<typeof jobDetailsSchema> {
14
+ clientInfo: ClientInfo | null;
15
+ metadata: JobMetadata | null;
16
+ skills: JobSkill[] | null;
17
+ vendorQualifications: VendorQualifications | null;
18
+ notes?: JobNote[];
19
+ suitabilityQuestionAnswerPairs?: QuestionAnswerPair[];
20
+ status?: JobStatus;
21
+ }
22
+ export interface JobPipeline extends z.infer<typeof jobPipelineDetailsSchema> {
23
+ clientInfo: Pick<ClientInfo, 'country'>;
24
+ metadata: Pick<JobMetadata, 'hourlyRate' | 'fixedPrice'>;
25
+ }
26
+ export interface JobPipelineResponse extends z.infer<typeof jobPipelineResponseSchema> {
27
+ jobs: JobPipeline[];
28
+ }
29
+ export type JobWithSavedSearch = Job & {
30
+ savedSearch?: SavedSearch | null;
31
+ };
32
+ export type JobListItem = z.infer<typeof JobListItemSchema>;
33
+ export type JobSkill = z.infer<typeof JobSkillsSchema>;
34
+ export type VendorQualifications = z.infer<typeof VendorQualificationsSchema>;
35
+ export type ClientInfo = z.infer<typeof ClientInfoSchema>;
36
+ export type JobMetadata = z.infer<typeof JobMetadataSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ import { jobPipelineSchema } from '../../schemas';
3
+ export interface JobPipeline extends z.infer<typeof jobPipelineSchema> {
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,7 @@
1
- export const leadStatusDisplayMap = {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.leadStatusDisplayMap = void 0;
4
+ exports.leadStatusDisplayMap = {
2
5
  leads: "Leads",
3
6
  contacted: "Contacted",
4
7
  viewed: "Viewed",
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ import { questionAnswerPairSchema } from '../../schemas';
3
+ export type QuestionAnswerPair = z.infer<typeof questionAnswerPairSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,36 @@
1
+ import { z } from "zod";
2
+ import { SavedSearch } from "../saved-search";
3
+ import { LeadNote } from "./job-note";
4
+ import { LeadAgentStatus, LeadStatus } from "./job-status";
5
+ import { QuestionAnswerPair } from "../ai";
6
+ import { clientInfoSchema, jobListItemSchema, leadResponseSchema, leadSchema, jobSkillsSchema, metadataSchema, upworkJobSchema, vendorQualificationSchema, clientReviewSchema, bidRangeSchema, jobActivitySchema } from "../../schemas/lead/lead";
7
+ export interface Job extends z.infer<typeof upworkJobSchema> {
8
+ clientInfo: ClientInfo | null;
9
+ metadata: JobMetadata | null;
10
+ skills: JobSkill[] | null;
11
+ vendorQualifications: VendorQualifications | null;
12
+ }
13
+ export interface Lead extends z.infer<typeof leadSchema> {
14
+ clientInfo: ClientInfo | null;
15
+ metadata: JobMetadata | null;
16
+ skills: JobSkill[] | null;
17
+ vendorQualifications: VendorQualifications | null;
18
+ notes: LeadNote[] | null;
19
+ questionAnswerPairs: QuestionAnswerPair[] | null;
20
+ agentStatus: LeadAgentStatus;
21
+ leadStatus: LeadStatus;
22
+ }
23
+ export interface LeadResponse extends z.infer<typeof leadResponseSchema> {
24
+ leads: Lead[];
25
+ }
26
+ export type JobWithSavedSearch = Lead & {
27
+ savedSearch?: SavedSearch | null;
28
+ };
29
+ export type JobListItem = z.infer<typeof jobListItemSchema>;
30
+ export type JobSkill = z.infer<typeof jobSkillsSchema>;
31
+ export type VendorQualifications = z.infer<typeof vendorQualificationSchema>;
32
+ export type ClientInfo = z.infer<typeof clientInfoSchema>;
33
+ export type JobMetadata = z.infer<typeof metadataSchema>;
34
+ export type ClientReview = z.infer<typeof clientReviewSchema>;
35
+ export type JobBidRange = z.infer<typeof bidRangeSchema>;
36
+ export type JobActivity = z.infer<typeof jobActivitySchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,17 @@
1
- export * from './job-filters';
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("./job-filters"), exports);
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './knowledge-object';
@@ -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("./knowledge-object"), exports);
@@ -0,0 +1,4 @@
1
+ import { chatResponseSchema, KnowledgeObjectSchema } from '../../schemas/knowledge-object';
2
+ import { z } from 'zod';
3
+ export type KnowledgeObject = z.infer<typeof KnowledgeObjectSchema>;
4
+ export type ChatResponse = z.infer<typeof chatResponseSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,17 @@
1
- export * from "./log-event";
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("./log-event"), exports);
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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);
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ import { scrapeResponseSchema } from '../../schemas';
3
+ export interface ScrapeResponse extends z.infer<typeof scrapeResponseSchema> {
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export * from './upwork-account-status';
2
+ export * from './upwork-business-manager-account';
3
+ export * from './upwork-scraping-account';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./upwork-account-status"), exports);
18
+ __exportStar(require("./upwork-business-manager-account"), exports);
19
+ __exportStar(require("./upwork-scraping-account"), exports);
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ import { upworkAccountStatusSchema } from '../../schemas';
3
+ export type UpworkAccountStatus = z.infer<typeof upworkAccountStatusSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ import { createUpworkBusinessManagerAccountSchema, updateUpworkBusinessManagerAccountSchema, upworkBusinessManagerAccountProvider, upworkBusinessManagerAccountSchema } from '../../schemas';
3
+ export interface UpworkBusinessManagerAccount extends z.infer<typeof upworkBusinessManagerAccountSchema> {
4
+ }
5
+ export type UpworkBusinessManagerAccountProvider = z.infer<typeof upworkBusinessManagerAccountProvider>;
6
+ export type CreateUpworkBusinessManagerAccount = z.infer<typeof createUpworkBusinessManagerAccountSchema>;
7
+ export type UpdateUpworkBusinessManagerAccount = z.infer<typeof updateUpworkBusinessManagerAccountSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ import { createUpworkScraperAccountSchema, updateUpworkScraperAccountSchema, upworkScraperAccountSchema } from '../../schemas';
3
+ export type UpworkScraperAccount = z.infer<typeof upworkScraperAccountSchema>;
4
+ export type CreateUpworkScraperAccount = z.infer<typeof createUpworkScraperAccountSchema>;
5
+ export type UpdateUpworkScraperAccount = z.infer<typeof updateUpworkScraperAccountSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,17 @@
1
- export * from './try-catch';
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("./try-catch"), exports);
@@ -1,10 +1,25 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.tryCatch = void 0;
1
13
  // Main wrapper function
2
- export async function tryCatch(promise) {
3
- try {
4
- const data = await promise;
5
- return { data, error: null };
6
- }
7
- catch (error) {
8
- return { data: null, error: error };
9
- }
14
+ function tryCatch(promise) {
15
+ return __awaiter(this, void 0, void 0, function* () {
16
+ try {
17
+ const data = yield promise;
18
+ return { data, error: null };
19
+ }
20
+ catch (error) {
21
+ return { data: null, error: error };
22
+ }
23
+ });
10
24
  }
25
+ exports.tryCatch = tryCatch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lancer-shared",
3
- "version": "1.2.91",
3
+ "version": "1.2.92",
4
4
  "description": "This package contains shared stuff.",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "dist/bundle.cjs.js",
@@ -1,58 +0,0 @@
1
- export declare const logEventSchemaWithMetadata: import("zod").ZodIntersection<import("zod").ZodIntersection<import("zod").ZodObject<{
2
- type: import("zod").ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
3
- source: import("zod").ZodString;
4
- resourceType: import("zod").ZodDefault<import("zod").ZodString>;
5
- resourceId: import("zod").ZodNullable<import("zod").ZodString>;
6
- leadId: import("zod").ZodNullable<import("zod").ZodString>;
7
- campaignId: import("zod").ZodNullable<import("zod").ZodString>;
8
- userId: import("zod").ZodNullable<import("zod").ZodString>;
9
- reason: import("zod").ZodNullable<import("zod").ZodString>;
10
- timestamp: import("zod").ZodNumber;
11
- }, "strip", import("zod").ZodTypeAny, {
12
- type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
13
- source: string;
14
- resourceType: string;
15
- resourceId: string | null;
16
- leadId: string | null;
17
- campaignId: string | null;
18
- userId: string | null;
19
- reason: string | null;
20
- timestamp: number;
21
- }, {
22
- type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
23
- source: string;
24
- resourceId: string | null;
25
- leadId: string | null;
26
- campaignId: string | null;
27
- userId: string | null;
28
- reason: string | null;
29
- timestamp: number;
30
- resourceType?: string | undefined;
31
- }>, import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
32
- type: import("zod").ZodEnum<["jobActivityScraped"]>;
33
- }, "strip", import("zod").ZodTypeAny, {
34
- type: "jobActivityScraped";
35
- }, {
36
- type: "jobActivityScraped";
37
- }>, import("zod").ZodObject<{
38
- type: import("zod").ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScrapeFailed", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
39
- metadata: import("zod").ZodNullable<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
40
- }, "strip", import("zod").ZodTypeAny, {
41
- type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScrapeFailed" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
42
- metadata: Record<string, unknown> | null;
43
- }, {
44
- type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScrapeFailed" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
45
- metadata: Record<string, unknown> | null;
46
- }>]>>, import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
47
- type: import("zod").ZodEnum<["jobActivityScraped"]>;
48
- }, "strip", import("zod").ZodTypeAny, {
49
- type: "jobActivityScraped";
50
- }, {
51
- type: "jobActivityScraped";
52
- }>, import("zod").ZodObject<{
53
- type: import("zod").ZodEnum<["jobActivityScraped"]>;
54
- }, "strip", import("zod").ZodTypeAny, {
55
- type: "jobActivityScraped";
56
- }, {
57
- type: "jobActivityScraped";
58
- }>]>>;