lancer-shared 1.2.326 → 1.2.327
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 +105 -0
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +94 -1
- package/dist/bundle.esm.js.map +1 -1
- package/dist/constants/chat.d.ts +17 -1
- package/dist/constants/routes.d.ts +1 -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/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/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
|
{
|
|
@@ -8765,6 +8839,18 @@ const roomNoteSchema = z.object({
|
|
|
8765
8839
|
createdAt: z.number(),
|
|
8766
8840
|
updatedAt: z.number(),
|
|
8767
8841
|
});
|
|
8842
|
+
const roomCrmStatusEnum = z.enum([
|
|
8843
|
+
'replied',
|
|
8844
|
+
'interested',
|
|
8845
|
+
'follow_up',
|
|
8846
|
+
'not_interested',
|
|
8847
|
+
'closed',
|
|
8848
|
+
]);
|
|
8849
|
+
const roomJobClientHistorySchema = z.object({
|
|
8850
|
+
jobUrl: z.string().nullable(),
|
|
8851
|
+
title: z.string().nullable(),
|
|
8852
|
+
clientInfo: clientInfoSchema.nullable(),
|
|
8853
|
+
});
|
|
8768
8854
|
const roomSchema = z.object({
|
|
8769
8855
|
id: z.string(),
|
|
8770
8856
|
roomId: z.string(),
|
|
@@ -8799,6 +8885,9 @@ const roomSchema = z.object({
|
|
|
8799
8885
|
lastFetchedAt: z.number().optional(),
|
|
8800
8886
|
roomTypeExtended: z.string().optional(),
|
|
8801
8887
|
roomNote: roomNoteSchema.optional(),
|
|
8888
|
+
crmStatus: roomCrmStatusEnum.optional(),
|
|
8889
|
+
crmStatusUpdatedAt: z.number().optional(),
|
|
8890
|
+
jobClientHistory: roomJobClientHistorySchema.optional(),
|
|
8802
8891
|
});
|
|
8803
8892
|
const roomsMetadataSchema = z.object({
|
|
8804
8893
|
accountId: z.string(),
|
|
@@ -8844,6 +8933,9 @@ const assignRoomTagsRequestBodySchema = z.object({
|
|
|
8844
8933
|
const updateRoomNotesRequestBodySchema = z.object({
|
|
8845
8934
|
note: z.string(),
|
|
8846
8935
|
});
|
|
8936
|
+
const updateRoomCrmStatusRequestBodySchema = z.object({
|
|
8937
|
+
status: roomCrmStatusEnum,
|
|
8938
|
+
});
|
|
8847
8939
|
const sendMessageRequestSchema = z.object({
|
|
8848
8940
|
message: z.string(),
|
|
8849
8941
|
file: z.instanceof(File).optional(),
|
|
@@ -15693,6 +15785,7 @@ const ROUTES = {
|
|
|
15693
15785
|
ROOMS_TAGS: (organizationId) => `organizations/${organizationId}/chat/tags`,
|
|
15694
15786
|
ROOM_TAG: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/tags`,
|
|
15695
15787
|
ROOM_NOTES: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/notes`,
|
|
15788
|
+
ROOM_CRM_STATUS: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/crm-status`,
|
|
15696
15789
|
CONNECT_ACCOUNT: (organizationId, bidderAccountId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/chat/connect-account`,
|
|
15697
15790
|
ROOMS: (id, bidderAccountId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms`,
|
|
15698
15791
|
ROOM: (id, bidderAccountId, roomId) => `organizations/${id}/bidder-accounts/${bidderAccountId}/rooms/${roomId}`,
|
|
@@ -24485,6 +24578,7 @@ exports.CAMPAIGN_NOTIFICATION_SETTINGS = CAMPAIGN_NOTIFICATION_SETTINGS;
|
|
|
24485
24578
|
exports.CAMPAIGN_NOTIFICATION_TYPES = CAMPAIGN_NOTIFICATION_TYPES;
|
|
24486
24579
|
exports.CLIENT_SIZE_TO_NUMBER = CLIENT_SIZE_TO_NUMBER;
|
|
24487
24580
|
exports.CloudflareChallengeFailedException = CloudflareChallengeFailedException;
|
|
24581
|
+
exports.DEFAULT_ROOM_CRM_STATUS = DEFAULT_ROOM_CRM_STATUS;
|
|
24488
24582
|
exports.DeleteMultiloginProfileException = DeleteMultiloginProfileException;
|
|
24489
24583
|
exports.DropdownOptionNotPresentException = DropdownOptionNotPresentException;
|
|
24490
24584
|
exports.ElementNotClickableException = ElementNotClickableException;
|
|
@@ -24533,6 +24627,11 @@ exports.ProposalGenerationFailedException = ProposalGenerationFailedException;
|
|
|
24533
24627
|
exports.ProposalSubmitFailedException = ProposalSubmitFailedException;
|
|
24534
24628
|
exports.PuppeteerConnectionErrorException = PuppeteerConnectionErrorException;
|
|
24535
24629
|
exports.QuestionPairNotMatchingException = QuestionPairNotMatchingException;
|
|
24630
|
+
exports.ROOM_CRM_KANBAN_STATUS_ORDER = ROOM_CRM_KANBAN_STATUS_ORDER;
|
|
24631
|
+
exports.ROOM_CRM_STATUS_BY_ID = ROOM_CRM_STATUS_BY_ID;
|
|
24632
|
+
exports.ROOM_CRM_STATUS_IDS = ROOM_CRM_STATUS_IDS;
|
|
24633
|
+
exports.ROOM_CRM_STATUS_LABELS = ROOM_CRM_STATUS_LABELS;
|
|
24634
|
+
exports.ROOM_CRM_STATUS_ORDER = ROOM_CRM_STATUS_ORDER;
|
|
24536
24635
|
exports.ROOM_EXTENDED_TYPE_MAP = ROOM_EXTENDED_TYPE_MAP;
|
|
24537
24636
|
exports.ROOM_TYPES_MATCHING_EMPTY_EXTENDED_TYPE = ROOM_TYPES_MATCHING_EMPTY_EXTENDED_TYPE;
|
|
24538
24637
|
exports.ROUTES = ROUTES;
|
|
@@ -24743,6 +24842,7 @@ exports.invoiceStripeMetadataSchema = invoiceStripeMetadataSchema;
|
|
|
24743
24842
|
exports.isNumeric = isNumeric;
|
|
24744
24843
|
exports.isPaymentVerifiedEnum = isPaymentVerifiedEnum;
|
|
24745
24844
|
exports.isPhoneVerifiedEnum = isPhoneVerifiedEnum;
|
|
24845
|
+
exports.isRoomCrmStatus = isRoomCrmStatus;
|
|
24746
24846
|
exports.isWorkTime = isWorkTime;
|
|
24747
24847
|
exports.jobActivityDeltaSchema = jobActivityDeltaSchema;
|
|
24748
24848
|
exports.jobActivityOffsetEnum = jobActivityOffsetEnum;
|
|
@@ -24788,6 +24888,8 @@ exports.noBidderAccountsAvailableException = noBidderAccountsAvailableException;
|
|
|
24788
24888
|
exports.noGoogleOAuthTokensFoundException = noGoogleOAuthTokensFoundException;
|
|
24789
24889
|
exports.noScraperAccountAvailableException = noScraperAccountAvailableException;
|
|
24790
24890
|
exports.nodeEnums = nodeEnums;
|
|
24891
|
+
exports.normalizeRoomCrmStatus = normalizeRoomCrmStatus;
|
|
24892
|
+
exports.normalizeRoomCrmStatuses = normalizeRoomCrmStatuses;
|
|
24791
24893
|
exports.notificationConfigSchema = notificationConfigSchema;
|
|
24792
24894
|
exports.nuxtStateJobDetailsSchema = nuxtStateJobDetailsSchema;
|
|
24793
24895
|
exports.nuxtStateJobSchema = nuxtStateJobSchema;
|
|
@@ -24853,6 +24955,8 @@ exports.regionSchema = regionSchema;
|
|
|
24853
24955
|
exports.registerSchema = registerSchema;
|
|
24854
24956
|
exports.requiredEarningsEnum = requiredEarningsEnum;
|
|
24855
24957
|
exports.requiredJSSEnum = requiredJSSEnum;
|
|
24958
|
+
exports.roomCrmStatusEnum = roomCrmStatusEnum;
|
|
24959
|
+
exports.roomJobClientHistorySchema = roomJobClientHistorySchema;
|
|
24856
24960
|
exports.roomMessageSchema = roomMessageSchema;
|
|
24857
24961
|
exports.roomNoteSchema = roomNoteSchema;
|
|
24858
24962
|
exports.roomSchema = roomSchema;
|
|
@@ -24917,6 +25021,7 @@ exports.updateChatbotSchema = updateChatbotSchema;
|
|
|
24917
25021
|
exports.updateLeadStatusSchema = updateLeadStatusSchema;
|
|
24918
25022
|
exports.updateOrganizationLeadsStatusPayloadSchema = updateOrganizationLeadsStatusPayloadSchema;
|
|
24919
25023
|
exports.updateOrganizationProfileSchema = updateOrganizationProfileSchema;
|
|
25024
|
+
exports.updateRoomCrmStatusRequestBodySchema = updateRoomCrmStatusRequestBodySchema;
|
|
24920
25025
|
exports.updateRoomNotesRequestBodySchema = updateRoomNotesRequestBodySchema;
|
|
24921
25026
|
exports.updateSampleSchema = updateSampleSchema;
|
|
24922
25027
|
exports.updateScraperAccountSchema = updateScraperAccountSchema;
|