import {z} from 'zod' export type UserWatchlistType = 'USER_MANAGED_WATCHLIST' | 'CUSTOMER_MANAGED_WATCHLIST' | 'USER_FAVORITED_ENTITIES' | 'USER_HIDDEN_ENTITIES' | 'CUSTOMER_PORTFOLIO_LIST' | 'CUSTOMER_AFFINITY_SYNCED_LIST' | 'CUSTOMER_ATTIO_SYNCED_LIST' | 'GLOBAL_FIELD_LIST'; export type GetApiWatchlistsCompaniesArgs = {company_urns?: Array | undefined, watchlist_type?: (UserWatchlistType | null) | undefined, return_company_urns?: boolean | undefined, return_company_count?: boolean | undefined, get_team_shared_list?: boolean | undefined}; export type GetApiWatchlistsCompaniesOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; export const userWatchlistType = z.enum(["USER_MANAGED_WATCHLIST", "CUSTOMER_MANAGED_WATCHLIST", "USER_FAVORITED_ENTITIES", "USER_HIDDEN_ENTITIES", "CUSTOMER_PORTFOLIO_LIST", "CUSTOMER_AFFINITY_SYNCED_LIST", "CUSTOMER_ATTIO_SYNCED_LIST", "GLOBAL_FIELD_LIST"]); 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 listCustomFieldType = z.enum(["TEXT", "NUMBER", "DATE", "SINGLE_SELECT", "MULTI_SELECT", "PERSON", "WEBSITE", "CHECKBOX", "STATUS", "RECORD_REFERENCE"]); export const checkboxListCustomFieldValue = z.object({value: z.boolean().nullable().optional()}); export const numberListCustomFieldValue = z.object({value: z.number().nullable().optional()}); export const singleListSelectCustomFieldValue = z.object({value: z.string().nullable().optional()}); export const textListCustomFieldValue = z.object({value: z.string().nullable().optional()}); export const multiSelectListCustomFieldValue = z.object({value: z.array(z.string()).optional()}); export const personListCustomFieldDefaultValueMode = z.enum(["FIXED_URN", "ADDED_BY_USER"]); export const personListCustomFieldDefaultValue = z.object({value: z.array(z.string()).optional(), mode: personListCustomFieldDefaultValueMode}); export const recordReferenceListCustomFieldValue = z.object({value: z.array(z.string()).optional()}); export const dateListCustomFieldDefaultValueMode = z.enum(["FIXED_DATE", "CREATED_AT"]); export const dateListCustomFieldDefaultValue = z.object({value: z.string().nullable().optional(), mode: dateListCustomFieldDefaultValueMode}); export const websiteListCustomFieldValue = z.object({value: z.string().nullable().optional()}); export const statusListCustomFieldValue = z.object({value: z.string().nullable().optional()}); export const customFieldIntegrationSourceList = z.object({urn: z.string(), name: z.string(), external_source_urn: z.string()}); export const customFieldIntegrationSource = z.object({provider: z.string(), list: customFieldIntegrationSourceList.nullable().optional()}); export const selectListCustomFieldValueOption = z.object({urn: z.string().optional(), name: z.string(), color: z.string()}); export const selectListCustomFieldMetadata = z.object({options: z.array(selectListCustomFieldValueOption).optional(), default: z.string().nullable().optional()}); export const numberListCustomFieldValueFormat = z.enum(["NUMBER", "PERCENT", "US_DOLLAR"]); export const numberListCustomFieldMetadata = z.object({format: numberListCustomFieldValueFormat.optional()}); export const dateListCustomFieldValueFormat = z.enum(["MM_DD_YYYY", "DD_MM_YYYY", "YYYY_MM_DD"]); export const dateListCustomFieldMetadata = z.object({format: dateListCustomFieldValueFormat.optional()}); export const personListCustomFieldValueMode = z.enum(["SINGLE", "MULTIPLE"]); export const personListCustomFieldMetadata = z.object({mode: personListCustomFieldValueMode}); export const recordReferenceListCustomFieldMetadata = z.object({record_type_urn: z.string(), allow_multiple: z.boolean(), mode: z.string().nullable().optional()}); export const companyListCustomFieldOutput = z.object({created_at: z.string(), updated_at: z.string(), urn: z.union([z.string(), z.string(), z.string(), z.string()]), list_urn: z.string(), name: z.string(), type: listCustomFieldType, default_value: z.union([checkboxListCustomFieldValue, numberListCustomFieldValue, singleListSelectCustomFieldValue, textListCustomFieldValue, multiSelectListCustomFieldValue, personListCustomFieldDefaultValue, recordReferenceListCustomFieldValue, dateListCustomFieldDefaultValue, websiteListCustomFieldValue, statusListCustomFieldValue]).nullable().optional(), integration_source: customFieldIntegrationSource.nullable().optional(), metadata: z.union([selectListCustomFieldMetadata, numberListCustomFieldMetadata, dateListCustomFieldMetadata, personListCustomFieldMetadata, recordReferenceListCustomFieldMetadata]).nullable().optional()}); export const filter = z.object({field: z.string(), field_urn: z.string().nullable().optional(), comparator: z.string(), filter_value: z.unknown()}); export const filterGroupGeneratorId = z.enum(["company_headcount", "search_v2_accelerator", "search_v2_company_funding_stage", "search_v2_company_funding_stage_simple", "search_v2_company_funding_total_range", "search_v2_company_funding_last_round_total_range", "search_v2_company_funding_undisclosed", "search_v2_company_currently_raising", "search_v2_company_funding_include_investors", "search_v2_company_funding_exclude_investors", "search_v2_company_funding_last_round_date", "search_v2_company_funding_foundation_date", "search_v2_company_funding_investors_deal_search", "search_v2_company_team_headcount_range", "search_v2_company_team_headcount_percent_growth_range", "search_v2_company_latest_web_traffic_range", "search_v2_company_web_traffic_percent_growth_range", "search_v2_company_headcount_department_percent_growth_range", "search_v2_company_socials_growth_range", "search_v2_company_team_highlights", "search_v2_company_sector_include_keywords", "search_v2_company_sector_exclude_keywords", "search_v2_company_sector_match_keywords", "search_v2_company_sector_include_industry_tags", "search_v2_company_sector_exclude_industry_tags", "search_v2_company_sector_include_business_tags", "search_v2_company_sector_exclude_business_tags", "search_v2_company_sector_include_technology_tags", "search_v2_company_sector_exclude_technology_tags", "search_v2_company_sector_preset", "search_v2_company_sector_include_tags", "search_v2_company_sector_exclude_tags", "search_v2_company_sector_product_categories", "search_v2_company_team_founding_experience", "search_v2_company_team_member_experience", "search_v2_company_team_notable_followers", "search_v2_company_team_notable_followers_count", "search_v2_company_list_and_more_initialized_date", "search_v2_company_list_and_more_updated_date", "search_v2_company_list_and_more_include_from_watchlist", "search_v2_company_list_and_more_exclude_from_watchlist", "search_v2_company_list_and_more_accelerators", "search_v2_company_list_and_more_location", "search_v2_company_list_and_more_continents", "search_v2_company_list_and_more_include_from_people_list", "search_v2_company_list_and_more_exclude_from_people_list", "search_v2_company_is_not_investor", "search_people_employees", "search_v2_people_education_experience", "search_v2_people_general_highlights", "search_v2_people_general_location", "search_v2_people_general_connections", "search_v2_person_network_membership", "search_v2_company_network_membership", "search_v2_investor_network_membership", "search_v2_people_general_linkedin_headlines", "search_v2_people_general_people_lists", "search_v2_people_current_experience", "search_v2_people_past_experience", "search_v2_people_general_correspondences", "search_v2_person_notable_followers", "search_v2_person_notable_followers_count", "search_v2_company_team_correspondences", "search_v2_semantic_search_filter", "search_v2_similar_company_search_filter", "search_v2_investor_aum_range", "search_v2_investor_check_size_range", "search_v2_investor_funded_company_location", "search_v2_investor_invested_stage", "search_v2_investor_latest_investment_date", "search_v2_investor_location", "search_v2_investor_num_deals_range", "search_v2_investor_team_size_range", "search_v2_investor_co_investors", "search_v2_investor_average_investment_size_range", "search_v2_investor_entry_stage_focus", "search_v2_investor_country_focus", "search_v2_investor_sector_focus", "search_v2_investor_funded_company", "search_v2_investor_website_keywords", "search_v2_investor_funded_company_sector_tags", "search_v2_investor_portfolio_details", "search_v2_investor_team_correspondences", "search_v2_investor_lists", "search_v2_investor_type", "search_v2_investor_primary_type", "search_v2_investor_secondary_types"]); export const filterGroupGenerator = z.object({generator_id: filterGroupGeneratorId, arguments: z.object({})}); export const filterGroupOutput: z.ZodType = z.object({join_operator: z.enum(["and", "or"]), filters: z.array(filter).nullable().optional(), filter_groups: z.array(z.lazy(() => filterGroupOutput)).nullable().optional(), filter_group_generators: z.array(filterGroupGenerator).nullable().optional()}); export const pagination = z.object({start: z.number().int().nullable().optional(), page_size: z.number().int()}); export const sortContextArguments = z.object({saved_search_id: z.number().int().nullable().optional(), date_added_after: z.string().nullable().optional(), list_urn: z.union([z.string(), z.string()]).nullable().optional(), custom_field_urn: z.union([z.string(), z.string()]).nullable().optional(), company_id: z.number().int().nullable().optional()}); export const sortOutput = z.object({sort_field: z.string(), descending: z.boolean(), sort_context_values: sortContextArguments.nullable().optional()}); export const apiSearchQueryOutput = z.object({filter_group: filterGroupOutput, pagination: pagination, sort: z.array(sortOutput).optional(), controlled_filter_group: filterGroupOutput.nullable().optional(), merge_query_for_nested_fields: z.boolean().optional()}); export const listNamedViewDisplayType = z.enum(["GRID", "BOARD"]); export const companyListNamedViewColumnViewSettings = z.object({entity_urn: z.union([z.string(), z.string(), z.string(), z.string(), z.string()]), column_width: z.number().int().nullable().optional()}); export const companyListNamedViewOutput = z.object({id: z.number().int().nullable(), entity_urn: z.string(), name: z.string(), list_urn: z.string(), visible_columns: z.array(z.union([z.string(), z.string(), z.string(), z.string(), z.string()])), search_query: apiSearchQueryOutput.nullable().optional(), display_type: listNamedViewDisplayType, group_by_field: z.string().nullable().optional(), hide_empty_columns: z.boolean(), column_view_settings: z.array(companyListNamedViewColumnViewSettings).nullable().optional()}); export const companyWatchlistOutput = z.object({name: z.string(), shared_with_team: z.boolean(), user_watchlist_type: userWatchlistType.nullable().optional(), entity_urn: z.union([z.string(), z.string()]), creator: z.string().nullable().optional(), owner: z.union([z.string(), z.string()]), companies: z.union([z.array(companyOutput), z.array(z.string())]).nullable().optional(), companies_count: z.number().int().nullable().optional(), custom_fields: z.array(companyListCustomFieldOutput).optional(), named_views: z.array(companyListNamedViewOutput).optional(), named_views_order: z.array(z.string()).optional(), id: z.string(), updated_at: z.string(), created_at: z.string(), user_relevance_score_influence_type: z.string().nullable().optional()}); export const getApiWatchlistsCompaniesResponse = z.array(companyWatchlistOutput); 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 }; /** * Get Company Watchlists By Owner * * GET /watchlists/companies */ export const getApiWatchlistsCompanies = async (args: GetApiWatchlistsCompaniesArgs, options: GetApiWatchlistsCompaniesOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/json") for (const item of args.company_urns ?? []) query.append("company_urns", String(item)) if (args.watchlist_type != null) query.append("watchlist_type", String(args.watchlist_type)) if (args.return_company_urns != null) query.append("return_company_urns", String(args.return_company_urns)) if (args.return_company_count != null) query.append("return_company_count", String(args.return_company_count)) if (args.get_team_shared_list != null) query.append("get_team_shared_list", String(args.get_team_shared_list)) const url = `${baseUrl.replace(/\/+$/, '')}/watchlists/companies${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(getApiWatchlistsCompaniesResponse, await res.json()) };