lancer-shared 1.2.5 → 1.2.6
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
CHANGED
|
@@ -5589,9 +5589,10 @@ const logEventSchema = z.object({
|
|
|
5589
5589
|
// ID of the resource (primary entity affected)
|
|
5590
5590
|
resourceId: z.string().nullable(), // fallback if leadId is not applicable
|
|
5591
5591
|
// Lead-level metadata
|
|
5592
|
-
|
|
5593
|
-
campaignId: z.string().nullable(),
|
|
5592
|
+
organizationId: z.string().nullable(),
|
|
5594
5593
|
userId: z.string().nullable(),
|
|
5594
|
+
campaignId: z.string().nullable(),
|
|
5595
|
+
leadId: z.string().nullable(),
|
|
5595
5596
|
// Reason or message for the event
|
|
5596
5597
|
reason: z.string().nullable(),
|
|
5597
5598
|
// Generic metadata (stacktrace, score, raw request, etc.)
|
|
@@ -12425,7 +12426,9 @@ const ROUTES = {
|
|
|
12425
12426
|
ORGANIZATIONS: {
|
|
12426
12427
|
BASE: "organizations",
|
|
12427
12428
|
BY_ID: (id) => `organizations/${id}`,
|
|
12428
|
-
AI_CONFIG: (id) => `organizations/${id}/ai-config`,
|
|
12429
|
+
AI_CONFIG: (id) => `organizations/${id}/settings/ai-config`,
|
|
12430
|
+
KNOWLEDGE_BASE: (id) => `organizations/${id}/settings/knowledge-base`,
|
|
12431
|
+
NOTIFICATIONS: (id) => `organizations/${id}/settings/notifications`,
|
|
12429
12432
|
SETTINGS: (id) => `organizations/${id}/settings`,
|
|
12430
12433
|
CHARGES: (id) => `organizations/${id}/charges`,
|
|
12431
12434
|
PAYMENT_METHODS: (id) => `organizations/${id}/payment-methods`,
|
|
@@ -12469,6 +12472,10 @@ const ROUTES = {
|
|
|
12469
12472
|
},
|
|
12470
12473
|
},
|
|
12471
12474
|
},
|
|
12475
|
+
TRANSACTIONS: {
|
|
12476
|
+
BASE: "transactions",
|
|
12477
|
+
BY_ID: (id) => `transactions/${id}`,
|
|
12478
|
+
},
|
|
12472
12479
|
AGENT: {
|
|
12473
12480
|
BASE: "agent",
|
|
12474
12481
|
TEST_RULES: "agent/test-rules",
|
|
@@ -12483,6 +12490,10 @@ const buildRoute = (route, params = {}) => {
|
|
|
12483
12490
|
});
|
|
12484
12491
|
return builtRoute;
|
|
12485
12492
|
};
|
|
12493
|
+
// Helper function to get route without admin prefix
|
|
12494
|
+
const getRouteWithoutAdminPrefix = (route) => {
|
|
12495
|
+
return route.replace("admin/", "");
|
|
12496
|
+
};
|
|
12486
12497
|
|
|
12487
12498
|
const accountStatusOrder = [
|
|
12488
12499
|
"verification_required",
|
|
@@ -12848,6 +12859,7 @@ exports.freelancerBidPayloadSchema = freelancerBidPayloadSchema;
|
|
|
12848
12859
|
exports.freelancerBidProposalDataSchema = freelancerBidProposalDataSchema;
|
|
12849
12860
|
exports.getNextStatus = getNextStatus;
|
|
12850
12861
|
exports.getPreviousStatus = getPreviousStatus;
|
|
12862
|
+
exports.getRouteWithoutAdminPrefix = getRouteWithoutAdminPrefix;
|
|
12851
12863
|
exports.isNumeric = isNumeric;
|
|
12852
12864
|
exports.jobActivityDeltaSchema = jobActivityDeltaSchema;
|
|
12853
12865
|
exports.jobActivityOffsetEnum = jobActivityOffsetEnum;
|
|
@@ -116,6 +116,8 @@ export declare const ROUTES: {
|
|
|
116
116
|
readonly BASE: "organizations";
|
|
117
117
|
readonly BY_ID: (id: string) => string;
|
|
118
118
|
readonly AI_CONFIG: (id: string) => string;
|
|
119
|
+
readonly KNOWLEDGE_BASE: (id: string) => string;
|
|
120
|
+
readonly NOTIFICATIONS: (id: string) => string;
|
|
119
121
|
readonly SETTINGS: (id: string) => string;
|
|
120
122
|
readonly CHARGES: (id: string) => string;
|
|
121
123
|
readonly PAYMENT_METHODS: (id: string) => string;
|
|
@@ -156,6 +158,10 @@ export declare const ROUTES: {
|
|
|
156
158
|
};
|
|
157
159
|
};
|
|
158
160
|
};
|
|
161
|
+
readonly TRANSACTIONS: {
|
|
162
|
+
readonly BASE: "transactions";
|
|
163
|
+
readonly BY_ID: (id: string) => string;
|
|
164
|
+
};
|
|
159
165
|
readonly AGENT: {
|
|
160
166
|
readonly BASE: "agent";
|
|
161
167
|
readonly TEST_RULES: "agent/test-rules";
|
|
@@ -168,3 +174,4 @@ export type RouteParams = {
|
|
|
168
174
|
leadId?: string;
|
|
169
175
|
};
|
|
170
176
|
export declare const buildRoute: (route: string, params?: RouteParams) => string;
|
|
177
|
+
export declare const getRouteWithoutAdminPrefix: (route: string) => string;
|
|
@@ -5,9 +5,10 @@ export declare const logEventSchema: z.ZodObject<{
|
|
|
5
5
|
source: z.ZodString;
|
|
6
6
|
resourceType: z.ZodDefault<z.ZodString>;
|
|
7
7
|
resourceId: z.ZodNullable<z.ZodString>;
|
|
8
|
-
|
|
9
|
-
campaignId: z.ZodNullable<z.ZodString>;
|
|
8
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
10
9
|
userId: z.ZodNullable<z.ZodString>;
|
|
10
|
+
campaignId: z.ZodNullable<z.ZodString>;
|
|
11
|
+
leadId: z.ZodNullable<z.ZodString>;
|
|
11
12
|
reason: z.ZodNullable<z.ZodString>;
|
|
12
13
|
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
13
14
|
timestamp: z.ZodNumber;
|
|
@@ -16,9 +17,10 @@ export declare const logEventSchema: z.ZodObject<{
|
|
|
16
17
|
source: string;
|
|
17
18
|
resourceType: string;
|
|
18
19
|
resourceId: string | null;
|
|
19
|
-
|
|
20
|
-
campaignId: string | null;
|
|
20
|
+
organizationId: string | null;
|
|
21
21
|
userId: string | null;
|
|
22
|
+
campaignId: string | null;
|
|
23
|
+
leadId: string | null;
|
|
22
24
|
reason: string | null;
|
|
23
25
|
metadata: Record<string, unknown> | null;
|
|
24
26
|
timestamp: number;
|
|
@@ -26,9 +28,10 @@ export declare const logEventSchema: z.ZodObject<{
|
|
|
26
28
|
type: "scraperStarted" | "scraperCompleted" | "jobScraped" | "jobScrapeFailed" | "jobsIndexed" | "jobDuplicateSkipped" | "scraperFailed" | "jobActivityScraped" | "jobActivityScrapeFailed" | "feedScrapeStarted" | "feedScrapeCompleted" | "feedScrapeFailed" | "jobListingScraped" | "jobSyncPublished" | "jobSyncReceived" | "leadsCreatedAndSynced" | "suitabilityPending" | "suitabilityProcessing" | "suitabilityComplete" | "suitabilityFailed" | "manualSuitabilityAnalyzed" | "proposalProcessing" | "proposalComplete" | "proposalFailed" | "manualProposalGenerated" | "biddingProcessing" | "biddingComplete" | "biddingFailed" | "biddingSkipped" | "biddingPending" | "biddingRetry" | "biddingInsufficientConnects" | "biddingWarningAlert" | "errorLogged" | "cloudTaskRetry" | "manualLeadEdited" | "leadArchived" | "auditTrailLogged" | "knowledgeBaseGenerationComplete" | "knowledgeBaseGenerationFailed" | "modelFailed";
|
|
27
29
|
source: string;
|
|
28
30
|
resourceId: string | null;
|
|
29
|
-
|
|
30
|
-
campaignId: string | null;
|
|
31
|
+
organizationId: string | null;
|
|
31
32
|
userId: string | null;
|
|
33
|
+
campaignId: string | null;
|
|
34
|
+
leadId: string | null;
|
|
32
35
|
reason: string | null;
|
|
33
36
|
metadata: Record<string, unknown> | null;
|
|
34
37
|
timestamp: number;
|