lancer-shared 1.2.130 → 1.2.132
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
|
@@ -6550,11 +6550,14 @@ const ROUTES = {
|
|
|
6550
6550
|
PAYMENT_METHODS: (id) => `organizations/${id}/payment-methods`,
|
|
6551
6551
|
TRACK_USAGE: (id) => `organizations/${id}/track-usage`,
|
|
6552
6552
|
SUBSCRIBE: (id) => `organizations/${id}/subscribe`,
|
|
6553
|
+
BUY_US_BIDDER_ACCOUNT: (id) => `organizations/${id}/buy-us-bidder-account`,
|
|
6553
6554
|
BIDDER_ACCOUNTS: {
|
|
6554
6555
|
BASE: (id) => `organizations/${id}/bidder-accounts`,
|
|
6555
6556
|
BY_ID: (id, bidderId) => `organizations/${id}/bidder-accounts/${bidderId}`,
|
|
6556
|
-
|
|
6557
|
+
AVAILABLE_BIDDER_ACCOUNT: (id, region) => `organizations/${id}/bidder-accounts/available-bidder-account/${region}`,
|
|
6557
6558
|
ACCEPT_UPWORK_INVITATION: (id, bidderId) => `organizations/${id}/bidder-accounts/${bidderId}/accept-upwork-invitation`,
|
|
6559
|
+
CONNECTION: (id) => `organizations/${id}/bidder-account-connection/status`,
|
|
6560
|
+
DISMISS_CONNECTION_ERROR: (id) => `organizations/${id}/bidder-account-connection/dismiss-connection-error`,
|
|
6558
6561
|
},
|
|
6559
6562
|
LEADS_BY_JOB_ID: (organizationId, jobId) => `organizations/${organizationId}/leads/${jobId}`,
|
|
6560
6563
|
UPDATE_CAMPAIGN_PRIORITY: (organizationId) => `organizations/${organizationId}/update-campaign-priority`,
|
|
@@ -12504,6 +12507,7 @@ const bidderAccountSchema = z.object({
|
|
|
12504
12507
|
provider: bidderAccountProvider,
|
|
12505
12508
|
email: z.string().email(),
|
|
12506
12509
|
password: z.string(),
|
|
12510
|
+
isConnecting: z.boolean().nullable(),
|
|
12507
12511
|
securityQuestionAnswer: z.string().nullable(),
|
|
12508
12512
|
assignedOrganizations: z.array(z.string()),
|
|
12509
12513
|
googleOauthTokens: z.any().nullable(),
|
|
@@ -13143,6 +13147,16 @@ const limitsSchema = objectType({
|
|
|
13143
13147
|
usedCredits: numberType(),
|
|
13144
13148
|
extraCredits: numberType(),
|
|
13145
13149
|
});
|
|
13150
|
+
const oneTimePaymentSchema = z.object({
|
|
13151
|
+
paidAt: z.number(),
|
|
13152
|
+
amount: z.number(),
|
|
13153
|
+
currency: z.string(),
|
|
13154
|
+
status: z.string(),
|
|
13155
|
+
paymentIntentId: z.string(),
|
|
13156
|
+
});
|
|
13157
|
+
const oneTimePaymentsSchema = z.object({
|
|
13158
|
+
usAccountRental: oneTimePaymentSchema.optional(),
|
|
13159
|
+
});
|
|
13146
13160
|
const organizationSchema = objectType({
|
|
13147
13161
|
id: stringType(),
|
|
13148
13162
|
name: stringType(),
|
|
@@ -13158,6 +13172,7 @@ const organizationSchema = objectType({
|
|
|
13158
13172
|
updatedAt: numberType(),
|
|
13159
13173
|
openRouterApiKey: stringType().nullable(),
|
|
13160
13174
|
appTrialEndsAt: numberType().nullable(),
|
|
13175
|
+
oneTimePayments: oneTimePaymentsSchema.optional(),
|
|
13161
13176
|
});
|
|
13162
13177
|
const caseStudySchema = objectType({
|
|
13163
13178
|
id: stringType(),
|
|
@@ -13200,15 +13215,10 @@ const questionRulesSchema = objectType({
|
|
|
13200
13215
|
category: stringType(),
|
|
13201
13216
|
});
|
|
13202
13217
|
const aiConfigSchema = objectType({
|
|
13203
|
-
// suitabilityRules: string().nullable(),
|
|
13204
|
-
// coverLetterRules: string().nullable(),
|
|
13205
|
-
// coverLetterTemplate: string().nullable(),
|
|
13206
13218
|
questionHandling: z.string().nullable(),
|
|
13207
13219
|
questionRules: arrayType(questionRulesSchema).nullable(),
|
|
13208
13220
|
disqualifierRules: z.string().nullable(),
|
|
13209
13221
|
userInstructions: z.string().nullable(),
|
|
13210
|
-
// approvedSuitabilityJobs: number().nullable(),
|
|
13211
|
-
// approvedProposalJobs: number().nullable(),
|
|
13212
13222
|
});
|
|
13213
13223
|
const notificationConfigSchema = objectType({
|
|
13214
13224
|
emailEnabled: booleanType(),
|
|
@@ -13238,10 +13248,10 @@ const bidConfigSchema = z.object({
|
|
|
13238
13248
|
specialisedProfile: z.string().nullable(),
|
|
13239
13249
|
});
|
|
13240
13250
|
const campaignStatusSchema = z.union([
|
|
13241
|
-
z.literal(
|
|
13242
|
-
z.literal(
|
|
13243
|
-
z.literal(
|
|
13244
|
-
z.literal(
|
|
13251
|
+
z.literal('active'),
|
|
13252
|
+
z.literal('draft'),
|
|
13253
|
+
z.literal('paused'),
|
|
13254
|
+
z.literal('error'),
|
|
13245
13255
|
]);
|
|
13246
13256
|
const campaignSchema = z.object({
|
|
13247
13257
|
id: z.string(),
|
|
@@ -13267,13 +13277,15 @@ const campaignSchema = z.object({
|
|
|
13267
13277
|
coverLetterTemplate: coverLetterTemplateSchema.nullable(),
|
|
13268
13278
|
});
|
|
13269
13279
|
const upworkAccountConnectStatusSchema = z.union([
|
|
13270
|
-
z.literal(
|
|
13271
|
-
z.literal(
|
|
13272
|
-
z.literal(
|
|
13280
|
+
z.literal('processing'),
|
|
13281
|
+
z.literal('connected'),
|
|
13282
|
+
z.literal('failed'),
|
|
13273
13283
|
]);
|
|
13274
13284
|
const upworkAccountConnectSchema = z.object({
|
|
13275
13285
|
status: upworkAccountConnectStatusSchema.nullable(),
|
|
13276
13286
|
error: z.string().nullable(),
|
|
13287
|
+
email: z.string().email().optional(),
|
|
13288
|
+
profilePhotoUrl: z.string().optional(),
|
|
13277
13289
|
});
|
|
13278
13290
|
const createCampaignSchema = campaignSchema.omit({
|
|
13279
13291
|
id: true,
|
|
@@ -131,11 +131,14 @@ export declare const ROUTES: {
|
|
|
131
131
|
readonly PAYMENT_METHODS: (id: string) => string;
|
|
132
132
|
readonly TRACK_USAGE: (id: string) => string;
|
|
133
133
|
readonly SUBSCRIBE: (id: string) => string;
|
|
134
|
+
readonly BUY_US_BIDDER_ACCOUNT: (id: string) => string;
|
|
134
135
|
readonly BIDDER_ACCOUNTS: {
|
|
135
136
|
readonly BASE: (id: string) => string;
|
|
136
137
|
readonly BY_ID: (id: string, bidderId: string) => string;
|
|
137
|
-
readonly
|
|
138
|
+
readonly AVAILABLE_BIDDER_ACCOUNT: (id: string, region: string) => string;
|
|
138
139
|
readonly ACCEPT_UPWORK_INVITATION: (id: string, bidderId: string) => string;
|
|
140
|
+
readonly CONNECTION: (id: string) => string;
|
|
141
|
+
readonly DISMISS_CONNECTION_ERROR: (id: string) => string;
|
|
139
142
|
};
|
|
140
143
|
readonly LEADS_BY_JOB_ID: (organizationId: string, jobId: string) => string;
|
|
141
144
|
readonly UPDATE_CAMPAIGN_PRIORITY: (organizationId: string) => string;
|
|
@@ -22,6 +22,7 @@ export declare const bidderAccountSchema: z.ZodObject<{
|
|
|
22
22
|
provider: z.ZodEnum<["user-provided", "lancer-provided"]>;
|
|
23
23
|
email: z.ZodString;
|
|
24
24
|
password: z.ZodString;
|
|
25
|
+
isConnecting: z.ZodNullable<z.ZodBoolean>;
|
|
25
26
|
securityQuestionAnswer: z.ZodNullable<z.ZodString>;
|
|
26
27
|
assignedOrganizations: z.ZodArray<z.ZodString, "many">;
|
|
27
28
|
googleOauthTokens: z.ZodNullable<z.ZodAny>;
|
|
@@ -57,6 +58,7 @@ export declare const bidderAccountSchema: z.ZodObject<{
|
|
|
57
58
|
provider: "user-provided" | "lancer-provided";
|
|
58
59
|
email: string;
|
|
59
60
|
password: string;
|
|
61
|
+
isConnecting: boolean | null;
|
|
60
62
|
securityQuestionAnswer: string | null;
|
|
61
63
|
assignedOrganizations: string[];
|
|
62
64
|
lastUsed: number | null;
|
|
@@ -81,6 +83,7 @@ export declare const bidderAccountSchema: z.ZodObject<{
|
|
|
81
83
|
provider: "user-provided" | "lancer-provided";
|
|
82
84
|
email: string;
|
|
83
85
|
password: string;
|
|
86
|
+
isConnecting: boolean | null;
|
|
84
87
|
securityQuestionAnswer: string | null;
|
|
85
88
|
assignedOrganizations: string[];
|
|
86
89
|
lastUsed: number | null;
|
|
@@ -105,6 +108,7 @@ export declare const createBidderAccountSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
105
108
|
provider: z.ZodEnum<["user-provided", "lancer-provided"]>;
|
|
106
109
|
email: z.ZodString;
|
|
107
110
|
password: z.ZodString;
|
|
111
|
+
isConnecting: z.ZodNullable<z.ZodBoolean>;
|
|
108
112
|
securityQuestionAnswer: z.ZodNullable<z.ZodString>;
|
|
109
113
|
assignedOrganizations: z.ZodArray<z.ZodString, "many">;
|
|
110
114
|
googleOauthTokens: z.ZodNullable<z.ZodAny>;
|
|
@@ -174,6 +178,7 @@ export declare const updateBidderAccountSchema: z.ZodObject<{
|
|
|
174
178
|
provider: z.ZodOptional<z.ZodEnum<["user-provided", "lancer-provided"]>>;
|
|
175
179
|
email: z.ZodOptional<z.ZodString>;
|
|
176
180
|
password: z.ZodOptional<z.ZodString>;
|
|
181
|
+
isConnecting: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
177
182
|
securityQuestionAnswer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
178
183
|
assignedOrganizations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
179
184
|
googleOauthTokens: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
@@ -207,6 +212,7 @@ export declare const updateBidderAccountSchema: z.ZodObject<{
|
|
|
207
212
|
provider?: "user-provided" | "lancer-provided" | undefined;
|
|
208
213
|
email?: string | undefined;
|
|
209
214
|
password?: string | undefined;
|
|
215
|
+
isConnecting?: boolean | null | undefined;
|
|
210
216
|
securityQuestionAnswer?: string | null | undefined;
|
|
211
217
|
assignedOrganizations?: string[] | undefined;
|
|
212
218
|
googleOauthTokens?: any;
|
|
@@ -230,6 +236,7 @@ export declare const updateBidderAccountSchema: z.ZodObject<{
|
|
|
230
236
|
provider?: "user-provided" | "lancer-provided" | undefined;
|
|
231
237
|
email?: string | undefined;
|
|
232
238
|
password?: string | undefined;
|
|
239
|
+
isConnecting?: boolean | null | undefined;
|
|
233
240
|
securityQuestionAnswer?: string | null | undefined;
|
|
234
241
|
assignedOrganizations?: string[] | undefined;
|
|
235
242
|
googleOauthTokens?: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { infer, z } from
|
|
2
|
-
import { JobFilters } from
|
|
3
|
-
import { CampaignExpenses } from
|
|
1
|
+
import { infer, z } from 'zod';
|
|
2
|
+
import { JobFilters } from '../job';
|
|
3
|
+
import { CampaignExpenses } from './campaign-expenses';
|
|
4
4
|
export declare const bidConfigSchema: z.ZodObject<{
|
|
5
5
|
agencyName: z.ZodNullable<z.ZodString>;
|
|
6
6
|
bidderId: z.ZodNullable<z.ZodString>;
|
|
@@ -481,12 +481,18 @@ export declare const upworkAccountConnectStatusSchema: z.ZodUnion<[z.ZodLiteral<
|
|
|
481
481
|
export declare const upworkAccountConnectSchema: z.ZodObject<{
|
|
482
482
|
status: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"processing">, z.ZodLiteral<"connected">, z.ZodLiteral<"failed">]>>;
|
|
483
483
|
error: z.ZodNullable<z.ZodString>;
|
|
484
|
+
email: z.ZodOptional<z.ZodString>;
|
|
485
|
+
profilePhotoUrl: z.ZodOptional<z.ZodString>;
|
|
484
486
|
}, "strip", z.ZodTypeAny, {
|
|
485
487
|
status: "processing" | "connected" | "failed" | null;
|
|
486
488
|
error: string | null;
|
|
489
|
+
email?: string | undefined;
|
|
490
|
+
profilePhotoUrl?: string | undefined;
|
|
487
491
|
}, {
|
|
488
492
|
status: "processing" | "connected" | "failed" | null;
|
|
489
493
|
error: string | null;
|
|
494
|
+
email?: string | undefined;
|
|
495
|
+
profilePhotoUrl?: string | undefined;
|
|
490
496
|
}>;
|
|
491
497
|
export type UpworkAccountConnectStatus = z.infer<typeof upworkAccountConnectStatusSchema>;
|
|
492
498
|
export type UpworkAccountConnect = z.infer<typeof upworkAccountConnectSchema>;
|
|
@@ -183,6 +183,43 @@ export declare const organizationSchema: z.ZodObject<{
|
|
|
183
183
|
updatedAt: z.ZodNumber;
|
|
184
184
|
openRouterApiKey: z.ZodNullable<z.ZodString>;
|
|
185
185
|
appTrialEndsAt: z.ZodNullable<z.ZodNumber>;
|
|
186
|
+
oneTimePayments: z.ZodOptional<z.ZodObject<{
|
|
187
|
+
usAccountRental: z.ZodOptional<z.ZodObject<{
|
|
188
|
+
paidAt: z.ZodNumber;
|
|
189
|
+
amount: z.ZodNumber;
|
|
190
|
+
currency: z.ZodString;
|
|
191
|
+
status: z.ZodString;
|
|
192
|
+
paymentIntentId: z.ZodString;
|
|
193
|
+
}, "strip", z.ZodTypeAny, {
|
|
194
|
+
status: string;
|
|
195
|
+
paidAt: number;
|
|
196
|
+
amount: number;
|
|
197
|
+
currency: string;
|
|
198
|
+
paymentIntentId: string;
|
|
199
|
+
}, {
|
|
200
|
+
status: string;
|
|
201
|
+
paidAt: number;
|
|
202
|
+
amount: number;
|
|
203
|
+
currency: string;
|
|
204
|
+
paymentIntentId: string;
|
|
205
|
+
}>>;
|
|
206
|
+
}, "strip", z.ZodTypeAny, {
|
|
207
|
+
usAccountRental?: {
|
|
208
|
+
status: string;
|
|
209
|
+
paidAt: number;
|
|
210
|
+
amount: number;
|
|
211
|
+
currency: string;
|
|
212
|
+
paymentIntentId: string;
|
|
213
|
+
} | undefined;
|
|
214
|
+
}, {
|
|
215
|
+
usAccountRental?: {
|
|
216
|
+
status: string;
|
|
217
|
+
paidAt: number;
|
|
218
|
+
amount: number;
|
|
219
|
+
currency: string;
|
|
220
|
+
paymentIntentId: string;
|
|
221
|
+
} | undefined;
|
|
222
|
+
}>>;
|
|
186
223
|
}, "strip", z.ZodTypeAny, {
|
|
187
224
|
type: "agency" | "freelancer";
|
|
188
225
|
id: string;
|
|
@@ -230,6 +267,15 @@ export declare const organizationSchema: z.ZodObject<{
|
|
|
230
267
|
updatedAt: number;
|
|
231
268
|
openRouterApiKey: string | null;
|
|
232
269
|
appTrialEndsAt: number | null;
|
|
270
|
+
oneTimePayments?: {
|
|
271
|
+
usAccountRental?: {
|
|
272
|
+
status: string;
|
|
273
|
+
paidAt: number;
|
|
274
|
+
amount: number;
|
|
275
|
+
currency: string;
|
|
276
|
+
paymentIntentId: string;
|
|
277
|
+
} | undefined;
|
|
278
|
+
} | undefined;
|
|
233
279
|
}, {
|
|
234
280
|
type: "agency" | "freelancer";
|
|
235
281
|
id: string;
|
|
@@ -277,6 +323,15 @@ export declare const organizationSchema: z.ZodObject<{
|
|
|
277
323
|
updatedAt: number;
|
|
278
324
|
openRouterApiKey: string | null;
|
|
279
325
|
appTrialEndsAt: number | null;
|
|
326
|
+
oneTimePayments?: {
|
|
327
|
+
usAccountRental?: {
|
|
328
|
+
status: string;
|
|
329
|
+
paidAt: number;
|
|
330
|
+
amount: number;
|
|
331
|
+
currency: string;
|
|
332
|
+
paymentIntentId: string;
|
|
333
|
+
} | undefined;
|
|
334
|
+
} | undefined;
|
|
280
335
|
}>;
|
|
281
336
|
export declare const caseStudySchema: z.ZodObject<{
|
|
282
337
|
id: z.ZodString;
|
|
@@ -537,6 +592,43 @@ export declare const createOrganizationSchema: z.ZodObject<Pick<{
|
|
|
537
592
|
updatedAt: z.ZodNumber;
|
|
538
593
|
openRouterApiKey: z.ZodNullable<z.ZodString>;
|
|
539
594
|
appTrialEndsAt: z.ZodNullable<z.ZodNumber>;
|
|
595
|
+
oneTimePayments: z.ZodOptional<z.ZodObject<{
|
|
596
|
+
usAccountRental: z.ZodOptional<z.ZodObject<{
|
|
597
|
+
paidAt: z.ZodNumber;
|
|
598
|
+
amount: z.ZodNumber;
|
|
599
|
+
currency: z.ZodString;
|
|
600
|
+
status: z.ZodString;
|
|
601
|
+
paymentIntentId: z.ZodString;
|
|
602
|
+
}, "strip", z.ZodTypeAny, {
|
|
603
|
+
status: string;
|
|
604
|
+
paidAt: number;
|
|
605
|
+
amount: number;
|
|
606
|
+
currency: string;
|
|
607
|
+
paymentIntentId: string;
|
|
608
|
+
}, {
|
|
609
|
+
status: string;
|
|
610
|
+
paidAt: number;
|
|
611
|
+
amount: number;
|
|
612
|
+
currency: string;
|
|
613
|
+
paymentIntentId: string;
|
|
614
|
+
}>>;
|
|
615
|
+
}, "strip", z.ZodTypeAny, {
|
|
616
|
+
usAccountRental?: {
|
|
617
|
+
status: string;
|
|
618
|
+
paidAt: number;
|
|
619
|
+
amount: number;
|
|
620
|
+
currency: string;
|
|
621
|
+
paymentIntentId: string;
|
|
622
|
+
} | undefined;
|
|
623
|
+
}, {
|
|
624
|
+
usAccountRental?: {
|
|
625
|
+
status: string;
|
|
626
|
+
paidAt: number;
|
|
627
|
+
amount: number;
|
|
628
|
+
currency: string;
|
|
629
|
+
paymentIntentId: string;
|
|
630
|
+
} | undefined;
|
|
631
|
+
}>>;
|
|
540
632
|
}, "type" | "name">, "strip", z.ZodTypeAny, {
|
|
541
633
|
type: "agency" | "freelancer";
|
|
542
634
|
name: string;
|