lancer-shared 1.2.26 → 1.2.27
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 +19212 -11684
- package/dist/constants/account-status.d.ts +3 -0
- package/dist/constants/account-status.js +17 -0
- package/dist/constants/campaign-notifications.d.ts +2 -0
- package/dist/constants/collections.js +13 -11
- package/dist/constants/common-questions.js +4 -1
- package/dist/constants/index.js +32 -10
- package/dist/constants/job-filter-options.js +4 -1
- package/dist/constants/job-status.js +12 -7
- package/dist/constants/mappings/countryMapping.js +3 -1
- package/dist/constants/mappings/regionMapping.js +3 -1
- package/dist/constants/organization.d.ts +2 -2
- package/dist/constants/proxies.d.ts +4 -0
- package/dist/constants/routes.d.ts +12 -8
- package/dist/constants/routes.js +37 -39
- package/dist/constants/upwork-accounts.d.ts +1 -1
- package/dist/constants/upwork-accounts.js +6 -3
- package/dist/constants/upwork-filters.d.ts +5 -0
- package/dist/constants/upwork-filters.js +75 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +20 -4
- package/dist/schemas/account/account-status.d.ts +2 -2
- package/dist/schemas/account/account-status.js +5 -2
- package/dist/schemas/account/bidder-account.d.ts +286 -36
- package/dist/schemas/account/bidder-account.js +24 -22
- package/dist/schemas/account/exceptions/index.d.ts +3 -0
- package/dist/schemas/account/exceptions/invalid-google-oauth-token.exception.d.ts +5 -0
- package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +5 -0
- package/dist/schemas/account/exceptions/no-bidder-accounts-available.exception.d.ts +5 -0
- package/dist/schemas/account/exceptions/no-google-oauth-tokens-found.exception.d.ts +5 -0
- package/dist/schemas/account/index.d.ts +4 -3
- package/dist/schemas/account/index.js +19 -3
- 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.d.ts +7 -7
- package/dist/schemas/account/scraper-account.js +24 -21
- package/dist/schemas/ai/ai-config.js +11 -8
- package/dist/schemas/ai/index.js +19 -3
- package/dist/schemas/ai/proposal.js +13 -10
- package/dist/schemas/ai/suitability.js +11 -8
- package/dist/schemas/ai-config/ai-config.d.ts +39 -0
- package/dist/schemas/ai-config/ai-config.js +12 -0
- package/dist/schemas/ai-config/index.d.ts +1 -0
- package/dist/schemas/ai-config/index.js +17 -0
- package/dist/schemas/bid/bid-result.js +13 -9
- package/dist/schemas/bid/bid-status.d.ts +30 -0
- package/dist/schemas/bid/bid-status.js +15 -0
- package/dist/schemas/bid/bid.js +30 -29
- package/dist/schemas/bid/exceptions/base-exception.d.ts +4 -0
- package/dist/schemas/bid/exceptions/cloudflare-challenge-failed.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/delete-multilogin-profile.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/dropdown-option-not-present.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/element-not-clickable.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/evalaute-element.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/evaluate-function.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/get-multilogin-browser.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/incorrect-security-question-answer.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/index.d.ts +61 -0
- package/dist/schemas/bid/exceptions/init-browser.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/insufficient-connects.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/invalid-credentials.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/invalid-job-url.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/login-failed.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/multilogin-authentication.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/navigation-timeout.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/new-browser-page.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/new-page.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/open-new-url.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/parse-connects.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/proposal-error-alert.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/proposal-form-warning-alert.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/proposal-submit-failed.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/pupeteer-conection-error.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/question-pair-not-matching.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/select-agency.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/select-contractor.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/selector-not-found.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/typed-value-not-matching.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/typing-input-field.exception.d.ts +5 -0
- package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +5 -0
- package/dist/schemas/bid/exceptions/wait-for-function-timeout.exception.d.ts +5 -0
- package/dist/schemas/bid/index.d.ts +1 -0
- package/dist/schemas/bid/index.js +18 -2
- 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/bidding/proposal-dto.d.ts +26 -0
- package/dist/schemas/bidding/proposal-dto.js +18 -0
- package/dist/schemas/campaign/campaign-ai-metrics.js +8 -5
- package/dist/schemas/campaign/campaign-analytics.js +31 -32
- package/dist/schemas/campaign/campaign-expenses.js +8 -5
- package/dist/schemas/campaign/campaign-insights.js +30 -30
- package/dist/schemas/campaign/campaign-integrations.d.ts +0 -5
- package/dist/schemas/campaign/campaign-integrations.js +13 -10
- package/dist/schemas/campaign/campaign-job-count.js +6 -3
- package/dist/schemas/campaign/campaign-notifications.d.ts +9 -0
- package/dist/schemas/campaign/campaign.d.ts +171 -238
- package/dist/schemas/campaign/campaign.js +35 -32
- package/dist/schemas/campaign/index.d.ts +6 -6
- package/dist/schemas/campaign/index.js +23 -7
- package/dist/schemas/chat-message/chat-message.js +10 -7
- package/dist/schemas/chat-message/index.js +17 -1
- package/dist/schemas/config/agency-config.js +9 -6
- package/dist/schemas/config/index.js +17 -1
- package/dist/schemas/index.js +32 -17
- 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-pipeline.d.ts +74 -0
- package/dist/schemas/job/job-pipeline.js +29 -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-suitability.d.ts +12 -0
- package/dist/schemas/job/job-suitability.js +13 -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 +608 -0
- package/dist/schemas/job/pipeline-job.js +43 -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 -1
- package/dist/schemas/job-filters/job-filters.js +65 -62
- package/dist/schemas/knowledge-object/index.d.ts +1 -0
- package/dist/schemas/knowledge-object/index.js +17 -0
- package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
- package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
- package/dist/schemas/lead/index.js +19 -173
- package/dist/schemas/lead/lead-note.js +16 -13
- package/dist/schemas/lead/lead-status.js +6 -3
- package/dist/schemas/lead/lead.d.ts +1897 -0
- package/dist/schemas/lead/lead.js +143 -0
- package/dist/schemas/logger/index.js +17 -1
- package/dist/schemas/logger/log-event.d.ts +18 -17
- package/dist/schemas/logger/log-event.js +49 -100
- package/dist/schemas/organization/index.d.ts +9 -66
- package/dist/schemas/organization/index.js +17 -70
- package/dist/schemas/organization/organization.d.ts +7 -177
- package/dist/schemas/organization/organization.js +17 -14
- package/dist/schemas/proxy/index.js +17 -3
- package/dist/schemas/proxy/proxy.js +19 -25
- package/dist/schemas/saved-search/index.js +11 -8
- package/dist/schemas/scraper/index.js +18 -2
- package/dist/schemas/scraper/scrape-payload.d.ts +65 -60
- package/dist/schemas/scraper/scrape-payload.js +14 -19
- package/dist/schemas/scraper/scrape-response.d.ts +345 -0
- package/dist/schemas/scraper/scrape-response.js +9 -0
- package/dist/schemas/scraper/scrape-result.js +21 -21
- package/dist/schemas/shared.js +9 -12
- package/dist/schemas/time-filter/index.js +8 -5
- 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-scraper-account.d.ts +92 -0
- package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
- package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +90 -0
- package/dist/schemas/upwork-account/upwork-scraping-account.js +30 -0
- package/dist/schemas/user/index.js +41 -38
- package/dist/types/account/account-status.js +2 -1
- package/dist/types/account/bidder-account.js +2 -1
- package/dist/types/account/index.js +19 -3
- 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 -1
- package/dist/types/ai/ai-config.js +2 -1
- package/dist/types/ai/index.js +19 -3
- package/dist/types/ai/proposal.js +2 -1
- package/dist/types/ai/suitability.js +2 -1
- package/dist/types/ai-config/ai-config.d.ts +6 -0
- package/dist/types/ai-config/ai-config.js +2 -0
- package/dist/types/ai-config/index.d.ts +1 -0
- package/dist/types/ai-config/index.js +17 -0
- package/dist/types/bid/bid-result.js +2 -1
- package/dist/types/bid/bid-status.d.ts +5 -0
- package/dist/types/bid/bid-status.js +2 -0
- package/dist/types/bid/bid.js +2 -1
- package/dist/types/bid/index.js +18 -2
- 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/bidding/proposal-dto.d.ts +3 -0
- package/dist/types/bidding/proposal-dto.js +2 -0
- package/dist/types/campaign/campaign-analytics.js +2 -1
- package/dist/types/campaign/campaign-expenses.js +2 -1
- package/dist/types/campaign/campaign-insights.d.ts +1 -2
- package/dist/types/campaign/campaign-insights.js +2 -1
- package/dist/types/campaign/campaign-integrations.js +2 -1
- package/dist/types/campaign/campaign-job-count.js +2 -1
- package/dist/types/campaign/campaign-notifications.d.ts +7 -0
- package/dist/types/campaign/campaign.d.ts +5 -6
- package/dist/types/campaign/campaign.js +2 -1
- package/dist/types/campaign/index.d.ts +3 -6
- package/dist/types/campaign/index.js +22 -6
- package/dist/types/chat-message/chat-message.js +2 -1
- package/dist/types/chat-message/index.js +17 -1
- package/dist/types/config/agency-config.js +2 -1
- package/dist/types/config/index.js +17 -1
- package/dist/types/index.js +29 -15
- package/dist/types/job/index.js +19 -3
- 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 -1
- package/dist/types/job/job-pipeline.d.ts +4 -0
- package/dist/types/job/job-pipeline.js +2 -0
- package/dist/types/job/job-status.js +4 -1
- package/dist/types/job/job-suitability.d.ts +3 -0
- package/dist/types/job/job-suitability.js +2 -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 -1
- package/dist/types/job-filters/job-filters.js +2 -1
- package/dist/types/knowledge-object/index.d.ts +1 -0
- package/dist/types/knowledge-object/index.js +17 -0
- package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
- package/dist/types/knowledge-object/knowledge-object.js +2 -0
- package/dist/types/logger/index.js +17 -1
- package/dist/types/logger/log-event.d.ts +5 -4
- package/dist/types/logger/log-event.js +2 -1
- package/dist/types/saved-search/index.js +2 -1
- package/dist/types/scraper/index.js +18 -2
- package/dist/types/scraper/scrape-payload.js +2 -1
- package/dist/types/scraper/scrape-response.d.ts +4 -0
- package/dist/types/scraper/scrape-response.js +2 -0
- package/dist/types/scraper/scrape-result.js +2 -1
- package/dist/types/time-filter/index.js +2 -1
- 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 -1
- package/dist/utils/index.js +17 -1
- package/dist/utils/try-catch.js +23 -8
- package/package.json +1 -1
- package/dist/schemas/event/index.d.ts +0 -58
- package/dist/schemas/lead/nuxt.js +0 -287
- package/dist/schemas/meter-event/index.d.ts +0 -12
- package/dist/schemas/organization/member.js +0 -7
- package/dist/schemas/organization/subscription.js +0 -17
- package/dist/schemas/proxy/proxy-available-replacements.js +0 -3
- package/dist/schemas/proxy/proxy-country.js +0 -249
- package/dist/schemas/tier/index.d.ts +0 -119
- package/dist/schemas/transaction/index.js +0 -17
- package/dist/schemas/usage/index.js +0 -18
- package/dist/types/job/nuxt.js +0 -1
- package/dist/types/shared.js +0 -1
- package/dist/types/transaction/index.js +0 -1
- package/dist/types/usage/index.js +0 -1
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { JobFilters } from
|
|
3
|
-
import { CampaignExpenses } from
|
|
4
|
-
import {
|
|
1
|
+
import { infer, z } from 'zod';
|
|
2
|
+
import { JobFilters } from '../job';
|
|
3
|
+
import { CampaignExpenses } from './campaign-expenses';
|
|
4
|
+
import { CampaignNotificationWebhooks } from './campaign-notifications';
|
|
5
|
+
export declare const bidConfigSchema: z.ZodObject<{
|
|
6
|
+
agencyName: z.ZodNullable<z.ZodString>;
|
|
7
|
+
bidderId: z.ZodNullable<z.ZodString>;
|
|
8
|
+
contractorName: z.ZodNullable<z.ZodString>;
|
|
9
|
+
specialisedProfile: z.ZodNullable<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
agencyName: string | null;
|
|
12
|
+
bidderId: string | null;
|
|
13
|
+
contractorName: string | null;
|
|
14
|
+
specialisedProfile: string | null;
|
|
15
|
+
}, {
|
|
16
|
+
agencyName: string | null;
|
|
17
|
+
bidderId: string | null;
|
|
18
|
+
contractorName: string | null;
|
|
19
|
+
specialisedProfile: string | null;
|
|
20
|
+
}>;
|
|
5
21
|
export declare const campaignStatusSchema: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>;
|
|
6
22
|
export declare const campaignSchema: z.ZodObject<{
|
|
7
23
|
id: z.ZodString;
|
|
@@ -259,47 +275,24 @@ export declare const campaignSchema: z.ZodObject<{
|
|
|
259
275
|
boostingAmount?: number | undefined;
|
|
260
276
|
boosted?: number | undefined;
|
|
261
277
|
}>;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}, {
|
|
270
|
-
discord: string | null;
|
|
271
|
-
slack: string | null;
|
|
272
|
-
}>;
|
|
273
|
-
proposalSentHooks: z.ZodObject<{
|
|
274
|
-
discord: z.ZodNullable<z.ZodString>;
|
|
275
|
-
slack: z.ZodNullable<z.ZodString>;
|
|
276
|
-
}, "strip", z.ZodTypeAny, {
|
|
277
|
-
discord: string | null;
|
|
278
|
-
slack: string | null;
|
|
279
|
-
}, {
|
|
280
|
-
discord: string | null;
|
|
281
|
-
slack: string | null;
|
|
282
|
-
}>;
|
|
278
|
+
notificationWebhooks: z.ZodRecord<z.ZodEnum<["suitableLead", "proposalSent", "proposalFailed", "proposalViewed", "proposalReplied", "lowConnects", "leadAnalyzed", "accountHealth"]>, z.ZodNullable<z.ZodString>>;
|
|
279
|
+
status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>>;
|
|
280
|
+
bidConfig: z.ZodNullable<z.ZodObject<{
|
|
281
|
+
agencyName: z.ZodNullable<z.ZodString>;
|
|
282
|
+
bidderId: z.ZodNullable<z.ZodString>;
|
|
283
|
+
contractorName: z.ZodNullable<z.ZodString>;
|
|
284
|
+
specialisedProfile: z.ZodNullable<z.ZodString>;
|
|
283
285
|
}, "strip", z.ZodTypeAny, {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
proposalSentHooks: {
|
|
289
|
-
discord: string | null;
|
|
290
|
-
slack: string | null;
|
|
291
|
-
};
|
|
286
|
+
agencyName: string | null;
|
|
287
|
+
bidderId: string | null;
|
|
288
|
+
contractorName: string | null;
|
|
289
|
+
specialisedProfile: string | null;
|
|
292
290
|
}, {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
discord: string | null;
|
|
299
|
-
slack: string | null;
|
|
300
|
-
};
|
|
301
|
-
}>;
|
|
302
|
-
status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>>;
|
|
291
|
+
agencyName: string | null;
|
|
292
|
+
bidderId: string | null;
|
|
293
|
+
contractorName: string | null;
|
|
294
|
+
specialisedProfile: string | null;
|
|
295
|
+
}>>;
|
|
303
296
|
}, "strip", z.ZodTypeAny, {
|
|
304
297
|
id: string;
|
|
305
298
|
name: string;
|
|
@@ -372,16 +365,13 @@ export declare const campaignSchema: z.ZodObject<{
|
|
|
372
365
|
boostingAmount: number;
|
|
373
366
|
boosted: number;
|
|
374
367
|
};
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
slack: string | null;
|
|
383
|
-
};
|
|
384
|
-
};
|
|
368
|
+
notificationWebhooks: Partial<Record<"suitableLead" | "proposalSent" | "proposalFailed" | "proposalViewed" | "proposalReplied" | "lowConnects" | "leadAnalyzed" | "accountHealth", string | null>>;
|
|
369
|
+
bidConfig: {
|
|
370
|
+
agencyName: string | null;
|
|
371
|
+
bidderId: string | null;
|
|
372
|
+
contractorName: string | null;
|
|
373
|
+
specialisedProfile: string | null;
|
|
374
|
+
} | null;
|
|
385
375
|
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
386
376
|
}, {
|
|
387
377
|
id: string;
|
|
@@ -450,16 +440,13 @@ export declare const campaignSchema: z.ZodObject<{
|
|
|
450
440
|
boostingAmount?: number | undefined;
|
|
451
441
|
boosted?: number | undefined;
|
|
452
442
|
};
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
slack: string | null;
|
|
461
|
-
};
|
|
462
|
-
};
|
|
443
|
+
notificationWebhooks: Partial<Record<"suitableLead" | "proposalSent" | "proposalFailed" | "proposalViewed" | "proposalReplied" | "lowConnects" | "leadAnalyzed" | "accountHealth", string | null>>;
|
|
444
|
+
bidConfig: {
|
|
445
|
+
agencyName: string | null;
|
|
446
|
+
bidderId: string | null;
|
|
447
|
+
contractorName: string | null;
|
|
448
|
+
specialisedProfile: string | null;
|
|
449
|
+
} | null;
|
|
463
450
|
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
464
451
|
boostingEnabled?: boolean | null | undefined;
|
|
465
452
|
maximumBoost?: number | null | undefined;
|
|
@@ -723,47 +710,24 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
|
|
|
723
710
|
boostingAmount?: number | undefined;
|
|
724
711
|
boosted?: number | undefined;
|
|
725
712
|
}>;
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
}, {
|
|
734
|
-
discord: string | null;
|
|
735
|
-
slack: string | null;
|
|
736
|
-
}>;
|
|
737
|
-
proposalSentHooks: z.ZodObject<{
|
|
738
|
-
discord: z.ZodNullable<z.ZodString>;
|
|
739
|
-
slack: z.ZodNullable<z.ZodString>;
|
|
740
|
-
}, "strip", z.ZodTypeAny, {
|
|
741
|
-
discord: string | null;
|
|
742
|
-
slack: string | null;
|
|
743
|
-
}, {
|
|
744
|
-
discord: string | null;
|
|
745
|
-
slack: string | null;
|
|
746
|
-
}>;
|
|
713
|
+
notificationWebhooks: z.ZodRecord<z.ZodEnum<["suitableLead", "proposalSent", "proposalFailed", "proposalViewed", "proposalReplied", "lowConnects", "leadAnalyzed", "accountHealth"]>, z.ZodNullable<z.ZodString>>;
|
|
714
|
+
status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>>;
|
|
715
|
+
bidConfig: z.ZodNullable<z.ZodObject<{
|
|
716
|
+
agencyName: z.ZodNullable<z.ZodString>;
|
|
717
|
+
bidderId: z.ZodNullable<z.ZodString>;
|
|
718
|
+
contractorName: z.ZodNullable<z.ZodString>;
|
|
719
|
+
specialisedProfile: z.ZodNullable<z.ZodString>;
|
|
747
720
|
}, "strip", z.ZodTypeAny, {
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
proposalSentHooks: {
|
|
753
|
-
discord: string | null;
|
|
754
|
-
slack: string | null;
|
|
755
|
-
};
|
|
721
|
+
agencyName: string | null;
|
|
722
|
+
bidderId: string | null;
|
|
723
|
+
contractorName: string | null;
|
|
724
|
+
specialisedProfile: string | null;
|
|
756
725
|
}, {
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
discord: string | null;
|
|
763
|
-
slack: string | null;
|
|
764
|
-
};
|
|
765
|
-
}>;
|
|
766
|
-
status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>>;
|
|
726
|
+
agencyName: string | null;
|
|
727
|
+
bidderId: string | null;
|
|
728
|
+
contractorName: string | null;
|
|
729
|
+
specialisedProfile: string | null;
|
|
730
|
+
}>>;
|
|
767
731
|
}, "id" | "createdAt" | "updatedAt">, "strip", z.ZodTypeAny, {
|
|
768
732
|
name: string;
|
|
769
733
|
filters: {
|
|
@@ -833,16 +797,13 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
|
|
|
833
797
|
boostingAmount: number;
|
|
834
798
|
boosted: number;
|
|
835
799
|
};
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
slack: string | null;
|
|
844
|
-
};
|
|
845
|
-
};
|
|
800
|
+
notificationWebhooks: Partial<Record<"suitableLead" | "proposalSent" | "proposalFailed" | "proposalViewed" | "proposalReplied" | "lowConnects" | "leadAnalyzed" | "accountHealth", string | null>>;
|
|
801
|
+
bidConfig: {
|
|
802
|
+
agencyName: string | null;
|
|
803
|
+
bidderId: string | null;
|
|
804
|
+
contractorName: string | null;
|
|
805
|
+
specialisedProfile: string | null;
|
|
806
|
+
} | null;
|
|
846
807
|
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
847
808
|
}, {
|
|
848
809
|
name: string;
|
|
@@ -908,16 +869,13 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
|
|
|
908
869
|
boostingAmount?: number | undefined;
|
|
909
870
|
boosted?: number | undefined;
|
|
910
871
|
};
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
slack: string | null;
|
|
919
|
-
};
|
|
920
|
-
};
|
|
872
|
+
notificationWebhooks: Partial<Record<"suitableLead" | "proposalSent" | "proposalFailed" | "proposalViewed" | "proposalReplied" | "lowConnects" | "leadAnalyzed" | "accountHealth", string | null>>;
|
|
873
|
+
bidConfig: {
|
|
874
|
+
agencyName: string | null;
|
|
875
|
+
bidderId: string | null;
|
|
876
|
+
contractorName: string | null;
|
|
877
|
+
specialisedProfile: string | null;
|
|
878
|
+
} | null;
|
|
921
879
|
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
922
880
|
boostingEnabled?: boolean | null | undefined;
|
|
923
881
|
maximumBoost?: number | null | undefined;
|
|
@@ -925,10 +883,11 @@ export declare const createCampaignSchema: z.ZodObject<Omit<{
|
|
|
925
883
|
suitabilityThreshold?: number | null | undefined;
|
|
926
884
|
boostingThreshold?: number | null | undefined;
|
|
927
885
|
}>;
|
|
928
|
-
export declare const updateCampaignSchema: z.ZodObject<
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
886
|
+
export declare const updateCampaignSchema: z.ZodObject<{
|
|
887
|
+
status: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"draft">, z.ZodLiteral<"paused">, z.ZodLiteral<"error">]>>>;
|
|
888
|
+
id: z.ZodOptional<z.ZodString>;
|
|
889
|
+
name: z.ZodOptional<z.ZodString>;
|
|
890
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
932
891
|
keywords: z.ZodNullable<z.ZodObject<{
|
|
933
892
|
includes: z.ZodNullable<z.ZodString>;
|
|
934
893
|
excludes: z.ZodNullable<z.ZodString>;
|
|
@@ -1154,21 +1113,19 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
|
|
|
1154
1113
|
requiredEarnings: 100 | 1000 | 10000 | null;
|
|
1155
1114
|
requiredJSS: (">80%" | ">90%" | "100%" | "RT")[] | null;
|
|
1156
1115
|
} | null;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "viewed", "replied", "interview", "won", "lost"]>, z.ZodNumber>>;
|
|
1171
|
-
expenses: z.ZodObject<{
|
|
1116
|
+
}>>;
|
|
1117
|
+
confirmedBillingAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1118
|
+
automatedSuitability: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1119
|
+
automatedBidding: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1120
|
+
boostingEnabled: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
|
|
1121
|
+
maximumBoost: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
1122
|
+
minimumBoost: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
1123
|
+
webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1124
|
+
monthlyBudget: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1125
|
+
suitabilityThreshold: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
1126
|
+
boostingThreshold: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
1127
|
+
leadCounts: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "viewed", "replied", "interview", "won", "lost"]>, z.ZodNumber>>>;
|
|
1128
|
+
expenses: z.ZodOptional<z.ZodObject<{
|
|
1172
1129
|
biddingAmount: z.ZodDefault<z.ZodNumber>;
|
|
1173
1130
|
boostingAmount: z.ZodDefault<z.ZodNumber>;
|
|
1174
1131
|
boosted: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1180,52 +1137,29 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
|
|
|
1180
1137
|
biddingAmount?: number | undefined;
|
|
1181
1138
|
boostingAmount?: number | undefined;
|
|
1182
1139
|
boosted?: number | undefined;
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
slack: string | null;
|
|
1191
|
-
}, {
|
|
1192
|
-
discord: string | null;
|
|
1193
|
-
slack: string | null;
|
|
1194
|
-
}>;
|
|
1195
|
-
proposalSentHooks: z.ZodObject<{
|
|
1196
|
-
discord: z.ZodNullable<z.ZodString>;
|
|
1197
|
-
slack: z.ZodNullable<z.ZodString>;
|
|
1198
|
-
}, "strip", z.ZodTypeAny, {
|
|
1199
|
-
discord: string | null;
|
|
1200
|
-
slack: string | null;
|
|
1201
|
-
}, {
|
|
1202
|
-
discord: string | null;
|
|
1203
|
-
slack: string | null;
|
|
1204
|
-
}>;
|
|
1140
|
+
}>>;
|
|
1141
|
+
notificationWebhooks: z.ZodOptional<z.ZodRecord<z.ZodEnum<["suitableLead", "proposalSent", "proposalFailed", "proposalViewed", "proposalReplied", "lowConnects", "leadAnalyzed", "accountHealth"]>, z.ZodNullable<z.ZodString>>>;
|
|
1142
|
+
bidConfig: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1143
|
+
agencyName: z.ZodNullable<z.ZodString>;
|
|
1144
|
+
bidderId: z.ZodNullable<z.ZodString>;
|
|
1145
|
+
contractorName: z.ZodNullable<z.ZodString>;
|
|
1146
|
+
specialisedProfile: z.ZodNullable<z.ZodString>;
|
|
1205
1147
|
}, "strip", z.ZodTypeAny, {
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
proposalSentHooks: {
|
|
1211
|
-
discord: string | null;
|
|
1212
|
-
slack: string | null;
|
|
1213
|
-
};
|
|
1148
|
+
agencyName: string | null;
|
|
1149
|
+
bidderId: string | null;
|
|
1150
|
+
contractorName: string | null;
|
|
1151
|
+
specialisedProfile: string | null;
|
|
1214
1152
|
}, {
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
}, "createdAt" | "updatedAt">, "strip", z.ZodTypeAny, {
|
|
1226
|
-
id: string;
|
|
1227
|
-
name: string;
|
|
1228
|
-
filters: {
|
|
1153
|
+
agencyName: string | null;
|
|
1154
|
+
bidderId: string | null;
|
|
1155
|
+
contractorName: string | null;
|
|
1156
|
+
specialisedProfile: string | null;
|
|
1157
|
+
}>>>;
|
|
1158
|
+
}, "strip", z.ZodTypeAny, {
|
|
1159
|
+
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
1160
|
+
id?: string | undefined;
|
|
1161
|
+
name?: string | undefined;
|
|
1162
|
+
filters?: {
|
|
1229
1163
|
keywords: {
|
|
1230
1164
|
includes: string | null;
|
|
1231
1165
|
excludes: string | null;
|
|
@@ -1275,38 +1209,35 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
|
|
|
1275
1209
|
requiredEarnings: 100 | 1000 | 10000 | null;
|
|
1276
1210
|
requiredJSS: (">80%" | ">90%" | "100%" | "RT")[] | null;
|
|
1277
1211
|
} | null;
|
|
1278
|
-
};
|
|
1279
|
-
confirmedBillingAt
|
|
1280
|
-
automatedSuitability
|
|
1281
|
-
automatedBidding
|
|
1282
|
-
boostingEnabled
|
|
1283
|
-
maximumBoost
|
|
1284
|
-
minimumBoost
|
|
1285
|
-
webhookUrl
|
|
1286
|
-
monthlyBudget
|
|
1287
|
-
suitabilityThreshold
|
|
1288
|
-
boostingThreshold
|
|
1289
|
-
leadCounts
|
|
1290
|
-
expenses
|
|
1212
|
+
} | undefined;
|
|
1213
|
+
confirmedBillingAt?: number | null | undefined;
|
|
1214
|
+
automatedSuitability?: boolean | null | undefined;
|
|
1215
|
+
automatedBidding?: boolean | null | undefined;
|
|
1216
|
+
boostingEnabled?: boolean | null | undefined;
|
|
1217
|
+
maximumBoost?: number | null | undefined;
|
|
1218
|
+
minimumBoost?: number | null | undefined;
|
|
1219
|
+
webhookUrl?: string | null | undefined;
|
|
1220
|
+
monthlyBudget?: number | null | undefined;
|
|
1221
|
+
suitabilityThreshold?: number | null | undefined;
|
|
1222
|
+
boostingThreshold?: number | null | undefined;
|
|
1223
|
+
leadCounts?: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "interview" | "won" | "lost", number>> | null | undefined;
|
|
1224
|
+
expenses?: {
|
|
1291
1225
|
biddingAmount: number;
|
|
1292
1226
|
boostingAmount: number;
|
|
1293
1227
|
boosted: number;
|
|
1294
|
-
};
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
slack: string | null;
|
|
1303
|
-
};
|
|
1304
|
-
};
|
|
1305
|
-
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
1228
|
+
} | undefined;
|
|
1229
|
+
notificationWebhooks?: Partial<Record<"suitableLead" | "proposalSent" | "proposalFailed" | "proposalViewed" | "proposalReplied" | "lowConnects" | "leadAnalyzed" | "accountHealth", string | null>> | undefined;
|
|
1230
|
+
bidConfig?: {
|
|
1231
|
+
agencyName: string | null;
|
|
1232
|
+
bidderId: string | null;
|
|
1233
|
+
contractorName: string | null;
|
|
1234
|
+
specialisedProfile: string | null;
|
|
1235
|
+
} | null | undefined;
|
|
1306
1236
|
}, {
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1237
|
+
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
1238
|
+
id?: string | undefined;
|
|
1239
|
+
name?: string | undefined;
|
|
1240
|
+
filters?: {
|
|
1310
1241
|
keywords: {
|
|
1311
1242
|
includes: string | null;
|
|
1312
1243
|
excludes: string | null;
|
|
@@ -1356,44 +1287,46 @@ export declare const updateCampaignSchema: z.ZodObject<Omit<{
|
|
|
1356
1287
|
requiredEarnings: 100 | 1000 | 10000 | null;
|
|
1357
1288
|
requiredJSS: (">80%" | ">90%" | "100%" | "RT")[] | null;
|
|
1358
1289
|
} | null;
|
|
1359
|
-
};
|
|
1360
|
-
confirmedBillingAt
|
|
1361
|
-
automatedSuitability
|
|
1362
|
-
automatedBidding
|
|
1363
|
-
webhookUrl: string | null;
|
|
1364
|
-
monthlyBudget: number | null;
|
|
1365
|
-
leadCounts: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "interview" | "won" | "lost", number>> | null;
|
|
1366
|
-
expenses: {
|
|
1367
|
-
biddingAmount?: number | undefined;
|
|
1368
|
-
boostingAmount?: number | undefined;
|
|
1369
|
-
boosted?: number | undefined;
|
|
1370
|
-
};
|
|
1371
|
-
integrations: {
|
|
1372
|
-
suitabilityHooks: {
|
|
1373
|
-
discord: string | null;
|
|
1374
|
-
slack: string | null;
|
|
1375
|
-
};
|
|
1376
|
-
proposalSentHooks: {
|
|
1377
|
-
discord: string | null;
|
|
1378
|
-
slack: string | null;
|
|
1379
|
-
};
|
|
1380
|
-
};
|
|
1381
|
-
status?: "active" | "draft" | "paused" | "error" | undefined;
|
|
1290
|
+
} | undefined;
|
|
1291
|
+
confirmedBillingAt?: number | null | undefined;
|
|
1292
|
+
automatedSuitability?: boolean | null | undefined;
|
|
1293
|
+
automatedBidding?: boolean | null | undefined;
|
|
1382
1294
|
boostingEnabled?: boolean | null | undefined;
|
|
1383
1295
|
maximumBoost?: number | null | undefined;
|
|
1384
1296
|
minimumBoost?: number | null | undefined;
|
|
1297
|
+
webhookUrl?: string | null | undefined;
|
|
1298
|
+
monthlyBudget?: number | null | undefined;
|
|
1385
1299
|
suitabilityThreshold?: number | null | undefined;
|
|
1386
1300
|
boostingThreshold?: number | null | undefined;
|
|
1301
|
+
leadCounts?: Partial<Record<"leads" | "contacted" | "viewed" | "replied" | "interview" | "won" | "lost", number>> | null | undefined;
|
|
1302
|
+
expenses?: {
|
|
1303
|
+
biddingAmount?: number | undefined;
|
|
1304
|
+
boostingAmount?: number | undefined;
|
|
1305
|
+
boosted?: number | undefined;
|
|
1306
|
+
} | undefined;
|
|
1307
|
+
notificationWebhooks?: Partial<Record<"suitableLead" | "proposalSent" | "proposalFailed" | "proposalViewed" | "proposalReplied" | "lowConnects" | "leadAnalyzed" | "accountHealth", string | null>> | undefined;
|
|
1308
|
+
bidConfig?: {
|
|
1309
|
+
agencyName: string | null;
|
|
1310
|
+
bidderId: string | null;
|
|
1311
|
+
contractorName: string | null;
|
|
1312
|
+
specialisedProfile: string | null;
|
|
1313
|
+
} | null | undefined;
|
|
1387
1314
|
}>;
|
|
1388
1315
|
export interface Campaign extends z.infer<typeof campaignSchema> {
|
|
1389
1316
|
filters: JobFilters;
|
|
1390
1317
|
expenses: CampaignExpenses;
|
|
1391
|
-
|
|
1318
|
+
notificationWebhooks: CampaignNotificationWebhooks;
|
|
1319
|
+
bidConfig: BidConfig | null;
|
|
1392
1320
|
}
|
|
1393
1321
|
export type CampaignStatus = z.infer<typeof campaignStatusSchema>;
|
|
1394
1322
|
export interface CreateCampaign extends z.infer<typeof createCampaignSchema> {
|
|
1395
1323
|
filters: JobFilters;
|
|
1396
1324
|
}
|
|
1397
1325
|
export interface UpdateCampaign extends z.infer<typeof updateCampaignSchema> {
|
|
1398
|
-
filters
|
|
1326
|
+
filters?: JobFilters;
|
|
1327
|
+
expenses?: CampaignExpenses;
|
|
1328
|
+
notificationWebhooks?: CampaignNotificationWebhooks;
|
|
1329
|
+
bidConfig?: BidConfig;
|
|
1330
|
+
}
|
|
1331
|
+
export interface BidConfig extends infer<typeof bidConfigSchema> {
|
|
1399
1332
|
}
|
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
z.literal(
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateCampaignSchema = exports.createCampaignSchema = exports.campaignSchema = exports.campaignStatusSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const job_filters_1 = require("../job-filters");
|
|
6
|
+
const lead_1 = require("../lead");
|
|
7
|
+
const campaign_expenses_1 = require("./campaign-expenses");
|
|
8
|
+
const campaign_integrations_1 = require("./campaign-integrations");
|
|
9
|
+
exports.campaignStatusSchema = zod_1.z.union([
|
|
10
|
+
zod_1.z.literal('active'),
|
|
11
|
+
zod_1.z.literal('draft'),
|
|
12
|
+
zod_1.z.literal('paused'),
|
|
13
|
+
zod_1.z.literal('error'),
|
|
11
14
|
]);
|
|
12
|
-
|
|
13
|
-
id: z.string(),
|
|
14
|
-
name: z.string(),
|
|
15
|
-
filters: jobFiltersSchema,
|
|
16
|
-
createdAt: number(),
|
|
17
|
-
updatedAt: number(),
|
|
18
|
-
confirmedBillingAt: number().nullable(),
|
|
19
|
-
automatedSuitability: z.boolean().nullable(),
|
|
20
|
-
automatedBidding: z.boolean().nullable(),
|
|
21
|
-
boostingEnabled: z.boolean().nullable().default(false),
|
|
22
|
-
maximumBoost: z.number().nullable().default(30),
|
|
23
|
-
minimumBoost: z.number().nullable().default(0),
|
|
24
|
-
webhookUrl: z.string().nullable(),
|
|
25
|
-
monthlyBudget: z.number().nullable(),
|
|
26
|
-
suitabilityThreshold: z.number().min(0).max(100).nullable().default(0),
|
|
27
|
-
boostingThreshold: z.number().min(0).max(100).nullable().default(0),
|
|
28
|
-
leadCounts: z.record(leadStatusSchema, z.number()).nullable(),
|
|
29
|
-
expenses: campaignExpensesSchema,
|
|
30
|
-
integrations: campaignIntegrationsSchema,
|
|
31
|
-
status: campaignStatusSchema.optional(),
|
|
15
|
+
exports.campaignSchema = zod_1.z.object({
|
|
16
|
+
id: zod_1.z.string(),
|
|
17
|
+
name: zod_1.z.string(),
|
|
18
|
+
filters: job_filters_1.jobFiltersSchema,
|
|
19
|
+
createdAt: (0, zod_1.number)(),
|
|
20
|
+
updatedAt: (0, zod_1.number)(),
|
|
21
|
+
confirmedBillingAt: (0, zod_1.number)().nullable(),
|
|
22
|
+
automatedSuitability: zod_1.z.boolean().nullable(),
|
|
23
|
+
automatedBidding: zod_1.z.boolean().nullable(),
|
|
24
|
+
boostingEnabled: zod_1.z.boolean().nullable().default(false),
|
|
25
|
+
maximumBoost: zod_1.z.number().nullable().default(30),
|
|
26
|
+
minimumBoost: zod_1.z.number().nullable().default(0),
|
|
27
|
+
webhookUrl: zod_1.z.string().nullable(),
|
|
28
|
+
monthlyBudget: zod_1.z.number().nullable(),
|
|
29
|
+
suitabilityThreshold: zod_1.z.number().min(0).max(100).nullable().default(0),
|
|
30
|
+
boostingThreshold: zod_1.z.number().min(0).max(100).nullable().default(0),
|
|
31
|
+
leadCounts: zod_1.z.record(lead_1.leadStatusSchema, zod_1.z.number()).nullable(),
|
|
32
|
+
expenses: campaign_expenses_1.campaignExpensesSchema,
|
|
33
|
+
integrations: campaign_integrations_1.campaignIntegrationsSchema,
|
|
34
|
+
status: exports.campaignStatusSchema.optional(),
|
|
32
35
|
});
|
|
33
|
-
|
|
36
|
+
exports.createCampaignSchema = exports.campaignSchema.omit({
|
|
34
37
|
id: true,
|
|
35
38
|
createdAt: true,
|
|
36
39
|
updatedAt: true,
|
|
37
40
|
});
|
|
38
|
-
|
|
41
|
+
exports.updateCampaignSchema = exports.campaignSchema.omit({
|
|
39
42
|
createdAt: true,
|
|
40
43
|
updatedAt: true,
|
|
41
44
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
1
|
+
export * from './campaign';
|
|
2
|
+
export * from './campaign-ai-metrics';
|
|
3
|
+
export * from './campaign-analytics';
|
|
4
|
+
export * from './campaign-expenses';
|
|
5
|
+
export * from './campaign-insights';
|
|
6
|
+
export * from './campaign-notifications';
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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("./campaign"), exports);
|
|
18
|
+
__exportStar(require("./campaign-insights"), exports);
|
|
19
|
+
__exportStar(require("./campaign-job-count"), exports);
|
|
20
|
+
__exportStar(require("./campaign-expenses"), exports);
|
|
21
|
+
__exportStar(require("./campaign-integrations"), exports);
|
|
22
|
+
__exportStar(require("./campaign-analytics"), exports);
|
|
23
|
+
__exportStar(require("./campaign-ai-metrics"), exports);
|