import type * as Whop from "../index.js"; export interface Audience { /** Whether the audience targets a defined group of people or people similar to an existing audience. */ audience_type: Audience.AudienceType; /** Whether Whop rebuilds membership from saved People filters twice a day. When `false`, People audiences keep the members matched at creation. Always `false` for uploaded lists, lookalikes, and engagement audiences. Engagement membership is maintained by Meta. */ auto_refresh: boolean; /** When the audience was created, as an ISO 8601 timestamp. */ created_at: string; /** Social engagement rules maintained by the ad platform. `null` for other audience sources. */ engagement: Whop.AudienceEngagement | null; /** Processing error message. `null` unless processing is partial or failed. */ error_message: string | null; /** Saved Whop People filters that define membership, using the same keys as `GET /people`. `null` for uploaded lists, engagement audiences, and lookalikes. */ filters: Record | null; /** Audience ID, prefixed `adaud_`. */ id: string; /** When the audience membership was last rebuilt, as an ISO 8601 timestamp. `null` until the first build completes. */ last_refreshed_at: string | null; /** For lookalikes: the upper bound of the similarity band as a fraction (0.02 = top 2%). `null` for custom audiences. */ lookalike_ratio: number | null; /** For lookalikes: the lower bound of the similarity band as a fraction. `null` for custom audiences and first-tier lookalikes. */ lookalike_starting_ratio: number | null; match_rates: Whop.AudienceMatchRate[]; /** Members successfully uploaded to connected ad accounts. Always 0 for lookalikes and engagement audiences. */ matched_rows: number; /** Audience display name. */ name: string; platform_audience_ids: string[]; /** Members processed from the source so far. Always 0 for lookalikes and engagement audiences. */ processed_rows: number; /** Processing progress from 0 to 100. */ progress_percent: number; /** For lookalikes: the audience this lookalike was built from. `null` for custom audiences. */ source_audience_id: string | null; /** Membership source: an uploaded CSV, Whop People filters, or social engagement. */ source_type: Audience.SourceType; /** Current state of audience creation. For engagement audiences, `ready` means the rules were created on Meta; membership may still be populating. `syncing` means Whop is sending matched rows to connected ad accounts. When status is `partial` or `failed`, `error_message` explains what went wrong. */ status: Audience.Status; /** Total members detected in the source — CSV rows for uploaded lists, matching people for automatic audiences. Always 0 for lookalikes and engagement audiences. */ total_rows: number; /** When the audience was last updated, as an ISO 8601 timestamp. */ updated_at: string; } export declare namespace Audience { /** Whether the audience targets a defined group of people or people similar to an existing audience. */ const AudienceType: { readonly Custom: "custom"; readonly Lookalike: "lookalike"; }; type AudienceType = (typeof AudienceType)[keyof typeof AudienceType]; /** Membership source: an uploaded CSV, Whop People filters, or social engagement. */ const SourceType: { readonly CsvUpload: "csv_upload"; readonly PeopleFilter: "people_filter"; readonly Engagement: "engagement"; }; type SourceType = (typeof SourceType)[keyof typeof SourceType]; /** Current state of audience creation. For engagement audiences, `ready` means the rules were created on Meta; membership may still be populating. `syncing` means Whop is sending matched rows to connected ad accounts. When status is `partial` or `failed`, `error_message` explains what went wrong. */ const Status: { readonly Pending: "pending"; readonly Processing: "processing"; readonly Syncing: "syncing"; readonly Ready: "ready"; readonly Partial: "partial"; readonly Failed: "failed"; }; type Status = (typeof Status)[keyof typeof Status]; }