lancer-shared 1.2.111 → 1.2.113

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.
@@ -11361,110 +11361,6 @@ const externalProxySchema = proxySchema.omit({
11361
11361
 
11362
11362
  const proxyAvailableReplacementsSchema = z.record(proxyProviderSchema, z.number());
11363
11363
 
11364
- const bidderAccountProvider = z.enum([
11365
- "user-provided",
11366
- "lancer-provided",
11367
- ]);
11368
- const bidderAccountAgencySchema = z.object({
11369
- name: z.string(),
11370
- logoUrl: z.string().nullable(),
11371
- contractors: z.array(z.string()),
11372
- organizationId: z.string(),
11373
- });
11374
- const bidderAccountSchema = z.object({
11375
- id: z.string(),
11376
- provider: bidderAccountProvider,
11377
- email: z.string().email(),
11378
- password: z.string(),
11379
- securityQuestionAnswer: z.string().nullable(),
11380
- assignedOrganizations: z.array(z.string()),
11381
- googleOauthTokens: z.any().nullable(),
11382
- lastUsed: z.number().nullable(),
11383
- multiLoginProfileId: z.string().nullable(),
11384
- proxyId: z.string().nullable(),
11385
- profilePhotoUrl: z.string().nullable(),
11386
- name: z.string().nullable(),
11387
- agencies: z.array(bidderAccountAgencySchema).nullable(),
11388
- instanceId: stringType().nullable(),
11389
- createdAt: z.number(),
11390
- updatedAt: z.number(),
11391
- });
11392
- const createBidderAccountSchema = bidderAccountSchema
11393
- .pick({
11394
- email: true,
11395
- password: true,
11396
- provider: true,
11397
- securityQuestionAnswer: true,
11398
- profilePhotoUrl: true,
11399
- name: true,
11400
- agencies: true,
11401
- assignedOrganizations: true,
11402
- })
11403
- .extend({
11404
- proxyCountry: proxyCountryEnum.nullable(),
11405
- });
11406
- const updateBidderAccountSchema = bidderAccountSchema
11407
- .omit({
11408
- id: true,
11409
- })
11410
- .partial();
11411
- const verifyBidderAccountCredentialsSchema = z.object({
11412
- email: z.string().email(),
11413
- password: z.string(),
11414
- securityQuestionAnswer: z.string(),
11415
- multiloginProfileId: z.string(),
11416
- proxy: proxySchema,
11417
- });
11418
- const verifyBidderAccountCredentialsResponseSchema = z.object({
11419
- accountName: z.string().nullable(),
11420
- accountPhotoUrl: z.string().nullable(),
11421
- agencies: z.array(bidderAccountAgencySchema).nullable(),
11422
- });
11423
- const acceptUpworkInvitationSchema = z.object({
11424
- code: z.string(),
11425
- });
11426
- const acceptUpworkInvitationResponseSchema = z.object({
11427
- agencyName: z.string(),
11428
- photoUrl: z.string(),
11429
- contractors: z.array(z.string()),
11430
- });
11431
-
11432
- class BidderAccountAlreadyConnectedException extends Error {
11433
- code = 'BIDDER_ACCOUNT_ALREADY_CONNECTED';
11434
- email;
11435
- constructor(email) {
11436
- super(`Bidder account ${email} is already connected to a scraper account`);
11437
- this.email = email;
11438
- }
11439
- }
11440
- const bidderAccountAlreadyConnectedException = (email) => new BidderAccountAlreadyConnectedException(email);
11441
-
11442
- class InvalidGoogleOAuthTokenException extends Error {
11443
- code = 'INVALID_GOOGLE_OAUTH_TOKEN';
11444
- constructor(message) {
11445
- super(message);
11446
- }
11447
- }
11448
- const invalidGoogleOAuthTokenSchema = (message) => new InvalidGoogleOAuthTokenException(message);
11449
-
11450
- class NoBidderAccountsAvailableException extends Error {
11451
- code = 'NO_BIDDER_ACCOUNTS_AVAILABLE';
11452
- constructor(message) {
11453
- super(message);
11454
- }
11455
- }
11456
- const noBidderAccountsAvailableException = (message) => {
11457
- return new NoBidderAccountsAvailableException(message);
11458
- };
11459
-
11460
- class NoGoogleOAuthTokensFoundException extends Error {
11461
- code = 'NO_GOOGLE_OAUTH_TOKENS_FOUND';
11462
- constructor(message) {
11463
- super(message);
11464
- }
11465
- }
11466
- const noGoogleOAuthTokensFoundException = (message) => new NoGoogleOAuthTokensFoundException(message);
11467
-
11468
11364
  const booleanSchema = z
11469
11365
  .union([z.boolean(), z.literal("true"), z.literal("false")])
11470
11366
  .transform((value) => value === true || value === "true");
@@ -12007,6 +11903,112 @@ const jobListingSchema = objectType({
12007
11903
  region: regionSchema.nullable(),
12008
11904
  });
12009
11905
 
11906
+ const bidderAccountProvider = z.enum([
11907
+ "user-provided",
11908
+ "lancer-provided",
11909
+ ]);
11910
+ const bidderAccountAgencySchema = z.object({
11911
+ name: z.string(),
11912
+ logoUrl: z.string().nullable(),
11913
+ contractors: z.array(z.string()),
11914
+ organizationId: z.string(),
11915
+ });
11916
+ const bidderAccountSchema = z.object({
11917
+ id: z.string(),
11918
+ provider: bidderAccountProvider,
11919
+ email: z.string().email(),
11920
+ password: z.string(),
11921
+ securityQuestionAnswer: z.string().nullable(),
11922
+ assignedOrganizations: z.array(z.string()),
11923
+ googleOauthTokens: z.any().nullable(),
11924
+ lastUsed: z.number().nullable(),
11925
+ multiLoginProfileId: z.string().nullable(),
11926
+ proxyId: z.string().nullable(),
11927
+ profilePhotoUrl: z.string().nullable(),
11928
+ name: z.string().nullable(),
11929
+ agencies: z.array(bidderAccountAgencySchema).nullable(),
11930
+ instanceId: stringType().nullable(),
11931
+ createdAt: z.number(),
11932
+ updatedAt: z.number(),
11933
+ region: regionEnum,
11934
+ });
11935
+ const createBidderAccountSchema = bidderAccountSchema
11936
+ .pick({
11937
+ email: true,
11938
+ password: true,
11939
+ provider: true,
11940
+ securityQuestionAnswer: true,
11941
+ profilePhotoUrl: true,
11942
+ name: true,
11943
+ agencies: true,
11944
+ assignedOrganizations: true,
11945
+ region: true,
11946
+ })
11947
+ .extend({
11948
+ proxyCountry: proxyCountryEnum.nullable(),
11949
+ });
11950
+ const updateBidderAccountSchema = bidderAccountSchema
11951
+ .omit({
11952
+ id: true,
11953
+ })
11954
+ .partial();
11955
+ const verifyBidderAccountCredentialsSchema = z.object({
11956
+ email: z.string().email(),
11957
+ password: z.string(),
11958
+ securityQuestionAnswer: z.string(),
11959
+ multiloginProfileId: z.string(),
11960
+ proxy: proxySchema,
11961
+ });
11962
+ const verifyBidderAccountCredentialsResponseSchema = z.object({
11963
+ accountName: z.string().nullable(),
11964
+ accountPhotoUrl: z.string().nullable(),
11965
+ agencies: z.array(bidderAccountAgencySchema).nullable(),
11966
+ });
11967
+ const acceptUpworkInvitationSchema = z.object({
11968
+ code: z.string(),
11969
+ });
11970
+ const acceptUpworkInvitationResponseSchema = z.object({
11971
+ agencyName: z.string(),
11972
+ photoUrl: z.string(),
11973
+ contractors: z.array(z.string()),
11974
+ });
11975
+
11976
+ class BidderAccountAlreadyConnectedException extends Error {
11977
+ code = 'BIDDER_ACCOUNT_ALREADY_CONNECTED';
11978
+ email;
11979
+ constructor(email) {
11980
+ super(`Bidder account ${email} is already connected to a scraper account`);
11981
+ this.email = email;
11982
+ }
11983
+ }
11984
+ const bidderAccountAlreadyConnectedException = (email) => new BidderAccountAlreadyConnectedException(email);
11985
+
11986
+ class InvalidGoogleOAuthTokenException extends Error {
11987
+ code = 'INVALID_GOOGLE_OAUTH_TOKEN';
11988
+ constructor(message) {
11989
+ super(message);
11990
+ }
11991
+ }
11992
+ const invalidGoogleOAuthTokenSchema = (message) => new InvalidGoogleOAuthTokenException(message);
11993
+
11994
+ class NoBidderAccountsAvailableException extends Error {
11995
+ code = 'NO_BIDDER_ACCOUNTS_AVAILABLE';
11996
+ constructor(message) {
11997
+ super(message);
11998
+ }
11999
+ }
12000
+ const noBidderAccountsAvailableException = (message) => {
12001
+ return new NoBidderAccountsAvailableException(message);
12002
+ };
12003
+
12004
+ class NoGoogleOAuthTokensFoundException extends Error {
12005
+ code = 'NO_GOOGLE_OAUTH_TOKENS_FOUND';
12006
+ constructor(message) {
12007
+ super(message);
12008
+ }
12009
+ }
12010
+ const noGoogleOAuthTokensFoundException = (message) => new NoGoogleOAuthTokensFoundException(message);
12011
+
12010
12012
  const scraperAccountType = z.enum([
12011
12013
  "feed",
12012
12014
  "job",
@@ -12542,6 +12544,8 @@ const feedScrapeCompletedEventMetadata = objectType({
12542
12544
  id: stringType(),
12543
12545
  endTime: numberType(),
12544
12546
  region: regionSchema,
12547
+ durationMillis: numberType().nullish(),
12548
+ duration: stringType().nullish(),
12545
12549
  });
12546
12550
  const biddingCompletedEventMetadata = objectType({
12547
12551
  biddingAmount: numberType(),
@@ -49,6 +49,7 @@ export declare const bidderAccountSchema: z.ZodObject<{
49
49
  instanceId: z.ZodNullable<z.ZodString>;
50
50
  createdAt: z.ZodNumber;
51
51
  updatedAt: z.ZodNumber;
52
+ region: z.ZodEnum<["all", "Worldwide", "UKOnly", "USOnly"]>;
52
53
  }, "strip", z.ZodTypeAny, {
53
54
  name: string | null;
54
55
  id: string;
@@ -70,6 +71,7 @@ export declare const bidderAccountSchema: z.ZodObject<{
70
71
  instanceId: string | null;
71
72
  createdAt: number;
72
73
  updatedAt: number;
74
+ region: "all" | "Worldwide" | "UKOnly" | "USOnly";
73
75
  googleOauthTokens?: any;
74
76
  }, {
75
77
  name: string | null;
@@ -92,6 +94,7 @@ export declare const bidderAccountSchema: z.ZodObject<{
92
94
  instanceId: string | null;
93
95
  createdAt: number;
94
96
  updatedAt: number;
97
+ region: "all" | "Worldwide" | "UKOnly" | "USOnly";
95
98
  googleOauthTokens?: any;
96
99
  }>;
97
100
  export declare const createBidderAccountSchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
@@ -126,7 +129,8 @@ export declare const createBidderAccountSchema: z.ZodObject<z.objectUtil.extendS
126
129
  instanceId: z.ZodNullable<z.ZodString>;
127
130
  createdAt: z.ZodNumber;
128
131
  updatedAt: z.ZodNumber;
129
- }, "name" | "provider" | "email" | "password" | "securityQuestionAnswer" | "assignedOrganizations" | "profilePhotoUrl" | "agencies">, {
132
+ region: z.ZodEnum<["all", "Worldwide", "UKOnly", "USOnly"]>;
133
+ }, "name" | "provider" | "email" | "password" | "securityQuestionAnswer" | "assignedOrganizations" | "profilePhotoUrl" | "agencies" | "region">, {
130
134
  proxyCountry: z.ZodNullable<z.ZodEnum<["US", "CA", "GB", "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SK", "SI", "SB", "SO", "ZA", "GS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]>>;
131
135
  }>, "strip", z.ZodTypeAny, {
132
136
  name: string | null;
@@ -142,6 +146,7 @@ export declare const createBidderAccountSchema: z.ZodObject<z.objectUtil.extendS
142
146
  contractors: string[];
143
147
  organizationId: string;
144
148
  }[] | null;
149
+ region: "all" | "Worldwide" | "UKOnly" | "USOnly";
145
150
  proxyCountry: "US" | "CA" | "GB" | "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "UM" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW" | null;
146
151
  }, {
147
152
  name: string | null;
@@ -157,6 +162,7 @@ export declare const createBidderAccountSchema: z.ZodObject<z.objectUtil.extendS
157
162
  contractors: string[];
158
163
  organizationId: string;
159
164
  }[] | null;
165
+ region: "all" | "Worldwide" | "UKOnly" | "USOnly";
160
166
  proxyCountry: "US" | "CA" | "GB" | "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "UM" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW" | null;
161
167
  }>;
162
168
  export declare const updateBidderAccountSchema: z.ZodObject<{
@@ -190,6 +196,7 @@ export declare const updateBidderAccountSchema: z.ZodObject<{
190
196
  instanceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
191
197
  createdAt: z.ZodOptional<z.ZodNumber>;
192
198
  updatedAt: z.ZodOptional<z.ZodNumber>;
199
+ region: z.ZodOptional<z.ZodEnum<["all", "Worldwide", "UKOnly", "USOnly"]>>;
193
200
  }, "strip", z.ZodTypeAny, {
194
201
  name?: string | null | undefined;
195
202
  provider?: "user-provided" | "lancer-provided" | undefined;
@@ -211,6 +218,7 @@ export declare const updateBidderAccountSchema: z.ZodObject<{
211
218
  instanceId?: string | null | undefined;
212
219
  createdAt?: number | undefined;
213
220
  updatedAt?: number | undefined;
221
+ region?: "all" | "Worldwide" | "UKOnly" | "USOnly" | undefined;
214
222
  }, {
215
223
  name?: string | null | undefined;
216
224
  provider?: "user-provided" | "lancer-provided" | undefined;
@@ -232,6 +240,7 @@ export declare const updateBidderAccountSchema: z.ZodObject<{
232
240
  instanceId?: string | null | undefined;
233
241
  createdAt?: number | undefined;
234
242
  updatedAt?: number | undefined;
243
+ region?: "all" | "Worldwide" | "UKOnly" | "USOnly" | undefined;
235
244
  }>;
236
245
  export declare const verifyBidderAccountCredentialsSchema: z.ZodObject<{
237
246
  email: z.ZodString;
@@ -229,14 +229,20 @@ export declare const feedScrapeCompletedEventMetadata: z.ZodObject<{
229
229
  id: z.ZodString;
230
230
  endTime: z.ZodNumber;
231
231
  region: z.ZodUnion<[z.ZodLiteral<"USOnly">, z.ZodLiteral<"UKOnly">, z.ZodLiteral<"Worldwide">]>;
232
+ durationMillis: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
233
+ duration: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
234
  }, "strip", z.ZodTypeAny, {
233
235
  region: "USOnly" | "UKOnly" | "Worldwide";
234
236
  id: string;
235
237
  endTime: number;
238
+ durationMillis?: number | null | undefined;
239
+ duration?: string | null | undefined;
236
240
  }, {
237
241
  region: "USOnly" | "UKOnly" | "Worldwide";
238
242
  id: string;
239
243
  endTime: number;
244
+ durationMillis?: number | null | undefined;
245
+ duration?: string | null | undefined;
240
246
  }>;
241
247
  export declare const biddingCompletedEventMetadata: z.ZodObject<{
242
248
  biddingAmount: z.ZodNumber;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lancer-shared",
3
- "version": "1.2.111",
3
+ "version": "1.2.113",
4
4
  "description": "This package contains shared stuff.",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "dist/bundle.cjs.js",