lancer-shared 1.0.131 → 1.0.133
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/account/bidder-account.d.ts +116 -0
- package/dist/schemas/account/bidder-account.js +38 -0
- package/dist/schemas/account/index.d.ts +1 -1
- package/dist/schemas/account/index.js +1 -1
- package/dist/schemas/bid/bid.d.ts +22 -23
- package/dist/schemas/bid/bid.js +5 -5
- package/dist/types/account/bidder-account.d.ts +7 -0
- package/dist/types/account/bidder-account.js +2 -0
- package/dist/types/account/index.d.ts +1 -1
- package/dist/types/account/index.js +1 -1
- package/dist/types/bid/bid.d.ts +7 -14
- package/package.json +1 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const bidderAccountProvider: z.ZodEnum<["user-provided", "lancer-provided"]>;
|
|
3
|
+
export declare const bidderAccountSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
provider: z.ZodEnum<["user-provided", "lancer-provided"]>;
|
|
6
|
+
email: z.ZodString;
|
|
7
|
+
password: z.ZodString;
|
|
8
|
+
cookies: z.ZodNullable<z.ZodArray<z.ZodAny, "many">>;
|
|
9
|
+
proxy: z.ZodString;
|
|
10
|
+
status: z.ZodEnum<["verification_required", "shadow_banned", "healthy", "banned", "suspended"]>;
|
|
11
|
+
verified: z.ZodBoolean;
|
|
12
|
+
isActive: z.ZodBoolean;
|
|
13
|
+
assignedOrganizations: z.ZodArray<z.ZodString, "many">;
|
|
14
|
+
lastUsed: z.ZodNullable<z.ZodNumber>;
|
|
15
|
+
createdAt: z.ZodNumber;
|
|
16
|
+
updatedAt: z.ZodNumber;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
id: string;
|
|
19
|
+
email: string;
|
|
20
|
+
status: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned";
|
|
21
|
+
createdAt: number;
|
|
22
|
+
updatedAt: number;
|
|
23
|
+
cookies: any[] | null;
|
|
24
|
+
password: string;
|
|
25
|
+
isActive: boolean;
|
|
26
|
+
provider: "user-provided" | "lancer-provided";
|
|
27
|
+
proxy: string;
|
|
28
|
+
verified: boolean;
|
|
29
|
+
assignedOrganizations: string[];
|
|
30
|
+
lastUsed: number | null;
|
|
31
|
+
}, {
|
|
32
|
+
id: string;
|
|
33
|
+
email: string;
|
|
34
|
+
status: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned";
|
|
35
|
+
createdAt: number;
|
|
36
|
+
updatedAt: number;
|
|
37
|
+
cookies: any[] | null;
|
|
38
|
+
password: string;
|
|
39
|
+
isActive: boolean;
|
|
40
|
+
provider: "user-provided" | "lancer-provided";
|
|
41
|
+
proxy: string;
|
|
42
|
+
verified: boolean;
|
|
43
|
+
assignedOrganizations: string[];
|
|
44
|
+
lastUsed: number | null;
|
|
45
|
+
}>;
|
|
46
|
+
export declare const createBidderAccountSchema: z.ZodObject<Pick<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
provider: z.ZodEnum<["user-provided", "lancer-provided"]>;
|
|
49
|
+
email: z.ZodString;
|
|
50
|
+
password: z.ZodString;
|
|
51
|
+
cookies: z.ZodNullable<z.ZodArray<z.ZodAny, "many">>;
|
|
52
|
+
proxy: z.ZodString;
|
|
53
|
+
status: z.ZodEnum<["verification_required", "shadow_banned", "healthy", "banned", "suspended"]>;
|
|
54
|
+
verified: z.ZodBoolean;
|
|
55
|
+
isActive: z.ZodBoolean;
|
|
56
|
+
assignedOrganizations: z.ZodArray<z.ZodString, "many">;
|
|
57
|
+
lastUsed: z.ZodNullable<z.ZodNumber>;
|
|
58
|
+
createdAt: z.ZodNumber;
|
|
59
|
+
updatedAt: z.ZodNumber;
|
|
60
|
+
}, "email" | "status" | "password" | "isActive" | "provider" | "proxy" | "verified">, "strip", z.ZodTypeAny, {
|
|
61
|
+
email: string;
|
|
62
|
+
status: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned";
|
|
63
|
+
password: string;
|
|
64
|
+
isActive: boolean;
|
|
65
|
+
provider: "user-provided" | "lancer-provided";
|
|
66
|
+
proxy: string;
|
|
67
|
+
verified: boolean;
|
|
68
|
+
}, {
|
|
69
|
+
email: string;
|
|
70
|
+
status: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned";
|
|
71
|
+
password: string;
|
|
72
|
+
isActive: boolean;
|
|
73
|
+
provider: "user-provided" | "lancer-provided";
|
|
74
|
+
proxy: string;
|
|
75
|
+
verified: boolean;
|
|
76
|
+
}>;
|
|
77
|
+
export declare const updateBidderAccountSchema: z.ZodObject<{
|
|
78
|
+
email: z.ZodOptional<z.ZodString>;
|
|
79
|
+
status: z.ZodOptional<z.ZodEnum<["verification_required", "shadow_banned", "healthy", "banned", "suspended"]>>;
|
|
80
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
cookies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodAny, "many">>>;
|
|
83
|
+
password: z.ZodOptional<z.ZodString>;
|
|
84
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
provider: z.ZodOptional<z.ZodEnum<["user-provided", "lancer-provided"]>>;
|
|
86
|
+
proxy: z.ZodOptional<z.ZodString>;
|
|
87
|
+
verified: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
assignedOrganizations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
89
|
+
lastUsed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
email?: string | undefined;
|
|
92
|
+
status?: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned" | undefined;
|
|
93
|
+
createdAt?: number | undefined;
|
|
94
|
+
updatedAt?: number | undefined;
|
|
95
|
+
cookies?: any[] | null | undefined;
|
|
96
|
+
password?: string | undefined;
|
|
97
|
+
isActive?: boolean | undefined;
|
|
98
|
+
provider?: "user-provided" | "lancer-provided" | undefined;
|
|
99
|
+
proxy?: string | undefined;
|
|
100
|
+
verified?: boolean | undefined;
|
|
101
|
+
assignedOrganizations?: string[] | undefined;
|
|
102
|
+
lastUsed?: number | null | undefined;
|
|
103
|
+
}, {
|
|
104
|
+
email?: string | undefined;
|
|
105
|
+
status?: "suspended" | "verification_required" | "shadow_banned" | "healthy" | "banned" | undefined;
|
|
106
|
+
createdAt?: number | undefined;
|
|
107
|
+
updatedAt?: number | undefined;
|
|
108
|
+
cookies?: any[] | null | undefined;
|
|
109
|
+
password?: string | undefined;
|
|
110
|
+
isActive?: boolean | undefined;
|
|
111
|
+
provider?: "user-provided" | "lancer-provided" | undefined;
|
|
112
|
+
proxy?: string | undefined;
|
|
113
|
+
verified?: boolean | undefined;
|
|
114
|
+
assignedOrganizations?: string[] | undefined;
|
|
115
|
+
lastUsed?: number | null | undefined;
|
|
116
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateBidderAccountSchema = exports.createBidderAccountSchema = exports.bidderAccountSchema = exports.bidderAccountProvider = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const account_status_1 = require("./account-status");
|
|
6
|
+
exports.bidderAccountProvider = zod_1.z.enum([
|
|
7
|
+
'user-provided',
|
|
8
|
+
'lancer-provided',
|
|
9
|
+
]);
|
|
10
|
+
exports.bidderAccountSchema = zod_1.z.object({
|
|
11
|
+
id: zod_1.z.string(),
|
|
12
|
+
provider: exports.bidderAccountProvider,
|
|
13
|
+
email: zod_1.z.string().email(),
|
|
14
|
+
password: zod_1.z.string(),
|
|
15
|
+
cookies: zod_1.z.array(zod_1.z.any()).nullable(),
|
|
16
|
+
proxy: zod_1.z.string(),
|
|
17
|
+
status: account_status_1.accountStatusSchema,
|
|
18
|
+
verified: zod_1.z.boolean(),
|
|
19
|
+
isActive: zod_1.z.boolean(),
|
|
20
|
+
assignedOrganizations: zod_1.z.array(zod_1.z.string()),
|
|
21
|
+
lastUsed: zod_1.z.number().nullable(),
|
|
22
|
+
createdAt: zod_1.z.number(),
|
|
23
|
+
updatedAt: zod_1.z.number(),
|
|
24
|
+
});
|
|
25
|
+
exports.createBidderAccountSchema = exports.bidderAccountSchema.pick({
|
|
26
|
+
email: true,
|
|
27
|
+
password: true,
|
|
28
|
+
provider: true,
|
|
29
|
+
proxy: true,
|
|
30
|
+
status: true,
|
|
31
|
+
verified: true,
|
|
32
|
+
isActive: true,
|
|
33
|
+
});
|
|
34
|
+
exports.updateBidderAccountSchema = exports.bidderAccountSchema
|
|
35
|
+
.omit({
|
|
36
|
+
id: true,
|
|
37
|
+
})
|
|
38
|
+
.partial();
|
|
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./account-status"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./bidder-account"), exports);
|
|
19
19
|
__exportStar(require("./scraper-account"), exports);
|
|
@@ -33,7 +33,7 @@ export declare const bidPayloadProposalDataSchema: z.ZodObject<{
|
|
|
33
33
|
maximumBoost: number | null;
|
|
34
34
|
minimumBoost: number | null;
|
|
35
35
|
}>;
|
|
36
|
-
export declare const
|
|
36
|
+
export declare const freelancerBidProposalDataSchema: z.ZodObject<{
|
|
37
37
|
coverLetter: z.ZodString;
|
|
38
38
|
questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
39
39
|
question: z.ZodString;
|
|
@@ -67,8 +67,7 @@ export declare const freelancerBidFormDataSchema: z.ZodObject<{
|
|
|
67
67
|
maximumBoost: number | null;
|
|
68
68
|
minimumBoost: number | null;
|
|
69
69
|
}>;
|
|
70
|
-
export
|
|
71
|
-
export declare const agencyBidFormDataSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
70
|
+
export declare const agencyBidProposalDataSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
72
71
|
coverLetter: z.ZodString;
|
|
73
72
|
questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
74
73
|
question: z.ZodString;
|
|
@@ -142,7 +141,7 @@ export declare const agencyBidPayloadSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
142
141
|
accountId: z.ZodString;
|
|
143
142
|
proxyUrl: z.ZodNullable<z.ZodString>;
|
|
144
143
|
}, {
|
|
145
|
-
|
|
144
|
+
proposalData: z.ZodObject<z.objectUtil.extendShape<{
|
|
146
145
|
coverLetter: z.ZodString;
|
|
147
146
|
questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
148
147
|
question: z.ZodString;
|
|
@@ -187,7 +186,13 @@ export declare const agencyBidPayloadSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
187
186
|
specializedProfile: string | null;
|
|
188
187
|
}>;
|
|
189
188
|
}>, "strip", z.ZodTypeAny, {
|
|
190
|
-
|
|
189
|
+
username: string;
|
|
190
|
+
cookies: any[];
|
|
191
|
+
password: string;
|
|
192
|
+
jobUrl: string;
|
|
193
|
+
accountId: string;
|
|
194
|
+
proxyUrl: string | null;
|
|
195
|
+
proposalData: {
|
|
191
196
|
coverLetter: string;
|
|
192
197
|
questionAnswerPairs: {
|
|
193
198
|
answer: string;
|
|
@@ -200,14 +205,14 @@ export declare const agencyBidPayloadSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
200
205
|
contractorName: string;
|
|
201
206
|
specializedProfile: string | null;
|
|
202
207
|
};
|
|
208
|
+
}, {
|
|
203
209
|
username: string;
|
|
204
210
|
cookies: any[];
|
|
205
211
|
password: string;
|
|
206
212
|
jobUrl: string;
|
|
207
213
|
accountId: string;
|
|
208
214
|
proxyUrl: string | null;
|
|
209
|
-
|
|
210
|
-
formData: {
|
|
215
|
+
proposalData: {
|
|
211
216
|
coverLetter: string;
|
|
212
217
|
questionAnswerPairs: {
|
|
213
218
|
answer: string;
|
|
@@ -220,12 +225,6 @@ export declare const agencyBidPayloadSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
220
225
|
contractorName: string;
|
|
221
226
|
specializedProfile: string | null;
|
|
222
227
|
};
|
|
223
|
-
username: string;
|
|
224
|
-
cookies: any[];
|
|
225
|
-
password: string;
|
|
226
|
-
jobUrl: string;
|
|
227
|
-
accountId: string;
|
|
228
|
-
proxyUrl: string | null;
|
|
229
228
|
}>;
|
|
230
229
|
export declare const freelancerBidPayloadSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
231
230
|
jobUrl: z.ZodString;
|
|
@@ -235,7 +234,7 @@ export declare const freelancerBidPayloadSchema: z.ZodObject<z.objectUtil.extend
|
|
|
235
234
|
accountId: z.ZodString;
|
|
236
235
|
proxyUrl: z.ZodNullable<z.ZodString>;
|
|
237
236
|
}, {
|
|
238
|
-
|
|
237
|
+
proposalData: z.ZodObject<{
|
|
239
238
|
coverLetter: z.ZodString;
|
|
240
239
|
questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
241
240
|
question: z.ZodString;
|
|
@@ -270,7 +269,13 @@ export declare const freelancerBidPayloadSchema: z.ZodObject<z.objectUtil.extend
|
|
|
270
269
|
minimumBoost: number | null;
|
|
271
270
|
}>;
|
|
272
271
|
}>, "strip", z.ZodTypeAny, {
|
|
273
|
-
|
|
272
|
+
username: string;
|
|
273
|
+
cookies: any[];
|
|
274
|
+
password: string;
|
|
275
|
+
jobUrl: string;
|
|
276
|
+
accountId: string;
|
|
277
|
+
proxyUrl: string | null;
|
|
278
|
+
proposalData: {
|
|
274
279
|
coverLetter: string;
|
|
275
280
|
questionAnswerPairs: {
|
|
276
281
|
answer: string;
|
|
@@ -280,14 +285,14 @@ export declare const freelancerBidPayloadSchema: z.ZodObject<z.objectUtil.extend
|
|
|
280
285
|
maximumBoost: number | null;
|
|
281
286
|
minimumBoost: number | null;
|
|
282
287
|
};
|
|
288
|
+
}, {
|
|
283
289
|
username: string;
|
|
284
290
|
cookies: any[];
|
|
285
291
|
password: string;
|
|
286
292
|
jobUrl: string;
|
|
287
293
|
accountId: string;
|
|
288
294
|
proxyUrl: string | null;
|
|
289
|
-
|
|
290
|
-
formData: {
|
|
295
|
+
proposalData: {
|
|
291
296
|
coverLetter: string;
|
|
292
297
|
questionAnswerPairs: {
|
|
293
298
|
answer: string;
|
|
@@ -297,10 +302,4 @@ export declare const freelancerBidPayloadSchema: z.ZodObject<z.objectUtil.extend
|
|
|
297
302
|
maximumBoost: number | null;
|
|
298
303
|
minimumBoost: number | null;
|
|
299
304
|
};
|
|
300
|
-
username: string;
|
|
301
|
-
cookies: any[];
|
|
302
|
-
password: string;
|
|
303
|
-
jobUrl: string;
|
|
304
|
-
accountId: string;
|
|
305
|
-
proxyUrl: string | null;
|
|
306
305
|
}>;
|
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.
|
|
3
|
+
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({
|
|
@@ -10,8 +10,8 @@ exports.bidPayloadProposalDataSchema = zod_1.z.object({
|
|
|
10
10
|
minimumBoost: zod_1.z.number().nullable(),
|
|
11
11
|
maximumBoost: zod_1.z.number().nullable(),
|
|
12
12
|
});
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
13
|
+
exports.freelancerBidProposalDataSchema = exports.bidPayloadProposalDataSchema;
|
|
14
|
+
exports.agencyBidProposalDataSchema = 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(),
|
|
@@ -25,8 +25,8 @@ exports.bidPayloadSchema = zod_1.z.object({
|
|
|
25
25
|
proxyUrl: zod_1.z.string().nullable().describe('user:pass@host:port'),
|
|
26
26
|
});
|
|
27
27
|
exports.agencyBidPayloadSchema = exports.bidPayloadSchema.extend({
|
|
28
|
-
|
|
28
|
+
proposalData: exports.agencyBidProposalDataSchema,
|
|
29
29
|
});
|
|
30
30
|
exports.freelancerBidPayloadSchema = exports.bidPayloadSchema.extend({
|
|
31
|
-
|
|
31
|
+
proposalData: exports.freelancerBidProposalDataSchema,
|
|
32
32
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createBidderAccountSchema, updateBidderAccountSchema, bidderAccountProvider, bidderAccountSchema } from '../../schemas';
|
|
3
|
+
export interface BidderAccount extends z.infer<typeof bidderAccountSchema> {
|
|
4
|
+
}
|
|
5
|
+
export type BidderAccountProvider = z.infer<typeof bidderAccountProvider>;
|
|
6
|
+
export type CreateBidderAccount = z.infer<typeof createBidderAccountSchema>;
|
|
7
|
+
export type UpdateBidderAccount = z.infer<typeof updateBidderAccountSchema>;
|
|
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./account-status"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./bidder-account"), exports);
|
|
19
19
|
__exportStar(require("./scraper-account"), exports);
|
package/dist/types/bid/bid.d.ts
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
export interface BidPayload extends z.infer<typeof bidPayloadSchema> {
|
|
10
|
-
formData: BidPayloadProposalData;
|
|
11
|
-
}
|
|
12
|
-
export interface AgencyBidPayload extends z.infer<typeof agencyBidPayloadSchema> {
|
|
13
|
-
}
|
|
14
|
-
export interface FreelancerBidPayload extends z.infer<typeof freelancerBidPayloadSchema> {
|
|
15
|
-
}
|
|
2
|
+
import { agencyBidPayloadSchema, agencyBidProposalDataSchema, bidPayloadProposalDataSchema, bidPayloadSchema, freelancerBidPayloadSchema, freelancerBidProposalDataSchema } from '../../schemas/bid';
|
|
3
|
+
export type BidPayload = z.infer<typeof bidPayloadSchema>;
|
|
4
|
+
export type BidProposalData = z.infer<typeof bidPayloadProposalDataSchema>;
|
|
5
|
+
export type AgencyBidPayload = z.infer<typeof agencyBidPayloadSchema>;
|
|
6
|
+
export type FreelancerBidPayload = z.infer<typeof freelancerBidPayloadSchema>;
|
|
7
|
+
export type AgencyBidProposalData = z.infer<typeof agencyBidProposalDataSchema>;
|
|
8
|
+
export type FreelancerBidProposalData = z.infer<typeof freelancerBidProposalDataSchema>;
|