/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest = { leadId: string; organizationId?: string | undefined; workspaceId?: string | undefined; tenantId?: string | undefined; accountId?: string | undefined; }; export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay = { DayOfWeekUnspecified: "DAY_OF_WEEK_UNSPECIFIED", DayOfWeekMonday: "DAY_OF_WEEK_MONDAY", DayOfWeekTuesday: "DAY_OF_WEEK_TUESDAY", DayOfWeekWednesday: "DAY_OF_WEEK_WEDNESDAY", DayOfWeekThursday: "DAY_OF_WEEK_THURSDAY", DayOfWeekFriday: "DAY_OF_WEEK_FRIDAY", DayOfWeekSaturday: "DAY_OF_WEEK_SATURDAY", DayOfWeekSunday: "DAY_OF_WEEK_SUNDAY", } as const; export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay = ClosedEnum< typeof GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay >; export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours = { id?: string | undefined; day?: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay | undefined; openTime?: string | undefined; closeTime?: string | undefined; closed?: boolean | undefined; createdAt?: Date | undefined; updatedAt?: Date | undefined; deletedAt?: Date | undefined; }; export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay = { DayOfWeekUnspecified: "DAY_OF_WEEK_UNSPECIFIED", DayOfWeekMonday: "DAY_OF_WEEK_MONDAY", DayOfWeekTuesday: "DAY_OF_WEEK_TUESDAY", DayOfWeekWednesday: "DAY_OF_WEEK_WEDNESDAY", DayOfWeekThursday: "DAY_OF_WEEK_THURSDAY", DayOfWeekFriday: "DAY_OF_WEEK_FRIDAY", DayOfWeekSaturday: "DAY_OF_WEEK_SATURDAY", DayOfWeekSunday: "DAY_OF_WEEK_SUNDAY", } as const; export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay = ClosedEnum< typeof GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay >; export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours = { id?: string | undefined; day?: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay | undefined; openTime?: string | undefined; closeTime?: string | undefined; closed?: boolean | undefined; createdAt?: Date | undefined; updatedAt?: Date | undefined; deletedAt?: Date | undefined; }; export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews = { id?: string | undefined; author?: string | undefined; rating?: number | undefined; text?: string | undefined; time?: Date | undefined; language?: string | undefined; profilePhotoUrl?: string | undefined; reviewCount?: number | undefined; createdAt?: Date | undefined; updatedAt?: Date | undefined; deletedAt?: Date | undefined; }; export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange = { RevenueRangeUnspecified: "REVENUE_RANGE_UNSPECIFIED", RevenueRangeUnder100K: "REVENUE_RANGE_UNDER_100K", RevenueRange100KTo1M: "REVENUE_RANGE_100K_TO_1M", RevenueRange1MTo10M: "REVENUE_RANGE_1M_TO_10M", RevenueRange10MTo50M: "REVENUE_RANGE_10M_TO_50M", RevenueRangeOver50M: "REVENUE_RANGE_OVER_50M", } as const; export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange = ClosedEnum; export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits = { EmployeeBenefitUnspecified: "EMPLOYEE_BENEFIT_UNSPECIFIED", EmployeeBenefitHealthInsurance: "EMPLOYEE_BENEFIT_HEALTH_INSURANCE", EmployeeBenefitRetirementPlan: "EMPLOYEE_BENEFIT_RETIREMENT_PLAN", EmployeeBenefitPaidTimeOff: "EMPLOYEE_BENEFIT_PAID_TIME_OFF", EmployeeBenefitRemoteWork: "EMPLOYEE_BENEFIT_REMOTE_WORK", } as const; export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits = ClosedEnum< typeof GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits >; export type Lead = { id?: string | undefined; name?: string | undefined; website?: string | undefined; phone?: string | undefined; address?: string | undefined; city?: string | undefined; state?: string | undefined; country?: string | undefined; latitude?: number | undefined; longitude?: number | undefined; googleRating?: number | undefined; reviewCount?: number | undefined; industry?: string | undefined; employeeCount?: number | undefined; estimatedRevenue?: string | undefined; createdAt?: Date | undefined; updatedAt?: Date | undefined; deletedAt?: Date | undefined; placeId?: string | undefined; googleMapsUrl?: string | undefined; businessStatus?: string | undefined; regularHours?: | Array | undefined; specialHours?: | Array | undefined; photoReferences?: Array | undefined; mainPhotoUrl?: string | undefined; reviews?: | Array | undefined; types?: Array | undefined; amenities?: Array | undefined; servesVegetarianFood?: boolean | undefined; outdoorSeating?: boolean | undefined; paymentMethods?: Array | undefined; wheelchairAccessible?: boolean | undefined; parkingAvailable?: boolean | undefined; socialMedia?: { [k: string]: string } | undefined; ratingCategory?: string | undefined; rating?: number | undefined; count?: number | undefined; lastUpdated?: Date | undefined; dataSourceVersion?: string | undefined; scrapingSessionId?: string | undefined; alternatePhones?: Array | undefined; contactPersonName?: string | undefined; contactPersonTitle?: string | undefined; contactEmail?: string | undefined; foundedYear?: number | undefined; businessType?: string | undefined; certifications?: Array | undefined; licenseNumber?: string | undefined; revenueRange?: | GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange | undefined; fundingStage?: string | undefined; isPublicCompany?: boolean | undefined; websiteLoadSpeed?: number | undefined; hasSslCertificate?: boolean | undefined; cmsUsed?: string | undefined; ecommercePlatforms?: Array | undefined; timezone?: string | undefined; neighborhood?: string | undefined; nearbyLandmarks?: Array | undefined; transportationAccess?: string | undefined; employeeBenefits?: | Array | undefined; parentCompany?: string | undefined; subsidiaries?: Array | undefined; isFranchise?: boolean | undefined; seoKeywords?: Array | undefined; usesGoogleAds?: boolean | undefined; googleMyBusinessCategory?: string | undefined; naicsCode?: string | undefined; sicCode?: string | undefined; unspscCode?: string | undefined; isGreenCertified?: boolean | undefined; energySources?: Array | undefined; sustainabilityRating?: string | undefined; recentAnnouncements?: Array | undefined; lastProductLaunch?: Date | undefined; hasLitigationHistory?: boolean | undefined; exportControlStatus?: string | undefined; }; export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData = { lead?: Lead | undefined; }; /** * Retrieves detailed information about a specific lead */ export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody = { data: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData; }; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$inboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest, z.ZodTypeDef, unknown > = z.object({ leadId: z.string(), organizationId: z.string().optional(), workspaceId: z.string().optional(), tenantId: z.string().optional(), accountId: z.string().optional(), }); /** @internal */ export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$Outbound = { leadId: string; organizationId?: string | undefined; workspaceId?: string | undefined; tenantId?: string | undefined; accountId?: string | undefined; }; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$outboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$Outbound, z.ZodTypeDef, GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest > = z.object({ leadId: z.string(), organizationId: z.string().optional(), workspaceId: z.string().optional(), tenantId: z.string().optional(), accountId: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$outboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$Outbound` instead. */ export type Outbound = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$Outbound; } export function getApiLeadScraperMicroserviceApiV1LeadsLeadIdRequestToJSON( getApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest, ): string { return JSON.stringify( GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$outboundSchema.parse( getApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest, ), ); } export function getApiLeadScraperMicroserviceApiV1LeadsLeadIdRequestFromJSON( jsonString: string, ): SafeParseResult< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest, SDKValidationError > { return safeParse( jsonString, (x) => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRequest' from JSON`, ); } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay$inboundSchema: z.ZodNativeEnum = z .nativeEnum(GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay); /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay$outboundSchema: z.ZodNativeEnum = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay$outboundSchema; } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$inboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours, z.ZodTypeDef, unknown > = z.object({ id: z.string().optional(), day: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay$inboundSchema.default( "DAY_OF_WEEK_UNSPECIFIED", ), openTime: z.string().optional(), closeTime: z.string().optional(), closed: z.boolean().optional(), createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), deletedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), }); /** @internal */ export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$Outbound = { id?: string | undefined; day: string; openTime?: string | undefined; closeTime?: string | undefined; closed?: boolean | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; deletedAt?: string | undefined; }; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$outboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$Outbound, z.ZodTypeDef, GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours > = z.object({ id: z.string().optional(), day: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdDay$outboundSchema .default("DAY_OF_WEEK_UNSPECIFIED"), openTime: z.string().optional(), closeTime: z.string().optional(), closed: z.boolean().optional(), createdAt: z.date().transform(v => v.toISOString()).optional(), updatedAt: z.date().transform(v => v.toISOString()).optional(), deletedAt: z.date().transform(v => v.toISOString()).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$outboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$Outbound` instead. */ export type Outbound = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$Outbound; } export function getApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHoursToJSON( getApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours, ): string { return JSON.stringify( GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$outboundSchema .parse(getApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours), ); } export function getApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHoursFromJSON( jsonString: string, ): SafeParseResult< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours, SDKValidationError > { return safeParse( jsonString, (x) => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours' from JSON`, ); } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay$inboundSchema: z.ZodNativeEnum< typeof GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay > = z.nativeEnum(GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay); /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay$outboundSchema: z.ZodNativeEnum< typeof GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay > = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay$outboundSchema; } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$inboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours, z.ZodTypeDef, unknown > = z.object({ id: z.string().optional(), day: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay$inboundSchema .default("DAY_OF_WEEK_UNSPECIFIED"), openTime: z.string().optional(), closeTime: z.string().optional(), closed: z.boolean().optional(), createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), deletedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), }); /** @internal */ export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$Outbound = { id?: string | undefined; day: string; openTime?: string | undefined; closeTime?: string | undefined; closed?: boolean | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; deletedAt?: string | undefined; }; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$outboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$Outbound, z.ZodTypeDef, GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours > = z.object({ id: z.string().optional(), day: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdLeadsDay$outboundSchema .default("DAY_OF_WEEK_UNSPECIFIED"), openTime: z.string().optional(), closeTime: z.string().optional(), closed: z.boolean().optional(), createdAt: z.date().transform(v => v.toISOString()).optional(), updatedAt: z.date().transform(v => v.toISOString()).optional(), deletedAt: z.date().transform(v => v.toISOString()).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$outboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$Outbound` instead. */ export type Outbound = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$Outbound; } export function getApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHoursToJSON( getApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours, ): string { return JSON.stringify( GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$outboundSchema .parse(getApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours), ); } export function getApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHoursFromJSON( jsonString: string, ): SafeParseResult< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours, SDKValidationError > { return safeParse( jsonString, (x) => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours' from JSON`, ); } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$inboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews, z.ZodTypeDef, unknown > = z.object({ id: z.string().optional(), author: z.string().optional(), rating: z.number().optional(), text: z.string().optional(), time: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), language: z.string().optional(), profilePhotoUrl: z.string().optional(), reviewCount: z.number().int().optional(), createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), deletedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), }); /** @internal */ export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$Outbound = { id?: string | undefined; author?: string | undefined; rating?: number | undefined; text?: string | undefined; time?: string | undefined; language?: string | undefined; profilePhotoUrl?: string | undefined; reviewCount?: number | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; deletedAt?: string | undefined; }; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$outboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$Outbound, z.ZodTypeDef, GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews > = z.object({ id: z.string().optional(), author: z.string().optional(), rating: z.number().optional(), text: z.string().optional(), time: z.date().transform(v => v.toISOString()).optional(), language: z.string().optional(), profilePhotoUrl: z.string().optional(), reviewCount: z.number().int().optional(), createdAt: z.date().transform(v => v.toISOString()).optional(), updatedAt: z.date().transform(v => v.toISOString()).optional(), deletedAt: z.date().transform(v => v.toISOString()).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$outboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$Outbound` instead. */ export type Outbound = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$Outbound; } export function getApiLeadScraperMicroserviceApiV1LeadsLeadIdReviewsToJSON( getApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews, ): string { return JSON.stringify( GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$outboundSchema.parse( getApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews, ), ); } export function getApiLeadScraperMicroserviceApiV1LeadsLeadIdReviewsFromJSON( jsonString: string, ): SafeParseResult< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews, SDKValidationError > { return safeParse( jsonString, (x) => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews' from JSON`, ); } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange$inboundSchema: z.ZodNativeEnum< typeof GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange > = z.nativeEnum(GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange); /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange$outboundSchema: z.ZodNativeEnum< typeof GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange > = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange$outboundSchema; } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits$inboundSchema: z.ZodNativeEnum< typeof GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits > = z.nativeEnum( GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits, ); /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits$outboundSchema: z.ZodNativeEnum< typeof GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits > = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits$outboundSchema; } /** @internal */ export const Lead$inboundSchema: z.ZodType = z .object({ id: z.string().optional(), name: z.string().optional(), website: z.string().optional(), phone: z.string().optional(), address: z.string().optional(), city: z.string().optional(), state: z.string().optional(), country: z.string().optional(), latitude: z.number().optional(), longitude: z.number().optional(), googleRating: z.number().optional(), reviewCount: z.number().int().optional(), industry: z.string().optional(), employeeCount: z.number().int().optional(), estimatedRevenue: z.string().optional(), createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), deletedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), placeId: z.string().optional(), googleMapsUrl: z.string().optional(), businessStatus: z.string().optional(), regularHours: z.array( z.lazy(() => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$inboundSchema ), ).optional(), specialHours: z.array( z.lazy(() => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$inboundSchema ), ).optional(), photoReferences: z.array(z.string()).optional(), mainPhotoUrl: z.string().optional(), reviews: z.array( z.lazy(() => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$inboundSchema ), ).optional(), types: z.array(z.string()).optional(), amenities: z.array(z.string()).optional(), servesVegetarianFood: z.boolean().optional(), outdoorSeating: z.boolean().optional(), paymentMethods: z.array(z.string()).optional(), wheelchairAccessible: z.boolean().optional(), parkingAvailable: z.boolean().optional(), socialMedia: z.record(z.string()).optional(), ratingCategory: z.string().optional(), rating: z.number().optional(), count: z.number().int().optional(), lastUpdated: z.string().datetime({ offset: true }).transform(v => new Date(v) ).optional(), dataSourceVersion: z.string().optional(), scrapingSessionId: z.string().optional(), alternatePhones: z.array(z.string()).optional(), contactPersonName: z.string().optional(), contactPersonTitle: z.string().optional(), contactEmail: z.string().optional(), foundedYear: z.number().int().optional(), businessType: z.string().optional(), certifications: z.array(z.string()).optional(), licenseNumber: z.string().optional(), revenueRange: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange$inboundSchema .default("REVENUE_RANGE_UNSPECIFIED"), fundingStage: z.string().optional(), isPublicCompany: z.boolean().optional(), websiteLoadSpeed: z.number().optional(), hasSslCertificate: z.boolean().optional(), cmsUsed: z.string().optional(), ecommercePlatforms: z.array(z.string()).optional(), timezone: z.string().optional(), neighborhood: z.string().optional(), nearbyLandmarks: z.array(z.string()).optional(), transportationAccess: z.string().optional(), employeeBenefits: z.array( GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits$inboundSchema, ).optional(), parentCompany: z.string().optional(), subsidiaries: z.array(z.string()).optional(), isFranchise: z.boolean().optional(), seoKeywords: z.array(z.string()).optional(), usesGoogleAds: z.boolean().optional(), googleMyBusinessCategory: z.string().optional(), naicsCode: z.string().optional(), sicCode: z.string().optional(), unspscCode: z.string().optional(), isGreenCertified: z.boolean().optional(), energySources: z.array(z.string()).optional(), sustainabilityRating: z.string().optional(), recentAnnouncements: z.array(z.string()).optional(), lastProductLaunch: z.string().datetime({ offset: true }).transform(v => new Date(v) ).optional(), hasLitigationHistory: z.boolean().optional(), exportControlStatus: z.string().optional(), }); /** @internal */ export type Lead$Outbound = { id?: string | undefined; name?: string | undefined; website?: string | undefined; phone?: string | undefined; address?: string | undefined; city?: string | undefined; state?: string | undefined; country?: string | undefined; latitude?: number | undefined; longitude?: number | undefined; googleRating?: number | undefined; reviewCount?: number | undefined; industry?: string | undefined; employeeCount?: number | undefined; estimatedRevenue?: string | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; deletedAt?: string | undefined; placeId?: string | undefined; googleMapsUrl?: string | undefined; businessStatus?: string | undefined; regularHours?: | Array | undefined; specialHours?: | Array | undefined; photoReferences?: Array | undefined; mainPhotoUrl?: string | undefined; reviews?: | Array | undefined; types?: Array | undefined; amenities?: Array | undefined; servesVegetarianFood?: boolean | undefined; outdoorSeating?: boolean | undefined; paymentMethods?: Array | undefined; wheelchairAccessible?: boolean | undefined; parkingAvailable?: boolean | undefined; socialMedia?: { [k: string]: string } | undefined; ratingCategory?: string | undefined; rating?: number | undefined; count?: number | undefined; lastUpdated?: string | undefined; dataSourceVersion?: string | undefined; scrapingSessionId?: string | undefined; alternatePhones?: Array | undefined; contactPersonName?: string | undefined; contactPersonTitle?: string | undefined; contactEmail?: string | undefined; foundedYear?: number | undefined; businessType?: string | undefined; certifications?: Array | undefined; licenseNumber?: string | undefined; revenueRange: string; fundingStage?: string | undefined; isPublicCompany?: boolean | undefined; websiteLoadSpeed?: number | undefined; hasSslCertificate?: boolean | undefined; cmsUsed?: string | undefined; ecommercePlatforms?: Array | undefined; timezone?: string | undefined; neighborhood?: string | undefined; nearbyLandmarks?: Array | undefined; transportationAccess?: string | undefined; employeeBenefits?: Array | undefined; parentCompany?: string | undefined; subsidiaries?: Array | undefined; isFranchise?: boolean | undefined; seoKeywords?: Array | undefined; usesGoogleAds?: boolean | undefined; googleMyBusinessCategory?: string | undefined; naicsCode?: string | undefined; sicCode?: string | undefined; unspscCode?: string | undefined; isGreenCertified?: boolean | undefined; energySources?: Array | undefined; sustainabilityRating?: string | undefined; recentAnnouncements?: Array | undefined; lastProductLaunch?: string | undefined; hasLitigationHistory?: boolean | undefined; exportControlStatus?: string | undefined; }; /** @internal */ export const Lead$outboundSchema: z.ZodType = z.object({ id: z.string().optional(), name: z.string().optional(), website: z.string().optional(), phone: z.string().optional(), address: z.string().optional(), city: z.string().optional(), state: z.string().optional(), country: z.string().optional(), latitude: z.number().optional(), longitude: z.number().optional(), googleRating: z.number().optional(), reviewCount: z.number().int().optional(), industry: z.string().optional(), employeeCount: z.number().int().optional(), estimatedRevenue: z.string().optional(), createdAt: z.date().transform(v => v.toISOString()).optional(), updatedAt: z.date().transform(v => v.toISOString()).optional(), deletedAt: z.date().transform(v => v.toISOString()).optional(), placeId: z.string().optional(), googleMapsUrl: z.string().optional(), businessStatus: z.string().optional(), regularHours: z.array( z.lazy(() => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRegularHours$outboundSchema ), ).optional(), specialHours: z.array( z.lazy(() => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdSpecialHours$outboundSchema ), ).optional(), photoReferences: z.array(z.string()).optional(), mainPhotoUrl: z.string().optional(), reviews: z.array( z.lazy(() => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdReviews$outboundSchema ), ).optional(), types: z.array(z.string()).optional(), amenities: z.array(z.string()).optional(), servesVegetarianFood: z.boolean().optional(), outdoorSeating: z.boolean().optional(), paymentMethods: z.array(z.string()).optional(), wheelchairAccessible: z.boolean().optional(), parkingAvailable: z.boolean().optional(), socialMedia: z.record(z.string()).optional(), ratingCategory: z.string().optional(), rating: z.number().optional(), count: z.number().int().optional(), lastUpdated: z.date().transform(v => v.toISOString()).optional(), dataSourceVersion: z.string().optional(), scrapingSessionId: z.string().optional(), alternatePhones: z.array(z.string()).optional(), contactPersonName: z.string().optional(), contactPersonTitle: z.string().optional(), contactEmail: z.string().optional(), foundedYear: z.number().int().optional(), businessType: z.string().optional(), certifications: z.array(z.string()).optional(), licenseNumber: z.string().optional(), revenueRange: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdRevenueRange$outboundSchema .default("REVENUE_RANGE_UNSPECIFIED"), fundingStage: z.string().optional(), isPublicCompany: z.boolean().optional(), websiteLoadSpeed: z.number().optional(), hasSslCertificate: z.boolean().optional(), cmsUsed: z.string().optional(), ecommercePlatforms: z.array(z.string()).optional(), timezone: z.string().optional(), neighborhood: z.string().optional(), nearbyLandmarks: z.array(z.string()).optional(), transportationAccess: z.string().optional(), employeeBenefits: z.array( GetApiLeadScraperMicroserviceApiV1LeadsLeadIdEmployeeBenefits$outboundSchema, ).optional(), parentCompany: z.string().optional(), subsidiaries: z.array(z.string()).optional(), isFranchise: z.boolean().optional(), seoKeywords: z.array(z.string()).optional(), usesGoogleAds: z.boolean().optional(), googleMyBusinessCategory: z.string().optional(), naicsCode: z.string().optional(), sicCode: z.string().optional(), unspscCode: z.string().optional(), isGreenCertified: z.boolean().optional(), energySources: z.array(z.string()).optional(), sustainabilityRating: z.string().optional(), recentAnnouncements: z.array(z.string()).optional(), lastProductLaunch: z.date().transform(v => v.toISOString()).optional(), hasLitigationHistory: z.boolean().optional(), exportControlStatus: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Lead$ { /** @deprecated use `Lead$inboundSchema` instead. */ export const inboundSchema = Lead$inboundSchema; /** @deprecated use `Lead$outboundSchema` instead. */ export const outboundSchema = Lead$outboundSchema; /** @deprecated use `Lead$Outbound` instead. */ export type Outbound = Lead$Outbound; } export function leadToJSON(lead: Lead): string { return JSON.stringify(Lead$outboundSchema.parse(lead)); } export function leadFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Lead$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Lead' from JSON`, ); } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$inboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData, z.ZodTypeDef, unknown > = z.object({ lead: z.lazy(() => Lead$inboundSchema).optional(), }); /** @internal */ export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$Outbound = { lead?: Lead$Outbound | undefined; }; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$outboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$Outbound, z.ZodTypeDef, GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData > = z.object({ lead: z.lazy(() => Lead$outboundSchema).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$outboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$Outbound` instead. */ export type Outbound = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$Outbound; } export function getApiLeadScraperMicroserviceApiV1LeadsLeadIdDataToJSON( getApiLeadScraperMicroserviceApiV1LeadsLeadIdData: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData, ): string { return JSON.stringify( GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$outboundSchema.parse( getApiLeadScraperMicroserviceApiV1LeadsLeadIdData, ), ); } export function getApiLeadScraperMicroserviceApiV1LeadsLeadIdDataFromJSON( jsonString: string, ): SafeParseResult< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData, SDKValidationError > { return safeParse( jsonString, (x) => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData' from JSON`, ); } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$inboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody, z.ZodTypeDef, unknown > = z.object({ data: z.lazy(() => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$inboundSchema ), }); /** @internal */ export type GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$Outbound = { data: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$Outbound; }; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$outboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$Outbound, z.ZodTypeDef, GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody > = z.object({ data: z.lazy(() => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdData$outboundSchema ), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$outboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$Outbound` instead. */ export type Outbound = GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$Outbound; } export function getApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBodyToJSON( getApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody: GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody, ): string { return JSON.stringify( GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$outboundSchema .parse(getApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody), ); } export function getApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBodyFromJSON( jsonString: string, ): SafeParseResult< GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody, SDKValidationError > { return safeParse( jsonString, (x) => GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetApiLeadScraperMicroserviceApiV1LeadsLeadIdResponseBody' from JSON`, ); }