lancer-shared 1.2.326 → 1.2.328
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 +112 -0
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +100 -1
- package/dist/bundle.esm.js.map +1 -1
- package/dist/constants/chat.d.ts +17 -1
- package/dist/constants/routes.d.ts +2 -0
- package/dist/schemas/account/bidder-account.d.ts +33 -33
- package/dist/schemas/account/scraper-account.d.ts +10 -10
- package/dist/schemas/agent/index.d.ts +208 -208
- package/dist/schemas/agent/proposal.d.ts +2 -2
- package/dist/schemas/alert/index.d.ts +12 -0
- package/dist/schemas/bidder/bid.d.ts +1744 -1744
- package/dist/schemas/campaign/campaign-analytics.d.ts +250 -250
- package/dist/schemas/campaign/campaign-chat-bot.d.ts +4 -4
- package/dist/schemas/campaign/campaign.d.ts +69 -69
- package/dist/schemas/chat/index.d.ts +563 -68
- package/dist/schemas/dashboard/index.d.ts +18 -18
- package/dist/schemas/golden-dataset/sample.d.ts +4 -4
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/job/index.d.ts +70 -70
- package/dist/schemas/job/job-details.d.ts +14 -14
- package/dist/schemas/job/job-listing.d.ts +10 -10
- package/dist/schemas/job/nuxt.d.ts +6 -6
- package/dist/schemas/lead/index.d.ts +683 -683
- package/dist/schemas/lead/lead-status.d.ts +2 -2
- package/dist/schemas/logger/feed/feed-job-enrich.d.ts +98 -98
- package/dist/schemas/logger/log-event.d.ts +40 -40
- package/dist/schemas/logger/scraper-events.d.ts +8 -8
- package/dist/schemas/notifications/index.d.ts +4 -4
- package/dist/schemas/organization/billing.d.ts +2 -2
- package/dist/schemas/organization/index.d.ts +34 -34
- package/dist/schemas/organization/onboarding.d.ts +2 -2
- package/dist/schemas/organization/organization-leads.d.ts +2 -2
- package/dist/schemas/organization/subscription.d.ts +6 -6
- package/dist/schemas/plan/index.d.ts +2 -2
- package/dist/schemas/proxy/proxy.d.ts +3 -3
- package/dist/schemas/scraper/scrape-payload.d.ts +262 -262
- package/dist/schemas/scraper/scrape-result.d.ts +86 -86
- package/dist/schemas/transaction/index.d.ts +4 -4
- package/dist/schemas/upwork-talent/index.d.ts +8 -8
- package/dist/schemas/usage/index.d.ts +2 -2
- package/dist/schemas/usage-event/index.d.ts +8 -8
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -8,6 +8,80 @@ const ROOM_EXTENDED_TYPE_MAP = {
|
|
|
8
8
|
const ROOM_TYPES_MATCHING_EMPTY_EXTENDED_TYPE = new Set([
|
|
9
9
|
'proposal',
|
|
10
10
|
]);
|
|
11
|
+
const ROOM_CRM_STATUS_ORDER = [
|
|
12
|
+
'replied',
|
|
13
|
+
'follow_up',
|
|
14
|
+
'interested',
|
|
15
|
+
'not_interested',
|
|
16
|
+
'closed',
|
|
17
|
+
];
|
|
18
|
+
const ROOM_CRM_STATUS_LABELS = {
|
|
19
|
+
replied: 'Replied',
|
|
20
|
+
interested: 'Interested',
|
|
21
|
+
follow_up: 'Follow Up',
|
|
22
|
+
not_interested: 'Lost',
|
|
23
|
+
closed: 'Won',
|
|
24
|
+
};
|
|
25
|
+
const DEFAULT_ROOM_CRM_STATUS = 'replied';
|
|
26
|
+
const ROOM_CRM_STATUS_IDS = {
|
|
27
|
+
replied: 1,
|
|
28
|
+
follow_up: 2,
|
|
29
|
+
interested: 3,
|
|
30
|
+
closed: 4,
|
|
31
|
+
not_interested: 5,
|
|
32
|
+
};
|
|
33
|
+
const ROOM_CRM_STATUS_BY_ID = {
|
|
34
|
+
1: 'replied',
|
|
35
|
+
2: 'follow_up',
|
|
36
|
+
3: 'interested',
|
|
37
|
+
4: 'closed',
|
|
38
|
+
5: 'not_interested',
|
|
39
|
+
};
|
|
40
|
+
// Explicit board order avoids scattered "exclude then append" logic in consumers.
|
|
41
|
+
const ROOM_CRM_KANBAN_STATUS_ORDER = [
|
|
42
|
+
'replied',
|
|
43
|
+
'follow_up',
|
|
44
|
+
'interested',
|
|
45
|
+
'closed',
|
|
46
|
+
'not_interested',
|
|
47
|
+
];
|
|
48
|
+
const isRoomCrmStatus = (status) => {
|
|
49
|
+
return ROOM_CRM_STATUS_ORDER.includes(status);
|
|
50
|
+
};
|
|
51
|
+
const normalizeRoomCrmStatus = (status) => {
|
|
52
|
+
if (!status) {
|
|
53
|
+
return DEFAULT_ROOM_CRM_STATUS;
|
|
54
|
+
}
|
|
55
|
+
const normalizedStatus = status.trim().toLowerCase();
|
|
56
|
+
if (normalizedStatus === 'archived') {
|
|
57
|
+
return 'closed';
|
|
58
|
+
}
|
|
59
|
+
if (isRoomCrmStatus(normalizedStatus)) {
|
|
60
|
+
return normalizedStatus;
|
|
61
|
+
}
|
|
62
|
+
return DEFAULT_ROOM_CRM_STATUS;
|
|
63
|
+
};
|
|
64
|
+
const normalizeRoomCrmStatuses = (statuses) => {
|
|
65
|
+
if (!statuses?.length) {
|
|
66
|
+
return [];
|
|
67
|
+
}
|
|
68
|
+
const normalizeListStatus = (rawStatus) => {
|
|
69
|
+
const normalizedStatus = rawStatus.trim().toLowerCase();
|
|
70
|
+
if (!normalizedStatus) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
if (normalizedStatus === 'archived') {
|
|
74
|
+
return 'closed';
|
|
75
|
+
}
|
|
76
|
+
if (isRoomCrmStatus(normalizedStatus)) {
|
|
77
|
+
return normalizedStatus;
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
};
|
|
81
|
+
return Array.from(new Set(statuses
|
|
82
|
+
.map((status) => normalizeListStatus(status))
|
|
83
|
+
.filter((status) => status !== null)));
|
|
84
|
+
};
|
|
11
85
|
|
|
12
86
|
const defaultQuestions = [
|
|
13
87
|
{
|
|
@@ -7091,6 +7165,11 @@ const agentTaskResponseSchema = z.object({
|
|
|
7091
7165
|
completionTokens: z.number(),
|
|
7092
7166
|
});
|
|
7093
7167
|
|
|
7168
|
+
const sendDiscordMessageRequestBodySchema = z.object({
|
|
7169
|
+
title: z.string(),
|
|
7170
|
+
content: z.string(),
|
|
7171
|
+
});
|
|
7172
|
+
|
|
7094
7173
|
const usageEventTypeEnum = z.enum([
|
|
7095
7174
|
'suitabilityComplete',
|
|
7096
7175
|
'proposalComplete',
|
|
@@ -8765,6 +8844,18 @@ const roomNoteSchema = z.object({
|
|
|
8765
8844
|
createdAt: z.number(),
|
|
8766
8845
|
updatedAt: z.number(),
|
|
8767
8846
|
});
|
|
8847
|
+
const roomCrmStatusEnum = z.enum([
|
|
8848
|
+
'replied',
|
|
8849
|
+
'interested',
|
|
8850
|
+
'follow_up',
|
|
8851
|
+
'not_interested',
|
|
8852
|
+
'closed',
|
|
8853
|
+
]);
|
|
8854
|
+
const roomJobClientHistorySchema = z.object({
|
|
8855
|
+
jobUrl: z.string().nullable(),
|
|
8856
|
+
title: z.string().nullable(),
|
|
8857
|
+
clientInfo: clientInfoSchema.nullable(),
|
|
8858
|
+
});
|
|
8768
8859
|
const roomSchema = z.object({
|
|
8769
8860
|
id: z.string(),
|
|
8770
8861
|
roomId: z.string(),
|
|
@@ -8799,6 +8890,9 @@ const roomSchema = z.object({
|
|
|
8799
8890
|
lastFetchedAt: z.number().optional(),
|
|
8800
8891
|
roomTypeExtended: z.string().optional(),
|
|
8801
8892
|
roomNote: roomNoteSchema.optional(),
|
|
8893
|
+
crmStatus: roomCrmStatusEnum.optional(),
|
|
8894
|
+
crmStatusUpdatedAt: z.number().optional(),
|
|
8895
|
+
jobClientHistory: roomJobClientHistorySchema.optional(),
|
|
8802
8896
|
});
|
|
8803
8897
|
const roomsMetadataSchema = z.object({
|
|
8804
8898
|
accountId: z.string(),
|
|
@@ -8844,6 +8938,9 @@ const assignRoomTagsRequestBodySchema = z.object({
|
|
|
8844
8938
|
const updateRoomNotesRequestBodySchema = z.object({
|
|
8845
8939
|
note: z.string(),
|
|
8846
8940
|
});
|
|
8941
|
+
const updateRoomCrmStatusRequestBodySchema = z.object({
|
|
8942
|
+
status: roomCrmStatusEnum,
|
|
8943
|
+
});
|
|
8847
8944
|
const sendMessageRequestSchema = z.object({
|
|
8848
8945
|
message: z.string(),
|
|
8849
8946
|
file: z.instanceof(File).optional(),
|
|
@@ -15616,6 +15713,7 @@ const ROUTES = {
|
|
|
15616
15713
|
ALERTS: {
|
|
15617
15714
|
BASE: 'admin/alerts',
|
|
15618
15715
|
SEND_ALERT: 'admin/alerts/send',
|
|
15716
|
+
SEND_DISCORD_MESSAGE: 'admin/alerts/discord',
|
|
15619
15717
|
},
|
|
15620
15718
|
GOLDEN_DATASET: {
|
|
15621
15719
|
BASE: 'admin/golden-dataset',
|
|
@@ -15693,6 +15791,7 @@ const ROUTES = {
|
|
|
15693
15791
|
ROOMS_TAGS: (organizationId) => `organizations/${organizationId}/chat/tags`,
|
|
15694
15792
|
ROOM_TAG: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/tags`,
|
|
15695
15793
|
ROOM_NOTES: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/notes`,
|
|
15794
|
+
ROOM_CRM_STATUS: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/crm-status`,
|
|
15696
15795
|
CONNECT_ACCOUNT: (organizationId, bidderAccountId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/chat/connect-account`,
|
|
15697
15796
|
ROOMS: (id, bidderAccountId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms`,
|
|
15698
15797
|
ROOM: (id, bidderAccountId, roomId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms/${roomId}`,
|
|
@@ -24485,6 +24584,7 @@ exports.CAMPAIGN_NOTIFICATION_SETTINGS = CAMPAIGN_NOTIFICATION_SETTINGS;
|
|
|
24485
24584
|
exports.CAMPAIGN_NOTIFICATION_TYPES = CAMPAIGN_NOTIFICATION_TYPES;
|
|
24486
24585
|
exports.CLIENT_SIZE_TO_NUMBER = CLIENT_SIZE_TO_NUMBER;
|
|
24487
24586
|
exports.CloudflareChallengeFailedException = CloudflareChallengeFailedException;
|
|
24587
|
+
exports.DEFAULT_ROOM_CRM_STATUS = DEFAULT_ROOM_CRM_STATUS;
|
|
24488
24588
|
exports.DeleteMultiloginProfileException = DeleteMultiloginProfileException;
|
|
24489
24589
|
exports.DropdownOptionNotPresentException = DropdownOptionNotPresentException;
|
|
24490
24590
|
exports.ElementNotClickableException = ElementNotClickableException;
|
|
@@ -24533,6 +24633,11 @@ exports.ProposalGenerationFailedException = ProposalGenerationFailedException;
|
|
|
24533
24633
|
exports.ProposalSubmitFailedException = ProposalSubmitFailedException;
|
|
24534
24634
|
exports.PuppeteerConnectionErrorException = PuppeteerConnectionErrorException;
|
|
24535
24635
|
exports.QuestionPairNotMatchingException = QuestionPairNotMatchingException;
|
|
24636
|
+
exports.ROOM_CRM_KANBAN_STATUS_ORDER = ROOM_CRM_KANBAN_STATUS_ORDER;
|
|
24637
|
+
exports.ROOM_CRM_STATUS_BY_ID = ROOM_CRM_STATUS_BY_ID;
|
|
24638
|
+
exports.ROOM_CRM_STATUS_IDS = ROOM_CRM_STATUS_IDS;
|
|
24639
|
+
exports.ROOM_CRM_STATUS_LABELS = ROOM_CRM_STATUS_LABELS;
|
|
24640
|
+
exports.ROOM_CRM_STATUS_ORDER = ROOM_CRM_STATUS_ORDER;
|
|
24536
24641
|
exports.ROOM_EXTENDED_TYPE_MAP = ROOM_EXTENDED_TYPE_MAP;
|
|
24537
24642
|
exports.ROOM_TYPES_MATCHING_EMPTY_EXTENDED_TYPE = ROOM_TYPES_MATCHING_EMPTY_EXTENDED_TYPE;
|
|
24538
24643
|
exports.ROUTES = ROUTES;
|
|
@@ -24743,6 +24848,7 @@ exports.invoiceStripeMetadataSchema = invoiceStripeMetadataSchema;
|
|
|
24743
24848
|
exports.isNumeric = isNumeric;
|
|
24744
24849
|
exports.isPaymentVerifiedEnum = isPaymentVerifiedEnum;
|
|
24745
24850
|
exports.isPhoneVerifiedEnum = isPhoneVerifiedEnum;
|
|
24851
|
+
exports.isRoomCrmStatus = isRoomCrmStatus;
|
|
24746
24852
|
exports.isWorkTime = isWorkTime;
|
|
24747
24853
|
exports.jobActivityDeltaSchema = jobActivityDeltaSchema;
|
|
24748
24854
|
exports.jobActivityOffsetEnum = jobActivityOffsetEnum;
|
|
@@ -24788,6 +24894,8 @@ exports.noBidderAccountsAvailableException = noBidderAccountsAvailableException;
|
|
|
24788
24894
|
exports.noGoogleOAuthTokensFoundException = noGoogleOAuthTokensFoundException;
|
|
24789
24895
|
exports.noScraperAccountAvailableException = noScraperAccountAvailableException;
|
|
24790
24896
|
exports.nodeEnums = nodeEnums;
|
|
24897
|
+
exports.normalizeRoomCrmStatus = normalizeRoomCrmStatus;
|
|
24898
|
+
exports.normalizeRoomCrmStatuses = normalizeRoomCrmStatuses;
|
|
24791
24899
|
exports.notificationConfigSchema = notificationConfigSchema;
|
|
24792
24900
|
exports.nuxtStateJobDetailsSchema = nuxtStateJobDetailsSchema;
|
|
24793
24901
|
exports.nuxtStateJobSchema = nuxtStateJobSchema;
|
|
@@ -24853,6 +24961,8 @@ exports.regionSchema = regionSchema;
|
|
|
24853
24961
|
exports.registerSchema = registerSchema;
|
|
24854
24962
|
exports.requiredEarningsEnum = requiredEarningsEnum;
|
|
24855
24963
|
exports.requiredJSSEnum = requiredJSSEnum;
|
|
24964
|
+
exports.roomCrmStatusEnum = roomCrmStatusEnum;
|
|
24965
|
+
exports.roomJobClientHistorySchema = roomJobClientHistorySchema;
|
|
24856
24966
|
exports.roomMessageSchema = roomMessageSchema;
|
|
24857
24967
|
exports.roomNoteSchema = roomNoteSchema;
|
|
24858
24968
|
exports.roomSchema = roomSchema;
|
|
@@ -24879,6 +24989,7 @@ exports.selectAgencyException = selectAgencyException;
|
|
|
24879
24989
|
exports.selectContractorException = selectContractorException;
|
|
24880
24990
|
exports.selectorNotFoundError = selectorNotFoundError;
|
|
24881
24991
|
exports.sendAlertPayloadSchema = sendAlertPayloadSchema;
|
|
24992
|
+
exports.sendDiscordMessageRequestBodySchema = sendDiscordMessageRequestBodySchema;
|
|
24882
24993
|
exports.sendMessageRequestSchema = sendMessageRequestSchema;
|
|
24883
24994
|
exports.sendNotificationRequestSchema = sendNotificationRequestSchema;
|
|
24884
24995
|
exports.specialisedProfileSchema = specialisedProfileSchema;
|
|
@@ -24917,6 +25028,7 @@ exports.updateChatbotSchema = updateChatbotSchema;
|
|
|
24917
25028
|
exports.updateLeadStatusSchema = updateLeadStatusSchema;
|
|
24918
25029
|
exports.updateOrganizationLeadsStatusPayloadSchema = updateOrganizationLeadsStatusPayloadSchema;
|
|
24919
25030
|
exports.updateOrganizationProfileSchema = updateOrganizationProfileSchema;
|
|
25031
|
+
exports.updateRoomCrmStatusRequestBodySchema = updateRoomCrmStatusRequestBodySchema;
|
|
24920
25032
|
exports.updateRoomNotesRequestBodySchema = updateRoomNotesRequestBodySchema;
|
|
24921
25033
|
exports.updateSampleSchema = updateSampleSchema;
|
|
24922
25034
|
exports.updateScraperAccountSchema = updateScraperAccountSchema;
|