lancer-shared 1.2.25 → 1.2.27

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.
Files changed (120) hide show
  1. package/dist/bundle.cjs.js +19345 -11795
  2. package/dist/constants/campaign-notifications.d.ts +2 -0
  3. package/dist/constants/organization.d.ts +2 -2
  4. package/dist/constants/proxies.d.ts +4 -0
  5. package/dist/constants/routes.d.ts +17 -8
  6. package/dist/constants/routes.js +6 -0
  7. package/dist/constants/upwork-accounts.d.ts +1 -1
  8. package/dist/constants/upwork-filters.d.ts +5 -0
  9. package/dist/constants/upwork-filters.js +75 -0
  10. package/dist/index.d.ts +3 -3
  11. package/dist/schemas/account/account-status.d.ts +2 -2
  12. package/dist/schemas/account/bidder-account.d.ts +286 -36
  13. package/dist/schemas/account/exceptions/index.d.ts +3 -0
  14. package/dist/schemas/account/exceptions/invalid-google-oauth-token.exception.d.ts +5 -0
  15. package/dist/schemas/account/exceptions/no-bidder-accounts-available.d.ts +5 -0
  16. package/dist/schemas/account/exceptions/no-bidder-accounts-available.exception.d.ts +5 -0
  17. package/dist/schemas/account/exceptions/no-google-oauth-tokens-found.exception.d.ts +5 -0
  18. package/dist/schemas/account/index.d.ts +4 -3
  19. package/dist/schemas/account/scraper-account.d.ts +7 -7
  20. package/dist/schemas/ai-config/ai-config.d.ts +39 -0
  21. package/dist/schemas/ai-config/ai-config.js +12 -0
  22. package/dist/schemas/ai-config/index.d.ts +1 -0
  23. package/dist/schemas/ai-config/index.js +17 -0
  24. package/dist/schemas/bid/bid-status.d.ts +30 -0
  25. package/dist/schemas/bid/bid-status.js +15 -0
  26. package/dist/schemas/bid/exceptions/base-exception.d.ts +4 -0
  27. package/dist/schemas/bid/exceptions/cloudflare-challenge-failed.exception.d.ts +5 -0
  28. package/dist/schemas/bid/exceptions/delete-multilogin-profile.exception.d.ts +5 -0
  29. package/dist/schemas/bid/exceptions/dropdown-option-not-present.exception.d.ts +5 -0
  30. package/dist/schemas/bid/exceptions/element-not-clickable.exception.d.ts +5 -0
  31. package/dist/schemas/bid/exceptions/evalaute-element.exception.d.ts +5 -0
  32. package/dist/schemas/bid/exceptions/evaluate-function.exception.d.ts +5 -0
  33. package/dist/schemas/bid/exceptions/evalute-element.exception.d.ts +5 -0
  34. package/dist/schemas/bid/exceptions/get-multilogin-browser.exception.d.ts +5 -0
  35. package/dist/schemas/bid/exceptions/incorrect-security-question-answer.exception.d.ts +5 -0
  36. package/dist/schemas/bid/exceptions/index.d.ts +61 -0
  37. package/dist/schemas/bid/exceptions/init-browser.exception.d.ts +5 -0
  38. package/dist/schemas/bid/exceptions/insufficient-connects.exception.d.ts +5 -0
  39. package/dist/schemas/bid/exceptions/invalid-credentials.exception.d.ts +5 -0
  40. package/dist/schemas/bid/exceptions/invalid-job-url.exception.d.ts +5 -0
  41. package/dist/schemas/bid/exceptions/login-failed.exception.d.ts +5 -0
  42. package/dist/schemas/bid/exceptions/multilogin-authentication.exception.d.ts +5 -0
  43. package/dist/schemas/bid/exceptions/navigation-timeout.exception.d.ts +5 -0
  44. package/dist/schemas/bid/exceptions/new-browser-page.exception.d.ts +5 -0
  45. package/dist/schemas/bid/exceptions/new-page.exception.d.ts +5 -0
  46. package/dist/schemas/bid/exceptions/open-new-url.exception.d.ts +5 -0
  47. package/dist/schemas/bid/exceptions/parse-connects.exception.d.ts +5 -0
  48. package/dist/schemas/bid/exceptions/proposal-error-alert.exception.d.ts +5 -0
  49. package/dist/schemas/bid/exceptions/proposal-form-warning-alert.exception.d.ts +5 -0
  50. package/dist/schemas/bid/exceptions/proposal-submit-failed.exception.d.ts +5 -0
  51. package/dist/schemas/bid/exceptions/pupeteer-conection-error.exception.d.ts +5 -0
  52. package/dist/schemas/bid/exceptions/question-pair-not-matching.exception.d.ts +5 -0
  53. package/dist/schemas/bid/exceptions/select-agency.exception.d.ts +5 -0
  54. package/dist/schemas/bid/exceptions/select-contractor.exception.d.ts +5 -0
  55. package/dist/schemas/bid/exceptions/selector-not-found.exception.d.ts +5 -0
  56. package/dist/schemas/bid/exceptions/typed-value-not-matching.exception.d.ts +5 -0
  57. package/dist/schemas/bid/exceptions/typing-input-field.exception.d.ts +5 -0
  58. package/dist/schemas/bid/exceptions/wait-for-function-timeout.d.ts +5 -0
  59. package/dist/schemas/bid/exceptions/wait-for-function-timeout.exception.d.ts +5 -0
  60. package/dist/schemas/bid/index.d.ts +1 -0
  61. package/dist/schemas/bidding/proposal-dto.d.ts +26 -0
  62. package/dist/schemas/bidding/proposal-dto.js +18 -0
  63. package/dist/schemas/campaign/campaign-integrations.d.ts +0 -5
  64. package/dist/schemas/campaign/campaign-notifications.d.ts +9 -0
  65. package/dist/schemas/campaign/campaign.d.ts +171 -238
  66. package/dist/schemas/campaign/index.d.ts +6 -6
  67. package/dist/schemas/index.d.ts +1 -0
  68. package/dist/schemas/invoice/index.d.ts +3 -0
  69. package/dist/schemas/job/job-pipeline.d.ts +74 -0
  70. package/dist/schemas/job/job-pipeline.js +29 -0
  71. package/dist/schemas/job/job-suitability.d.ts +12 -0
  72. package/dist/schemas/job/job-suitability.js +13 -0
  73. package/dist/schemas/job/job.d.ts +16 -16
  74. package/dist/schemas/job/pipeline-job.d.ts +9 -3
  75. package/dist/schemas/job/pipeline-job.js +1 -0
  76. package/dist/schemas/knowledge-object/index.d.ts +1 -0
  77. package/dist/schemas/knowledge-object/index.js +17 -0
  78. package/dist/schemas/knowledge-object/knowledge-object.d.ts +128 -0
  79. package/dist/schemas/knowledge-object/knowledge-object.js +47 -0
  80. package/dist/schemas/logger/log-event.d.ts +18 -17
  81. package/dist/schemas/organization/index.d.ts +16 -67
  82. package/dist/schemas/organization/subscription.d.ts +3 -0
  83. package/dist/schemas/proxy/proxy.js +3 -1
  84. package/dist/schemas/scraper/scrape-payload.d.ts +72 -60
  85. package/dist/schemas/scraper/scrape-response.d.ts +345 -0
  86. package/dist/schemas/scraper/scrape-response.js +9 -0
  87. package/dist/schemas/upwork-account/index.d.ts +1 -1
  88. package/dist/schemas/upwork-account/index.js +1 -1
  89. package/dist/schemas/upwork-account/upwork-business-manager-account.d.ts +14 -14
  90. package/dist/schemas/upwork-account/upwork-business-manager-account.js +2 -2
  91. package/dist/schemas/upwork-account/upwork-scraper-account.d.ts +92 -0
  92. package/dist/schemas/upwork-account/upwork-scraper-account.js +31 -0
  93. package/dist/schemas/upwork-account/upwork-scraping-account.d.ts +23 -23
  94. package/dist/schemas/upwork-account/upwork-scraping-account.js +4 -3
  95. package/dist/schemas/usage-event/index.d.ts +62 -0
  96. package/dist/types/ai-config/ai-config.d.ts +6 -0
  97. package/dist/types/ai-config/ai-config.js +2 -0
  98. package/dist/types/ai-config/index.d.ts +1 -0
  99. package/dist/types/ai-config/index.js +17 -0
  100. package/dist/types/bid/bid-status.d.ts +5 -0
  101. package/dist/types/bid/bid-status.js +2 -0
  102. package/dist/types/bidding/proposal-dto.d.ts +3 -0
  103. package/dist/types/bidding/proposal-dto.js +2 -0
  104. package/dist/types/campaign/campaign-insights.d.ts +1 -2
  105. package/dist/types/campaign/campaign-notifications.d.ts +7 -0
  106. package/dist/types/campaign/campaign.d.ts +5 -6
  107. package/dist/types/campaign/index.d.ts +3 -6
  108. package/dist/types/job/job-pipeline.d.ts +4 -0
  109. package/dist/types/job/job-pipeline.js +2 -0
  110. package/dist/types/job/job-suitability.d.ts +3 -0
  111. package/dist/types/job/job-suitability.js +2 -0
  112. package/dist/types/knowledge-object/index.d.ts +1 -0
  113. package/dist/types/knowledge-object/index.js +17 -0
  114. package/dist/types/knowledge-object/knowledge-object.d.ts +4 -0
  115. package/dist/types/knowledge-object/knowledge-object.js +2 -0
  116. package/dist/types/logger/log-event.d.ts +5 -4
  117. package/dist/types/scraper/scrape-response.d.ts +4 -0
  118. package/dist/types/scraper/scrape-response.js +2 -0
  119. package/dist/types/upwork-account/upwork-scraping-account.d.ts +2 -2
  120. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ import { CampaignNotificationType } from '../types/campaign/campaign-notifications';
