lancer-shared 1.2.342 → 1.2.344

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.
@@ -6660,6 +6660,7 @@ const largeCountries = [
6660
6660
  'IT',
6661
6661
  'ES',
6662
6662
  'UA',
6663
+ 'TH',
6663
6664
  ];
6664
6665
 
6665
6666
  const proxyStatusSchema = z.enum([
@@ -6939,6 +6940,11 @@ const updateScraperAccountSchema = scraperAccountSchema
6939
6940
  })
6940
6941
  .partial();
6941
6942
 
6943
+ const billingConfigSchema = objectType({
6944
+ overageBillingThreshold: numberType().int().positive(),
6945
+ updatedAt: numberType(),
6946
+ });
6947
+
6942
6948
  const agentStatusSchema = z.enum([
6943
6949
  'suitabilityPending',
6944
6950
  'suitabilityProcessing',
@@ -9123,6 +9129,7 @@ const bidderMonitoringRowSchema = z.object({
9123
9129
  'syncProposalsStatusFailed',
9124
9130
  'refreshRoomsFailed',
9125
9131
  'unauthenticatedSessionDetected',
9132
+ 'verifyCredentialsFailed',
9126
9133
  ]),
9127
9134
  eventId: z.string(),
9128
9135
  bidderAccountId: z.string().nullable(),
@@ -9147,6 +9154,16 @@ const bidderFailureDashboardResponseSchema = z.object({
9147
9154
  unviewedCount: z.number(),
9148
9155
  });
9149
9156
 
9157
+ const featureSchema = objectType({
9158
+ id: stringType(),
9159
+ slug: stringType().regex(/^[a-z0-9-]+$/),
9160
+ name: stringType(),
9161
+ description: stringType(),
9162
+ hasLimit: booleanType(),
9163
+ createdAt: numberType(),
9164
+ isActive: booleanType(),
9165
+ });
9166
+
9150
9167
  const labelEnum = z.enum(['suitable', 'unsuitable']);
9151
9168
  const sampleSchema = z.object({
9152
9169
  id: z.string(),
@@ -9192,15 +9209,22 @@ const hetznerMetadataSchema = objectType({
9192
9209
  const bidderInstanceStatusEnum = z.enum(["available", "unavailable"]);
9193
9210
  const bidderInstanceSchema = objectType({
9194
9211
  id: stringType(),
9212
+ name: stringType(),
9195
9213
  ipAddress: stringType(),
9196
9214
  domain: stringType().nullable(),
9197
9215
  bidderAccounts: arrayType(stringType()),
9198
- gcp: gcpMetadataSchema,
9199
- hetzner: hetznerMetadataSchema,
9216
+ gcp: gcpMetadataSchema.optional(),
9217
+ hetzner: hetznerMetadataSchema.optional(),
9218
+ isDefault: z.boolean().default(false),
9200
9219
  status: bidderInstanceStatusEnum,
9201
9220
  createdAt: numberType(),
9202
9221
  updatedAt: numberType(),
9203
9222
  });
9223
+ const createBidderInstanceSchema = bidderInstanceSchema.pick({
9224
+ name: true,
9225
+ ipAddress: true,
9226
+ isDefault: true,
9227
+ });
9204
9228
 
9205
9229
  const invoiceStripeMetadataLineSchema = objectType({
9206
9230
  description: stringType(),
@@ -9511,6 +9535,7 @@ const verifyCredentialsFailedEventMetadataSchema = objectType({
9511
9535
  bidderAccountId: z.string(),
9512
9536
  errorMessage: z.string(),
9513
9537
  errorCode: z.string().optional(),
9538
+ screenshotUrl: z.string().optional(),
9514
9539
  });
9515
9540
  const refreshRoomsFailedEventMetadataSchema = objectType({
9516
9541
  bidderAccountId: z.string().optional(),
@@ -9670,7 +9695,7 @@ const planPricingSchema = objectType({
9670
9695
  yearly: arrayType(planPricingIntervalSchema).optional(),
9671
9696
  });
9672
9697
  const planSchema = objectType({
9673
- id: stringType().regex(/^prod_[a-zA-Z0-9]+$/),
9698
+ id: stringType(),
9674
9699
  name: stringType(),
9675
9700
  slug: stringType().regex(/^[a-z0-9-]+$/),
9676
9701
  description: stringType(),
@@ -9684,6 +9709,10 @@ const planSchema = objectType({
9684
9709
  hasFreeTrial: booleanType(),
9685
9710
  pricing: planPricingSchema,
9686
9711
  icon: stringType().nullable(),
9712
+ includedProposals: numberType().nullable().optional(),
9713
+ overagePrice: numberType().nullable().optional(),
9714
+ supportsCoupon: booleanType().optional(),
9715
+ featureConfig: z.record(stringType(), numberType().nullable()).optional(),
9687
9716
  });
9688
9717
  const planSlugEnum = z.enum(['lancer-unlimited-launch-offer']);
9689
9718
 
@@ -15861,6 +15890,8 @@ const ROUTES = {
15861
15890
  AGENCIES: 'admin/bidder-accounts/agencies',
15862
15891
  ASSIGN_IPROYAL_PROXY: (bidderId) => `admin/bidder-accounts/${bidderId}/assign-iproyal-proxy`,
15863
15892
  ASSIGN_DECODO_PROXY: (bidderId) => `admin/bidder-accounts/${bidderId}/assign-decodo-proxy`,
15893
+ RETRY_CONNECT: (bidderId) => `admin/bidder-accounts/${bidderId}/retry-connect`,
15894
+ SYNC_PROPOSALS_STATUS: (bidderId) => `admin/bidder-accounts/${bidderId}/sync-proposals-status`,
15864
15895
  },
15865
15896
  SCRAPER_ACCOUNTS: {
15866
15897
  BASE: 'admin/scraper-accounts',
@@ -15901,9 +15932,30 @@ const ROUTES = {
15901
15932
  TEST_SUITABILITY: 'admin/agent/test-suitability',
15902
15933
  TEST_PROPOSAL: 'admin/agent/test-proposal',
15903
15934
  },
15935
+ BILLING: {
15936
+ PLANS: {
15937
+ BASE: 'admin/billing/plans',
15938
+ BY_ID: (id) => `admin/billing/plans/${id}`,
15939
+ SYNC_TO_STRIPE: (id) => `admin/billing/plans/${id}/sync-to-stripe`,
15940
+ },
15941
+ CONFIG: {
15942
+ BASE: 'admin/billing/config',
15943
+ },
15944
+ FEATURES: {
15945
+ BASE: 'admin/billing/features',
15946
+ BY_ID: (id) => `admin/billing/features/${id}`,
15947
+ },
15948
+ },
15904
15949
  UPWORK_INVITATIONS_CONFIG: {
15905
15950
  BASE: 'admin/upwork-invitation-bucket-account',
15906
15951
  },
15952
+ BIDDER_INSTANCES: {
15953
+ BASE: 'admin/bidder-instances',
15954
+ BY_ID: (id) => `admin/bidder-instances/${id}`,
15955
+ ASSIGN_ACCOUNTS: (id) => `admin/bidder-instances/${id}/assign-accounts`,
15956
+ UNASSIGN_ACCOUNTS: (id) => `admin/bidder-instances/${id}/unassign-accounts`,
15957
+ SET_DEFAULT: (id) => `admin/bidder-instances/${id}/set-default`,
15958
+ },
15907
15959
  },
15908
15960
  BID: {
15909
15961
  BASE: 'bid',
@@ -15962,6 +16014,7 @@ const ROUTES = {
15962
16014
  RETRY_CONNECT_UPWORK_ACCOUNT: (id, bidderId) => `organizations/${id}/bidder-accounts/${bidderId}/retry-connect-upwork-account`,
15963
16015
  AVAILABLE_REGIONS: (id) => `organizations/${id}/bidder-accounts/available-regions`,
15964
16016
  CHAT: {
16017
+ CHAT_HEARTBEAT: (organizationId) => `organizations/${organizationId}/chat/heartbeat`,
15965
16018
  ROOMS_TAGS: (organizationId) => `organizations/${organizationId}/chat/tags`,
15966
16019
  ROOM_TAG: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/tags`,
15967
16020
  ROOM_NOTES: (organizationId, bidderAccountId, roomId) => `organizations/${organizationId}/bidder-accounts/${bidderAccountId}/rooms/${roomId}/notes`,
@@ -16099,6 +16152,10 @@ const ROUTES = {
16099
16152
  BASE: 'plans',
16100
16153
  BY_ID: (id) => `plans/${id}`,
16101
16154
  },
16155
+ FEATURES: {
16156
+ BASE: 'features',
16157
+ BY_ID: (id) => `features/${id}`,
16158
+ },
16102
16159
  NOTIFICATIONS: {
16103
16160
  BASE: 'notifications',
16104
16161
  SEND_NOTIFICATION: 'notifications/send',
@@ -24880,6 +24937,7 @@ exports.biddingFailedEventMetadata = biddingFailedEventMetadata;
24880
24937
  exports.biddingHourlyRateStrategyEnum = biddingHourlyRateStrategyEnum;
24881
24938
  exports.biddingProcessingEventMetadata = biddingProcessingEventMetadata;
24882
24939
  exports.biddingRejectedWithFeedbackEventMetadata = biddingRejectedWithFeedbackEventMetadata;
24940
+ exports.billingConfigSchema = billingConfigSchema;
24883
24941
  exports.billingIntervalEnum = billingIntervalEnum;
24884
24942
  exports.bookSlotRequestBodySchema = bookSlotRequestBodySchema;
24885
24943
  exports.booleanSchema = booleanSchema;
@@ -24917,6 +24975,7 @@ exports.convertToUtc = convertToUtc;
24917
24975
  exports.countryMapping = countryMapping;
24918
24976
  exports.coverLetterTemplateSchema = coverLetterTemplateSchema;
24919
24977
  exports.createBidderAccountSchema = createBidderAccountSchema;
24978
+ exports.createBidderInstanceSchema = createBidderInstanceSchema;
24920
24979
  exports.createCampaignSchema = createCampaignSchema;
24921
24980
  exports.createChatbotSchema = createChatbotSchema;
24922
24981
  exports.createClientHireRateFormSchema = createClientHireRateFormSchema;
@@ -24946,6 +25005,7 @@ exports.eventLoggerPayloadSchema = eventLoggerPayloadSchema;
24946
25005
  exports.experienceLevelEnum = experienceLevelEnum;
24947
25006
  exports.externalProxySchema = externalProxySchema;
24948
25007
  exports.failedToParseNuxtJobException = failedToParseNuxtJobException;
25008
+ exports.featureSchema = featureSchema;
24949
25009
  exports.feedChunkEnrichCompletedEventMetadata = feedChunkEnrichCompletedEventMetadata;
24950
25010
  exports.feedChunkEnrichFailedEventMetadata = feedChunkEnrichFailedEventMetadata;
24951
25011
  exports.feedChunkEnrichStartedEventMetadata = feedChunkEnrichStartedEventMetadata;