import {z} from 'zod' export type CompanyBatchGetInput = {ids?: Array | undefined, urns?: Array | undefined, include_fields?: (Array | null) | undefined}; export type CreateApiCompaniesBatchGetArgs = {extended?: boolean | undefined, body: CompanyBatchGetInput}; export type CreateApiCompaniesBatchGetOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; export const foundingDatePrecision = z.enum(["DAY", "MONTH", "YEAR"]); export const companyType = z.enum(["UNKNOWN", "STARTUP", "SCHOOL"]); export const socialStatus = z.union([z.literal(1), z.literal(2)]); export const socialMetadata = z.object({url: z.string().nullable().optional(), follower_count: z.number().int().nullable().optional(), username: z.string().nullable().optional(), status: socialStatus.nullable().optional()}); export const facebookSocialMetadata = z.object({url: z.string().nullable().optional(), follower_count: z.number().int().nullable().optional(), username: z.string().nullable().optional(), status: socialStatus.nullable().optional(), following_count: z.number().int().nullable().optional(), like_count: z.number().int().nullable().optional()}); export const investor = z.object({entity_urn: z.union([z.string(), z.string()]).nullable().optional(), name: z.string().nullable().optional()}); export const fundingType = z.enum(["ACCELERATOR_INCUBATOR", "ANGEL", "BANK_ADMIN", "BRIDGE", "BUYOUT_LBO", "CAPITALIZATION", "CONVERTIBLE_NOTE", "CROWDFUNDING", "DEBT", "DEBT_REPAY", "EARLY_STAGE", "GRANT", "INITIAL_COIN_OFFERING", "IPO", "JOINT_VENTURE", "LATER_STAGE", "M_AND_A", "MEZZANINE", "PRE_SEED", "PRIVATE_EQUITY", "PUBLIC_EQUITY_OFFERING", "REVERSE_MERGER", "SECONDARY_TRANSACTION", "SEED", "SEED_EXTENSION", "SERIES_1", "SERIES_2", "SERIES_3", "SERIES_A", "SERIES_A_EXTENSION", "SERIES_A1", "SERIES_A2", "SERIES_A3", "SERIES_AA", "SERIES_AAA", "SERIES_B", "SERIES_B_EXTENSION", "SERIES_B1", "SERIES_B2", "SERIES_B3", "SERIES_BB", "SERIES_C", "SERIES_C_EXTENSION", "SERIES_C1", "SERIES_C2", "SERIES_C3", "SERIES_CC", "SERIES_D", "SERIES_D_EXTENSION", "SERIES_D1", "SERIES_D2", "SERIES_D3", "SERIES_E", "SERIES_E_EXTENSION", "SERIES_E1", "SERIES_E2", "SERIES_F", "SERIES_F_EXTENSION", "SERIES_G", "SERIES_G_EXTENSION", "SERIES_H", "SERIES_I", "SERIES_J", "SPAC", "SPIN_OFF", "STRATEGIC", "UNKNOWN", "VENTURE_LEASING", "PRODUCT_CROWDFUNDING", "MERGER_OF_EQ", "PE_GROWTH", "CORPORATE", "DEBT_REFIN", "EQUITY_CROWDFUNDING", "NON_EQUITY_ASSISTANCE", "SECONDARY_OPEN", "RESTART_ANGEL", "SECONDARY_DISTRIB", "RESTART_LATER", "RESTART_EARLY", "ANGEL_INDIVIDUAL", "CORPORATE_ROUND", "DEBT_FINANCING", "CONV_DEBT", "DEBT_CONV", "SECONDARY_TRANSACTION_PRIVATE", "SECONDARY_TRANSACTION_PUBLIC", "LATER_[STAGE_SERIES_G", "DEBT_GENERAL", "LATER_STAGE_SERIES_F", "LATER_STAGE_SERIES_A", "VENTURE_DEBT", "EARLY_STAGE_VENTURE", "LATER_STAGE_VENTURE", "PRE__SEED", "FUNDING_ROUND", "SEED_ROUND", "EARLY_STAGE_SERIES_A", "EARLY_STAGE_SERIES_A1", "EARLY_STAGE_SERIES_B", "EARLY_STAGE_SERIES_B1", "LATER_STAGE_SERIES_C", "LATER_STAGE_SERIES_C1", "CORPORATE_SERIES_A", "LATER_STAGE_SERIES_E", "LATER_STAGE_SERIES_B", "LATER_STAGE_SERIES_D", "EARLY_STAGE_VC", "ACCELERATOR_INC", "DEBT_PP", "LATER_STAGE_VC", "UNDISCLOSED", "POST_IPO_DEBT", "POST_IPO_EQUITY", "POST_IPO_SECONDARY", "SECONDARY_MARKET", "SECONDARY_PRIVATE", "SERIES_UNKNOWN", "OUT_OF_BUSINESS", "IBO", "PIPE", "LIQUIDATION", "UNDERTERMINED", "ASSET_PURCH", "PLATFORM", "DIV_RECAP", "LEV_RECAP", "REPURCHASE", "TWO_PO", "EQUITY_FOR_SVC", "DIVIDEND", "SALE_LEASE_BACK", "GP_STAKES"]); export const fundingStage = z.enum(["STEALTH", "PRE_SEED", "SEED", "SERIES_A", "SERIES_B", "SERIES_C", "SERIES_D", "SERIES_E", "SERIES_F", "SERIES_G", "SERIES_H", "SERIES_I", "SERIES_J", "SERIES_K_PLUS", "VENTURE_UNKNOWN", "EXITED", "OUT_OF_BUSINESS"]); export const valuationSource = z.enum(["UNKNOWN", "PUBLICLY_DISCLOSED", "PRIVATELY_SOURCED", "ESTIMATED"]); export const companyValuationInfoOutput = z.object({value: z.number().int().nullable().optional(), source: valuationSource.nullable().optional(), source_details: z.string().nullable().optional(), is_potentially_stale: z.boolean().nullable().optional(), is_potentially_stale_details: z.string().nullable().optional()}); export const tagType = z.enum(["UNKNOWN", "PRODUCT_HUNT", "YC_BATCH", "INDUSTRY", "EXTERNAL_INDUSTRY", "TECHNOLOGY", "PRODUCT_TYPE", "CUSTOMER_TYPE", "TECHNOLOGY_TYPE", "MARKET_VERTICAL", "MARKET_SUB_VERTICAL", "ACCELERATOR"]); export const tagOutput = z.object({display_value: z.string(), type: tagType, date_added: z.string().nullable().optional(), entity_urn: z.string(), company_urn: z.string().nullable().optional(), is_primary_tag: z.boolean().nullable().optional()}); export const fundingAttributeNullStatus = z.enum(["EXISTS_BUT_UNDISCLOSED", "NONE_ANNOUNCED"]); export const companySnapshotOutput = z.object({website: z.object({url: z.string().nullable().optional(), domain: z.string().nullable().optional(), is_broken: z.boolean().nullable().optional()}).nullable().optional(), logo_url: z.string().nullable().optional(), name: z.string().nullable().optional(), legal_name: z.string().nullable().optional(), description: z.string().nullable().optional(), customer_type: z.string().nullable().optional(), founding_date: z.object({date: z.string(), granularity: foundingDatePrecision}).nullable().optional(), headcount: z.number().int().nullable().optional(), ownership_status: z.enum(["PRIVATE", "OUT_OF_BUSINESS", "ACQUIRED_OR_MERGED", "ACTIVE", "INACTIVE", "MANAGING", "IPO_REGISTRATION", "PUBLIC"]).nullable().optional(), company_type: companyType.optional(), location: z.object({address_formatted: z.string().nullable().optional(), location: z.string().nullable().optional(), street: z.string().nullable().optional(), city: z.string().nullable().optional(), state: z.string().nullable().optional(), zip: z.string().nullable().optional(), country: z.string().nullable().optional(), metro_areas: z.array(z.string()).nullable().optional()}).nullable().optional(), contact: z.object({emails: z.array(z.string()).optional(), phone_numbers: z.array(z.string()).optional(), exec_emails: z.array(z.string()).optional(), primary_email: z.string().nullable().optional(), primary_email_person_id: z.number().int().nullable().optional()}).nullable().optional(), socials: z.record(z.string(), z.union([socialMetadata, facebookSocialMetadata])).nullable().optional(), funding: z.object({funding_total: z.number().nullable().optional(), num_funding_rounds: z.number().int().nullable().optional(), investors: z.array(investor).optional(), last_funding_at: z.unknown(), last_funding_type: fundingType.nullable().optional(), last_funding_total: z.string().nullable().optional(), funding_stage: z.union([fundingStage, fundingType]).nullable().optional(), valuation: z.number().int().nullable().optional(), valuation_info: companyValuationInfoOutput.nullable().optional()}).nullable().optional(), name_aliases: z.array(z.string()).optional(), website_domain_aliases: z.array(z.string()).optional(), corrected_headcount: z.number().int().nullable().optional(), external_headcount: z.number().int().nullable().optional(), web_traffic: z.number().int().nullable().optional(), stage: z.union([z.enum(["STEALTH", "PRE_SEED", "SEED", "SERIES_A", "SERIES_B", "SERIES_C", "SERIES_D", "SERIES_E", "SERIES_F", "SERIES_G", "SERIES_H", "SERIES_I", "SERIES_J", "SERIES_K_PLUS", "VENTURE_UNKNOWN", "EXITED", "OUT_OF_BUSINESS"]), z.enum(["ACCELERATOR_INCUBATOR", "ANGEL", "BANK_ADMIN", "BRIDGE", "BUYOUT_LBO", "CAPITALIZATION", "CONVERTIBLE_NOTE", "CROWDFUNDING", "DEBT", "DEBT_REPAY", "EARLY_STAGE", "GRANT", "INITIAL_COIN_OFFERING", "IPO", "JOINT_VENTURE", "LATER_STAGE", "M_AND_A", "MEZZANINE", "PRE_SEED", "PRIVATE_EQUITY", "PUBLIC_EQUITY_OFFERING", "REVERSE_MERGER", "SECONDARY_TRANSACTION", "SEED", "SEED_EXTENSION", "SERIES_1", "SERIES_2", "SERIES_3", "SERIES_A", "SERIES_A_EXTENSION", "SERIES_A1", "SERIES_A2", "SERIES_A3", "SERIES_AA", "SERIES_AAA", "SERIES_B", "SERIES_B_EXTENSION", "SERIES_B1", "SERIES_B2", "SERIES_B3", "SERIES_BB", "SERIES_C", "SERIES_C_EXTENSION", "SERIES_C1", "SERIES_C2", "SERIES_C3", "SERIES_CC", "SERIES_D", "SERIES_D_EXTENSION", "SERIES_D1", "SERIES_D2", "SERIES_D3", "SERIES_E", "SERIES_E_EXTENSION", "SERIES_E1", "SERIES_E2", "SERIES_F", "SERIES_F_EXTENSION", "SERIES_G", "SERIES_G_EXTENSION", "SERIES_H", "SERIES_I", "SERIES_J", "SPAC", "SPIN_OFF", "STRATEGIC", "UNKNOWN", "VENTURE_LEASING", "PRODUCT_CROWDFUNDING", "MERGER_OF_EQ", "PE_GROWTH", "CORPORATE", "DEBT_REFIN", "EQUITY_CROWDFUNDING", "NON_EQUITY_ASSISTANCE", "SECONDARY_OPEN", "RESTART_ANGEL", "SECONDARY_DISTRIB", "RESTART_LATER", "RESTART_EARLY", "ANGEL_INDIVIDUAL", "CORPORATE_ROUND", "DEBT_FINANCING", "CONV_DEBT", "DEBT_CONV", "SECONDARY_TRANSACTION_PRIVATE", "SECONDARY_TRANSACTION_PUBLIC", "LATER_[STAGE_SERIES_G", "DEBT_GENERAL", "LATER_STAGE_SERIES_F", "LATER_STAGE_SERIES_A", "VENTURE_DEBT", "EARLY_STAGE_VENTURE", "LATER_STAGE_VENTURE", "PRE__SEED", "FUNDING_ROUND", "SEED_ROUND", "EARLY_STAGE_SERIES_A", "EARLY_STAGE_SERIES_A1", "EARLY_STAGE_SERIES_B", "EARLY_STAGE_SERIES_B1", "LATER_STAGE_SERIES_C", "LATER_STAGE_SERIES_C1", "CORPORATE_SERIES_A", "LATER_STAGE_SERIES_E", "LATER_STAGE_SERIES_B", "LATER_STAGE_SERIES_D", "EARLY_STAGE_VC", "ACCELERATOR_INC", "DEBT_PP", "LATER_STAGE_VC", "UNDISCLOSED", "POST_IPO_DEBT", "POST_IPO_EQUITY", "POST_IPO_SECONDARY", "SECONDARY_MARKET", "SECONDARY_PRIVATE", "SERIES_UNKNOWN", "OUT_OF_BUSINESS", "IBO", "PIPE", "LIQUIDATION", "UNDERTERMINED", "ASSET_PURCH", "PLATFORM", "DIV_RECAP", "LEV_RECAP", "REPURCHASE", "TWO_PO", "EQUITY_FOR_SVC", "DIVIDEND", "SALE_LEASE_BACK", "GP_STAKES"])]).nullable().optional(), redirect_urn: z.string().nullable().optional(), entity_urn: z.string().nullable().optional(), initialized_date: z.string(), funding_attribute_null_status: fundingAttributeNullStatus.nullable().optional()}); export const companyHighlightCategory = z.enum(["Strong Team Growth", "Angel Backed", "Venture Backed", "Major Hire", "Soonicorn"]); export const personHighlightCategory = z.enum(["Seasoned Executive", "Seasoned Operator", "Seasoned Founder", "Seasoned Adviser", "Unicorn Executive", "Unicorn Operator", "Unicorn Founder", "Unicorn Adviser", "High Growth Startup Executive", "High Growth Startup Operator", "High Growth Startup Founder", "High Growth Startup Adviser", "Prior VC Backed Executive", "Prior VC Backed Operator", "Prior VC Backed Founder", "Prior VC Backed Adviser", "Current Student", "Top University", "HBCU Alum", "HBCU University", "Deep Technical Background", "Prior Exit", "Top Company Alum", "Unicorn Alum", "Major Tech Company Experience", "Legacy Tech Company Experience", "Elite Industry Experience", "Major Research Institution Experience", "Major Government Experience", "Major Financial Institution Experience", "Venture Background", "$5M Club", "$10M Club", "$15M Club", "$20M Club", "$25M Club", "$30M Club", "$30M Raised", "$35M Club", "$40M Club", "$45M Club", "$50M Club", "$50M+ Club", "$55M Club", "$60M Club", "$65M Club", "$70M Club", "$75M Club", "$80M Club", "$85M Club", "$90M Club", "$95M Club", "$100M Club", "$105M Club", "$110M Club", "$115M Club", "$120M Club", "$125M Club", "$130M Club", "$135M Club", "$140M Club", "$145M Club", "$150M Club", "$155M Club", "$160M Club", "$165M Club", "$170M Club", "$175M Club", "$180M Club", "$185M Club", "$190M Club", "$195M Club", "$200M Club", "$205M Club", "$210M Club", "$215M Club", "$220M Club", "$225M Club", "$230M Club", "$235M Club", "$240M Club", "$245M Club", "$250M Club", "$255M Club", "$260M Club", "$265M Club", "$270M Club", "$275M Club", "$280M Club", "$285M Club", "$290M Club", "$295M Club", "$300M Club", "Free Agent", "Founder Turned Operator", "Stealth Founder", "Vested Former Founder", "Jack of All Trades", "YC Backed Founder", "Top Web3 Experience", "Top AI Experience", "Notable Followers", "New Notable Followers"]); export const servicesMidtierSchemasCommonHighlightOutput = z.object({category: z.union([companyHighlightCategory, personHighlightCategory]), date_added: z.string().nullable().optional(), text: z.string().nullable().optional(), company_urn: z.string().nullable().optional()}); export const tractionMetricsPoint = z.object({value: z.number().nullable().optional(), change: z.number().nullable().optional(), percent_change: z.number().nullable().optional()}); export const tractionMetricsTimeSeriesMetric = z.object({timestamp: z.string(), metric_value: z.union([z.number().int(), z.number()])}); export const tractionMetricsInfo = z.object({"14d_ago": tractionMetricsPoint, "30d_ago": tractionMetricsPoint, "90d_ago": tractionMetricsPoint, "180d_ago": tractionMetricsPoint, "365d_ago": tractionMetricsPoint, metrics: z.array(tractionMetricsTimeSeriesMetric).optional(), latest_metric_value: z.union([z.number(), z.number().int()]).nullable().optional()}).and(z.record(z.string(), z.unknown())); export const contactMetadata = z.object({emails: z.array(z.string()).optional(), phone_numbers: z.array(z.string()).optional(), exec_emails: z.array(z.string()).optional(), primary_email: z.string().nullable().optional(), primary_email_person_id: z.number().int().nullable().optional()}); export const department = z.enum(["Advisor", "Customer Success", "Data", "Design", "Engineering", "Finance", "Legal", "Marketing", "Operations", "Other", "People", "Product", "Sales", "Support"]); export const roleType = z.enum(["FOUNDER", "CEO", "EXECUTIVE", "OPERATOR", "INTERN", "ALUMNI", "ADVISER", "EMPLOYEE", "INVESTOR", "FALSE_POSITION"]); export const personMetadataOutput = z.object({contact: contactMetadata.nullable().optional(), title: z.string().nullable().optional(), department: department.nullable().optional(), description: z.string().nullable().optional(), start_date: z.string().nullable().optional(), end_date: z.string().nullable().optional(), is_current_position: z.boolean().nullable().optional(), location: z.string().nullable().optional(), role_type: roleType.nullable().optional(), person: z.string(), person_company_urn: z.string().nullable().optional()}); export const investorVisbility = z.enum(["VISIBLE", "HIDDEN"]); export const fundingRoundInvestor = z.object({entity_urn: z.union([z.string(), z.string()]), is_lead: z.boolean().optional(), investor_name: z.string(), association_urn: z.union([z.string(), z.string(), z.string(), z.string()]), investor_urn: z.string().nullable().optional(), visibility_status: investorVisbility.nullable().optional()}); export const fundingCompletionStatus = z.enum(["COMPLETED", "CONFIRMED_UNDISCLOSED", "IN_PROCESS", "RUMORED"]); export const fundingRoundOutput = z.object({announcement_date: z.string().nullable().optional(), funding_round_type: z.string(), funding_amount: z.number(), funding_currency: z.string().optional(), investors: z.array(fundingRoundInvestor).optional(), post_money_valuation: z.number().nullable().optional(), entity_urn: z.union([z.string(), z.string()]), company_urn: z.string(), source_url: z.string().nullable().optional(), contributes_to_funding_total: z.boolean().optional(), additional_sources: z.array(z.string()).nullable().optional(), completion_status: fundingCompletionStatus.nullable().optional(), valuation_info: z.object({value: z.number().int().nullable().optional(), source: valuationSource.nullable().optional(), source_details: z.string().nullable().optional()}).nullable().optional()}); export const notableFollowerOutput = z.object({follower_urn: z.union([z.string(), z.string()]), follower_name: z.string().nullable().optional(), firm_urn: z.string().nullable().optional(), firm_name: z.string().nullable().optional(), followed_urn: z.union([z.string(), z.string()]), followed_name: z.string().nullable().optional(), follow_observed_at: z.string().nullable().optional()}); export const acquisition = z.object({company_urn: z.string()}); export const subsidiary = z.object({company_urn: z.string()}); export const stealthEmergence = z.object({emergence_date: z.string().nullable().optional(), previously_known_as: z.array(z.string()).optional()}); export const rebranding = z.object({formerly_known_as: z.array(z.string()).optional()}); export const currentlyRaisingEnum = z.enum(["YES", "MAYBE", "NO", "UNKNOWN"]); export const founderProvidedAttachment = z.object({url: z.string(), filename: z.string().nullable().optional(), content_type: z.string().nullable().optional()}); export const companyOutput = z.object({website: z.object({url: z.string().nullable().optional(), domain: z.string().nullable().optional(), is_broken: z.boolean().nullable().optional()}).nullable().optional(), logo_url: z.string().nullable().optional(), name: z.string().nullable().optional(), legal_name: z.string().nullable().optional(), description: z.string().nullable().optional(), customer_type: z.string().nullable().optional(), founding_date: z.object({date: z.string(), granularity: foundingDatePrecision}).nullable().optional(), headcount: z.number().int().nullable().optional(), ownership_status: z.enum(["PRIVATE", "OUT_OF_BUSINESS", "ACQUIRED_OR_MERGED", "ACTIVE", "INACTIVE", "MANAGING", "IPO_REGISTRATION", "PUBLIC"]).nullable().optional(), company_type: companyType.optional(), location: z.object({address_formatted: z.string().nullable().optional(), location: z.string().nullable().optional(), street: z.string().nullable().optional(), city: z.string().nullable().optional(), state: z.string().nullable().optional(), zip: z.string().nullable().optional(), country: z.string().nullable().optional(), metro_areas: z.array(z.string()).nullable().optional()}).nullable().optional(), contact: z.object({emails: z.array(z.string()).optional(), phone_numbers: z.array(z.string()).optional(), exec_emails: z.array(z.string()).optional(), primary_email: z.string().nullable().optional(), primary_email_person_id: z.number().int().nullable().optional()}).nullable().optional(), socials: z.record(z.string(), z.union([socialMetadata, facebookSocialMetadata])).nullable().optional(), funding: z.object({funding_total: z.number().nullable().optional(), num_funding_rounds: z.number().int().nullable().optional(), investors: z.array(investor).optional(), last_funding_at: z.unknown(), last_funding_type: fundingType.nullable().optional(), last_funding_total: z.string().nullable().optional(), funding_stage: z.union([fundingStage, fundingType]).nullable().optional(), valuation: z.number().int().nullable().optional(), valuation_info: companyValuationInfoOutput.nullable().optional()}).nullable().optional(), name_aliases: z.array(z.string()).optional(), website_domain_aliases: z.array(z.string()).optional(), corrected_headcount: z.number().int().nullable().optional(), external_headcount: z.number().int().nullable().optional(), web_traffic: z.number().int().nullable().optional(), stage: z.union([z.enum(["STEALTH", "PRE_SEED", "SEED", "SERIES_A", "SERIES_B", "SERIES_C", "SERIES_D", "SERIES_E", "SERIES_F", "SERIES_G", "SERIES_H", "SERIES_I", "SERIES_J", "SERIES_K_PLUS", "VENTURE_UNKNOWN", "EXITED", "OUT_OF_BUSINESS"]), z.enum(["ACCELERATOR_INCUBATOR", "ANGEL", "BANK_ADMIN", "BRIDGE", "BUYOUT_LBO", "CAPITALIZATION", "CONVERTIBLE_NOTE", "CROWDFUNDING", "DEBT", "DEBT_REPAY", "EARLY_STAGE", "GRANT", "INITIAL_COIN_OFFERING", "IPO", "JOINT_VENTURE", "LATER_STAGE", "M_AND_A", "MEZZANINE", "PRE_SEED", "PRIVATE_EQUITY", "PUBLIC_EQUITY_OFFERING", "REVERSE_MERGER", "SECONDARY_TRANSACTION", "SEED", "SEED_EXTENSION", "SERIES_1", "SERIES_2", "SERIES_3", "SERIES_A", "SERIES_A_EXTENSION", "SERIES_A1", "SERIES_A2", "SERIES_A3", "SERIES_AA", "SERIES_AAA", "SERIES_B", "SERIES_B_EXTENSION", "SERIES_B1", "SERIES_B2", "SERIES_B3", "SERIES_BB", "SERIES_C", "SERIES_C_EXTENSION", "SERIES_C1", "SERIES_C2", "SERIES_C3", "SERIES_CC", "SERIES_D", "SERIES_D_EXTENSION", "SERIES_D1", "SERIES_D2", "SERIES_D3", "SERIES_E", "SERIES_E_EXTENSION", "SERIES_E1", "SERIES_E2", "SERIES_F", "SERIES_F_EXTENSION", "SERIES_G", "SERIES_G_EXTENSION", "SERIES_H", "SERIES_I", "SERIES_J", "SPAC", "SPIN_OFF", "STRATEGIC", "UNKNOWN", "VENTURE_LEASING", "PRODUCT_CROWDFUNDING", "MERGER_OF_EQ", "PE_GROWTH", "CORPORATE", "DEBT_REFIN", "EQUITY_CROWDFUNDING", "NON_EQUITY_ASSISTANCE", "SECONDARY_OPEN", "RESTART_ANGEL", "SECONDARY_DISTRIB", "RESTART_LATER", "RESTART_EARLY", "ANGEL_INDIVIDUAL", "CORPORATE_ROUND", "DEBT_FINANCING", "CONV_DEBT", "DEBT_CONV", "SECONDARY_TRANSACTION_PRIVATE", "SECONDARY_TRANSACTION_PUBLIC", "LATER_[STAGE_SERIES_G", "DEBT_GENERAL", "LATER_STAGE_SERIES_F", "LATER_STAGE_SERIES_A", "VENTURE_DEBT", "EARLY_STAGE_VENTURE", "LATER_STAGE_VENTURE", "PRE__SEED", "FUNDING_ROUND", "SEED_ROUND", "EARLY_STAGE_SERIES_A", "EARLY_STAGE_SERIES_A1", "EARLY_STAGE_SERIES_B", "EARLY_STAGE_SERIES_B1", "LATER_STAGE_SERIES_C", "LATER_STAGE_SERIES_C1", "CORPORATE_SERIES_A", "LATER_STAGE_SERIES_E", "LATER_STAGE_SERIES_B", "LATER_STAGE_SERIES_D", "EARLY_STAGE_VC", "ACCELERATOR_INC", "DEBT_PP", "LATER_STAGE_VC", "UNDISCLOSED", "POST_IPO_DEBT", "POST_IPO_EQUITY", "POST_IPO_SECONDARY", "SECONDARY_MARKET", "SECONDARY_PRIVATE", "SERIES_UNKNOWN", "OUT_OF_BUSINESS", "IBO", "PIPE", "LIQUIDATION", "UNDERTERMINED", "ASSET_PURCH", "PLATFORM", "DIV_RECAP", "LEV_RECAP", "REPURCHASE", "TWO_PO", "EQUITY_FOR_SVC", "DIVIDEND", "SALE_LEASE_BACK", "GP_STAKES"])]).nullable().optional(), redirect_urn: z.string().nullable().optional(), requested_entity_urn: z.string().nullable().optional(), entity_urn: z.string(), id: z.number().int(), funding_attribute_null_status: z.enum(["EXISTS_BUT_UNDISCLOSED", "NONE_ANNOUNCED"]).nullable().optional(), headquarters: z.string().nullable().optional(), tags: z.union([z.array(tagOutput), z.array(z.string())]).optional(), tags_v2: z.union([z.array(tagOutput), z.array(z.string())]).optional(), snapshots: z.union([z.array(companySnapshotOutput), z.array(z.string())]).optional(), initialized_date: z.string().nullable().optional(), highlights: z.array(servicesMidtierSchemasCommonHighlightOutput).optional(), traction_metrics: z.object({facebook_like_count: tractionMetricsInfo, external_facebook_like_count: tractionMetricsInfo.nullable().optional(), facebook_follower_count: tractionMetricsInfo, external_facebook_follower_count: tractionMetricsInfo.nullable().optional(), facebook_following_count: tractionMetricsInfo, external_facebook_following_count: tractionMetricsInfo.nullable().optional(), linkedin_follower_count: tractionMetricsInfo, external_linkedin_follower_count: tractionMetricsInfo.nullable().optional(), instagram_follower_count: tractionMetricsInfo, external_instagram_follower_count: tractionMetricsInfo.nullable().optional(), twitter_follower_count: tractionMetricsInfo, external_twitter_follower_count: tractionMetricsInfo.nullable().optional(), headcount: tractionMetricsInfo, corrected_headcount: tractionMetricsInfo.nullable().optional(), external_headcount: tractionMetricsInfo.nullable().optional(), funding_total: tractionMetricsInfo, web_traffic: tractionMetricsInfo, headcount_advisor: tractionMetricsInfo, headcount_customer_success: tractionMetricsInfo, headcount_data: tractionMetricsInfo, headcount_design: tractionMetricsInfo, headcount_engineering: tractionMetricsInfo, headcount_finance: tractionMetricsInfo, headcount_legal: tractionMetricsInfo, headcount_marketing: tractionMetricsInfo, headcount_operations: tractionMetricsInfo, headcount_other: tractionMetricsInfo, headcount_people: tractionMetricsInfo, headcount_product: tractionMetricsInfo, headcount_sales: tractionMetricsInfo, headcount_support: tractionMetricsInfo}).nullable().optional(), updated_at: z.string().nullable().optional(), people: z.union([z.array(personMetadataOutput), z.array(z.string())]).optional(), employee_highlights: z.array(servicesMidtierSchemasCommonHighlightOutput).optional(), funding_rounds: z.array(fundingRoundOutput).optional(), notable_followers: z.array(notableFollowerOutput).optional(), num_notable_followers: z.number().int().nullable().optional(), funding_per_employee: z.number().nullable().optional(), external_description: z.string().nullable().optional(), short_description: z.string().nullable().optional(), investor_urn: z.string().nullable().optional(), related_companies: z.object({beta_notice: z.string().nullable().optional(), acquisitions: z.array(acquisition).optional(), acquired_by: acquisition.nullable().optional(), subsidiaries: z.array(subsidiary).optional(), subsidiary_of: subsidiary.nullable().optional(), prior_stealth_association: stealthEmergence.nullable().optional(), rebrands: rebranding.nullable().optional()}).nullable().optional(), leadership_prior_companies: z.array(z.string()).nullable().optional(), stealth_emergence_date: z.string().nullable().optional(), currently_raising: z.object({value: currentlyRaisingEnum.optional(), source: z.string().nullable().optional(), submitted_at: z.string().nullable().optional()}).nullable().optional(), founder_story: z.object({value: z.string().nullable().optional(), source: z.string().nullable().optional(), submitted_at: z.string().nullable().optional()}).nullable().optional(), founder_attachments: z.object({value: z.array(founderProvidedAttachment).optional(), source: z.string().nullable().optional(), submitted_at: z.string().nullable().optional()}).nullable().optional()}); export const createApiCompaniesBatchGetResponse = z.array(companyOutput); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * Batch Get Companies By Id Or Urn Using Post * * POST /companies/batchGet */ export const createApiCompaniesBatchGet = async (args: CreateApiCompaniesBatchGetArgs, options: CreateApiCompaniesBatchGetOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (args.extended != null) query.append("extended", String(args.extended)) const url = `${baseUrl.replace(/\/+$/, '')}/companies/batchGet${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(createApiCompaniesBatchGetResponse, await res.json()) };