lancer-shared 1.0.174 → 1.0.176

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 (152) hide show
  1. package/dist/bundle.cjs.js +292 -0
  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 +4 -1
  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/routes.js +35 -43
  12. package/dist/constants/upwork-accounts.js +6 -3
  13. package/dist/index.js +20 -4
  14. package/dist/schemas/account/account-status.js +5 -2
  15. package/dist/schemas/account/bidder-account.js +22 -19
  16. package/dist/schemas/account/index.js +19 -3
  17. package/dist/schemas/account/manager-account.d.ts +116 -0
  18. package/dist/schemas/account/manager-account.js +38 -0
  19. package/dist/schemas/account/scraper-account.js +24 -21
  20. package/dist/schemas/ai/ai-config.js +11 -8
  21. package/dist/schemas/ai/index.js +19 -3
  22. package/dist/schemas/ai/proposal.js +13 -10
  23. package/dist/schemas/ai/suitability.js +11 -8
  24. package/dist/schemas/bid/bid-result.js +13 -10
  25. package/dist/schemas/bid/bid.d.ts +12 -12
  26. package/dist/schemas/bid/bid.js +30 -27
  27. package/dist/schemas/bid/index.js +18 -2
  28. package/dist/schemas/bidding/index.d.ts +1 -0
  29. package/dist/schemas/bidding/index.js +17 -0
  30. package/dist/schemas/bidding/proposal-bidding-status.d.ts +26 -0
  31. package/dist/schemas/bidding/proposal-bidding-status.js +18 -0
  32. package/dist/schemas/campaign/campaign-ai-metrics.js +8 -5
  33. package/dist/schemas/campaign/campaign-analytics.d.ts +7 -0
  34. package/dist/schemas/campaign/campaign-analytics.js +31 -28
  35. package/dist/schemas/campaign/campaign-expenses.js +8 -5
  36. package/dist/schemas/campaign/campaign-insights.js +30 -30
  37. package/dist/schemas/campaign/campaign-integrations.js +13 -10
  38. package/dist/schemas/campaign/campaign-job-count.js +6 -3
  39. package/dist/schemas/campaign/campaign.js +35 -32
  40. package/dist/schemas/campaign/index.js +23 -7
  41. package/dist/schemas/chat-message/chat-message.js +10 -7
  42. package/dist/schemas/chat-message/index.js +17 -1
  43. package/dist/schemas/config/agency-config.js +9 -6
  44. package/dist/schemas/config/index.js +17 -1
  45. package/dist/schemas/index.js +32 -16
  46. package/dist/schemas/job/index.d.ts +3 -95
  47. package/dist/schemas/job/index.js +19 -0
  48. package/dist/schemas/job/job-details.d.ts +335 -0
  49. package/dist/schemas/job/job-details.js +29 -0
  50. package/dist/schemas/job/job-note.d.ts +83 -0
  51. package/dist/schemas/job/job-note.js +30 -0
  52. package/dist/schemas/job/job-status.d.ts +3 -0
  53. package/dist/schemas/job/job-status.js +27 -0
  54. package/dist/schemas/job/job.d.ts +1160 -0
  55. package/dist/schemas/job/job.js +90 -0
  56. package/dist/schemas/job/pipeline-job.d.ts +602 -0
  57. package/dist/schemas/job/pipeline-job.js +42 -0
  58. package/dist/schemas/job/upwork-job.d.ts +334 -0
  59. package/dist/schemas/job/upwork-job.js +60 -0
  60. package/dist/schemas/job-filters/index.js +17 -1
  61. package/dist/schemas/job-filters/job-filters.js +65 -62
  62. package/dist/schemas/lead/index.d.ts +67 -8
  63. package/dist/schemas/lead/index.js +19 -166
  64. package/dist/schemas/lead/lead-note.js +16 -13
  65. package/dist/schemas/lead/lead-status.js +6 -3
  66. package/dist/schemas/lead/lead.d.ts +1897 -0
  67. package/dist/schemas/lead/lead.js +143 -0
  68. package/dist/schemas/lead/nuxt.d.ts +1664 -0
  69. package/dist/schemas/logger/index.js +17 -1
  70. package/dist/schemas/logger/log-event.d.ts +9 -4
  71. package/dist/schemas/logger/log-event.js +19 -38
  72. package/dist/schemas/organization/index.js +17 -1
  73. package/dist/schemas/organization/organization.js +17 -14
  74. package/dist/schemas/proxy/index.js +17 -1
  75. package/dist/schemas/proxy/proxy.js +17 -14
  76. package/dist/schemas/saved-search/index.js +11 -8
  77. package/dist/schemas/scraper/index.js +18 -2
  78. package/dist/schemas/scraper/scrape-payload.js +14 -19
  79. package/dist/schemas/scraper/scrape-result.d.ts +23 -4
  80. package/dist/schemas/scraper/scrape-result.js +21 -21
  81. package/dist/schemas/shared.js +9 -12
  82. package/dist/schemas/time-filter/index.js +8 -5
  83. package/dist/schemas/upwork-account/index.d.ts +3 -0
  84. package/dist/schemas/upwork-account/index.js +19 -0
  85. package/dist/schemas/upwork-account/upwork-account-status.d.ts +2 -0
  86. package/dist/schemas/upwork-account/upwork-account-status.js +11 -0
  87. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +95 -0
  88. package/dist/schemas/upwork-account/upwork-business-manager-account.js +35 -0
  89. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
  90. package/dist/schemas/upwork-account/upwork-scraping-account.js +29 -0
  91. package/dist/schemas/user/index.js +41 -38
  92. package/dist/types/account/account-status.js +2 -1
  93. package/dist/types/account/bidder-account.js +2 -1
  94. package/dist/types/account/index.js +19 -3
  95. package/dist/types/account/manager-account.d.ts +7 -0
  96. package/dist/types/account/manager-account.js +2 -0
  97. package/dist/types/account/scraper-account.js +2 -1
  98. package/dist/types/ai/ai-config.js +2 -1
  99. package/dist/types/ai/index.js +19 -3
  100. package/dist/types/ai/proposal.js +2 -1
  101. package/dist/types/ai/suitability.js +2 -1
  102. package/dist/types/bid/bid-result.js +2 -1
  103. package/dist/types/bid/bid.js +2 -1
  104. package/dist/types/bid/index.js +18 -2
  105. package/dist/types/bidding/index.d.ts +1 -0
  106. package/dist/types/bidding/index.js +17 -0
  107. package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
  108. package/dist/types/bidding/proposal-bidding-status.js +2 -0
  109. package/dist/types/campaign/campaign-analytics.js +2 -1
  110. package/dist/types/campaign/campaign-expenses.js +2 -1
  111. package/dist/types/campaign/campaign-insights.js +2 -1
  112. package/dist/types/campaign/campaign-integrations.js +2 -1
  113. package/dist/types/campaign/campaign-job-count.js +2 -1
  114. package/dist/types/campaign/campaign.js +2 -1
  115. package/dist/types/campaign/index.js +22 -6
  116. package/dist/types/chat-message/chat-message.js +2 -1
  117. package/dist/types/chat-message/index.js +17 -1
  118. package/dist/types/config/agency-config.js +2 -1
  119. package/dist/types/config/index.js +17 -1
  120. package/dist/types/index.js +29 -14
  121. package/dist/types/job/index.d.ts +1 -0
  122. package/dist/types/job/index.js +19 -2
  123. package/dist/types/job/job-details.d.ts +36 -0
  124. package/dist/types/job/job-details.js +2 -0
  125. package/dist/types/job/job-note.js +2 -1
  126. package/dist/types/job/job-status.js +4 -1
  127. package/dist/types/job/job.d.ts +36 -0
  128. package/dist/types/job/job.js +2 -0
  129. package/dist/types/job/nuxt.d.ts +4 -0
  130. package/dist/types/job-filters/index.js +17 -1
  131. package/dist/types/job-filters/job-filters.js +2 -1
  132. package/dist/types/logger/index.js +17 -1
  133. package/dist/types/logger/log-event.js +2 -1
  134. package/dist/types/saved-search/index.js +2 -1
  135. package/dist/types/scraper/index.js +18 -2
  136. package/dist/types/scraper/scrape-payload.js +2 -1
  137. package/dist/types/scraper/scrape-result.js +2 -1
  138. package/dist/types/time-filter/index.js +2 -1
  139. package/dist/types/upwork-account/index.d.ts +3 -0
  140. package/dist/types/upwork-account/index.js +19 -0
  141. package/dist/types/upwork-account/upwork-account-status.d.ts +3 -0
  142. package/dist/types/upwork-account/upwork-account-status.js +2 -0
  143. package/dist/types/upwork-account/upwork-business-manager-account.d.ts +7 -0
  144. package/dist/types/upwork-account/upwork-business-manager-account.js +2 -0
  145. package/dist/types/upwork-account/upwork-scraping-account.d.ts +5 -0
  146. package/dist/types/upwork-account/upwork-scraping-account.js +2 -0
  147. package/dist/types/user/index.js +2 -1
  148. package/dist/utils/index.js +17 -1
  149. package/dist/utils/try-catch.js +23 -8
  150. package/package.json +1 -1
  151. package/dist/schemas/event/index.d.ts +0 -58
  152. package/dist/types/shared.js +0 -1
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ export declare const proposalBiddingStatusSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
3
+ status: z.ZodLiteral<"success">;
4
+ biddingAmount: z.ZodNumber;
5
+ boosted: z.ZodBoolean;
6
+ boostingAmount: z.ZodNumber;
7
+ }, "strip", z.ZodTypeAny, {
8
+ status: "success";
9
+ biddingAmount: number;
10
+ boosted: boolean;
11
+ boostingAmount: number;
12
+ }, {
13
+ status: "success";
14
+ biddingAmount: number;
15
+ boosted: boolean;
16
+ boostingAmount: number;
17
+ }>, z.ZodObject<{
18
+ status: z.ZodLiteral<"failed">;
19
+ errorMessage: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ status: "failed";
22
+ errorMessage: string;
23
+ }, {
24
+ status: "failed";
25
+ errorMessage: string;
26
+ }>]>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.proposalBiddingStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.proposalBiddingStatusSchema = zod_1.z.discriminatedUnion('status', [
6
+ // Success case
7
+ zod_1.z.object({
8
+ status: zod_1.z.literal('success'),
9
+ biddingAmount: zod_1.z.number(),
10
+ boosted: zod_1.z.boolean(),
11
+ boostingAmount: zod_1.z.number(),
12
+ }),
13
+ // Failed case
14
+ zod_1.z.object({
15
+ status: zod_1.z.literal('failed'),
16
+ errorMessage: zod_1.z.string(),
17
+ }),
18
+ ]);
@@ -1,6 +1,9 @@
1
- import { z } from 'zod';
2
- export const campaignAIMetricsSchema = z.object({
3
- leadsAnalyzed: z.number(),
4
- leadsBidded: z.number(),
5
- connectsSaved: z.number(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.campaignAIMetricsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.campaignAIMetricsSchema = zod_1.z.object({
6
+ leadsAnalyzed: zod_1.z.number(),
7
+ leadsBidded: zod_1.z.number(),
8
+ connectsSaved: zod_1.z.number(),
6
9
  });
@@ -104,6 +104,7 @@ export declare const campaignActivitySchema: z.ZodObject<{
104
104
  status: z.ZodEnum<["leads", "contacted", "viewed", "replied", "negotiations", "won", "lost"]>;
105
105
  job: z.ZodObject<Pick<{
106
106
  id: z.ZodNullable<z.ZodString>;
107
+ uid: z.ZodNullable<z.ZodString>;
107
108
  createdAt: z.ZodNullable<z.ZodNumber>;
108
109
  title: z.ZodNullable<z.ZodString>;
109
110
  category: z.ZodNullable<z.ZodString>;
@@ -304,6 +305,7 @@ export declare const campaignActivitySchema: z.ZodObject<{
304
305
  max: number | null;
305
306
  }>;
306
307
  lastViewedByClient: z.ZodNullable<z.ZodString>;
308
+ lastViewedByClientTimestamp: z.ZodNullable<z.ZodNumber>;
307
309
  hires: z.ZodNullable<z.ZodNumber>;
308
310
  interviewing: z.ZodNullable<z.ZodNumber>;
309
311
  invitesSent: z.ZodNullable<z.ZodNumber>;
@@ -315,6 +317,7 @@ export declare const campaignActivitySchema: z.ZodObject<{
315
317
  max: number | null;
316
318
  };
317
319
  lastViewedByClient: string | null;
320
+ lastViewedByClientTimestamp: number | null;
318
321
  hires: number | null;
319
322
  interviewing: number | null;
320
323
  invitesSent: number | null;
@@ -326,6 +329,7 @@ export declare const campaignActivitySchema: z.ZodObject<{
326
329
  max: number | null;
327
330
  };
328
331
  lastViewedByClient: string | null;
332
+ lastViewedByClientTimestamp: number | null;
329
333
  hires: number | null;
330
334
  interviewing: number | null;
331
335
  invitesSent: number | null;
@@ -345,6 +349,7 @@ export declare const campaignActivitySchema: z.ZodObject<{
345
349
  max: number | null;
346
350
  }>;
347
351
  lastViewedByClient: z.ZodNullable<z.ZodString>;
352
+ lastViewedByClientTimestamp: z.ZodNullable<z.ZodNumber>;
348
353
  hires: z.ZodNullable<z.ZodNumber>;
349
354
  interviewing: z.ZodNullable<z.ZodNumber>;
350
355
  invitesSent: z.ZodNullable<z.ZodNumber>;
@@ -356,6 +361,7 @@ export declare const campaignActivitySchema: z.ZodObject<{
356
361
  max: number | null;
357
362
  };
358
363
  lastViewedByClient: string | null;
364
+ lastViewedByClientTimestamp: number | null;
359
365
  hires: number | null;
360
366
  interviewing: number | null;
361
367
  invitesSent: number | null;
@@ -367,6 +373,7 @@ export declare const campaignActivitySchema: z.ZodObject<{
367
373
  max: number | null;
368
374
  };
369
375
  lastViewedByClient: string | null;
376
+ lastViewedByClientTimestamp: number | null;
370
377
  hires: number | null;
371
378
  interviewing: number | null;
372
379
  invitesSent: number | null;
@@ -1,35 +1,38 @@
1
- import { z } from "zod";
2
- import { leadStatusSchema, upworkJobSchema } from "../lead";
3
- export const campaignAnalyticsStatsSchema = z.object({
4
- jobsAnalyzed: z.number(),
5
- totalStats: z.object({
6
- contacted: z.number(),
7
- viewed: z.number(),
8
- replied: z.number(),
9
- negotiations: z.number(),
10
- won: z.number(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.campaignActivitySchema = exports.campaignAnalyticsResponseSchema = exports.campaignAnalyticsStatsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const lead_1 = require("../lead");
6
+ exports.campaignAnalyticsStatsSchema = zod_1.z.object({
7
+ jobsAnalyzed: zod_1.z.number(),
8
+ totalStats: zod_1.z.object({
9
+ contacted: zod_1.z.number(),
10
+ viewed: zod_1.z.number(),
11
+ replied: zod_1.z.number(),
12
+ negotiations: zod_1.z.number(),
13
+ won: zod_1.z.number(),
11
14
  }),
12
- statsByDate: z.array(z.object({
13
- label: z.string(),
14
- contacted: z.number(),
15
- viewed: z.number(),
16
- replied: z.number(),
17
- negotiations: z.number(),
18
- won: z.number(),
15
+ statsByDate: zod_1.z.array(zod_1.z.object({
16
+ label: zod_1.z.string(),
17
+ contacted: zod_1.z.number(),
18
+ viewed: zod_1.z.number(),
19
+ replied: zod_1.z.number(),
20
+ negotiations: zod_1.z.number(),
21
+ won: zod_1.z.number(),
19
22
  })),
20
23
  });
21
- export const campaignAnalyticsResponseSchema = z.object({
22
- jobsAnalyzed: z.number(),
23
- contacted: z.number(),
24
- viewed: z.number(),
25
- replied: z.number(),
26
- negotiations: z.number(),
27
- won: z.number(),
24
+ exports.campaignAnalyticsResponseSchema = zod_1.z.object({
25
+ jobsAnalyzed: zod_1.z.number(),
26
+ contacted: zod_1.z.number(),
27
+ viewed: zod_1.z.number(),
28
+ replied: zod_1.z.number(),
29
+ negotiations: zod_1.z.number(),
30
+ won: zod_1.z.number(),
28
31
  });
29
- export const campaignActivitySchema = z.object({
30
- createdAt: z.number(),
31
- status: leadStatusSchema,
32
- job: upworkJobSchema.pick({
32
+ exports.campaignActivitySchema = zod_1.z.object({
33
+ createdAt: zod_1.z.number(),
34
+ status: lead_1.leadStatusSchema,
35
+ job: lead_1.upworkJobSchema.pick({
33
36
  id: true,
34
37
  title: true,
35
38
  datetime: true,
@@ -1,6 +1,9 @@
1
- import { z } from 'zod';
2
- export const campaignExpensesSchema = z.object({
3
- biddingAmount: z.number().default(0),
4
- boostingAmount: z.number().default(0),
5
- boosted: z.number().default(0),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.campaignExpensesSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.campaignExpensesSchema = zod_1.z.object({
6
+ biddingAmount: zod_1.z.number().default(0),
7
+ boostingAmount: zod_1.z.number().default(0),
8
+ boosted: zod_1.z.number().default(0),
6
9
  });
@@ -1,31 +1,31 @@
1
- import { z } from "zod";
2
- import { agentStatusSchema } from "../lead";
3
- export const campaignCountByStatusSchema = z.object({
4
- // Using z.enum values to create a schema with all possible job statuses
5
- ...Object.fromEntries(Object.values(agentStatusSchema.enum).map((status) => [
6
- status,
7
- z.object({
8
- boosted: z.number(),
9
- organic: z.number(),
10
- total: z.number(),
11
- }),
12
- ])),
13
- });
14
- export const campaignInsightsSchema = z.object({
15
- pipelineHealth: campaignCountByStatusSchema,
16
- biddingAmount: z.number().default(0),
17
- boostingAmount: z.number().default(0),
18
- boostedProposalsCount: z.number().default(0),
19
- totalProposalsCount: z.number().default(0),
20
- totalExpenses: z.number().default(0),
21
- suitabilityRange0to10: z.number(),
22
- suitabilityRange10to20: z.number(),
23
- suitabilityRange20to30: z.number(),
24
- suitabilityRange30to40: z.number(),
25
- suitabilityRange40to50: z.number(),
26
- suitabilityRange50to60: z.number(),
27
- suitabilityRange60to70: z.number(),
28
- suitabilityRange70to80: z.number(),
29
- suitabilityRange80to90: z.number(),
30
- suitabilityRange90to100: z.number(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.campaignInsightsSchema = exports.campaignCountByStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const lead_1 = require("../lead");
6
+ exports.campaignCountByStatusSchema = zod_1.z.object(Object.assign({}, Object.fromEntries(Object.values(lead_1.agentStatusSchema.enum).map((status) => [
7
+ status,
8
+ zod_1.z.object({
9
+ boosted: zod_1.z.number(),
10
+ organic: zod_1.z.number(),
11
+ total: zod_1.z.number(),
12
+ }),
13
+ ]))));
14
+ exports.campaignInsightsSchema = zod_1.z.object({
15
+ pipelineHealth: exports.campaignCountByStatusSchema,
16
+ biddingAmount: zod_1.z.number().default(0),
17
+ boostingAmount: zod_1.z.number().default(0),
18
+ boostedProposalsCount: zod_1.z.number().default(0),
19
+ totalProposalsCount: zod_1.z.number().default(0),
20
+ totalExpenses: zod_1.z.number().default(0),
21
+ suitabilityRange0to10: zod_1.z.number(),
22
+ suitabilityRange10to20: zod_1.z.number(),
23
+ suitabilityRange20to30: zod_1.z.number(),
24
+ suitabilityRange30to40: zod_1.z.number(),
25
+ suitabilityRange40to50: zod_1.z.number(),
26
+ suitabilityRange50to60: zod_1.z.number(),
27
+ suitabilityRange60to70: zod_1.z.number(),
28
+ suitabilityRange70to80: zod_1.z.number(),
29
+ suitabilityRange80to90: zod_1.z.number(),
30
+ suitabilityRange90to100: zod_1.z.number(),
31
31
  });
@@ -1,13 +1,16 @@
1
- import { z } from "zod";
2
- export const campaignIntegrations = z.enum(["discord", "slack"]);
3
- export const campaignIntegrationsSchema = z.object({
4
- suitabilityHooks: z.object({
5
- discord: z.string().url().nullable(),
6
- slack: z.string().url().nullable(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateCampaignIntegrationsSchema = exports.campaignIntegrationsSchema = exports.campaignIntegrations = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.campaignIntegrations = zod_1.z.enum(["discord", "slack"]);
6
+ exports.campaignIntegrationsSchema = zod_1.z.object({
7
+ suitabilityHooks: zod_1.z.object({
8
+ discord: zod_1.z.string().url().nullable(),
9
+ slack: zod_1.z.string().url().nullable(),
7
10
  }),
8
- proposalSentHooks: z.object({
9
- discord: z.string().url().nullable(),
10
- slack: z.string().url().nullable(),
11
+ proposalSentHooks: zod_1.z.object({
12
+ discord: zod_1.z.string().url().nullable(),
13
+ slack: zod_1.z.string().url().nullable(),
11
14
  }),
12
15
  });
13
- export const updateCampaignIntegrationsSchema = campaignIntegrationsSchema.partial();
16
+ exports.updateCampaignIntegrationsSchema = exports.campaignIntegrationsSchema.partial();
@@ -1,3 +1,6 @@
1
- import { z } from "zod";
2
- import { leadStatusSchema } from "../lead";
3
- export const campaignJobCountSchema = z.record(leadStatusSchema, z.number());
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.campaignJobCountSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const lead_1 = require("../lead");
6
+ exports.campaignJobCountSchema = zod_1.z.record(lead_1.leadStatusSchema, zod_1.z.number());
@@ -1,41 +1,44 @@
1
- import { number, z } from "zod";
2
- import { jobFiltersSchema } from "../job-filters";
3
- import { leadStatusSchema } from "../lead";
4
- import { campaignExpensesSchema } from "./campaign-expenses";
5
- import { campaignIntegrationsSchema } from "./campaign-integrations";
6
- export const campaignStatusSchema = z.union([
7
- z.literal("active"),
8
- z.literal("draft"),
9
- z.literal("paused"),
10
- z.literal("error"),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateCampaignSchema = exports.createCampaignSchema = exports.campaignSchema = exports.campaignStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const job_filters_1 = require("../job-filters");
6
+ const lead_1 = require("../lead");
7
+ const campaign_expenses_1 = require("./campaign-expenses");
8
+ const campaign_integrations_1 = require("./campaign-integrations");
9
+ exports.campaignStatusSchema = zod_1.z.union([
10
+ zod_1.z.literal('active'),
11
+ zod_1.z.literal('draft'),
12
+ zod_1.z.literal('paused'),
13
+ zod_1.z.literal('error'),
11
14
  ]);
12
- export const campaignSchema = z.object({
13
- id: z.string(),
14
- name: z.string(),
15
- filters: jobFiltersSchema,
16
- createdAt: number(),
17
- updatedAt: number(),
18
- confirmedBillingAt: number().nullable(),
19
- automatedSuitability: z.boolean().nullable(),
20
- automatedBidding: z.boolean().nullable(),
21
- boostingEnabled: z.boolean().nullable().default(false),
22
- maximumBoost: z.number().nullable().default(30),
23
- minimumBoost: z.number().nullable().default(0),
24
- webhookUrl: z.string().nullable(),
25
- monthlyBudget: z.number().nullable(),
26
- suitabilityThreshold: z.number().min(0).max(100).nullable().default(0),
27
- boostingThreshold: z.number().min(0).max(100).nullable().default(0),
28
- leadCounts: z.record(leadStatusSchema, z.number()).nullable(),
29
- expenses: campaignExpensesSchema,
30
- integrations: campaignIntegrationsSchema,
31
- status: campaignStatusSchema.optional(),
15
+ exports.campaignSchema = zod_1.z.object({
16
+ id: zod_1.z.string(),
17
+ name: zod_1.z.string(),
18
+ filters: job_filters_1.jobFiltersSchema,
19
+ createdAt: (0, zod_1.number)(),
20
+ updatedAt: (0, zod_1.number)(),
21
+ confirmedBillingAt: (0, zod_1.number)().nullable(),
22
+ automatedSuitability: zod_1.z.boolean().nullable(),
23
+ automatedBidding: zod_1.z.boolean().nullable(),
24
+ boostingEnabled: zod_1.z.boolean().nullable().default(false),
25
+ maximumBoost: zod_1.z.number().nullable().default(30),
26
+ minimumBoost: zod_1.z.number().nullable().default(0),
27
+ webhookUrl: zod_1.z.string().nullable(),
28
+ monthlyBudget: zod_1.z.number().nullable(),
29
+ suitabilityThreshold: zod_1.z.number().min(0).max(100).nullable().default(0),
30
+ boostingThreshold: zod_1.z.number().min(0).max(100).nullable().default(0),
31
+ leadCounts: zod_1.z.record(lead_1.leadStatusSchema, zod_1.z.number()).nullable(),
32
+ expenses: campaign_expenses_1.campaignExpensesSchema,
33
+ integrations: campaign_integrations_1.campaignIntegrationsSchema,
34
+ status: exports.campaignStatusSchema.optional(),
32
35
  });
33
- export const createCampaignSchema = campaignSchema.omit({
36
+ exports.createCampaignSchema = exports.campaignSchema.omit({
34
37
  id: true,
35
38
  createdAt: true,
36
39
  updatedAt: true,
37
40
  });
38
- export const updateCampaignSchema = campaignSchema.omit({
41
+ exports.updateCampaignSchema = exports.campaignSchema.omit({
39
42
  createdAt: true,
40
43
  updatedAt: true,
41
44
  });
@@ -1,7 +1,23 @@
1
- export * from './campaign';
2
- export * from './campaign-insights';
3
- export * from './campaign-job-count';
4
- export * from './campaign-expenses';
5
- export * from './campaign-integrations';
6
- export * from './campaign-analytics';
7
- export * from './campaign-ai-metrics';
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("./campaign"), exports);
18
+ __exportStar(require("./campaign-insights"), exports);
19
+ __exportStar(require("./campaign-job-count"), exports);
20
+ __exportStar(require("./campaign-expenses"), exports);
21
+ __exportStar(require("./campaign-integrations"), exports);
22
+ __exportStar(require("./campaign-analytics"), exports);
23
+ __exportStar(require("./campaign-ai-metrics"), exports);
@@ -1,10 +1,13 @@
1
- import { z } from 'zod';
2
- export const chatMessageSchema = z.object({
3
- id: z.string(),
4
- content: z.string(),
5
- role: z.enum(['user', 'assistant']),
6
- timestamp: z.string(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.newChatMessageSchema = exports.chatMessageSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.chatMessageSchema = zod_1.z.object({
6
+ id: zod_1.z.string(),
7
+ content: zod_1.z.string(),
8
+ role: zod_1.z.enum(['user', 'assistant']),
9
+ timestamp: zod_1.z.string(),
7
10
  });
8
- export const newChatMessageSchema = chatMessageSchema.omit({
11
+ exports.newChatMessageSchema = exports.chatMessageSchema.omit({
9
12
  id: true,
10
13
  });
@@ -1 +1,17 @@
1
- export * from './chat-message';
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);
@@ -1,7 +1,10 @@
1
- import { z } from 'zod';
2
- export const agencyConfigSchema = z.object({
3
- agencyName: z.string(),
4
- contractorName: z.string(),
5
- specializedProfile: z.string().nullable(),
6
- accountId: z.string(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.agencyConfigSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.agencyConfigSchema = zod_1.z.object({
6
+ agencyName: zod_1.z.string(),
7
+ contractorName: zod_1.z.string(),
8
+ specializedProfile: zod_1.z.string().nullable(),
9
+ accountId: zod_1.z.string(),
7
10
  });
@@ -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,16 +1,32 @@
1
- export * from "./account";
2
- export * from "./ai";
3
- export * from "./bid";
4
- export * from "./campaign";
5
- export * from "./chat-message";
6
- export * from "./config";
7
- export * from "./job-filters";
8
- export * from "./lead";
9
- export * from "./logger";
10
- export * from "./organization";
11
- export * from "./proxy";
12
- export * from "./saved-search";
13
- export * from "./scraper";
14
- export * from "./shared";
15
- export * from "./time-filter";
16
- export * from "./user";
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("./account"), exports);
18
+ __exportStar(require("./ai"), exports);
19
+ __exportStar(require("./bid"), exports);
20
+ __exportStar(require("./campaign"), exports);
21
+ __exportStar(require("./chat-message"), exports);
22
+ __exportStar(require("./config"), exports);
23
+ __exportStar(require("./job-filters"), exports);
24
+ __exportStar(require("./lead"), exports);
25
+ __exportStar(require("./logger"), exports);
26
+ __exportStar(require("./organization"), exports);
27
+ __exportStar(require("./proxy"), exports);
28
+ __exportStar(require("./saved-search"), exports);
29
+ __exportStar(require("./scraper"), exports);
30
+ __exportStar(require("./shared"), exports);
31
+ __exportStar(require("./time-filter"), exports);
32
+ __exportStar(require("./user"), exports);
@@ -1,95 +1,3 @@
1
- import { z } from "zod";
2
- export declare const jobActivityOffsetEnum: z.ZodEnum<["4h", "24h"]>;
3
- export declare const jobListingSchema: z.ZodObject<{
4
- uid: z.ZodNullable<z.ZodString>;
5
- title: z.ZodNullable<z.ZodString>;
6
- jobUrl: z.ZodNullable<z.ZodString>;
7
- datetime: z.ZodNullable<z.ZodString>;
8
- isFeatured: z.ZodNullable<z.ZodBoolean>;
9
- region: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"USOnly">, z.ZodLiteral<"UKOnly">, z.ZodLiteral<"Worldwide">]>>;
10
- }, "strip", z.ZodTypeAny, {
11
- uid: string | null;
12
- title: string | null;
13
- jobUrl: string | null;
14
- datetime: string | null;
15
- isFeatured: boolean | null;
16
- region: "USOnly" | "UKOnly" | "Worldwide" | null;
17
- }, {
18
- uid: string | null;
19
- title: string | null;
20
- jobUrl: string | null;
21
- datetime: string | null;
22
- isFeatured: boolean | null;
23
- region: "USOnly" | "UKOnly" | "Worldwide" | null;
24
- }>;
25
- export declare const jobActivityUpdateSchema: z.ZodObject<{
26
- data: z.ZodObject<{
27
- proposals: z.ZodObject<{
28
- min: z.ZodNullable<z.ZodNumber>;
29
- max: z.ZodNullable<z.ZodNumber>;
30
- }, "strip", z.ZodTypeAny, {
31
- min: number | null;
32
- max: number | null;
33
- }, {
34
- min: number | null;
35
- max: number | null;
36
- }>;
37
- lastViewedByClient: z.ZodNullable<z.ZodString>;
38
- hires: z.ZodNullable<z.ZodNumber>;
39
- interviewing: z.ZodNullable<z.ZodNumber>;
40
- invitesSent: z.ZodNullable<z.ZodNumber>;
41
- unansweredInvites: z.ZodNullable<z.ZodNumber>;
42
- updatedAt: z.ZodNullable<z.ZodNumber>;
43
- }, "strip", z.ZodTypeAny, {
44
- proposals: {
45
- min: number | null;
46
- max: number | null;
47
- };
48
- lastViewedByClient: string | null;
49
- hires: number | null;
50
- interviewing: number | null;
51
- invitesSent: number | null;
52
- unansweredInvites: number | null;
53
- updatedAt: number | null;
54
- }, {
55
- proposals: {
56
- min: number | null;
57
- max: number | null;
58
- };
59
- lastViewedByClient: string | null;
60
- hires: number | null;
61
- interviewing: number | null;
62
- invitesSent: number | null;
63
- unansweredInvites: number | null;
64
- updatedAt: number | null;
65
- }>;
66
- offset: z.ZodEnum<["4h", "24h"]>;
67
- }, "strip", z.ZodTypeAny, {
68
- data: {
69
- proposals: {
70
- min: number | null;
71
- max: number | null;
72
- };
73
- lastViewedByClient: string | null;
74
- hires: number | null;
75
- interviewing: number | null;
76
- invitesSent: number | null;
77
- unansweredInvites: number | null;
78
- updatedAt: number | null;
79
- };
80
- offset: "4h" | "24h";
81
- }, {
82
- data: {
83
- proposals: {
84
- min: number | null;
85
- max: number | null;
86
- };
87
- lastViewedByClient: string | null;
88
- hires: number | null;
89
- interviewing: number | null;
90
- invitesSent: number | null;
91
- unansweredInvites: number | null;
92
- updatedAt: number | null;
93
- };
94
- offset: "4h" | "24h";
95
- }>;
1
+ export * from "./job";
2
+ export * from "./job-note";
3
+ export * from "./job-status";