lancer-shared 1.2.89 → 1.2.91
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 +12 -9
- package/dist/constants/collections.js +11 -13
- package/dist/constants/common-questions.js +1 -4
- package/dist/constants/index.js +10 -32
- package/dist/constants/job-filter-options.js +1 -4
- package/dist/constants/job-status.js +7 -12
- package/dist/constants/mappings/countryMapping.js +1 -3
- package/dist/constants/mappings/regionMapping.js +1 -3
- package/dist/constants/routes.js +43 -35
- package/dist/constants/upwork-accounts.js +3 -6
- package/dist/index.js +4 -20
- package/dist/schemas/account/account-status.js +2 -5
- package/dist/schemas/account/bidder-account.js +22 -24
- package/dist/schemas/account/index.js +3 -19
- package/dist/schemas/account/scraper-account.js +21 -24
- package/dist/schemas/ai/ai-config.js +8 -11
- package/dist/schemas/ai/index.js +3 -19
- package/dist/schemas/ai/proposal.js +10 -13
- package/dist/schemas/ai/suitability.js +8 -11
- package/dist/schemas/bid/bid-result.js +9 -13
- package/dist/schemas/bid/bid.js +29 -30
- package/dist/schemas/bid/index.js +2 -18
- package/dist/schemas/campaign/campaign-ai-metrics.js +5 -8
- package/dist/schemas/campaign/campaign-analytics.d.ts +40 -40
- package/dist/schemas/campaign/campaign-analytics.js +32 -31
- package/dist/schemas/campaign/campaign-expenses.js +5 -8
- package/dist/schemas/campaign/campaign-insights.js +30 -30
- package/dist/schemas/campaign/campaign-integrations.js +10 -13
- package/dist/schemas/campaign/campaign-job-count.js +3 -6
- package/dist/schemas/campaign/campaign.d.ts +21 -21
- package/dist/schemas/campaign/campaign.js +32 -35
- package/dist/schemas/campaign/index.js +7 -23
- package/dist/schemas/chat-message/chat-message.js +7 -10
- package/dist/schemas/chat-message/index.js +1 -17
- package/dist/schemas/config/agency-config.js +6 -9
- package/dist/schemas/config/index.js +1 -17
- package/dist/schemas/event/index.d.ts +58 -0
- package/dist/schemas/index.js +17 -32
- package/dist/schemas/job/haha.json +581 -0
- package/dist/schemas/job/job-filters.d.ts +8 -5
- package/dist/schemas/job-filters/index.js +1 -17
- package/dist/schemas/job-filters/job-filters.js +62 -65
- package/dist/schemas/lead/index.js +173 -19
- package/dist/schemas/lead/lead-note.js +13 -16
- package/dist/schemas/lead/lead-status.js +3 -6
- package/dist/schemas/lead/nuxt.js +287 -0
- package/dist/schemas/logger/index.js +1 -17
- package/dist/schemas/logger/log-event.js +100 -49
- package/dist/schemas/meter-event/index.d.ts +12 -0
- package/dist/schemas/organization/index.d.ts +15 -7
- package/dist/schemas/organization/index.js +70 -17
- package/dist/schemas/organization/member.js +7 -0
- package/dist/schemas/organization/organization.d.ts +177 -7
- package/dist/schemas/organization/organization.js +14 -17
- package/dist/schemas/organization/subscription.js +17 -0
- package/dist/schemas/proxy/index.js +3 -17
- package/dist/schemas/proxy/proxy-available-replacements.js +3 -0
- package/dist/schemas/proxy/proxy-country.js +249 -0
- package/dist/schemas/proxy/proxy.js +25 -17
- package/dist/schemas/saved-search/index.js +8 -11
- package/dist/schemas/scraper/index.js +2 -18
- package/dist/schemas/scraper/scrape-payload.d.ts +9 -9
- package/dist/schemas/scraper/scrape-payload.js +19 -14
- package/dist/schemas/scraper/scrape-result.js +21 -21
- package/dist/schemas/shared.js +12 -9
- package/dist/schemas/tier/index.d.ts +119 -0
- package/dist/schemas/time-filter/index.js +5 -8
- package/dist/schemas/transaction/index.js +17 -0
- package/dist/schemas/usage/index.js +18 -0
- package/dist/schemas/user/index.js +38 -41
- package/dist/types/account/account-status.js +1 -2
- package/dist/types/account/bidder-account.js +1 -2
- package/dist/types/account/index.js +3 -19
- package/dist/types/account/scraper-account.js +1 -2
- package/dist/types/ai/ai-config.js +1 -2
- package/dist/types/ai/index.js +3 -19
- package/dist/types/ai/proposal.js +1 -2
- package/dist/types/ai/suitability.js +1 -2
- package/dist/types/bid/bid-result.js +1 -2
- package/dist/types/bid/bid.js +1 -2
- package/dist/types/bid/index.js +2 -18
- package/dist/types/campaign/campaign-analytics.js +1 -2
- package/dist/types/campaign/campaign-expenses.js +1 -2
- package/dist/types/campaign/campaign-insights.js +1 -2
- package/dist/types/campaign/campaign-integrations.js +1 -2
- package/dist/types/campaign/campaign-job-count.js +1 -2
- package/dist/types/campaign/campaign.js +1 -2
- package/dist/types/campaign/index.js +6 -22
- package/dist/types/chat-message/chat-message.js +1 -2
- package/dist/types/chat-message/index.js +1 -17
- package/dist/types/config/agency-config.js +1 -2
- package/dist/types/config/index.js +1 -17
- package/dist/types/index.js +15 -29
- package/dist/types/job/index.js +3 -19
- package/dist/types/job/job-note.js +1 -2
- package/dist/types/job/job-status.js +1 -4
- package/dist/types/job/nuxt.js +1 -0
- package/dist/types/job-filters/index.js +1 -17
- package/dist/types/job-filters/job-filters.js +1 -2
- package/dist/types/logger/index.js +1 -17
- package/dist/types/logger/log-event.js +1 -2
- package/dist/types/saved-search/index.js +1 -2
- package/dist/types/scraper/index.js +2 -18
- package/dist/types/scraper/scrape-payload.js +1 -2
- package/dist/types/scraper/scrape-result.js +1 -2
- package/dist/types/shared.js +1 -0
- package/dist/types/time-filter/index.js +1 -2
- package/dist/types/transaction/index.js +1 -0
- package/dist/types/usage/index.js +1 -0
- package/dist/types/user/index.js +1 -2
- package/dist/utils/index.js +1 -17
- package/dist/utils/try-catch.js +8 -23
- package/package.json +1 -1
- package/dist/constants/account-status.d.ts +0 -3
- package/dist/constants/account-status.js +0 -17
- package/dist/schemas/account/manager-account.d.ts +0 -116
- package/dist/schemas/account/manager-account.js +0 -38
- package/dist/schemas/bidding/index.d.ts +0 -1
- package/dist/schemas/bidding/index.js +0 -17
- package/dist/schemas/bidding/proposal-bidding-status.d.ts +0 -26
- package/dist/schemas/bidding/proposal-bidding-status.js +0 -18
- package/dist/schemas/job/index.js +0 -19
- package/dist/schemas/job/job-details.d.ts +0 -335
- package/dist/schemas/job/job-details.js +0 -29
- package/dist/schemas/job/job-note.d.ts +0 -83
- package/dist/schemas/job/job-note.js +0 -30
- package/dist/schemas/job/job-status.d.ts +0 -3
- package/dist/schemas/job/job-status.js +0 -27
- package/dist/schemas/job/job.d.ts +0 -1160
- package/dist/schemas/job/job.js +0 -90
- package/dist/schemas/job/pipeline-job.d.ts +0 -602
- package/dist/schemas/job/pipeline-job.js +0 -42
- package/dist/schemas/job/upwork-job.d.ts +0 -334
- package/dist/schemas/job/upwork-job.js +0 -60
- package/dist/schemas/lead/lead.d.ts +0 -1897
- package/dist/schemas/lead/lead.js +0 -143
- package/dist/schemas/upwork-account/index.d.ts +0 -3
- package/dist/schemas/upwork-account/index.js +0 -19
- package/dist/schemas/upwork-account/upwork-account-status.d.ts +0 -2
- package/dist/schemas/upwork-account/upwork-account-status.js +0 -11
- package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +0 -95
- package/dist/schemas/upwork-account/upwork-business-manager-account.js +0 -35
- package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +0 -90
- package/dist/schemas/upwork-account/upwork-scraping-account.js +0 -29
- package/dist/types/account/manager-account.d.ts +0 -7
- package/dist/types/account/manager-account.js +0 -2
- package/dist/types/bidding/index.d.ts +0 -1
- package/dist/types/bidding/index.js +0 -17
- package/dist/types/bidding/proposal-bidding-status.d.ts +0 -3
- package/dist/types/bidding/proposal-bidding-status.js +0 -2
- package/dist/types/job/job-details.d.ts +0 -36
- package/dist/types/job/job-details.js +0 -2
- package/dist/types/job/job.d.ts +0 -36
- package/dist/types/job/job.js +0 -2
- package/dist/types/upwork-account/index.d.ts +0 -3
- package/dist/types/upwork-account/index.js +0 -19
- package/dist/types/upwork-account/upwork-account-status.d.ts +0 -3
- package/dist/types/upwork-account/upwork-account-status.js +0 -2
- package/dist/types/upwork-account/upwork-business-manager-account.d.ts +0 -7
- package/dist/types/upwork-account/upwork-business-manager-account.js +0 -2
- package/dist/types/upwork-account/upwork-scraping-account.d.ts +0 -5
- package/dist/types/upwork-account/upwork-scraping-account.js +0 -2
|
@@ -197,11 +197,11 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
197
197
|
projectDuration: import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodEnum<["Less than 1 month", "1 to 3 months", "3 to 6 months", "More than 6 months", "Unspecified"]>, "many">>;
|
|
198
198
|
experienceLevel: import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodEnum<["Entry level", "Intermediate", "Expert"]>, "many">>;
|
|
199
199
|
questions: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
200
|
-
hasQuestions: import("zod").
|
|
200
|
+
hasQuestions: import("zod").ZodArray<import("zod").ZodEnum<["all", "yes", "no"]>, "many">;
|
|
201
201
|
}, "strip", import("zod").ZodTypeAny, {
|
|
202
|
-
hasQuestions: "all" | "yes" | "no";
|
|
202
|
+
hasQuestions: ("all" | "yes" | "no")[];
|
|
203
203
|
}, {
|
|
204
|
-
hasQuestions
|
|
204
|
+
hasQuestions: ("all" | "yes" | "no")[];
|
|
205
205
|
}>>;
|
|
206
206
|
engagementType: import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodEnum<["Less than 30 hrs/week", "More than 30 hrs/week", "Unspecified"]>, "many">>;
|
|
207
207
|
clientInfo: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
@@ -299,7 +299,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
299
299
|
projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
|
|
300
300
|
experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
|
|
301
301
|
questions: {
|
|
302
|
-
hasQuestions: "all" | "yes" | "no";
|
|
302
|
+
hasQuestions: ("all" | "yes" | "no")[];
|
|
303
303
|
} | null;
|
|
304
304
|
engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
|
|
305
305
|
clientInfo: {
|
|
@@ -349,7 +349,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
349
349
|
projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
|
|
350
350
|
experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
|
|
351
351
|
questions: {
|
|
352
|
-
hasQuestions
|
|
352
|
+
hasQuestions: ("all" | "yes" | "no")[];
|
|
353
353
|
} | null;
|
|
354
354
|
engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
|
|
355
355
|
clientInfo: {
|
|
@@ -444,7 +444,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
444
444
|
projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
|
|
445
445
|
experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
|
|
446
446
|
questions: {
|
|
447
|
-
hasQuestions: "all" | "yes" | "no";
|
|
447
|
+
hasQuestions: ("all" | "yes" | "no")[];
|
|
448
448
|
} | null;
|
|
449
449
|
engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
|
|
450
450
|
clientInfo: {
|
|
@@ -521,7 +521,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
521
521
|
projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
|
|
522
522
|
experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
|
|
523
523
|
questions: {
|
|
524
|
-
hasQuestions
|
|
524
|
+
hasQuestions: ("all" | "yes" | "no")[];
|
|
525
525
|
} | null;
|
|
526
526
|
engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
|
|
527
527
|
clientInfo: {
|
|
@@ -1529,7 +1529,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
1529
1529
|
projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
|
|
1530
1530
|
experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
|
|
1531
1531
|
questions: {
|
|
1532
|
-
hasQuestions: "all" | "yes" | "no";
|
|
1532
|
+
hasQuestions: ("all" | "yes" | "no")[];
|
|
1533
1533
|
} | null;
|
|
1534
1534
|
engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
|
|
1535
1535
|
clientInfo: {
|
|
@@ -1813,7 +1813,7 @@ export declare const checkLeadStatusPayloadSchema: import("zod").ZodObject<{
|
|
|
1813
1813
|
projectDuration: ("Less than 1 month" | "1 to 3 months" | "3 to 6 months" | "More than 6 months" | "Unspecified")[] | null;
|
|
1814
1814
|
experienceLevel: ("Entry level" | "Intermediate" | "Expert")[] | null;
|
|
1815
1815
|
questions: {
|
|
1816
|
-
hasQuestions
|
|
1816
|
+
hasQuestions: ("all" | "yes" | "no")[];
|
|
1817
1817
|
} | null;
|
|
1818
1818
|
engagementType: ("Unspecified" | "Less than 30 hrs/week" | "More than 30 hrs/week")[] | null;
|
|
1819
1819
|
clientInfo: {
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
username: zod_1.z.string(),
|
|
9
|
-
password: zod_1.z.string(),
|
|
1
|
+
import { any, array, object, string } from "zod";
|
|
2
|
+
import { jobActivityOffsetHourSchema, jobListingSchema } from "../lead";
|
|
3
|
+
export const scrapePayloadSchema = object({
|
|
4
|
+
latestJobsUrls: array(string()),
|
|
5
|
+
cookies: array(any()),
|
|
6
|
+
username: string(),
|
|
7
|
+
password: string(),
|
|
10
8
|
});
|
|
11
|
-
|
|
12
|
-
profileUrl:
|
|
13
|
-
cookies:
|
|
14
|
-
username:
|
|
15
|
-
password:
|
|
9
|
+
export const scrapeUserProfilePayloadSchema = object({
|
|
10
|
+
profileUrl: string(),
|
|
11
|
+
cookies: array(any()),
|
|
12
|
+
username: string(),
|
|
13
|
+
password: string(),
|
|
14
|
+
});
|
|
15
|
+
export const scrapeJobPayloadSchema = object({
|
|
16
|
+
listing: jobListingSchema,
|
|
17
|
+
});
|
|
18
|
+
export const scrapeJobActivityPayloadSchema = object({
|
|
19
|
+
listing: jobListingSchema,
|
|
20
|
+
offsetHour: jobActivityOffsetHourSchema,
|
|
16
21
|
});
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
]);
|
|
12
|
-
exports.scrapeResultSchema = zod_1.z.object({
|
|
13
|
-
jobs: zod_1.z.array(lead_1.upworkJobSchema),
|
|
14
|
-
cookies: zod_1.z.array(zod_1.z.any()),
|
|
15
|
-
region: exports.regionSchema,
|
|
16
|
-
usAccountCookies: zod_1.z.array(zod_1.z.any()).optional(),
|
|
17
|
-
ukAccountCookies: zod_1.z.array(zod_1.z.any()).optional(),
|
|
1
|
+
import { any, array, boolean, object, string } from "zod";
|
|
2
|
+
import { jobListingSchema, upworkJobSchema } from "../lead";
|
|
3
|
+
import { regionSchema } from "../shared";
|
|
4
|
+
import { upworkProfileSchema } from "../user";
|
|
5
|
+
export const scrapeResultSchema = object({
|
|
6
|
+
jobs: array(upworkJobSchema),
|
|
7
|
+
cookies: array(any()),
|
|
8
|
+
region: regionSchema,
|
|
9
|
+
usAccountCookies: array(any()).optional(),
|
|
10
|
+
ukAccountCookies: array(any()).optional(),
|
|
18
11
|
});
|
|
19
|
-
|
|
20
|
-
success:
|
|
21
|
-
message:
|
|
22
|
-
data:
|
|
12
|
+
export const scrapeUserProfileResultSchema = object({
|
|
13
|
+
success: boolean(),
|
|
14
|
+
message: string(),
|
|
15
|
+
data: upworkProfileSchema,
|
|
16
|
+
});
|
|
17
|
+
export const scrapeFeedResultSchema = object({
|
|
18
|
+
listings: array(jobListingSchema),
|
|
19
|
+
cookies: array(any()),
|
|
20
|
+
region: regionSchema,
|
|
21
|
+
usAccountCookies: array(any()).optional(),
|
|
22
|
+
ukAccountCookies: array(any()).optional(),
|
|
23
23
|
});
|
package/dist/schemas/shared.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.booleanSchema = zod_1.z
|
|
6
|
-
.union([zod_1.z.boolean(), zod_1.z.literal("true"), zod_1.z.literal("false")])
|
|
1
|
+
import { coerce, string, z } from "zod";
|
|
2
|
+
export const booleanSchema = z
|
|
3
|
+
.union([z.boolean(), z.literal("true"), z.literal("false")])
|
|
7
4
|
.transform((value) => value === true || value === "true");
|
|
8
|
-
const dateSchema = (params = {}) =>
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
export const dateSchema = (params = {}) => coerce.date({
|
|
6
|
+
...params,
|
|
7
|
+
});
|
|
8
|
+
export const passwordSchema = string()
|
|
11
9
|
.min(8, "Password must be at least 8 characters long.")
|
|
12
10
|
.max(255, "Password must be at most 255 characters long.")
|
|
13
11
|
.refine((password) => /[a-z]/.test(password), "Password must contain at least one lowercase letter.")
|
|
14
12
|
.refine((password) => /[A-Z]/.test(password), "Password must contain at least one uppercase letter.")
|
|
15
13
|
.refine((password) => /\d/.test(password), "Password must contain at least one number.")
|
|
16
14
|
.refine((password) => /[\W_]/.test(password), "Password must contain at least one symbol.");
|
|
15
|
+
export const regionSchema = z.union([
|
|
16
|
+
z.literal("USOnly"),
|
|
17
|
+
z.literal("UKOnly"),
|
|
18
|
+
z.literal("Worldwide"),
|
|
19
|
+
]);
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { infer, z } from "zod";
|
|
2
|
+
export declare const planSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
slug: z.ZodString;
|
|
6
|
+
items: z.ZodArray<z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
billingScheme: z.ZodEnum<["per_unit", "tiered"]>;
|
|
9
|
+
usageType: z.ZodNullable<z.ZodEnum<["metered", "licensed"]>>;
|
|
10
|
+
unitAmount: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
tiers: z.ZodArray<z.ZodObject<{
|
|
12
|
+
flatAmount: z.ZodNullable<z.ZodNumber>;
|
|
13
|
+
flatAmountDecimal: z.ZodNullable<z.ZodString>;
|
|
14
|
+
unitAmount: z.ZodNullable<z.ZodNumber>;
|
|
15
|
+
unitAmountDecimal: z.ZodString;
|
|
16
|
+
upTo: z.ZodNullable<z.ZodNumber>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
flatAmount: number | null;
|
|
19
|
+
flatAmountDecimal: string | null;
|
|
20
|
+
unitAmount: number | null;
|
|
21
|
+
unitAmountDecimal: string;
|
|
22
|
+
upTo: number | null;
|
|
23
|
+
}, {
|
|
24
|
+
flatAmount: number | null;
|
|
25
|
+
flatAmountDecimal: string | null;
|
|
26
|
+
unitAmount: number | null;
|
|
27
|
+
unitAmountDecimal: string;
|
|
28
|
+
upTo: number | null;
|
|
29
|
+
}>, "many">;
|
|
30
|
+
currency: z.ZodString;
|
|
31
|
+
interval: z.ZodEnum<["day", "week", "month", "year"]>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
id: string;
|
|
34
|
+
unitAmount: number | null;
|
|
35
|
+
billingScheme: "per_unit" | "tiered";
|
|
36
|
+
usageType: "metered" | "licensed" | null;
|
|
37
|
+
tiers: {
|
|
38
|
+
flatAmount: number | null;
|
|
39
|
+
flatAmountDecimal: string | null;
|
|
40
|
+
unitAmount: number | null;
|
|
41
|
+
unitAmountDecimal: string;
|
|
42
|
+
upTo: number | null;
|
|
43
|
+
}[];
|
|
44
|
+
currency: string;
|
|
45
|
+
interval: "day" | "week" | "month" | "year";
|
|
46
|
+
}, {
|
|
47
|
+
id: string;
|
|
48
|
+
unitAmount: number | null;
|
|
49
|
+
billingScheme: "per_unit" | "tiered";
|
|
50
|
+
usageType: "metered" | "licensed" | null;
|
|
51
|
+
tiers: {
|
|
52
|
+
flatAmount: number | null;
|
|
53
|
+
flatAmountDecimal: string | null;
|
|
54
|
+
unitAmount: number | null;
|
|
55
|
+
unitAmountDecimal: string;
|
|
56
|
+
upTo: number | null;
|
|
57
|
+
}[];
|
|
58
|
+
currency: string;
|
|
59
|
+
interval: "day" | "week" | "month" | "year";
|
|
60
|
+
}>, "many">;
|
|
61
|
+
version: z.ZodNumber;
|
|
62
|
+
features: z.ZodArray<z.ZodString, "many">;
|
|
63
|
+
sortOrder: z.ZodNumber;
|
|
64
|
+
isActive: z.ZodBoolean;
|
|
65
|
+
createdAt: z.ZodDate;
|
|
66
|
+
archivedAt: z.ZodNullable<z.ZodDate>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
id: string;
|
|
69
|
+
createdAt: Date;
|
|
70
|
+
name: string;
|
|
71
|
+
isActive: boolean;
|
|
72
|
+
sortOrder: number;
|
|
73
|
+
slug: string;
|
|
74
|
+
items: {
|
|
75
|
+
id: string;
|
|
76
|
+
unitAmount: number | null;
|
|
77
|
+
billingScheme: "per_unit" | "tiered";
|
|
78
|
+
usageType: "metered" | "licensed" | null;
|
|
79
|
+
tiers: {
|
|
80
|
+
flatAmount: number | null;
|
|
81
|
+
flatAmountDecimal: string | null;
|
|
82
|
+
unitAmount: number | null;
|
|
83
|
+
unitAmountDecimal: string;
|
|
84
|
+
upTo: number | null;
|
|
85
|
+
}[];
|
|
86
|
+
currency: string;
|
|
87
|
+
interval: "day" | "week" | "month" | "year";
|
|
88
|
+
}[];
|
|
89
|
+
version: number;
|
|
90
|
+
features: string[];
|
|
91
|
+
archivedAt: Date | null;
|
|
92
|
+
}, {
|
|
93
|
+
id: string;
|
|
94
|
+
createdAt: Date;
|
|
95
|
+
name: string;
|
|
96
|
+
isActive: boolean;
|
|
97
|
+
sortOrder: number;
|
|
98
|
+
slug: string;
|
|
99
|
+
items: {
|
|
100
|
+
id: string;
|
|
101
|
+
unitAmount: number | null;
|
|
102
|
+
billingScheme: "per_unit" | "tiered";
|
|
103
|
+
usageType: "metered" | "licensed" | null;
|
|
104
|
+
tiers: {
|
|
105
|
+
flatAmount: number | null;
|
|
106
|
+
flatAmountDecimal: string | null;
|
|
107
|
+
unitAmount: number | null;
|
|
108
|
+
unitAmountDecimal: string;
|
|
109
|
+
upTo: number | null;
|
|
110
|
+
}[];
|
|
111
|
+
currency: string;
|
|
112
|
+
interval: "day" | "week" | "month" | "year";
|
|
113
|
+
}[];
|
|
114
|
+
version: number;
|
|
115
|
+
features: string[];
|
|
116
|
+
archivedAt: Date | null;
|
|
117
|
+
}>;
|
|
118
|
+
export interface Plan extends infer<typeof planSchema> {
|
|
119
|
+
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
zod_1.z.literal("last_7_days"),
|
|
7
|
-
zod_1.z.literal("last_30_days"),
|
|
8
|
-
zod_1.z.literal("all_time"),
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const timeFilterSchema = z.union([
|
|
3
|
+
z.literal("last_7_days"),
|
|
4
|
+
z.literal("last_30_days"),
|
|
5
|
+
z.literal("all_time"),
|
|
9
6
|
]);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { number, object, string, z } from "zod";
|
|
2
|
+
export const transactionTypeEnum = z.enum(["subscription", "add-on", "refund"]);
|
|
3
|
+
export const transactionStatusEnum = z.enum([
|
|
4
|
+
"succeeded",
|
|
5
|
+
"failed",
|
|
6
|
+
"refunded",
|
|
7
|
+
]);
|
|
8
|
+
export const transactionSchema = object({
|
|
9
|
+
orgId: string(),
|
|
10
|
+
type: transactionTypeEnum,
|
|
11
|
+
creditsPurchased: number(),
|
|
12
|
+
creditsGranted: number().nullable(),
|
|
13
|
+
amountUsd: number(),
|
|
14
|
+
stripeInvoiceId: string(),
|
|
15
|
+
status: transactionStatusEnum,
|
|
16
|
+
timestamp: number(),
|
|
17
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { number, object, string } from "zod";
|
|
2
|
+
const breakdownSchema = object({
|
|
3
|
+
suitability: number(),
|
|
4
|
+
proposal: number(),
|
|
5
|
+
bidding: number(),
|
|
6
|
+
});
|
|
7
|
+
export const dailyUsageSchema = object({
|
|
8
|
+
breakdown: breakdownSchema,
|
|
9
|
+
tokensUsed: number().optional(),
|
|
10
|
+
campaignId: string().optional(),
|
|
11
|
+
model: string(),
|
|
12
|
+
timestamp: number(),
|
|
13
|
+
});
|
|
14
|
+
export const periodUsageSchema = object({
|
|
15
|
+
usedCredits: number(),
|
|
16
|
+
breakdown: breakdownSchema,
|
|
17
|
+
lastUpdated: number(),
|
|
18
|
+
});
|
|
@@ -1,55 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
organizationIds: zod_1.z.array((0, zod_1.string)()),
|
|
13
|
-
createdAt: (0, zod_1.number)(),
|
|
14
|
-
updatedAt: (0, zod_1.number)(),
|
|
1
|
+
import { number, object, string, z } from "zod";
|
|
2
|
+
import { passwordSchema } from "../shared";
|
|
3
|
+
export const userSchema = object({
|
|
4
|
+
id: string(),
|
|
5
|
+
firstName: string(),
|
|
6
|
+
lastName: string(),
|
|
7
|
+
displayName: string(),
|
|
8
|
+
email: string(),
|
|
9
|
+
organizationIds: z.array(string()),
|
|
10
|
+
createdAt: number(),
|
|
11
|
+
updatedAt: number(),
|
|
15
12
|
});
|
|
16
|
-
|
|
17
|
-
email:
|
|
18
|
-
password:
|
|
13
|
+
export const loginSchema = object({
|
|
14
|
+
email: string().email(),
|
|
15
|
+
password: passwordSchema,
|
|
19
16
|
});
|
|
20
|
-
|
|
21
|
-
firstName:
|
|
22
|
-
lastName:
|
|
23
|
-
email:
|
|
17
|
+
export const registerSchema = object({
|
|
18
|
+
firstName: string().min(1, "First name is required").max(255),
|
|
19
|
+
lastName: string().min(1, "Last name is required").max(255),
|
|
20
|
+
email: string()
|
|
24
21
|
.email("Must be a valid email address")
|
|
25
22
|
.max(255)
|
|
26
23
|
.min(1, "Email address is required"),
|
|
27
|
-
password:
|
|
28
|
-
confirmPassword:
|
|
24
|
+
password: passwordSchema,
|
|
25
|
+
confirmPassword: passwordSchema,
|
|
29
26
|
}).refine(({ password, confirmPassword }) => password === confirmPassword, {
|
|
30
27
|
message: `Passwords don't match.`,
|
|
31
28
|
path: ["confirmPassword"],
|
|
32
29
|
});
|
|
33
|
-
|
|
34
|
-
name:
|
|
35
|
-
country:
|
|
36
|
-
bio:
|
|
37
|
-
skills:
|
|
38
|
-
certifications:
|
|
39
|
-
employmentHistory:
|
|
40
|
-
.array(
|
|
41
|
-
jobTitle:
|
|
42
|
-
period:
|
|
43
|
-
description:
|
|
30
|
+
export const upworkProfileSchema = object({
|
|
31
|
+
name: string().nullable(),
|
|
32
|
+
country: string().nullable(),
|
|
33
|
+
bio: string().nullable(),
|
|
34
|
+
skills: z.array(string()).nullable(),
|
|
35
|
+
certifications: z.array(string()).nullable(),
|
|
36
|
+
employmentHistory: z
|
|
37
|
+
.array(z.object({
|
|
38
|
+
jobTitle: string(),
|
|
39
|
+
period: string(),
|
|
40
|
+
description: string(),
|
|
44
41
|
}))
|
|
45
42
|
.nullable(),
|
|
46
|
-
languages:
|
|
47
|
-
portfolio:
|
|
48
|
-
.array(
|
|
49
|
-
title:
|
|
50
|
-
description:
|
|
51
|
-
skills:
|
|
52
|
-
publishedDate:
|
|
43
|
+
languages: z.record(string(), string()).nullable(),
|
|
44
|
+
portfolio: z
|
|
45
|
+
.array(z.object({
|
|
46
|
+
title: string(),
|
|
47
|
+
description: string(),
|
|
48
|
+
skills: z.array(string()),
|
|
49
|
+
publishedDate: string(),
|
|
53
50
|
}))
|
|
54
51
|
.nullable(),
|
|
55
52
|
});
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./account-status"), exports);
|
|
18
|
-
__exportStar(require("./bidder-account"), exports);
|
|
19
|
-
__exportStar(require("./scraper-account"), exports);
|
|
1
|
+
export * from './account-status';
|
|
2
|
+
export * from './bidder-account';
|
|
3
|
+
export * from './scraper-account';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/ai/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./ai-config"), exports);
|
|
18
|
-
__exportStar(require("./proposal"), exports);
|
|
19
|
-
__exportStar(require("./suitability"), exports);
|
|
1
|
+
export * from './ai-config';
|
|
2
|
+
export * from './proposal';
|
|
3
|
+
export * from './suitability';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/bid/bid.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/types/bid/index.js
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./bid"), exports);
|
|
18
|
-
__exportStar(require("./bid-result"), exports);
|
|
1
|
+
export * from './bid';
|
|
2
|
+
export * from './bid-result';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./campaign"), exports);
|
|
18
|
-
__exportStar(require("./campaign-insights"), exports);
|
|
19
|
-
__exportStar(require("./campaign-job-count"), exports);
|
|
20
|
-
__exportStar(require("./campaign-expenses"), exports);
|
|
21
|
-
__exportStar(require("./campaign-integrations"), exports);
|
|
22
|
-
__exportStar(require("./campaign-analytics"), exports);
|
|
1
|
+
export * from "./campaign";
|
|
2
|
+
export * from "./campaign-insights";
|
|
3
|
+
export * from "./campaign-job-count";
|
|
4
|
+
export * from "./campaign-expenses";
|
|
5
|
+
export * from "./campaign-integrations";
|
|
6
|
+
export * from "./campaign-analytics";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|