lancer-shared 1.2.19 → 1.2.21
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/bundle.cjs.js +134 -23
- package/dist/constants/account-status.d.ts +3 -0
- package/dist/constants/account-status.js +17 -0
- package/dist/constants/collections.js +16 -0
- package/dist/constants/common-questions.js +60 -0
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +40 -0
- package/dist/constants/invoice.d.ts +2 -0
- package/dist/constants/job-filter-options.js +268 -0
- package/dist/constants/job-status.js +26 -0
- package/dist/constants/mappings/countryMapping.js +122 -0
- package/dist/constants/mappings/regionMapping.js +242 -0
- package/dist/constants/routes.js +108 -0
- package/dist/constants/upwork-accounts.js +21 -0
- package/dist/index.js +20 -0
- package/dist/schemas/account/account-status.js +11 -0
- package/dist/schemas/account/bidder-account.js +37 -0
- package/dist/schemas/account/index.js +19 -0
- package/dist/schemas/account/manager-account.d.ts +116 -0
- package/dist/schemas/account/manager-account.js +38 -0
- package/dist/schemas/account/scraper-account.js +37 -0
- package/dist/schemas/ai/ai-config.d.ts +36 -0
- package/dist/schemas/ai/ai-config.js +12 -0
- package/dist/schemas/ai/index.d.ts +3 -0
- package/dist/schemas/ai/index.js +19 -0
- package/dist/schemas/ai/proposal.d.ts +82 -0
- package/dist/schemas/ai/proposal.js +16 -0
- package/dist/schemas/ai/suitability.d.ts +37 -0
- package/dist/schemas/ai/suitability.js +17 -0
- package/dist/schemas/bid/bid-result.js +15 -0
- package/dist/schemas/bid/bid.js +36 -0
- package/dist/schemas/bid/index.js +18 -0
- package/dist/schemas/bidding/index.d.ts +1 -0
- package/dist/schemas/bidding/index.js +17 -0
- package/dist/schemas/bidding/proposal-bidding-status.d.ts +26 -0
- package/dist/schemas/bidding/proposal-bidding-status.js +18 -0
- package/dist/schemas/campaign/campaign-ai-metrics.js +9 -0
- package/dist/schemas/campaign/campaign-analytics.d.ts +2621 -38
- package/dist/schemas/campaign/campaign-analytics.js +41 -0
- package/dist/schemas/campaign/campaign-expenses.js +9 -0
- package/dist/schemas/campaign/campaign-insights.js +31 -0
- package/dist/schemas/campaign/campaign-integrations.js +16 -0
- package/dist/schemas/campaign/campaign-job-count.js +6 -0
- package/dist/schemas/campaign/campaign.js +44 -0
- package/dist/schemas/campaign/index.js +23 -0
- package/dist/schemas/chat-message/chat-message.js +13 -0
- package/dist/schemas/chat-message/index.js +17 -0
- package/dist/schemas/config/agency-config.js +10 -0
- package/dist/schemas/config/index.js +17 -0
- package/dist/schemas/index.js +32 -0
- package/dist/schemas/invoice/index.d.ts +8 -0
- package/dist/schemas/job/index.js +19 -0
- package/dist/schemas/job/job-details.d.ts +335 -0
- package/dist/schemas/job/job-details.js +29 -0
- package/dist/schemas/job/job-note.d.ts +83 -0
- package/dist/schemas/job/job-note.js +30 -0
- package/dist/schemas/job/job-status.d.ts +3 -0
- package/dist/schemas/job/job-status.js +27 -0
- package/dist/schemas/job/job.d.ts +1160 -0
- package/dist/schemas/job/job.js +90 -0
- package/dist/schemas/job/pipeline-job.d.ts +602 -0
- package/dist/schemas/job/pipeline-job.js +42 -0
- package/dist/schemas/job/upwork-job.d.ts +334 -0
- package/dist/schemas/job/upwork-job.js +60 -0
- package/dist/schemas/job-filters/index.js +17 -0
- package/dist/schemas/job-filters/job-filters.js +87 -0
- package/dist/schemas/lead/index.js +19 -0
- package/dist/schemas/lead/lead-note.js +30 -0
- package/dist/schemas/lead/lead-status.d.ts +23 -0
- package/dist/schemas/lead/lead-status.js +26 -0
- package/dist/schemas/lead/lead.d.ts +1897 -0
- package/dist/schemas/lead/lead.js +143 -0
- package/dist/schemas/logger/index.js +17 -0
- package/dist/schemas/logger/log-event.d.ts +13 -10
- package/dist/schemas/logger/log-event.js +66 -0
- package/dist/schemas/organization/index.d.ts +68 -1
- package/dist/schemas/organization/index.js +17 -0
- package/dist/schemas/organization/organization.d.ts +13 -87
- package/dist/schemas/organization/organization.js +19 -0
- package/dist/schemas/organization/subscription.d.ts +47 -0
- package/dist/schemas/plan/index.d.ts +36 -3
- package/dist/schemas/proxy/index.js +17 -0
- package/dist/schemas/proxy/proxy.js +21 -0
- package/dist/schemas/saved-search/index.js +12 -0
- package/dist/schemas/scraper/index.js +18 -0
- package/dist/schemas/scraper/scrape-payload.d.ts +49 -0
- package/dist/schemas/scraper/scrape-payload.js +16 -0
- package/dist/schemas/scraper/scrape-result.js +23 -0
- package/dist/schemas/shared.js +16 -0
- package/dist/schemas/time-filter/index.js +9 -0
- package/dist/schemas/upwork-account/index.d.ts +3 -0
- package/dist/schemas/upwork-account/index.js +19 -0
- package/dist/schemas/upwork-account/upwork-account-status.d.ts +2 -0
- package/dist/schemas/upwork-account/upwork-account-status.js +11 -0
- package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +95 -0
- package/dist/schemas/upwork-account/upwork-business-manager-account.js +35 -0
- package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
- package/dist/schemas/upwork-account/upwork-scraping-account.js +29 -0
- package/dist/schemas/user/index.js +55 -0
- package/dist/types/account/account-status.js +2 -0
- package/dist/types/account/bidder-account.js +2 -0
- package/dist/types/account/index.js +19 -0
- package/dist/types/account/manager-account.d.ts +7 -0
- package/dist/types/account/manager-account.js +2 -0
- package/dist/types/account/scraper-account.js +2 -0
- package/dist/types/ai/ai-config.d.ts +6 -0
- package/dist/types/ai/ai-config.js +2 -0
- package/dist/types/ai/index.d.ts +3 -0
- package/dist/types/ai/index.js +19 -0
- package/dist/types/ai/proposal.d.ts +10 -0
- package/dist/types/ai/proposal.js +2 -0
- package/dist/types/ai/suitability.d.ts +6 -0
- package/dist/types/ai/suitability.js +2 -0
- package/dist/types/bid/bid-result.js +2 -0
- package/dist/types/bid/bid.js +2 -0
- package/dist/types/bid/index.js +18 -0
- package/dist/types/bidding/index.d.ts +1 -0
- package/dist/types/bidding/index.js +17 -0
- package/dist/types/bidding/proposal-bidding-status.d.ts +3 -0
- package/dist/types/bidding/proposal-bidding-status.js +2 -0
- package/dist/types/campaign/campaign-analytics.js +2 -0
- package/dist/types/campaign/campaign-expenses.js +2 -0
- package/dist/types/campaign/campaign-insights.js +2 -0
- package/dist/types/campaign/campaign-integrations.js +2 -0
- package/dist/types/campaign/campaign-job-count.js +2 -0
- package/dist/types/campaign/campaign.js +2 -0
- package/dist/types/campaign/index.js +22 -0
- package/dist/types/chat-message/chat-message.js +2 -0
- package/dist/types/chat-message/index.js +17 -0
- package/dist/types/config/agency-config.js +2 -0
- package/dist/types/config/index.js +17 -0
- package/dist/types/index.js +29 -0
- package/dist/types/job/index.js +19 -0
- package/dist/types/job/job-details.d.ts +36 -0
- package/dist/types/job/job-details.js +2 -0
- package/dist/types/job/job-note.js +2 -0
- package/dist/types/job/job-status.js +12 -0
- package/dist/types/job/job.d.ts +36 -0
- package/dist/types/job/job.js +2 -0
- package/dist/types/job-filters/index.js +17 -0
- package/dist/types/job-filters/job-filters.js +2 -0
- package/dist/types/logger/index.js +17 -0
- package/dist/types/logger/log-event.js +2 -0
- package/dist/types/saved-search/index.js +2 -0
- package/dist/types/scraper/index.js +18 -0
- package/dist/types/scraper/scrape-payload.js +2 -0
- package/dist/types/scraper/scrape-result.js +2 -0
- package/dist/types/time-filter/index.js +2 -0
- package/dist/types/upwork-account/index.d.ts +3 -0
- package/dist/types/upwork-account/index.js +19 -0
- package/dist/types/upwork-account/upwork-account-status.d.ts +3 -0
- package/dist/types/upwork-account/upwork-account-status.js +2 -0
- package/dist/types/upwork-account/upwork-business-manager-account.d.ts +7 -0
- package/dist/types/upwork-account/upwork-business-manager-account.js +2 -0
- package/dist/types/upwork-account/upwork-scraping-account.d.ts +5 -0
- package/dist/types/upwork-account/upwork-scraping-account.js +2 -0
- package/dist/types/user/index.js +2 -0
- package/dist/utils/index.js +17 -0
- package/dist/utils/try-catch.js +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildRoute = exports.ROUTES = void 0;
|
|
4
|
+
exports.ROUTES = {
|
|
5
|
+
AUTH: {
|
|
6
|
+
BASE: 'auth',
|
|
7
|
+
REGISTER: 'auth/register',
|
|
8
|
+
},
|
|
9
|
+
EVENTS: {
|
|
10
|
+
BASE: 'events',
|
|
11
|
+
BY_ID: (id) => `events/${id}`,
|
|
12
|
+
},
|
|
13
|
+
CAMPAIGNS: {
|
|
14
|
+
BASE: 'campaigns',
|
|
15
|
+
BY_ID: (id) => `campaigns/${id}`,
|
|
16
|
+
LEADS: {
|
|
17
|
+
BASE: (campaignId) => `campaigns/${campaignId}/leads`,
|
|
18
|
+
BY_ID: (campaignId, leadId) => `campaigns/${campaignId}/leads/${leadId}`,
|
|
19
|
+
SYNC: (campaignId) => `campaigns/${campaignId}/leads/sync`,
|
|
20
|
+
NOTES: (campaignId, leadId, noteId) => `campaigns/${campaignId}/leads/${leadId}/notes/${noteId}`,
|
|
21
|
+
SEARCH: (campaignId) => `campaigns/${campaignId}/leads/search`,
|
|
22
|
+
},
|
|
23
|
+
INSIGHTS: (campaignId) => `campaigns/${campaignId}/insights`,
|
|
24
|
+
AI_METRICS: (campaignId) => `campaigns/${campaignId}/ai-metrics`,
|
|
25
|
+
CONNECT_SAVED: (campaignId) => `campaigns/${campaignId}/get-connects-saved`,
|
|
26
|
+
ANALYTICS: (campaignId, timeFilter) => `campaigns/${campaignId}/analytics?createdAt=${timeFilter}`,
|
|
27
|
+
ACTIVITY: (campaignId, status, offset, limit) => `campaigns/${campaignId}/activity?status=${status}&offset=${offset}&limit=${limit}`,
|
|
28
|
+
INTEGRATIONS: {
|
|
29
|
+
BASE: (campaignId) => `campaigns/${campaignId}/integrations`,
|
|
30
|
+
TEST_SUITABILITY_WEBHOOK: (campaignId, integrationId) => `campaigns/${campaignId}/integrations/${integrationId}/suitability/test-webhook`,
|
|
31
|
+
TEST_PROPOSAL_WEBHOOK: (campaignId, integrationId) => `campaigns/${campaignId}/integrations/${integrationId}/proposal/test-webhook`,
|
|
32
|
+
SUITABILITY_NOTIFICATION: (campaignId, leadId) => `campaigns/${campaignId}/integrations/suitability/notify/${leadId}`,
|
|
33
|
+
PROPOSAL_SENT_NOTIFICATION: (campaignId, leadId) => `campaigns/${campaignId}/integrations/proposal-sent/notify/${leadId}`,
|
|
34
|
+
SLACK: {
|
|
35
|
+
BASE: (campaignId) => `campaigns/${campaignId}/integrations/slack`,
|
|
36
|
+
TEST_SUITABILITY_WEBHOOK: (campaignId) => `campaigns/${campaignId}/integrations/slack/suitability/test-webhook`,
|
|
37
|
+
TEST_PROPOSAL_WEBHOOK: (campaignId) => `campaigns/${campaignId}/integrations/slack/proposal/test-webhook`,
|
|
38
|
+
},
|
|
39
|
+
DISCORD: {
|
|
40
|
+
BASE: (campaignId) => `campaigns/${campaignId}/integrations/discord`,
|
|
41
|
+
TEST_SUITABILITY_WEBHOOK: (campaignId) => `campaigns/${campaignId}/integrations/discord/suitability/test-webhook`,
|
|
42
|
+
TEST_PROPOSAL_WEBHOOK: (campaignId) => `campaigns/${campaignId}/integrations/discord/proposal/test-webhook`,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
JOBS: {
|
|
47
|
+
BASE: 'jobs',
|
|
48
|
+
BY_ID: (id) => `jobs/${id}`,
|
|
49
|
+
IMPORT: 'jobs/import',
|
|
50
|
+
FILTER_OPTIONS: 'jobs/filter-options',
|
|
51
|
+
TOTAL_JOBS: 'jobs/total-jobs',
|
|
52
|
+
GET_JOB_TITLE: (jobId) => `jobs/get-job-title/${jobId}`,
|
|
53
|
+
SEARCH: 'jobs/search',
|
|
54
|
+
},
|
|
55
|
+
USERS: {
|
|
56
|
+
BASE: 'users',
|
|
57
|
+
BY_ID: (id) => `users/${id}`,
|
|
58
|
+
},
|
|
59
|
+
AI_CONFIG: {
|
|
60
|
+
BASE: 'ai-config',
|
|
61
|
+
GENERATE_KNOWLEDGE_BASE: 'ai-config/generate-knowledge-base',
|
|
62
|
+
},
|
|
63
|
+
COOKIES: {
|
|
64
|
+
BASE: 'cookies',
|
|
65
|
+
SCRAPE: 'cookies/scrape-cookies',
|
|
66
|
+
},
|
|
67
|
+
SCRAPING: {
|
|
68
|
+
BASE: 'scraping',
|
|
69
|
+
START_SCRAPING: 'scraping/start',
|
|
70
|
+
START_WORLDWIDE_SCRAPING: 'scraping/start-worldwide',
|
|
71
|
+
START_US_SCRAPING: 'scraping/start-us',
|
|
72
|
+
START_UK_SCRAPING: 'scraping/start-uk',
|
|
73
|
+
UPDATE_ACTIVITY_4H_WORLDWIDE: 'scraping/update-activity/4h',
|
|
74
|
+
UPDATE_ACTIVITY_4H_UK: 'scraping/update-activity/4h/uk',
|
|
75
|
+
UPDATE_ACTIVITY_4H_US: 'scraping/update-activity/4h/us',
|
|
76
|
+
UPDATE_ACTIVITY_24H_WORLDWIDE: 'scraping/update-activity/24h',
|
|
77
|
+
UPDATE_ACTIVITY_24H_UK: 'scraping/update-activity/24h/uk',
|
|
78
|
+
UPDATE_ACTIVITY_24H_US: 'scraping/update-activity/24h/us',
|
|
79
|
+
},
|
|
80
|
+
ADMIN: {
|
|
81
|
+
BASE: 'admin',
|
|
82
|
+
BIDDER_ACCOUNTS: {
|
|
83
|
+
BASE: 'admin/bidder-accounts',
|
|
84
|
+
BY_ID: (id) => `admin/bidder-accounts/${id}`,
|
|
85
|
+
BY_PROVIDER: (provider) => `admin/bidder-accounts/${provider}`,
|
|
86
|
+
BY_PROVIDER_AND_ID: (provider, id) => `admin/bidder-accounts/${provider}/${id}`,
|
|
87
|
+
},
|
|
88
|
+
SCRAPER_ACCOUNTS: {
|
|
89
|
+
BASE: 'admin/scraper-accounts',
|
|
90
|
+
BY_ID: (id) => `admin/scraper-accounts/${id}`,
|
|
91
|
+
BY_PROVIDER: (provider) => `admin/scraper-accounts/${provider}`,
|
|
92
|
+
BY_PROVIDER_AND_ID: (provider, id) => `admin/scraper-accounts/${provider}/${id}`,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
BID: {
|
|
96
|
+
BASE: 'bid',
|
|
97
|
+
BID_ON_JOB: (userId, campaignId, leadId) => `bid/${userId}/${campaignId}/${leadId}`,
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
// Helper function to build route with parameters
|
|
101
|
+
const buildRoute = (route, params = {}) => {
|
|
102
|
+
let builtRoute = route;
|
|
103
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
104
|
+
builtRoute = builtRoute.replace(`:${key}`, value);
|
|
105
|
+
});
|
|
106
|
+
return builtRoute;
|
|
107
|
+
};
|
|
108
|
+
exports.buildRoute = buildRoute;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bidderAccountProviderDisplayMap = exports.accountStatusDisplayMap = exports.accountStatusOrder = void 0;
|
|
4
|
+
exports.accountStatusOrder = [
|
|
5
|
+
'verification_required',
|
|
6
|
+
'shadow_banned',
|
|
7
|
+
'healthy',
|
|
8
|
+
'banned',
|
|
9
|
+
'suspended',
|
|
10
|
+
];
|
|
11
|
+
exports.accountStatusDisplayMap = {
|
|
12
|
+
verification_required: 'Verification Required',
|
|
13
|
+
shadow_banned: 'Shadow Banned',
|
|
14
|
+
healthy: 'Healthy',
|
|
15
|
+
banned: 'Banned',
|
|
16
|
+
suspended: 'Suspended',
|
|
17
|
+
};
|
|
18
|
+
exports.bidderAccountProviderDisplayMap = {
|
|
19
|
+
'lancer-provided': 'Lancer Provided',
|
|
20
|
+
'user-provided': 'User Provided',
|
|
21
|
+
};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schemas"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
__exportStar(require("./constants"), exports);
|
|
20
|
+
__exportStar(require("./utils"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.accountStatusSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.accountStatusSchema = zod_1.z.enum([
|
|
6
|
+
'verification_required',
|
|
7
|
+
'shadow_banned',
|
|
8
|
+
'healthy',
|
|
9
|
+
'banned',
|
|
10
|
+
'suspended',
|
|
11
|
+
]);
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
status: account_status_1.accountStatusSchema,
|
|
17
|
+
verified: zod_1.z.boolean(),
|
|
18
|
+
isActive: zod_1.z.boolean(),
|
|
19
|
+
assignedOrganizations: zod_1.z.array(zod_1.z.string()),
|
|
20
|
+
lastUsed: zod_1.z.number().nullable(),
|
|
21
|
+
multiLoginProfileId: zod_1.z.string().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
|
+
status: true,
|
|
30
|
+
verified: true,
|
|
31
|
+
isActive: true,
|
|
32
|
+
});
|
|
33
|
+
exports.updateBidderAccountSchema = exports.bidderAccountSchema
|
|
34
|
+
.omit({
|
|
35
|
+
id: true,
|
|
36
|
+
})
|
|
37
|
+
.partial();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./account-status"), exports);
|
|
18
|
+
__exportStar(require("./bidder-account"), exports);
|
|
19
|
+
__exportStar(require("./scraper-account"), exports);
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const managerAccountProvider: z.ZodEnum<["user_provided", "lancer_provided"]>;
|
|
3
|
+
export declare const managerAccountSchema: 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 createManagerAccountSchema: 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 updateManagerAccountSchema: 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.updateManagerAccountSchema = exports.createManagerAccountSchema = exports.managerAccountSchema = exports.managerAccountProvider = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const account_status_1 = require("./account-status");
|
|
6
|
+
exports.managerAccountProvider = zod_1.z.enum([
|
|
7
|
+
'user_provided',
|
|
8
|
+
'lancer_provided',
|
|
9
|
+
]);
|
|
10
|
+
exports.managerAccountSchema = zod_1.z.object({
|
|
11
|
+
id: zod_1.z.string(),
|
|
12
|
+
provider: exports.managerAccountProvider,
|
|
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.createManagerAccountSchema = exports.managerAccountSchema.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.updateManagerAccountSchema = exports.managerAccountSchema
|
|
35
|
+
.omit({
|
|
36
|
+
id: true,
|
|
37
|
+
})
|
|
38
|
+
.partial();
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateScraperAccountSchema = exports.createScraperAccountSchema = exports.scraperAccountSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const account_status_1 = require("./account-status");
|
|
6
|
+
const job_filters_1 = require("../job-filters");
|
|
7
|
+
exports.scraperAccountSchema = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.string(),
|
|
9
|
+
email: zod_1.z.string().email(),
|
|
10
|
+
password: zod_1.z.string(),
|
|
11
|
+
cookies: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
|
12
|
+
proxy_credentials: zod_1.z.string(),
|
|
13
|
+
region: job_filters_1.regionEnum,
|
|
14
|
+
isActive: zod_1.z.boolean(),
|
|
15
|
+
lastUsed: zod_1.z.number(),
|
|
16
|
+
status: account_status_1.accountStatusSchema,
|
|
17
|
+
verified: zod_1.z.boolean(),
|
|
18
|
+
errors: zod_1.z.array(zod_1.z.object({
|
|
19
|
+
errorMessage: zod_1.z.string(),
|
|
20
|
+
timestamp: zod_1.z.number(),
|
|
21
|
+
screenshotUrl: zod_1.z.string(),
|
|
22
|
+
htmlUrl: zod_1.z.string(),
|
|
23
|
+
})),
|
|
24
|
+
});
|
|
25
|
+
exports.createScraperAccountSchema = exports.scraperAccountSchema.pick({
|
|
26
|
+
email: true,
|
|
27
|
+
password: true,
|
|
28
|
+
proxy_credentials: true,
|
|
29
|
+
region: true,
|
|
30
|
+
verified: true,
|
|
31
|
+
isActive: true,
|
|
32
|
+
});
|
|
33
|
+
exports.updateScraperAccountSchema = exports.scraperAccountSchema
|
|
34
|
+
.omit({
|
|
35
|
+
id: true,
|
|
36
|
+
})
|
|
37
|
+
.partial();
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const aiConfigSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
suitabilityPrompt: z.ZodNullable<z.ZodString>;
|
|
5
|
+
proposalPrompt: z.ZodNullable<z.ZodString>;
|
|
6
|
+
questionProposalPrompt: z.ZodNullable<z.ZodString>;
|
|
7
|
+
knowledgeBase: z.ZodNullable<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
id: string;
|
|
10
|
+
suitabilityPrompt: string | null;
|
|
11
|
+
proposalPrompt: string | null;
|
|
12
|
+
questionProposalPrompt: string | null;
|
|
13
|
+
knowledgeBase: string | null;
|
|
14
|
+
}, {
|
|
15
|
+
id: string;
|
|
16
|
+
suitabilityPrompt: string | null;
|
|
17
|
+
proposalPrompt: string | null;
|
|
18
|
+
questionProposalPrompt: string | null;
|
|
19
|
+
knowledgeBase: string | null;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const updateAiConfigSchema: z.ZodObject<{
|
|
22
|
+
suitabilityPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
proposalPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
questionProposalPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
knowledgeBase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
suitabilityPrompt?: string | null | undefined;
|
|
28
|
+
proposalPrompt?: string | null | undefined;
|
|
29
|
+
questionProposalPrompt?: string | null | undefined;
|
|
30
|
+
knowledgeBase?: string | null | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
suitabilityPrompt?: string | null | undefined;
|
|
33
|
+
proposalPrompt?: string | null | undefined;
|
|
34
|
+
questionProposalPrompt?: string | null | undefined;
|
|
35
|
+
knowledgeBase?: string | null | undefined;
|
|
36
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateAiConfigSchema = exports.aiConfigSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.aiConfigSchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string(),
|
|
7
|
+
suitabilityPrompt: zod_1.z.string().nullable(),
|
|
8
|
+
proposalPrompt: zod_1.z.string().nullable(),
|
|
9
|
+
questionProposalPrompt: zod_1.z.string().nullable(),
|
|
10
|
+
knowledgeBase: zod_1.z.string().nullable(),
|
|
11
|
+
});
|
|
12
|
+
exports.updateAiConfigSchema = exports.aiConfigSchema.omit({ id: true }).partial();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ai-config"), exports);
|
|
18
|
+
__exportStar(require("./proposal"), exports);
|
|
19
|
+
__exportStar(require("./suitability"), exports);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const questionAnswerPairSchema: z.ZodObject<{
|
|
3
|
+
question: z.ZodString;
|
|
4
|
+
answer: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
question: string;
|
|
7
|
+
answer: string;
|
|
8
|
+
}, {
|
|
9
|
+
question: string;
|
|
10
|
+
answer: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const proposalSchema: z.ZodObject<{
|
|
13
|
+
coverLetter: z.ZodString;
|
|
14
|
+
questionAnswerPairs: z.ZodArray<z.ZodObject<{
|
|
15
|
+
question: z.ZodString;
|
|
16
|
+
answer: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
question: string;
|
|
19
|
+
answer: string;
|
|
20
|
+
}, {
|
|
21
|
+
question: string;
|
|
22
|
+
answer: string;
|
|
23
|
+
}>, "many">;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
coverLetter: string;
|
|
26
|
+
questionAnswerPairs: {
|
|
27
|
+
question: string;
|
|
28
|
+
answer: string;
|
|
29
|
+
}[];
|
|
30
|
+
}, {
|
|
31
|
+
coverLetter: string;
|
|
32
|
+
questionAnswerPairs: {
|
|
33
|
+
question: string;
|
|
34
|
+
answer: string;
|
|
35
|
+
}[];
|
|
36
|
+
}>;
|
|
37
|
+
export declare const proposalResponseSchema: z.ZodArray<z.ZodObject<{
|
|
38
|
+
modelName: z.ZodString;
|
|
39
|
+
proposal: z.ZodObject<{
|
|
40
|
+
coverLetter: z.ZodString;
|
|
41
|
+
questionAnswerPairs: z.ZodArray<z.ZodObject<{
|
|
42
|
+
question: z.ZodString;
|
|
43
|
+
answer: z.ZodString;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
question: string;
|
|
46
|
+
answer: string;
|
|
47
|
+
}, {
|
|
48
|
+
question: string;
|
|
49
|
+
answer: string;
|
|
50
|
+
}>, "many">;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
coverLetter: string;
|
|
53
|
+
questionAnswerPairs: {
|
|
54
|
+
question: string;
|
|
55
|
+
answer: string;
|
|
56
|
+
}[];
|
|
57
|
+
}, {
|
|
58
|
+
coverLetter: string;
|
|
59
|
+
questionAnswerPairs: {
|
|
60
|
+
question: string;
|
|
61
|
+
answer: string;
|
|
62
|
+
}[];
|
|
63
|
+
}>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
modelName: string;
|
|
66
|
+
proposal: {
|
|
67
|
+
coverLetter: string;
|
|
68
|
+
questionAnswerPairs: {
|
|
69
|
+
question: string;
|
|
70
|
+
answer: string;
|
|
71
|
+
}[];
|
|
72
|
+
};
|
|
73
|
+
}, {
|
|
74
|
+
modelName: string;
|
|
75
|
+
proposal: {
|
|
76
|
+
coverLetter: string;
|
|
77
|
+
questionAnswerPairs: {
|
|
78
|
+
question: string;
|
|
79
|
+
answer: string;
|
|
80
|
+
}[];
|
|
81
|
+
};
|
|
82
|
+
}>, "many">;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.proposalResponseSchema = exports.proposalSchema = exports.questionAnswerPairSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.questionAnswerPairSchema = zod_1.z.object({
|
|
6
|
+
question: zod_1.z.string(),
|
|
7
|
+
answer: zod_1.z.string(),
|
|
8
|
+
});
|
|
9
|
+
exports.proposalSchema = zod_1.z.object({
|
|
10
|
+
coverLetter: zod_1.z.string(),
|
|
11
|
+
questionAnswerPairs: zod_1.z.array(exports.questionAnswerPairSchema),
|
|
12
|
+
});
|
|
13
|
+
exports.proposalResponseSchema = zod_1.z.array(zod_1.z.object({
|
|
14
|
+
modelName: zod_1.z.string(),
|
|
15
|
+
proposal: exports.proposalSchema,
|
|
16
|
+
}));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const suitabilitySchema: z.ZodObject<{
|
|
3
|
+
rating: z.ZodString;
|
|
4
|
+
reason: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
rating: string;
|
|
7
|
+
reason: string;
|
|
8
|
+
}, {
|
|
9
|
+
rating: string;
|
|
10
|
+
reason: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const suitabilityStatusSchema: z.ZodEnum<["completed", "pending", "failed"]>;
|
|
13
|
+
export declare const suitabilityResponseSchema: z.ZodArray<z.ZodObject<{
|
|
14
|
+
modelName: z.ZodString;
|
|
15
|
+
suitability: z.ZodObject<{
|
|
16
|
+
rating: z.ZodString;
|
|
17
|
+
reason: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
rating: string;
|
|
20
|
+
reason: string;
|
|
21
|
+
}, {
|
|
22
|
+
rating: string;
|
|
23
|
+
reason: string;
|
|
24
|
+
}>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
modelName: string;
|
|
27
|
+
suitability: {
|
|
28
|
+
rating: string;
|
|
29
|
+
reason: string;
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
modelName: string;
|
|
33
|
+
suitability: {
|
|
34
|
+
rating: string;
|
|
35
|
+
reason: string;
|
|
36
|
+
};
|
|
37
|
+
}>, "many">;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.suitabilityResponseSchema = exports.suitabilityStatusSchema = exports.suitabilitySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.suitabilitySchema = zod_1.z.object({
|
|
6
|
+
rating: zod_1.z.string(),
|
|
7
|
+
reason: zod_1.z.string(),
|
|
8
|
+
});
|
|
9
|
+
exports.suitabilityStatusSchema = zod_1.z.enum([
|
|
10
|
+
'completed',
|
|
11
|
+
'pending',
|
|
12
|
+
'failed',
|
|
13
|
+
]);
|
|
14
|
+
exports.suitabilityResponseSchema = zod_1.z.array(zod_1.z.object({
|
|
15
|
+
modelName: zod_1.z.string(),
|
|
16
|
+
suitability: exports.suitabilitySchema,
|
|
17
|
+
}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bidFailedSchema = exports.bidSuccessSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.bidSuccessSchema = zod_1.z.object({
|
|
6
|
+
status: zod_1.z.literal('success'),
|
|
7
|
+
biddingAmount: zod_1.z.number(),
|
|
8
|
+
boosted: zod_1.z.boolean(),
|
|
9
|
+
boostingAmount: zod_1.z.number(),
|
|
10
|
+
cookies: zod_1.z.array(zod_1.z.any()),
|
|
11
|
+
});
|
|
12
|
+
exports.bidFailedSchema = zod_1.z.object({
|
|
13
|
+
status: zod_1.z.literal('failed'),
|
|
14
|
+
errorMessage: zod_1.z.string(),
|
|
15
|
+
});
|