lancer-shared 1.0.139 → 1.0.141
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.
- package/dist/schemas/bid/bid.d.ts +13 -0
- package/dist/schemas/bid/bid.js +6 -1
- package/dist/schemas/logger/log-event.d.ts +4 -4
- package/dist/schemas/organization/organization.d.ts +5 -0
- package/dist/schemas/organization/organization.js +3 -1
- package/dist/types/bid/bid.d.ts +2 -1
- package/package.json +1 -1
|
@@ -303,3 +303,16 @@ export declare const freelancerBidPayloadSchema: z.ZodObject<z.objectUtil.extend
|
|
|
303
303
|
minimumBoost: number | null;
|
|
304
304
|
};
|
|
305
305
|
}>;
|
|
306
|
+
export declare const bidDtoSchema: z.ZodObject<{
|
|
307
|
+
organizationId: z.ZodString;
|
|
308
|
+
campaignId: z.ZodString;
|
|
309
|
+
leadId: z.ZodString;
|
|
310
|
+
}, "strip", z.ZodTypeAny, {
|
|
311
|
+
organizationId: string;
|
|
312
|
+
campaignId: string;
|
|
313
|
+
leadId: string;
|
|
314
|
+
}, {
|
|
315
|
+
organizationId: string;
|
|
316
|
+
campaignId: string;
|
|
317
|
+
leadId: string;
|
|
318
|
+
}>;
|
package/dist/schemas/bid/bid.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.freelancerBidPayloadSchema = exports.agencyBidPayloadSchema = exports.bidPayloadSchema = exports.agencyBidProposalDataSchema = exports.freelancerBidProposalDataSchema = exports.bidPayloadProposalDataSchema = void 0;
|
|
3
|
+
exports.bidDtoSchema = exports.freelancerBidPayloadSchema = exports.agencyBidPayloadSchema = exports.bidPayloadSchema = exports.agencyBidProposalDataSchema = exports.freelancerBidProposalDataSchema = exports.bidPayloadProposalDataSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const ai_1 = require("../ai");
|
|
6
6
|
exports.bidPayloadProposalDataSchema = zod_1.z.object({
|
|
@@ -30,3 +30,8 @@ exports.agencyBidPayloadSchema = exports.bidPayloadSchema.extend({
|
|
|
30
30
|
exports.freelancerBidPayloadSchema = exports.bidPayloadSchema.extend({
|
|
31
31
|
proposalData: exports.freelancerBidProposalDataSchema,
|
|
32
32
|
});
|
|
33
|
+
exports.bidDtoSchema = zod_1.z.object({
|
|
34
|
+
organizationId: zod_1.z.string(),
|
|
35
|
+
campaignId: zod_1.z.string(),
|
|
36
|
+
leadId: zod_1.z.string(),
|
|
37
|
+
});
|
|
@@ -17,10 +17,10 @@ export declare const logEventSchema: z.ZodObject<{
|
|
|
17
17
|
source: string;
|
|
18
18
|
metadata: Record<string, unknown> | null;
|
|
19
19
|
timestamp: number;
|
|
20
|
+
campaignId: string | null;
|
|
21
|
+
leadId: string | null;
|
|
20
22
|
resourceType: string;
|
|
21
23
|
resourceId: string | null;
|
|
22
|
-
leadId: string | null;
|
|
23
|
-
campaignId: string | null;
|
|
24
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";
|
|
@@ -28,9 +28,9 @@ export declare const logEventSchema: z.ZodObject<{
|
|
|
28
28
|
source: string;
|
|
29
29
|
metadata: Record<string, unknown> | null;
|
|
30
30
|
timestamp: number;
|
|
31
|
-
resourceId: string | null;
|
|
32
|
-
leadId: string | null;
|
|
33
31
|
campaignId: string | null;
|
|
32
|
+
leadId: string | null;
|
|
33
|
+
resourceId: string | null;
|
|
34
34
|
userId: string | null;
|
|
35
35
|
resourceType?: string | undefined;
|
|
36
36
|
}>;
|
|
@@ -15,9 +15,11 @@ export declare const bidConfigSchema: z.ZodObject<{
|
|
|
15
15
|
bidderId: string | null;
|
|
16
16
|
specialisedProfile: string | null;
|
|
17
17
|
}>;
|
|
18
|
+
export declare const organizationTypeSchema: z.ZodEnum<["agency", "freelancer"]>;
|
|
18
19
|
export declare const organizationSchema: z.ZodObject<{
|
|
19
20
|
id: z.ZodString;
|
|
20
21
|
name: z.ZodString;
|
|
22
|
+
type: z.ZodEnum<["agency", "freelancer"]>;
|
|
21
23
|
bidConfig: z.ZodObject<{
|
|
22
24
|
agencyName: z.ZodNullable<z.ZodString>;
|
|
23
25
|
bidderId: z.ZodNullable<z.ZodString>;
|
|
@@ -37,6 +39,7 @@ export declare const organizationSchema: z.ZodObject<{
|
|
|
37
39
|
createdAt: z.ZodDate;
|
|
38
40
|
updatedAt: z.ZodDate;
|
|
39
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
type: "agency" | "freelancer";
|
|
40
43
|
id: string;
|
|
41
44
|
name: string;
|
|
42
45
|
createdAt: Date;
|
|
@@ -48,6 +51,7 @@ export declare const organizationSchema: z.ZodObject<{
|
|
|
48
51
|
specialisedProfile: string | null;
|
|
49
52
|
};
|
|
50
53
|
}, {
|
|
54
|
+
type: "agency" | "freelancer";
|
|
51
55
|
id: string;
|
|
52
56
|
name: string;
|
|
53
57
|
createdAt: Date;
|
|
@@ -63,3 +67,4 @@ export interface Organization extends z.infer<typeof organizationSchema> {
|
|
|
63
67
|
}
|
|
64
68
|
export interface BidConfig extends z.infer<typeof bidConfigSchema> {
|
|
65
69
|
}
|
|
70
|
+
export type OrganizationType = z.infer<typeof organizationTypeSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.organizationSchema = exports.bidConfigSchema = void 0;
|
|
3
|
+
exports.organizationSchema = exports.organizationTypeSchema = exports.bidConfigSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.bidConfigSchema = zod_1.z.object({
|
|
6
6
|
agencyName: zod_1.z.string().nullable(),
|
|
@@ -8,9 +8,11 @@ exports.bidConfigSchema = zod_1.z.object({
|
|
|
8
8
|
contractorName: zod_1.z.string().nullable(),
|
|
9
9
|
specialisedProfile: zod_1.z.string().nullable(),
|
|
10
10
|
});
|
|
11
|
+
exports.organizationTypeSchema = zod_1.z.enum(['agency', 'freelancer']);
|
|
11
12
|
exports.organizationSchema = zod_1.z.object({
|
|
12
13
|
id: zod_1.z.string(),
|
|
13
14
|
name: zod_1.z.string(),
|
|
15
|
+
type: exports.organizationTypeSchema,
|
|
14
16
|
bidConfig: exports.bidConfigSchema,
|
|
15
17
|
createdAt: zod_1.z.date(),
|
|
16
18
|
updatedAt: zod_1.z.date(),
|
package/dist/types/bid/bid.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { agencyBidPayloadSchema, agencyBidProposalDataSchema, bidPayloadProposalDataSchema, bidPayloadSchema, freelancerBidPayloadSchema, freelancerBidProposalDataSchema } from '../../schemas/bid';
|
|
2
|
+
import { agencyBidPayloadSchema, agencyBidProposalDataSchema, bidDtoSchema, bidPayloadProposalDataSchema, bidPayloadSchema, freelancerBidPayloadSchema, freelancerBidProposalDataSchema } from '../../schemas/bid';
|
|
3
3
|
export type BidPayload = z.infer<typeof bidPayloadSchema>;
|
|
4
4
|
export type BidProposalData = z.infer<typeof bidPayloadProposalDataSchema>;
|
|
5
5
|
export type AgencyBidPayload = z.infer<typeof agencyBidPayloadSchema>;
|
|
6
6
|
export type FreelancerBidPayload = z.infer<typeof freelancerBidPayloadSchema>;
|
|
7
7
|
export type AgencyBidProposalData = z.infer<typeof agencyBidProposalDataSchema>;
|
|
8
8
|
export type FreelancerBidProposalData = z.infer<typeof freelancerBidProposalDataSchema>;
|
|
9
|
+
export type BidDto = z.infer<typeof bidDtoSchema>;
|