// Minimal ambient declarations for `node-apple-receipt-verify`.
// The library ships no @types package; we only use config() + validate(),
// and accept that validate() returns `unknown` items we narrow ourselves.

declare module 'node-apple-receipt-verify' {
  export interface AppleReceiptConfig {
    secret?: string;
    verbose?: boolean;
    environment?: Array<'production' | 'sandbox'>;
    /** ignore expired items, default false */
    ignoreExpired?: boolean;
    /** extended fields, etc. */
    [k: string]: any;
  }
  export function config(options: AppleReceiptConfig): void;
  export function validate(options: { receipt: string }): Promise<unknown[]>;
}
