lancer-shared 1.2.10 → 1.2.12
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
|
@@ -5674,6 +5674,14 @@ const organizationMemberSchema = objectType({
|
|
|
5674
5674
|
invitedBy: stringType(),
|
|
5675
5675
|
});
|
|
5676
5676
|
|
|
5677
|
+
const onboardingProgressSchema = z.object({
|
|
5678
|
+
profileSetup: z.boolean(),
|
|
5679
|
+
campaignCreated: z.boolean(),
|
|
5680
|
+
filtersAdded: z.boolean(),
|
|
5681
|
+
rulesConfigured: z.boolean(),
|
|
5682
|
+
automationEnabled: z.boolean(),
|
|
5683
|
+
});
|
|
5684
|
+
|
|
5677
5685
|
const bidConfigSchema = objectType({
|
|
5678
5686
|
agencyName: stringType().nullable(),
|
|
5679
5687
|
bidderId: stringType().nullable(),
|
|
@@ -5705,6 +5713,11 @@ const organizationSchema = objectType({
|
|
|
5705
5713
|
createdAt: numberType(),
|
|
5706
5714
|
updatedAt: numberType(),
|
|
5707
5715
|
});
|
|
5716
|
+
const createOrganizationSchema = organizationSchema.pick({
|
|
5717
|
+
name: true,
|
|
5718
|
+
type: true,
|
|
5719
|
+
tierId: true,
|
|
5720
|
+
});
|
|
5708
5721
|
const creditDeductionEventTypeEnum = LogEventTypeEnum.extract([
|
|
5709
5722
|
"suitabilityComplete",
|
|
5710
5723
|
"proposalComplete",
|
|
@@ -6057,9 +6070,7 @@ const checkLeadStatusPayloadSchema = objectType({
|
|
|
6057
6070
|
|
|
6058
6071
|
const userSchema = objectType({
|
|
6059
6072
|
id: stringType(),
|
|
6060
|
-
|
|
6061
|
-
lastName: stringType(),
|
|
6062
|
-
displayName: stringType(),
|
|
6073
|
+
name: stringType(),
|
|
6063
6074
|
email: stringType(),
|
|
6064
6075
|
organizationIds: z.array(stringType()),
|
|
6065
6076
|
createdAt: numberType(),
|
|
@@ -6070,12 +6081,12 @@ const loginSchema = objectType({
|
|
|
6070
6081
|
password: passwordSchema,
|
|
6071
6082
|
});
|
|
6072
6083
|
const registerSchema = objectType({
|
|
6073
|
-
|
|
6074
|
-
lastName: stringType().min(1, "Last name is required").max(255),
|
|
6084
|
+
name: stringType().min(1, "First name is required").max(255),
|
|
6075
6085
|
email: stringType()
|
|
6076
6086
|
.email("Must be a valid email address")
|
|
6077
6087
|
.max(255)
|
|
6078
6088
|
.min(1, "Email address is required"),
|
|
6089
|
+
teamName: stringType().min(1, "Team name is required").max(255),
|
|
6079
6090
|
password: passwordSchema,
|
|
6080
6091
|
confirmPassword: passwordSchema,
|
|
6081
6092
|
}).refine(({ password, confirmPassword }) => password === confirmPassword, {
|
|
@@ -12385,17 +12396,12 @@ const ROUTES = {
|
|
|
12385
12396
|
FILTER_OPTIONS: "jobs/filter-options",
|
|
12386
12397
|
TOTAL_JOBS: "jobs/total-jobs",
|
|
12387
12398
|
GET_JOB_TITLE: (jobId) => `jobs/get-job-title/${jobId}`,
|
|
12388
|
-
SEARCH: "jobs/search",
|
|
12389
12399
|
},
|
|
12390
12400
|
USERS: {
|
|
12391
12401
|
BASE: "users",
|
|
12392
12402
|
BY_ID: (id) => `users/${id}`,
|
|
12393
12403
|
ORGANIZATIONS: (id) => `users/${id}/organizations`,
|
|
12394
12404
|
},
|
|
12395
|
-
AI_CONFIG: {
|
|
12396
|
-
BASE: "ai-config",
|
|
12397
|
-
GENERATE_KNOWLEDGE_BASE: "ai-config/generate-knowledge-base",
|
|
12398
|
-
},
|
|
12399
12405
|
COOKIES: {
|
|
12400
12406
|
BASE: "cookies",
|
|
12401
12407
|
SCRAPE: "cookies/scrape-cookies",
|
|
@@ -12452,8 +12458,13 @@ const ROUTES = {
|
|
|
12452
12458
|
ORGANIZATIONS: {
|
|
12453
12459
|
BASE: "organizations",
|
|
12454
12460
|
BY_ID: (id) => `organizations/${id}`,
|
|
12461
|
+
ONBOARDING: (id) => `organizations/${id}/onboarding/progress`,
|
|
12455
12462
|
AI_CONFIG: (id) => `organizations/${id}/settings/ai-config`,
|
|
12456
12463
|
KNOWLEDGE_BASE: (id) => `organizations/${id}/settings/knowledge-base`,
|
|
12464
|
+
MEMBERS: {
|
|
12465
|
+
BASE: (id) => `organizations/${id}/members`,
|
|
12466
|
+
BY_ID: (id, memberId) => `organizations/${id}/members/${memberId}`,
|
|
12467
|
+
},
|
|
12457
12468
|
NOTIFICATIONS: (id) => `organizations/${id}/settings/notifications`,
|
|
12458
12469
|
SETTINGS: (id) => `organizations/${id}/settings`,
|
|
12459
12470
|
CHARGES: (id) => `organizations/${id}/charges`,
|
|
@@ -12524,9 +12535,10 @@ const ROUTES = {
|
|
|
12524
12535
|
},
|
|
12525
12536
|
AGENT: {
|
|
12526
12537
|
BASE: "agent",
|
|
12527
|
-
TEST_RULES: "agent/test-rules",
|
|
12528
12538
|
GENERATE_KNOWLEDGE_BASE: "agent/generate-knowledge-base",
|
|
12529
|
-
|
|
12539
|
+
GENERATE_DEFAULT_AI_CONFIG: "agent/generate-ai-config",
|
|
12540
|
+
TEST_AI_CONFIG: "agent/test-ai-config",
|
|
12541
|
+
TEST_SYSTEM_PROMPTS: "agent/test-system-prompts",
|
|
12530
12542
|
},
|
|
12531
12543
|
BIDDERS: {
|
|
12532
12544
|
BASE: "bidders",
|
|
@@ -12570,16 +12582,6 @@ const creditDeductionAmountMap = {
|
|
|
12570
12582
|
proposalComplete: 5,
|
|
12571
12583
|
};
|
|
12572
12584
|
|
|
12573
|
-
const paths = {
|
|
12574
|
-
auth: {
|
|
12575
|
-
register: `auth/register`,
|
|
12576
|
-
},
|
|
12577
|
-
users: {
|
|
12578
|
-
root: "users",
|
|
12579
|
-
details: (id) => `users/${id}`,
|
|
12580
|
-
},
|
|
12581
|
-
};
|
|
12582
|
-
|
|
12583
12585
|
// Main wrapper function
|
|
12584
12586
|
async function tryCatch(promise) {
|
|
12585
12587
|
try {
|
|
@@ -12891,6 +12893,7 @@ exports.commonQuestions = commonQuestions;
|
|
|
12891
12893
|
exports.countryMapping = countryMapping;
|
|
12892
12894
|
exports.createBidderAccountSchema = createBidderAccountSchema;
|
|
12893
12895
|
exports.createCampaignSchema = createCampaignSchema;
|
|
12896
|
+
exports.createOrganizationSchema = createOrganizationSchema;
|
|
12894
12897
|
exports.createScraperAccountSchema = createScraperAccountSchema;
|
|
12895
12898
|
exports.creditDeductionAmountMap = creditDeductionAmountMap;
|
|
12896
12899
|
exports.creditDeductionEventTypeEnum = creditDeductionEventTypeEnum;
|
|
@@ -12938,6 +12941,7 @@ exports.loginSchema = loginSchema;
|
|
|
12938
12941
|
exports.metadataSchema = metadataSchema;
|
|
12939
12942
|
exports.notificationConfigSchema = notificationConfigSchema;
|
|
12940
12943
|
exports.nuxtStateJobSchema = nuxtStateJobSchema;
|
|
12944
|
+
exports.onboardingProgressSchema = onboardingProgressSchema;
|
|
12941
12945
|
exports.organizationBillingSchema = organizationBillingSchema;
|
|
12942
12946
|
exports.organizationLimitsSchema = organizationLimitsSchema;
|
|
12943
12947
|
exports.organizationMemberRoleEnum = organizationMemberRoleEnum;
|
|
@@ -12948,7 +12952,6 @@ exports.organizationSubscriptionSchema = organizationSubscriptionSchema;
|
|
|
12948
12952
|
exports.organizationTierEnum = organizationTierEnum;
|
|
12949
12953
|
exports.organizationTypeSchema = organizationTypeSchema;
|
|
12950
12954
|
exports.passwordSchema = passwordSchema;
|
|
12951
|
-
exports.paths = paths;
|
|
12952
12955
|
exports.paymentTypeEnum = paymentTypeEnum;
|
|
12953
12956
|
exports.periodUsageSchema = periodUsageSchema;
|
|
12954
12957
|
exports.projectDurationEnum = projectDurationEnum;
|
|
@@ -22,17 +22,12 @@ export declare const ROUTES: {
|
|
|
22
22
|
readonly FILTER_OPTIONS: "jobs/filter-options";
|
|
23
23
|
readonly TOTAL_JOBS: "jobs/total-jobs";
|
|
24
24
|
readonly GET_JOB_TITLE: (jobId: string) => string;
|
|
25
|
-
readonly SEARCH: "jobs/search";
|
|
26
25
|
};
|
|
27
26
|
readonly USERS: {
|
|
28
27
|
readonly BASE: "users";
|
|
29
28
|
readonly BY_ID: (id: string) => string;
|
|
30
29
|
readonly ORGANIZATIONS: (id: string) => string;
|
|
31
30
|
};
|
|
32
|
-
readonly AI_CONFIG: {
|
|
33
|
-
readonly BASE: "ai-config";
|
|
34
|
-
readonly GENERATE_KNOWLEDGE_BASE: "ai-config/generate-knowledge-base";
|
|
35
|
-
};
|
|
36
31
|
readonly COOKIES: {
|
|
37
32
|
readonly BASE: "cookies";
|
|
38
33
|
readonly SCRAPE: "cookies/scrape-cookies";
|
|
@@ -89,8 +84,13 @@ export declare const ROUTES: {
|
|
|
89
84
|
readonly ORGANIZATIONS: {
|
|
90
85
|
readonly BASE: "organizations";
|
|
91
86
|
readonly BY_ID: (id: string) => string;
|
|
87
|
+
readonly ONBOARDING: (id: string) => string;
|
|
92
88
|
readonly AI_CONFIG: (id: string) => string;
|
|
93
89
|
readonly KNOWLEDGE_BASE: (id: string) => string;
|
|
90
|
+
readonly MEMBERS: {
|
|
91
|
+
readonly BASE: (id: string) => string;
|
|
92
|
+
readonly BY_ID: (id: string, memberId: string) => string;
|
|
93
|
+
};
|
|
94
94
|
readonly NOTIFICATIONS: (id: string) => string;
|
|
95
95
|
readonly SETTINGS: (id: string) => string;
|
|
96
96
|
readonly CHARGES: (id: string) => string;
|
|
@@ -158,9 +158,10 @@ export declare const ROUTES: {
|
|
|
158
158
|
};
|
|
159
159
|
readonly AGENT: {
|
|
160
160
|
readonly BASE: "agent";
|
|
161
|
-
readonly TEST_RULES: "agent/test-rules";
|
|
162
161
|
readonly GENERATE_KNOWLEDGE_BASE: "agent/generate-knowledge-base";
|
|
163
|
-
readonly
|
|
162
|
+
readonly GENERATE_DEFAULT_AI_CONFIG: "agent/generate-ai-config";
|
|
163
|
+
readonly TEST_AI_CONFIG: "agent/test-ai-config";
|
|
164
|
+
readonly TEST_SYSTEM_PROMPTS: "agent/test-system-prompts";
|
|
164
165
|
};
|
|
165
166
|
readonly BIDDERS: {
|
|
166
167
|
readonly BASE: "bidders";
|
|
@@ -185,6 +185,91 @@ export declare const organizationSchema: z.ZodObject<{
|
|
|
185
185
|
createdAt: number;
|
|
186
186
|
updatedAt: number;
|
|
187
187
|
}>;
|
|
188
|
+
export declare const createOrganizationSchema: z.ZodObject<Pick<{
|
|
189
|
+
id: z.ZodString;
|
|
190
|
+
name: z.ZodString;
|
|
191
|
+
type: z.ZodEnum<["agency", "freelancer"]>;
|
|
192
|
+
tierId: z.ZodEnum<["free", "premium"]>;
|
|
193
|
+
subscription: z.ZodNullable<z.ZodObject<{
|
|
194
|
+
tierId: z.ZodString;
|
|
195
|
+
status: z.ZodEnum<["active", "trialing", "cancelled", "paused"]>;
|
|
196
|
+
creditsRemaining: z.ZodNumber;
|
|
197
|
+
startedAt: z.ZodNumber;
|
|
198
|
+
currentPeriodEnd: z.ZodNumber;
|
|
199
|
+
stripeSubscriptionId: z.ZodString;
|
|
200
|
+
source: z.ZodEnum<["stripe", "manual"]>;
|
|
201
|
+
}, "strip", z.ZodTypeAny, {
|
|
202
|
+
status: "active" | "trialing" | "cancelled" | "paused";
|
|
203
|
+
creditsRemaining: number;
|
|
204
|
+
tierId: string;
|
|
205
|
+
startedAt: number;
|
|
206
|
+
currentPeriodEnd: number;
|
|
207
|
+
stripeSubscriptionId: string;
|
|
208
|
+
source: "stripe" | "manual";
|
|
209
|
+
}, {
|
|
210
|
+
status: "active" | "trialing" | "cancelled" | "paused";
|
|
211
|
+
creditsRemaining: number;
|
|
212
|
+
tierId: string;
|
|
213
|
+
startedAt: number;
|
|
214
|
+
currentPeriodEnd: number;
|
|
215
|
+
stripeSubscriptionId: string;
|
|
216
|
+
source: "stripe" | "manual";
|
|
217
|
+
}>>;
|
|
218
|
+
bidConfig: z.ZodObject<{
|
|
219
|
+
agencyName: z.ZodNullable<z.ZodString>;
|
|
220
|
+
bidderId: z.ZodNullable<z.ZodString>;
|
|
221
|
+
contractorName: z.ZodNullable<z.ZodString>;
|
|
222
|
+
specialisedProfile: z.ZodNullable<z.ZodString>;
|
|
223
|
+
}, "strip", z.ZodTypeAny, {
|
|
224
|
+
agencyName: string | null;
|
|
225
|
+
bidderId: string | null;
|
|
226
|
+
contractorName: string | null;
|
|
227
|
+
specialisedProfile: string | null;
|
|
228
|
+
}, {
|
|
229
|
+
agencyName: string | null;
|
|
230
|
+
bidderId: string | null;
|
|
231
|
+
contractorName: string | null;
|
|
232
|
+
specialisedProfile: string | null;
|
|
233
|
+
}>;
|
|
234
|
+
active: z.ZodBoolean;
|
|
235
|
+
limits: z.ZodObject<{
|
|
236
|
+
monthlyCredits: z.ZodNumber;
|
|
237
|
+
usedCredits: z.ZodNumber;
|
|
238
|
+
extraCredits: z.ZodNumber;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
monthlyCredits: number;
|
|
241
|
+
usedCredits: number;
|
|
242
|
+
extraCredits: number;
|
|
243
|
+
}, {
|
|
244
|
+
monthlyCredits: number;
|
|
245
|
+
usedCredits: number;
|
|
246
|
+
extraCredits: number;
|
|
247
|
+
}>;
|
|
248
|
+
billing: z.ZodNullable<z.ZodObject<{
|
|
249
|
+
stripeCustomerId: z.ZodString;
|
|
250
|
+
savedCard: z.ZodBoolean;
|
|
251
|
+
creditsRemaining: z.ZodNumber;
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
stripeCustomerId: string;
|
|
254
|
+
savedCard: boolean;
|
|
255
|
+
creditsRemaining: number;
|
|
256
|
+
}, {
|
|
257
|
+
stripeCustomerId: string;
|
|
258
|
+
savedCard: boolean;
|
|
259
|
+
creditsRemaining: number;
|
|
260
|
+
}>>;
|
|
261
|
+
createdAt: z.ZodNumber;
|
|
262
|
+
updatedAt: z.ZodNumber;
|
|
263
|
+
}, "type" | "name" | "tierId">, "strip", z.ZodTypeAny, {
|
|
264
|
+
type: "agency" | "freelancer";
|
|
265
|
+
name: string;
|
|
266
|
+
tierId: "free" | "premium";
|
|
267
|
+
}, {
|
|
268
|
+
type: "agency" | "freelancer";
|
|
269
|
+
name: string;
|
|
270
|
+
tierId: "free" | "premium";
|
|
271
|
+
}>;
|
|
272
|
+
export type CreateOrganization = z.infer<typeof createOrganizationSchema>;
|
|
188
273
|
export declare const creditDeductionEventTypeEnum: z.ZodEnum<["suitabilityComplete", "proposalComplete"]>;
|
|
189
274
|
export declare const creditDeductionPayloadSchema: z.ZodObject<{
|
|
190
275
|
event: z.ZodEnum<["suitabilityComplete", "proposalComplete"]>;
|
|
@@ -347,3 +432,4 @@ export interface BidConfig extends infer<typeof bidConfigSchema> {
|
|
|
347
432
|
export type OrganizationType = z.infer<typeof organizationTypeSchema>;
|
|
348
433
|
export * from "./member";
|
|
349
434
|
export * from "./subscription";
|
|
435
|
+
export * from "./onboarding";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const onboardingProgressSchema: z.ZodObject<{
|
|
3
|
+
profileSetup: z.ZodBoolean;
|
|
4
|
+
campaignCreated: z.ZodBoolean;
|
|
5
|
+
filtersAdded: z.ZodBoolean;
|
|
6
|
+
rulesConfigured: z.ZodBoolean;
|
|
7
|
+
automationEnabled: z.ZodBoolean;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
profileSetup: boolean;
|
|
10
|
+
campaignCreated: boolean;
|
|
11
|
+
filtersAdded: boolean;
|
|
12
|
+
rulesConfigured: boolean;
|
|
13
|
+
automationEnabled: boolean;
|
|
14
|
+
}, {
|
|
15
|
+
profileSetup: boolean;
|
|
16
|
+
campaignCreated: boolean;
|
|
17
|
+
filtersAdded: boolean;
|
|
18
|
+
rulesConfigured: boolean;
|
|
19
|
+
automationEnabled: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
export type OnboardingProgress = z.infer<typeof onboardingProgressSchema>;
|
|
@@ -2,27 +2,21 @@ import { z } from "zod";
|
|
|
2
2
|
import { Organization } from "../organization";
|
|
3
3
|
export declare const userSchema: z.ZodObject<{
|
|
4
4
|
id: z.ZodString;
|
|
5
|
-
|
|
6
|
-
lastName: z.ZodString;
|
|
7
|
-
displayName: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
8
6
|
email: z.ZodString;
|
|
9
7
|
organizationIds: z.ZodArray<z.ZodString, "many">;
|
|
10
8
|
createdAt: z.ZodNumber;
|
|
11
9
|
updatedAt: z.ZodNumber;
|
|
12
10
|
}, "strip", z.ZodTypeAny, {
|
|
13
11
|
id: string;
|
|
14
|
-
|
|
15
|
-
lastName: string;
|
|
16
|
-
displayName: string;
|
|
12
|
+
name: string;
|
|
17
13
|
email: string;
|
|
18
14
|
organizationIds: string[];
|
|
19
15
|
createdAt: number;
|
|
20
16
|
updatedAt: number;
|
|
21
17
|
}, {
|
|
22
18
|
id: string;
|
|
23
|
-
|
|
24
|
-
lastName: string;
|
|
25
|
-
displayName: string;
|
|
19
|
+
name: string;
|
|
26
20
|
email: string;
|
|
27
21
|
organizationIds: string[];
|
|
28
22
|
createdAt: number;
|
|
@@ -39,34 +33,34 @@ export declare const loginSchema: z.ZodObject<{
|
|
|
39
33
|
password: string;
|
|
40
34
|
}>;
|
|
41
35
|
export declare const registerSchema: z.ZodEffects<z.ZodObject<{
|
|
42
|
-
|
|
43
|
-
lastName: z.ZodString;
|
|
36
|
+
name: z.ZodString;
|
|
44
37
|
email: z.ZodString;
|
|
38
|
+
teamName: z.ZodString;
|
|
45
39
|
password: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
|
|
46
40
|
confirmPassword: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
|
|
47
41
|
}, "strip", z.ZodTypeAny, {
|
|
48
|
-
|
|
49
|
-
lastName: string;
|
|
42
|
+
name: string;
|
|
50
43
|
email: string;
|
|
51
44
|
password: string;
|
|
45
|
+
teamName: string;
|
|
52
46
|
confirmPassword: string;
|
|
53
47
|
}, {
|
|
54
|
-
|
|
55
|
-
lastName: string;
|
|
48
|
+
name: string;
|
|
56
49
|
email: string;
|
|
57
50
|
password: string;
|
|
51
|
+
teamName: string;
|
|
58
52
|
confirmPassword: string;
|
|
59
53
|
}>, {
|
|
60
|
-
|
|
61
|
-
lastName: string;
|
|
54
|
+
name: string;
|
|
62
55
|
email: string;
|
|
63
56
|
password: string;
|
|
57
|
+
teamName: string;
|
|
64
58
|
confirmPassword: string;
|
|
65
59
|
}, {
|
|
66
|
-
|
|
67
|
-
lastName: string;
|
|
60
|
+
name: string;
|
|
68
61
|
email: string;
|
|
69
62
|
password: string;
|
|
63
|
+
teamName: string;
|
|
70
64
|
confirmPassword: string;
|
|
71
65
|
}>;
|
|
72
66
|
export declare const upworkProfileSchema: z.ZodObject<{
|