lancer-shared 1.0.129 → 1.0.131

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,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const bidFormDataSchema: z.ZodObject<{
2
+ export declare const bidPayloadProposalDataSchema: z.ZodObject<{
3
3
  coverLetter: z.ZodString;
4
4
  questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
5
5
  question: z.ZodString;
@@ -67,6 +67,7 @@ export declare const freelancerBidFormDataSchema: z.ZodObject<{
67
67
  maximumBoost: number | null;
68
68
  minimumBoost: number | null;
69
69
  }>;
70
+ export type FreelancerBidFormData = z.infer<typeof freelancerBidFormDataSchema>;
70
71
  export declare const agencyBidFormDataSchema: z.ZodObject<z.objectUtil.extendShape<{
71
72
  coverLetter: z.ZodString;
72
73
  questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -111,11 +112,8 @@ export declare const agencyBidFormDataSchema: z.ZodObject<z.objectUtil.extendSha
111
112
  contractorName: string;
112
113
  specializedProfile: string | null;
113
114
  }>;
114
- export declare const bidSchema: z.ZodObject<{
115
- userId: z.ZodString;
115
+ export declare const bidPayloadSchema: z.ZodObject<{
116
116
  jobUrl: z.ZodString;
117
- jobId: z.ZodString;
118
- campaignId: z.ZodString;
119
117
  username: z.ZodString;
120
118
  password: z.ZodString;
121
119
  cookies: z.ZodArray<z.ZodAny, "many">;
@@ -123,30 +121,21 @@ export declare const bidSchema: z.ZodObject<{
123
121
  proxyUrl: z.ZodNullable<z.ZodString>;
124
122
  }, "strip", z.ZodTypeAny, {
125
123
  username: string;
126
- jobId: string;
127
124
  cookies: any[];
128
125
  password: string;
129
126
  jobUrl: string;
130
- userId: string;
131
- campaignId: string;
132
127
  accountId: string;
133
128
  proxyUrl: string | null;
134
129
  }, {
135
130
  username: string;
136
- jobId: string;
137
131
  cookies: any[];
138
132
  password: string;
139
133
  jobUrl: string;
140
- userId: string;
141
- campaignId: string;
142
134
  accountId: string;
143
135
  proxyUrl: string | null;
144
136
  }>;
145
- export declare const agencyBidSchema: z.ZodObject<z.objectUtil.extendShape<{
146
- userId: z.ZodString;
137
+ export declare const agencyBidPayloadSchema: z.ZodObject<z.objectUtil.extendShape<{
147
138
  jobUrl: z.ZodString;
148
- jobId: z.ZodString;
149
- campaignId: z.ZodString;
150
139
  username: z.ZodString;
151
140
  password: z.ZodString;
152
141
  cookies: z.ZodArray<z.ZodAny, "many">;
@@ -212,12 +201,9 @@ export declare const agencyBidSchema: z.ZodObject<z.objectUtil.extendShape<{
212
201
  specializedProfile: string | null;
213
202
  };
214
203
  username: string;
215
- jobId: string;
216
204
  cookies: any[];
217
205
  password: string;
218
206
  jobUrl: string;
219
- userId: string;
220
- campaignId: string;
221
207
  accountId: string;
222
208
  proxyUrl: string | null;
223
209
  }, {
@@ -235,20 +221,14 @@ export declare const agencyBidSchema: z.ZodObject<z.objectUtil.extendShape<{
235
221
  specializedProfile: string | null;
236
222
  };
237
223
  username: string;
238
- jobId: string;
239
224
  cookies: any[];
240
225
  password: string;
241
226
  jobUrl: string;
242
- userId: string;
243
- campaignId: string;
244
227
  accountId: string;
245
228
  proxyUrl: string | null;
246
229
  }>;
247
- export declare const freelancerBidSchema: z.ZodObject<z.objectUtil.extendShape<{
248
- userId: z.ZodString;
230
+ export declare const freelancerBidPayloadSchema: z.ZodObject<z.objectUtil.extendShape<{
249
231
  jobUrl: z.ZodString;
250
- jobId: z.ZodString;
251
- campaignId: z.ZodString;
252
232
  username: z.ZodString;
253
233
  password: z.ZodString;
254
234
  cookies: z.ZodArray<z.ZodAny, "many">;
@@ -301,12 +281,9 @@ export declare const freelancerBidSchema: z.ZodObject<z.objectUtil.extendShape<{
301
281
  minimumBoost: number | null;
302
282
  };
303
283
  username: string;
304
- jobId: string;
305
284
  cookies: any[];
306
285
  password: string;
307
286
  jobUrl: string;
308
- userId: string;
309
- campaignId: string;
310
287
  accountId: string;
311
288
  proxyUrl: string | null;
312
289
  }, {
@@ -321,12 +298,9 @@ export declare const freelancerBidSchema: z.ZodObject<z.objectUtil.extendShape<{
321
298
  minimumBoost: number | null;
322
299
  };
323
300
  username: string;
324
- jobId: string;
325
301
  cookies: any[];
326
302
  password: string;
327
303
  jobUrl: string;
328
- userId: string;
329
- campaignId: string;
330
304
  accountId: string;
331
305
  proxyUrl: string | null;
332
306
  }>;
@@ -1,35 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.freelancerBidSchema = exports.agencyBidSchema = exports.bidSchema = exports.agencyBidFormDataSchema = exports.freelancerBidFormDataSchema = exports.bidFormDataSchema = void 0;
3
+ exports.freelancerBidPayloadSchema = exports.agencyBidPayloadSchema = exports.bidPayloadSchema = exports.agencyBidFormDataSchema = exports.freelancerBidFormDataSchema = exports.bidPayloadProposalDataSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const ai_1 = require("../ai");
6
- exports.bidFormDataSchema = zod_1.z.object({
6
+ exports.bidPayloadProposalDataSchema = zod_1.z.object({
7
7
  coverLetter: zod_1.z.string(),
8
8
  questionAnswerPairs: zod_1.z.array(ai_1.questionAnswerPairSchema).nullable(),
9
9
  boostingEnabled: zod_1.z.boolean(),
10
10
  minimumBoost: zod_1.z.number().nullable(),
11
11
  maximumBoost: zod_1.z.number().nullable(),
12
12
  });
13
- exports.freelancerBidFormDataSchema = exports.bidFormDataSchema;
14
- exports.agencyBidFormDataSchema = exports.bidFormDataSchema.extend({
13
+ exports.freelancerBidFormDataSchema = exports.bidPayloadProposalDataSchema;
14
+ exports.agencyBidFormDataSchema = exports.bidPayloadProposalDataSchema.extend({
15
15
  agencyName: zod_1.z.string(),
16
16
  contractorName: zod_1.z.string(),
17
17
  specializedProfile: zod_1.z.string().nullable(),
18
18
  });
19
- exports.bidSchema = zod_1.z.object({
20
- userId: zod_1.z.string(),
19
+ exports.bidPayloadSchema = zod_1.z.object({
21
20
  jobUrl: zod_1.z.string(),
22
- jobId: zod_1.z.string(),
23
- campaignId: zod_1.z.string(),
24
21
  username: zod_1.z.string(),
25
22
  password: zod_1.z.string(),
26
23
  cookies: zod_1.z.array(zod_1.z.any()),
27
24
  accountId: zod_1.z.string(),
28
25
  proxyUrl: zod_1.z.string().nullable().describe('user:pass@host:port'),
29
26
  });
30
- exports.agencyBidSchema = exports.bidSchema.extend({
27
+ exports.agencyBidPayloadSchema = exports.bidPayloadSchema.extend({
31
28
  formData: exports.agencyBidFormDataSchema,
32
29
  });
33
- exports.freelancerBidSchema = exports.bidSchema.extend({
30
+ exports.freelancerBidPayloadSchema = exports.bidPayloadSchema.extend({
34
31
  formData: exports.freelancerBidFormDataSchema,
35
32
  });
@@ -1,14 +1,14 @@
1
- export * from "./lead";
2
- export * from "./saved-search";
3
- export * from "./shared";
4
- export * from "./user";
5
- export * from "./chat-message";
6
- export * from "./job-filters";
7
- export * from "./campaign";
8
- export * from "./ai";
9
- export * from "./bid";
10
- export * from "./scraper";
11
- export * from "./config";
12
- export * from "./logger";
13
- export * from "./account";
14
- export * from "./time-filter";
1
+ export * from './lead';
2
+ export * from './saved-search';
3
+ export * from './shared';
4
+ export * from './user';
5
+ export * from './chat-message';
6
+ export * from './job-filters';
7
+ export * from './campaign';
8
+ export * from './ai';
9
+ export * from './bid';
10
+ export * from './scraper';
11
+ export * from './config';
12
+ export * from './logger';
13
+ export * from './account';
14
+ export * from './time-filter';
@@ -17,20 +17,20 @@ export declare const logEventSchema: z.ZodObject<{
17
17
  source: string;
18
18
  metadata: Record<string, unknown> | null;
19
19
  timestamp: number;
20
- userId: string | null;
21
- campaignId: string | null;
22
20
  resourceType: string;
23
21
  resourceId: string | null;
24
22
  leadId: string | null;
23
+ campaignId: string | null;
24
+ userId: string | null;
25
25
  }, {
26
26
  type: "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "manualSuitabilityAnalyzed" | "manualProposalGenerated" | "biddingSkipped" | "biddingPending" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged";
27
27
  reason: string | null;
28
28
  source: string;
29
29
  metadata: Record<string, unknown> | null;
30
30
  timestamp: number;
31
- userId: string | null;
32
- campaignId: string | null;
33
31
  resourceId: string | null;
34
32
  leadId: string | null;
33
+ campaignId: string | null;
34
+ userId: string | null;
35
35
  resourceType?: string | undefined;
36
36
  }>;
@@ -1,15 +1,15 @@
1
1
  import { z } from 'zod';
2
- import { agencyBidFormDataSchema, agencyBidSchema, bidFormDataSchema, bidSchema, freelancerBidFormDataSchema, freelancerBidSchema } from '../../schemas/bid';
3
- export interface BidFormData extends z.infer<typeof bidFormDataSchema> {
2
+ import { agencyBidFormDataSchema, agencyBidPayloadSchema, bidPayloadProposalDataSchema, bidPayloadSchema, freelancerBidPayloadSchema } from '../../schemas/bid';
3
+ export interface BidPayloadProposalData extends z.infer<typeof bidPayloadProposalDataSchema> {
4
4
  }
5
- export interface FreelancerBidFormData extends z.infer<typeof freelancerBidFormDataSchema> {
5
+ export interface FreelancerBidPayload extends z.infer<typeof freelancerBidPayloadSchema> {
6
6
  }
7
7
  export interface AgencyBidFormData extends z.infer<typeof agencyBidFormDataSchema> {
8
8
  }
9
- export interface Bid extends z.infer<typeof bidSchema> {
10
- formData: BidFormData;
9
+ export interface BidPayload extends z.infer<typeof bidPayloadSchema> {
10
+ formData: BidPayloadProposalData;
11
11
  }
12
- export interface AgencyBid extends z.infer<typeof agencyBidSchema> {
12
+ export interface AgencyBidPayload extends z.infer<typeof agencyBidPayloadSchema> {
13
13
  }
14
- export interface FreelancerBid extends z.infer<typeof freelancerBidSchema> {
14
+ export interface FreelancerBidPayload extends z.infer<typeof freelancerBidPayloadSchema> {
15
15
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "lancer-shared",
4
- "version": "1.0.129",
4
+ "version": "1.0.131",
5
5
  "description": "This package contains shared stuff.",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.js",