lancer-shared 1.2.336 → 1.2.338
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 +86 -0
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +80 -1
- package/dist/bundle.esm.js.map +1 -1
- package/dist/constants/routes.d.ts +4 -0
- package/dist/schemas/account/bidder-account.d.ts +71 -0
- package/dist/schemas/bidder/exceptions/index.d.ts +3 -0
- package/dist/schemas/dashboard/index.d.ts +195 -0
- package/dist/schemas/logger/log-event.d.ts +33 -10
- package/dist/schemas/scraper/scrape-payload.d.ts +36 -0
- package/dist/schemas/usage-event/index.d.ts +6 -6
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -6769,6 +6769,14 @@ const bidderAccountSchema = z.object({
|
|
|
6769
6769
|
userId: z.string().nullable(),
|
|
6770
6770
|
connectingToChatStartedAt: z.number().nullable(),
|
|
6771
6771
|
shouldRefetchAllRooms: z.boolean().nullable(),
|
|
6772
|
+
assignedOrganizationPlans: z
|
|
6773
|
+
.array(z.object({
|
|
6774
|
+
organizationId: z.string(),
|
|
6775
|
+
planId: z.string().nullable(),
|
|
6776
|
+
}))
|
|
6777
|
+
.optional(),
|
|
6778
|
+
assignedOrganizationNames: z.array(z.string()).optional(),
|
|
6779
|
+
biddingCompleteLast30Days: z.number().optional(),
|
|
6772
6780
|
});
|
|
6773
6781
|
const connectUpworkAccountSchema = z.object({
|
|
6774
6782
|
email: z.string().email(),
|
|
@@ -6820,6 +6828,10 @@ const reconnectBidderAccountRequestBodySchema = z.object({
|
|
|
6820
6828
|
organizationId: z.string(),
|
|
6821
6829
|
bidderAccountId: z.string(),
|
|
6822
6830
|
});
|
|
6831
|
+
const assignDecodoProxyToBidderAccountSchema = z.object({
|
|
6832
|
+
proxyString: z.string().min(1),
|
|
6833
|
+
country: proxyCountryEnum,
|
|
6834
|
+
});
|
|
6823
6835
|
const reconnectBidderAccountResponseSchema = z.object({
|
|
6824
6836
|
agencyName: z.string(),
|
|
6825
6837
|
photoUrl: z.string(),
|
|
@@ -8899,6 +8911,20 @@ class WaitForFunctionTimeoutError extends Error {
|
|
|
8899
8911
|
}
|
|
8900
8912
|
const waitForFunctionTimeoutError = (fn, timeout) => new WaitForFunctionTimeoutError(fn, timeout);
|
|
8901
8913
|
|
|
8914
|
+
const TRACKED_BID_FAILURE_MONITORING_CODES = [
|
|
8915
|
+
'CLOUDFLARE_CHALLENGE_FAILED_EXCEPTION',
|
|
8916
|
+
'GO_TO_URL_EXCEPTION',
|
|
8917
|
+
'SELECTOR_NOT_FOUND_ERROR',
|
|
8918
|
+
'PROPOSAL_SUBMIT_FAILED',
|
|
8919
|
+
'PROXY_NOT_REACHABLE_EXCEPTION',
|
|
8920
|
+
'ELEMENT_NOT_CLICKABLE_EXCEPTION',
|
|
8921
|
+
'LOGIN_FAILED_EXCEPTION',
|
|
8922
|
+
'INVALID_CREDENTIALS_EXCEPTION',
|
|
8923
|
+
'NETWORK_RESTRICTIONS_EXCEPTION',
|
|
8924
|
+
];
|
|
8925
|
+
const TRACKED_BID_FAILURE_MONITORING_CODES_SET = new Set(TRACKED_BID_FAILURE_MONITORING_CODES);
|
|
8926
|
+
const isTrackedBidFailureMonitoringCode = (code) => !!code && TRACKED_BID_FAILURE_MONITORING_CODES_SET.has(code);
|
|
8927
|
+
|
|
8902
8928
|
const syncProposalsStatusRequestPayloadSchema = z.object({
|
|
8903
8929
|
organizationId: z.string(),
|
|
8904
8930
|
bidderAccountId: z.string(),
|
|
@@ -9069,6 +9095,46 @@ const organizationCampaignStatsSchema = z.object({
|
|
|
9069
9095
|
totalStats: campaignStatsSchema,
|
|
9070
9096
|
campaigns: z.array(campaignDetailsSchema),
|
|
9071
9097
|
});
|
|
9098
|
+
const monitoringBidFailureRecordSchema = z.object({
|
|
9099
|
+
id: z.string(),
|
|
9100
|
+
eventId: z.string(),
|
|
9101
|
+
timestamp: z.number(),
|
|
9102
|
+
organizationId: z.string().nullable(),
|
|
9103
|
+
organizationName: z.string().nullable(),
|
|
9104
|
+
campaignId: z.string().nullable(),
|
|
9105
|
+
leadId: z.string().nullable(),
|
|
9106
|
+
reason: z.string().nullable(),
|
|
9107
|
+
errorCode: z.string().nullable(),
|
|
9108
|
+
errorMessage: z.string().nullable(),
|
|
9109
|
+
});
|
|
9110
|
+
const bidderMonitoringRowSchema = z.object({
|
|
9111
|
+
eventType: z.enum([
|
|
9112
|
+
'biddingFailed',
|
|
9113
|
+
'syncProposalsStatusFailed',
|
|
9114
|
+
'refreshRoomsFailed',
|
|
9115
|
+
]),
|
|
9116
|
+
eventId: z.string(),
|
|
9117
|
+
bidderAccountId: z.string().nullable(),
|
|
9118
|
+
email: z.string().nullable(),
|
|
9119
|
+
proxyString: z.string().nullable(),
|
|
9120
|
+
timestamp: z.number(),
|
|
9121
|
+
organizationId: z.string().nullable(),
|
|
9122
|
+
organizationName: z.string().nullable(),
|
|
9123
|
+
campaignId: z.string().nullable(),
|
|
9124
|
+
leadId: z.string().nullable(),
|
|
9125
|
+
reason: z.string().nullable(),
|
|
9126
|
+
errorCode: z.string().nullable(),
|
|
9127
|
+
errorMessage: z.string().nullable(),
|
|
9128
|
+
screenshotUrl: z.string().nullable(),
|
|
9129
|
+
attempt: z.number().nullable(),
|
|
9130
|
+
viewed: z.boolean(),
|
|
9131
|
+
viewedAt: z.number().nullable(),
|
|
9132
|
+
});
|
|
9133
|
+
const bidderFailureDashboardResponseSchema = z.object({
|
|
9134
|
+
items: z.array(bidderMonitoringRowSchema),
|
|
9135
|
+
totalFailures: z.number(),
|
|
9136
|
+
unviewedCount: z.number(),
|
|
9137
|
+
});
|
|
9072
9138
|
|
|
9073
9139
|
const labelEnum = z.enum(['suitable', 'unsuitable']);
|
|
9074
9140
|
const sampleSchema = z.object({
|
|
@@ -9341,6 +9407,7 @@ const LogEventTypeEnum = z.enum([
|
|
|
9341
9407
|
// Bidder Account Events
|
|
9342
9408
|
'verifyCredentialsSucceeded',
|
|
9343
9409
|
'verifyCredentialsFailed',
|
|
9410
|
+
'refreshRoomsFailed',
|
|
9344
9411
|
]);
|
|
9345
9412
|
const logEventSchema = z.object({
|
|
9346
9413
|
// The type of event (use a z.enum if possible)
|
|
@@ -9373,6 +9440,7 @@ const biddingCompletedEventMetadata = objectType({
|
|
|
9373
9440
|
});
|
|
9374
9441
|
const biddingFailedEventMetadata = objectType({
|
|
9375
9442
|
error: z.any(),
|
|
9443
|
+
screenshotUrl: z.string().url().optional(),
|
|
9376
9444
|
});
|
|
9377
9445
|
const biddingProcessingEventMetadata = objectType({
|
|
9378
9446
|
jobUrl: z.string(),
|
|
@@ -9385,6 +9453,7 @@ const syncProposalsStatusCompletedEventMetadata = objectType({
|
|
|
9385
9453
|
});
|
|
9386
9454
|
const syncProposalsStatusFailedEventMetadata = objectType({
|
|
9387
9455
|
error: z.any(),
|
|
9456
|
+
bidderAccountId: z.string().optional(),
|
|
9388
9457
|
});
|
|
9389
9458
|
const userAccountBiddingExceptionEventMetadata = objectType({
|
|
9390
9459
|
errorType: z.enum(['insufficientConnects', 'proposalFormWarningAlert']),
|
|
@@ -9430,6 +9499,12 @@ const verifyCredentialsFailedEventMetadataSchema = objectType({
|
|
|
9430
9499
|
bidderAccountId: z.string(),
|
|
9431
9500
|
errorMessage: z.string(),
|
|
9432
9501
|
});
|
|
9502
|
+
const refreshRoomsFailedEventMetadataSchema = objectType({
|
|
9503
|
+
bidderAccountId: z.string().optional(),
|
|
9504
|
+
errorMessage: z.string().optional(),
|
|
9505
|
+
errorCode: z.string().optional(),
|
|
9506
|
+
context: z.string().optional(),
|
|
9507
|
+
});
|
|
9433
9508
|
const suitabilityPendingEventMetadataSchema = objectType({
|
|
9434
9509
|
jobId: z.string(),
|
|
9435
9510
|
jobUrl: z.string(),
|
|
@@ -15765,6 +15840,7 @@ const ROUTES = {
|
|
|
15765
15840
|
REFRESH_WITH_IPROYAL_PROXY: (bidderId) => `admin/bidder-accounts/${bidderId}/refresh-with-iproyal-proxy`,
|
|
15766
15841
|
AGENCIES: 'admin/bidder-accounts/agencies',
|
|
15767
15842
|
ASSIGN_IPROYAL_PROXY: (bidderId) => `admin/bidder-accounts/${bidderId}/assign-iproyal-proxy`,
|
|
15843
|
+
ASSIGN_DECODO_PROXY: (bidderId) => `admin/bidder-accounts/${bidderId}/assign-decodo-proxy`,
|
|
15768
15844
|
},
|
|
15769
15845
|
SCRAPER_ACCOUNTS: {
|
|
15770
15846
|
BASE: 'admin/scraper-accounts',
|
|
@@ -15783,6 +15859,9 @@ const ROUTES = {
|
|
|
15783
15859
|
},
|
|
15784
15860
|
DASHBOARD: {
|
|
15785
15861
|
CAMPAIGN_STATS: 'admin/dashboard/campaign-stats',
|
|
15862
|
+
BIDDER_FAILURES: 'admin/dashboard/bidder-failures',
|
|
15863
|
+
MARK_BIDDER_FAILURE_VIEWED: (eventId) => `admin/dashboard/bidder-failures/${eventId}/viewed`,
|
|
15864
|
+
BIDDER_FAILURE_VIEWS: 'admin/dashboard/bidder-failure-views',
|
|
15786
15865
|
},
|
|
15787
15866
|
ALERTS: {
|
|
15788
15867
|
BASE: 'admin/alerts',
|
|
@@ -24724,6 +24803,7 @@ exports.SearchQueryBuilder = SearchQueryBuilder;
|
|
|
24724
24803
|
exports.SelectAgencyException = SelectAgencyException;
|
|
24725
24804
|
exports.SelectContractorException = SelectContractorException;
|
|
24726
24805
|
exports.SelectorNotFoundError = SelectorNotFoundError;
|
|
24806
|
+
exports.TRACKED_BID_FAILURE_MONITORING_CODES = TRACKED_BID_FAILURE_MONITORING_CODES;
|
|
24727
24807
|
exports.TwoFactorPresentException = TwoFactorPresentException;
|
|
24728
24808
|
exports.TypedValueInFieldNotMatchingException = TypedValueInFieldNotMatchingException;
|
|
24729
24809
|
exports.TypingInputFieldException = TypingInputFieldException;
|
|
@@ -24750,6 +24830,7 @@ exports.agentStatusSchema = agentStatusSchema;
|
|
|
24750
24830
|
exports.agentTaskResponseSchema = agentTaskResponseSchema;
|
|
24751
24831
|
exports.aiConfigSchema = aiConfigSchema;
|
|
24752
24832
|
exports.alreadyHiredActionEnum = alreadyHiredActionEnum;
|
|
24833
|
+
exports.assignDecodoProxyToBidderAccountSchema = assignDecodoProxyToBidderAccountSchema;
|
|
24753
24834
|
exports.assignRoomTagsRequestBodySchema = assignRoomTagsRequestBodySchema;
|
|
24754
24835
|
exports.bidAsEnum = bidAsEnum;
|
|
24755
24836
|
exports.bidConfigSchema = bidConfigSchema;
|
|
@@ -24768,8 +24849,10 @@ exports.bidderAccountProvider = bidderAccountProvider;
|
|
|
24768
24849
|
exports.bidderAccountProviderDisplayMap = bidderAccountProviderDisplayMap;
|
|
24769
24850
|
exports.bidderAccountSchema = bidderAccountSchema;
|
|
24770
24851
|
exports.bidderAccountStatusEnum = bidderAccountStatusEnum;
|
|
24852
|
+
exports.bidderFailureDashboardResponseSchema = bidderFailureDashboardResponseSchema;
|
|
24771
24853
|
exports.bidderInstanceSchema = bidderInstanceSchema;
|
|
24772
24854
|
exports.bidderInstanceStatusEnum = bidderInstanceStatusEnum;
|
|
24855
|
+
exports.bidderMonitoringRowSchema = bidderMonitoringRowSchema;
|
|
24773
24856
|
exports.biddingCompletedEventMetadata = biddingCompletedEventMetadata;
|
|
24774
24857
|
exports.biddingFailedEventMetadata = biddingFailedEventMetadata;
|
|
24775
24858
|
exports.biddingHourlyRateStrategyEnum = biddingHourlyRateStrategyEnum;
|
|
@@ -24926,6 +25009,7 @@ exports.isNumeric = isNumeric;
|
|
|
24926
25009
|
exports.isPaymentVerifiedEnum = isPaymentVerifiedEnum;
|
|
24927
25010
|
exports.isPhoneVerifiedEnum = isPhoneVerifiedEnum;
|
|
24928
25011
|
exports.isRoomCrmStatus = isRoomCrmStatus;
|
|
25012
|
+
exports.isTrackedBidFailureMonitoringCode = isTrackedBidFailureMonitoringCode;
|
|
24929
25013
|
exports.isWorkTime = isWorkTime;
|
|
24930
25014
|
exports.jobActivityDeltaSchema = jobActivityDeltaSchema;
|
|
24931
25015
|
exports.jobActivityOffsetEnum = jobActivityOffsetEnum;
|
|
@@ -24962,6 +25046,7 @@ exports.logEventSchema = logEventSchema;
|
|
|
24962
25046
|
exports.loginFailedException = loginFailedException;
|
|
24963
25047
|
exports.loginSchema = loginSchema;
|
|
24964
25048
|
exports.metadataSchema = metadataSchema;
|
|
25049
|
+
exports.monitoringBidFailureRecordSchema = monitoringBidFailureRecordSchema;
|
|
24965
25050
|
exports.multiloginAuthenticationException = multiloginAuthenticationException;
|
|
24966
25051
|
exports.navigationTimeoutException = navigationTimeoutException;
|
|
24967
25052
|
exports.networkRestrictionsException = networkRestrictionsException;
|
|
@@ -25032,6 +25117,7 @@ exports.questionPairNotMatchingException = questionPairNotMatchingException;
|
|
|
25032
25117
|
exports.questionRulesSchema = questionRulesSchema;
|
|
25033
25118
|
exports.reconnectBidderAccountRequestBodySchema = reconnectBidderAccountRequestBodySchema;
|
|
25034
25119
|
exports.reconnectBidderAccountResponseSchema = reconnectBidderAccountResponseSchema;
|
|
25120
|
+
exports.refreshRoomsFailedEventMetadataSchema = refreshRoomsFailedEventMetadataSchema;
|
|
25035
25121
|
exports.refreshRotatingProxiesRequestBodySchema = refreshRotatingProxiesRequestBodySchema;
|
|
25036
25122
|
exports.regionEnum = regionEnum;
|
|
25037
25123
|
exports.regionMapping = regionMapping;
|