import type * as Whop from "../index.js"; export interface MembershipAffiliate { /** Whether the commission is paid on the membership's first payment only or on all its payments. */ applies_to_payments: MembershipAffiliate.AppliesToPayments; /** The flat fee commission in the membership currency, or `null` for a percentage. */ commission_amount: Whop.Money | null; /** The percentage commission in percentage points, so `20` means 20%, or `null` for a flat fee. */ commission_percentage: number | null; /** How the commission rate was set: `custom` for a rate set for this affiliate, `member` for the member affiliate rate of the plan or product, `global` for the product's global affiliate rate, or `marketplace` for a Whop marketplace referral. */ commission_source: MembershipAffiliate.CommissionSource; /** Whether the commission is a percentage or a flat fee. */ commission_type: MembershipAffiliate.CommissionType; /** Whether this membership pays affiliate commissions. `false` means the affiliate is kept on the membership but is no longer paid. */ enabled: boolean; /** Affiliate ID, prefixed `aff_`. */ id: string; /** ID of the affiliate's user, prefixed `user_`. */ user_id: string; } export declare namespace MembershipAffiliate { /** Whether the commission is paid on the membership's first payment only or on all its payments. */ const AppliesToPayments: { readonly FirstPayment: "first_payment"; readonly AllPayments: "all_payments"; }; type AppliesToPayments = (typeof AppliesToPayments)[keyof typeof AppliesToPayments]; /** How the commission rate was set: `custom` for a rate set for this affiliate, `member` for the member affiliate rate of the plan or product, `global` for the product's global affiliate rate, or `marketplace` for a Whop marketplace referral. */ const CommissionSource: { readonly Custom: "custom"; readonly Member: "member"; readonly Marketplace: "marketplace"; readonly Global: "global"; }; type CommissionSource = (typeof CommissionSource)[keyof typeof CommissionSource]; /** Whether the commission is a percentage or a flat fee. */ const CommissionType: { readonly FlatFee: "flat_fee"; readonly Percentage: "percentage"; }; type CommissionType = (typeof CommissionType)[keyof typeof CommissionType]; }