lancer-shared 1.0.81 → 1.0.82

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.
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ export declare const campaignStatusSchema: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>;
2
3
  export declare const campaignSchema: z.ZodObject<{
3
4
  id: z.ZodString;
4
5
  name: z.ZodString;
@@ -254,11 +255,10 @@ export declare const campaignSchema: z.ZodObject<{
254
255
  slack: string | null;
255
256
  };
256
257
  }>;
257
- status: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>;
258
+ status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>>;
258
259
  }, "strip", z.ZodTypeAny, {
259
260
  id: string;
260
261
  name: string;
261
- status: "error" | "active" | "paused" | "draft";
262
262
  createdAt: number;
263
263
  updatedAt: number;
264
264
  leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "negotiations" | "won" | "lost", number>> | null;
@@ -329,10 +329,10 @@ export declare const campaignSchema: z.ZodObject<{
329
329
  slack: string | null;
330
330
  };
331
331
  };
332
+ status?: "error" | "active" | "paused" | "draft" | undefined;
332
333
  }, {
333
334
  id: string;
334
335
  name: string;
335
- status: "error" | "active" | "paused" | "draft";
336
336
  createdAt: number;
337
337
  updatedAt: number;
338
338
  leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "negotiations" | "won" | "lost", number>> | null;
@@ -398,6 +398,7 @@ export declare const campaignSchema: z.ZodObject<{
398
398
  slack: string | null;
399
399
  };
400
400
  };
401
+ status?: "error" | "active" | "paused" | "draft" | undefined;
401
402
  boostingEnabled?: boolean | null | undefined;
402
403
  maximumBoost?: number | null | undefined;
403
404
  minimumBoost?: number | null | undefined;
@@ -659,10 +660,9 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
659
660
  slack: string | null;
660
661
  };
661
662
  }>;
662
- status: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>;
663
+ status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>>;
663
664
  }, "id" | "createdAt" | "updatedAt">, "strip", z.ZodTypeAny, {
664
665
  name: string;
665
- status: "error" | "active" | "paused" | "draft";
666
666
  leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "negotiations" | "won" | "lost", number>> | null;
667
667
  filters: {
668
668
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -731,9 +731,9 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
731
731
  slack: string | null;
732
732
  };
733
733
  };
734
+ status?: "error" | "active" | "paused" | "draft" | undefined;
734
735
  }, {
735
736
  name: string;
736
- status: "error" | "active" | "paused" | "draft";
737
737
  leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "negotiations" | "won" | "lost", number>> | null;
738
738
  filters: {
739
739
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -797,6 +797,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
797
797
  slack: string | null;
798
798
  };
799
799
  };
800
+ status?: "error" | "active" | "paused" | "draft" | undefined;
800
801
  boostingEnabled?: boolean | null | undefined;
801
802
  maximumBoost?: number | null | undefined;
802
803
  minimumBoost?: number | null | undefined;
@@ -1058,11 +1059,10 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
1058
1059
  slack: string | null;
1059
1060
  };
1060
1061
  }>;
1061
- status: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>;
1062
+ status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>>;
1062
1063
  }, "createdAt" | "updatedAt">, "strip", z.ZodTypeAny, {
1063
1064
  id: string;
1064
1065
  name: string;
1065
- status: "error" | "active" | "paused" | "draft";
1066
1066
  leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "negotiations" | "won" | "lost", number>> | null;
1067
1067
  filters: {
1068
1068
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -1131,10 +1131,10 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
1131
1131
  slack: string | null;
1132
1132
  };
1133
1133
  };
1134
+ status?: "error" | "active" | "paused" | "draft" | undefined;
1134
1135
  }, {
1135
1136
  id: string;
1136
1137
  name: string;
1137
- status: "error" | "active" | "paused" | "draft";
1138
1138
  leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "negotiations" | "won" | "lost", number>> | null;
1139
1139
  filters: {
1140
1140
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -1198,6 +1198,7 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
1198
1198
  slack: string | null;
1199
1199
  };
1200
1200
  };
1201
+ status?: "error" | "active" | "paused" | "draft" | undefined;
1201
1202
  boostingEnabled?: boolean | null | undefined;
1202
1203
  maximumBoost?: number | null | undefined;
1203
1204
  minimumBoost?: number | null | undefined;
@@ -1,11 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateCampaignSchema = exports.createCampaignSchema = exports.campaignSchema = void 0;
3
+ exports.updateCampaignSchema = exports.createCampaignSchema = exports.campaignSchema = exports.campaignStatusSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const job_filters_1 = require("../job-filters");
6
6
  const lead_1 = require("../lead");
7
7
  const campaign_expenses_1 = require("./campaign-expenses");
8
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"),
14
+ ]);
9
15
  exports.campaignSchema = zod_1.z.object({
10
16
  id: zod_1.z.string(),
11
17
  name: zod_1.z.string(),
@@ -24,12 +30,7 @@ exports.campaignSchema = zod_1.z.object({
24
30
  leadCounts: zod_1.z.record(lead_1.leadStatusSchema, zod_1.z.number()).nullable(),
25
31
  expenses: campaign_expenses_1.campaignExpensesSchema,
26
32
  integrations: campaign_integrations_1.campaignIntegrationsSchema,
27
- status: zod_1.z.union([
28
- zod_1.z.literal("active"),
29
- zod_1.z.literal("draft"),
30
- zod_1.z.literal("paused"),
31
- zod_1.z.literal("error"),
32
- ]),
33
+ status: exports.campaignStatusSchema.optional(),
33
34
  });
34
35
  exports.createCampaignSchema = exports.campaignSchema.omit({
35
36
  id: true,
@@ -1,13 +1,14 @@
1
- import { z } from 'zod';
2
- import { campaignSchema, createCampaignSchema, updateCampaignSchema } from '../../schemas';
3
- import { JobFilters } from '../job-filters';
4
- import { CampaignExpenses } from './campaign-expenses';
5
- import { CampaignIntegrations } from './campaign-integrations';
1
+ import { z } from "zod";
2
+ import { campaignSchema, campaignStatusSchema, createCampaignSchema, updateCampaignSchema } from "../../schemas";
3
+ import { JobFilters } from "../job-filters";
4
+ import { CampaignExpenses } from "./campaign-expenses";
5
+ import { CampaignIntegrations } from "./campaign-integrations";
6
6
  export interface Campaign extends z.infer<typeof campaignSchema> {
7
7
  filters: JobFilters;
8
8
  expenses: CampaignExpenses;
9
9
  integrations: CampaignIntegrations;
10
10
  }
11
+ export type CampaignStatus = z.infer<typeof campaignStatusSchema>;
11
12
  export interface CreateCampaign extends z.infer<typeof createCampaignSchema> {
12
13
  filters: JobFilters;
13
14
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "lancer-shared",
4
- "version": "1.0.81",
4
+ "version": "1.0.82",
5
5
  "description": "This package contains shared stuff.",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.js",