lancer-shared 1.2.24 → 1.2.25

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.
@@ -5405,8 +5405,6 @@ const LogEventTypeEnum = z.enum([
5405
5405
  "manualLeadEdited",
5406
5406
  "leadArchived",
5407
5407
  "auditTrailLogged",
5408
- // Model Chain Events
5409
- "modelFailed",
5410
5408
  ]);
5411
5409
  const logEventSchema = z.object({
5412
5410
  // The type of event (use a z.enum if possible)
@@ -6446,6 +6444,18 @@ const organizationCampaignStatsSchema = z.object({
6446
6444
  campaigns: z.array(campaignDetailsSchema),
6447
6445
  });
6448
6446
 
6447
+ const sendAlertPayloadSchema = z.object({
6448
+ type: z.union([
6449
+ z.literal("suitability"),
6450
+ z.literal("proposal"),
6451
+ z.literal("bidding"),
6452
+ ]),
6453
+ organizationId: z.string(),
6454
+ campaignId: z.string(),
6455
+ leadId: z.string(),
6456
+ errorMessage: z.string(),
6457
+ });
6458
+
6449
6459
  const commonQuestions = [
6450
6460
  {
6451
6461
  id: 'similar_experience',
@@ -12783,6 +12793,10 @@ const ROUTES = {
12783
12793
  BASE: "plans",
12784
12794
  BY_ID: (id) => `plans/${id}`,
12785
12795
  },
12796
+ NOTIFICATIONS: {
12797
+ BASE: "notifications",
12798
+ SEND_ALERT: "notifications/send-alert",
12799
+ },
12786
12800
  };
12787
12801
  // Helper function to build route with parameters
12788
12802
  const buildRoute = (route, params = {}) => {
@@ -13301,6 +13315,7 @@ exports.scrapePayloadSchema = scrapePayloadSchema;
13301
13315
  exports.scrapeResultSchema = scrapeResultSchema;
13302
13316
  exports.scrapeUserProfileRequestSchema = scrapeUserProfileRequestSchema;
13303
13317
  exports.scraperAccountSchema = scraperAccountSchema;
13318
+ exports.sendAlertPayloadSchema = sendAlertPayloadSchema;
13304
13319
  exports.subscribePayloadSchema = subscribePayloadSchema;
13305
13320
  exports.subscriptionSchema = subscriptionSchema;
13306
13321
  exports.subscriptionSourceEnum = subscriptionSourceEnum;
@@ -183,6 +183,10 @@ export declare const ROUTES: {
183
183
  readonly BASE: "plans";
184
184
  readonly BY_ID: (id: string) => string;
185
185
  };
186
+ readonly NOTIFICATIONS: {
187
+ readonly BASE: "notifications";
188
+ readonly SEND_ALERT: "notifications/send-alert";
189
+ };
186
190
  };
187
191
  export type RouteParams = {
188
192
  id?: string;
@@ -18,3 +18,4 @@ export * from "./transaction";
18
18
  export * from "./usage";
19
19
  export * from "./user";
20
20
  export * from "./dashboard";
21
+ export * from "./notifications";
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
- export declare const LogEventTypeEnum: z.ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "leadStatusCheckFailed", "leadStatusUpdated", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "biddingRetry", "biddingInsufficientConnects", "biddingWarningAlert", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged", "modelFailed"]>;
2
+ export declare const LogEventTypeEnum: z.ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "leadStatusCheckFailed", "leadStatusUpdated", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "biddingRetry", "biddingInsufficientConnects", "biddingWarningAlert", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
3
3
  export declare const logEventSchema: z.ZodObject<{
4
- type: z.ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "leadStatusCheckFailed", "leadStatusUpdated", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "biddingRetry", "biddingInsufficientConnects", "biddingWarningAlert", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged", "modelFailed"]>;
4
+ type: z.ZodEnum<["scraperStarted", "scraperCompleted", "jobScraped", "jobScrapeFailed", "jobsIndexed", "jobDuplicateSkipped", "scraperFailed", "jobActivityScraped", "jobActivityScrapeFailed", "leadStatusCheckFailed", "leadStatusUpdated", "feedScrapeStarted", "feedScrapeCompleted", "feedScrapeFailed", "jobListingScraped", "jobSyncPublished", "jobSyncReceived", "leadsCreatedAndSynced", "suitabilityPending", "suitabilityProcessing", "suitabilityComplete", "suitabilityFailed", "manualSuitabilityAnalyzed", "proposalProcessing", "proposalComplete", "proposalFailed", "manualProposalGenerated", "biddingProcessing", "biddingComplete", "biddingFailed", "biddingSkipped", "biddingPending", "biddingRetry", "biddingInsufficientConnects", "biddingWarningAlert", "errorLogged", "cloudTaskRetry", "manualLeadEdited", "leadArchived", "auditTrailLogged"]>;
5
5
  source: z.ZodString;
6
6
  resourceType: z.ZodDefault<z.ZodString>;
7
7
  resourceId: z.ZodNullable<z.ZodString>;
@@ -13,7 +13,7 @@ export declare const logEventSchema: z.ZodObject<{
13
13
  metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
14
14
  timestamp: z.ZodNumber;
15
15
  }, "strip", z.ZodTypeAny, {
16
- type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged" | "modelFailed";
16
+ type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
17
17
  source: string;
18
18
  resourceType: string;
19
19
  resourceId: string | null;
@@ -25,7 +25,7 @@ export declare const logEventSchema: z.ZodObject<{
25
25
  metadata: Record<string, unknown> | null;
26
26
  timestamp: number;
27
27
  }, {
28
- type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged" | "modelFailed";
28
+ type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "leadStatusCheckFailed" | "leadStatusUpdated" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
29
29
  source: string;
30
30
  resourceId: string | null;
31
31
  organizationId: string | null;
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ export declare const sendAlertPayloadSchema: z.ZodObject<{
3
+ type: z.ZodUnion<[z.ZodLiteral<"suitability">, z.ZodLiteral<"proposal">, z.ZodLiteral<"bidding">]>;
4
+ organizationId: z.ZodString;
5
+ campaignId: z.ZodString;
6
+ leadId: z.ZodString;
7
+ errorMessage: z.ZodString;
8
+ }, "strip", z.ZodTypeAny, {
9
+ type: "suitability" | "proposal" | "bidding";
10
+ organizationId: string;
11
+ campaignId: string;
12
+ leadId: string;
13
+ errorMessage: string;
14
+ }, {
15
+ type: "suitability" | "proposal" | "bidding";
16
+ organizationId: string;
17
+ campaignId: string;
18
+ leadId: string;
19
+ errorMessage: string;
20
+ }>;
21
+ export type SendAlertPayload = z.infer<typeof sendAlertPayloadSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lancer-shared",
3
- "version": "1.2.24",
3
+ "version": "1.2.25",
4
4
  "description": "This package contains shared stuff.",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "dist/bundle.cjs.js",