lancer-shared 1.2.139 → 1.2.141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.cjs.js +819 -652
- package/dist/constants/collections.js +11 -13
- package/dist/constants/common-questions.js +1 -4
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +10 -32
- package/dist/constants/job-filter-options.js +1 -4
- package/dist/constants/job-status.js +7 -12
- package/dist/constants/mappings/countryMapping.js +1 -3
- package/dist/constants/mappings/regionMapping.js +1 -3
- package/dist/constants/organization.d.ts +2 -2
- package/dist/constants/plan.d.ts +3 -0
- package/dist/constants/routes.js +39 -37
- package/dist/constants/upwork-accounts.js +3 -6
- package/dist/index.js +4 -20
- package/dist/schemas/account/account-status.js +2 -5
- package/dist/schemas/account/bidder-account.js +22 -24
- package/dist/schemas/account/index.js +3 -19
- package/dist/schemas/account/scraper-account.js +21 -24
- package/dist/schemas/ai/ai-config.js +8 -11
- package/dist/schemas/ai/index.js +3 -19
- package/dist/schemas/ai/proposal.js +10 -13
- package/dist/schemas/ai/suitability.js +8 -11
- package/dist/schemas/bid/bid-result.js +9 -13
- package/dist/schemas/bid/bid.d.ts +76 -0
- package/dist/schemas/bid/bid.js +29 -30
- package/dist/schemas/bid/index.js +2 -18
- package/dist/schemas/campaign/campaign-ai-metrics.js +5 -8
- package/dist/schemas/campaign/campaign-analytics.d.ts +360 -0
- package/dist/schemas/campaign/campaign-analytics.js +32 -31
- package/dist/schemas/campaign/campaign-expenses.js +5 -8
- package/dist/schemas/campaign/campaign-insights.js +30 -30
- package/dist/schemas/campaign/campaign-integrations.d.ts +5 -0
- package/dist/schemas/campaign/campaign-integrations.js +10 -13
- package/dist/schemas/campaign/campaign-job-count.js +3 -6
- package/dist/schemas/campaign/campaign.d.ts +29 -0
- package/dist/schemas/campaign/campaign.js +32 -35
- package/dist/schemas/campaign/index.js +7 -23
- package/dist/schemas/chat-message/chat-message.js +7 -10
- package/dist/schemas/chat-message/index.js +1 -17
- package/dist/schemas/config/agency-config.js +6 -9
- package/dist/schemas/config/index.js +1 -17
- package/dist/schemas/event/index.d.ts +58 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +17 -32
- package/dist/schemas/job/haha.json +581 -0
- package/dist/schemas/job-filters/index.js +1 -17
- package/dist/schemas/job-filters/job-filters.js +62 -65
- package/dist/schemas/lead/index.js +173 -19
- package/dist/schemas/lead/lead-note.js +13 -16
- package/dist/schemas/lead/lead-status.js +3 -6
- package/dist/schemas/lead/nuxt.js +287 -0
- package/dist/schemas/logger/index.js +1 -17
- package/dist/schemas/logger/log-event.js +100 -49
- package/dist/schemas/meter-event/index.d.ts +12 -0
- package/dist/schemas/organization/index.d.ts +16 -7
- package/dist/schemas/organization/index.js +70 -17
- package/dist/schemas/organization/member.js +7 -0
- package/dist/schemas/organization/organization.d.ts +177 -7
- package/dist/schemas/organization/organization.js +14 -17
- package/dist/schemas/organization/subscription.js +17 -0
- package/dist/schemas/profile/index.d.ts +2551 -0
- package/dist/schemas/proxy/index.js +3 -17
- package/dist/schemas/proxy/proxy-available-replacements.js +3 -0
- package/dist/schemas/proxy/proxy-country.js +249 -0
- package/dist/schemas/proxy/proxy.js +25 -19
- package/dist/schemas/saved-search/index.js +8 -11
- package/dist/schemas/scraper/exceptions.d.ts +13 -1
- package/dist/schemas/scraper/index.js +2 -18
- package/dist/schemas/scraper/scrape-payload.d.ts +102 -0
- package/dist/schemas/scraper/scrape-payload.js +19 -14
- package/dist/schemas/scraper/scrape-result.js +21 -21
- package/dist/schemas/shared.js +12 -9
- package/dist/schemas/talent/index.d.ts +1314 -0
- package/dist/schemas/tier/index.d.ts +119 -0
- package/dist/schemas/time-filter/index.js +5 -8
- package/dist/schemas/transaction/index.js +17 -0
- package/dist/schemas/usage/index.js +18 -0
- package/dist/schemas/user/index.js +38 -41
- package/dist/types/account/account-status.js +1 -2
- package/dist/types/account/bidder-account.js +1 -2
- package/dist/types/account/index.js +3 -19
- package/dist/types/account/scraper-account.js +1 -2
- package/dist/types/ai/ai-config.js +1 -2
- package/dist/types/ai/index.js +3 -19
- package/dist/types/ai/proposal.js +1 -2
- package/dist/types/ai/suitability.js +1 -2
- package/dist/types/bid/bid-result.js +1 -2
- package/dist/types/bid/bid.js +1 -2
- package/dist/types/bid/index.js +2 -18
- package/dist/types/campaign/campaign-analytics.js +1 -2
- package/dist/types/campaign/campaign-expenses.js +1 -2
- package/dist/types/campaign/campaign-insights.js +1 -2
- package/dist/types/campaign/campaign-integrations.js +1 -2
- package/dist/types/campaign/campaign-job-count.js +1 -2
- package/dist/types/campaign/campaign.js +1 -2
- package/dist/types/campaign/index.js +6 -22
- package/dist/types/chat-message/chat-message.js +1 -2
- package/dist/types/chat-message/index.js +1 -17
- package/dist/types/config/agency-config.js +1 -2
- package/dist/types/config/index.js +1 -17
- package/dist/types/index.js +15 -29
- package/dist/types/job/index.js +3 -19
- package/dist/types/job/job-note.js +1 -2
- package/dist/types/job/job-status.js +1 -4
- package/dist/types/job/nuxt.js +1 -0
- package/dist/types/job-filters/index.js +1 -17
- package/dist/types/job-filters/job-filters.js +1 -2
- package/dist/types/logger/index.js +1 -17
- package/dist/types/logger/log-event.js +1 -2
- package/dist/types/saved-search/index.js +1 -2
- package/dist/types/scraper/index.js +2 -18
- package/dist/types/scraper/scrape-payload.js +1 -2
- package/dist/types/scraper/scrape-result.js +1 -2
- package/dist/types/shared.js +1 -0
- package/dist/types/time-filter/index.js +1 -2
- package/dist/types/transaction/index.js +1 -0
- package/dist/types/usage/index.js +1 -0
- package/dist/types/user/index.js +1 -2
- package/dist/utils/index.js +1 -17
- package/dist/utils/try-catch.js +8 -23
- 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/proxies.d.ts +0 -4
- package/dist/constants/upwork-filters.d.ts +0 -5
- package/dist/constants/upwork-filters.js +0 -75
- package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +0 -5
- package/dist/schemas/account/manager-account.d.ts +0 -116
- package/dist/schemas/account/manager-account.js +0 -38
- 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-status.d.ts +0 -30
- package/dist/schemas/bid/bid-status.js +0 -15
- 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/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/job/feed-job.d.ts +0 -866
- package/dist/schemas/job/index.js +0 -19
- 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/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/lead.d.ts +0 -1897
- package/dist/schemas/lead/lead.js +0 -143
- package/dist/schemas/scraper/scrape-response.d.ts +0 -345
- package/dist/schemas/scraper/scrape-response.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/types/account/manager-account.d.ts +0 -7
- package/dist/types/account/manager-account.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-status.d.ts +0 -5
- package/dist/types/bid/bid-status.js +0 -2
- 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/job/job-details.d.ts +0 -36
- package/dist/types/job/job-details.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-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/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/scraper/scrape-response.d.ts +0 -4
- package/dist/types/scraper/scrape-response.js +0 -2
- 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
|
@@ -322,6 +322,48 @@ export declare const campaignStatusActivitySchema: z.ZodObject<z.objectUtil.exte
|
|
|
322
322
|
updatedAt: z.ZodNumber;
|
|
323
323
|
openRouterApiKey: z.ZodNullable<z.ZodString>;
|
|
324
324
|
appTrialEndsAt: z.ZodNullable<z.ZodNumber>;
|
|
325
|
+
oneTimePayments: z.ZodOptional<z.ZodObject<{
|
|
326
|
+
usBidderAccountPayment: z.ZodOptional<z.ZodObject<{
|
|
327
|
+
paidAt: z.ZodOptional<z.ZodNumber>;
|
|
328
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
329
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
330
|
+
status: z.ZodString;
|
|
331
|
+
paymentIntentId: z.ZodOptional<z.ZodString>;
|
|
332
|
+
error: z.ZodOptional<z.ZodString>;
|
|
333
|
+
}, "strip", z.ZodTypeAny, {
|
|
334
|
+
status: string;
|
|
335
|
+
paidAt?: number | undefined;
|
|
336
|
+
amount?: number | undefined;
|
|
337
|
+
currency?: string | undefined;
|
|
338
|
+
paymentIntentId?: string | undefined;
|
|
339
|
+
error?: string | undefined;
|
|
340
|
+
}, {
|
|
341
|
+
status: string;
|
|
342
|
+
paidAt?: number | undefined;
|
|
343
|
+
amount?: number | undefined;
|
|
344
|
+
currency?: string | undefined;
|
|
345
|
+
paymentIntentId?: string | undefined;
|
|
346
|
+
error?: string | undefined;
|
|
347
|
+
}>>;
|
|
348
|
+
}, "strip", z.ZodTypeAny, {
|
|
349
|
+
usBidderAccountPayment?: {
|
|
350
|
+
status: string;
|
|
351
|
+
paidAt?: number | undefined;
|
|
352
|
+
amount?: number | undefined;
|
|
353
|
+
currency?: string | undefined;
|
|
354
|
+
paymentIntentId?: string | undefined;
|
|
355
|
+
error?: string | undefined;
|
|
356
|
+
} | undefined;
|
|
357
|
+
}, {
|
|
358
|
+
usBidderAccountPayment?: {
|
|
359
|
+
status: string;
|
|
360
|
+
paidAt?: number | undefined;
|
|
361
|
+
amount?: number | undefined;
|
|
362
|
+
currency?: string | undefined;
|
|
363
|
+
paymentIntentId?: string | undefined;
|
|
364
|
+
error?: string | undefined;
|
|
365
|
+
} | undefined;
|
|
366
|
+
}>>;
|
|
325
367
|
}, "id" | "name">, "strip", z.ZodTypeAny, {
|
|
326
368
|
id: string;
|
|
327
369
|
name: string;
|
|
@@ -566,6 +608,9 @@ export declare const campaignStatusActivitySchema: z.ZodObject<z.objectUtil.exte
|
|
|
566
608
|
maximumBoost: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
567
609
|
monthlyBudget: z.ZodNullable<z.ZodNumber>;
|
|
568
610
|
boostingThreshold: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
611
|
+
biddingDelayInMinutes: z.ZodDefault<z.ZodNumber>;
|
|
612
|
+
biddingHourlyRateStrategy: z.ZodEnum<["match_job_budget", "match_profile_rate", "fixed_rate"]>;
|
|
613
|
+
biddingFixedHourlyRate: z.ZodNullable<z.ZodNumber>;
|
|
569
614
|
leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "viewed", "replied", "won"]>, z.ZodNumber>>;
|
|
570
615
|
expenses: z.ZodObject<{
|
|
571
616
|
biddingAmount: z.ZodDefault<z.ZodNumber>;
|
|
@@ -827,6 +872,48 @@ export declare const leadAnalysisActivitySchema: z.ZodObject<z.objectUtil.extend
|
|
|
827
872
|
updatedAt: z.ZodNumber;
|
|
828
873
|
openRouterApiKey: z.ZodNullable<z.ZodString>;
|
|
829
874
|
appTrialEndsAt: z.ZodNullable<z.ZodNumber>;
|
|
875
|
+
oneTimePayments: z.ZodOptional<z.ZodObject<{
|
|
876
|
+
usBidderAccountPayment: z.ZodOptional<z.ZodObject<{
|
|
877
|
+
paidAt: z.ZodOptional<z.ZodNumber>;
|
|
878
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
879
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
880
|
+
status: z.ZodString;
|
|
881
|
+
paymentIntentId: z.ZodOptional<z.ZodString>;
|
|
882
|
+
error: z.ZodOptional<z.ZodString>;
|
|
883
|
+
}, "strip", z.ZodTypeAny, {
|
|
884
|
+
status: string;
|
|
885
|
+
paidAt?: number | undefined;
|
|
886
|
+
amount?: number | undefined;
|
|
887
|
+
currency?: string | undefined;
|
|
888
|
+
paymentIntentId?: string | undefined;
|
|
889
|
+
error?: string | undefined;
|
|
890
|
+
}, {
|
|
891
|
+
status: string;
|
|
892
|
+
paidAt?: number | undefined;
|
|
893
|
+
amount?: number | undefined;
|
|
894
|
+
currency?: string | undefined;
|
|
895
|
+
paymentIntentId?: string | undefined;
|
|
896
|
+
error?: string | undefined;
|
|
897
|
+
}>>;
|
|
898
|
+
}, "strip", z.ZodTypeAny, {
|
|
899
|
+
usBidderAccountPayment?: {
|
|
900
|
+
status: string;
|
|
901
|
+
paidAt?: number | undefined;
|
|
902
|
+
amount?: number | undefined;
|
|
903
|
+
currency?: string | undefined;
|
|
904
|
+
paymentIntentId?: string | undefined;
|
|
905
|
+
error?: string | undefined;
|
|
906
|
+
} | undefined;
|
|
907
|
+
}, {
|
|
908
|
+
usBidderAccountPayment?: {
|
|
909
|
+
status: string;
|
|
910
|
+
paidAt?: number | undefined;
|
|
911
|
+
amount?: number | undefined;
|
|
912
|
+
currency?: string | undefined;
|
|
913
|
+
paymentIntentId?: string | undefined;
|
|
914
|
+
error?: string | undefined;
|
|
915
|
+
} | undefined;
|
|
916
|
+
}>>;
|
|
830
917
|
}, "id" | "name">, "strip", z.ZodTypeAny, {
|
|
831
918
|
id: string;
|
|
832
919
|
name: string;
|
|
@@ -1071,6 +1158,9 @@ export declare const leadAnalysisActivitySchema: z.ZodObject<z.objectUtil.extend
|
|
|
1071
1158
|
maximumBoost: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
1072
1159
|
monthlyBudget: z.ZodNullable<z.ZodNumber>;
|
|
1073
1160
|
boostingThreshold: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
1161
|
+
biddingDelayInMinutes: z.ZodDefault<z.ZodNumber>;
|
|
1162
|
+
biddingHourlyRateStrategy: z.ZodEnum<["match_job_budget", "match_profile_rate", "fixed_rate"]>;
|
|
1163
|
+
biddingFixedHourlyRate: z.ZodNullable<z.ZodNumber>;
|
|
1074
1164
|
leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "viewed", "replied", "won"]>, z.ZodNumber>>;
|
|
1075
1165
|
expenses: z.ZodObject<{
|
|
1076
1166
|
biddingAmount: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1683,6 +1773,48 @@ export declare const leadStatusActivitySchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
1683
1773
|
updatedAt: z.ZodNumber;
|
|
1684
1774
|
openRouterApiKey: z.ZodNullable<z.ZodString>;
|
|
1685
1775
|
appTrialEndsAt: z.ZodNullable<z.ZodNumber>;
|
|
1776
|
+
oneTimePayments: z.ZodOptional<z.ZodObject<{
|
|
1777
|
+
usBidderAccountPayment: z.ZodOptional<z.ZodObject<{
|
|
1778
|
+
paidAt: z.ZodOptional<z.ZodNumber>;
|
|
1779
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
1780
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
1781
|
+
status: z.ZodString;
|
|
1782
|
+
paymentIntentId: z.ZodOptional<z.ZodString>;
|
|
1783
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1784
|
+
}, "strip", z.ZodTypeAny, {
|
|
1785
|
+
status: string;
|
|
1786
|
+
paidAt?: number | undefined;
|
|
1787
|
+
amount?: number | undefined;
|
|
1788
|
+
currency?: string | undefined;
|
|
1789
|
+
paymentIntentId?: string | undefined;
|
|
1790
|
+
error?: string | undefined;
|
|
1791
|
+
}, {
|
|
1792
|
+
status: string;
|
|
1793
|
+
paidAt?: number | undefined;
|
|
1794
|
+
amount?: number | undefined;
|
|
1795
|
+
currency?: string | undefined;
|
|
1796
|
+
paymentIntentId?: string | undefined;
|
|
1797
|
+
error?: string | undefined;
|
|
1798
|
+
}>>;
|
|
1799
|
+
}, "strip", z.ZodTypeAny, {
|
|
1800
|
+
usBidderAccountPayment?: {
|
|
1801
|
+
status: string;
|
|
1802
|
+
paidAt?: number | undefined;
|
|
1803
|
+
amount?: number | undefined;
|
|
1804
|
+
currency?: string | undefined;
|
|
1805
|
+
paymentIntentId?: string | undefined;
|
|
1806
|
+
error?: string | undefined;
|
|
1807
|
+
} | undefined;
|
|
1808
|
+
}, {
|
|
1809
|
+
usBidderAccountPayment?: {
|
|
1810
|
+
status: string;
|
|
1811
|
+
paidAt?: number | undefined;
|
|
1812
|
+
amount?: number | undefined;
|
|
1813
|
+
currency?: string | undefined;
|
|
1814
|
+
paymentIntentId?: string | undefined;
|
|
1815
|
+
error?: string | undefined;
|
|
1816
|
+
} | undefined;
|
|
1817
|
+
}>>;
|
|
1686
1818
|
}, "id" | "name">, "strip", z.ZodTypeAny, {
|
|
1687
1819
|
id: string;
|
|
1688
1820
|
name: string;
|
|
@@ -1927,6 +2059,9 @@ export declare const leadStatusActivitySchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
1927
2059
|
maximumBoost: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
1928
2060
|
monthlyBudget: z.ZodNullable<z.ZodNumber>;
|
|
1929
2061
|
boostingThreshold: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
2062
|
+
biddingDelayInMinutes: z.ZodDefault<z.ZodNumber>;
|
|
2063
|
+
biddingHourlyRateStrategy: z.ZodEnum<["match_job_budget", "match_profile_rate", "fixed_rate"]>;
|
|
2064
|
+
biddingFixedHourlyRate: z.ZodNullable<z.ZodNumber>;
|
|
1930
2065
|
leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "viewed", "replied", "won"]>, z.ZodNumber>>;
|
|
1931
2066
|
expenses: z.ZodObject<{
|
|
1932
2067
|
biddingAmount: z.ZodDefault<z.ZodNumber>;
|
|
@@ -2539,6 +2674,48 @@ export declare const proposalSentActivitySchema: z.ZodObject<z.objectUtil.extend
|
|
|
2539
2674
|
updatedAt: z.ZodNumber;
|
|
2540
2675
|
openRouterApiKey: z.ZodNullable<z.ZodString>;
|
|
2541
2676
|
appTrialEndsAt: z.ZodNullable<z.ZodNumber>;
|
|
2677
|
+
oneTimePayments: z.ZodOptional<z.ZodObject<{
|
|
2678
|
+
usBidderAccountPayment: z.ZodOptional<z.ZodObject<{
|
|
2679
|
+
paidAt: z.ZodOptional<z.ZodNumber>;
|
|
2680
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
2681
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
2682
|
+
status: z.ZodString;
|
|
2683
|
+
paymentIntentId: z.ZodOptional<z.ZodString>;
|
|
2684
|
+
error: z.ZodOptional<z.ZodString>;
|
|
2685
|
+
}, "strip", z.ZodTypeAny, {
|
|
2686
|
+
status: string;
|
|
2687
|
+
paidAt?: number | undefined;
|
|
2688
|
+
amount?: number | undefined;
|
|
2689
|
+
currency?: string | undefined;
|
|
2690
|
+
paymentIntentId?: string | undefined;
|
|
2691
|
+
error?: string | undefined;
|
|
2692
|
+
}, {
|
|
2693
|
+
status: string;
|
|
2694
|
+
paidAt?: number | undefined;
|
|
2695
|
+
amount?: number | undefined;
|
|
2696
|
+
currency?: string | undefined;
|
|
2697
|
+
paymentIntentId?: string | undefined;
|
|
2698
|
+
error?: string | undefined;
|
|
2699
|
+
}>>;
|
|
2700
|
+
}, "strip", z.ZodTypeAny, {
|
|
2701
|
+
usBidderAccountPayment?: {
|
|
2702
|
+
status: string;
|
|
2703
|
+
paidAt?: number | undefined;
|
|
2704
|
+
amount?: number | undefined;
|
|
2705
|
+
currency?: string | undefined;
|
|
2706
|
+
paymentIntentId?: string | undefined;
|
|
2707
|
+
error?: string | undefined;
|
|
2708
|
+
} | undefined;
|
|
2709
|
+
}, {
|
|
2710
|
+
usBidderAccountPayment?: {
|
|
2711
|
+
status: string;
|
|
2712
|
+
paidAt?: number | undefined;
|
|
2713
|
+
amount?: number | undefined;
|
|
2714
|
+
currency?: string | undefined;
|
|
2715
|
+
paymentIntentId?: string | undefined;
|
|
2716
|
+
error?: string | undefined;
|
|
2717
|
+
} | undefined;
|
|
2718
|
+
}>>;
|
|
2542
2719
|
}, "id" | "name">, "strip", z.ZodTypeAny, {
|
|
2543
2720
|
id: string;
|
|
2544
2721
|
name: string;
|
|
@@ -2783,6 +2960,9 @@ export declare const proposalSentActivitySchema: z.ZodObject<z.objectUtil.extend
|
|
|
2783
2960
|
maximumBoost: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
2784
2961
|
monthlyBudget: z.ZodNullable<z.ZodNumber>;
|
|
2785
2962
|
boostingThreshold: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
2963
|
+
biddingDelayInMinutes: z.ZodDefault<z.ZodNumber>;
|
|
2964
|
+
biddingHourlyRateStrategy: z.ZodEnum<["match_job_budget", "match_profile_rate", "fixed_rate"]>;
|
|
2965
|
+
biddingFixedHourlyRate: z.ZodNullable<z.ZodNumber>;
|
|
2786
2966
|
leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "viewed", "replied", "won"]>, z.ZodNumber>>;
|
|
2787
2967
|
expenses: z.ZodObject<{
|
|
2788
2968
|
biddingAmount: z.ZodDefault<z.ZodNumber>;
|
|
@@ -3392,6 +3572,48 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
|
|
|
3392
3572
|
updatedAt: z.ZodNumber;
|
|
3393
3573
|
openRouterApiKey: z.ZodNullable<z.ZodString>;
|
|
3394
3574
|
appTrialEndsAt: z.ZodNullable<z.ZodNumber>;
|
|
3575
|
+
oneTimePayments: z.ZodOptional<z.ZodObject<{
|
|
3576
|
+
usBidderAccountPayment: z.ZodOptional<z.ZodObject<{
|
|
3577
|
+
paidAt: z.ZodOptional<z.ZodNumber>;
|
|
3578
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
3579
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
3580
|
+
status: z.ZodString;
|
|
3581
|
+
paymentIntentId: z.ZodOptional<z.ZodString>;
|
|
3582
|
+
error: z.ZodOptional<z.ZodString>;
|
|
3583
|
+
}, "strip", z.ZodTypeAny, {
|
|
3584
|
+
status: string;
|
|
3585
|
+
paidAt?: number | undefined;
|
|
3586
|
+
amount?: number | undefined;
|
|
3587
|
+
currency?: string | undefined;
|
|
3588
|
+
paymentIntentId?: string | undefined;
|
|
3589
|
+
error?: string | undefined;
|
|
3590
|
+
}, {
|
|
3591
|
+
status: string;
|
|
3592
|
+
paidAt?: number | undefined;
|
|
3593
|
+
amount?: number | undefined;
|
|
3594
|
+
currency?: string | undefined;
|
|
3595
|
+
paymentIntentId?: string | undefined;
|
|
3596
|
+
error?: string | undefined;
|
|
3597
|
+
}>>;
|
|
3598
|
+
}, "strip", z.ZodTypeAny, {
|
|
3599
|
+
usBidderAccountPayment?: {
|
|
3600
|
+
status: string;
|
|
3601
|
+
paidAt?: number | undefined;
|
|
3602
|
+
amount?: number | undefined;
|
|
3603
|
+
currency?: string | undefined;
|
|
3604
|
+
paymentIntentId?: string | undefined;
|
|
3605
|
+
error?: string | undefined;
|
|
3606
|
+
} | undefined;
|
|
3607
|
+
}, {
|
|
3608
|
+
usBidderAccountPayment?: {
|
|
3609
|
+
status: string;
|
|
3610
|
+
paidAt?: number | undefined;
|
|
3611
|
+
amount?: number | undefined;
|
|
3612
|
+
currency?: string | undefined;
|
|
3613
|
+
paymentIntentId?: string | undefined;
|
|
3614
|
+
error?: string | undefined;
|
|
3615
|
+
} | undefined;
|
|
3616
|
+
}>>;
|
|
3395
3617
|
}, "id" | "name">, "strip", z.ZodTypeAny, {
|
|
3396
3618
|
id: string;
|
|
3397
3619
|
name: string;
|
|
@@ -3636,6 +3858,9 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
|
|
|
3636
3858
|
maximumBoost: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
3637
3859
|
monthlyBudget: z.ZodNullable<z.ZodNumber>;
|
|
3638
3860
|
boostingThreshold: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
3861
|
+
biddingDelayInMinutes: z.ZodDefault<z.ZodNumber>;
|
|
3862
|
+
biddingHourlyRateStrategy: z.ZodEnum<["match_job_budget", "match_profile_rate", "fixed_rate"]>;
|
|
3863
|
+
biddingFixedHourlyRate: z.ZodNullable<z.ZodNumber>;
|
|
3639
3864
|
leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "viewed", "replied", "won"]>, z.ZodNumber>>;
|
|
3640
3865
|
expenses: z.ZodObject<{
|
|
3641
3866
|
biddingAmount: z.ZodDefault<z.ZodNumber>;
|
|
@@ -3896,6 +4121,48 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
|
|
|
3896
4121
|
updatedAt: z.ZodNumber;
|
|
3897
4122
|
openRouterApiKey: z.ZodNullable<z.ZodString>;
|
|
3898
4123
|
appTrialEndsAt: z.ZodNullable<z.ZodNumber>;
|
|
4124
|
+
oneTimePayments: z.ZodOptional<z.ZodObject<{
|
|
4125
|
+
usBidderAccountPayment: z.ZodOptional<z.ZodObject<{
|
|
4126
|
+
paidAt: z.ZodOptional<z.ZodNumber>;
|
|
4127
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
4128
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
4129
|
+
status: z.ZodString;
|
|
4130
|
+
paymentIntentId: z.ZodOptional<z.ZodString>;
|
|
4131
|
+
error: z.ZodOptional<z.ZodString>;
|
|
4132
|
+
}, "strip", z.ZodTypeAny, {
|
|
4133
|
+
status: string;
|
|
4134
|
+
paidAt?: number | undefined;
|
|
4135
|
+
amount?: number | undefined;
|
|
4136
|
+
currency?: string | undefined;
|
|
4137
|
+
paymentIntentId?: string | undefined;
|
|
4138
|
+
error?: string | undefined;
|
|
4139
|
+
}, {
|
|
4140
|
+
status: string;
|
|
4141
|
+
paidAt?: number | undefined;
|
|
4142
|
+
amount?: number | undefined;
|
|
4143
|
+
currency?: string | undefined;
|
|
4144
|
+
paymentIntentId?: string | undefined;
|
|
4145
|
+
error?: string | undefined;
|
|
4146
|
+
}>>;
|
|
4147
|
+
}, "strip", z.ZodTypeAny, {
|
|
4148
|
+
usBidderAccountPayment?: {
|
|
4149
|
+
status: string;
|
|
4150
|
+
paidAt?: number | undefined;
|
|
4151
|
+
amount?: number | undefined;
|
|
4152
|
+
currency?: string | undefined;
|
|
4153
|
+
paymentIntentId?: string | undefined;
|
|
4154
|
+
error?: string | undefined;
|
|
4155
|
+
} | undefined;
|
|
4156
|
+
}, {
|
|
4157
|
+
usBidderAccountPayment?: {
|
|
4158
|
+
status: string;
|
|
4159
|
+
paidAt?: number | undefined;
|
|
4160
|
+
amount?: number | undefined;
|
|
4161
|
+
currency?: string | undefined;
|
|
4162
|
+
paymentIntentId?: string | undefined;
|
|
4163
|
+
error?: string | undefined;
|
|
4164
|
+
} | undefined;
|
|
4165
|
+
}>>;
|
|
3899
4166
|
}, "id" | "name">, "strip", z.ZodTypeAny, {
|
|
3900
4167
|
id: string;
|
|
3901
4168
|
name: string;
|
|
@@ -4140,6 +4407,9 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
|
|
|
4140
4407
|
maximumBoost: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
4141
4408
|
monthlyBudget: z.ZodNullable<z.ZodNumber>;
|
|
4142
4409
|
boostingThreshold: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
4410
|
+
biddingDelayInMinutes: z.ZodDefault<z.ZodNumber>;
|
|
4411
|
+
biddingHourlyRateStrategy: z.ZodEnum<["match_job_budget", "match_profile_rate", "fixed_rate"]>;
|
|
4412
|
+
biddingFixedHourlyRate: z.ZodNullable<z.ZodNumber>;
|
|
4143
4413
|
leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "viewed", "replied", "won"]>, z.ZodNumber>>;
|
|
4144
4414
|
expenses: z.ZodObject<{
|
|
4145
4415
|
biddingAmount: z.ZodDefault<z.ZodNumber>;
|
|
@@ -4751,6 +5021,48 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
|
|
|
4751
5021
|
updatedAt: z.ZodNumber;
|
|
4752
5022
|
openRouterApiKey: z.ZodNullable<z.ZodString>;
|
|
4753
5023
|
appTrialEndsAt: z.ZodNullable<z.ZodNumber>;
|
|
5024
|
+
oneTimePayments: z.ZodOptional<z.ZodObject<{
|
|
5025
|
+
usBidderAccountPayment: z.ZodOptional<z.ZodObject<{
|
|
5026
|
+
paidAt: z.ZodOptional<z.ZodNumber>;
|
|
5027
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
5028
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
5029
|
+
status: z.ZodString;
|
|
5030
|
+
paymentIntentId: z.ZodOptional<z.ZodString>;
|
|
5031
|
+
error: z.ZodOptional<z.ZodString>;
|
|
5032
|
+
}, "strip", z.ZodTypeAny, {
|
|
5033
|
+
status: string;
|
|
5034
|
+
paidAt?: number | undefined;
|
|
5035
|
+
amount?: number | undefined;
|
|
5036
|
+
currency?: string | undefined;
|
|
5037
|
+
paymentIntentId?: string | undefined;
|
|
5038
|
+
error?: string | undefined;
|
|
5039
|
+
}, {
|
|
5040
|
+
status: string;
|
|
5041
|
+
paidAt?: number | undefined;
|
|
5042
|
+
amount?: number | undefined;
|
|
5043
|
+
currency?: string | undefined;
|
|
5044
|
+
paymentIntentId?: string | undefined;
|
|
5045
|
+
error?: string | undefined;
|
|
5046
|
+
}>>;
|
|
5047
|
+
}, "strip", z.ZodTypeAny, {
|
|
5048
|
+
usBidderAccountPayment?: {
|
|
5049
|
+
status: string;
|
|
5050
|
+
paidAt?: number | undefined;
|
|
5051
|
+
amount?: number | undefined;
|
|
5052
|
+
currency?: string | undefined;
|
|
5053
|
+
paymentIntentId?: string | undefined;
|
|
5054
|
+
error?: string | undefined;
|
|
5055
|
+
} | undefined;
|
|
5056
|
+
}, {
|
|
5057
|
+
usBidderAccountPayment?: {
|
|
5058
|
+
status: string;
|
|
5059
|
+
paidAt?: number | undefined;
|
|
5060
|
+
amount?: number | undefined;
|
|
5061
|
+
currency?: string | undefined;
|
|
5062
|
+
paymentIntentId?: string | undefined;
|
|
5063
|
+
error?: string | undefined;
|
|
5064
|
+
} | undefined;
|
|
5065
|
+
}>>;
|
|
4754
5066
|
}, "id" | "name">, "strip", z.ZodTypeAny, {
|
|
4755
5067
|
id: string;
|
|
4756
5068
|
name: string;
|
|
@@ -4995,6 +5307,9 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
|
|
|
4995
5307
|
maximumBoost: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
4996
5308
|
monthlyBudget: z.ZodNullable<z.ZodNumber>;
|
|
4997
5309
|
boostingThreshold: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
5310
|
+
biddingDelayInMinutes: z.ZodDefault<z.ZodNumber>;
|
|
5311
|
+
biddingHourlyRateStrategy: z.ZodEnum<["match_job_budget", "match_profile_rate", "fixed_rate"]>;
|
|
5312
|
+
biddingFixedHourlyRate: z.ZodNullable<z.ZodNumber>;
|
|
4998
5313
|
leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "viewed", "replied", "won"]>, z.ZodNumber>>;
|
|
4999
5314
|
expenses: z.ZodObject<{
|
|
5000
5315
|
biddingAmount: z.ZodDefault<z.ZodNumber>;
|
|
@@ -5606,6 +5921,48 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
|
|
|
5606
5921
|
updatedAt: z.ZodNumber;
|
|
5607
5922
|
openRouterApiKey: z.ZodNullable<z.ZodString>;
|
|
5608
5923
|
appTrialEndsAt: z.ZodNullable<z.ZodNumber>;
|
|
5924
|
+
oneTimePayments: z.ZodOptional<z.ZodObject<{
|
|
5925
|
+
usBidderAccountPayment: z.ZodOptional<z.ZodObject<{
|
|
5926
|
+
paidAt: z.ZodOptional<z.ZodNumber>;
|
|
5927
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
5928
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
5929
|
+
status: z.ZodString;
|
|
5930
|
+
paymentIntentId: z.ZodOptional<z.ZodString>;
|
|
5931
|
+
error: z.ZodOptional<z.ZodString>;
|
|
5932
|
+
}, "strip", z.ZodTypeAny, {
|
|
5933
|
+
status: string;
|
|
5934
|
+
paidAt?: number | undefined;
|
|
5935
|
+
amount?: number | undefined;
|
|
5936
|
+
currency?: string | undefined;
|
|
5937
|
+
paymentIntentId?: string | undefined;
|
|
5938
|
+
error?: string | undefined;
|
|
5939
|
+
}, {
|
|
5940
|
+
status: string;
|
|
5941
|
+
paidAt?: number | undefined;
|
|
5942
|
+
amount?: number | undefined;
|
|
5943
|
+
currency?: string | undefined;
|
|
5944
|
+
paymentIntentId?: string | undefined;
|
|
5945
|
+
error?: string | undefined;
|
|
5946
|
+
}>>;
|
|
5947
|
+
}, "strip", z.ZodTypeAny, {
|
|
5948
|
+
usBidderAccountPayment?: {
|
|
5949
|
+
status: string;
|
|
5950
|
+
paidAt?: number | undefined;
|
|
5951
|
+
amount?: number | undefined;
|
|
5952
|
+
currency?: string | undefined;
|
|
5953
|
+
paymentIntentId?: string | undefined;
|
|
5954
|
+
error?: string | undefined;
|
|
5955
|
+
} | undefined;
|
|
5956
|
+
}, {
|
|
5957
|
+
usBidderAccountPayment?: {
|
|
5958
|
+
status: string;
|
|
5959
|
+
paidAt?: number | undefined;
|
|
5960
|
+
amount?: number | undefined;
|
|
5961
|
+
currency?: string | undefined;
|
|
5962
|
+
paymentIntentId?: string | undefined;
|
|
5963
|
+
error?: string | undefined;
|
|
5964
|
+
} | undefined;
|
|
5965
|
+
}>>;
|
|
5609
5966
|
}, "id" | "name">, "strip", z.ZodTypeAny, {
|
|
5610
5967
|
id: string;
|
|
5611
5968
|
name: string;
|
|
@@ -5850,6 +6207,9 @@ export declare const campaignActivitySchema: z.ZodDiscriminatedUnion<"type", [z.
|
|
|
5850
6207
|
maximumBoost: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
5851
6208
|
monthlyBudget: z.ZodNullable<z.ZodNumber>;
|
|
5852
6209
|
boostingThreshold: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
6210
|
+
biddingDelayInMinutes: z.ZodDefault<z.ZodNumber>;
|
|
6211
|
+
biddingHourlyRateStrategy: z.ZodEnum<["match_job_budget", "match_profile_rate", "fixed_rate"]>;
|
|
6212
|
+
biddingFixedHourlyRate: z.ZodNullable<z.ZodNumber>;
|
|
5853
6213
|
leadCounts: z.ZodNullable<z.ZodRecord<z.ZodEnum<["leads", "contacted", "viewed", "replied", "won"]>, z.ZodNumber>>;
|
|
5854
6214
|
expenses: z.ZodObject<{
|
|
5855
6215
|
biddingAmount: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
replied: zod_1.z.number(),
|
|
12
|
-
negotiations: zod_1.z.number(),
|
|
13
|
-
won: zod_1.z.number(),
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { leadStatusSchema, upworkJobSchema } from "../lead";
|
|
3
|
+
export const campaignAnalyticsStatsSchema = z.object({
|
|
4
|
+
jobsAnalyzed: z.number(),
|
|
5
|
+
totalStats: z.object({
|
|
6
|
+
contacted: z.number(),
|
|
7
|
+
viewed: z.number(),
|
|
8
|
+
replied: z.number(),
|
|
9
|
+
negotiations: z.number(),
|
|
10
|
+
won: z.number(),
|
|
14
11
|
}),
|
|
15
|
-
statsByDate:
|
|
16
|
-
label:
|
|
17
|
-
contacted:
|
|
18
|
-
viewed:
|
|
19
|
-
replied:
|
|
20
|
-
negotiations:
|
|
21
|
-
won:
|
|
12
|
+
statsByDate: z.array(z.object({
|
|
13
|
+
label: z.string(),
|
|
14
|
+
contacted: z.number(),
|
|
15
|
+
viewed: z.number(),
|
|
16
|
+
replied: z.number(),
|
|
17
|
+
negotiations: z.number(),
|
|
18
|
+
won: z.number(),
|
|
22
19
|
})),
|
|
23
20
|
});
|
|
24
|
-
|
|
25
|
-
jobsAnalyzed:
|
|
26
|
-
contacted:
|
|
27
|
-
viewed:
|
|
28
|
-
replied:
|
|
29
|
-
negotiations:
|
|
30
|
-
won:
|
|
21
|
+
export const campaignAnalyticsResponseSchema = z.object({
|
|
22
|
+
jobsAnalyzed: z.number(),
|
|
23
|
+
contacted: z.number(),
|
|
24
|
+
viewed: z.number(),
|
|
25
|
+
replied: z.number(),
|
|
26
|
+
negotiations: z.number(),
|
|
27
|
+
won: z.number(),
|
|
31
28
|
});
|
|
32
|
-
|
|
33
|
-
createdAt:
|
|
34
|
-
status:
|
|
35
|
-
job:
|
|
29
|
+
export const campaignActivitySchema = z.object({
|
|
30
|
+
createdAt: z.number(),
|
|
31
|
+
status: leadStatusSchema,
|
|
32
|
+
job: upworkJobSchema.pick({
|
|
36
33
|
id: true,
|
|
37
34
|
title: true,
|
|
38
35
|
datetime: true,
|
|
39
36
|
jobUrl: true,
|
|
40
37
|
}),
|
|
41
38
|
});
|
|
39
|
+
export const campaignActivityCreateSchema = campaignActivitySchema.pick({
|
|
40
|
+
status: true,
|
|
41
|
+
job: true,
|
|
42
|
+
});
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
biddingAmount: zod_1.z.number().default(0),
|
|
7
|
-
boostingAmount: zod_1.z.number().default(0),
|
|
8
|
-
boosted: zod_1.z.number().default(0),
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const campaignExpensesSchema = z.object({
|
|
3
|
+
biddingAmount: z.number().default(0),
|
|
4
|
+
boostingAmount: z.number().default(0),
|
|
5
|
+
boosted: z.number().default(0),
|
|
9
6
|
});
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
pipelineHealth:
|
|
16
|
-
biddingAmount:
|
|
17
|
-
boostingAmount:
|
|
18
|
-
boostedProposalsCount:
|
|
19
|
-
totalProposalsCount:
|
|
20
|
-
totalExpenses:
|
|
21
|
-
suitabilityRange0to10:
|
|
22
|
-
suitabilityRange10to20:
|
|
23
|
-
suitabilityRange20to30:
|
|
24
|
-
suitabilityRange30to40:
|
|
25
|
-
suitabilityRange40to50:
|
|
26
|
-
suitabilityRange50to60:
|
|
27
|
-
suitabilityRange60to70:
|
|
28
|
-
suitabilityRange70to80:
|
|
29
|
-
suitabilityRange80to90:
|
|
30
|
-
suitabilityRange90to100:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { agentStatusSchema } from "../lead";
|
|
3
|
+
export const campaignCountByStatusSchema = z.object({
|
|
4
|
+
// Using z.enum values to create a schema with all possible job statuses
|
|
5
|
+
...Object.fromEntries(Object.values(agentStatusSchema.enum).map((status) => [
|
|
6
|
+
status,
|
|
7
|
+
z.object({
|
|
8
|
+
boosted: z.number(),
|
|
9
|
+
organic: z.number(),
|
|
10
|
+
total: z.number(),
|
|
11
|
+
}),
|
|
12
|
+
])),
|
|
13
|
+
});
|
|
14
|
+
export const campaignInsightsSchema = z.object({
|
|
15
|
+
pipelineHealth: campaignCountByStatusSchema,
|
|
16
|
+
biddingAmount: z.number().default(0),
|
|
17
|
+
boostingAmount: z.number().default(0),
|
|
18
|
+
boostedProposalsCount: z.number().default(0),
|
|
19
|
+
totalProposalsCount: z.number().default(0),
|
|
20
|
+
totalExpenses: z.number().default(0),
|
|
21
|
+
suitabilityRange0to10: z.number(),
|
|
22
|
+
suitabilityRange10to20: z.number(),
|
|
23
|
+
suitabilityRange20to30: z.number(),
|
|
24
|
+
suitabilityRange30to40: z.number(),
|
|
25
|
+
suitabilityRange40to50: z.number(),
|
|
26
|
+
suitabilityRange50to60: z.number(),
|
|
27
|
+
suitabilityRange60to70: z.number(),
|
|
28
|
+
suitabilityRange70to80: z.number(),
|
|
29
|
+
suitabilityRange80to90: z.number(),
|
|
30
|
+
suitabilityRange90to100: z.number(),
|
|
31
31
|
});
|
|
@@ -80,3 +80,8 @@ export declare const updateCampaignIntegrationsSchema: z.ZodObject<{
|
|
|
80
80
|
slack: string | null;
|
|
81
81
|
} | undefined;
|
|
82
82
|
}>;
|
|
83
|
+
export type CampaignIntegration = z.infer<typeof campaignIntegrations>;
|
|
84
|
+
export interface CampaignIntegrations extends z.infer<typeof campaignIntegrationsSchema> {
|
|
85
|
+
}
|
|
86
|
+
export interface UpdateCampaignIntegrations extends z.infer<typeof updateCampaignIntegrationsSchema> {
|
|
87
|
+
}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
suitabilityHooks: zod_1.z.object({
|
|
8
|
-
discord: zod_1.z.string().url().nullable(),
|
|
9
|
-
slack: zod_1.z.string().url().nullable(),
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const campaignIntegrations = z.enum(["discord", "slack"]);
|
|
3
|
+
export const campaignIntegrationsSchema = z.object({
|
|
4
|
+
suitabilityHooks: z.object({
|
|
5
|
+
discord: z.string().url().nullable(),
|
|
6
|
+
slack: z.string().url().nullable(),
|
|
10
7
|
}),
|
|
11
|
-
proposalSentHooks:
|
|
12
|
-
discord:
|
|
13
|
-
slack:
|
|
8
|
+
proposalSentHooks: z.object({
|
|
9
|
+
discord: z.string().url().nullable(),
|
|
10
|
+
slack: z.string().url().nullable(),
|
|
14
11
|
}),
|
|
15
12
|
});
|
|
16
|
-
|
|
13
|
+
export const updateCampaignIntegrationsSchema = campaignIntegrationsSchema.partial();
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const lead_1 = require("../lead");
|
|
6
|
-
exports.campaignJobCountSchema = zod_1.z.record(lead_1.leadStatusSchema, zod_1.z.number());
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { leadStatusSchema } from "../lead";
|
|
3
|
+
export const campaignJobCountSchema = z.record(leadStatusSchema, z.number());
|