2
+ export declare const CAMPAIGN_NOTIFICATION_TYPES: Record<CampaignNotificationType, string>;
@@ -1,2 +1,2 @@
1
- import { TrackUsageEventType } from "../schemas";
2
- export declare const creditDeductionAmountMap: Record<TrackUsageEventType, number>;
1
+ import { CreditDeductionEventType } from "../schemas";
2
+ export declare const creditDeductionAmountMap: Record<CreditDeductionEventType, number>;
@@ -0,0 +1,4 @@
1
+ import { ProxyCountry } from '../schemas';
2
+ export declare const countryToWebshareCountryCode: (country: ProxyCountry) => string;
3
+ export declare const webshareCountryCodeToCountry: (countryCode: string) => ProxyCountry;
4
+ export declare const IPQualityScoreCountryCodeToCountry: (countryCode: string) => ProxyCountry;
@@ -1,4 +1,4 @@
1
- import { Moment } from "moment";
1
+ import { Moment } from 'moment';
2
2
  export declare const ROUTES: {
3
3
  readonly AUTH: {
4
4
  readonly BASE: "auth";
@@ -73,9 +73,6 @@ export declare const ROUTES: {
73
73
  readonly SYNC: "admin/proxies/sync";
74
74
  readonly AVAILABLE_REPLACEMENTS: "admin/proxies/available-replacements";
75
75
  };
76
- readonly REVENUE: {
77
- readonly BASE: "admin/revenue";
78
- };
79
76
  readonly DASHBOARD: {
80
77
  readonly CAMPAIGN_STATS: "admin/dashboard/campaign-stats";
81
78
  };
@@ -100,13 +97,24 @@ export declare const ROUTES: {
100
97
  readonly PAYMENT_METHODS: (id: string) => string;
101
98
  readonly TRACK_USAGE: (id: string) => string;
102
99
  readonly SUBSCRIBE: (id: string) => string;
100
+ readonly BIDDER_ACCOUNTS: {
101
+ readonly BASE: (id: string) => string;
102
+ readonly BY_ID: (id: string, bidderId: string) => string;
103
+ readonly AVAILABLE_LANCER_PROVIDED_BIDDER_ACCOUNT: (id: string) => string;
104
+ readonly ACCEPT_UPWORK_INVITATION: (id: string, bidderId: string) => string;
105
+ };
103
106
  readonly CAMPAIGNS: {
104
107
  readonly BASE: (organizationId: string) => string;
105
108
  readonly BY_ID: (organizationId: string, campaignId: string) => string;
106
109
  readonly CONNECTS_SAVED: (organizationId: string, campaignId: string) => string;
110
+ readonly BIDDER_ACCOUNTS: {
111
+ readonly BASE: (organizationId: string, campaignId: string) => string;
112
+ };
107
113
  readonly LEADS: {
108
114
  readonly BASE: (organizationId: string, campaignId: string) => string;
109
115
  readonly BY_ID: (organizationId: string, campaignId: string, leadId: string) => string;
116
+ readonly SEND_NOTIFICATION: (organizationId: string, campaignId: string, leadId: string) => string;
117
+ readonly SEND_TEST_NOTIFICATION: (organizationId: string, campaignId: string) => string;
110
118
  readonly SEARCH: (organizationId: string, campaignId: string) => string;
111
119
  };
112
120
  readonly ANALYTICS: (organizationId: string, campaignId: string) => string;
@@ -163,6 +171,7 @@ export declare const ROUTES: {
163
171
  readonly BASE: (id: string) => string;
164
172
  readonly BY_ID: (organizationId: string, userId: string) => string;
165
173
  };
174
+ readonly INVOICE_PREVIEW: (id: string) => string;
166
175
  };
167
176
  readonly TRANSACTIONS: {
168
177
  readonly BASE: "transactions";
@@ -175,10 +184,6 @@ export declare const ROUTES: {
175
184
  readonly TEST_AI_CONFIG: "agent/test-ai-config";
176
185
  readonly TEST_SYSTEM_PROMPTS: "agent/test-system-prompts";
177
186
  };
178
- readonly BIDDERS: {
179
- readonly BASE: "bidders";
180
- readonly BY_ID: (id: string) => string;
181
- };
182
187
  readonly PLANS: {
183
188
  readonly BASE: "plans";
184
189
  readonly BY_ID: (id: string) => string;
@@ -187,6 +192,10 @@ export declare const ROUTES: {
187
192
  readonly BASE: "notifications";
188
193
  readonly SEND_ALERT: "notifications/send-alert";
189
194
  };
195
+ readonly USAGE_EVENTS: {
196
+ readonly BASE: "usage-events";
197
+ readonly BY_ID: (id: string) => string;
198
+ };
190
199
  };
191
200
  export type RouteParams = {
192
201
  id?: string;
@@ -91,6 +91,12 @@ exports.ROUTES = {
91
91
  BY_PROVIDER: (provider) => `admin/scraper-accounts/${provider}`,
92
92
  BY_PROVIDER_AND_ID: (provider, id) => `admin/scraper-accounts/${provider}/${id}`,
93
93
  },
94
+ PROXIES: {
95
+ BASE: 'admin/proxies',
96
+ BY_ID: (id) => `admin/proxies/${id}`,
97
+ REPLACE_PROXY: (id) => `admin/proxies/${id}/replace`,
98
+ SYNC: 'admin/proxies/sync',
99
+ },
94
100
  },
95
101
  BID: {
96
102
  BASE: 'bid',
@@ -1,4 +1,4 @@
1
- import { AccountStatus, BidderAccountProvider } from "../schemas";
1
+ import { AccountStatus, BidderAccountProvider } from '../schemas';
2
2
  export declare const accountStatusOrder: AccountStatus[];
3
3
  export declare const accountStatusDisplayMap: Record<AccountStatus, string>;
4
4
  export declare const bidderAccountProviderDisplayMap: Record<BidderAccountProvider, string>;
@@ -0,0 +1,5 @@
1
+ import { KnowledgeObject } from '../types/knowledge-object';
2
+ export declare const CATEGORIES: string[];
3
+ export declare const EXPERIENCE_LEVELS: string[];
4
+ export declare const CLIENT_HISTORY: string[];
5
+ export declare const emptyKnowledgeObject: KnowledgeObject;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyKnowledgeObject = exports.CLIENT_HISTORY = exports.EXPERIENCE_LEVELS = exports.CATEGORIES = void 0;
4
+ exports.CATEGORIES = [
5
+ 'Accounting',
6
+ 'Business Analysis & Strategy',
7
+ 'Financial Analysis & Modeling',
8
+ 'HR Administration',
9
+ 'Management Consulting',
10
+ 'Tax Preparation',
11
+ 'Data Entry',
12
+ 'Personal/Virtual Assistance',
13
+ 'Project Management',
14
+ 'Research',
15
+ 'Customer Service',
16
+ 'Technical Support',
17
+ 'Data Analytics',
18
+ 'Data Processing',
19
+ 'Data Engineering',
20
+ 'Machine Learning',
21
+ 'AI Development',
22
+ 'Art & Illustration',
23
+ 'Audio Production',
24
+ 'Brand Design',
25
+ 'Logo Design',
26
+ 'Graphics Design',
27
+ 'Video Production',
28
+ 'Voice Acting',
29
+ 'Architecture',
30
+ 'Chemical Engineering',
31
+ 'Civil Engineering',
32
+ 'Electrical Engineering',
33
+ 'Interior Design',
34
+ 'Mechanical Engineering',
35
+ 'Database Administration',
36
+ 'Information Security',
37
+ 'Network Administration',
38
+ 'Systems Administration',
39
+ 'DevOps Engineering',
40
+ 'Business Law',
41
+ 'Immigration Law',
42
+ 'Tax Law',
43
+ 'Regulatory Law',
44
+ 'Paralegal Services',
45
+ 'Digital Marketing',
46
+ 'Lead Generation',
47
+ 'Marketing Strategy',
48
+ 'Social Media Marketing',
49
+ 'SEO',
50
+ 'Language Translation',
51
+ 'Legal Translation',
52
+ 'Technical Translation',
53
+ 'Medical Translation',
54
+ 'Desktop Development',
55
+ 'Mobile Development',
56
+ 'Web Development',
57
+ 'Game Development',
58
+ 'QA & Testing',
59
+ 'Content Writing',
60
+ 'Copywriting',
61
+ 'Technical Writing',
62
+ 'Creative Writing',
63
+ 'Editing',
64
+ ];
65
+ exports.EXPERIENCE_LEVELS = ['Entry Level', 'Mid Level', 'Senior Level'];
66
+ exports.CLIENT_HISTORY = ['No hires', '1-9 hires', '10+ hires'];
67
+ // Default knowledge object with all null values
68
+ exports.emptyKnowledgeObject = {
69
+ categories: exports.CATEGORIES.reduce((acc, category) => (Object.assign(Object.assign({}, acc), { [category]: null })), {}),
70
+ experienceLevels: exports.EXPERIENCE_LEVELS.reduce((acc, level) => (Object.assign(Object.assign({}, acc), { [level]: null })), {}),
71
+ minHourlyRate: null,
72
+ fixedPriceMin: null,
73
+ clientHistory: exports.CLIENT_HISTORY.reduce((acc, history) => (Object.assign(Object.assign({}, acc), { [history]: null })), {}),
74
+ keywords: [],
75
+ };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./schemas";
2
- export * from "./constants";
3
- export * from "./utils";
1
+ export * from './constants';
2
+ export * from './schemas';
3
+ export * from './utils';
@@ -1,3 +1,3 @@
1
- import { z } from "zod";
2
- export declare const accountStatusSchema: z.ZodEnum<["verification_required", "shadow_banned", "healthy", "banned", "suspended"]>;
1
+ import { z } from 'zod';
2
+ export declare const accountStatusSchema: z.ZodEnum<["pending_credentials_verification", "valid_credentials", "invalid_credentials"]>;
3
3
  export type AccountStatus = z.infer<typeof accountStatusSchema>;