lancer-shared 1.2.33 → 1.2.34
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 +52 -13
- package/dist/constants/routes.d.ts +4 -0
- package/dist/schemas/agent/index.d.ts +29 -123
- package/dist/schemas/campaign/campaign.d.ts +15 -4
- package/dist/schemas/organization/cover-letter.d.ts +33 -0
- package/dist/schemas/organization/index.d.ts +89 -40
- package/dist/schemas/scraper/scrape-payload.d.ts +5 -0
- package/package.json +1 -1
- package/dist/constants/account-status.d.ts +0 -3
- package/dist/constants/account-status.js +0 -17
- package/dist/constants/collections.d.ts +0 -13
- package/dist/constants/collections.js +0 -16
- package/dist/constants/common-questions.js +0 -60
- package/dist/constants/index.js +0 -40
- package/dist/constants/job-filter-options.js +0 -268
- package/dist/constants/job-status.js +0 -26
- package/dist/constants/mappings/countryMapping.js +0 -122
- package/dist/constants/mappings/regionMapping.js +0 -242
- package/dist/constants/organization.d.ts +0 -2
- package/dist/constants/proxies.d.ts +0 -4
- package/dist/constants/routes.js +0 -114
- package/dist/constants/upwork-accounts.js +0 -21
- package/dist/constants/upwork-filters.d.ts +0 -5
- package/dist/constants/upwork-filters.js +0 -75
- package/dist/index.js +0 -20
- package/dist/schemas/account/account-status.js +0 -11
- package/dist/schemas/account/bidder-account.js +0 -37
- package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +0 -5
- package/dist/schemas/account/index.js +0 -19
- package/dist/schemas/account/manager-account.d.ts +0 -116
- package/dist/schemas/account/manager-account.js +0 -38
- package/dist/schemas/account/scraper-account.js +0 -37
- package/dist/schemas/ai/ai-config.d.ts +0 -36
- package/dist/schemas/ai/ai-config.js +0 -12
- package/dist/schemas/ai/index.d.ts +0 -3
- package/dist/schemas/ai/index.js +0 -19
- package/dist/schemas/ai/proposal.d.ts +0 -82
- package/dist/schemas/ai/proposal.js +0 -16
- package/dist/schemas/ai/suitability.d.ts +0 -37
- package/dist/schemas/ai/suitability.js +0 -17
- package/dist/schemas/ai-config/ai-config.d.ts +0 -39
- package/dist/schemas/ai-config/ai-config.js +0 -12
- package/dist/schemas/ai-config/index.d.ts +0 -1
- package/dist/schemas/ai-config/index.js +0 -17
- package/dist/schemas/bid/bid-result.js +0 -15
- package/dist/schemas/bid/bid-status.d.ts +0 -30
- package/dist/schemas/bid/bid-status.js +0 -15
- package/dist/schemas/bid/bid.js +0 -36
- package/dist/schemas/bid/exceptions/base-exception.d.ts +0 -4
- package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +0 -5
- package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +0 -5
- package/dist/schemas/bid/index.js +0 -18
- package/dist/schemas/bidding/index.d.ts +0 -1
- package/dist/schemas/bidding/index.js +0 -17
- package/dist/schemas/bidding/proposal-bidding-status.d.ts +0 -26
- package/dist/schemas/bidding/proposal-bidding-status.js +0 -18
- package/dist/schemas/bidding/proposal-dto.d.ts +0 -26
- package/dist/schemas/bidding/proposal-dto.js +0 -18
- package/dist/schemas/campaign/campaign-ai-metrics.js +0 -9
- package/dist/schemas/campaign/campaign-analytics.js +0 -41
- package/dist/schemas/campaign/campaign-expenses.js +0 -9
- package/dist/schemas/campaign/campaign-insights.js +0 -31
- package/dist/schemas/campaign/campaign-integrations.d.ts +0 -82
- package/dist/schemas/campaign/campaign-integrations.js +0 -16
- package/dist/schemas/campaign/campaign-job-count.d.ts +0 -2
- package/dist/schemas/campaign/campaign-job-count.js +0 -6
- package/dist/schemas/campaign/campaign.js +0 -44
- package/dist/schemas/campaign/index.js +0 -23
- package/dist/schemas/chat-message/chat-message.d.ts +0 -31
- package/dist/schemas/chat-message/chat-message.js +0 -13
- package/dist/schemas/chat-message/index.d.ts +0 -1
- package/dist/schemas/chat-message/index.js +0 -17
- package/dist/schemas/config/agency-config.d.ts +0 -17
- package/dist/schemas/config/agency-config.js +0 -10
- package/dist/schemas/config/index.d.ts +0 -1
- package/dist/schemas/config/index.js +0 -17
- package/dist/schemas/index.js +0 -32
- package/dist/schemas/job/index.js +0 -19
- package/dist/schemas/job/job-details.d.ts +0 -335
- package/dist/schemas/job/job-details.js +0 -29
- package/dist/schemas/job/job-note.d.ts +0 -83
- package/dist/schemas/job/job-note.js +0 -30
- package/dist/schemas/job/job-pipeline.d.ts +0 -74
- package/dist/schemas/job/job-pipeline.js +0 -29
- package/dist/schemas/job/job-status.d.ts +0 -3
- package/dist/schemas/job/job-status.js +0 -27
- package/dist/schemas/job/job-suitability.d.ts +0 -12
- package/dist/schemas/job/job-suitability.js +0 -13
- package/dist/schemas/job/job.d.ts +0 -1160
- package/dist/schemas/job/job.js +0 -90
- package/dist/schemas/job/pipeline-job.d.ts +0 -608
- package/dist/schemas/job/pipeline-job.js +0 -43
- package/dist/schemas/job/upwork-job.d.ts +0 -334
- package/dist/schemas/job/upwork-job.js +0 -60
- package/dist/schemas/job-filters/index.d.ts +0 -1
- package/dist/schemas/job-filters/index.js +0 -17
- package/dist/schemas/job-filters/job-filters.d.ts +0 -241
- package/dist/schemas/job-filters/job-filters.js +0 -87
- package/dist/schemas/knowledge-object/index.d.ts +0 -1
- package/dist/schemas/knowledge-object/index.js +0 -17
- package/dist/schemas/knowledge-object/knowledge-object.d.ts +0 -128
- package/dist/schemas/knowledge-object/knowledge-object.js +0 -47
- package/dist/schemas/lead/index.js +0 -19
- package/dist/schemas/lead/lead-note.d.ts +0 -83
- package/dist/schemas/lead/lead-note.js +0 -30
- package/dist/schemas/lead/lead-status.js +0 -26
- package/dist/schemas/lead/lead.d.ts +0 -1897
- package/dist/schemas/lead/lead.js +0 -143
- package/dist/schemas/lead/nuxt.d.ts +0 -1664
- package/dist/schemas/logger/index.js +0 -17
- package/dist/schemas/logger/log-event.js +0 -66
- package/dist/schemas/organization/index.js +0 -17
- package/dist/schemas/organization/organization.d.ts +0 -70
- package/dist/schemas/organization/organization.js +0 -19
- package/dist/schemas/proxy/index.js +0 -17
- package/dist/schemas/proxy/proxy.js +0 -23
- package/dist/schemas/saved-search/index.js +0 -12
- package/dist/schemas/scraper/index.js +0 -18
- package/dist/schemas/scraper/scrape-payload.js +0 -16
- package/dist/schemas/scraper/scrape-response.d.ts +0 -345
- package/dist/schemas/scraper/scrape-response.js +0 -9
- package/dist/schemas/scraper/scrape-result.js +0 -23
- package/dist/schemas/shared.js +0 -16
- package/dist/schemas/time-filter/index.js +0 -9
- package/dist/schemas/upwork-account/index.d.ts +0 -3
- package/dist/schemas/upwork-account/index.js +0 -19
- package/dist/schemas/upwork-account/upwork-account-status.d.ts +0 -2
- package/dist/schemas/upwork-account/upwork-account-status.js +0 -11
- package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +0 -95
- package/dist/schemas/upwork-account/upwork-business-manager-account.js +0 -35
- package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +0 -92
- package/dist/schemas/upwork-account/upwork-scraper-account.js +0 -31
- package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +0 -90
- package/dist/schemas/upwork-account/upwork-scraping-account.js +0 -30
- package/dist/schemas/user/index.js +0 -55
- package/dist/types/account/account-status.d.ts +0 -3
- package/dist/types/account/account-status.js +0 -2
- package/dist/types/account/bidder-account.d.ts +0 -7
- package/dist/types/account/bidder-account.js +0 -2
- package/dist/types/account/index.d.ts +0 -3
- package/dist/types/account/index.js +0 -19
- package/dist/types/account/manager-account.d.ts +0 -7
- package/dist/types/account/manager-account.js +0 -2
- package/dist/types/account/scraper-account.d.ts +0 -5
- package/dist/types/account/scraper-account.js +0 -2
- package/dist/types/ai/ai-config.d.ts +0 -6
- package/dist/types/ai/ai-config.js +0 -2
- package/dist/types/ai/index.d.ts +0 -3
- package/dist/types/ai/index.js +0 -19
- package/dist/types/ai/proposal.d.ts +0 -10
- package/dist/types/ai/proposal.js +0 -2
- package/dist/types/ai/suitability.d.ts +0 -6
- package/dist/types/ai/suitability.js +0 -2
- package/dist/types/ai-config/ai-config.d.ts +0 -6
- package/dist/types/ai-config/ai-config.js +0 -2
- package/dist/types/ai-config/index.d.ts +0 -1
- package/dist/types/ai-config/index.js +0 -17
- package/dist/types/bid/bid-result.d.ts +0 -5
- package/dist/types/bid/bid-result.js +0 -2
- package/dist/types/bid/bid-status.d.ts +0 -5
- package/dist/types/bid/bid-status.js +0 -2
- package/dist/types/bid/bid.d.ts +0 -9
- package/dist/types/bid/bid.js +0 -2
- package/dist/types/bid/index.d.ts +0 -2
- package/dist/types/bid/index.js +0 -18
- package/dist/types/bidding/index.d.ts +0 -1
- package/dist/types/bidding/index.js +0 -17
- package/dist/types/bidding/proposal-bidding-status.d.ts +0 -3
- package/dist/types/bidding/proposal-bidding-status.js +0 -2
- package/dist/types/bidding/proposal-dto.d.ts +0 -3
- package/dist/types/bidding/proposal-dto.js +0 -2
- package/dist/types/campaign/campaign-analytics.d.ts +0 -7
- package/dist/types/campaign/campaign-analytics.js +0 -2
- package/dist/types/campaign/campaign-expenses.d.ts +0 -3
- package/dist/types/campaign/campaign-expenses.js +0 -2
- package/dist/types/campaign/campaign-insights.js +0 -2
- package/dist/types/campaign/campaign-integrations.d.ts +0 -6
- package/dist/types/campaign/campaign-integrations.js +0 -2
- package/dist/types/campaign/campaign-job-count.d.ts +0 -4
- package/dist/types/campaign/campaign-job-count.js +0 -2
- package/dist/types/campaign/campaign.js +0 -2
- package/dist/types/campaign/index.js +0 -22
- package/dist/types/chat-message/chat-message.d.ts +0 -4
- package/dist/types/chat-message/chat-message.js +0 -2
- package/dist/types/chat-message/index.d.ts +0 -1
- package/dist/types/chat-message/index.js +0 -17
- package/dist/types/config/agency-config.d.ts +0 -4
- package/dist/types/config/agency-config.js +0 -2
- package/dist/types/config/index.d.ts +0 -1
- package/dist/types/config/index.js +0 -17
- package/dist/types/index.d.ts +0 -15
- package/dist/types/index.js +0 -29
- package/dist/types/job/index.d.ts +0 -48
- package/dist/types/job/index.js +0 -19
- package/dist/types/job/job-details.d.ts +0 -36
- package/dist/types/job/job-details.js +0 -2
- package/dist/types/job/job-note.d.ts +0 -10
- package/dist/types/job/job-note.js +0 -2
- package/dist/types/job/job-pipeline.d.ts +0 -4
- package/dist/types/job/job-pipeline.js +0 -2
- package/dist/types/job/job-status.d.ts +0 -5
- package/dist/types/job/job-status.js +0 -12
- package/dist/types/job/job-suitability.d.ts +0 -3
- package/dist/types/job/job-suitability.js +0 -2
- package/dist/types/job/job.d.ts +0 -36
- package/dist/types/job/job.js +0 -2
- package/dist/types/job/nuxt.d.ts +0 -4
- package/dist/types/job-filters/index.d.ts +0 -1
- package/dist/types/job-filters/index.js +0 -17
- package/dist/types/job-filters/job-filters.d.ts +0 -4
- package/dist/types/job-filters/job-filters.js +0 -2
- package/dist/types/knowledge-object/index.d.ts +0 -1
- package/dist/types/knowledge-object/index.js +0 -17
- package/dist/types/knowledge-object/knowledge-object.d.ts +0 -4
- package/dist/types/knowledge-object/knowledge-object.js +0 -2
- package/dist/types/logger/index.d.ts +0 -1
- package/dist/types/logger/index.js +0 -17
- package/dist/types/logger/log-event.js +0 -2
- package/dist/types/saved-search/index.d.ts +0 -6
- package/dist/types/saved-search/index.js +0 -2
- package/dist/types/scraper/index.d.ts +0 -2
- package/dist/types/scraper/index.js +0 -18
- package/dist/types/scraper/scrape-payload.d.ts +0 -10
- package/dist/types/scraper/scrape-payload.js +0 -2
- package/dist/types/scraper/scrape-response.d.ts +0 -4
- package/dist/types/scraper/scrape-response.js +0 -2
- package/dist/types/scraper/scrape-result.d.ts +0 -8
- package/dist/types/scraper/scrape-result.js +0 -2
- package/dist/types/shared.d.ts +0 -8
- package/dist/types/time-filter/index.d.ts +0 -3
- package/dist/types/time-filter/index.js +0 -2
- package/dist/types/transaction/index.d.ts +0 -4
- package/dist/types/upwork-account/index.d.ts +0 -3
- package/dist/types/upwork-account/index.js +0 -19
- package/dist/types/upwork-account/upwork-account-status.d.ts +0 -3
- package/dist/types/upwork-account/upwork-account-status.js +0 -2
- package/dist/types/upwork-account/upwork-business-manager-account.d.ts +0 -7
- package/dist/types/upwork-account/upwork-business-manager-account.js +0 -2
- package/dist/types/upwork-account/upwork-scraping-account.d.ts +0 -5
- package/dist/types/upwork-account/upwork-scraping-account.js +0 -2
- package/dist/types/usage/index.d.ts +0 -6
- package/dist/types/user/index.d.ts +0 -15
- package/dist/types/user/index.js +0 -2
- package/dist/utils/index.js +0 -17
- package/dist/utils/try-catch.js +0 -25
package/dist/bundle.cjs.js
CHANGED
|
@@ -6507,6 +6507,10 @@ const ROUTES = {
|
|
|
6507
6507
|
BY_ID: (id) => `organizations/${id}`,
|
|
6508
6508
|
ONBOARDING: (id) => `organizations/${id}/onboarding/progress`,
|
|
6509
6509
|
AI_CONFIG: (id) => `organizations/${id}/settings/ai-config`,
|
|
6510
|
+
COVER_LETTER: {
|
|
6511
|
+
BASE: (id) => `organizations/${id}/cover-letter`,
|
|
6512
|
+
BY_ID: (id, coverLetterId) => `organizations/${id}/cover-letter/${coverLetterId}`,
|
|
6513
|
+
},
|
|
6510
6514
|
PROFILE: (id) => `organizations/${id}/profile/data`,
|
|
6511
6515
|
MEMBERS: {
|
|
6512
6516
|
BASE: (id) => `organizations/${id}/members`,
|
|
@@ -12283,6 +12287,18 @@ const onboardingProgressSchema = z.object({
|
|
|
12283
12287
|
automationEnabled: z.boolean(),
|
|
12284
12288
|
});
|
|
12285
12289
|
|
|
12290
|
+
const coverLetterSchema = z.object({
|
|
12291
|
+
id: z.string(),
|
|
12292
|
+
name: z.string(),
|
|
12293
|
+
coverLetterExample: z.string(),
|
|
12294
|
+
coverLetterRules: z.string(),
|
|
12295
|
+
});
|
|
12296
|
+
const createCoverLetterSchema = coverLetterSchema.pick({
|
|
12297
|
+
name: true,
|
|
12298
|
+
coverLetterExample: true,
|
|
12299
|
+
coverLetterRules: true,
|
|
12300
|
+
});
|
|
12301
|
+
|
|
12286
12302
|
const organizationTypeSchema = z.enum(["agency", "freelancer"]);
|
|
12287
12303
|
const organizationTierEnum = z.enum(["free", "premium"]);
|
|
12288
12304
|
const limitsSchema = objectType({
|
|
@@ -12303,6 +12319,27 @@ const organizationSchema = objectType({
|
|
|
12303
12319
|
createdAt: numberType(),
|
|
12304
12320
|
updatedAt: numberType(),
|
|
12305
12321
|
});
|
|
12322
|
+
const caseStudySchema = objectType({
|
|
12323
|
+
title: stringType(),
|
|
12324
|
+
description: stringType(),
|
|
12325
|
+
});
|
|
12326
|
+
z.object({
|
|
12327
|
+
type: z.enum(["freelancer", "agency"]),
|
|
12328
|
+
name: z.string(),
|
|
12329
|
+
summary: z.string(),
|
|
12330
|
+
coreServices: z.string(),
|
|
12331
|
+
toolsSkillsTechnologies: z.string(),
|
|
12332
|
+
approach: z.string(),
|
|
12333
|
+
icp: z.string(),
|
|
12334
|
+
projectsTheyAvoid: z.string(),
|
|
12335
|
+
spokenLanguages: z.string(),
|
|
12336
|
+
agencyInfo: z.object({
|
|
12337
|
+
location: z.array(z.string()),
|
|
12338
|
+
website: z.string().url(),
|
|
12339
|
+
teamSize: z.number(),
|
|
12340
|
+
}),
|
|
12341
|
+
caseStudies: z.array(caseStudySchema),
|
|
12342
|
+
});
|
|
12306
12343
|
const createOrganizationSchema = organizationSchema.pick({
|
|
12307
12344
|
name: true,
|
|
12308
12345
|
type: true,
|
|
@@ -12323,12 +12360,12 @@ const questionRulesSchema = objectType({
|
|
|
12323
12360
|
category: stringType(),
|
|
12324
12361
|
});
|
|
12325
12362
|
const aiConfigSchema = objectType({
|
|
12326
|
-
suitabilityRules:
|
|
12327
|
-
coverLetterRules:
|
|
12328
|
-
coverLetterTemplate:
|
|
12363
|
+
// suitabilityRules: string().nullable(),
|
|
12364
|
+
// coverLetterRules: string().nullable(),
|
|
12365
|
+
// coverLetterTemplate: string().nullable(),
|
|
12329
12366
|
questionRules: arrayType(questionRulesSchema).nullable(),
|
|
12330
|
-
approvedSuitabilityJobs:
|
|
12331
|
-
approvedProposalJobs:
|
|
12367
|
+
// approvedSuitabilityJobs: number().nullable(),
|
|
12368
|
+
// approvedProposalJobs: number().nullable(),
|
|
12332
12369
|
});
|
|
12333
12370
|
const notificationConfigSchema = objectType({
|
|
12334
12371
|
emailEnabled: booleanType(),
|
|
@@ -12355,11 +12392,9 @@ const systemSchema = objectType({
|
|
|
12355
12392
|
});
|
|
12356
12393
|
|
|
12357
12394
|
const agentTaskRequestSchema = z.object({
|
|
12395
|
+
userId: z.string(),
|
|
12358
12396
|
organizationId: z.string(),
|
|
12359
|
-
|
|
12360
|
-
campaignId: z.string().optional(),
|
|
12361
|
-
leadId: z.string(),
|
|
12362
|
-
aiConfig: aiConfigSchema,
|
|
12397
|
+
campaignId: z.string(),
|
|
12363
12398
|
lead: leadSchema,
|
|
12364
12399
|
});
|
|
12365
12400
|
const testSystemPromptsRequestSchema = z.object({
|
|
@@ -12735,10 +12770,10 @@ const bidConfigSchema = z.object({
|
|
|
12735
12770
|
specialisedProfile: z.string().nullable(),
|
|
12736
12771
|
});
|
|
12737
12772
|
const campaignStatusSchema = z.union([
|
|
12738
|
-
z.literal(
|
|
12739
|
-
z.literal(
|
|
12740
|
-
z.literal(
|
|
12741
|
-
z.literal(
|
|
12773
|
+
z.literal("active"),
|
|
12774
|
+
z.literal("draft"),
|
|
12775
|
+
z.literal("paused"),
|
|
12776
|
+
z.literal("error"),
|
|
12742
12777
|
]);
|
|
12743
12778
|
const campaignSchema = z.object({
|
|
12744
12779
|
id: z.string(),
|
|
@@ -12761,6 +12796,7 @@ const campaignSchema = z.object({
|
|
|
12761
12796
|
notificationWebhooks: campaignNotificationWebhooks,
|
|
12762
12797
|
status: campaignStatusSchema.optional(),
|
|
12763
12798
|
bidConfig: bidConfigSchema.nullable(),
|
|
12799
|
+
coverLetterTemplateId: z.string().nullable(),
|
|
12764
12800
|
});
|
|
12765
12801
|
const createCampaignSchema = campaignSchema.omit({
|
|
12766
12802
|
id: true,
|
|
@@ -13610,6 +13646,7 @@ exports.campaignSchema = campaignSchema;
|
|
|
13610
13646
|
exports.campaignStatusActivitySchema = campaignStatusActivitySchema;
|
|
13611
13647
|
exports.campaignStatusSchema = campaignStatusSchema;
|
|
13612
13648
|
exports.capitalize = capitalize;
|
|
13649
|
+
exports.caseStudySchema = caseStudySchema;
|
|
13613
13650
|
exports.categoryEnum = categoryEnum;
|
|
13614
13651
|
exports.checkLeadStatusPayloadSchema = checkLeadStatusPayloadSchema;
|
|
13615
13652
|
exports.clientIndustryEnum = clientIndustryEnum;
|
|
@@ -13619,8 +13656,10 @@ exports.clientSizeEnum = clientSizeEnum;
|
|
|
13619
13656
|
exports.cloudflareProtectionFailure = cloudflareProtectionFailure;
|
|
13620
13657
|
exports.commonQuestions = commonQuestions;
|
|
13621
13658
|
exports.countryMapping = countryMapping;
|
|
13659
|
+
exports.coverLetterSchema = coverLetterSchema;
|
|
13622
13660
|
exports.createBidderAccountSchema = createBidderAccountSchema;
|
|
13623
13661
|
exports.createCampaignSchema = createCampaignSchema;
|
|
13662
|
+
exports.createCoverLetterSchema = createCoverLetterSchema;
|
|
13624
13663
|
exports.createOrganizationSchema = createOrganizationSchema;
|
|
13625
13664
|
exports.createScraperAccountSchema = createScraperAccountSchema;
|
|
13626
13665
|
exports.dailyUsageSchema = dailyUsageSchema;
|
|
@@ -90,6 +90,10 @@ export declare const ROUTES: {
|
|
|
90
90
|
readonly BY_ID: (id: string) => string;
|
|
91
91
|
readonly ONBOARDING: (id: string) => string;
|
|
92
92
|
readonly AI_CONFIG: (id: string) => string;
|
|
93
|
+
readonly COVER_LETTER: {
|
|
94
|
+
readonly BASE: (id: string) => string;
|
|
95
|
+
readonly BY_ID: (id: string, coverLetterId: string) => string;
|
|
96
|
+
};
|
|
93
97
|
readonly PROFILE: (id: string) => string;
|
|
94
98
|
readonly MEMBERS: {
|
|
95
99
|
readonly BASE: (id: string) => string;
|
|
@@ -1,51 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
3
|
+
userId: z.ZodString;
|
|
3
4
|
organizationId: z.ZodString;
|
|
4
|
-
|
|
5
|
-
campaignId: z.ZodOptional<z.ZodString>;
|
|
6
|
-
leadId: z.ZodString;
|
|
7
|
-
aiConfig: z.ZodObject<{
|
|
8
|
-
suitabilityRules: z.ZodNullable<z.ZodString>;
|
|
9
|
-
coverLetterRules: z.ZodNullable<z.ZodString>;
|
|
10
|
-
coverLetterTemplate: z.ZodNullable<z.ZodString>;
|
|
11
|
-
questionRules: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
12
|
-
question: z.ZodString;
|
|
13
|
-
answer: z.ZodString;
|
|
14
|
-
category: z.ZodString;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
question: string;
|
|
17
|
-
answer: string;
|
|
18
|
-
category: string;
|
|
19
|
-
}, {
|
|
20
|
-
question: string;
|
|
21
|
-
answer: string;
|
|
22
|
-
category: string;
|
|
23
|
-
}>, "many">>;
|
|
24
|
-
approvedSuitabilityJobs: z.ZodNullable<z.ZodNumber>;
|
|
25
|
-
approvedProposalJobs: z.ZodNullable<z.ZodNumber>;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
suitabilityRules: string | null;
|
|
28
|
-
coverLetterRules: string | null;
|
|
29
|
-
coverLetterTemplate: string | null;
|
|
30
|
-
questionRules: {
|
|
31
|
-
question: string;
|
|
32
|
-
answer: string;
|
|
33
|
-
category: string;
|
|
34
|
-
}[] | null;
|
|
35
|
-
approvedSuitabilityJobs: number | null;
|
|
36
|
-
approvedProposalJobs: number | null;
|
|
37
|
-
}, {
|
|
38
|
-
suitabilityRules: string | null;
|
|
39
|
-
coverLetterRules: string | null;
|
|
40
|
-
coverLetterTemplate: string | null;
|
|
41
|
-
questionRules: {
|
|
42
|
-
question: string;
|
|
43
|
-
answer: string;
|
|
44
|
-
category: string;
|
|
45
|
-
}[] | null;
|
|
46
|
-
approvedSuitabilityJobs: number | null;
|
|
47
|
-
approvedProposalJobs: number | null;
|
|
48
|
-
}>;
|
|
5
|
+
campaignId: z.ZodString;
|
|
49
6
|
lead: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
50
7
|
id: z.ZodNullable<z.ZodString>;
|
|
51
8
|
uid: z.ZodNullable<z.ZodString>;
|
|
@@ -368,11 +325,11 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
368
325
|
biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
|
|
369
326
|
scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
|
|
370
327
|
}>, "processed">, "strip", z.ZodTypeAny, {
|
|
371
|
-
category: string | null;
|
|
372
328
|
id: string | null;
|
|
373
329
|
uid: string | null;
|
|
374
330
|
createdAt: number | null;
|
|
375
331
|
title: string | null;
|
|
332
|
+
category: string | null;
|
|
376
333
|
skills: {
|
|
377
334
|
name: string;
|
|
378
335
|
}[] | null;
|
|
@@ -495,11 +452,11 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
495
452
|
} | null | undefined;
|
|
496
453
|
proposalId?: string | undefined;
|
|
497
454
|
}, {
|
|
498
|
-
category: string | null;
|
|
499
455
|
id: string | null;
|
|
500
456
|
uid: string | null;
|
|
501
457
|
createdAt: number | null;
|
|
502
458
|
title: string | null;
|
|
459
|
+
category: string | null;
|
|
503
460
|
skills: {
|
|
504
461
|
name: string;
|
|
505
462
|
}[] | null;
|
|
@@ -623,26 +580,15 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
623
580
|
proposalId?: string | undefined;
|
|
624
581
|
}>;
|
|
625
582
|
}, "strip", z.ZodTypeAny, {
|
|
583
|
+
userId: string;
|
|
626
584
|
organizationId: string;
|
|
627
|
-
|
|
628
|
-
aiConfig: {
|
|
629
|
-
suitabilityRules: string | null;
|
|
630
|
-
coverLetterRules: string | null;
|
|
631
|
-
coverLetterTemplate: string | null;
|
|
632
|
-
questionRules: {
|
|
633
|
-
question: string;
|
|
634
|
-
answer: string;
|
|
635
|
-
category: string;
|
|
636
|
-
}[] | null;
|
|
637
|
-
approvedSuitabilityJobs: number | null;
|
|
638
|
-
approvedProposalJobs: number | null;
|
|
639
|
-
};
|
|
585
|
+
campaignId: string;
|
|
640
586
|
lead: {
|
|
641
|
-
category: string | null;
|
|
642
587
|
id: string | null;
|
|
643
588
|
uid: string | null;
|
|
644
589
|
createdAt: number | null;
|
|
645
590
|
title: string | null;
|
|
591
|
+
category: string | null;
|
|
646
592
|
skills: {
|
|
647
593
|
name: string;
|
|
648
594
|
}[] | null;
|
|
@@ -765,29 +711,16 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
765
711
|
} | null | undefined;
|
|
766
712
|
proposalId?: string | undefined;
|
|
767
713
|
};
|
|
768
|
-
userId?: string | undefined;
|
|
769
|
-
campaignId?: string | undefined;
|
|
770
714
|
}, {
|
|
715
|
+
userId: string;
|
|
771
716
|
organizationId: string;
|
|
772
|
-
|
|
773
|
-
aiConfig: {
|
|
774
|
-
suitabilityRules: string | null;
|
|
775
|
-
coverLetterRules: string | null;
|
|
776
|
-
coverLetterTemplate: string | null;
|
|
777
|
-
questionRules: {
|
|
778
|
-
question: string;
|
|
779
|
-
answer: string;
|
|
780
|
-
category: string;
|
|
781
|
-
}[] | null;
|
|
782
|
-
approvedSuitabilityJobs: number | null;
|
|
783
|
-
approvedProposalJobs: number | null;
|
|
784
|
-
};
|
|
717
|
+
campaignId: string;
|
|
785
718
|
lead: {
|
|
786
|
-
category: string | null;
|
|
787
719
|
id: string | null;
|
|
788
720
|
uid: string | null;
|
|
789
721
|
createdAt: number | null;
|
|
790
722
|
title: string | null;
|
|
723
|
+
category: string | null;
|
|
791
724
|
skills: {
|
|
792
725
|
name: string;
|
|
793
726
|
}[] | null;
|
|
@@ -910,9 +843,8 @@ export declare const agentTaskRequestSchema: z.ZodObject<{
|
|
|
910
843
|
} | null | undefined;
|
|
911
844
|
proposalId?: string | undefined;
|
|
912
845
|
};
|
|
913
|
-
userId?: string | undefined;
|
|
914
|
-
campaignId?: string | undefined;
|
|
915
846
|
}>;
|
|
847
|
+
export type AgentTaskRequest = z.infer<typeof agentTaskRequestSchema>;
|
|
916
848
|
export declare const testSystemPromptsRequestSchema: z.ZodObject<{
|
|
917
849
|
organizationId: z.ZodString;
|
|
918
850
|
modelSuitability: z.ZodString;
|
|
@@ -931,46 +863,31 @@ export declare const testSystemPromptsRequestSchema: z.ZodObject<{
|
|
|
931
863
|
questionHandlingGuidelines: string;
|
|
932
864
|
}>;
|
|
933
865
|
aiConfig: z.ZodObject<{
|
|
934
|
-
suitabilityRules: z.ZodNullable<z.ZodString>;
|
|
935
|
-
coverLetterRules: z.ZodNullable<z.ZodString>;
|
|
936
|
-
coverLetterTemplate: z.ZodNullable<z.ZodString>;
|
|
937
866
|
questionRules: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
938
867
|
question: z.ZodString;
|
|
939
868
|
answer: z.ZodString;
|
|
940
869
|
category: z.ZodString;
|
|
941
870
|
}, "strip", z.ZodTypeAny, {
|
|
871
|
+
category: string;
|
|
942
872
|
question: string;
|
|
943
873
|
answer: string;
|
|
944
|
-
category: string;
|
|
945
874
|
}, {
|
|
875
|
+
category: string;
|
|
946
876
|
question: string;
|
|
947
877
|
answer: string;
|
|
948
|
-
category: string;
|
|
949
878
|
}>, "many">>;
|
|
950
|
-
approvedSuitabilityJobs: z.ZodNullable<z.ZodNumber>;
|
|
951
|
-
approvedProposalJobs: z.ZodNullable<z.ZodNumber>;
|
|
952
879
|
}, "strip", z.ZodTypeAny, {
|
|
953
|
-
suitabilityRules: string | null;
|
|
954
|
-
coverLetterRules: string | null;
|
|
955
|
-
coverLetterTemplate: string | null;
|
|
956
880
|
questionRules: {
|
|
881
|
+
category: string;
|
|
957
882
|
question: string;
|
|
958
883
|
answer: string;
|
|
959
|
-
category: string;
|
|
960
884
|
}[] | null;
|
|
961
|
-
approvedSuitabilityJobs: number | null;
|
|
962
|
-
approvedProposalJobs: number | null;
|
|
963
885
|
}, {
|
|
964
|
-
suitabilityRules: string | null;
|
|
965
|
-
coverLetterRules: string | null;
|
|
966
|
-
coverLetterTemplate: string | null;
|
|
967
886
|
questionRules: {
|
|
887
|
+
category: string;
|
|
968
888
|
question: string;
|
|
969
889
|
answer: string;
|
|
970
|
-
category: string;
|
|
971
890
|
}[] | null;
|
|
972
|
-
approvedSuitabilityJobs: number | null;
|
|
973
|
-
approvedProposalJobs: number | null;
|
|
974
891
|
}>;
|
|
975
892
|
lead: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
976
893
|
id: z.ZodNullable<z.ZodString>;
|
|
@@ -1294,11 +1211,11 @@ export declare const testSystemPromptsRequestSchema: z.ZodObject<{
|
|
|
1294
1211
|
biddingTaskScheduled: z.ZodNullable<z.ZodBoolean>;
|
|
1295
1212
|
scheduledBiddingTime: z.ZodNullable<z.ZodNumber>;
|
|
1296
1213
|
}>, "processed">, "strip", z.ZodTypeAny, {
|
|
1297
|
-
category: string | null;
|
|
1298
1214
|
id: string | null;
|
|
1299
1215
|
uid: string | null;
|
|
1300
1216
|
createdAt: number | null;
|
|
1301
1217
|
title: string | null;
|
|
1218
|
+
category: string | null;
|
|
1302
1219
|
skills: {
|
|
1303
1220
|
name: string;
|
|
1304
1221
|
}[] | null;
|
|
@@ -1421,11 +1338,11 @@ export declare const testSystemPromptsRequestSchema: z.ZodObject<{
|
|
|
1421
1338
|
} | null | undefined;
|
|
1422
1339
|
proposalId?: string | undefined;
|
|
1423
1340
|
}, {
|
|
1424
|
-
category: string | null;
|
|
1425
1341
|
id: string | null;
|
|
1426
1342
|
uid: string | null;
|
|
1427
1343
|
createdAt: number | null;
|
|
1428
1344
|
title: string | null;
|
|
1345
|
+
category: string | null;
|
|
1429
1346
|
skills: {
|
|
1430
1347
|
name: string;
|
|
1431
1348
|
}[] | null;
|
|
@@ -1550,24 +1467,12 @@ export declare const testSystemPromptsRequestSchema: z.ZodObject<{
|
|
|
1550
1467
|
}>;
|
|
1551
1468
|
}, "strip", z.ZodTypeAny, {
|
|
1552
1469
|
organizationId: string;
|
|
1553
|
-
aiConfig: {
|
|
1554
|
-
suitabilityRules: string | null;
|
|
1555
|
-
coverLetterRules: string | null;
|
|
1556
|
-
coverLetterTemplate: string | null;
|
|
1557
|
-
questionRules: {
|
|
1558
|
-
question: string;
|
|
1559
|
-
answer: string;
|
|
1560
|
-
category: string;
|
|
1561
|
-
}[] | null;
|
|
1562
|
-
approvedSuitabilityJobs: number | null;
|
|
1563
|
-
approvedProposalJobs: number | null;
|
|
1564
|
-
};
|
|
1565
1470
|
lead: {
|
|
1566
|
-
category: string | null;
|
|
1567
1471
|
id: string | null;
|
|
1568
1472
|
uid: string | null;
|
|
1569
1473
|
createdAt: number | null;
|
|
1570
1474
|
title: string | null;
|
|
1475
|
+
category: string | null;
|
|
1571
1476
|
skills: {
|
|
1572
1477
|
name: string;
|
|
1573
1478
|
}[] | null;
|
|
@@ -1697,26 +1602,21 @@ export declare const testSystemPromptsRequestSchema: z.ZodObject<{
|
|
|
1697
1602
|
suitability: string;
|
|
1698
1603
|
questionHandlingGuidelines: string;
|
|
1699
1604
|
};
|
|
1700
|
-
}, {
|
|
1701
|
-
organizationId: string;
|
|
1702
1605
|
aiConfig: {
|
|
1703
|
-
suitabilityRules: string | null;
|
|
1704
|
-
coverLetterRules: string | null;
|
|
1705
|
-
coverLetterTemplate: string | null;
|
|
1706
1606
|
questionRules: {
|
|
1607
|
+
category: string;
|
|
1707
1608
|
question: string;
|
|
1708
1609
|
answer: string;
|
|
1709
|
-
category: string;
|
|
1710
1610
|
}[] | null;
|
|
1711
|
-
approvedSuitabilityJobs: number | null;
|
|
1712
|
-
approvedProposalJobs: number | null;
|
|
1713
1611
|
};
|
|
1612
|
+
}, {
|
|
1613
|
+
organizationId: string;
|
|
1714
1614
|
lead: {
|
|
1715
|
-
category: string | null;
|
|
1716
1615
|
id: string | null;
|
|
1717
1616
|
uid: string | null;
|
|
1718
1617
|
createdAt: number | null;
|
|
1719
1618
|
title: string | null;
|
|
1619
|
+
category: string | null;
|
|
1720
1620
|
skills: {
|
|
1721
1621
|
name: string;
|
|
1722
1622
|
}[] | null;
|
|
@@ -1846,6 +1746,13 @@ export declare const testSystemPromptsRequestSchema: z.ZodObject<{
|
|
|
1846
1746
|
suitability: string;
|
|
1847
1747
|
questionHandlingGuidelines: string;
|
|
1848
1748
|
};
|
|
1749
|
+
aiConfig: {
|
|
1750
|
+
questionRules: {
|
|
1751
|
+
category: string;
|
|
1752
|
+
question: string;
|
|
1753
|
+
answer: string;
|
|
1754
|
+
}[] | null;
|
|
1755
|
+
};
|
|
1849
1756
|
}>;
|
|
1850
1757
|
export type TestSystemPromptsRequest = z.infer<typeof testSystemPromptsRequestSchema>;
|
|
1851
1758
|
export declare const suitabilityRatingSchema: z.ZodObject<{
|
|
@@ -2094,6 +2001,5 @@ export declare const testSystemPromptsResponseSchema: z.ZodObject<{
|
|
|
2094
2001
|
}>;
|
|
2095
2002
|
export type TestSystemPromptsResponse = z.infer<typeof testSystemPromptsResponseSchema>;
|
|
2096
2003
|
export type AgentTaskResponse = z.infer<typeof agentTaskResponseSchema>;
|
|
2097
|
-
export type AgentTaskRequest = z.infer<typeof agentTaskRequestSchema>;
|
|
2098
2004
|
export type SuitabilityRating = z.infer<typeof suitabilityRatingSchema>;
|
|
2099
2005
|
export type Proposal = z.infer<typeof proposalSchema>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { infer, z } from
|
|
2
|
-
import { JobFilters } from
|
|
3
|
-
import { CampaignExpenses } from
|
|
4
|
-
import { CampaignNotificationWebhooks } from
|
|
1
|
+
import { infer, z } from "zod";
|
|
2
|
+
import { JobFilters } from "../job";
|
|
3
|
+
import { CampaignExpenses } from "./campaign-expenses";
|
|
4
|
+
import { CampaignNotificationWebhooks } from "./campaign-notifications";
|
|
5
|
+
import { CoverLetter } from "../organization";
|
|
5
6
|
export declare const bidConfigSchema: z.ZodObject<{
|
|
6
7
|
agencyName: z.ZodNullable<z.ZodString>;
|
|
7
8
|
bidderId: z.ZodNullable<z.ZodString>;
|
|
@@ -293,6 +294,7 @@ export declare const campaignSchema: z.ZodObject<{
|
|
|
293
294
|
contractorName: string | null;
|
|
294
295
|
specialisedProfile: string | null;
|
|
295
296
|
}>>;
|
|
297
|
+
coverLetterTemplateId: z.ZodNullable<z.ZodString>;
|
|
296
298
|
}, "strip", z.ZodTypeAny, {
|
|
297
299
|
id: string;
|
|
298
300
|
name: string;
|
|
@@ -372,6 +374,7 @@ export declare const campaignSchema: z.ZodObject<{
|
|
|
372
374
|
contractorName: string | null;
|
|
373
375
|
specialisedProfile: string | null;
|
|
374
376
|
} | null;
|
|
377
|
+
coverLetterTemplateId: string | null;
|
|
375
378
|
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
376
379
|
}, {
|
|
377
380
|
id: string;
|
|
@@ -447,6 +450,7 @@ export declare const campaignSchema: z.ZodObject<{
|
|
|
447
450
|
contractorName: string | null;
|
|
448
451
|
specialisedProfile: string | null;
|
|
449
452
|
} | null;
|
|
453
|
+
coverLetterTemplateId: string | null;
|
|
450
454
|
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
451
455
|
boostingEnabled?: boolean | null | undefined;
|
|
452
456
|
maximumBoost?: number | null | undefined;
|
|
@@ -728,6 +732,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
|
|
|
728
732
|
contractorName: string | null;
|
|
729
733
|
specialisedProfile: string | null;
|
|
730
734
|
}>>;
|
|
735
|
+
coverLetterTemplateId: z.ZodNullable<z.ZodString>;
|
|
731
736
|
}, "id" | "createdAt" | "updatedAt">, "strip", z.ZodTypeAny, {
|
|
732
737
|
name: string;
|
|
733
738
|
filters: {
|
|
@@ -804,6 +809,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
|
|
|
804
809
|
contractorName: string | null;
|
|
805
810
|
specialisedProfile: string | null;
|
|
806
811
|
} | null;
|
|
812
|
+
coverLetterTemplateId: string | null;
|
|
807
813
|
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
808
814
|
}, {
|
|
809
815
|
name: string;
|
|
@@ -876,6 +882,7 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
|
|
|
876
882
|
contractorName: string | null;
|
|
877
883
|
specialisedProfile: string | null;
|
|
878
884
|
} | null;
|
|
885
|
+
coverLetterTemplateId: string | null;
|
|
879
886
|
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
880
887
|
boostingEnabled?: boolean | null | undefined;
|
|
881
888
|
maximumBoost?: number | null | undefined;
|
|
@@ -1155,6 +1162,7 @@ export declare const updateCampaignSchema: z.ZodObject<{
|
|
|
1155
1162
|
contractorName: string | null;
|
|
1156
1163
|
specialisedProfile: string | null;
|
|
1157
1164
|
}>>>;
|
|
1165
|
+
coverLetterTemplateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1158
1166
|
}, "strip", z.ZodTypeAny, {
|
|
1159
1167
|
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
1160
1168
|
id?: string | undefined;
|
|
@@ -1233,6 +1241,7 @@ export declare const updateCampaignSchema: z.ZodObject<{
|
|
|
1233
1241
|
contractorName: string | null;
|
|
1234
1242
|
specialisedProfile: string | null;
|
|
1235
1243
|
} | null | undefined;
|
|
1244
|
+
coverLetterTemplateId?: string | null | undefined;
|
|
1236
1245
|
}, {
|
|
1237
1246
|
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
1238
1247
|
id?: string | undefined;
|
|
@@ -1311,12 +1320,14 @@ export declare const updateCampaignSchema: z.ZodObject<{
|
|
|
1311
1320
|
contractorName: string | null;
|
|
1312
1321
|
specialisedProfile: string | null;
|
|
1313
1322
|
} | null | undefined;
|
|
1323
|
+
coverLetterTemplateId?: string | null | undefined;
|
|
1314
1324
|
}>;
|
|
1315
1325
|
export interface Campaign extends z.infer<typeof campaignSchema> {
|
|
1316
1326
|
filters: JobFilters;
|
|
1317
1327
|
expenses: CampaignExpenses;
|
|
1318
1328
|
notificationWebhooks: CampaignNotificationWebhooks;
|
|
1319
1329
|
bidConfig: BidConfig | null;
|
|
1330
|
+
coverLetterTemplate: CoverLetter | null;
|
|
1320
1331
|
}
|
|
1321
1332
|
export type CampaignStatus = z.infer<typeof campaignStatusSchema>;
|
|
1322
1333
|
export interface CreateCampaign extends z.infer<typeof createCampaignSchema> {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const coverLetterSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
coverLetterExample: z.ZodString;
|
|
6
|
+
coverLetterRules: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
coverLetterExample: string;
|
|
11
|
+
coverLetterRules: string;
|
|
12
|
+
}, {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
coverLetterExample: string;
|
|
16
|
+
coverLetterRules: string;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const createCoverLetterSchema: z.ZodObject<Pick<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
coverLetterExample: z.ZodString;
|
|
22
|
+
coverLetterRules: z.ZodString;
|
|
23
|
+
}, "name" | "coverLetterExample" | "coverLetterRules">, "strip", z.ZodTypeAny, {
|
|
24
|
+
name: string;
|
|
25
|
+
coverLetterExample: string;
|
|
26
|
+
coverLetterRules: string;
|
|
27
|
+
}, {
|
|
28
|
+
name: string;
|
|
29
|
+
coverLetterExample: string;
|
|
30
|
+
coverLetterRules: string;
|
|
31
|
+
}>;
|
|
32
|
+
export type CoverLetter = z.infer<typeof coverLetterSchema>;
|
|
33
|
+
export type CreateCoverLetter = z.infer<typeof createCoverLetterSchema>;
|