lancer-shared 1.0.13 → 1.0.15

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.
@@ -6,11 +6,11 @@ export declare const ROUTES: {
6
6
  readonly CAMPAIGNS: {
7
7
  readonly BASE: "campaigns";
8
8
  readonly BY_ID: (id: string) => string;
9
- readonly JOBS: {
9
+ readonly LEADS: {
10
10
  readonly BASE: (campaignId: string) => string;
11
- readonly BY_ID: (campaignId: string, jobId: string) => string;
11
+ readonly BY_ID: (campaignId: string, leadId: string) => string;
12
12
  readonly SYNC: (campaignId: string) => string;
13
- readonly NOTES: (campaignId: string, jobId: string, noteId: string) => string;
13
+ readonly NOTES: (campaignId: string, leadId: string, noteId: string) => string;
14
14
  };
15
15
  readonly INSIGHTS: (campaignId: string) => string;
16
16
  readonly INTEGRATIONS: {
@@ -56,6 +56,6 @@ export declare const ROUTES: {
56
56
  export type RouteParams = {
57
57
  id?: string;
58
58
  campaignId?: string;
59
- jobId?: string;
59
+ leadId?: string;
60
60
  };
61
61
  export declare const buildRoute: (route: string, params?: RouteParams) => string;
@@ -9,11 +9,11 @@ exports.ROUTES = {
9
9
  CAMPAIGNS: {
10
10
  BASE: "campaigns",
11
11
  BY_ID: (id) => `campaigns/${id}`,
12
- JOBS: {
12
+ LEADS: {
13
13
  BASE: (campaignId) => `campaigns/${campaignId}/leads`,
14
- BY_ID: (campaignId, jobId) => `campaigns/${campaignId}/jobs/${jobId}`,
14
+ BY_ID: (campaignId, leadId) => `campaigns/${campaignId}/leads/${leadId}`,
15
15
  SYNC: (campaignId) => `campaigns/${campaignId}/leads/sync`,
16
- NOTES: (campaignId, jobId, noteId) => `campaigns/${campaignId}/leads/${jobId}/notes/${noteId}`,
16
+ NOTES: (campaignId, leadId, noteId) => `campaigns/${campaignId}/leads/${leadId}/notes/${noteId}`,
17
17
  },
18
18
  INSIGHTS: (campaignId) => `campaigns/${campaignId}/insights`,
19
19
  INTEGRATIONS: {
@@ -178,8 +178,8 @@ export declare const campaignSchema: z.ZodObject<{
178
178
  } | null;
179
179
  engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
180
180
  }>;
181
- createdAt: z.ZodDate;
182
- updatedAt: z.ZodDate;
181
+ createdAt: z.ZodNumber;
182
+ updatedAt: z.ZodNumber;
183
183
  automatedSuitability: z.ZodNullable<z.ZodBoolean>;
184
184
  automatedBidding: z.ZodNullable<z.ZodBoolean>;
185
185
  boostingEnabled: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
@@ -246,8 +246,8 @@ export declare const campaignSchema: z.ZodObject<{
246
246
  }, "strip", z.ZodTypeAny, {
247
247
  id: string;
248
248
  name: string;
249
- createdAt: Date;
250
- updatedAt: Date;
249
+ createdAt: number;
250
+ updatedAt: number;
251
251
  filters: {
252
252
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
253
253
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -316,8 +316,8 @@ export declare const campaignSchema: z.ZodObject<{
316
316
  }, {
317
317
  id: string;
318
318
  name: string;
319
- createdAt: Date;
320
- updatedAt: Date;
319
+ createdAt: number;
320
+ updatedAt: number;
321
321
  filters: {
322
322
  experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
323
323
  projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
@@ -563,8 +563,8 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
563
563
  } | null;
564
564
  engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
565
565
  }>;
566
- createdAt: z.ZodDate;
567
- updatedAt: z.ZodDate;
566
+ createdAt: z.ZodNumber;
567
+ updatedAt: z.ZodNumber;
568
568
  automatedSuitability: z.ZodNullable<z.ZodBoolean>;
569
569
  automatedBidding: z.ZodNullable<z.ZodBoolean>;
570
570
  boostingEnabled: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
@@ -942,8 +942,8 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
942
942
  } | null;
943
943
  engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
944
944
  }>;
945
- createdAt: z.ZodDate;
946
- updatedAt: z.ZodDate;
945
+ createdAt: z.ZodNumber;
946
+ updatedAt: z.ZodNumber;
947
947
  automatedSuitability: z.ZodNullable<z.ZodBoolean>;
948
948
  automatedBidding: z.ZodNullable<z.ZodBoolean>;
949
949
  boostingEnabled: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateCampaignSchema = exports.createCampaignSchema = exports.campaignSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const job_filters_1 = require("../job-filters");
6
- const shared_1 = require("../shared");
7
6
  const lead_1 = require("../lead");
8
7
  const campaign_expenses_1 = require("./campaign-expenses");
9
8
  const campaign_integrations_1 = require("./campaign-integrations");
@@ -11,8 +10,8 @@ exports.campaignSchema = zod_1.z.object({
11
10
  id: zod_1.z.string(),
12
11
  name: zod_1.z.string(),
13
12
  filters: job_filters_1.jobFiltersSchema,
14
- createdAt: (0, shared_1.dateSchema)(),
15
- updatedAt: (0, shared_1.dateSchema)(),
13
+ createdAt: (0, zod_1.number)(),
14
+ updatedAt: (0, zod_1.number)(),
16
15
  automatedSuitability: zod_1.z.boolean().nullable(),
17
16
  automatedBidding: zod_1.z.boolean().nullable(),
18
17
  boostingEnabled: zod_1.z.boolean().nullable().default(false),
@@ -6,13 +6,13 @@ export declare const userSchema: import("zod").ZodObject<{
6
6
  email: import("zod").ZodString;
7
7
  suitabilityPrompt: import("zod").ZodString;
8
8
  proposalPrompt: import("zod").ZodString;
9
- createdAt: import("zod").ZodDate;
10
- updatedAt: import("zod").ZodDate;
9
+ createdAt: import("zod").ZodNumber;
10
+ updatedAt: import("zod").ZodNumber;
11
11
  }, "strip", import("zod").ZodTypeAny, {
12
12
  id: string;
13
13
  email: string;
14
- createdAt: Date;
15
- updatedAt: Date;
14
+ createdAt: number;
15
+ updatedAt: number;
16
16
  firstName: string;
17
17
  lastName: string;
18
18
  displayName: string;
@@ -21,8 +21,8 @@ export declare const userSchema: import("zod").ZodObject<{
21
21
  }, {
22
22
  id: string;
23
23
  email: string;
24
- createdAt: Date;
25
- updatedAt: Date;
24
+ createdAt: number;
25
+ updatedAt: number;
26
26
  firstName: string;
27
27
  lastName: string;
28
28
  displayName: string;
@@ -11,23 +11,23 @@ exports.userSchema = (0, zod_1.object)({
11
11
  email: (0, zod_1.string)(),
12
12
  suitabilityPrompt: (0, zod_1.string)(),
13
13
  proposalPrompt: (0, zod_1.string)(),
14
- createdAt: (0, shared_1.dateSchema)(),
15
- updatedAt: (0, shared_1.dateSchema)(),
14
+ createdAt: (0, zod_1.number)(),
15
+ updatedAt: (0, zod_1.number)(),
16
16
  });
17
17
  exports.loginSchema = (0, zod_1.object)({
18
18
  email: (0, zod_1.string)().email(),
19
19
  password: shared_1.passwordSchema,
20
20
  });
21
21
  exports.registerSchema = (0, zod_1.object)({
22
- firstName: (0, zod_1.string)().min(1, 'First name is required').max(255),
23
- lastName: (0, zod_1.string)().min(1, 'Last name is required').max(255),
22
+ firstName: (0, zod_1.string)().min(1, "First name is required").max(255),
23
+ lastName: (0, zod_1.string)().min(1, "Last name is required").max(255),
24
24
  email: (0, zod_1.string)()
25
- .email('Must be a valid email address')
25
+ .email("Must be a valid email address")
26
26
  .max(255)
27
- .min(1, 'Email address is required'),
27
+ .min(1, "Email address is required"),
28
28
  password: shared_1.passwordSchema,
29
29
  confirmPassword: shared_1.passwordSchema,
30
30
  }).refine(({ password, confirmPassword }) => password === confirmPassword, {
31
31
  message: `Passwords don't match.`,
32
- path: ['confirmPassword'],
32
+ path: ["confirmPassword"],
33
33
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "lancer-shared",
4
- "version": "1.0.13",
4
+ "version": "1.0.15",
5
5
  "description": "This package contains shared stuff.",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.js",