lancer-shared 1.0.97 → 1.0.98

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,38 @@
1
1
  import { z } from 'zod';
2
+ export declare const bidFormDataSchema: z.ZodObject<{
3
+ coverLetter: z.ZodString;
4
+ questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
5
+ question: z.ZodString;
6
+ answer: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ answer: string;
9
+ question: string;
10
+ }, {
11
+ answer: string;
12
+ question: string;
13
+ }>, "many">>;
14
+ boostingEnabled: z.ZodBoolean;
15
+ minimumBoost: z.ZodNullable<z.ZodNumber>;
16
+ maximumBoost: z.ZodNullable<z.ZodNumber>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ coverLetter: string;
19
+ questionAnswerPairs: {
20
+ answer: string;
21
+ question: string;
22
+ }[] | null;
23
+ boostingEnabled: boolean;
24
+ maximumBoost: number | null;
25
+ minimumBoost: number | null;
26
+ }, {
27
+ coverLetter: string;
28
+ questionAnswerPairs: {
29
+ answer: string;
30
+ question: string;
31
+ }[] | null;
32
+ boostingEnabled: boolean;
33
+ maximumBoost: number | null;
34
+ minimumBoost: number | null;
35
+ }>;
2
36
  export declare const bidSchema: z.ZodObject<{
3
37
  userId: z.ZodString;
4
38
  jobUrl: z.ZodString;
@@ -1,21 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.freelancerBidSchema = exports.agencyBidSchema = exports.bidSchema = void 0;
3
+ exports.freelancerBidSchema = exports.agencyBidSchema = exports.bidSchema = exports.bidFormDataSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const ai_1 = require("../ai");
6
+ exports.bidFormDataSchema = zod_1.z.object({
7
+ coverLetter: zod_1.z.string(),
8
+ questionAnswerPairs: zod_1.z.array(ai_1.questionAnswerPairSchema).nullable(),
9
+ boostingEnabled: zod_1.z.boolean(),
10
+ minimumBoost: zod_1.z.number().nullable(),
11
+ maximumBoost: zod_1.z.number().nullable(),
12
+ });
6
13
  exports.bidSchema = zod_1.z.object({
7
14
  userId: zod_1.z.string(),
8
15
  jobUrl: zod_1.z.string(),
9
16
  cookies: zod_1.z.array(zod_1.z.any()),
10
17
  jobId: zod_1.z.string(),
11
18
  campaignId: zod_1.z.string(),
12
- formData: zod_1.z.object({
13
- coverLetter: zod_1.z.string(),
14
- questionAnswerPairs: zod_1.z.array(ai_1.questionAnswerPairSchema).nullable(),
15
- boostingEnabled: zod_1.z.boolean(),
16
- minimumBoost: zod_1.z.number().nullable(),
17
- maximumBoost: zod_1.z.number().nullable(),
18
- }),
19
+ formData: exports.bidFormDataSchema,
19
20
  });
20
21
  exports.agencyBidSchema = exports.bidSchema.extend({
21
22
  agencyName: zod_1.z.string(),
@@ -1,6 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { agencyBidSchema, bidSchema, freelancerBidSchema } from '../../schemas/bid';
2
+ import { agencyBidSchema, bidFormDataSchema, bidSchema, freelancerBidSchema } from '../../schemas/bid';
3
+ export interface BidFormData extends z.infer<typeof bidFormDataSchema> {
4
+ }
3
5
  export interface Bid extends z.infer<typeof bidSchema> {
6
+ formData: BidFormData;
4
7
  }
5
8
  export interface AgencyBid extends z.infer<typeof agencyBidSchema> {
6
9
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "lancer-shared",
4
- "version": "1.0.97",
4
+ "version": "1.0.98",
5
5
  "description": "This package contains shared stuff.",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.js",