/* * 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 GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest = { webhookId: string; organizationId?: string | undefined; workspaceId?: string | undefined; tenantId?: string | undefined; accountId?: string | undefined; }; export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents = { TriggerEventUnspecified: "TRIGGER_EVENT_UNSPECIFIED", TriggerEventJobStarted: "TRIGGER_EVENT_JOB_STARTED", TriggerEventJobCompleted: "TRIGGER_EVENT_JOB_COMPLETED", TriggerEventJobFailed: "TRIGGER_EVENT_JOB_FAILED", TriggerEventLeadFound: "TRIGGER_EVENT_LEAD_FOUND", TriggerEventQuotaExceeded: "TRIGGER_EVENT_QUOTA_EXCEEDED", TriggerEventErrorThresholdReached: "TRIGGER_EVENT_ERROR_THRESHOLD_REACHED", TriggerEventRateLimitReached: "TRIGGER_EVENT_RATE_LIMIT_REACHED", TriggerEventDataValidationFailed: "TRIGGER_EVENT_DATA_VALIDATION_FAILED", TriggerEventNewProxyNeeded: "TRIGGER_EVENT_NEW_PROXY_NEEDED", TriggerEventScheduledMaintenance: "TRIGGER_EVENT_SCHEDULED_MAINTENANCE", } as const; export type GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents = ClosedEnum< typeof GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents >; export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields = { IncludedFieldUnspecified: "INCLUDED_FIELD_UNSPECIFIED", IncludedFieldName: "INCLUDED_FIELD_NAME", IncludedFieldWebsite: "INCLUDED_FIELD_WEBSITE", IncludedFieldPhone: "INCLUDED_FIELD_PHONE", IncludedFieldAddress: "INCLUDED_FIELD_ADDRESS", IncludedFieldLocation: "INCLUDED_FIELD_LOCATION", IncludedFieldCoordinates: "INCLUDED_FIELD_COORDINATES", IncludedFieldGoogleRating: "INCLUDED_FIELD_GOOGLE_RATING", IncludedFieldReviewCount: "INCLUDED_FIELD_REVIEW_COUNT", IncludedFieldReviews: "INCLUDED_FIELD_REVIEWS", IncludedFieldBusinessHours: "INCLUDED_FIELD_BUSINESS_HOURS", IncludedFieldBusinessStatus: "INCLUDED_FIELD_BUSINESS_STATUS", IncludedFieldPlaceId: "INCLUDED_FIELD_PLACE_ID", IncludedFieldGoogleMapsUrl: "INCLUDED_FIELD_GOOGLE_MAPS_URL", IncludedFieldPhotos: "INCLUDED_FIELD_PHOTOS", IncludedFieldMainPhoto: "INCLUDED_FIELD_MAIN_PHOTO", IncludedFieldBusinessTypes: "INCLUDED_FIELD_BUSINESS_TYPES", IncludedFieldAmenities: "INCLUDED_FIELD_AMENITIES", IncludedFieldPaymentMethods: "INCLUDED_FIELD_PAYMENT_METHODS", IncludedFieldSocialProfiles: "INCLUDED_FIELD_SOCIAL_PROFILES", IncludedFieldEmployeeCount: "INCLUDED_FIELD_EMPLOYEE_COUNT", IncludedFieldRevenueInfo: "INCLUDED_FIELD_REVENUE_INFO", IncludedFieldFoundedYear: "INCLUDED_FIELD_FOUNDED_YEAR", IncludedFieldCertifications: "INCLUDED_FIELD_CERTIFICATIONS", IncludedFieldNaicsCode: "INCLUDED_FIELD_NAICS_CODE", IncludedFieldSicCode: "INCLUDED_FIELD_SIC_CODE", IncludedFieldScrapingMetadata: "INCLUDED_FIELD_SCRAPING_METADATA", IncludedFieldComplianceInfo: "INCLUDED_FIELD_COMPLIANCE_INFO", IncludedFieldAlternatePhones: "INCLUDED_FIELD_ALTERNATE_PHONES", IncludedFieldContactPerson: "INCLUDED_FIELD_CONTACT_PERSON", IncludedFieldContactEmail: "INCLUDED_FIELD_CONTACT_EMAIL", } as const; export type GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields = ClosedEnum< typeof GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields >; export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat = { PayloadFormatUnspecified: "PAYLOAD_FORMAT_UNSPECIFIED", PayloadFormatJson: "PAYLOAD_FORMAT_JSON", PayloadFormatXml: "PAYLOAD_FORMAT_XML", PayloadFormatFormData: "PAYLOAD_FORMAT_FORM_DATA", PayloadFormatProtobuf: "PAYLOAD_FORMAT_PROTOBUF", PayloadFormatYaml: "PAYLOAD_FORMAT_YAML", } as const; export type GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat = ClosedEnum< typeof GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat >; export type GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata = {}; export type GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook = { id?: string | undefined; url?: string | undefined; authType?: string | undefined; authToken?: string | undefined; customHeaders?: { [k: string]: string } | undefined; maxRetries?: number | undefined; retryInterval?: string | undefined; triggerEvents?: | Array | undefined; includedFields?: | Array | undefined; includeFullResults?: boolean | undefined; payloadFormat?: | GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat | undefined; verifySsl?: boolean | undefined; signingSecret?: string | undefined; rateLimit?: number | undefined; rateLimitInterval?: string | undefined; createdAt?: Date | undefined; updatedAt?: Date | undefined; lastTriggeredAt?: Date | undefined; successfulCalls?: number | undefined; failedCalls?: number | undefined; metadata?: | GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata | undefined; webhookName?: string | undefined; }; export type GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData = { webhook?: | GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook | undefined; }; /** * Retrieves details of a specific webhook configuration */ export type GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody = { data: GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData; }; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$inboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest, z.ZodTypeDef, unknown > = z.object({ webhookId: z.string(), organizationId: z.string().optional(), workspaceId: z.string().optional(), tenantId: z.string().optional(), accountId: z.string().optional(), }); /** @internal */ export type GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$Outbound = { webhookId: string; organizationId?: string | undefined; workspaceId?: string | undefined; tenantId?: string | undefined; accountId?: string | undefined; }; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$outboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$Outbound, z.ZodTypeDef, GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest > = z.object({ webhookId: 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 GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$outboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$Outbound` instead. */ export type Outbound = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$Outbound; } export function getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequestToJSON( getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest: GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest, ): string { return JSON.stringify( GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$outboundSchema .parse(getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest), ); } export function getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequestFromJSON( jsonString: string, ): SafeParseResult< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest, SDKValidationError > { return safeParse( jsonString, (x) => GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest' from JSON`, ); } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents$inboundSchema: z.ZodNativeEnum< typeof GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents > = z.nativeEnum( GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents, ); /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents$outboundSchema: z.ZodNativeEnum< typeof GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents > = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents$outboundSchema; } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields$inboundSchema: z.ZodNativeEnum< typeof GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields > = z.nativeEnum( GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields, ); /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields$outboundSchema: z.ZodNativeEnum< typeof GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields > = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields$outboundSchema; } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat$inboundSchema: z.ZodNativeEnum< typeof GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat > = z.nativeEnum( GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat, ); /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat$outboundSchema: z.ZodNativeEnum< typeof GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat > = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat$outboundSchema; } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$inboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ export type GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$Outbound = {}; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$outboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$Outbound, z.ZodTypeDef, GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$outboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$Outbound` instead. */ export type Outbound = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$Outbound; } export function getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadataToJSON( getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata: GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata, ): string { return JSON.stringify( GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$outboundSchema .parse(getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata), ); } export function getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadataFromJSON( jsonString: string, ): SafeParseResult< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata, SDKValidationError > { return safeParse( jsonString, (x) => GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata' from JSON`, ); } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$inboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook, z.ZodTypeDef, unknown > = z.object({ id: z.string().optional(), url: z.string().optional(), authType: z.string().optional(), authToken: z.string().optional(), customHeaders: z.record(z.string()).optional(), maxRetries: z.number().int().optional(), retryInterval: z.string().optional(), triggerEvents: z.array( GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents$inboundSchema, ).optional(), includedFields: z.array( GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields$inboundSchema, ).optional(), includeFullResults: z.boolean().optional(), payloadFormat: GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat$inboundSchema .default("PAYLOAD_FORMAT_UNSPECIFIED"), verifySsl: z.boolean().optional(), signingSecret: z.string().optional(), rateLimit: z.number().int().optional(), rateLimitInterval: 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(), lastTriggeredAt: z.string().datetime({ offset: true }).transform(v => new Date(v) ).optional(), successfulCalls: z.number().int().optional(), failedCalls: z.number().int().optional(), metadata: z.lazy(() => GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$inboundSchema ).optional(), webhookName: z.string().optional(), }); /** @internal */ export type GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$Outbound = { id?: string | undefined; url?: string | undefined; authType?: string | undefined; authToken?: string | undefined; customHeaders?: { [k: string]: string } | undefined; maxRetries?: number | undefined; retryInterval?: string | undefined; triggerEvents?: Array | undefined; includedFields?: Array | undefined; includeFullResults?: boolean | undefined; payloadFormat: string; verifySsl?: boolean | undefined; signingSecret?: string | undefined; rateLimit?: number | undefined; rateLimitInterval?: string | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; lastTriggeredAt?: string | undefined; successfulCalls?: number | undefined; failedCalls?: number | undefined; metadata?: | GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$Outbound | undefined; webhookName?: string | undefined; }; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$outboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$Outbound, z.ZodTypeDef, GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook > = z.object({ id: z.string().optional(), url: z.string().optional(), authType: z.string().optional(), authToken: z.string().optional(), customHeaders: z.record(z.string()).optional(), maxRetries: z.number().int().optional(), retryInterval: z.string().optional(), triggerEvents: z.array( GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdTriggerEvents$outboundSchema, ).optional(), includedFields: z.array( GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdIncludedFields$outboundSchema, ).optional(), includeFullResults: z.boolean().optional(), payloadFormat: GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdPayloadFormat$outboundSchema .default("PAYLOAD_FORMAT_UNSPECIFIED"), verifySsl: z.boolean().optional(), signingSecret: z.string().optional(), rateLimit: z.number().int().optional(), rateLimitInterval: z.string().optional(), createdAt: z.date().transform(v => v.toISOString()).optional(), updatedAt: z.date().transform(v => v.toISOString()).optional(), lastTriggeredAt: z.date().transform(v => v.toISOString()).optional(), successfulCalls: z.number().int().optional(), failedCalls: z.number().int().optional(), metadata: z.lazy(() => GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdMetadata$outboundSchema ).optional(), webhookName: 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 GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$outboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$Outbound` instead. */ export type Outbound = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$Outbound; } export function getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhookToJSON( getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook: GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook, ): string { return JSON.stringify( GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$outboundSchema .parse(getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook), ); } export function getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhookFromJSON( jsonString: string, ): SafeParseResult< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook, SDKValidationError > { return safeParse( jsonString, (x) => GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook' from JSON`, ); } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$inboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData, z.ZodTypeDef, unknown > = z.object({ webhook: z.lazy(() => GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$inboundSchema ).optional(), }); /** @internal */ export type GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$Outbound = { webhook?: | GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$Outbound | undefined; }; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$outboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$Outbound, z.ZodTypeDef, GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData > = z.object({ webhook: z.lazy(() => GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdWebhook$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 GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$outboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$Outbound` instead. */ export type Outbound = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$Outbound; } export function getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdDataToJSON( getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData: GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData, ): string { return JSON.stringify( GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$outboundSchema .parse(getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData), ); } export function getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdDataFromJSON( jsonString: string, ): SafeParseResult< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData, SDKValidationError > { return safeParse( jsonString, (x) => GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData' from JSON`, ); } /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$inboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody, z.ZodTypeDef, unknown > = z.object({ data: z.lazy(() => GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$inboundSchema ), }); /** @internal */ export type GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$Outbound = { data: GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$Outbound; }; /** @internal */ export const GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$outboundSchema: z.ZodType< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$Outbound, z.ZodTypeDef, GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody > = z.object({ data: z.lazy(() => GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdData$outboundSchema ), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$ { /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$inboundSchema` instead. */ export const inboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$inboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$outboundSchema` instead. */ export const outboundSchema = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$outboundSchema; /** @deprecated use `GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$Outbound` instead. */ export type Outbound = GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$Outbound; } export function getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBodyToJSON( getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody: GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody, ): string { return JSON.stringify( GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$outboundSchema .parse(getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody), ); } export function getApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBodyFromJSON( jsonString: string, ): SafeParseResult< GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody, SDKValidationError > { return safeParse( jsonString, (x) => GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody' from JSON`, ); }